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 a,b,c,x;
  int i,j;
  int t=0;
  scanf("%d",&a);
  scanf("%d",&b);
  scanf("%d",&c);
  scanf("%d",&x);
  for(i=0;i<=a;i++){
    for(j=0;j<=b;j++){
      if(0<=(x-500*i-100*j) && (x-500*i-100*j)<=50*c) t++;
    }
  }
  printf("%d",t);
  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:
.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
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	20(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ebx
	testl	%ebx, %ebx
	js	.L15
	imull	$50, 16(%rsp), %r11d
	movl	12(%rsp), %esi
	addl	$1, %ebx
	xorl	%r8d, %r8d
	movl	20(%rsp), %edx
	xorl	%r9d, %r9d
	pxor	%xmm4, %xmm4
	leal	1(%rsi), %r12d
	movd	%r11d, %xmm6
	movl	%r12d, %ecx
	movl	%r12d, %r10d
	pshufd	$0, %xmm6, %xmm7
	movdqa	.LC2(%rip), %xmm6
	shrl	$2, %ecx
	andl	$-4, %r10d
	.p2align 4,,10
	.p2align 3
.L3:
	testl	%esi, %esi
	js	.L13
	cmpl	$3, %esi
	jbe	.L16
	movd	%edx, %xmm5
	movdqa	.LC0(%rip), %xmm3
	xorl	%eax, %eax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm5, %xmm5
	.p2align 4,,10
	.p2align 3
.L5:
	movdqa	%xmm3, %xmm1
	addl	$1, %eax
	paddd	%xmm6, %xmm3
	movdqa	%xmm1, %xmm0
	pslld	$1, %xmm0
	paddd	%xmm1, %xmm0
	pslld	$3, %xmm0
	paddd	%xmm1, %xmm0
	movdqa	%xmm5, %xmm1
	pslld	$2, %xmm0
	psubd	%xmm0, %xmm1
	movdqa	%xmm4, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pcmpgtd	%xmm7, %xmm1
	pcmpeqd	%xmm4, %xmm0
	pcmpeqd	%xmm4, %xmm1
	pand	%xmm1, %xmm0
	psubd	%xmm0, %xmm2
	cmpl	%eax, %ecx
	jne	.L5
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	addl	%eax, %r8d
	movl	%r10d, %eax
	cmpl	%r10d, %r12d
	je	.L13
.L4:
	imull	$-100, %eax, %edi
	movl	%edx, %r13d
	addl	%edi, %r13d
	js	.L7
	cmpl	%r11d, %r13d
	setle	%r13b
	movzbl	%r13b, %r13d
	addl	%r13d, %r8d
.L7:
	leal	1(%rax), %r13d
	cmpl	%esi, %r13d
	jg	.L13
	leal	-100(%rdi,%rdx), %r13d
	testl	%r13d, %r13d
	js	.L8
	cmpl	%r13d, %r11d
	setge	%r13b
	movzbl	%r13b, %r13d
	addl	%r13d, %r8d
.L8:
	leal	2(%rax), %r13d
	cmpl	%esi, %r13d
	jg	.L13
	leal	-200(%rdi,%rdx), %r13d
	testl	%r13d, %r13d
	js	.L9
	cmpl	%r13d, %r11d
	setge	%r13b
	movzbl	%r13b, %r13d
	addl	%r13d, %r8d
.L9:
	addl	$3, %eax
	cmpl	%eax, %esi
	jl	.L13
	leal	-300(%rdi,%rdx), %eax
	testl	%eax, %eax
	js	.L13
	cmpl	%eax, %r11d
	setge	%al
	movzbl	%al, %eax
	addl	%eax, %r8d
.L13:
	addl	$1, %r9d
	subl	$500, %edx
	cmpl	%ebx, %r9d
	jne	.L3
.L2:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L16:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L4
.L15:
	xorl	%r8d, %r8d
	jmp	.L2
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.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:
.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
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	20(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ebx
	testl	%ebx, %ebx
	js	.L15
	imull	$50, 16(%rsp), %r11d
	movl	12(%rsp), %esi
	addl	$1, %ebx
	xorl	%r8d, %r8d
	movl	20(%rsp), %edx
	xorl	%r9d, %r9d
	pxor	%xmm4, %xmm4
	leal	1(%rsi), %r12d
	movd	%r11d, %xmm6
	movl	%r12d, %ecx
	movl	%r12d, %r10d
	pshufd	$0, %xmm6, %xmm7
	movdqa	.LC2(%rip), %xmm6
	shrl	$2, %ecx
	andl	$-4, %r10d
	.p2align 4,,10
	.p2align 3
.L3:
	testl	%esi, %esi
	js	.L13
	cmpl	$3, %esi
	jbe	.L16
	movd	%edx, %xmm5
	movdqa	.LC0(%rip), %xmm3
	xorl	%eax, %eax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm5, %xmm5
	.p2align 4,,10
	.p2align 3
.L5:
	movdqa	%xmm3, %xmm1
	addl	$1, %eax
	paddd	%xmm6, %xmm3
	movdqa	%xmm1, %xmm0
	pslld	$1, %xmm0
	paddd	%xmm1, %xmm0
	pslld	$3, %xmm0
	paddd	%xmm1, %xmm0
	movdqa	%xmm5, %xmm1
	pslld	$2, %xmm0
	psubd	%xmm0, %xmm1
	movdqa	%xmm4, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pcmpgtd	%xmm7, %xmm1
	pcmpeqd	%xmm4, %xmm0
	pcmpeqd	%xmm4, %xmm1
	pand	%xmm1, %xmm0
	psubd	%xmm0, %xmm2
	cmpl	%eax, %ecx
	jne	.L5
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	addl	%eax, %r8d
	movl	%r10d, %eax
	cmpl	%r10d, %r12d
	je	.L13
.L4:
	imull	$-100, %eax, %edi
	movl	%edx, %r13d
	addl	%edi, %r13d
	js	.L7
	cmpl	%r11d, %r13d
	setle	%r13b
	movzbl	%r13b, %r13d
	addl	%r13d, %r8d
.L7:
	leal	1(%rax), %r13d
	cmpl	%esi, %r13d
	jg	.L13
	leal	-100(%rdi,%rdx), %r13d
	testl	%r13d, %r13d
	js	.L8
	cmpl	%r13d, %r11d
	setge	%r13b
	movzbl	%r13b, %r13d
	addl	%r13d, %r8d
.L8:
	leal	2(%rax), %r13d
	cmpl	%esi, %r13d
	jg	.L13
	leal	-200(%rdi,%rdx), %r13d
	testl	%r13d, %r13d
	js	.L9
	cmpl	%r13d, %r11d
	setge	%r13b
	movzbl	%r13b, %r13d
	addl	%r13d, %r8d
.L9:
	addl	$3, %eax
	cmpl	%eax, %esi
	jl	.L13
	leal	-300(%rdi,%rdx), %eax
	testl	%eax, %eax
	js	.L13
	cmpl	%eax, %r11d
	setge	%al
	movzbl	%al, %eax
	addl	%eax, %r8d
.L13:
	addl	$1, %r9d
	subl	$500, %edx
	cmpl	%ebx, %r9d
	jne	.L3
.L2:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L16:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L4
.L15:
	xorl	%r8d, %r8d
	jmp	.L2
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.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:
.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
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	20(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ebx
	testl	%ebx, %ebx
	js	.L15
	imull	$50, 16(%rsp), %r11d
	movl	12(%rsp), %esi
	addl	$1, %ebx
	xorl	%r8d, %r8d
	movl	20(%rsp), %edx
	xorl	%r9d, %r9d
	pxor	%xmm4, %xmm4
	leal	1(%rsi), %r12d
	movd	%r11d, %xmm6
	movl	%r12d, %ecx
	movl	%r12d, %r10d
	pshufd	$0, %xmm6, %xmm7
	movdqa	.LC2(%rip), %xmm6
	shrl	$2, %ecx
	andl	$-4, %r10d
	.p2align 4,,10
	.p2align 3
.L3:
	testl	%esi, %esi
	js	.L13
	cmpl	$3, %esi
	jbe	.L16
	movd	%edx, %xmm5
	movdqa	.LC0(%rip), %xmm3
	xorl	%eax, %eax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm5, %xmm5
	.p2align 4,,10
	.p2align 3
.L5:
	movdqa	%xmm3, %xmm1
	addl	$1, %eax
	paddd	%xmm6, %xmm3
	movdqa	%xmm1, %xmm0
	pslld	$1, %xmm0
	paddd	%xmm1, %xmm0
	pslld	$3, %xmm0
	paddd	%xmm1, %xmm0
	movdqa	%xmm5, %xmm1
	pslld	$2, %xmm0
	psubd	%xmm0, %xmm1
	movdqa	%xmm4, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pcmpgtd	%xmm7, %xmm1
	pcmpeqd	%xmm4, %xmm0
	pcmpeqd	%xmm4, %xmm1
	pand	%xmm1, %xmm0
	psubd	%xmm0, %xmm2
	cmpl	%eax, %ecx
	jne	.L5
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	addl	%eax, %r8d
	movl	%r10d, %eax
	cmpl	%r10d, %r12d
	je	.L13
.L4:
	imull	$-100, %eax, %edi
	movl	%edx, %r13d
	addl	%edi, %r13d
	js	.L7
	cmpl	%r11d, %r13d
	setle	%r13b
	movzbl	%r13b, %r13d
	addl	%r13d, %r8d
.L7:
	leal	1(%rax), %r13d
	cmpl	%esi, %r13d
	jg	.L13
	leal	-100(%rdi,%rdx), %r13d
	testl	%r13d, %r13d
	js	.L8
	cmpl	%r13d, %r11d
	setge	%r13b
	movzbl	%r13b, %r13d
	addl	%r13d, %r8d
.L8:
	leal	2(%rax), %r13d
	cmpl	%esi, %r13d
	jg	.L13
	leal	-200(%rdi,%rdx), %r13d
	testl	%r13d, %r13d
	js	.L9
	cmpl	%r13d, %r11d
	setge	%r13b
	movzbl	%r13b, %r13d
	addl	%r13d, %r8d
.L9:
	addl	$3, %eax
	cmpl	%eax, %esi
	jl	.L13
	leal	-300(%rdi,%rdx), %eax
	testl	%eax, %eax
	js	.L13
	cmpl	%eax, %r11d
	setge	%al
	movzbl	%al, %eax
	addl	%eax, %r8d
.L13:
	addl	$1, %r9d
	subl	$500, %edx
	cmpl	%ebx, %r9d
	jne	.L3
.L2:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L16:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L4
.L15:
	xorl	%r8d, %r8d
	jmp	.L2
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.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 a,b,c,x;
  int i,j;
  int t=0;
  scanf("%d",&a);
  scanf("%d",&b);
  scanf("%d",&c);
  scanf("%d",&x);
  for(i=0;i<=a;i++){
    for(j=0;j<=b;j++){
      if(0<=(x-500*i-100*j) && (x-500*i-100*j)<=50*c) t++;
    }
  }
  printf("%d",t);
  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()
{
  int a,b,c,x;
  int i,j;
  int t=0;
  scanf("%d",&a);
  scanf("%d",&b);
  scanf("%d",&c);
  scanf("%d",&x);
  for(i=0;i<=a;i++){
    for(j=0;j<=b;j++){
      if(0<=(x-500*i-100*j) && (x-500*i-100*j)<=50*c) t++;
    }
  }
  printf("%d",t);
  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:

2
2
4
100
 30
40
77
6000
 5
0
0
150
 30
47
77
6000
 5
0
0
0
 2
2
5
100
 2
2
10
100
 30
47
77
10696
 5
0
1
0
 2
0
10
100

2 293 0 319 1 2 2 365 1 1
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 a,b,c,x;
  int i,j;
  int t=0;
  scanf("%d",&a);
  scanf("%d",&b);
  scanf("%d",&c);
  scanf("%d",&x);
  for(i=0;i<=a;i++){
    for(j=0;j<=b;j++){
      if(0<=(x-500*i-100*j) && (x-500*i-100*j)<=50*c) t++;
    }
  }
  printf("%d",t);
  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:
.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
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	20(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ebx
	testl	%ebx, %ebx
	js	.L15
	imull	$50, 16(%rsp), %r11d
	movl	12(%rsp), %esi
	addl	$1, %ebx
	xorl	%r8d, %r8d
	movl	20(%rsp), %edx
	xorl	%r9d, %r9d
	pxor	%xmm4, %xmm4
	leal	1(%rsi), %r12d
	movd	%r11d, %xmm6
	movl	%r12d, %ecx
	movl	%r12d, %r10d
	pshufd	$0, %xmm6, %xmm7
	movdqa	.LC2(%rip), %xmm6
	shrl	$2, %ecx
	andl	$-4, %r10d
	.p2align 4,,10
	.p2align 3
.L3:
	testl	%esi, %esi
	js	.L13
	cmpl	$3, %esi
	jbe	.L16
	movd	%edx, %xmm5
	movdqa	.LC0(%rip), %xmm3
	xorl	%eax, %eax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm5, %xmm5
	.p2align 4,,10
	.p2align 3
.L5:
	movdqa	%xmm3, %xmm1
	addl	$1, %eax
	paddd	%xmm6, %xmm3
	movdqa	%xmm1, %xmm0
	pslld	$1, %xmm0
	paddd	%xmm1, %xmm0
	pslld	$3, %xmm0
	paddd	%xmm1, %xmm0
	movdqa	%xmm5, %xmm1
	pslld	$2, %xmm0
	psubd	%xmm0, %xmm1
	movdqa	%xmm4, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pcmpgtd	%xmm7, %xmm1
	pcmpeqd	%xmm4, %xmm0
	pcmpeqd	%xmm4, %xmm1
	pand	%xmm1, %xmm0
	psubd	%xmm0, %xmm2
	cmpl	%eax, %ecx
	jne	.L5
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	addl	%eax, %r8d
	movl	%r10d, %eax
	cmpl	%r10d, %r12d
	je	.L13
.L4:
	imull	$-100, %eax, %edi
	movl	%edx, %r13d
	addl	%edi, %r13d
	js	.L7
	cmpl	%r11d, %r13d
	setle	%r13b
	movzbl	%r13b, %r13d
	addl	%r13d, %r8d
.L7:
	leal	1(%rax), %r13d
	cmpl	%esi, %r13d
	jg	.L13
	leal	-100(%rdi,%rdx), %r13d
	testl	%r13d, %r13d
	js	.L8
	cmpl	%r13d, %r11d
	setge	%r13b
	movzbl	%r13b, %r13d
	addl	%r13d, %r8d
.L8:
	leal	2(%rax), %r13d
	cmpl	%esi, %r13d
	jg	.L13
	leal	-200(%rdi,%rdx), %r13d
	testl	%r13d, %r13d
	js	.L9
	cmpl	%r13d, %r11d
	setge	%r13b
	movzbl	%r13b, %r13d
	addl	%r13d, %r8d
.L9:
	addl	$3, %eax
	cmpl	%eax, %esi
	jl	.L13
	leal	-300(%rdi,%rdx), %eax
	testl	%eax, %eax
	js	.L13
	cmpl	%eax, %r11d
	setge	%al
	movzbl	%al, %eax
	addl	%eax, %r8d
.L13:
	addl	$1, %r9d
	subl	$500, %edx
	cmpl	%ebx, %r9d
	jne	.L3
.L2:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L16:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L4
.L15:
	xorl	%r8d, %r8d
	jmp	.L2
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.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:
.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
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	20(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ebx
	testl	%ebx, %ebx
	js	.L15
	imull	$50, 16(%rsp), %r11d
	movl	12(%rsp), %esi
	addl	$1, %ebx
	xorl	%r8d, %r8d
	movl	20(%rsp), %edx
	xorl	%r9d, %r9d
	pxor	%xmm4, %xmm4
	leal	1(%rsi), %r12d
	movd	%r11d, %xmm6
	movl	%r12d, %ecx
	movl	%r12d, %r10d
	pshufd	$0, %xmm6, %xmm7
	movdqa	.LC2(%rip), %xmm6
	shrl	$2, %ecx
	andl	$-4, %r10d
	.p2align 4,,10
	.p2align 3
.L3:
	testl	%esi, %esi
	js	.L13
	cmpl	$3, %esi
	jbe	.L16
	movd	%edx, %xmm5
	movdqa	.LC0(%rip), %xmm3
	xorl	%eax, %eax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm5, %xmm5
	.p2align 4,,10
	.p2align 3
.L5:
	movdqa	%xmm3, %xmm1
	addl	$1, %eax
	paddd	%xmm6, %xmm3
	movdqa	%xmm1, %xmm0
	pslld	$1, %xmm0
	paddd	%xmm1, %xmm0
	pslld	$3, %xmm0
	paddd	%xmm1, %xmm0
	movdqa	%xmm5, %xmm1
	pslld	$2, %xmm0
	psubd	%xmm0, %xmm1
	movdqa	%xmm4, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pcmpgtd	%xmm7, %xmm1
	pcmpeqd	%xmm4, %xmm0
	pcmpeqd	%xmm4, %xmm1
	pand	%xmm1, %xmm0
	psubd	%xmm0, %xmm2
	cmpl	%eax, %ecx
	jne	.L5
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	addl	%eax, %r8d
	movl	%r10d, %eax
	cmpl	%r10d, %r12d
	je	.L13
.L4:
	imull	$-100, %eax, %edi
	movl	%edx, %r13d
	addl	%edi, %r13d
	js	.L7
	cmpl	%r11d, %r13d
	setle	%r13b
	movzbl	%r13b, %r13d
	addl	%r13d, %r8d
.L7:
	leal	1(%rax), %r13d
	cmpl	%esi, %r13d
	jg	.L13
	leal	-100(%rdi,%rdx), %r13d
	testl	%r13d, %r13d
	js	.L8
	cmpl	%r13d, %r11d
	setge	%r13b
	movzbl	%r13b, %r13d
	addl	%r13d, %r8d
.L8:
	leal	2(%rax), %r13d
	cmpl	%esi, %r13d
	jg	.L13
	leal	-200(%rdi,%rdx), %r13d
	testl	%r13d, %r13d
	js	.L9
	cmpl	%r13d, %r11d
	setge	%r13b
	movzbl	%r13b, %r13d
	addl	%r13d, %r8d
.L9:
	addl	$3, %eax
	cmpl	%eax, %esi
	jl	.L13
	leal	-300(%rdi,%rdx), %eax
	testl	%eax, %eax
	js	.L13
	cmpl	%eax, %r11d
	setge	%al
	movzbl	%al, %eax
	addl	%eax, %r8d
.L13:
	addl	$1, %r9d
	subl	$500, %edx
	cmpl	%ebx, %r9d
	jne	.L3
.L2:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L16:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L4
.L15:
	xorl	%r8d, %r8d
	jmp	.L2
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.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:
```