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>
#include<stdlib.h>

int main(void)
{
    int n,i=1;

    scanf("%d",&n);

    while(111*i<n) i++;

    printf("%d",111*i);

    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC1(%rip), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %esi
	cmpl	$111, %esi
	jle	.L8
	leal	-112(%rsi), %eax
	movq	%rax, %rdx
	imulq	$657787785, %rax, %rax
	movl	%edx, %ecx
	shrq	$32, %rax
	subl	%eax, %ecx
	shrl	%ecx
	addl	%eax, %ecx
	shrl	$6, %ecx
	addl	$1, %ecx
	cmpl	$332, %edx
	jbe	.L9
	movl	%ecx, %edx
	movdqa	.LC0(%rip), %xmm2
	xorl	%eax, %eax
	movdqa	.LC2(%rip), %xmm4
	movdqa	.LC3(%rip), %xmm3
	shrl	$2, %edx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	%xmm2, %xmm1
	addl	$1, %eax
	paddd	%xmm4, %xmm2
	paddd	%xmm3, %xmm1
	movdqa	%xmm1, %xmm0
	pslld	$3, %xmm0
	psubd	%xmm1, %xmm0
	pslld	$4, %xmm0
	psubd	%xmm1, %xmm0
	cmpl	%edx, %eax
	jne	.L4
	movl	%ecx, %edi
	pshufd	$255, %xmm0, %xmm0
	andl	$-4, %edi
	movd	%xmm0, %edx
	leal	1(%rdi), %eax
	cmpl	%edi, %ecx
	je	.L2
.L3:
	addl	$1, %eax
	imull	$111, %eax, %edx
	cmpl	%esi, %edx
	jge	.L2
	leal	111(%rdx), %eax
	cmpl	%eax, %esi
	jle	.L10
	addl	$222, %edx
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	movl	$111, %edx
	jmp	.L2
.L9:
	movl	$1, %eax
	jmp	.L3
.L10:
	movl	%eax, %edx
	jmp	.L2
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC3:
	.long	1
	.long	1
	.long	1
	.long	1
	.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
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC1(%rip), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %esi
	cmpl	$111, %esi
	jle	.L8
	leal	-112(%rsi), %eax
	movq	%rax, %rdx
	imulq	$657787785, %rax, %rax
	movl	%edx, %ecx
	shrq	$32, %rax
	subl	%eax, %ecx
	shrl	%ecx
	addl	%eax, %ecx
	shrl	$6, %ecx
	addl	$1, %ecx
	cmpl	$332, %edx
	jbe	.L9
	movl	%ecx, %edx
	movdqa	.LC0(%rip), %xmm2
	xorl	%eax, %eax
	movdqa	.LC2(%rip), %xmm4
	movdqa	.LC3(%rip), %xmm3
	shrl	$2, %edx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	%xmm2, %xmm1
	addl	$1, %eax
	paddd	%xmm4, %xmm2
	paddd	%xmm3, %xmm1
	movdqa	%xmm1, %xmm0
	pslld	$3, %xmm0
	psubd	%xmm1, %xmm0
	pslld	$4, %xmm0
	psubd	%xmm1, %xmm0
	cmpl	%edx, %eax
	jne	.L4
	movl	%ecx, %edi
	pshufd	$255, %xmm0, %xmm0
	andl	$-4, %edi
	movd	%xmm0, %edx
	leal	1(%rdi), %eax
	cmpl	%edi, %ecx
	je	.L2
.L3:
	addl	$1, %eax
	imull	$111, %eax, %edx
	cmpl	%esi, %edx
	jge	.L2
	leal	111(%rdx), %eax
	cmpl	%eax, %esi
	jle	.L10
	addl	$222, %edx
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	movl	$111, %edx
	jmp	.L2
.L9:
	movl	$1, %eax
	jmp	.L3
.L10:
	movl	%eax, %edx
	jmp	.L2
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC3:
	.long	1
	.long	1
	.long	1
	.long	1
	.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
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC1(%rip), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %esi
	cmpl	$111, %esi
	jle	.L8
	leal	-112(%rsi), %eax
	movq	%rax, %rdx
	imulq	$657787785, %rax, %rax
	movl	%edx, %ecx
	shrq	$32, %rax
	subl	%eax, %ecx
	shrl	%ecx
	addl	%eax, %ecx
	shrl	$6, %ecx
	addl	$1, %ecx
	cmpl	$332, %edx
	jbe	.L9
	movl	%ecx, %edx
	movdqa	.LC0(%rip), %xmm2
	xorl	%eax, %eax
	movdqa	.LC2(%rip), %xmm4
	movdqa	.LC3(%rip), %xmm3
	shrl	$2, %edx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	%xmm2, %xmm1
	addl	$1, %eax
	paddd	%xmm4, %xmm2
	paddd	%xmm3, %xmm1
	movdqa	%xmm1, %xmm0
	pslld	$3, %xmm0
	psubd	%xmm1, %xmm0
	pslld	$4, %xmm0
	psubd	%xmm1, %xmm0
	cmpl	%edx, %eax
	jne	.L4
	movl	%ecx, %edi
	pshufd	$255, %xmm0, %xmm0
	andl	$-4, %edi
	movd	%xmm0, %edx
	leal	1(%rdi), %eax
	cmpl	%edi, %ecx
	je	.L2
.L3:
	addl	$1, %eax
	imull	$111, %eax, %edx
	cmpl	%esi, %edx
	jge	.L2
	leal	111(%rdx), %eax
	cmpl	%eax, %esi
	jle	.L10
	addl	$222, %edx
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	movl	$111, %edx
	jmp	.L2
.L9:
	movl	$1, %eax
	jmp	.L3
.L10:
	movl	%eax, %edx
	jmp	.L2
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC3:
	.long	1
	.long	1
	.long	1
	.long	1
	.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>
#include<stdlib.h>

int main(void)
{
    int n,i=1;

    scanf("%d",&n);

    while(111*i<n) i++;

    printf("%d",111*i);

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

```c
#include<stdio.h>
#include<stdlib.h>

int main(void)
{
    int n,i=1;

    scanf("%d",&n);

    while(111*i<n) i++;

    printf("%d",111*i);

    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:

426
 101
 638
 268
 457
 000
 985
 846
 198
 706

444 111 666 333 555 111 999 888 222 777
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>
#include<stdlib.h>

int main(void)
{
    int n,i=1;

    scanf("%d",&n);

    while(111*i<n) i++;

    printf("%d",111*i);

    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC1(%rip), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %esi
	cmpl	$111, %esi
	jle	.L8
	leal	-112(%rsi), %eax
	movq	%rax, %rdx
	imulq	$657787785, %rax, %rax
	movl	%edx, %ecx
	shrq	$32, %rax
	subl	%eax, %ecx
	shrl	%ecx
	addl	%eax, %ecx
	shrl	$6, %ecx
	addl	$1, %ecx
	cmpl	$332, %edx
	jbe	.L9
	movl	%ecx, %edx
	movdqa	.LC0(%rip), %xmm2
	xorl	%eax, %eax
	movdqa	.LC2(%rip), %xmm4
	movdqa	.LC3(%rip), %xmm3
	shrl	$2, %edx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	%xmm2, %xmm1
	addl	$1, %eax
	paddd	%xmm4, %xmm2
	paddd	%xmm3, %xmm1
	movdqa	%xmm1, %xmm0
	pslld	$3, %xmm0
	psubd	%xmm1, %xmm0
	pslld	$4, %xmm0
	psubd	%xmm1, %xmm0
	cmpl	%edx, %eax
	jne	.L4
	movl	%ecx, %edi
	pshufd	$255, %xmm0, %xmm0
	andl	$-4, %edi
	movd	%xmm0, %edx
	leal	1(%rdi), %eax
	cmpl	%edi, %ecx
	je	.L2
.L3:
	addl	$1, %eax
	imull	$111, %eax, %edx
	cmpl	%esi, %edx
	jge	.L2
	leal	111(%rdx), %eax
	cmpl	%eax, %esi
	jle	.L10
	addl	$222, %edx
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	movl	$111, %edx
	jmp	.L2
.L9:
	movl	$1, %eax
	jmp	.L3
.L10:
	movl	%eax, %edx
	jmp	.L2
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC3:
	.long	1
	.long	1
	.long	1
	.long	1
	.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
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC1(%rip), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %esi
	cmpl	$111, %esi
	jle	.L8
	leal	-112(%rsi), %eax
	movq	%rax, %rdx
	imulq	$657787785, %rax, %rax
	movl	%edx, %ecx
	shrq	$32, %rax
	subl	%eax, %ecx
	shrl	%ecx
	addl	%eax, %ecx
	shrl	$6, %ecx
	addl	$1, %ecx
	cmpl	$332, %edx
	jbe	.L9
	movl	%ecx, %edx
	movdqa	.LC0(%rip), %xmm2
	xorl	%eax, %eax
	movdqa	.LC2(%rip), %xmm4
	movdqa	.LC3(%rip), %xmm3
	shrl	$2, %edx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	%xmm2, %xmm1
	addl	$1, %eax
	paddd	%xmm4, %xmm2
	paddd	%xmm3, %xmm1
	movdqa	%xmm1, %xmm0
	pslld	$3, %xmm0
	psubd	%xmm1, %xmm0
	pslld	$4, %xmm0
	psubd	%xmm1, %xmm0
	cmpl	%edx, %eax
	jne	.L4
	movl	%ecx, %edi
	pshufd	$255, %xmm0, %xmm0
	andl	$-4, %edi
	movd	%xmm0, %edx
	leal	1(%rdi), %eax
	cmpl	%edi, %ecx
	je	.L2
.L3:
	addl	$1, %eax
	imull	$111, %eax, %edx
	cmpl	%esi, %edx
	jge	.L2
	leal	111(%rdx), %eax
	cmpl	%eax, %esi
	jle	.L10
	addl	$222, %edx
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	movl	$111, %edx
	jmp	.L2
.L9:
	movl	$1, %eax
	jmp	.L3
.L10:
	movl	%eax, %edx
	jmp	.L2
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC3:
	.long	1
	.long	1
	.long	1
	.long	1
	.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:
```