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,x,i,j,k,a;
    while(1){
        scanf("%d %d",&n,&x);
        if(n==0&x==0) break;
        a=0;
        for(i=1;i<=n;i++){
            for(j=i+1;j<=n;j++){
                for(k=j+1;k<=n;k++){
                     if(i+j+k==x) a++;
                }
            }
        }
        printf("%d\n",a);
    }
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.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	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, (%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
.L20:
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %ecx
	movl	20(%rsp), %esi
	movl	%ecx, %eax
	orl	%esi, %eax
	je	.L2
	testl	%ecx, %ecx
	movdqa	.LC1(%rip), %xmm4
	jle	.L22
	cmpl	$1, %ecx
	je	.L22
	movd	%esi, %xmm7
	leal	2(%rcx), %r12d
	movl	$1, %ebp
	xorl	%r8d, %r8d
	movl	$3, %ebx
	leal	1(%rcx), %r9d
	movl	$1, %r11d
	pshufd	$0, %xmm7, %xmm5
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%ebx, %eax
	leal	-1(%rbp), %r10d
	cmpl	%ebx, %ecx
	jl	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	movl	%r9d, %r14d
	movl	%ecx, %edx
	leal	(%r10,%rax), %r13d
	subl	%eax, %r14d
	cmpl	%eax, %ecx
	cmovl	%r11d, %r14d
	subl	%eax, %edx
	cmpl	$5, %edx
	jbe	.L23
	cmpl	%eax, %ecx
	jl	.L23
	leal	2(%rax), %edx
	leal	1(%rax), %edi
	movd	%eax, %xmm1
	movl	%r14d, %r15d
	movd	%edx, %xmm0
	leal	3(%rax), %edx
	movd	%edi, %xmm7
	shrl	$2, %r15d
	movd	%edx, %xmm6
	punpckldq	%xmm7, %xmm1
	pxor	%xmm2, %xmm2
	xorl	%edx, %edx
	punpckldq	%xmm6, %xmm0
	movd	%r13d, %xmm6
	punpcklqdq	%xmm0, %xmm1
	pshufd	$0, %xmm6, %xmm3
	.p2align 4,,10
	.p2align 3
.L8:
	movdqa	%xmm1, %xmm0
	addl	$1, %edx
	paddd	%xmm4, %xmm1
	paddd	%xmm3, %xmm0
	pcmpeqd	%xmm5, %xmm0
	psubd	%xmm0, %xmm2
	cmpl	%edx, %r15d
	jne	.L8
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %edx
	addl	%edx, %r8d
	movl	%r14d, %edx
	andl	$-4, %edx
	addl	%edx, %eax
	cmpl	%edx, %r14d
	je	.L9
.L7:
	leal	0(%r13,%rax), %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	1(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	2(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	3(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	4(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	addl	$5, %eax
	movzbl	%dl, %edx
	addl	%edx, %r8d
	cmpl	%eax, %ecx
	jl	.L9
	addl	%r13d, %eax
	cmpl	%eax, %esi
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %r8d
.L9:
	movl	%edi, %eax
	cmpl	%r9d, %edi
	jne	.L17
.L6:
	addl	$1, %ebx
	addl	$1, %ebp
	cmpl	%r12d, %ebx
	jne	.L18
.L3:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L20
.L23:
	leal	1(%rax), %edi
	jmp	.L7
.L22:
	xorl	%r8d, %r8d
	jmp	.L3
.L2:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L30:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.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
.LC0:
	.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	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, (%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
.L20:
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %ecx
	movl	20(%rsp), %esi
	movl	%ecx, %eax
	orl	%esi, %eax
	je	.L2
	testl	%ecx, %ecx
	movdqa	.LC1(%rip), %xmm4
	jle	.L22
	cmpl	$1, %ecx
	je	.L22
	movd	%esi, %xmm7
	leal	2(%rcx), %r12d
	movl	$1, %ebp
	xorl	%r8d, %r8d
	movl	$3, %ebx
	leal	1(%rcx), %r9d
	movl	$1, %r11d
	pshufd	$0, %xmm7, %xmm5
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%ebx, %eax
	leal	-1(%rbp), %r10d
	cmpl	%ebx, %ecx
	jl	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	movl	%r9d, %r14d
	movl	%ecx, %edx
	leal	(%r10,%rax), %r13d
	subl	%eax, %r14d
	cmpl	%eax, %ecx
	cmovl	%r11d, %r14d
	subl	%eax, %edx
	cmpl	$5, %edx
	jbe	.L23
	cmpl	%eax, %ecx
	jl	.L23
	leal	2(%rax), %edx
	leal	1(%rax), %edi
	movd	%eax, %xmm1
	movl	%r14d, %r15d
	movd	%edx, %xmm0
	leal	3(%rax), %edx
	movd	%edi, %xmm7
	shrl	$2, %r15d
	movd	%edx, %xmm6
	punpckldq	%xmm7, %xmm1
	pxor	%xmm2, %xmm2
	xorl	%edx, %edx
	punpckldq	%xmm6, %xmm0
	movd	%r13d, %xmm6
	punpcklqdq	%xmm0, %xmm1
	pshufd	$0, %xmm6, %xmm3
	.p2align 4,,10
	.p2align 3
.L8:
	movdqa	%xmm1, %xmm0
	addl	$1, %edx
	paddd	%xmm4, %xmm1
	paddd	%xmm3, %xmm0
	pcmpeqd	%xmm5, %xmm0
	psubd	%xmm0, %xmm2
	cmpl	%edx, %r15d
	jne	.L8
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %edx
	addl	%edx, %r8d
	movl	%r14d, %edx
	andl	$-4, %edx
	addl	%edx, %eax
	cmpl	%edx, %r14d
	je	.L9
.L7:
	leal	0(%r13,%rax), %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	1(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	2(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	3(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	4(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	addl	$5, %eax
	movzbl	%dl, %edx
	addl	%edx, %r8d
	cmpl	%eax, %ecx
	jl	.L9
	addl	%r13d, %eax
	cmpl	%eax, %esi
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %r8d
.L9:
	movl	%edi, %eax
	cmpl	%r9d, %edi
	jne	.L17
.L6:
	addl	$1, %ebx
	addl	$1, %ebp
	cmpl	%r12d, %ebx
	jne	.L18
.L3:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L20
.L23:
	leal	1(%rax), %edi
	jmp	.L7
.L22:
	xorl	%r8d, %r8d
	jmp	.L3
.L2:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L30:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.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
.LC0:
	.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	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, (%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
.L20:
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %ecx
	movl	20(%rsp), %esi
	movl	%ecx, %eax
	orl	%esi, %eax
	je	.L2
	testl	%ecx, %ecx
	movdqa	.LC1(%rip), %xmm4
	jle	.L22
	cmpl	$1, %ecx
	je	.L22
	movd	%esi, %xmm7
	leal	2(%rcx), %r12d
	movl	$1, %ebp
	xorl	%r8d, %r8d
	movl	$3, %ebx
	leal	1(%rcx), %r9d
	movl	$1, %r11d
	pshufd	$0, %xmm7, %xmm5
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%ebx, %eax
	leal	-1(%rbp), %r10d
	cmpl	%ebx, %ecx
	jl	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	movl	%r9d, %r14d
	movl	%ecx, %edx
	leal	(%r10,%rax), %r13d
	subl	%eax, %r14d
	cmpl	%eax, %ecx
	cmovl	%r11d, %r14d
	subl	%eax, %edx
	cmpl	$5, %edx
	jbe	.L23
	cmpl	%eax, %ecx
	jl	.L23
	leal	2(%rax), %edx
	leal	1(%rax), %edi
	movd	%eax, %xmm1
	movl	%r14d, %r15d
	movd	%edx, %xmm0
	leal	3(%rax), %edx
	movd	%edi, %xmm7
	shrl	$2, %r15d
	movd	%edx, %xmm6
	punpckldq	%xmm7, %xmm1
	pxor	%xmm2, %xmm2
	xorl	%edx, %edx
	punpckldq	%xmm6, %xmm0
	movd	%r13d, %xmm6
	punpcklqdq	%xmm0, %xmm1
	pshufd	$0, %xmm6, %xmm3
	.p2align 4,,10
	.p2align 3
.L8:
	movdqa	%xmm1, %xmm0
	addl	$1, %edx
	paddd	%xmm4, %xmm1
	paddd	%xmm3, %xmm0
	pcmpeqd	%xmm5, %xmm0
	psubd	%xmm0, %xmm2
	cmpl	%edx, %r15d
	jne	.L8
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %edx
	addl	%edx, %r8d
	movl	%r14d, %edx
	andl	$-4, %edx
	addl	%edx, %eax
	cmpl	%edx, %r14d
	je	.L9
.L7:
	leal	0(%r13,%rax), %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	1(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	2(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	3(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	4(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	addl	$5, %eax
	movzbl	%dl, %edx
	addl	%edx, %r8d
	cmpl	%eax, %ecx
	jl	.L9
	addl	%r13d, %eax
	cmpl	%eax, %esi
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %r8d
.L9:
	movl	%edi, %eax
	cmpl	%r9d, %edi
	jne	.L17
.L6:
	addl	$1, %ebx
	addl	$1, %ebp
	cmpl	%r12d, %ebx
	jne	.L18
.L3:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L20
.L23:
	leal	1(%rax), %edi
	jmp	.L7
.L22:
	xorl	%r8d, %r8d
	jmp	.L3
.L2:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L30:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.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(void){
    int n,x,i,j,k,a;
    while(1){
        scanf("%d %d",&n,&x);
        if(n==0&x==0) break;
        a=0;
        for(i=1;i<=n;i++){
            for(j=i+1;j<=n;j++){
                for(k=j+1;k<=n;k++){
                     if(i+j+k==x) a++;
                }
            }
        }
        printf("%d\n",a);
    }
    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,x,i,j,k,a;
    while(1){
        scanf("%d %d",&n,&x);
        if(n==0&x==0) break;
        a=0;
        for(i=1;i<=n;i++){
            for(j=i+1;j<=n;j++){
                for(k=j+1;k<=n;k++){
                     if(i+j+k==x) a++;
                }
            }
        }
        printf("%d\n",a);
    }
    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 7
0 0
 2 7
0 0
 5 10
0 0
 7 9
0 0
 8 12
0 0
 13 14
0 0
 10 10
0 0
 12 13
0 0
 16 12
0 0
 16 22
0 0

1
 0
 2
 3
 6
 10
 4
 8
 7
 26

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,x,i,j,k,a;
    while(1){
        scanf("%d %d",&n,&x);
        if(n==0&x==0) break;
        a=0;
        for(i=1;i<=n;i++){
            for(j=i+1;j<=n;j++){
                for(k=j+1;k<=n;k++){
                     if(i+j+k==x) a++;
                }
            }
        }
        printf("%d\n",a);
    }
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.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	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, (%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
.L20:
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %ecx
	movl	20(%rsp), %esi
	movl	%ecx, %eax
	orl	%esi, %eax
	je	.L2
	testl	%ecx, %ecx
	movdqa	.LC1(%rip), %xmm4
	jle	.L22
	cmpl	$1, %ecx
	je	.L22
	movd	%esi, %xmm7
	leal	2(%rcx), %r12d
	movl	$1, %ebp
	xorl	%r8d, %r8d
	movl	$3, %ebx
	leal	1(%rcx), %r9d
	movl	$1, %r11d
	pshufd	$0, %xmm7, %xmm5
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%ebx, %eax
	leal	-1(%rbp), %r10d
	cmpl	%ebx, %ecx
	jl	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	movl	%r9d, %r14d
	movl	%ecx, %edx
	leal	(%r10,%rax), %r13d
	subl	%eax, %r14d
	cmpl	%eax, %ecx
	cmovl	%r11d, %r14d
	subl	%eax, %edx
	cmpl	$5, %edx
	jbe	.L23
	cmpl	%eax, %ecx
	jl	.L23
	leal	2(%rax), %edx
	leal	1(%rax), %edi
	movd	%eax, %xmm1
	movl	%r14d, %r15d
	movd	%edx, %xmm0
	leal	3(%rax), %edx
	movd	%edi, %xmm7
	shrl	$2, %r15d
	movd	%edx, %xmm6
	punpckldq	%xmm7, %xmm1
	pxor	%xmm2, %xmm2
	xorl	%edx, %edx
	punpckldq	%xmm6, %xmm0
	movd	%r13d, %xmm6
	punpcklqdq	%xmm0, %xmm1
	pshufd	$0, %xmm6, %xmm3
	.p2align 4,,10
	.p2align 3
.L8:
	movdqa	%xmm1, %xmm0
	addl	$1, %edx
	paddd	%xmm4, %xmm1
	paddd	%xmm3, %xmm0
	pcmpeqd	%xmm5, %xmm0
	psubd	%xmm0, %xmm2
	cmpl	%edx, %r15d
	jne	.L8
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %edx
	addl	%edx, %r8d
	movl	%r14d, %edx
	andl	$-4, %edx
	addl	%edx, %eax
	cmpl	%edx, %r14d
	je	.L9
.L7:
	leal	0(%r13,%rax), %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	1(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	2(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	3(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	4(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	addl	$5, %eax
	movzbl	%dl, %edx
	addl	%edx, %r8d
	cmpl	%eax, %ecx
	jl	.L9
	addl	%r13d, %eax
	cmpl	%eax, %esi
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %r8d
.L9:
	movl	%edi, %eax
	cmpl	%r9d, %edi
	jne	.L17
.L6:
	addl	$1, %ebx
	addl	$1, %ebp
	cmpl	%r12d, %ebx
	jne	.L18
.L3:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L20
.L23:
	leal	1(%rax), %edi
	jmp	.L7
.L22:
	xorl	%r8d, %r8d
	jmp	.L3
.L2:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L30:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.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
.LC0:
	.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	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, (%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
.L20:
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %ecx
	movl	20(%rsp), %esi
	movl	%ecx, %eax
	orl	%esi, %eax
	je	.L2
	testl	%ecx, %ecx
	movdqa	.LC1(%rip), %xmm4
	jle	.L22
	cmpl	$1, %ecx
	je	.L22
	movd	%esi, %xmm7
	leal	2(%rcx), %r12d
	movl	$1, %ebp
	xorl	%r8d, %r8d
	movl	$3, %ebx
	leal	1(%rcx), %r9d
	movl	$1, %r11d
	pshufd	$0, %xmm7, %xmm5
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%ebx, %eax
	leal	-1(%rbp), %r10d
	cmpl	%ebx, %ecx
	jl	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	movl	%r9d, %r14d
	movl	%ecx, %edx
	leal	(%r10,%rax), %r13d
	subl	%eax, %r14d
	cmpl	%eax, %ecx
	cmovl	%r11d, %r14d
	subl	%eax, %edx
	cmpl	$5, %edx
	jbe	.L23
	cmpl	%eax, %ecx
	jl	.L23
	leal	2(%rax), %edx
	leal	1(%rax), %edi
	movd	%eax, %xmm1
	movl	%r14d, %r15d
	movd	%edx, %xmm0
	leal	3(%rax), %edx
	movd	%edi, %xmm7
	shrl	$2, %r15d
	movd	%edx, %xmm6
	punpckldq	%xmm7, %xmm1
	pxor	%xmm2, %xmm2
	xorl	%edx, %edx
	punpckldq	%xmm6, %xmm0
	movd	%r13d, %xmm6
	punpcklqdq	%xmm0, %xmm1
	pshufd	$0, %xmm6, %xmm3
	.p2align 4,,10
	.p2align 3
.L8:
	movdqa	%xmm1, %xmm0
	addl	$1, %edx
	paddd	%xmm4, %xmm1
	paddd	%xmm3, %xmm0
	pcmpeqd	%xmm5, %xmm0
	psubd	%xmm0, %xmm2
	cmpl	%edx, %r15d
	jne	.L8
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %edx
	addl	%edx, %r8d
	movl	%r14d, %edx
	andl	$-4, %edx
	addl	%edx, %eax
	cmpl	%edx, %r14d
	je	.L9
.L7:
	leal	0(%r13,%rax), %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	1(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	2(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	3(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r8d
	leal	4(%rax), %edx
	cmpl	%edx, %ecx
	jl	.L9
	addl	%r13d, %edx
	cmpl	%edx, %esi
	sete	%dl
	addl	$5, %eax
	movzbl	%dl, %edx
	addl	%edx, %r8d
	cmpl	%eax, %ecx
	jl	.L9
	addl	%r13d, %eax
	cmpl	%eax, %esi
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %r8d
.L9:
	movl	%edi, %eax
	cmpl	%r9d, %edi
	jne	.L17
.L6:
	addl	$1, %ebx
	addl	$1, %ebp
	cmpl	%r12d, %ebx
	jne	.L18
.L3:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L20
.L23:
	leal	1(%rax), %edi
	jmp	.L7
.L22:
	xorl	%r8d, %r8d
	jmp	.L3
.L2:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L30:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.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:
```