Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#pragma warning(disable:4996)
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#define MAX_STRING 2200000
#define MAXCARDS 200000

double alCards[MAXCARDS];
char sInput[MAX_STRING];

int main() {

	char* psInput;
	long long l=0;
	double  lLoopEnd=0.0;
	double  lTemp=0.0;
	double  lAllSum=0.0;
	double  lLeftSum=0.0;
	double  lRightSum=0.0;
	double  lTempMin=0.0;
	double  lMin=0.0;
	double  lCardsNumber =0.0;

//	printf("hoge\n");

	// read line 1
	gets(sInput);
	lCardsNumber = atol(sInput);
	// read line 2
	gets(sInput);
	psInput = strtok(sInput," ");
	for (l=0;l<lCardsNumber;l++){
		lTemp=atol(psInput);
		alCards[l] = lTemp;
		lAllSum=lAllSum+lTemp;
		psInput = strtok(NULL," ");
	}

	// calc
	lRightSum=lAllSum;
	lMin=99999000000000;
	lLoopEnd = lCardsNumber-1;
	for (l=0;l<lLoopEnd;l++){
		lLeftSum=lLeftSum + alCards[l];
		lRightSum=lRightSum - alCards[l];
		lTempMin =lLeftSum-lRightSum;
		if (lTempMin<0){
			lTempMin = lTempMin * -1;
		}
//		printf("left:%.0f right:%.0f abs:%.0f sum:%.0f\n",lLeftSum,lRightSum,lTempMin,lAllSum);
		if (lTempMin<lMin){
			lMin=lTempMin;
		}
	}

	printf("%.0f",lMin);
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	" "
.LC5:
	.string	"%.0f"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	sInput(%rip), %r12
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	leaq	.LC2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	call	gets@PLT
	xorl	%esi, %esi
	movl	$10, %edx
	movq	%r12, %rdi
	call	strtol@PLT
	pxor	%xmm5, %xmm5
	movq	%r12, %rdi
	cvtsi2sdq	%rax, %xmm5
	xorl	%eax, %eax
	movsd	%xmm5, 8(%rsp)
	call	gets@PLT
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	strtok@PLT
	movsd	8(%rsp), %xmm5
	pxor	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	comisd	%xmm3, %xmm5
	jbe	.L2
	movq	%rax, %rdi
	xorl	%ebx, %ebx
	leaq	alCards(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%esi, %esi
	movl	$10, %edx
	movsd	%xmm0, (%rsp)
	call	strtol@PLT
	pxor	%xmm1, %xmm1
	movsd	(%rsp), %xmm0
	xorl	%edi, %edi
	cvtsi2sdq	%rax, %xmm1
	movq	%rbp, %rsi
	addsd	%xmm1, %xmm0
	movsd	%xmm1, (%r12,%rbx,8)
	addq	$1, %rbx
	movsd	%xmm0, (%rsp)
	call	strtok@PLT
	pxor	%xmm1, %xmm1
	movsd	8(%rsp), %xmm6
	movsd	(%rsp), %xmm0
	cvtsi2sdq	%rbx, %xmm1
	movq	%rax, %rdi
	comisd	%xmm1, %xmm6
	ja	.L4
.L2:
	movsd	8(%rsp), %xmm3
	subsd	.LC3(%rip), %xmm3
	pxor	%xmm5, %xmm5
	movsd	.LC1(%rip), %xmm4
	comisd	%xmm5, %xmm3
	jbe	.L5
	movq	.LC4(%rip), %xmm5
	pxor	%xmm2, %xmm2
	xorl	%eax, %eax
	leaq	alCards(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L10:
	movsd	(%r12,%rax,8), %xmm1
	pxor	%xmm7, %xmm7
	addsd	%xmm1, %xmm2
	subsd	%xmm1, %xmm0
	movapd	%xmm2, %xmm1
	subsd	%xmm0, %xmm1
	comisd	%xmm1, %xmm7
	jbe	.L7
	xorpd	%xmm5, %xmm1
.L7:
	minsd	%xmm4, %xmm1
	addq	$1, %rax
	movapd	%xmm1, %xmm4
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rax, %xmm1
	comisd	%xmm1, %xmm3
	ja	.L10
.L5:
	movapd	%xmm4, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	sInput
	.bss
	.align 32
	.type	sInput, @object
	.size	sInput, 2200000
sInput:
	.zero	2200000
	.globl	alCards
	.align 32
	.type	alCards, @object
	.size	alCards, 1600000
alCards:
	.zero	1600000
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	937263104
	.long	1121369269
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC4:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.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
.LC2:
	.string	" "
.LC5:
	.string	"%.0f"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	sInput(%rip), %r12
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	leaq	.LC2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	call	gets@PLT
	xorl	%esi, %esi
	movl	$10, %edx
	movq	%r12, %rdi
	call	strtol@PLT
	pxor	%xmm5, %xmm5
	movq	%r12, %rdi
	cvtsi2sdq	%rax, %xmm5
	xorl	%eax, %eax
	movsd	%xmm5, 8(%rsp)
	call	gets@PLT
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	strtok@PLT
	movsd	8(%rsp), %xmm5
	pxor	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	comisd	%xmm3, %xmm5
	jbe	.L2
	movq	%rax, %rdi
	xorl	%ebx, %ebx
	leaq	alCards(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%esi, %esi
	movl	$10, %edx
	movsd	%xmm0, (%rsp)
	call	strtol@PLT
	pxor	%xmm1, %xmm1
	movsd	(%rsp), %xmm0
	xorl	%edi, %edi
	cvtsi2sdq	%rax, %xmm1
	movq	%rbp, %rsi
	addsd	%xmm1, %xmm0
	movsd	%xmm1, (%r12,%rbx,8)
	addq	$1, %rbx
	movsd	%xmm0, (%rsp)
	call	strtok@PLT
	pxor	%xmm1, %xmm1
	movsd	8(%rsp), %xmm6
	movsd	(%rsp), %xmm0
	cvtsi2sdq	%rbx, %xmm1
	movq	%rax, %rdi
	comisd	%xmm1, %xmm6
	ja	.L4
.L2:
	movsd	8(%rsp), %xmm3
	subsd	.LC3(%rip), %xmm3
	pxor	%xmm5, %xmm5
	movsd	.LC1(%rip), %xmm4
	comisd	%xmm5, %xmm3
	jbe	.L5
	movq	.LC4(%rip), %xmm5
	pxor	%xmm2, %xmm2
	xorl	%eax, %eax
	leaq	alCards(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L10:
	movsd	(%r12,%rax,8), %xmm1
	pxor	%xmm7, %xmm7
	addsd	%xmm1, %xmm2
	subsd	%xmm1, %xmm0
	movapd	%xmm2, %xmm1
	subsd	%xmm0, %xmm1
	comisd	%xmm1, %xmm7
	jbe	.L7
	xorpd	%xmm5, %xmm1
.L7:
	minsd	%xmm4, %xmm1
	addq	$1, %rax
	movapd	%xmm1, %xmm4
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rax, %xmm1
	comisd	%xmm1, %xmm3
	ja	.L10
.L5:
	movapd	%xmm4, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	sInput
	.bss
	.align 32
	.type	sInput, @object
	.size	sInput, 2200000
sInput:
	.zero	2200000
	.globl	alCards
	.align 32
	.type	alCards, @object
	.size	alCards, 1600000
alCards:
	.zero	1600000
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	937263104
	.long	1121369269
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC4:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.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
.LC2:
	.string	" "
.LC5:
	.string	"%.0f"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	sInput(%rip), %r12
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	leaq	.LC2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	call	gets@PLT
	xorl	%esi, %esi
	movl	$10, %edx
	movq	%r12, %rdi
	call	strtol@PLT
	pxor	%xmm5, %xmm5
	movq	%r12, %rdi
	cvtsi2sdq	%rax, %xmm5
	xorl	%eax, %eax
	movsd	%xmm5, 8(%rsp)
	call	gets@PLT
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	strtok@PLT
	movsd	8(%rsp), %xmm5
	pxor	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	comisd	%xmm3, %xmm5
	jbe	.L2
	movq	%rax, %rdi
	xorl	%ebx, %ebx
	leaq	alCards(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%esi, %esi
	movl	$10, %edx
	movsd	%xmm0, (%rsp)
	call	strtol@PLT
	pxor	%xmm1, %xmm1
	movsd	(%rsp), %xmm0
	xorl	%edi, %edi
	cvtsi2sdq	%rax, %xmm1
	movq	%rbp, %rsi
	addsd	%xmm1, %xmm0
	movsd	%xmm1, (%r12,%rbx,8)
	addq	$1, %rbx
	movsd	%xmm0, (%rsp)
	call	strtok@PLT
	pxor	%xmm1, %xmm1
	movsd	8(%rsp), %xmm6
	movsd	(%rsp), %xmm0
	cvtsi2sdq	%rbx, %xmm1
	movq	%rax, %rdi
	comisd	%xmm1, %xmm6
	ja	.L4
.L2:
	movsd	8(%rsp), %xmm3
	subsd	.LC3(%rip), %xmm3
	pxor	%xmm5, %xmm5
	movsd	.LC1(%rip), %xmm4
	comisd	%xmm5, %xmm3
	jbe	.L5
	movq	.LC4(%rip), %xmm5
	pxor	%xmm2, %xmm2
	xorl	%eax, %eax
	leaq	alCards(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L10:
	movsd	(%r12,%rax,8), %xmm1
	pxor	%xmm7, %xmm7
	addsd	%xmm1, %xmm2
	subsd	%xmm1, %xmm0
	movapd	%xmm2, %xmm1
	subsd	%xmm0, %xmm1
	comisd	%xmm1, %xmm7
	jbe	.L7
	xorpd	%xmm5, %xmm1
.L7:
	minsd	%xmm4, %xmm1
	addq	$1, %rax
	movapd	%xmm1, %xmm4
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rax, %xmm1
	comisd	%xmm1, %xmm3
	ja	.L10
.L5:
	movapd	%xmm4, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	sInput
	.bss
	.align 32
	.type	sInput, @object
	.size	sInput, 2200000
sInput:
	.zero	2200000
	.globl	alCards
	.align 32
	.type	alCards, @object
	.size	alCards, 1600000
alCards:
	.zero	1600000
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	937263104
	.long	1121369269
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC4:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.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
#pragma warning(disable:4996)
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#define MAX_STRING 2200000
#define MAXCARDS 200000

double alCards[MAXCARDS];
char sInput[MAX_STRING];

int main() {

	char* psInput;
	long long l=0;
	double  lLoopEnd=0.0;
	double  lTemp=0.0;
	double  lAllSum=0.0;
	double  lLeftSum=0.0;
	double  lRightSum=0.0;
	double  lTempMin=0.0;
	double  lMin=0.0;
	double  lCardsNumber =0.0;

//	printf("hoge\n");

	// read line 1
	gets(sInput);
	lCardsNumber = atol(sInput);
	// read line 2
	gets(sInput);
	psInput = strtok(sInput," ");
	for (l=0;l<lCardsNumber;l++){
		lTemp=atol(psInput);
		alCards[l] = lTemp;
		lAllSum=lAllSum+lTemp;
		psInput = strtok(NULL," ");
	}

	// calc
	lRightSum=lAllSum;
	lMin=99999000000000;
	lLoopEnd = lCardsNumber-1;
	for (l=0;l<lLoopEnd;l++){
		lLeftSum=lLeftSum + alCards[l];
		lRightSum=lRightSum - alCards[l];
		lTempMin =lLeftSum-lRightSum;
		if (lTempMin<0){
			lTempMin = lTempMin * -1;
		}
//		printf("left:%.0f right:%.0f abs:%.0f sum:%.0f\n",lLeftSum,lRightSum,lTempMin,lAllSum);
		if (lTempMin<lMin){
			lMin=lTempMin;
		}
	}

	printf("%.0f",lMin);
    return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#pragma warning(disable:4996)
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#define MAX_STRING 2200000
#define MAXCARDS 200000

double alCards[MAXCARDS];
char sInput[MAX_STRING];

int main() {

	char* psInput;
	long long l=0;
	double  lLoopEnd=0.0;
	double  lTemp=0.0;
	double  lAllSum=0.0;
	double  lLeftSum=0.0;
	double  lRightSum=0.0;
	double  lTempMin=0.0;
	double  lMin=0.0;
	double  lCardsNumber =0.0;

//	printf("hoge\n");

	// read line 1
	gets(sInput);
	lCardsNumber = atol(sInput);
	// read line 2
	gets(sInput);
	psInput = strtok(sInput," ");
	for (l=0;l<lCardsNumber;l++){
		lTemp=atol(psInput);
		alCards[l] = lTemp;
		lAllSum=lAllSum+lTemp;
		psInput = strtok(NULL," ");
	}

	// calc
	lRightSum=lAllSum;
	lMin=99999000000000;
	lLoopEnd = lCardsNumber-1;
	for (l=0;l<lLoopEnd;l++){
		lLeftSum=lLeftSum + alCards[l];
		lRightSum=lRightSum - alCards[l];
		lTempMin =lLeftSum-lRightSum;
		if (lTempMin<0){
			lTempMin = lTempMin * -1;
		}
//		printf("left:%.0f right:%.0f abs:%.0f sum:%.0f\n",lLeftSum,lRightSum,lTempMin,lAllSum);
		if (lTempMin<lMin){
			lMin=lTempMin;
		}
	}

	printf("%.0f",lMin);
    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:

6
1 2 3 4 5 6

1
Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#pragma warning(disable:4996)
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#define MAX_STRING 2200000
#define MAXCARDS 200000

double alCards[MAXCARDS];
char sInput[MAX_STRING];

int main() {

	char* psInput;
	long long l=0;
	double  lLoopEnd=0.0;
	double  lTemp=0.0;
	double  lAllSum=0.0;
	double  lLeftSum=0.0;
	double  lRightSum=0.0;
	double  lTempMin=0.0;
	double  lMin=0.0;
	double  lCardsNumber =0.0;

//	printf("hoge\n");

	// read line 1
	gets(sInput);
	lCardsNumber = atol(sInput);
	// read line 2
	gets(sInput);
	psInput = strtok(sInput," ");
	for (l=0;l<lCardsNumber;l++){
		lTemp=atol(psInput);
		alCards[l] = lTemp;
		lAllSum=lAllSum+lTemp;
		psInput = strtok(NULL," ");
	}

	// calc
	lRightSum=lAllSum;
	lMin=99999000000000;
	lLoopEnd = lCardsNumber-1;
	for (l=0;l<lLoopEnd;l++){
		lLeftSum=lLeftSum + alCards[l];
		lRightSum=lRightSum - alCards[l];
		lTempMin =lLeftSum-lRightSum;
		if (lTempMin<0){
			lTempMin = lTempMin * -1;
		}
//		printf("left:%.0f right:%.0f abs:%.0f sum:%.0f\n",lLeftSum,lRightSum,lTempMin,lAllSum);
		if (lTempMin<lMin){
			lMin=lTempMin;
		}
	}

	printf("%.0f",lMin);
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	" "
.LC5:
	.string	"%.0f"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	sInput(%rip), %r12
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	leaq	.LC2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	call	gets@PLT
	xorl	%esi, %esi
	movl	$10, %edx
	movq	%r12, %rdi
	call	strtol@PLT
	pxor	%xmm5, %xmm5
	movq	%r12, %rdi
	cvtsi2sdq	%rax, %xmm5
	xorl	%eax, %eax
	movsd	%xmm5, 8(%rsp)
	call	gets@PLT
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	strtok@PLT
	movsd	8(%rsp), %xmm5
	pxor	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	comisd	%xmm3, %xmm5
	jbe	.L2
	movq	%rax, %rdi
	xorl	%ebx, %ebx
	leaq	alCards(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%esi, %esi
	movl	$10, %edx
	movsd	%xmm0, (%rsp)
	call	strtol@PLT
	pxor	%xmm1, %xmm1
	movsd	(%rsp), %xmm0
	xorl	%edi, %edi
	cvtsi2sdq	%rax, %xmm1
	movq	%rbp, %rsi
	addsd	%xmm1, %xmm0
	movsd	%xmm1, (%r12,%rbx,8)
	addq	$1, %rbx
	movsd	%xmm0, (%rsp)
	call	strtok@PLT
	pxor	%xmm1, %xmm1
	movsd	8(%rsp), %xmm6
	movsd	(%rsp), %xmm0
	cvtsi2sdq	%rbx, %xmm1
	movq	%rax, %rdi
	comisd	%xmm1, %xmm6
	ja	.L4
.L2:
	movsd	8(%rsp), %xmm3
	subsd	.LC3(%rip), %xmm3
	pxor	%xmm5, %xmm5
	movsd	.LC1(%rip), %xmm4
	comisd	%xmm5, %xmm3
	jbe	.L5
	movq	.LC4(%rip), %xmm5
	pxor	%xmm2, %xmm2
	xorl	%eax, %eax
	leaq	alCards(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L10:
	movsd	(%r12,%rax,8), %xmm1
	pxor	%xmm7, %xmm7
	addsd	%xmm1, %xmm2
	subsd	%xmm1, %xmm0
	movapd	%xmm2, %xmm1
	subsd	%xmm0, %xmm1
	comisd	%xmm1, %xmm7
	jbe	.L7
	xorpd	%xmm5, %xmm1
.L7:
	minsd	%xmm4, %xmm1
	addq	$1, %rax
	movapd	%xmm1, %xmm4
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rax, %xmm1
	comisd	%xmm1, %xmm3
	ja	.L10
.L5:
	movapd	%xmm4, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	sInput
	.bss
	.align 32
	.type	sInput, @object
	.size	sInput, 2200000
sInput:
	.zero	2200000
	.globl	alCards
	.align 32
	.type	alCards, @object
	.size	alCards, 1600000
alCards:
	.zero	1600000
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	937263104
	.long	1121369269
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC4:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.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
.LC2:
	.string	" "
.LC5:
	.string	"%.0f"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	sInput(%rip), %r12
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	leaq	.LC2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	call	gets@PLT
	xorl	%esi, %esi
	movl	$10, %edx
	movq	%r12, %rdi
	call	strtol@PLT
	pxor	%xmm5, %xmm5
	movq	%r12, %rdi
	cvtsi2sdq	%rax, %xmm5
	xorl	%eax, %eax
	movsd	%xmm5, 8(%rsp)
	call	gets@PLT
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	strtok@PLT
	movsd	8(%rsp), %xmm5
	pxor	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	comisd	%xmm3, %xmm5
	jbe	.L2
	movq	%rax, %rdi
	xorl	%ebx, %ebx
	leaq	alCards(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%esi, %esi
	movl	$10, %edx
	movsd	%xmm0, (%rsp)
	call	strtol@PLT
	pxor	%xmm1, %xmm1
	movsd	(%rsp), %xmm0
	xorl	%edi, %edi
	cvtsi2sdq	%rax, %xmm1
	movq	%rbp, %rsi
	addsd	%xmm1, %xmm0
	movsd	%xmm1, (%r12,%rbx,8)
	addq	$1, %rbx
	movsd	%xmm0, (%rsp)
	call	strtok@PLT
	pxor	%xmm1, %xmm1
	movsd	8(%rsp), %xmm6
	movsd	(%rsp), %xmm0
	cvtsi2sdq	%rbx, %xmm1
	movq	%rax, %rdi
	comisd	%xmm1, %xmm6
	ja	.L4
.L2:
	movsd	8(%rsp), %xmm3
	subsd	.LC3(%rip), %xmm3
	pxor	%xmm5, %xmm5
	movsd	.LC1(%rip), %xmm4
	comisd	%xmm5, %xmm3
	jbe	.L5
	movq	.LC4(%rip), %xmm5
	pxor	%xmm2, %xmm2
	xorl	%eax, %eax
	leaq	alCards(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L10:
	movsd	(%r12,%rax,8), %xmm1
	pxor	%xmm7, %xmm7
	addsd	%xmm1, %xmm2
	subsd	%xmm1, %xmm0
	movapd	%xmm2, %xmm1
	subsd	%xmm0, %xmm1
	comisd	%xmm1, %xmm7
	jbe	.L7
	xorpd	%xmm5, %xmm1
.L7:
	minsd	%xmm4, %xmm1
	addq	$1, %rax
	movapd	%xmm1, %xmm4
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rax, %xmm1
	comisd	%xmm1, %xmm3
	ja	.L10
.L5:
	movapd	%xmm4, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	sInput
	.bss
	.align 32
	.type	sInput, @object
	.size	sInput, 2200000
sInput:
	.zero	2200000
	.globl	alCards
	.align 32
	.type	alCards, @object
	.size	alCards, 1600000
alCards:
	.zero	1600000
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	937263104
	.long	1121369269
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC4:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.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:
```