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(){
  int N;
scanf("%d",&N);
  int a,b,c,d;
  int count = 0;
  d = N % 10;
  c = (N % 100 - d)/10;
  b = (N % 1000 - (10 * c + d))/100;
  a = (N - (100 * b + 10 * c + d))/1000;
  if(a == b && b == c)
    {
        count = 1;
    }
  else if(b == c && c == d)
    {
        count = 1;
    }
  if(count == 1){
    printf("Yes");
  }
  else{
    printf("No");
}
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	imulq	$1374389535, %rax, %rsi
	movl	%eax, %r8d
	movq	%rax, %rcx
	imulq	$1717986919, %rax, %rdx
	sarl	$31, %r8d
	sarq	$37, %rsi
	sarq	$34, %rdx
	subl	%r8d, %esi
	imull	$100, %esi, %esi
	subl	%r8d, %edx
	leal	(%rdx,%rdx,4), %edi
	movl	%eax, %edx
	addl	%edi, %edi
	imulq	$274877907, %rax, %rax
	subl	%edi, %edx
	subl	%esi, %edi
	movslq	%edi, %rsi
	sarl	$31, %edi
	imulq	$1717986919, %rsi, %rsi
	sarq	$38, %rax
	subl	%r8d, %eax
	imull	$1000, %eax, %eax
	sarq	$34, %rsi
	subl	%edi, %esi
	movl	%ecx, %edi
	leal	(%rsi,%rsi,4), %r9d
	subl	%eax, %edi
	addl	%r9d, %r9d
	leal	(%r9,%rdx), %eax
	subl	%eax, %edi
	movslq	%edi, %rax
	sarl	$31, %edi
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%edi, %eax
	imull	$100, %eax, %edi
	addl	%r9d, %edi
	addl	%edx, %edi
	subl	%edi, %ecx
	movslq	%ecx, %rdi
	sarl	$31, %ecx
	imulq	$274877907, %rdi, %rdi
	sarq	$38, %rdi
	subl	%ecx, %edi
	cmpl	%eax, %edi
	sete	%cl
	cmpl	%esi, %edx
	sete	%dl
	orb	%dl, %cl
	je	.L6
	cmpl	%eax, %esi
	jne	.L6
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L4
.L12:
	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	"No"
.LC2:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	imulq	$1374389535, %rax, %rsi
	movl	%eax, %r8d
	movq	%rax, %rcx
	imulq	$1717986919, %rax, %rdx
	sarl	$31, %r8d
	sarq	$37, %rsi
	sarq	$34, %rdx
	subl	%r8d, %esi
	imull	$100, %esi, %esi
	subl	%r8d, %edx
	leal	(%rdx,%rdx,4), %edi
	movl	%eax, %edx
	addl	%edi, %edi
	imulq	$274877907, %rax, %rax
	subl	%edi, %edx
	subl	%esi, %edi
	movslq	%edi, %rsi
	sarl	$31, %edi
	imulq	$1717986919, %rsi, %rsi
	sarq	$38, %rax
	subl	%r8d, %eax
	imull	$1000, %eax, %eax
	sarq	$34, %rsi
	subl	%edi, %esi
	movl	%ecx, %edi
	leal	(%rsi,%rsi,4), %r9d
	subl	%eax, %edi
	addl	%r9d, %r9d
	leal	(%r9,%rdx), %eax
	subl	%eax, %edi
	movslq	%edi, %rax
	sarl	$31, %edi
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%edi, %eax
	imull	$100, %eax, %edi
	addl	%r9d, %edi
	addl	%edx, %edi
	subl	%edi, %ecx
	movslq	%ecx, %rdi
	sarl	$31, %ecx
	imulq	$274877907, %rdi, %rdi
	sarq	$38, %rdi
	subl	%ecx, %edi
	cmpl	%eax, %edi
	sete	%cl
	cmpl	%esi, %edx
	sete	%dl
	orb	%dl, %cl
	je	.L6
	cmpl	%eax, %esi
	jne	.L6
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L4
.L12:
	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	"No"
.LC2:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	imulq	$1374389535, %rax, %rsi
	movl	%eax, %r8d
	movq	%rax, %rcx
	imulq	$1717986919, %rax, %rdx
	sarl	$31, %r8d
	sarq	$37, %rsi
	sarq	$34, %rdx
	subl	%r8d, %esi
	imull	$100, %esi, %esi
	subl	%r8d, %edx
	leal	(%rdx,%rdx,4), %edi
	movl	%eax, %edx
	addl	%edi, %edi
	imulq	$274877907, %rax, %rax
	subl	%edi, %edx
	subl	%esi, %edi
	movslq	%edi, %rsi
	sarl	$31, %edi
	imulq	$1717986919, %rsi, %rsi
	sarq	$38, %rax
	subl	%r8d, %eax
	imull	$1000, %eax, %eax
	sarq	$34, %rsi
	subl	%edi, %esi
	movl	%ecx, %edi
	leal	(%rsi,%rsi,4), %r9d
	subl	%eax, %edi
	addl	%r9d, %r9d
	leal	(%r9,%rdx), %eax
	subl	%eax, %edi
	movslq	%edi, %rax
	sarl	$31, %edi
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%edi, %eax
	imull	$100, %eax, %edi
	addl	%r9d, %edi
	addl	%edx, %edi
	subl	%edi, %ecx
	movslq	%ecx, %rdi
	sarl	$31, %ecx
	imulq	$274877907, %rdi, %rdi
	sarq	$38, %rdi
	subl	%ecx, %edi
	cmpl	%eax, %edi
	sete	%cl
	cmpl	%esi, %edx
	sete	%dl
	orb	%dl, %cl
	je	.L6
	cmpl	%eax, %esi
	jne	.L6
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L4
.L12:
	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(){
  int N;
scanf("%d",&N);
  int a,b,c,d;
  int count = 0;
  d = N % 10;
  c = (N % 100 - d)/10;
  b = (N % 1000 - (10 * c + d))/100;
  a = (N - (100 * b + 10 * c + d))/1000;
  if(a == b && b == c)
    {
        count = 1;
    }
  else if(b == c && c == d)
    {
        count = 1;
    }
  if(count == 1){
    printf("Yes");
  }
  else{
    printf("No");
}
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main(){
  int N;
scanf("%d",&N);
  int a,b,c,d;
  int count = 0;
  d = N % 10;
  c = (N % 100 - d)/10;
  b = (N % 1000 - (10 * c + d))/100;
  a = (N - (100 * b + 10 * c + d))/1000;
  if(a == b && b == c)
    {
        count = 1;
    }
  else if(b == c && c == d)
    {
        count = 1;
    }
  if(count == 1){
    printf("Yes");
  }
  else{
    printf("No");
}
}
```

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:

8920
 4000
 2051
 1247
 15093
 3362
 1887
 2106
 2603
 3550

No Yes No No No No No No No No
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(){
  int N;
scanf("%d",&N);
  int a,b,c,d;
  int count = 0;
  d = N % 10;
  c = (N % 100 - d)/10;
  b = (N % 1000 - (10 * c + d))/100;
  a = (N - (100 * b + 10 * c + d))/1000;
  if(a == b && b == c)
    {
        count = 1;
    }
  else if(b == c && c == d)
    {
        count = 1;
    }
  if(count == 1){
    printf("Yes");
  }
  else{
    printf("No");
}
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	imulq	$1374389535, %rax, %rsi
	movl	%eax, %r8d
	movq	%rax, %rcx
	imulq	$1717986919, %rax, %rdx
	sarl	$31, %r8d
	sarq	$37, %rsi
	sarq	$34, %rdx
	subl	%r8d, %esi
	imull	$100, %esi, %esi
	subl	%r8d, %edx
	leal	(%rdx,%rdx,4), %edi
	movl	%eax, %edx
	addl	%edi, %edi
	imulq	$274877907, %rax, %rax
	subl	%edi, %edx
	subl	%esi, %edi
	movslq	%edi, %rsi
	sarl	$31, %edi
	imulq	$1717986919, %rsi, %rsi
	sarq	$38, %rax
	subl	%r8d, %eax
	imull	$1000, %eax, %eax
	sarq	$34, %rsi
	subl	%edi, %esi
	movl	%ecx, %edi
	leal	(%rsi,%rsi,4), %r9d
	subl	%eax, %edi
	addl	%r9d, %r9d
	leal	(%r9,%rdx), %eax
	subl	%eax, %edi
	movslq	%edi, %rax
	sarl	$31, %edi
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%edi, %eax
	imull	$100, %eax, %edi
	addl	%r9d, %edi
	addl	%edx, %edi
	subl	%edi, %ecx
	movslq	%ecx, %rdi
	sarl	$31, %ecx
	imulq	$274877907, %rdi, %rdi
	sarq	$38, %rdi
	subl	%ecx, %edi
	cmpl	%eax, %edi
	sete	%cl
	cmpl	%esi, %edx
	sete	%dl
	orb	%dl, %cl
	je	.L6
	cmpl	%eax, %esi
	jne	.L6
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L4
.L12:
	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	"No"
.LC2:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	imulq	$1374389535, %rax, %rsi
	movl	%eax, %r8d
	movq	%rax, %rcx
	imulq	$1717986919, %rax, %rdx
	sarl	$31, %r8d
	sarq	$37, %rsi
	sarq	$34, %rdx
	subl	%r8d, %esi
	imull	$100, %esi, %esi
	subl	%r8d, %edx
	leal	(%rdx,%rdx,4), %edi
	movl	%eax, %edx
	addl	%edi, %edi
	imulq	$274877907, %rax, %rax
	subl	%edi, %edx
	subl	%esi, %edi
	movslq	%edi, %rsi
	sarl	$31, %edi
	imulq	$1717986919, %rsi, %rsi
	sarq	$38, %rax
	subl	%r8d, %eax
	imull	$1000, %eax, %eax
	sarq	$34, %rsi
	subl	%edi, %esi
	movl	%ecx, %edi
	leal	(%rsi,%rsi,4), %r9d
	subl	%eax, %edi
	addl	%r9d, %r9d
	leal	(%r9,%rdx), %eax
	subl	%eax, %edi
	movslq	%edi, %rax
	sarl	$31, %edi
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%edi, %eax
	imull	$100, %eax, %edi
	addl	%r9d, %edi
	addl	%edx, %edi
	subl	%edi, %ecx
	movslq	%ecx, %rdi
	sarl	$31, %ecx
	imulq	$274877907, %rdi, %rdi
	sarq	$38, %rdi
	subl	%ecx, %edi
	cmpl	%eax, %edi
	sete	%cl
	cmpl	%esi, %edx
	sete	%dl
	orb	%dl, %cl
	je	.L6
	cmpl	%eax, %esi
	jne	.L6
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L4
.L12:
	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:
```