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>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int main(void)
{
  char cards[1024];
  while (fgets(cards, sizeof(cards), stdin), *cards != '0') {
    int ones = 0;
    int score = 0;
    char *card = strtok(cards, " ");
    for (; card != NULL; card = strtok(NULL, " ")) {
      int num = atoi(card);
      if (num == 1) {
        score += 10;
        ones++;
      }
      score += fmin(num, 10);
    }
    while (ones--) {
      if (score > 21) score -= 10;
    }
    if (score > 21) score = 0;
    printf("%d\n", score);
  } 
  return (0);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" "
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	subq	$1040, %rsp
	.cfi_def_cfa_offset 1088
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r13
	.p2align 4,,10
	.p2align 3
.L2:
	movq	stdin(%rip), %rdx
	movl	$1024, %esi
	movq	%r13, %rdi
	call	fgets@PLT
	cmpb	$48, (%rsp)
	je	.L24
	movq	%r13, %rdi
	movq	%rbx, %rsi
	xorl	%r12d, %r12d
	xorl	%ebp, %ebp
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L12
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%esi, %esi
	movl	$10, %edx
	call	strtol@PLT
	cmpl	$1, %eax
	je	.L25
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	.LC2(%rip), %rax
	movq	%rax, %xmm1
	call	fmin@PLT
	xorl	%edi, %edi
	movq	%rbx, %rsi
	movapd	%xmm0, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%r12d, %xmm0
	addsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %r12d
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	jne	.L3
	leal	-1(%rbp), %eax
	testl	%ebp, %ebp
	je	.L9
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	$21, %r12d
	jg	.L26
.L4:
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L26:
	subl	$10, %r12d
	subl	$1, %eax
	jnb	.L11
.L9:
	cmpl	$21, %r12d
	jle	.L4
.L12:
	xorl	%r12d, %r12d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L25:
	addl	$10, %r12d
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	movq	%rbx, %rsi
	cvtsi2sdl	%r12d, %xmm0
	addsd	.LC1(%rip), %xmm0
	leal	1(%rbp), %r14d
	cvttsd2sil	%xmm0, %r12d
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L27
	movl	%r14d, %ebp
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%ebp, %eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$1040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L28:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.align 8
.LC2:
	.long	0
	.long	1076101120
	.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	" "
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	subq	$1040, %rsp
	.cfi_def_cfa_offset 1088
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r13
	.p2align 4,,10
	.p2align 3
.L2:
	movq	stdin(%rip), %rdx
	movl	$1024, %esi
	movq	%r13, %rdi
	call	fgets@PLT
	cmpb	$48, (%rsp)
	je	.L24
	movq	%r13, %rdi
	movq	%rbx, %rsi
	xorl	%r12d, %r12d
	xorl	%ebp, %ebp
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L12
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%esi, %esi
	movl	$10, %edx
	call	strtol@PLT
	cmpl	$1, %eax
	je	.L25
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	.LC2(%rip), %rax
	movq	%rax, %xmm1
	call	fmin@PLT
	xorl	%edi, %edi
	movq	%rbx, %rsi
	movapd	%xmm0, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%r12d, %xmm0
	addsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %r12d
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	jne	.L3
	leal	-1(%rbp), %eax
	testl	%ebp, %ebp
	je	.L9
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	$21, %r12d
	jg	.L26
.L4:
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L26:
	subl	$10, %r12d
	subl	$1, %eax
	jnb	.L11
.L9:
	cmpl	$21, %r12d
	jle	.L4
.L12:
	xorl	%r12d, %r12d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L25:
	addl	$10, %r12d
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	movq	%rbx, %rsi
	cvtsi2sdl	%r12d, %xmm0
	addsd	.LC1(%rip), %xmm0
	leal	1(%rbp), %r14d
	cvttsd2sil	%xmm0, %r12d
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L27
	movl	%r14d, %ebp
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%ebp, %eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$1040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L28:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.align 8
.LC2:
	.long	0
	.long	1076101120
	.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	" "
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	subq	$1040, %rsp
	.cfi_def_cfa_offset 1088
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r13
	.p2align 4,,10
	.p2align 3
.L2:
	movq	stdin(%rip), %rdx
	movl	$1024, %esi
	movq	%r13, %rdi
	call	fgets@PLT
	cmpb	$48, (%rsp)
	je	.L24
	movq	%r13, %rdi
	movq	%rbx, %rsi
	xorl	%r12d, %r12d
	xorl	%ebp, %ebp
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L12
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%esi, %esi
	movl	$10, %edx
	call	strtol@PLT
	cmpl	$1, %eax
	je	.L25
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	.LC2(%rip), %rax
	movq	%rax, %xmm1
	call	fmin@PLT
	xorl	%edi, %edi
	movq	%rbx, %rsi
	movapd	%xmm0, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%r12d, %xmm0
	addsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %r12d
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	jne	.L3
	leal	-1(%rbp), %eax
	testl	%ebp, %ebp
	je	.L9
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	$21, %r12d
	jg	.L26
.L4:
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L26:
	subl	$10, %r12d
	subl	$1, %eax
	jnb	.L11
.L9:
	cmpl	$21, %r12d
	jle	.L4
.L12:
	xorl	%r12d, %r12d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L25:
	addl	$10, %r12d
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	movq	%rbx, %rsi
	cvtsi2sdl	%r12d, %xmm0
	addsd	.LC1(%rip), %xmm0
	leal	1(%rbp), %r14d
	cvttsd2sil	%xmm0, %r12d
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L27
	movl	%r14d, %ebp
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%ebp, %eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$1040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L28:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.align 8
.LC2:
	.long	0
	.long	1076101120
	.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>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int main(void)
{
  char cards[1024];
  while (fgets(cards, sizeof(cards), stdin), *cards != '0') {
    int ones = 0;
    int score = 0;
    char *card = strtok(cards, " ");
    for (; card != NULL; card = strtok(NULL, " ")) {
      int num = atoi(card);
      if (num == 1) {
        score += 10;
        ones++;
      }
      score += fmin(num, 10);
    }
    while (ones--) {
      if (score > 21) score -= 10;
    }
    if (score > 21) score = 0;
    printf("%d\n", score);
  } 
  return (0);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int main(void)
{
  char cards[1024];
  while (fgets(cards, sizeof(cards), stdin), *cards != '0') {
    int ones = 0;
    int score = 0;
    char *card = strtok(cards, " ");
    for (; card != NULL; card = strtok(NULL, " ")) {
      int num = atoi(card);
      if (num == 1) {
        score += 10;
        ones++;
      }
      score += fmin(num, 10);
    }
    while (ones--) {
      if (score > 21) score -= 10;
    }
    if (score > 21) score = 0;
    printf("%d\n", score);
  } 
  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:

1
7 7 7
7 7 8
12 1
10 1 2
0
 1
7 7 7
7 7 8
10 1
10 1 1
0
 1
7 7 7
7 7 8
2 1
10 2 1
0
 1
7 9 7
7 7 8
2 1
10 2 1
0
 1
7 9 7
1 9 8
2 1
10 2 1
0
 1
7 4 7
1 9 8
2 1
10 2 1
0
 1
7 4 2
1 9 8
2 1
10 2 1
0
 1
7 3 2
1 9 8
2 1
10 2 1
0
 1
7 3 4
1 9 8
2 1
10 2 1
0
 1
7 3 4
1 9 8
2 1
10 3 1
0

11
21
0
21
13
 11
21
0
21
12
 11
21
0
13
13
 11
0
0
13
13
 11
0
18
13
13
 11
18
18
13
13
 11
13
18
13
13
 11
12
18
13
13
 11
14
18
13
13
 11
14
18
13
14

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>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int main(void)
{
  char cards[1024];
  while (fgets(cards, sizeof(cards), stdin), *cards != '0') {
    int ones = 0;
    int score = 0;
    char *card = strtok(cards, " ");
    for (; card != NULL; card = strtok(NULL, " ")) {
      int num = atoi(card);
      if (num == 1) {
        score += 10;
        ones++;
      }
      score += fmin(num, 10);
    }
    while (ones--) {
      if (score > 21) score -= 10;
    }
    if (score > 21) score = 0;
    printf("%d\n", score);
  } 
  return (0);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" "
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	subq	$1040, %rsp
	.cfi_def_cfa_offset 1088
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r13
	.p2align 4,,10
	.p2align 3
.L2:
	movq	stdin(%rip), %rdx
	movl	$1024, %esi
	movq	%r13, %rdi
	call	fgets@PLT
	cmpb	$48, (%rsp)
	je	.L24
	movq	%r13, %rdi
	movq	%rbx, %rsi
	xorl	%r12d, %r12d
	xorl	%ebp, %ebp
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L12
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%esi, %esi
	movl	$10, %edx
	call	strtol@PLT
	cmpl	$1, %eax
	je	.L25
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	.LC2(%rip), %rax
	movq	%rax, %xmm1
	call	fmin@PLT
	xorl	%edi, %edi
	movq	%rbx, %rsi
	movapd	%xmm0, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%r12d, %xmm0
	addsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %r12d
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	jne	.L3
	leal	-1(%rbp), %eax
	testl	%ebp, %ebp
	je	.L9
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	$21, %r12d
	jg	.L26
.L4:
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L26:
	subl	$10, %r12d
	subl	$1, %eax
	jnb	.L11
.L9:
	cmpl	$21, %r12d
	jle	.L4
.L12:
	xorl	%r12d, %r12d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L25:
	addl	$10, %r12d
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	movq	%rbx, %rsi
	cvtsi2sdl	%r12d, %xmm0
	addsd	.LC1(%rip), %xmm0
	leal	1(%rbp), %r14d
	cvttsd2sil	%xmm0, %r12d
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L27
	movl	%r14d, %ebp
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%ebp, %eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$1040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L28:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.align 8
.LC2:
	.long	0
	.long	1076101120
	.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	" "
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	subq	$1040, %rsp
	.cfi_def_cfa_offset 1088
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r13
	.p2align 4,,10
	.p2align 3
.L2:
	movq	stdin(%rip), %rdx
	movl	$1024, %esi
	movq	%r13, %rdi
	call	fgets@PLT
	cmpb	$48, (%rsp)
	je	.L24
	movq	%r13, %rdi
	movq	%rbx, %rsi
	xorl	%r12d, %r12d
	xorl	%ebp, %ebp
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L12
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%esi, %esi
	movl	$10, %edx
	call	strtol@PLT
	cmpl	$1, %eax
	je	.L25
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	.LC2(%rip), %rax
	movq	%rax, %xmm1
	call	fmin@PLT
	xorl	%edi, %edi
	movq	%rbx, %rsi
	movapd	%xmm0, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%r12d, %xmm0
	addsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %r12d
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	jne	.L3
	leal	-1(%rbp), %eax
	testl	%ebp, %ebp
	je	.L9
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	$21, %r12d
	jg	.L26
.L4:
	movl	%r12d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L26:
	subl	$10, %r12d
	subl	$1, %eax
	jnb	.L11
.L9:
	cmpl	$21, %r12d
	jle	.L4
.L12:
	xorl	%r12d, %r12d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L25:
	addl	$10, %r12d
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	movq	%rbx, %rsi
	cvtsi2sdl	%r12d, %xmm0
	addsd	.LC1(%rip), %xmm0
	leal	1(%rbp), %r14d
	cvttsd2sil	%xmm0, %r12d
	call	strtok@PLT
	movq	%rax, %rdi
	testq	%rax, %rax
	je	.L27
	movl	%r14d, %ebp
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%ebp, %eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$1040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L28:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.align 8
.LC2:
	.long	0
	.long	1076101120
	.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:
```