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

```c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>

int main(){
  srand((unsigned int)time(NULL)); 
  int D,M=365*500;
  int c[30];
  int s[370][30];
  int t[370];
  int last[30];
  int ans_max=0,ans=0;
  int old_t,old_d;
  
  scanf("%d",&D);
  for(int i=1;i<=26;i++)
    scanf("%d",c+i);
  for(int i=1;i<=D;i++)
   for(int j=1;j<=26;j++)
     scanf("%d",&s[i][j]);
  
  for(int i=1;i<=D;i++)
    t[i]=rand()%26+1;
  
  ans_max=0;
  for(int k=1;k<=26;k++)
    last[k]=0;
  for(int d=1;d<=D;d++){
    ans_max+=s[d][t[d]];
    last[t[d]]=d;
    for(int j=1;j<=26;j++){
      ans_max-=c[j]*(d-last[j]);
    }
  }
  
  for(int i=1;i<=M;i++){
    ans=0;
    old_d=i%D+1;
    old_t=t[old_d];
    t[old_d]=rand()%26+1;
    for(int k=1;k<=26;k++)
      last[k]=0;
    for(int d=1;d<=D;d++){
      ans+=s[d][t[d]];
      last[t[d]]=d;
      for(int j=1;j<=26;j++){
        ans-=c[j]*(d-last[j]);
      }
    }
    if(ans<ans_max){
      t[old_d]=old_t;
    }else{
      ans_max=ans;
    }
  }
  
  for(int i=1;i<=D;i++)
    printf("%d\n",t[i]);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-45056(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1184, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, %edi
	call	time@PLT
	movl	%eax, %edi
	call	srand@PLT
	movl	$182500, -46172(%rbp)
	movl	$0, -46228(%rbp)
	movl	$0, -46224(%rbp)
	leaq	-46232(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -46220(%rbp)
	jmp	.L2
.L3:
	movl	-46220(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-46160(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -46220(%rbp)
.L2:
	cmpl	$26, -46220(%rbp)
	jle	.L3
	movl	$1, -46216(%rbp)
	jmp	.L4
.L7:
	movl	$1, -46212(%rbp)
	jmp	.L5
.L6:
	leaq	-44416(%rbp), %rcx
	movl	-46212(%rbp), %eax
	movslq	%eax, %rsi
	movl	-46216(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -46212(%rbp)
.L5:
	cmpl	$26, -46212(%rbp)
	jle	.L6
	addl	$1, -46216(%rbp)
.L4:
	movl	-46232(%rbp), %eax
	cmpl	%eax, -46216(%rbp)
	jle	.L7
	movl	$1, -46208(%rbp)
	jmp	.L8
.L9:
	call	rand@PLT
	movslq	%eax, %rdx
	imulq	$1321528399, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$3, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$26, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	addl	$1, %edx
	movl	-46208(%rbp), %eax
	cltq
	movl	%edx, -45904(%rbp,%rax,4)
	addl	$1, -46208(%rbp)
.L8:
	movl	-46232(%rbp), %eax
	cmpl	%eax, -46208(%rbp)
	jle	.L9
	movl	$0, -46228(%rbp)
	movl	$1, -46204(%rbp)
	jmp	.L10
.L11:
	movl	-46204(%rbp), %eax
	cltq
	movl	$0, -46032(%rbp,%rax,4)
	addl	$1, -46204(%rbp)
.L10:
	cmpl	$26, -46204(%rbp)
	jle	.L11
	movl	$1, -46200(%rbp)
	jmp	.L12
.L15:
	movl	-46200(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movl	-46200(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-44416(%rbp,%rax,4), %eax
	addl	%eax, -46228(%rbp)
	movl	-46200(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	cltq
	movl	-46200(%rbp), %edx
	movl	%edx, -46032(%rbp,%rax,4)
	movl	$1, -46196(%rbp)
	jmp	.L13
.L14:
	movl	-46196(%rbp), %eax
	cltq
	movl	-46160(%rbp,%rax,4), %edx
	movl	-46196(%rbp), %eax
	cltq
	movl	-46032(%rbp,%rax,4), %ecx
	movl	-46200(%rbp), %eax
	subl	%ecx, %eax
	imull	%edx, %eax
	subl	%eax, -46228(%rbp)
	addl	$1, -46196(%rbp)
.L13:
	cmpl	$26, -46196(%rbp)
	jle	.L14
	addl	$1, -46200(%rbp)
.L12:
	movl	-46232(%rbp), %eax
	cmpl	%eax, -46200(%rbp)
	jle	.L15
	movl	$1, -46192(%rbp)
	jmp	.L16
.L25:
	movl	$0, -46224(%rbp)
	movl	-46232(%rbp), %ecx
	movl	-46192(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	addl	$1, %eax
	movl	%eax, -46168(%rbp)
	movl	-46168(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	movl	%eax, -46164(%rbp)
	call	rand@PLT
	movslq	%eax, %rdx
	imulq	$1321528399, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$3, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$26, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	addl	$1, %edx
	movl	-46168(%rbp), %eax
	cltq
	movl	%edx, -45904(%rbp,%rax,4)
	movl	$1, -46188(%rbp)
	jmp	.L17
.L18:
	movl	-46188(%rbp), %eax
	cltq
	movl	$0, -46032(%rbp,%rax,4)
	addl	$1, -46188(%rbp)
.L17:
	cmpl	$26, -46188(%rbp)
	jle	.L18
	movl	$1, -46184(%rbp)
	jmp	.L19
.L22:
	movl	-46184(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movl	-46184(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-44416(%rbp,%rax,4), %eax
	addl	%eax, -46224(%rbp)
	movl	-46184(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	cltq
	movl	-46184(%rbp), %edx
	movl	%edx, -46032(%rbp,%rax,4)
	movl	$1, -46180(%rbp)
	jmp	.L20
.L21:
	movl	-46180(%rbp), %eax
	cltq
	movl	-46160(%rbp,%rax,4), %edx
	movl	-46180(%rbp), %eax
	cltq
	movl	-46032(%rbp,%rax,4), %ecx
	movl	-46184(%rbp), %eax
	subl	%ecx, %eax
	imull	%edx, %eax
	subl	%eax, -46224(%rbp)
	addl	$1, -46180(%rbp)
.L20:
	cmpl	$26, -46180(%rbp)
	jle	.L21
	addl	$1, -46184(%rbp)
.L19:
	movl	-46232(%rbp), %eax
	cmpl	%eax, -46184(%rbp)
	jle	.L22
	movl	-46224(%rbp), %eax
	cmpl	-46228(%rbp), %eax
	jge	.L23
	movl	-46168(%rbp), %eax
	cltq
	movl	-46164(%rbp), %edx
	movl	%edx, -45904(%rbp,%rax,4)
	jmp	.L24
.L23:
	movl	-46224(%rbp), %eax
	movl	%eax, -46228(%rbp)
.L24:
	addl	$1, -46192(%rbp)
.L16:
	movl	-46192(%rbp), %eax
	cmpl	-46172(%rbp), %eax
	jle	.L25
	movl	$1, -46176(%rbp)
	jmp	.L26
.L27:
	movl	-46176(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -46176(%rbp)
.L26:
	movl	-46232(%rbp), %eax
	cmpl	%eax, -46176(%rbp)
	jle	.L27
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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
	leaq	-45056(%rsp), %r11
	.cfi_def_cfa 11, 45112
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1160, %rsp
	.cfi_def_cfa_offset 46272
	xorl	%edi, %edi
	leaq	.LC0(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 46200(%rsp)
	xorl	%eax, %eax
	leaq	52(%rsp), %rbx
	leaq	156(%rsp), %rbp
	call	time@PLT
	movl	%eax, %edi
	call	srand@PLT
	leaq	44(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
.L2:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbx, %rbp
	jne	.L2
	movl	44(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L3
	leaq	2020(%rsp), %rbp
	movl	$1, %r13d
.L5:
	leaq	-104(%rbp), %rbx
.L4:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbp, %rbx
	jne	.L4
	movl	44(%rsp), %r9d
	addl	$1, %r13d
	leaq	120(%rbx), %rbp
	cmpl	%r13d, %r9d
	jge	.L5
	testl	%r9d, %r9d
	jle	.L3
	movl	$1, %ebp
	leaq	304(%rsp), %rbx
.L6:
	call	rand@PLT
	movl	44(%rsp), %r9d
	movslq	%eax, %rdx
	movl	%eax, %ecx
	imulq	$1321528399, %rdx, %rdx
	sarl	$31, %ecx
	sarq	$35, %rdx
	subl	%ecx, %edx
	imull	$26, %edx, %edx
	subl	%edx, %eax
	addl	$1, %eax
	movl	%eax, (%rbx,%rbp,4)
	addq	$1, %rbp
	cmpl	%ebp, %r9d
	jge	.L6
	leaq	180(%rsp), %r13
	leaq	184(%rsp), %rdi
	movq	$0, 180(%rsp)
	movq	%r13, %rcx
	leaq	188(%rsp), %rax
	movq	$0, 276(%rsp)
	subq	%rdi, %rcx
	movq	%rax, 16(%rsp)
	xorl	%eax, %eax
	addl	$104, %ecx
	shrl	$3, %ecx
	rep stosq
	testl	%r9d, %r9d
	jle	.L16
	movdqu	52(%rsp), %xmm9
	movdqu	68(%rsp), %xmm8
	leal	1(%r9), %r8d
	movl	$1, %edx
	movdqu	84(%rsp), %xmm7
	movdqu	100(%rsp), %xmm6
	xorl	%r12d, %r12d
	pxor	%xmm10, %xmm10
	movdqu	116(%rsp), %xmm5
	movdqa	%xmm9, %xmm15
	movdqu	132(%rsp), %xmm4
	movdqa	%xmm8, %xmm14
	movdqa	%xmm7, %xmm13
	movdqa	%xmm6, %xmm12
	movl	148(%rsp), %edi
	movl	152(%rsp), %esi
	movdqa	%xmm4, %xmm1
	movdqa	%xmm5, %xmm11
	psrlq	$32, %xmm1
	psrlq	$32, %xmm15
	psrlq	$32, %xmm14
	psrlq	$32, %xmm13
	movaps	%xmm1, (%rsp)
	psrlq	$32, %xmm12
	psrlq	$32, %xmm11
.L8:
	movslq	(%rbx,%rdx,4), %rcx
	movd	%edx, %xmm1
	movslq	%edx, %r10
	pshufd	$0, %xmm1, %xmm1
	movq	%r10, %rax
	movl	%edx, 176(%rsp,%rcx,4)
	movdqa	%xmm1, %xmm0
	salq	$4, %rax
	movdqu	180(%rsp), %xmm3
	subq	%r10, %rax
	psubd	%xmm3, %xmm0
	movdqa	%xmm10, %xmm3
	leaq	(%rcx,%rax,2), %rax
	movl	%edx, %ecx
	movdqa	%xmm0, %xmm2
	psrlq	$32, %xmm0
	subl	276(%rsp), %ecx
	addl	1792(%rsp,%rax,4), %r12d
	pmuludq	%xmm9, %xmm2
	pmuludq	%xmm15, %xmm0
	imull	%edi, %ecx
	pshufd	$8, %xmm0, %xmm0
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	psubd	%xmm2, %xmm3
	movdqu	196(%rsp), %xmm2
	psubd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm2
	psrlq	$32, %xmm0
	pmuludq	%xmm8, %xmm2
	pmuludq	%xmm14, %xmm0
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	psubd	%xmm2, %xmm3
	movdqu	212(%rsp), %xmm2
	psubd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm2
	psrlq	$32, %xmm0
	pmuludq	%xmm7, %xmm2
	pmuludq	%xmm13, %xmm0
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	psubd	%xmm2, %xmm3
	movdqu	228(%rsp), %xmm2
	psubd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm2
	psrlq	$32, %xmm0
	pmuludq	%xmm6, %xmm2
	pmuludq	%xmm12, %xmm0
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm2
	movdqa	%xmm3, %xmm0
	movdqu	244(%rsp), %xmm3
	psubd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm5, %xmm3
	pmuludq	%xmm11, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	psubd	%xmm3, %xmm0
	movdqu	260(%rsp), %xmm3
	psubd	%xmm3, %xmm1
	movdqa	%xmm1, %xmm2
	psrlq	$32, %xmm1
	pmuludq	(%rsp), %xmm1
	pshufd	$8, %xmm1, %xmm1
	pmuludq	%xmm4, %xmm2
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm1, %xmm2
	psubd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%r12d, %eax
	subl	%ecx, %eax
	movl	%edx, %ecx
	subl	280(%rsp), %ecx
	addq	$1, %rdx
	imull	%esi, %ecx
	subl	%ecx, %eax
	movl	%eax, %r12d
	cmpq	%r8, %rdx
	jne	.L8
.L7:
	leaq	292(%rsp), %rax
	movl	$1, %ebp
	movq	%rax, 24(%rsp)
.L12:
	movl	%ebp, %eax
	cltd
	idivl	%r9d
	addl	$1, %edx
	movslq	%edx, %r14
	movl	304(%rsp,%r14,4), %ebx
	call	rand@PLT
	movslq	%eax, %rdx
	movl	%eax, %ecx
	imulq	$1321528399, %rdx, %rdx
	sarl	$31, %ecx
	sarq	$35, %rdx
	subl	%ecx, %edx
	movq	%r13, %rcx
	imull	$26, %edx, %edx
	subl	%edx, %eax
	addl	$1, %eax
	movl	%eax, 304(%rsp,%r14,4)
	movq	$0, 0(%r13)
	movq	24(%rsp), %rax
	movq	$0, -16(%rax)
	movq	16(%rsp), %rdi
	xorl	%eax, %eax
	andq	$-8, %rdi
	subq	%rdi, %rcx
	addl	$104, %ecx
	shrl	$3, %ecx
	rep stosq
	movl	44(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L17
	movdqu	52(%rsp), %xmm9
	movdqu	68(%rsp), %xmm8
	leal	1(%r9), %r15d
	xorl	%edx, %edx
	movdqu	132(%rsp), %xmm4
	movdqu	84(%rsp), %xmm7
	movl	$1, %eax
	leaq	304(%rsp), %r8
	movdqu	100(%rsp), %xmm6
	movdqu	116(%rsp), %xmm5
	movdqa	%xmm9, %xmm15
	movdqa	%xmm8, %xmm14
	movdqa	%xmm4, %xmm1
	movdqa	%xmm7, %xmm13
	movl	148(%rsp), %r11d
	movl	152(%rsp), %r10d
	movdqa	%xmm6, %xmm12
	movdqa	%xmm5, %xmm11
	pxor	%xmm10, %xmm10
	psrlq	$32, %xmm1
	psrlq	$32, %xmm15
	psrlq	$32, %xmm14
	psrlq	$32, %xmm13
	movaps	%xmm1, (%rsp)
	psrlq	$32, %xmm12
	psrlq	$32, %xmm11
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	(%r8,%rax,4), %rsi
	movd	%eax, %xmm1
	movslq	%eax, %rdi
	pshufd	$0, %xmm1, %xmm1
	movq	%rdi, %rcx
	movl	%eax, 176(%rsp,%rsi,4)
	movdqa	%xmm1, %xmm0
	salq	$4, %rcx
	movdqu	180(%rsp), %xmm3
	subq	%rdi, %rcx
	psubd	%xmm3, %xmm0
	leaq	(%rsi,%rcx,2), %rcx
	movdqu	196(%rsp), %xmm3
	movdqa	%xmm0, %xmm2
	psrlq	$32, %xmm0
	addl	1792(%rsp,%rcx,4), %edx
	pmuludq	%xmm9, %xmm2
	pmuludq	%xmm15, %xmm0
	movl	%edx, %ecx
	pshufd	$8, %xmm0, %xmm0
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm0, %xmm2
	movdqa	%xmm10, %xmm0
	psubd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm8, %xmm3
	pmuludq	%xmm14, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm0
	movdqu	212(%rsp), %xmm3
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm7, %xmm3
	pmuludq	%xmm13, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm0
	movdqu	228(%rsp), %xmm3
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm6, %xmm3
	pmuludq	%xmm12, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm0
	movdqu	244(%rsp), %xmm3
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm5, %xmm3
	pmuludq	%xmm11, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	psubd	%xmm3, %xmm0
	movdqu	260(%rsp), %xmm3
	psubd	%xmm3, %xmm1
	movdqa	%xmm1, %xmm3
	movdqa	%xmm1, %xmm2
	pmuludq	%xmm4, %xmm3
	psrlq	$32, %xmm2
	pmuludq	(%rsp), %xmm2
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm3, %xmm1
	punpckldq	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	addl	%ecx, %edx
	movl	%eax, %ecx
	subl	276(%rsp), %ecx
	imull	%r11d, %ecx
	subl	%ecx, %edx
	movl	%eax, %ecx
	subl	280(%rsp), %ecx
	addq	$1, %rax
	imull	%r10d, %ecx
	subl	%ecx, %edx
	cmpq	%r15, %rax
	jne	.L10
.L9:
	cmpl	%r12d, %edx
	jge	.L18
	movl	%ebx, 304(%rsp,%r14,4)
.L11:
	addl	$1, %ebp
	cmpl	$182501, %ebp
	jne	.L12
	movl	$1, %ebp
	leaq	304(%rsp), %rbx
	leaq	.LC1(%rip), %r12
	testl	%r9d, %r9d
	jle	.L14
.L13:
	movl	(%rbx,%rbp,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, 44(%rsp)
	jge	.L13
.L14:
	movq	46200(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L33
	addq	$46216, %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
.L18:
	.cfi_restore_state
	movl	%edx, %r12d
	jmp	.L11
.L17:
	xorl	%edx, %edx
	jmp	.L9
.L3:
	leaq	188(%rsp), %rax
	xorl	%r12d, %r12d
	leaq	180(%rsp), %r13
	movq	%rax, 16(%rsp)
	jmp	.L7
.L16:
	xorl	%r12d, %r12d
	jmp	.L7
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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
	leaq	-45056(%rsp), %r11
	.cfi_def_cfa 11, 45112
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1160, %rsp
	.cfi_def_cfa_offset 46272
	xorl	%edi, %edi
	leaq	.LC0(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 46200(%rsp)
	xorl	%eax, %eax
	leaq	52(%rsp), %rbx
	leaq	156(%rsp), %rbp
	call	time@PLT
	movl	%eax, %edi
	call	srand@PLT
	leaq	44(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
.L2:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbx, %rbp
	jne	.L2
	movl	44(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L3
	leaq	2020(%rsp), %rbp
	movl	$1, %r13d
.L5:
	leaq	-104(%rbp), %rbx
.L4:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbp, %rbx
	jne	.L4
	movl	44(%rsp), %r9d
	addl	$1, %r13d
	leaq	120(%rbx), %rbp
	cmpl	%r13d, %r9d
	jge	.L5
	testl	%r9d, %r9d
	jle	.L3
	movl	$1, %ebp
	leaq	304(%rsp), %rbx
.L6:
	call	rand@PLT
	movl	44(%rsp), %r9d
	movslq	%eax, %rdx
	movl	%eax, %ecx
	imulq	$1321528399, %rdx, %rdx
	sarl	$31, %ecx
	sarq	$35, %rdx
	subl	%ecx, %edx
	imull	$26, %edx, %edx
	subl	%edx, %eax
	addl	$1, %eax
	movl	%eax, (%rbx,%rbp,4)
	addq	$1, %rbp
	cmpl	%ebp, %r9d
	jge	.L6
	leaq	180(%rsp), %r13
	leaq	184(%rsp), %rdi
	movq	$0, 180(%rsp)
	movq	%r13, %rcx
	leaq	188(%rsp), %rax
	movq	$0, 276(%rsp)
	subq	%rdi, %rcx
	movq	%rax, 16(%rsp)
	xorl	%eax, %eax
	addl	$104, %ecx
	shrl	$3, %ecx
	rep stosq
	testl	%r9d, %r9d
	jle	.L16
	movdqu	52(%rsp), %xmm9
	movdqu	68(%rsp), %xmm8
	leal	1(%r9), %r8d
	movl	$1, %edx
	movdqu	84(%rsp), %xmm7
	movdqu	100(%rsp), %xmm6
	xorl	%r12d, %r12d
	pxor	%xmm10, %xmm10
	movdqu	116(%rsp), %xmm5
	movdqa	%xmm9, %xmm15
	movdqu	132(%rsp), %xmm4
	movdqa	%xmm8, %xmm14
	movdqa	%xmm7, %xmm13
	movdqa	%xmm6, %xmm12
	movl	148(%rsp), %edi
	movl	152(%rsp), %esi
	movdqa	%xmm4, %xmm1
	movdqa	%xmm5, %xmm11
	psrlq	$32, %xmm1
	psrlq	$32, %xmm15
	psrlq	$32, %xmm14
	psrlq	$32, %xmm13
	movaps	%xmm1, (%rsp)
	psrlq	$32, %xmm12
	psrlq	$32, %xmm11
.L8:
	movslq	(%rbx,%rdx,4), %rcx
	movd	%edx, %xmm1
	movslq	%edx, %r10
	pshufd	$0, %xmm1, %xmm1
	movq	%r10, %rax
	movl	%edx, 176(%rsp,%rcx,4)
	movdqa	%xmm1, %xmm0
	salq	$4, %rax
	movdqu	180(%rsp), %xmm3
	subq	%r10, %rax
	psubd	%xmm3, %xmm0
	movdqa	%xmm10, %xmm3
	leaq	(%rcx,%rax,2), %rax
	movl	%edx, %ecx
	movdqa	%xmm0, %xmm2
	psrlq	$32, %xmm0
	subl	276(%rsp), %ecx
	addl	1792(%rsp,%rax,4), %r12d
	pmuludq	%xmm9, %xmm2
	pmuludq	%xmm15, %xmm0
	imull	%edi, %ecx
	pshufd	$8, %xmm0, %xmm0
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	psubd	%xmm2, %xmm3
	movdqu	196(%rsp), %xmm2
	psubd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm2
	psrlq	$32, %xmm0
	pmuludq	%xmm8, %xmm2
	pmuludq	%xmm14, %xmm0
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	psubd	%xmm2, %xmm3
	movdqu	212(%rsp), %xmm2
	psubd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm2
	psrlq	$32, %xmm0
	pmuludq	%xmm7, %xmm2
	pmuludq	%xmm13, %xmm0
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	psubd	%xmm2, %xmm3
	movdqu	228(%rsp), %xmm2
	psubd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm2
	psrlq	$32, %xmm0
	pmuludq	%xmm6, %xmm2
	pmuludq	%xmm12, %xmm0
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm2
	movdqa	%xmm3, %xmm0
	movdqu	244(%rsp), %xmm3
	psubd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm5, %xmm3
	pmuludq	%xmm11, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	psubd	%xmm3, %xmm0
	movdqu	260(%rsp), %xmm3
	psubd	%xmm3, %xmm1
	movdqa	%xmm1, %xmm2
	psrlq	$32, %xmm1
	pmuludq	(%rsp), %xmm1
	pshufd	$8, %xmm1, %xmm1
	pmuludq	%xmm4, %xmm2
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm1, %xmm2
	psubd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%r12d, %eax
	subl	%ecx, %eax
	movl	%edx, %ecx
	subl	280(%rsp), %ecx
	addq	$1, %rdx
	imull	%esi, %ecx
	subl	%ecx, %eax
	movl	%eax, %r12d
	cmpq	%r8, %rdx
	jne	.L8
.L7:
	leaq	292(%rsp), %rax
	movl	$1, %ebp
	movq	%rax, 24(%rsp)
.L12:
	movl	%ebp, %eax
	cltd
	idivl	%r9d
	addl	$1, %edx
	movslq	%edx, %r14
	movl	304(%rsp,%r14,4), %ebx
	call	rand@PLT
	movslq	%eax, %rdx
	movl	%eax, %ecx
	imulq	$1321528399, %rdx, %rdx
	sarl	$31, %ecx
	sarq	$35, %rdx
	subl	%ecx, %edx
	movq	%r13, %rcx
	imull	$26, %edx, %edx
	subl	%edx, %eax
	addl	$1, %eax
	movl	%eax, 304(%rsp,%r14,4)
	movq	$0, 0(%r13)
	movq	24(%rsp), %rax
	movq	$0, -16(%rax)
	movq	16(%rsp), %rdi
	xorl	%eax, %eax
	andq	$-8, %rdi
	subq	%rdi, %rcx
	addl	$104, %ecx
	shrl	$3, %ecx
	rep stosq
	movl	44(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L17
	movdqu	52(%rsp), %xmm9
	movdqu	68(%rsp), %xmm8
	leal	1(%r9), %r15d
	xorl	%edx, %edx
	movdqu	132(%rsp), %xmm4
	movdqu	84(%rsp), %xmm7
	movl	$1, %eax
	leaq	304(%rsp), %r8
	movdqu	100(%rsp), %xmm6
	movdqu	116(%rsp), %xmm5
	movdqa	%xmm9, %xmm15
	movdqa	%xmm8, %xmm14
	movdqa	%xmm4, %xmm1
	movdqa	%xmm7, %xmm13
	movl	148(%rsp), %r11d
	movl	152(%rsp), %r10d
	movdqa	%xmm6, %xmm12
	movdqa	%xmm5, %xmm11
	pxor	%xmm10, %xmm10
	psrlq	$32, %xmm1
	psrlq	$32, %xmm15
	psrlq	$32, %xmm14
	psrlq	$32, %xmm13
	movaps	%xmm1, (%rsp)
	psrlq	$32, %xmm12
	psrlq	$32, %xmm11
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	(%r8,%rax,4), %rsi
	movd	%eax, %xmm1
	movslq	%eax, %rdi
	pshufd	$0, %xmm1, %xmm1
	movq	%rdi, %rcx
	movl	%eax, 176(%rsp,%rsi,4)
	movdqa	%xmm1, %xmm0
	salq	$4, %rcx
	movdqu	180(%rsp), %xmm3
	subq	%rdi, %rcx
	psubd	%xmm3, %xmm0
	leaq	(%rsi,%rcx,2), %rcx
	movdqu	196(%rsp), %xmm3
	movdqa	%xmm0, %xmm2
	psrlq	$32, %xmm0
	addl	1792(%rsp,%rcx,4), %edx
	pmuludq	%xmm9, %xmm2
	pmuludq	%xmm15, %xmm0
	movl	%edx, %ecx
	pshufd	$8, %xmm0, %xmm0
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm0, %xmm2
	movdqa	%xmm10, %xmm0
	psubd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm8, %xmm3
	pmuludq	%xmm14, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm0
	movdqu	212(%rsp), %xmm3
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm7, %xmm3
	pmuludq	%xmm13, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm0
	movdqu	228(%rsp), %xmm3
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm6, %xmm3
	pmuludq	%xmm12, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm0
	movdqu	244(%rsp), %xmm3
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm5, %xmm3
	pmuludq	%xmm11, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	psubd	%xmm3, %xmm0
	movdqu	260(%rsp), %xmm3
	psubd	%xmm3, %xmm1
	movdqa	%xmm1, %xmm3
	movdqa	%xmm1, %xmm2
	pmuludq	%xmm4, %xmm3
	psrlq	$32, %xmm2
	pmuludq	(%rsp), %xmm2
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm3, %xmm1
	punpckldq	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	addl	%ecx, %edx
	movl	%eax, %ecx
	subl	276(%rsp), %ecx
	imull	%r11d, %ecx
	subl	%ecx, %edx
	movl	%eax, %ecx
	subl	280(%rsp), %ecx
	addq	$1, %rax
	imull	%r10d, %ecx
	subl	%ecx, %edx
	cmpq	%r15, %rax
	jne	.L10
.L9:
	cmpl	%r12d, %edx
	jge	.L18
	movl	%ebx, 304(%rsp,%r14,4)
.L11:
	addl	$1, %ebp
	cmpl	$182501, %ebp
	jne	.L12
	movl	$1, %ebp
	leaq	304(%rsp), %rbx
	leaq	.LC1(%rip), %r12
	testl	%r9d, %r9d
	jle	.L14
.L13:
	movl	(%rbx,%rbp,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, 44(%rsp)
	jge	.L13
.L14:
	movq	46200(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L33
	addq	$46216, %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
.L18:
	.cfi_restore_state
	movl	%edx, %r12d
	jmp	.L11
.L17:
	xorl	%edx, %edx
	jmp	.L9
.L3:
	leaq	188(%rsp), %rax
	xorl	%r12d, %r12d
	leaq	180(%rsp), %r13
	movq	%rax, 16(%rsp)
	jmp	.L7
.L16:
	xorl	%r12d, %r12d
	jmp	.L7
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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:

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>

int main(){
  srand((unsigned int)time(NULL)); 
  int D,M=365*500;
  int c[30];
  int s[370][30];
  int t[370];
  int last[30];
  int ans_max=0,ans=0;
  int old_t,old_d;
  
  scanf("%d",&D);
  for(int i=1;i<=26;i++)
    scanf("%d",c+i);
  for(int i=1;i<=D;i++)
   for(int j=1;j<=26;j++)
     scanf("%d",&s[i][j]);
  
  for(int i=1;i<=D;i++)
    t[i]=rand()%26+1;
  
  ans_max=0;
  for(int k=1;k<=26;k++)
    last[k]=0;
  for(int d=1;d<=D;d++){
    ans_max+=s[d][t[d]];
    last[t[d]]=d;
    for(int j=1;j<=26;j++){
      ans_max-=c[j]*(d-last[j]);
    }
  }
  
  for(int i=1;i<=M;i++){
    ans=0;
    old_d=i%D+1;
    old_t=t[old_d];
    t[old_d]=rand()%26+1;
    for(int k=1;k<=26;k++)
      last[k]=0;
    for(int d=1;d<=D;d++){
      ans+=s[d][t[d]];
      last[t[d]]=d;
      for(int j=1;j<=26;j++){
        ans-=c[j]*(d-last[j]);
      }
    }
    if(ans<ans_max){
      t[old_d]=old_t;
    }else{
      ans_max=ans;
    }
  }
  
  for(int i=1;i<=D;i++)
    printf("%d\n",t[i]);
  return 0;
}
5
86 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 97 84 41 80 14 4 50 83 7 82
19771 12979 18912 10432 10544 12928 13403 3047 10527 9740 8100 92 2856 14730 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6674 17707 13855 16407 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 15364 19277 18094 3929 3705 7169 6159 18683 15410 9092 4570
6878 4239 22677 1799 375 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 2146 19745 16880 17773 18359 3921 14172 16730 11157 5439 256
8633 15862 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 197 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 19922 12132 16259 17476 2976 547 19195 19830 16285 4806 4471 9457 2864 2192
 5
86 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 97 84 41 80 14 4 50 83 7 82
19771 12979 18912 10432 10544 12928 13403 3047 10527 9740 8100 92 2856 3754 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6674 17707 13855 7119 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 15364 19277 18094 3929 3705 7169 6159 18683 15410 9092 4570
6878 4239 22677 1799 375 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 2146 19745 16880 17773 18359 3921 14172 16730 11157 5439 256
8633 22603 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 197 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 19922 12132 16259 17476 2976 1041 19195 19830 16285 4806 4471 9457 2864 2407
 5
86 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 97 84 41 80 14 4 50 83 7 82
19771 12979 18912 10432 10544 12928 13403 3047 10527 9740 8100 92 2856 3754 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6674 17707 13855 7119 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 15364 19277 18094 3929 3705 7169 6159 18683 15410 9092 4570
6878 4239 22677 1799 375 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 2146 19745 16880 27396 18359 3921 14172 16730 11157 5439 256
8633 22603 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 197 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 19922 12132 16259 17476 2976 1041 19195 19830 16285 4806 4471 9457 2864 2407
 5
86 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 97 84 41 101 14 4 76 83 7 82
19771 12979 18912 10432 10544 12928 13403 3047 10527 9740 8100 92 2856 3754 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6219 17707 13855 7119 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 15364 19277 18094 3929 3705 7169 6159 18683 21588 9092 4570
6878 4239 22677 1759 375 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 2146 19745 16880 27396 18359 3921 14172 16730 11157 5439 256
8633 22603 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 241 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 33981 12132 16259 17476 2976 1041 19195 19830 16285 4806 4471 9457 2864 2407
 5
86 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 97 84 41 101 14 4 76 83 7 82
19771 12979 18912 10432 10544 12928 13403 3047 10527 9740 8100 92 2856 3754 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6219 17707 13855 7119 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 21670 15364 19277 18094 3929 3705 7169 6159 18683 21588 9092 4570
6878 4239 22677 1759 375 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 2146 19745 16880 27396 18359 3921 14172 16730 11157 5439 256
8633 22603 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 241 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 33981 12132 16259 17476 2976 1041 19195 19830 16285 4806 4471 9457 2864 2407
 5
86 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 97 84 41 101 14 4 76 83 7 82
19771 12979 18912 10432 10544 12928 13403 3047 10527 9740 8100 92 2856 3754 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6219 17707 25311 7119 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 21670 15364 19277 18094 3929 3705 7169 6159 18683 21588 9092 4570
6878 4239 22677 1759 375 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 2146 19745 16880 27396 18359 3921 14172 16730 11157 5439 256
8633 22603 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 3970 784 18500 10552 8524 16615 7852 241 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 33981 12132 16259 17476 2976 1041 19195 19830 16285 4806 4471 9457 2864 2407
 5
86 90 69 72 2 96 71 47 88 34 45 46 89 34 31 38 122 84 41 101 14 4 76 83 7 82
19771 12979 18912 10432 10544 12928 11856 3047 10527 16213 8100 80 2856 5573 2311 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6219 29385 25311 7119 12232 2645 5242 1705 5000 1537 6096 10711 4917 20074 21670 15364 19277 18094 3929 3705 7169 6159 18683 21588 9092 4570
6878 4239 22677 1759 375 9563 3445 1349 19857 11401 6997 6498 19335 3848 2426 1667 19745 16880 27396 18359 3921 14172 16719 11157 5439 72
778 22603 15303 12418 18499 2415 10317 5901 9395 11433 6401 3959 5202 19850 19469 9790 3970 784 18500 10552 8524 16615 7852 241 8471 7452
19855 17918 7990 10572 4447 520 9140 12528 12622 4985 12319 4028 33981 12132 16259 17476 2976 1041 19195 19830 16285 4806 4471 9457 2864 2407
 5
86 90 69 72 2 96 71 47 88 34 45 46 89 34 31 38 122 84 41 101 14 4 76 83 7 82
19771 12979 18912 10432 10544 12928 11856 3047 10527 16213 8100 80 2856 5573 2311 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6219 29385 25311 7119 12232 2645 5242 1705 5000 1537 6096 10711 4917 20074 21670 15364 19277 18094 3929 3705 7169 6159 18683 21588 9092 4570
6878 4239 22677 1759 375 9563 3445 1349 19857 11401 6997 6498 19335 3848 2426 1667 19745 16880 27396 18359 3921 14172 16719 11157 5439 72
778 22603 15303 12418 32497 2415 10317 5901 9395 11433 6401 3959 5202 19850 19469 9790 3970 784 18500 10552 8524 16615 7852 241 8471 7452
19855 17918 7990 10572 4447 520 9140 12528 12622 4985 12319 4028 33981 12132 16259 17476 2976 1041 19195 19830 16285 4806 4471 9457 2864 2407
 5
86 90 69 72 2 96 71 47 88 34 45 46 89 34 31 38 122 84 41 101 14 4 76 83 7 82
19771 12979 18912 10432 10544 12928 11856 3047 10527 16213 8100 80 2856 5573 2311 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6219 29385 25311 7119 12232 2645 5242 1705 5000 1537 6096 10711 4917 20074 21670 15364 29735 18094 3929 3705 7169 6159 18683 21588 9092 4570
6878 4239 22677 1759 375 9563 3445 1349 19857 11401 6997 6498 19335 3848 2426 1667 19745 16880 27396 18359 3921 14172 16719 11157 5439 72
778 22603 15303 12418 32497 2415 10317 5901 9395 11433 6401 3959 5202 19850 19469 2289 3970 784 18500 10552 8524 16615 7852 241 8471 7452
19855 17918 7990 10572 4447 520 9140 12528 12622 4985 12319 4028 33981 12132 16259 17476 2976 1041 19195 19830 16285 4806 4471 9457 2864 2407
 5
86 90 69 72 2 96 71 47 88 34 45 46 89 34 31 38 122 84 41 101 14 4 76 83 7 82
19771 12979 18912 10432 10544 12928 11856 3047 10527 16213 8100 80 2856 5573 2311 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6219 29385 25311 7119 12232 2645 5242 1705 5000 1537 6096 10711 4917 20074 21670 15364 29735 18094 3929 3705 7169 6159 18683 21588 9092 4570
6878 4239 22677 1759 375 9563 3445 1349 19857 11401 6997 6498 19335 3848 2426 1667 19745 28285 27396 18359 3921 14172 16719 11157 5439 72
778 22603 15303 12418 32497 2415 10317 5901 9395 11433 6401 3959 5202 19850 19469 2289 3970 784 18500 10552 8524 16615 7852 241 8471 7452
19855 17918 7990 10572 4447 520 9140 12528 12622 4985 12319 4028 33981 12132 16259 17476 2976 1041 19195 19830 16285 4806 4471 9457 2864 2407

1
17
3
14
13
 1
17
3
2
13
 1
17
19
2
13
 1
24
19
2
13
 1
24
19
2
13
 1
3
19
2
13
 1
2
19
2
13
 1
2
19
5
13
 1
17
19
5
13
 1
17
18
5
13

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

```c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>

