Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int main(void) {
	int N, D, X;
	int A[128];
	int i;
	int tomatuharuka = 0;
	if (scanf("%d", &N) != 1) return 1;
	if (scanf("%d%d", &D, &X) != 2) return 1;
	for (i = 0; i < N; i++) {
		if (scanf("%d", &A[i]) != 1) return 1;
	}

	for (i = 0; i < N; i++) {
		tomatuharuka += (D + A[i] - 1) / A[i];
	}
	printf("%d\n", X + tomatuharuka);

	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$552, %rsp
	.cfi_def_cfa_offset 592
	movq	%fs:40, %rax
	movq	%rax, 536(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
.L4:
	movl	$1, %eax
.L1:
	movq	536(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L14
	addq	$552, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L4
	cmpl	$0, 4(%rsp)
	jle	.L5
	leaq	16(%rsp), %r13
	xorl	%ebp, %ebp
	movq	%r13, %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L4
	movl	4(%rsp), %eax
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, %eax
	jg	.L6
	testl	%eax, %eax
	jle	.L5
	subl	$1, %eax
	leaq	4(%r13), %rcx
	movl	8(%rsp), %r9d
	xorl	%edi, %edi
	leaq	(%rcx,%rax,4), %r8
	jmp	.L7
.L15:
	addq	$4, %rcx
.L7:
	movl	0(%r13), %esi
	movq	%rcx, %r13
	leal	-1(%rsi,%r9), %eax
	cltd
	idivl	%esi
	addl	%eax, %edi
	cmpq	%rcx, %r8
	jne	.L15
.L8:
	movl	12(%rsp), %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	addl	%edi, %edx
	movl	$1, %edi
	call	__printf_chk@PLT
	xorl	%eax, %eax
	jmp	.L1
.L5:
	xorl	%edi, %edi
	jmp	.L8
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$552, %rsp
	.cfi_def_cfa_offset 592
	movq	%fs:40, %rax
	movq	%rax, 536(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
.L4:
	movl	$1, %eax
.L1:
	movq	536(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L14
	addq	$552, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L4
	cmpl	$0, 4(%rsp)
	jle	.L5
	leaq	16(%rsp), %r13
	xorl	%ebp, %ebp
	movq	%r13, %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L4
	movl	4(%rsp), %eax
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, %eax
	jg	.L6
	testl	%eax, %eax
	jle	.L5
	subl	$1, %eax
	leaq	4(%r13), %rcx
	movl	8(%rsp), %r9d
	xorl	%edi, %edi
	leaq	(%rcx,%rax,4), %r8
	jmp	.L7
.L15:
	addq	$4, %rcx
.L7:
	movl	0(%r13), %esi
	movq	%rcx, %r13
	leal	-1(%rsi,%r9), %eax
	cltd
	idivl	%esi
	addl	%eax, %edi
	cmpq	%rcx, %r8
	jne	.L15
.L8:
	movl	12(%rsp), %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	addl	%edi, %edx
	movl	$1, %edi
	call	__printf_chk@PLT
	xorl	%eax, %eax
	jmp	.L1
.L5:
	xorl	%edi, %edi
	jmp	.L8
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
rule
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$552, %rsp
	.cfi_def_cfa_offset 592
	movq	%fs:40, %rax
	movq	%rax, 536(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
.L4:
	movl	$1, %eax
.L1:
	movq	536(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L14
	addq	$552, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L4
	cmpl	$0, 4(%rsp)
	jle	.L5
	leaq	16(%rsp), %r13
	xorl	%ebp, %ebp
	movq	%r13, %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L4
	movl	4(%rsp), %eax
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, %eax
	jg	.L6
	testl	%eax, %eax
	jle	.L5
	subl	$1, %eax
	leaq	4(%r13), %rcx
	movl	8(%rsp), %r9d
	xorl	%edi, %edi
	leaq	(%rcx,%rax,4), %r8
	jmp	.L7
.L15:
	addq	$4, %rcx
.L7:
	movl	0(%r13), %esi
	movq	%rcx, %r13
	leal	-1(%rsi,%r9), %eax
	cltd
	idivl	%esi
	addl	%eax, %edi
	cmpq	%rcx, %r8
	jne	.L15
.L8:
	movl	12(%rsp), %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	addl	%edi, %edx
	movl	$1, %edi
	call	__printf_chk@PLT
	xorl	%eax, %eax
	jmp	.L1
.L5:
	xorl	%edi, %edi
	jmp	.L8
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
```c
#include <stdio.h>

int main(void) {
	int N, D, X;
	int A[128];
	int i;
	int tomatuharuka = 0;
	if (scanf("%d", &N) != 1) return 1;
	if (scanf("%d%d", &D, &X) != 2) return 1;
	for (i = 0; i < N; i++) {
		if (scanf("%d", &A[i]) != 1) return 1;
	}

	for (i = 0; i < N; i++) {
		tomatuharuka += (D + A[i] - 1) / A[i];
	}
	printf("%d\n", X + tomatuharuka);

	return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int main(void) {
	int N, D, X;
	int A[128];
	int i;
	int tomatuharuka = 0;
	if (scanf("%d", &N) != 1) return 1;
	if (scanf("%d%d", &D, &X) != 2) return 1;
	for (i = 0; i < N; i++) {
		if (scanf("%d", &A[i]) != 1) return 1;
	}

	for (i = 0; i < N; i++) {
		tomatuharuka += (D + A[i] - 1) / A[i];
	}
	printf("%d\n", X + tomatuharuka);

	return 0;
}
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

5
30 44
26
18
81
27
6
 3
7 1
1
5
10
 2
8 20
1
19
 3
7 1
2
5
19
 2
8 23
1
19
 5
1 44
26
18
76
27
6
 3
1 1
2
5
19
 3
1 2
2
5
15
 5
1 52
26
21
11
27
6
 3
1 0
2
5
15

56
 11
 29
 8
 32
 49
 4
 5
 57
 3

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int main(void) {
	int N, D, X;
	int A[128];
	int i;
	int tomatuharuka = 0;
	if (scanf("%d", &N) != 1) return 1;
	if (scanf("%d%d", &D, &X) != 2) return 1;
	for (i = 0; i < N; i++) {
		if (scanf("%d", &A[i]) != 1) return 1;
	}

	for (i = 0; i < N; i++) {
		tomatuharuka += (D + A[i] - 1) / A[i];
	}
	printf("%d\n", X + tomatuharuka);

	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$552, %rsp
	.cfi_def_cfa_offset 592
	movq	%fs:40, %rax
	movq	%rax, 536(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
.L4:
	movl	$1, %eax
.L1:
	movq	536(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L14
	addq	$552, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L4
	cmpl	$0, 4(%rsp)
	jle	.L5
	leaq	16(%rsp), %r13
	xorl	%ebp, %ebp
	movq	%r13, %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L4
	movl	4(%rsp), %eax
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, %eax
	jg	.L6
	testl	%eax, %eax
	jle	.L5
	subl	$1, %eax
	leaq	4(%r13), %rcx
	movl	8(%rsp), %r9d
	xorl	%edi, %edi
	leaq	(%rcx,%rax,4), %r8
	jmp	.L7
.L15:
	addq	$4, %rcx
.L7:
	movl	0(%r13), %esi
	movq	%rcx, %r13
	leal	-1(%rsi,%r9), %eax
	cltd
	idivl	%esi
	addl	%eax, %edi
	cmpq	%rcx, %r8
	jne	.L15
.L8:
	movl	12(%rsp), %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	addl	%edi, %edx
	movl	$1, %edi
	call	__printf_chk@PLT
	xorl	%eax, %eax
	jmp	.L1
.L5:
	xorl	%edi, %edi
	jmp	.L8
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$552, %rsp
	.cfi_def_cfa_offset 592
	movq	%fs:40, %rax
	movq	%rax, 536(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
.L4:
	movl	$1, %eax
.L1:
	movq	536(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L14
	addq	$552, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L4
	cmpl	$0, 4(%rsp)
	jle	.L5
	leaq	16(%rsp), %r13
	xorl	%ebp, %ebp
	movq	%r13, %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L4
	movl	4(%rsp), %eax
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, %eax
	jg	.L6
	testl	%eax, %eax
	jle	.L5
	subl	$1, %eax
	leaq	4(%r13), %rcx
	movl	8(%rsp), %r9d
	xorl	%edi, %edi
	leaq	(%rcx,%rax,4), %r8
	jmp	.L7
.L15:
	addq	$4, %rcx
.L7:
	movl	0(%r13), %esi
	movq	%rcx, %r13
	leal	-1(%rsi,%r9), %eax
	cltd
	idivl	%esi
	addl	%eax, %edi
	cmpq	%rcx, %r8
	jne	.L15
.L8:
	movl	12(%rsp), %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	addl	%edi, %edx
	movl	$1, %edi
	call	__printf_chk@PLT
	xorl	%eax, %eax
	jmp	.L1
.L5:
	xorl	%edi, %edi
	jmp	.L8
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```