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=0;
  scanf("%d",&N);
  char S[N];
  scanf("%s",S);
  int pin=0,count=0,i=0,j=0;
  int digit[3];
  
  for(int pin=0;pin<1000;pin++){
    digit[2] = pin%10;
    digit[1] =(pin/10)%10;
    digit[0] = pin/100;
    
    
    for(i=0,j=0;i<N && j<3 ;i++){
    	if(S[i] == '0' + digit[j]){
          j++;
        }
      if(j==3){
      	count++;
      }
    }
  }
  
  printf("%d",count);


 return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	leaq	-44(%rbp), %rsi
	movq	%r12, %rdi
	subq	$32, %rsp
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -44(%rbp)
	call	__isoc99_scanf@PLT
	movslq	-44(%rbp), %rax
	movq	%rsp, %rcx
	addq	$15, %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L19:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L19
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L20
.L4:
	leaq	.LC1(%rip), %rdi
	movq	%rsp, %rsi
	xorl	%eax, %eax
	movq	%rsp, %rbx
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %edi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$3435973837, %r10d
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%r9d, %eax
	movl	%r9d, %esi
	movq	%rax, %rdx
	imulq	$1374389535, %rax, %rax
	imulq	%r10, %rdx
	shrq	$37, %rax
	shrq	$35, %rdx
	movd	%eax, %xmm0
	leal	(%rdx,%rdx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %esi
	movl	%edx, %ecx
	imulq	%r10, %rcx
	movl	%esi, -32(%rbp)
	shrq	$35, %rcx
	leal	(%rcx,%rcx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %edx
	movd	%edx, %xmm1
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, -40(%rbp)
	testl	%edi, %edi
	jle	.L5
	movl	$1, %edx
	xorl	%ecx, %ecx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%edx, %edi
	setg	%sil
	cmpl	$3, %ecx
	setne	%al
	addq	$1, %rdx
	testb	%al, %sil
	je	.L5
	movslq	%ecx, %rax
	movl	-40(%rbp,%rax,4), %eax
.L7:
	movsbl	-1(%rbx,%rdx), %esi
	addl	$48, %eax
	cmpl	%eax, %esi
	jne	.L6
	addl	$1, %ecx
	cmpl	$3, %ecx
	jne	.L6
	addl	$1, %r8d
.L5:
	addl	$1, %r9d
	cmpl	$1000, %r9d
	jne	.L8
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-24(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L21
	leaq	-16(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L20:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L21:
	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	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	leaq	-44(%rbp), %rsi
	movq	%r12, %rdi
	subq	$32, %rsp
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -44(%rbp)
	call	__isoc99_scanf@PLT
	movslq	-44(%rbp), %rax
	movq	%rsp, %rcx
	addq	$15, %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L19:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L19
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L20
.L4:
	leaq	.LC1(%rip), %rdi
	movq	%rsp, %rsi
	xorl	%eax, %eax
	movq	%rsp, %rbx
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %edi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$3435973837, %r10d
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%r9d, %eax
	movl	%r9d, %esi
	movq	%rax, %rdx
	imulq	$1374389535, %rax, %rax
	imulq	%r10, %rdx
	shrq	$37, %rax
	shrq	$35, %rdx
	movd	%eax, %xmm0
	leal	(%rdx,%rdx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %esi
	movl	%edx, %ecx
	imulq	%r10, %rcx
	movl	%esi, -32(%rbp)
	shrq	$35, %rcx
	leal	(%rcx,%rcx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %edx
	movd	%edx, %xmm1
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, -40(%rbp)
	testl	%edi, %edi
	jle	.L5
	movl	$1, %edx
	xorl	%ecx, %ecx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%edx, %edi
	setg	%sil
	cmpl	$3, %ecx
	setne	%al
	addq	$1, %rdx
	testb	%al, %sil
	je	.L5
	movslq	%ecx, %rax
	movl	-40(%rbp,%rax,4), %eax
.L7:
	movsbl	-1(%rbx,%rdx), %esi
	addl	$48, %eax
	cmpl	%eax, %esi
	jne	.L6
	addl	$1, %ecx
	cmpl	$3, %ecx
	jne	.L6
	addl	$1, %r8d
.L5:
	addl	$1, %r9d
	cmpl	$1000, %r9d
	jne	.L8
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-24(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L21
	leaq	-16(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L20:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L21:
	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	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	leaq	-44(%rbp), %rsi
	movq	%r12, %rdi
	subq	$32, %rsp
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -44(%rbp)
	call	__isoc99_scanf@PLT
	movslq	-44(%rbp), %rax
	movq	%rsp, %rcx
	addq	$15, %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L19:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L19
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L20
.L4:
	leaq	.LC1(%rip), %rdi
	movq	%rsp, %rsi
	xorl	%eax, %eax
	movq	%rsp, %rbx
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %edi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$3435973837, %r10d
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%r9d, %eax
	movl	%r9d, %esi
	movq	%rax, %rdx
	imulq	$1374389535, %rax, %rax
	imulq	%r10, %rdx
	shrq	$37, %rax
	shrq	$35, %rdx
	movd	%eax, %xmm0
	leal	(%rdx,%rdx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %esi
	movl	%edx, %ecx
	imulq	%r10, %rcx
	movl	%esi, -32(%rbp)
	shrq	$35, %rcx
	leal	(%rcx,%rcx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %edx
	movd	%edx, %xmm1
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, -40(%rbp)
	testl	%edi, %edi
	jle	.L5
	movl	$1, %edx
	xorl	%ecx, %ecx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%edx, %edi
	setg	%sil
	cmpl	$3, %ecx
	setne	%al
	addq	$1, %rdx
	testb	%al, %sil
	je	.L5
	movslq	%ecx, %rax
	movl	-40(%rbp,%rax,4), %eax
.L7:
	movsbl	-1(%rbx,%rdx), %esi
	addl	$48, %eax
	cmpl	%eax, %esi
	jne	.L6
	addl	$1, %ecx
	cmpl	$3, %ecx
	jne	.L6
	addl	$1, %r8d
.L5:
	addl	$1, %r9d
	cmpl	$1000, %r9d
	jne	.L8
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-24(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L21
	leaq	-16(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L20:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L21:
	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=0;
  scanf("%d",&N);
  char S[N];
  scanf("%s",S);
  int pin=0,count=0,i=0,j=0;
  int digit[3];
  
  for(int pin=0;pin<1000;pin++){
    digit[2] = pin%10;
    digit[1] =(pin/10)%10;
    digit[0] = pin/100;
    
    
    for(i=0,j=0;i<N && j<3 ;i++){
    	if(S[i] == '0' + digit[j]){
          j++;
        }
      if(j==3){
      	count++;
      }
    }
  }
  
  printf("%d",count);


 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=0;
  scanf("%d",&N);
  char S[N];
  scanf("%s",S);
  int pin=0,count=0,i=0,j=0;
  int digit[3];
  
  for(int pin=0;pin<1000;pin++){
    digit[2] = pin%10;
    digit[1] =(pin/10)%10;
    digit[0] = pin/100;
    
    
    for(i=0,j=0;i<N && j<3 ;i++){
    	if(S[i] == '0' + digit[j]){
          j++;
        }
      if(j==3){
      	count++;
      }
    }
  }
  
  printf("%d",count);


 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:

19
5546189040285140044
 19
4753841743850076999
 19
9039528710159876563
 19
3616863455241776042
 19
2785343766571511696
 19
2922045480066417189
 19
7230040539071200180
 19
1036710694297327965
 19
1455506616048969060
 19
3356521006821128568

273 311 412 322 239 281 292 364 172 210
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=0;
  scanf("%d",&N);
  char S[N];
  scanf("%s",S);
  int pin=0,count=0,i=0,j=0;
  int digit[3];
  
  for(int pin=0;pin<1000;pin++){
    digit[2] = pin%10;
    digit[1] =(pin/10)%10;
    digit[0] = pin/100;
    
    
    for(i=0,j=0;i<N && j<3 ;i++){
    	if(S[i] == '0' + digit[j]){
          j++;
        }
      if(j==3){
      	count++;
      }
    }
  }
  
  printf("%d",count);


 return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	leaq	-44(%rbp), %rsi
	movq	%r12, %rdi
	subq	$32, %rsp
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -44(%rbp)
	call	__isoc99_scanf@PLT
	movslq	-44(%rbp), %rax
	movq	%rsp, %rcx
	addq	$15, %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L19:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L19
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L20
.L4:
	leaq	.LC1(%rip), %rdi
	movq	%rsp, %rsi
	xorl	%eax, %eax
	movq	%rsp, %rbx
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %edi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$3435973837, %r10d
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%r9d, %eax
	movl	%r9d, %esi
	movq	%rax, %rdx
	imulq	$1374389535, %rax, %rax
	imulq	%r10, %rdx
	shrq	$37, %rax
	shrq	$35, %rdx
	movd	%eax, %xmm0
	leal	(%rdx,%rdx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %esi
	movl	%edx, %ecx
	imulq	%r10, %rcx
	movl	%esi, -32(%rbp)
	shrq	$35, %rcx
	leal	(%rcx,%rcx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %edx
	movd	%edx, %xmm1
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, -40(%rbp)
	testl	%edi, %edi
	jle	.L5
	movl	$1, %edx
	xorl	%ecx, %ecx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%edx, %edi
	setg	%sil
	cmpl	$3, %ecx
	setne	%al
	addq	$1, %rdx
	testb	%al, %sil
	je	.L5
	movslq	%ecx, %rax
	movl	-40(%rbp,%rax,4), %eax
.L7:
	movsbl	-1(%rbx,%rdx), %esi
	addl	$48, %eax
	cmpl	%eax, %esi
	jne	.L6
	addl	$1, %ecx
	cmpl	$3, %ecx
	jne	.L6
	addl	$1, %r8d
.L5:
	addl	$1, %r9d
	cmpl	$1000, %r9d
	jne	.L8
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-24(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L21
	leaq	-16(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L20:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L21:
	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	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	leaq	-44(%rbp), %rsi
	movq	%r12, %rdi
	subq	$32, %rsp
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -44(%rbp)
	call	__isoc99_scanf@PLT
	movslq	-44(%rbp), %rax
	movq	%rsp, %rcx
	addq	$15, %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L19:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L19
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L20
.L4:
	leaq	.LC1(%rip), %rdi
	movq	%rsp, %rsi
	xorl	%eax, %eax
	movq	%rsp, %rbx
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %edi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$3435973837, %r10d
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%r9d, %eax
	movl	%r9d, %esi
	movq	%rax, %rdx
	imulq	$1374389535, %rax, %rax
	imulq	%r10, %rdx
	shrq	$37, %rax
	shrq	$35, %rdx
	movd	%eax, %xmm0
	leal	(%rdx,%rdx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %esi
	movl	%edx, %ecx
	imulq	%r10, %rcx
	movl	%esi, -32(%rbp)
	shrq	$35, %rcx
	leal	(%rcx,%rcx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %edx
	movd	%edx, %xmm1
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, -40(%rbp)
	testl	%edi, %edi
	jle	.L5
	movl	$1, %edx
	xorl	%ecx, %ecx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%edx, %edi
	setg	%sil
	cmpl	$3, %ecx
	setne	%al
	addq	$1, %rdx
	testb	%al, %sil
	je	.L5
	movslq	%ecx, %rax
	movl	-40(%rbp,%rax,4), %eax
.L7:
	movsbl	-1(%rbx,%rdx), %esi
	addl	$48, %eax
	cmpl	%eax, %esi
	jne	.L6
	addl	$1, %ecx
	cmpl	$3, %ecx
	jne	.L6
	addl	$1, %r8d
.L5:
	addl	$1, %r9d
	cmpl	$1000, %r9d
	jne	.L8
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-24(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L21
	leaq	-16(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L20:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L21:
	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:
```