int main(){
  srand((unsigned int)time(NULL)); 
  int D,M=365*500;
  int c[30];
  int s[370][30];
  int t[370];
  int last[30];
  int ans_max=0,ans=0;
  int old_t,old_d;
  
  scanf("%d",&D);
  for(int i=1;i<=26;i++)
    scanf("%d",c+i);
  for(int i=1;i<=D;i++)
   for(int j=1;j<=26;j++)
     scanf("%d",&s[i][j]);
  
  for(int i=1;i<=D;i++)
    t[i]=rand()%26+1;
  
  ans_max=0;
  for(int k=1;k<=26;k++)
    last[k]=0;
  for(int d=1;d<=D;d++){
    ans_max+=s[d][t[d]];
    last[t[d]]=d;
    for(int j=1;j<=26;j++){
      ans_max-=c[j]*(d-last[j]);
    }
  }
  
  for(int i=1;i<=M;i++){
    ans=0;
    old_d=i%D+1;
    old_t=t[old_d];
    t[old_d]=rand()%26+1;
    for(int k=1;k<=26;k++)
      last[k]=0;
    for(int d=1;d<=D;d++){
      ans+=s[d][t[d]];
      last[t[d]]=d;
      for(int j=1;j<=26;j++){
        ans-=c[j]*(d-last[j]);
      }
    }
    if(ans<ans_max){
      t[old_d]=old_t;
    }else{
      ans_max=ans;
    }
  }
  
  for(int i=1;i<=D;i++)
    printf("%d\n",t[i]);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-45056(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1184, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, %edi
	call	time@PLT
	movl	%eax, %edi
	call	srand@PLT
	movl	$182500, -46172(%rbp)
	movl	$0, -46228(%rbp)
	movl	$0, -46224(%rbp)
	leaq	-46232(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -46220(%rbp)
	jmp	.L2
.L3:
	movl	-46220(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-46160(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -46220(%rbp)
.L2:
	cmpl	$26, -46220(%rbp)
	jle	.L3
	movl	$1, -46216(%rbp)
	jmp	.L4
.L7:
	movl	$1, -46212(%rbp)
	jmp	.L5
.L6:
	leaq	-44416(%rbp), %rcx
	movl	-46212(%rbp), %eax
	movslq	%eax, %rsi
	movl	-46216(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -46212(%rbp)
.L5:
	cmpl	$26, -46212(%rbp)
	jle	.L6
	addl	$1, -46216(%rbp)
.L4:
	movl	-46232(%rbp), %eax
	cmpl	%eax, -46216(%rbp)
	jle	.L7
	movl	$1, -46208(%rbp)
	jmp	.L8
.L9:
	call	rand@PLT
	movslq	%eax, %rdx
	imulq	$1321528399, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$3, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$26, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	addl	$1, %edx
	movl	-46208(%rbp), %eax
	cltq
	movl	%edx, -45904(%rbp,%rax,4)
	addl	$1, -46208(%rbp)
.L8:
	movl	-46232(%rbp), %eax
	cmpl	%eax, -46208(%rbp)
	jle	.L9
	movl	$0, -46228(%rbp)
	movl	$1, -46204(%rbp)
	jmp	.L10
.L11:
	movl	-46204(%rbp), %eax
	cltq
	movl	$0, -46032(%rbp,%rax,4)
	addl	$1, -46204(%rbp)
.L10:
	cmpl	$26, -46204(%rbp)
	jle	.L11
	movl	$1, -46200(%rbp)
	jmp	.L12
.L15:
	movl	-46200(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movl	-46200(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-44416(%rbp,%rax,4), %eax
	addl	%eax, -46228(%rbp)
	movl	-46200(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	cltq
	movl	-46200(%rbp), %edx
	movl	%edx, -46032(%rbp,%rax,4)
	movl	$1, -46196(%rbp)
	jmp	.L13
.L14:
	movl	-46196(%rbp), %eax
	cltq
	movl	-46160(%rbp,%rax,4), %edx
	movl	-46196(%rbp), %eax
	cltq
	movl	-46032(%rbp,%rax,4), %ecx
	movl	-46200(%rbp), %eax
	subl	%ecx, %eax
	imull	%edx, %eax
	subl	%eax, -46228(%rbp)
	addl	$1, -46196(%rbp)
.L13:
	cmpl	$26, -46196(%rbp)
	jle	.L14
	addl	$1, -46200(%rbp)
.L12:
	movl	-46232(%rbp), %eax
	cmpl	%eax, -46200(%rbp)
	jle	.L15
	movl	$1, -46192(%rbp)
	jmp	.L16
.L25:
	movl	$0, -46224(%rbp)
	movl	-46232(%rbp), %ecx
	movl	-46192(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	addl	$1, %eax
	movl	%eax, -46168(%rbp)
	movl	-46168(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	movl	%eax, -46164(%rbp)
	call	rand@PLT
	movslq	%eax, %rdx
	imulq	$1321528399, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$3, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$26, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	addl	$1, %edx
	movl	-46168(%rbp), %eax
	cltq
	movl	%edx, -45904(%rbp,%rax,4)
	movl	$1, -46188(%rbp)
	jmp	.L17
.L18:
	movl	-46188(%rbp), %eax
	cltq
	movl	$0, -46032(%rbp,%rax,4)
	addl	$1, -46188(%rbp)
.L17:
	cmpl	$26, -46188(%rbp)
	jle	.L18
	movl	$1, -46184(%rbp)
	jmp	.L19
.L22:
	movl	-46184(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movl	-46184(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-44416(%rbp,%rax,4), %eax
	addl	%eax, -46224(%rbp)
	movl	-46184(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	cltq
	movl	-46184(%rbp), %edx
	movl	%edx, -46032(%rbp,%rax,4)
	movl	$1, -46180(%rbp)
	jmp	.L20
.L21:
	movl	-46180(%rbp), %eax
	cltq
	movl	-46160(%rbp,%rax,4), %edx
	movl	-46180(%rbp), %eax
	cltq
	movl	-46032(%rbp,%rax,4), %ecx
	movl	-46184(%rbp), %eax
	subl	%ecx, %eax
	imull	%edx, %eax
	subl	%eax, -46224(%rbp)
	addl	$1, -46180(%rbp)
.L20:
	cmpl	$26, -46180(%rbp)
	jle	.L21
	addl	$1, -46184(%rbp)
.L19:
	movl	-46232(%rbp), %eax
	cmpl	%eax, -46184(%rbp)
	jle	.L22
	movl	-46224(%rbp), %eax
	cmpl	-46228(%rbp), %eax
	jge	.L23
	movl	-46168(%rbp), %eax
	cltq
	movl	-46164(%rbp), %edx
	movl	%edx, -45904(%rbp,%rax,4)
	jmp	.L24
.L23:
	movl	-46224(%rbp), %eax
	movl	%eax, -46228(%rbp)
.L24:
	addl	$1, -46192(%rbp)
.L16:
	movl	-46192(%rbp), %eax
	cmpl	-46172(%rbp), %eax
	jle	.L25
	movl	$1, -46176(%rbp)
	jmp	.L26
.L27:
	movl	-46176(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -46176(%rbp)
.L26:
	movl	-46232(%rbp), %eax
	cmpl	%eax, -46176(%rbp)
	jle	.L27
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-45056(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1184, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, %edi
	call	time@PLT
	movl	%eax, %edi
	call	srand@PLT
	movl	$182500, -46172(%rbp)
	movl	$0, -46228(%rbp)
	movl	$0, -46224(%rbp)
	leaq	-46232(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -46220(%rbp)
	jmp	.L2
.L3:
	movl	-46220(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-46160(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -46220(%rbp)
.L2:
	cmpl	$26, -46220(%rbp)
	jle	.L3
	movl	$1, -46216(%rbp)
	jmp	.L4
.L7:
	movl	$1, -46212(%rbp)
	jmp	.L5
.L6:
	leaq	-44416(%rbp), %rcx
	movl	-46212(%rbp), %eax
	movslq	%eax, %rsi
	movl	-46216(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -46212(%rbp)
.L5:
	cmpl	$26, -46212(%rbp)
	jle	.L6
	addl	$1, -46216(%rbp)
.L4:
	movl	-46232(%rbp), %eax
	cmpl	%eax, -46216(%rbp)
	jle	.L7
	movl	$1, -46208(%rbp)
	jmp	.L8
.L9:
	call	rand@PLT
	movslq	%eax, %rdx
	imulq	$1321528399, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$3, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$26, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	addl	$1, %edx
	movl	-46208(%rbp), %eax
	cltq
	movl	%edx, -45904(%rbp,%rax,4)
	addl	$1, -46208(%rbp)
.L8:
	movl	-46232(%rbp), %eax
	cmpl	%eax, -46208(%rbp)
	jle	.L9
	movl	$0, -46228(%rbp)
	movl	$1, -46204(%rbp)
	jmp	.L10
.L11:
	movl	-46204(%rbp), %eax
	cltq
	movl	$0, -46032(%rbp,%rax,4)
	addl	$1, -46204(%rbp)
.L10:
	cmpl	$26, -46204(%rbp)
	jle	.L11
	movl	$1, -46200(%rbp)
	jmp	.L12
.L15:
	movl	-46200(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movl	-46200(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-44416(%rbp,%rax,4), %eax
	addl	%eax, -46228(%rbp)
	movl	-46200(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	cltq
	movl	-46200(%rbp), %edx
	movl	%edx, -46032(%rbp,%rax,4)
	movl	$1, -46196(%rbp)
	jmp	.L13
.L14:
	movl	-46196(%rbp), %eax
	cltq
	movl	-46160(%rbp,%rax,4), %edx
	movl	-46196(%rbp), %eax
	cltq
	movl	-46032(%rbp,%rax,4), %ecx
	movl	-46200(%rbp), %eax
	subl	%ecx, %eax
	imull	%edx, %eax
	subl	%eax, -46228(%rbp)
	addl	$1, -46196(%rbp)
.L13:
	cmpl	$26, -46196(%rbp)
	jle	.L14
	addl	$1, -46200(%rbp)
.L12:
	movl	-46232(%rbp), %eax
	cmpl	%eax, -46200(%rbp)
	jle	.L15
	movl	$1, -46192(%rbp)
	jmp	.L16
.L25:
	movl	$0, -46224(%rbp)
	movl	-46232(%rbp), %ecx
	movl	-46192(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	addl	$1, %eax
	movl	%eax, -46168(%rbp)
	movl	-46168(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	movl	%eax, -46164(%rbp)
	call	rand@PLT
	movslq	%eax, %rdx
	imulq	$1321528399, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$3, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$26, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	addl	$1, %edx
	movl	-46168(%rbp), %eax
	cltq
	movl	%edx, -45904(%rbp,%rax,4)
	movl	$1, -46188(%rbp)
	jmp	.L17
.L18:
	movl	-46188(%rbp), %eax
	cltq
	movl	$0, -46032(%rbp,%rax,4)
	addl	$1, -46188(%rbp)
.L17:
	cmpl	$26, -46188(%rbp)
	jle	.L18
	movl	$1, -46184(%rbp)
	jmp	.L19
.L22:
	movl	-46184(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movl	-46184(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-44416(%rbp,%rax,4), %eax
	addl	%eax, -46224(%rbp)
	movl	-46184(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	cltq
	movl	-46184(%rbp), %edx
	movl	%edx, -46032(%rbp,%rax,4)
	movl	$1, -46180(%rbp)
	jmp	.L20
.L21:
	movl	-46180(%rbp), %eax
	cltq
	movl	-46160(%rbp,%rax,4), %edx
	movl	-46180(%rbp), %eax
	cltq
	movl	-46032(%rbp,%rax,4), %ecx
	movl	-46184(%rbp), %eax
	subl	%ecx, %eax
	imull	%edx, %eax
	subl	%eax, -46224(%rbp)
	addl	$1, -46180(%rbp)
.L20:
	cmpl	$26, -46180(%rbp)
	jle	.L21
	addl	$1, -46184(%rbp)
.L19:
	movl	-46232(%rbp), %eax
	cmpl	%eax, -46184(%rbp)
	jle	.L22
	movl	-46224(%rbp), %eax
	cmpl	-46228(%rbp), %eax
	jge	.L23
	movl	-46168(%rbp), %eax
	cltq
	movl	-46164(%rbp), %edx
	movl	%edx, -45904(%rbp,%rax,4)
	jmp	.L24
.L23:
	movl	-46224(%rbp), %eax
	movl	%eax, -46228(%rbp)
.L24:
	addl	$1, -46192(%rbp)
.L16:
	movl	-46192(%rbp), %eax
	cmpl	-46172(%rbp), %eax
	jle	.L25
	movl	$1, -46176(%rbp)
	jmp	.L26
.L27:
	movl	-46176(%rbp), %eax
	cltq
	movl	-45904(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -46176(%rbp)
.L26:
	movl	-46232(%rbp), %eax
	cmpl	%eax, -46176(%rbp)
	jle	.L27
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
