CSES - Datatähti 2025 alku - Results
Submission details
Task:Niitty
Sender:a256
Submission time:2024-10-31 01:12:31 +0200
Language:Assembly
Status:READY
Result:100
Feedback
groupverdictscore
#1ACCEPTED4
#2ACCEPTED6
#3ACCEPTED10
#4ACCEPTED13
#5ACCEPTED25
#6ACCEPTED42
Test results
testverdicttimegroup
#1ACCEPTED0.00 s1, 2, 3, 4, 5, 6details
#2ACCEPTED0.00 s1, 2, 3, 4, 5, 6details
#3ACCEPTED0.00 s1, 2, 3, 4, 5, 6details
#4ACCEPTED0.00 s1, 2, 3, 4, 5, 6details
#5ACCEPTED0.00 s1, 2, 3, 4, 5, 6details
#6ACCEPTED0.00 s2, 3, 4, 5, 6details
#7ACCEPTED0.00 s2, 3, 4, 5, 6details
#8ACCEPTED0.00 s2, 3, 4, 5, 6details
#9ACCEPTED0.00 s2, 3, 4, 5, 6details
#10ACCEPTED0.00 s3, 4, 5, 6details
#11ACCEPTED0.00 s3, 4, 5, 6details
#12ACCEPTED0.00 s3, 4, 5, 6details
#13ACCEPTED0.00 s3, 4, 5, 6details
#14ACCEPTED0.01 s4, 5, 6details
#15ACCEPTED0.01 s4, 5, 6details
#16ACCEPTED0.01 s4, 5, 6details
#17ACCEPTED0.01 s4, 5, 6details
#18ACCEPTED0.05 s5, 6details
#19ACCEPTED0.05 s5, 6details
#20ACCEPTED0.06 s5, 6details
#21ACCEPTED0.05 s5, 6details
#22ACCEPTED0.74 s6details
#23ACCEPTED0.74 s6details
#24ACCEPTED0.74 s6details
#25ACCEPTED0.74 s6details

Compiler report

input/code.asm:806: warning: byte data exceeds bounds [-w+number-overflow]

Code

default rel

global _start: function
global r
global R
global BS
global O
global M
global z
global t
global C
global n
global K
global B


SECTION .text   align=16 exec                           

_start: 
        push    rbp                                     
        xor     eax, eax                                
        lea     rsi, [rel B]                            
        mov     edx, 350600                             
        mov     edi, eax                                
        mov     rbp, rsp                                
        push    r15                                     
        push    r14                                     
        push    r13                                     
        push    r12                                     
        push    rbx                                     
        and     rsp, 0FFFFFFFFFFFFFFE0H                 
        sub     rsp, 200                                
        syscall                                         
        movsx   ecx, byte [rel B]                       
        mov     qword [rel BS], rax                     
        mov     edx, ecx                                
        sub     ecx, 48                                 
        cmp     ecx, 9                                  
        ja      ?_062                                   
        xor     r12d, r12d                              
        xor     r8d, r8d                                
        lea     r13, [rsi+1H]                           
?_001:  movsx   r14d, byte [r13+r12]                    
        sub     edx, 48                                 
        lea     r8d, [r8+r8*4]                          
        mov     r11, r12                                
        movsx   r9d, dl                                 
        lea     r10, [r12+1H]                           
        mov     r15d, r14d                              
        sub     r14d, 48                                
        lea     r8d, [r9+r8*2]                          
        cmp     r14d, 9                                 
        ja      ?_002                                   
        movsx   ecx, byte [r13+r12+1H]                  
        sub     r15d, 48                                
        lea     r11d, [r8+r8*4]                         
        lea     rbx, [r12+2H]                           
        movsx   edi, r15b                               
        mov     edx, ecx                                
        sub     ecx, 48                                 
        lea     r8d, [rdi+r11*2]                        
        mov     r11, r10                                
        cmp     ecx, 9                                  
        ja      ?_002                                   
        movsx   r14d, byte [r13+r12+2H]                 
        sub     edx, 48                                 
        lea     r8d, [r8+r8*4]                          
        mov     r11, rbx                                
        movsx   r9d, dl                                 
        lea     r10, [r12+3H]                           
        mov     r15d, r14d                              
        sub     r14d, 48                                
        lea     r8d, [r9+r8*2]                          
        cmp     r14d, 9                                 
        ja      ?_002                                   
        movsx   ecx, byte [r13+r12+3H]                  
        sub     r15d, 48                                
        lea     r11d, [r8+r8*4]                         
        add     r12, 4                                  
        movsx   edi, r15b                               
        mov     edx, ecx                                
        sub     ecx, 48                                 
        lea     r8d, [rdi+r11*2]                        
        mov     r11, r10                                
        cmp     ecx, 9                                  
        jbe     ?_001                                   
?_002:  vpxor   xmm0, xmm0, xmm0                        
        mov     dword [rel n], r8d                      
        mov     ebx, r8d                                
        mov     r12d, r8d                               
        mov     qword [rsp+0B8H], 0                     
        add     r11d, 2                                 
        vmovdqu yword [rsp+58H], ymm0                   
        vmovdqu yword [rsp+78H], ymm0                   
        vmovdqu yword [rsp+98H], ymm0                   
        test    r8d, r8d                                
        jle     ?_066                                   
        lea     r9, [rel t]                             
        xor     ebx, ebx                                
        xor     edi, edi                                
        mov     r10d, 1                                 





ALIGN   16
?_003:  xor     r15d, r15d                              





ALIGN   16
?_004:  movsxd  r13, r11d                               
        cmp     r13, rax                                
        jge     ?_055                                   
?_005:  lea     r14d, [r11+1H]                          
        movsxd  rcx, r11d                               
        movsxd  r13, r14d                               
        mov     r11d, r14d                              
?_006:  movsx   r14d, byte [rsi+rcx]                    
        sub     r14d, 65                                
        movsxd  r8, r14d                                
        mov     edx, dword [rsp+r8*4+58H]               
        test    edx, edx                                
        je      ?_054                                   
        dec     edx                                     
        shlx    ecx, r10d, edx                          
        mov     dword [r9+r15*4], ecx                   
        inc     r15                                     
        or      dword [rel C], ecx                      
        cmp     r12d, r15d                              
        jg      ?_004                                   
?_007:  inc     r11d                                    
        cmp     r13, rax                                
        jl      ?_008                                   
        mov     r11d, r12d                              
        inc     r12d                                    
        mov     eax, edi                                
        sub     r11d, ebx                               
        dec     r11d                                    
        imul    r11d, r12d                              
        inc     r11d                                    
        movsxd  rdx, r11d                               
        syscall                                         
        mov     qword [rel BS], rax                     
        mov     r12d, dword [rel n]                     
        mov     r11d, 1                                 
?_008:  inc     ebx                                     
        add     r9, 2000                                
        cmp     ebx, r12d                               
        jl      ?_003                                   
        lea     esi, [r12+1H]                           
        mov     r15d, dword [rel K]                     
        mov     ebx, r12d                               
        imul    esi, r12d                               
        mov     eax, esi                                
        shr     eax, 31                                 
        add     eax, esi                                
        sar     eax, 1                                  
        cdqe                                            
        imul    rax, rax                                
        cmp     r15d, 25                                
        jg      ?_064                                   
?_009:  mov     r9d, 25                                 
        mov     edi, 26                                 
        sub     r9d, r15d                               
        sub     edi, r15d                               
        cmp     r9d, 6                                  
        jbe     ?_065                                   
        mov     r10d, edi                               
        vmovd   xmm1, r15d                              
        mov     r13d, 8                                 
        mov     ecx, 1                                  
        shr     r10d, 3                                 
        vpbroadcastd ymm2, xmm1                         
        vmovd   xmm3, r13d                              
        xor     r8d, r8d                                
        vmovd   xmm4, ecx                               
        vpaddd  ymm1, ymm2, yword [rel .LC0]            
        vpxor   xmm0, xmm0, xmm0                        
        mov     r14d, r10d                              
        vpbroadcastd ymm5, xmm3                         
        vpbroadcastd ymm6, xmm4                         
        and     r14d, 07H                               
        je      ?_016                                   
        cmp     r14d, 1                                 
        je      ?_015                                   
        cmp     r14d, 2                                 
        jz      ?_014                                   
        cmp     r14d, 3                                 
        jz      ?_013                                   
        cmp     r14d, 4                                 
        jz      ?_012                                   
        cmp     r14d, 5                                 
        jz      ?_011                                   
        cmp     r14d, 6                                 
        jne     ?_061                                   
?_010:  vmovdqa ymm8, ymm1                              
        inc     r8d                                     
        vpaddd  ymm1, ymm1, ymm5                        
        vpsllvd ymm9, ymm6, ymm8                        
        vpor    ymm0, ymm0, ymm9                        
?_011:  vmovdqa ymm10, ymm1                             
        inc     r8d                                     
        vpaddd  ymm1, ymm1, ymm5                        
        vpsllvd ymm11, ymm6, ymm10                      
        vpor    ymm0, ymm0, ymm11                       
?_012:  vmovdqa ymm12, ymm1                             
        inc     r8d                                     
        vpaddd  ymm1, ymm1, ymm5                        
        vpsllvd ymm13, ymm6, ymm12                      
        vpor    ymm0, ymm0, ymm13                       
?_013:  vmovdqa ymm14, ymm1                             
        inc     r8d                                     
        vpaddd  ymm1, ymm1, ymm5                        
        vpsllvd ymm15, ymm6, ymm14                      
        vpor    ymm0, ymm0, ymm15                       
?_014:  vmovdqa ymm2, ymm1                              
        inc     r8d                                     
        vpaddd  ymm1, ymm1, ymm5                        
        vpsllvd ymm3, ymm6, ymm2                        
        vpor    ymm0, ymm0, ymm3                        
?_015:  vmovdqa ymm4, ymm1                              
        inc     r8d                                     
        vpaddd  ymm1, ymm1, ymm5                        
        vpsllvd ymm7, ymm6, ymm4                        
        vpor    ymm0, ymm0, ymm7                        
        cmp     r10d, r8d                               
        jz      ?_017                                   
?_016:  vpaddd  ymm8, ymm1, ymm5                        
        vpsllvd ymm9, ymm6, ymm1                        
        add     r8d, 8                                  
        vpaddd  ymm11, ymm8, ymm5                       
        vpsllvd ymm12, ymm6, ymm8                       
        vpor    ymm10, ymm0, ymm9                       
        vpsllvd ymm15, ymm6, ymm11                      
        vpaddd  ymm14, ymm11, ymm5                      
        vpor    ymm13, ymm10, ymm12                     
        vpsllvd ymm4, ymm6, ymm14                       
        vpaddd  ymm3, ymm14, ymm5                       
        vpor    ymm2, ymm13, ymm15                      
        vpsllvd ymm1, ymm6, ymm3                        
        vpaddd  ymm8, ymm3, ymm5                        
        vpaddd  ymm9, ymm8, ymm5                        
        vpsllvd ymm10, ymm6, ymm8                       
        vpor    ymm7, ymm2, ymm4                        
        vpor    ymm0, ymm7, ymm1                        
        vpsllvd ymm13, ymm6, ymm9                       
        vpaddd  ymm12, ymm9, ymm5                       
        vpor    ymm11, ymm0, ymm10                      
        vpsllvd ymm15, ymm6, ymm12                      
        vpaddd  ymm1, ymm12, ymm5                       
        vpor    ymm14, ymm11, ymm13                     
        vpor    ymm0, ymm14, ymm15                      
        cmp     r10d, r8d                               
        jnz     ?_016                                   
?_017:  vextracti128 xmm5, ymm0, 01H                    
        mov     r11d, edi                               
        vpor    xmm6, xmm5, xmm0                        
        and     r11d, 0FFFFFFF8H                        
        vpsrldq xmm2, xmm6, 8                           
        add     r15d, r11d                              
        and     edi, 07H                                
        vpor    xmm3, xmm6, xmm2                        
        vpsrldq xmm4, xmm3, 4                           
        vpor    xmm7, xmm3, xmm4                        
        vmovd   dword [rsp-18H], xmm7                   
        je      ?_019                                   
?_018:  mov     edx, 1                                  
        lea     esi, [r15+1H]                           
        shlx    r12d, edx, r15d                         
        or      dword [rsp-18H], r12d                   
        mov     edi, dword [rsp-18H]                    
        cmp     r15d, 25                                
        jz      ?_019                                   
        shlx    r9d, edx, esi                           
        or      edi, r9d                                
        lea     r10d, [r15+2H]                          
        mov     dword [rsp-18H], edi                    
        cmp     r15d, 24                                
        jz      ?_019                                   
        shlx    r13d, edx, r10d                         
        or      edi, r13d                               
        lea     ecx, [r15+3H]                           
        mov     dword [rsp-18H], edi                    
        cmp     r15d, 23                                
        jz      ?_019                                   
        shlx    r14d, edx, ecx                          
        or      edi, r14d                               
        lea     r8d, [r15+4H]                           
        mov     dword [rsp-18H], edi                    
        cmp     r15d, 22                                
        jz      ?_019                                   
        shlx    r11d, edx, r8d                          
        or      edi, r11d                               
        lea     edx, [r15+5H]                           
        mov     dword [rsp-18H], edi                    
        cmp     r15d, 21                                
        jz      ?_019                                   
        bts     edi, edx                                
        add     r15d, 6                                 
        mov     r12d, edi                               
        bts     r12d, r15d                              
        cmp     r15d, 26                                
        cmovne  edi, r12d                               
        mov     dword [rsp-18H], edi                    
?_019:  mov     r10, qword [rel R]                      
        mov     r13d, ebx                               
        mov     rsi, r10                                
        test    ebx, ebx                                
        jle     ?_051                                   
        mov     r11d, r13d                              
        mov     ecx, dword [rsp-18H]                    
        lea     ebx, [rbx-1H]                           
        movsxd  r15, r13d                               
        shr     r11d, 3                                 
        lea     rsi, [rel z]                            
        mov     r12d, 1                                 
        mov     dword [rsp-14H], ebx                    
        mov     edx, r11d                               
        lea     r9, [rsi+r15*4]                         
        vmovd   xmm8, ecx                               
        vmovdqa xmm15, oword [rel .LC3]                 
        shl     rdx, 5                                  
        vmovd   xmm1, ecx                               
        lea     r14, [rel t]                            
        mov     qword [rsp+10H], r9                     
        vmovd   xmm0, r12d                              
        mov     qword [rsp], rdx                        
        mov     rcx, rax                                
        xor     edi, edi                                
        xor     r8d, r8d                                
        vpbroadcastd ymm5, xmm8                         
        vpbroadcastd xmm6, xmm1                         
        mov     rdx, r10                                
        vpbroadcastd xmm3, xmm0                         
        mov     eax, r13d                               
        mov     r9, r14                                 





ALIGN   16
?_020:  mov     dword [rsp+2CH], 0                      
        mov     r10d, dword [rsp+2CH]                   
        cmp     r10d, 499                               
        jg      ?_022                                   
?_021:  movsxd  r13, dword [rsp+2CH]                    
        mov     ebx, dword [rsp+2CH]                    
        lea     r14, [rel z]                            
        inc     ebx                                     
        mov     dword [r14+r13*4], 0                    
        mov     dword [rsp+2CH], ebx                    
        mov     r15d, dword [rsp+2CH]                   
        cmp     r15d, 499                               
        jg      ?_022                                   
        movsxd  rsi, dword [rsp+2CH]                    
        mov     r12d, dword [rsp+2CH]                   
        lea     r11, [rel z]                            
        inc     r12d                                    
        mov     dword [r11+rsi*4], 0                    
        mov     dword [rsp+2CH], r12d                   
        mov     r10d, dword [rsp+2CH]                   
        cmp     r10d, 499                               
        jg      ?_022                                   
        movsxd  r13, dword [rsp+2CH]                    
        mov     r14d, dword [rsp+2CH]                   
        inc     r14d                                    
        mov     dword [r11+r13*4], 0                    
        mov     dword [rsp+2CH], r14d                   
        mov     ebx, dword [rsp+2CH]                    
        cmp     ebx, 499                                
        jg      ?_022                                   
        movsxd  r15, dword [rsp+2CH]                    
        mov     esi, dword [rsp+2CH]                    
        inc     esi                                     
        mov     dword [r11+r15*4], 0                    
        mov     dword [rsp+2CH], esi                    
        mov     r12d, dword [rsp+2CH]                   
        cmp     r12d, 499                               
        jg      ?_022                                   
        movsxd  r10, dword [rsp+2CH]                    
        mov     r13d, dword [rsp+2CH]                   
        inc     r13d                                    
        mov     dword [r11+r10*4], 0                    
        mov     dword [rsp+2CH], r13d                   
        mov     r14d, dword [rsp+2CH]                   
        cmp     r14d, 499                               
        jg      ?_022                                   
        movsxd  rbx, dword [rsp+2CH]                    
        mov     r15d, dword [rsp+2CH]                   
        inc     r15d                                    
        mov     dword [r11+rbx*4], 0                    
        mov     dword [rsp+2CH], r15d                   
        mov     esi, dword [rsp+2CH]                    
        cmp     esi, 499                                
        jg      ?_022                                   
        movsxd  r12, dword [rsp+2CH]                    
        mov     r10d, dword [rsp+2CH]                   
        inc     r10d                                    
        mov     dword [r11+r12*4], 0                    
        mov     dword [rsp+2CH], r10d                   
        mov     r13d, dword [rsp+2CH]                   
        cmp     r13d, 499                               
        jg      ?_022                                   
        movsxd  r14, dword [rsp+2CH]                    
        mov     dword [r11+r14*4], 0                    
        mov     r11d, dword [rsp+2CH]                   
        inc     r11d                                    
        mov     dword [rsp+2CH], r11d                   
        mov     ebx, dword [rsp+2CH]                    
        cmp     ebx, 499                                
        jle     ?_021                                   
?_022:  mov     dword [rsp+30H], 0                      
        mov     r15d, dword [rsp+30H]                   
        cmp     r15d, 499                               
        jg      ?_024                                   
?_023:  movsxd  rsi, dword [rsp+30H]                    
        mov     r10d, dword [rsp+30H]                   
        lea     r12, [rel M]                            
        inc     r10d                                    
        mov     dword [r12+rsi*4], 0                    
        mov     dword [rsp+30H], r10d                   
        mov     r13d, dword [rsp+30H]                   
        cmp     r13d, 499                               
        jg      ?_024                                   
        movsxd  r14, dword [rsp+30H]                    
        mov     ebx, dword [rsp+30H]                    
        lea     r11, [rel M]                            
        inc     ebx                                     
        mov     dword [r11+r14*4], 0                    
        mov     dword [rsp+30H], ebx                    
        mov     r15d, dword [rsp+30H]                   
        cmp     r15d, 499                               
        jg      ?_024                                   
        movsxd  rsi, dword [rsp+30H]                    
        mov     r12d, dword [rsp+30H]                   
        inc     r12d                                    
        mov     dword [r11+rsi*4], 0                    
        mov     dword [rsp+30H], r12d                   
        mov     r10d, dword [rsp+30H]                   
        cmp     r10d, 499                               
        jg      ?_024                                   
        movsxd  r13, dword [rsp+30H]                    
        mov     r14d, dword [rsp+30H]                   
        inc     r14d                                    
        mov     dword [r11+r13*4], 0                    
        mov     dword [rsp+30H], r14d                   
        mov     ebx, dword [rsp+30H]                    
        cmp     ebx, 499                                
        jg      ?_024                                   
        movsxd  r15, dword [rsp+30H]                    
        mov     esi, dword [rsp+30H]                    
        inc     esi                                     
        mov     dword [r11+r15*4], 0                    
        mov     dword [rsp+30H], esi                    
        mov     r12d, dword [rsp+30H]                   
        cmp     r12d, 499                               
        jg      ?_024                                   
        movsxd  r10, dword [rsp+30H]                    
        mov     r13d, dword [rsp+30H]                   
        inc     r13d                                    
        mov     dword [r11+r10*4], 0                    
        mov     dword [rsp+30H], r13d                   
        mov     r14d, dword [rsp+30H]                   
        cmp     r14d, 499                               
        jg      ?_024                                   
        movsxd  rbx, dword [rsp+30H]                    
        mov     r15d, dword [rsp+30H]                   
        inc     r15d                                    
        mov     dword [r11+rbx*4], 0                    
        mov     dword [rsp+30H], r15d                   
        mov     esi, dword [rsp+30H]                    
        cmp     esi, 499                                
        jg      ?_024                                   
        movsxd  r12, dword [rsp+30H]                    
        mov     dword [r11+r12*4], 0                    
        mov     r11d, dword [rsp+30H]                   
        inc     r11d                                    
        mov     dword [rsp+30H], r11d                   
        mov     r10d, dword [rsp+30H]                   
        cmp     r10d, 499                               
        jle     ?_023                                   





ALIGN   16
?_024:  mov     dword [rsp+34H], 0                      
        mov     r13d, dword [rsp+34H]                   
        cmp     r13d, 499                               
        jg      ?_026                                   
?_025:  movsxd  r14, dword [rsp+34H]                    
        mov     r15d, dword [rsp+34H]                   
        lea     rbx, [rel O]                            
        inc     r15d                                    
        mov     dword [rbx+r14*4], 0                    
        mov     dword [rsp+34H], r15d                   
        mov     esi, dword [rsp+34H]                    
        cmp     esi, 499                                
        jg      ?_026                                   
        movsxd  r12, dword [rsp+34H]                    
        mov     r10d, dword [rsp+34H]                   
        lea     r11, [rel O]                            
        inc     r10d                                    
        mov     dword [r11+r12*4], 0                    
        mov     dword [rsp+34H], r10d                   
        mov     r13d, dword [rsp+34H]                   
        cmp     r13d, 499                               
        jg      ?_026                                   
        movsxd  r14, dword [rsp+34H]                    
        mov     ebx, dword [rsp+34H]                    
        inc     ebx                                     
        mov     dword [r11+r14*4], 0                    
        mov     dword [rsp+34H], ebx                    
        mov     r15d, dword [rsp+34H]                   
        cmp     r15d, 499                               
        jg      ?_026                                   
        movsxd  rsi, dword [rsp+34H]                    
        mov     r12d, dword [rsp+34H]                   
        inc     r12d                                    
        mov     dword [r11+rsi*4], 0                    
        mov     dword [rsp+34H], r12d                   
        mov     r10d, dword [rsp+34H]                   
        cmp     r10d, 499                               
        jg      ?_026                                   
        movsxd  r13, dword [rsp+34H]                    
        mov     r14d, dword [rsp+34H]                   
        inc     r14d                                    
        mov     dword [r11+r13*4], 0                    
        mov     dword [rsp+34H], r14d                   
        mov     ebx, dword [rsp+34H]                    
        cmp     ebx, 499                                
        jg      ?_026                                   
        movsxd  r15, dword [rsp+34H]                    
        mov     esi, dword [rsp+34H]                    
        inc     esi                                     
        mov     dword [r11+r15*4], 0                    
        mov     dword [rsp+34H], esi                    
        mov     r12d, dword [rsp+34H]                   
        cmp     r12d, 499                               
        jg      ?_026                                   
        movsxd  r10, dword [rsp+34H]                    
        mov     r13d, dword [rsp+34H]                   
        inc     r13d                                    
        mov     dword [r11+r10*4], 0                    
        mov     dword [rsp+34H], r13d                   
        mov     r14d, dword [rsp+34H]                   
        cmp     r14d, 499                               
        jg      ?_026                                   
        movsxd  rbx, dword [rsp+34H]                    
        mov     dword [r11+rbx*4], 0                    
        mov     r11d, dword [rsp+34H]                   
        inc     r11d                                    
        mov     dword [rsp+34H], r11d                   
        mov     r15d, dword [rsp+34H]                   
        cmp     r15d, 499                               
        jle     ?_025                                   





ALIGN   16
?_026:  mov     qword [rsp-50H], rdi                    
        xor     r10d, r10d                              
        vpxor   xmm2, xmm2, xmm2                        
        mov     qword [rsp-8H], r9                      
        mov     dword [rsp+0CH], r8d                    
        mov     dword [rsp-54H], r8d                    
        mov     qword [rsp-60H], rcx                    
        mov     qword [rsp-68H], rdi                    
        mov     qword [rsp-70H], r9                     




ALIGN   8
?_027:  cmp     dword [rsp-14H], 6                      
        jbe     ?_059                                   
?_028:  mov     r9, qword [rsp]                         
        mov     r13, qword [rsp-8H]                     
        lea     r12, [rel z]                            
        lea     rdi, [r9-20H]                           
        lea     r8, [r9+r13]                            
        shr     rdi, 5                                  
        inc     rdi                                     
        and     edi, 07H                                
        je      ?_035                                   
        cmp     rdi, 1                                  
        je      ?_034                                   
        cmp     rdi, 2                                  
        je      ?_033                                   
        cmp     rdi, 3                                  
        je      ?_032                                   
        cmp     rdi, 4                                  
        jz      ?_031                                   
        cmp     rdi, 5                                  
        jz      ?_030                                   
        cmp     rdi, 6                                  
        jz      ?_029                                   
        vmovdqu ymm9, yword [r13]                       
        lea     rcx, [rel z]                            
        lea     r13, [r13+20H]                          
        lea     r12, [rcx+20H]                          
        vpor    ymm10, ymm9, yword [rcx]                
        vpor    ymm11, ymm10, ymm5                      
        vmovdqa yword [rcx], ymm11                      
?_029:  vmovdqu ymm12, yword [r13]                      
        add     r12, 32                                 
        add     r13, 32                                 
        vpor    ymm13, ymm12, yword [r12-20H]           
        vpor    ymm14, ymm13, ymm5                      
        vmovdqa yword [r12-20H], ymm14                  
?_030:  vmovdqu ymm4, yword [r13]                       
        add     r12, 32                                 
        add     r13, 32                                 
        vpor    ymm7, ymm4, yword [r12-20H]             
        vpor    ymm8, ymm7, ymm5                        
        vmovdqa yword [r12-20H], ymm8                   
?_031:  vmovdqu ymm1, yword [r13]                       
        add     r12, 32                                 
        add     r13, 32                                 
        vpor    ymm0, ymm1, yword [r12-20H]             
        vpor    ymm9, ymm0, ymm5                        
        vmovdqa yword [r12-20H], ymm9                   
?_032:  vmovdqu ymm10, yword [r13]                      
        add     r12, 32                                 
        add     r13, 32                                 
        vpor    ymm11, ymm10, yword [r12-20H]           
        vpor    ymm12, ymm11, ymm5                      
        vmovdqa yword [r12-20H], ymm12                  
?_033:  vmovdqu ymm13, yword [r13]                      
        add     r12, 32                                 
        add     r13, 32                                 
        vpor    ymm14, ymm13, yword [r12-20H]           
        vpor    ymm4, ymm14, ymm5                       
        vmovdqa yword [r12-20H], ymm4                   
?_034:  vmovdqu ymm7, yword [r13]                       
        add     r13, 32                                 
        add     r12, 32                                 
        vpor    ymm8, ymm7, yword [r12-20H]             
        vpor    ymm1, ymm8, ymm5                        
        vmovdqa yword [r12-20H], ymm1                   
        cmp     r13, r8                                 
        je      ?_036                                   
?_035:  vmovdqu ymm0, yword [r13]                       
        add     r13, 256                                
        add     r12, 256                                
        vpor    ymm9, ymm0, yword [r12-100H]            
        vpor    ymm10, ymm9, ymm5                       
        vmovdqa yword [r12-100H], ymm10                 
        vmovdqu ymm11, yword [r13-0E0H]                 
        vpor    ymm12, ymm11, yword [r12-0E0H]          
        vpor    ymm13, ymm12, ymm5                      
        vmovdqa yword [r12-0E0H], ymm13                 
        vmovdqu ymm14, yword [r13-0C0H]                 
        vpor    ymm4, ymm14, yword [r12-0C0H]           
        vpor    ymm7, ymm4, ymm5                        
        vmovdqa yword [r12-0C0H], ymm7                  
        vmovdqu ymm8, yword [r13-0A0H]                  
        vpor    ymm1, ymm8, yword [r12-0A0H]            
        vpor    ymm0, ymm1, ymm5                        
        vmovdqa yword [r12-0A0H], ymm0                  
        vmovdqu ymm9, yword [r13-80H]                   
        vpor    ymm10, ymm9, yword [r12-80H]            
        vpor    ymm11, ymm10, ymm5                      
        vmovdqa yword [r12-80H], ymm11                  
        vmovdqu ymm12, yword [r13-60H]                  
        vpor    ymm13, ymm12, yword [r12-60H]           
        vpor    ymm14, ymm13, ymm5                      
        vmovdqa yword [r12-60H], ymm14                  
        vmovdqu ymm4, yword [r13-40H]                   
        vpor    ymm7, ymm4, yword [r12-40H]             
        vpor    ymm8, ymm7, ymm5                        
        vmovdqa yword [r12-40H], ymm8                   
        vmovdqu ymm1, yword [r13-20H]                   
        vpor    ymm0, ymm1, yword [r12-20H]             
        vpor    ymm9, ymm0, ymm5                        
        vmovdqa yword [r12-20H], ymm9                   
        cmp     r13, r8                                 
        jne     ?_035                                   
?_036:  mov     r11d, eax                               
        and     r11d, 0FFFFFFF8H                        
        mov     r14d, r11d                              
        cmp     r11d, eax                               
        je      ?_039                                   
?_037:  mov     r15d, eax                               
        sub     r15d, r14d                              
        lea     ebx, [r15-1H]                           
        cmp     ebx, 2                                  
        jbe     ?_038                                   
        lea     r9, [rel z]                             
        mov     rdi, qword [rsp-50H]                    
        mov     ecx, r15d                               
        lea     rsi, [rel t]                            
        lea     r8, [r9+r14*4]                          
        and     ecx, 0FFFFFFFCH                         
        vpor    xmm10, xmm6, oword [r8]                 
        add     r14, rdi                                
        add     r11d, ecx                               
        and     r15d, 03H                               
        vpor    xmm11, xmm10, oword [rsi+r14*4]         
        vmovdqa oword [r8], xmm11                       
        jz      ?_039                                   
?_038:  movsxd  r13, dword [rsp+0CH]                    
        movsxd  r12, r11d                               
        lea     r15, [rel t]                            
        lea     rbx, [rel z]                            
        lea     r8d, [r11+1H]                           
        imul    rsi, r13, 500                           
        mov     r13d, dword [rsp-18H]                   
        lea     r14, [rsi+r12]                          
        mov     r9d, dword [r15+r14*4]                  
        or      r9d, dword [rbx+r12*4]                  
        or      r9d, r13d                               
        mov     dword [rbx+r12*4], r9d                  
        cmp     r8d, eax                                
        jge     ?_039                                   
        movsxd  rdi, r8d                                
        add     r11d, 2                                 
        mov     r12d, dword [rbx+rdi*4]                 
        lea     rcx, [rsi+rdi]                          
        or      r12d, dword [r15+rcx*4]                 
        or      r12d, r13d                              
        mov     dword [rbx+rdi*4], r12d                 
        cmp     eax, r11d                               
        jle     ?_039                                   
        movsxd  r11, r11d                               
        add     rsi, r11                                
        mov     esi, dword [r15+rsi*4]                  
        or      esi, dword [rbx+r11*4]                  
        or      esi, r13d                               
        mov     dword [rbx+r11*4], esi                  
?_039:  mov     dword [rsp+24H], 0                      
        lea     r14, [rel M]                            
        lea     r15, [rel z]                            
        vpxor   xmm1, xmm1, xmm1                        
        mov     dword [rsp+20H], 0                      
        xor     r13d, r13d                              
        xor     r12d, r12d                              
        xor     ebx, ebx                                
        mov     qword [rsp-10H], rdx                    
        xor     r11d, r11d                              
        xor     r9d, r9d                                
        xor     r8d, r8d                                
        mov     dword [rsp+8H], eax                     
        xor     edi, edi                                
        xor     esi, esi                                
        xor     ecx, ecx                                
        mov     qword [rsp+18H], r14                    
        xor     r14d, r14d                              
        vmovdqa yword [rsp-38H], ymm5                   
        vmovdqa oword [rsp-48H], xmm6                   




ALIGN   16
?_040:  mov     eax, dword [r15]                        
        vmovdqa xmm5, oword [rel .LC9]                  
        mov     edx, eax                                
        vpaddd  xmm6, xmm1, xmm5                        
        not     edx                                     
        and     edx, 01H                                
        neg     edx                                     
        vmovd   xmm12, edx                              
        mov     edx, dword [rsp+24H]                    
        vpand   xmm1, xmm12, xmm6                       
        inc     edx                                     
        test    al, 02H                                 
        cmovne  edx, r10d                               
        vmovd   xmm0, edx                               
        mov     dword [rsp+24H], edx                    
        mov     edx, dword [rsp+20H]                    
        vpmaxsd xmm0, xmm1, xmm0                        
        inc     edx                                     
        test    al, 04H                                 
        cmovne  edx, r10d                               
        inc     r13d                                    
        test    al, 08H                                 
        cmovne  r13d, r10d                              
        inc     r12d                                    
        test    al, 10H                                 
        cmovne  r12d, r10d                              
        vmovd   xmm14, edx                              
        inc     ebx                                     
        mov     dword [rsp+20H], edx                    
        vmovd   xmm13, r13d                             
        vpmaxsd xmm14, xmm0, xmm14                      
        test    al, 20H                                 
        mov     rdx, qword [rsp+10H]                    
        cmovne  ebx, r10d                               
        vmovd   xmm12, r12d                             
        vpmaxsd xmm13, xmm14, xmm13                     
        inc     r11d                                    
        test    al, 40H                                 
        vpmaxsd xmm12, xmm13, xmm12                     
        cmovne  r11d, r10d                              
        inc     r8d                                     
        vmovd   xmm11, ebx                              
        test    al, 0FFFFFF80H                          
        cmovne  r8d, r10d                               
        vpmaxsd xmm11, xmm12, xmm11                     
        inc     edi                                     
        test    ah, 01H                                 
        vmovd   xmm10, r11d                             
        cmovne  edi, r10d                               
        vmovd   xmm9, r8d                               
        vpmaxsd xmm10, xmm11, xmm10                     
        inc     esi                                     
        test    ah, 02H                                 
        vpmaxsd xmm9, xmm10, xmm9                       
        cmovne  esi, r10d                               
        inc     ecx                                     
        vmovd   xmm8, edi                               
        test    ah, 04H                                 
        cmovne  ecx, r10d                               
        vpmaxsd xmm8, xmm9, xmm8                        
        inc     r9d                                     
        test    ah, 08H                                 
        vmovd   xmm7, esi                               
        cmovne  r9d, r10d                               
        vmovd   xmm6, ecx                               
        vpmaxsd xmm7, xmm8, xmm7                        
        inc     r14d                                    
        test    ah, 10H                                 
        vpmaxsd xmm6, xmm7, xmm6                        
        mov     rax, qword [rsp+18H]                    
        cmovne  r14d, r10d                              
        vmovd   xmm5, r9d                               
        add     r15, 4                                  
        vpmaxsd xmm5, xmm6, xmm5                        
        add     rax, 4                                  
        vmovd   xmm4, r14d                              
        vpmaxsd xmm4, xmm5, xmm4                        
        vmovd   dword [rax-4H], xmm4                    
        mov     qword [rsp+18H], rax                    
        cmp     r15, rdx                                
        jne     ?_040                                   
        mov     r14, rdx                                
        lea     r9, [rel z]                             
        vpxor   xmm14, xmm14, xmm14                     
        xor     r11d, r11d                              
        mov     r13, r14                                
        mov     rdx, qword [rsp-10H]                    
        mov     eax, dword [rsp+8H]                     
        lea     rdi, [rel O]                            
        sub     r13, r9                                 
        vmovdqa ymm5, yword [rsp-38H]                   
        vmovdqa xmm6, oword [rsp-48H]                   
        vmovdqa xmm9, xmm14                             
        and     r13d, 04H                               
        vmovdqa xmm13, xmm14                            
        mov     r8, r14                                 
        je      ?_041                                   
        lea     r12, [rel z]                            
        xor     r11d, r11d                              
        mov     r8, qword [rsp+10H]                     
        lea     rdi, [rel O+4H]                         
        mov     ebx, dword [r12]                        
        lea     r9, [r12+4H]                            
        mov     dword [rsp+24H], ebx                    
        and     ebx, 4000H                              
        sete    r11b                                    
        vmovd   xmm7, r11d                              
        vpbroadcastd xmm1, dword [rsp+24H]              
        vpand   xmm12, xmm1, oword [rel .LC5]           
        vpand   xmm10, xmm1, oword [rel .LC6]           
        vpand   xmm0, xmm1, xmm15                       
        vpcmpeqd xmm14, xmm0, xmm2                      
        vpcmpeqd xmm11, xmm12, xmm2                     
        vpcmpeqd xmm8, xmm10, xmm2                      
        vpand   xmm13, xmm14, xmm3                      
        vpand   xmm9, xmm11, xmm3                       
        vpand   xmm14, xmm8, xmm3                       
        vpmaxsd xmm4, xmm13, xmm9                       
        vpmaxsd xmm1, xmm4, xmm14                       
        vpsrldq xmm0, xmm1, 8                           
        vpmaxsd xmm12, xmm1, xmm0                       
        vpsrldq xmm11, xmm12, 4                         
        vpmaxsd xmm10, xmm12, xmm11                     
        vpmaxsd xmm8, xmm7, xmm10                       
        vmovd   dword [rel O], xmm8                     
        cmp     qword [rsp+10H], r9                     
        je      ?_042                                   




ALIGN   8
?_041:  vpbroadcastd xmm1, dword [r9]                   
        vpaddd  xmm13, xmm13, xmm3                      
        vpaddd  xmm9, xmm9, xmm3                        
        inc     r11d                                    
        vpaddd  xmm14, xmm14, xmm3                      
        test    byte [r9+1H], 40H                       
        vpand   xmm0, xmm1, oword [rel .LC5]            
        vpand   xmm8, xmm1, oword [rel .LC6]            
        vpand   xmm7, xmm1, xmm15                       
        cmovne  r11d, r10d                              
        vpcmpeqd xmm4, xmm7, xmm2                       
        vpcmpeqd xmm11, xmm0, xmm2                      
        vpcmpeqd xmm10, xmm8, xmm2                      
        vmovd   xmm7, r11d                              
        inc     r11d                                    
        test    byte [r9+5H], 40H                       
        vpand   xmm12, xmm4, xmm13                      
        cmovne  r11d, r10d                              
        add     r9, 8                                   
        add     rdi, 8                                  
        vpand   xmm4, xmm11, xmm9                       
        vpand   xmm1, xmm10, xmm14                      
        vpmaxsd xmm13, xmm12, xmm4                      
        vpaddd  xmm12, xmm12, xmm3                      
        vpmaxsd xmm0, xmm13, xmm1                       
        vpaddd  xmm4, xmm4, xmm3                        
        vpsrldq xmm9, xmm0, 8                           
        vpaddd  xmm1, xmm1, xmm3                        
        vpmaxsd xmm11, xmm0, xmm9                       
        vpbroadcastd xmm0, dword [r9-4H]                
        vpsrldq xmm8, xmm11, 4                          
        vpand   xmm9, xmm0, oword [rel .LC5]            
        vpmaxsd xmm14, xmm11, xmm8                      
        vpand   xmm13, xmm0, xmm15                      
        vpand   xmm8, xmm0, oword [rel .LC6]            
        vpmaxsd xmm10, xmm7, xmm14                      
        vpcmpeqd xmm11, xmm9, xmm2                      
        vpcmpeqd xmm7, xmm13, xmm2                      
        vmovd   dword [rdi-8H], xmm10                   
        vmovd   xmm10, r11d                             
        vpcmpeqd xmm14, xmm8, xmm2                      
        vpand   xmm13, xmm7, xmm12                      
        vpand   xmm9, xmm11, xmm4                       
        vpand   xmm14, xmm14, xmm1                      
        vpmaxsd xmm0, xmm13, xmm9                       
        vpmaxsd xmm12, xmm0, xmm14                      
        vpsrldq xmm7, xmm12, 8                          
        vpmaxsd xmm11, xmm12, xmm7                      
        vpsrldq xmm4, xmm11, 4                          
        vpmaxsd xmm8, xmm11, xmm4                       
        vpmaxsd xmm1, xmm10, xmm8                       
        vmovd   dword [rdi-4H], xmm1                    
        cmp     r8, r9                                  
        jne     ?_041                                   
?_042:  cmp     dword [rsp-14H], 6                      
        jbe     ?_057                                   
        mov     rsi, qword [rsp]                        
        xor     r11d, r11d                              
        vpxor   xmm8, xmm8, xmm8                        
        lea     r13, [rsi-20H]                          
        shr     r13, 5                                  
        inc     r13                                     
        and     r13d, 03H                               
        je      ?_045                                   
        cmp     r13, 1                                  
        jz      ?_044                                   
        cmp     r13, 2                                  
        jz      ?_043                                   
        lea     r15, [rel O]                            
        lea     r12, [rel M]                            
        mov     r11d, 32                                
        vmovdqa ymm9, yword [r15]                       
        vpmaxsd ymm14, ymm9, yword [r12]                
        vextracti128 xmm0, ymm14, 01H                   
        vpmovsxdq ymm10, xmm14                          
        vpmovsxdq ymm12, xmm0                           
        vpaddq  ymm8, ymm12, ymm10                      
?_043:  lea     rbx, [rel O]                            
        lea     r9, [rel M]                             
        vmovdqa ymm7, yword [rbx+r11]                   
        vpmaxsd ymm11, ymm7, yword [r9+r11]             
        add     r11, 32                                 
        vpmovsxdq ymm4, xmm11                           
        vextracti128 xmm1, ymm11, 01H                   
        vpaddq  ymm8, ymm4, ymm8                        
        vpmovsxdq ymm13, xmm1                           
        vpaddq  ymm8, ymm13, ymm8                       
?_044:  lea     rdi, [rel O]                            
        lea     r8, [rel M]                             
        mov     rsi, qword [rsp]                        
        vmovdqa ymm9, yword [rdi+r11]                   
        vpmaxsd ymm14, ymm9, yword [r8+r11]             
        add     r11, 32                                 
        vpmovsxdq ymm10, xmm14                          
        vextracti128 xmm12, ymm14, 01H                  
        vpaddq  ymm0, ymm10, ymm8                       
        vpmovsxdq ymm7, xmm12                           
        vpaddq  ymm8, ymm7, ymm0                        
        cmp     r11, rsi                                
        je      ?_046                                   
?_045:  lea     r14, [rel O]                            
        lea     rcx, [rel M]                            
        vmovdqa ymm11, yword [r14+r11]                  
        vmovdqa ymm0, yword [r14+r11+20H]               
        vpmaxsd ymm1, ymm11, yword [rcx+r11]            
        vpmaxsd ymm12, ymm0, yword [rcx+r11+20H]        
        vpmovsxdq ymm4, xmm1                            
        vextracti128 xmm9, ymm1, 01H                    
        vpmovsxdq ymm7, xmm12                           
        vpaddq  ymm13, ymm4, ymm8                       
        vpmovsxdq ymm14, xmm9                           
        vmovdqa ymm4, yword [r14+r11+40H]               
        vextracti128 xmm11, ymm12, 01H                  
        vpaddq  ymm10, ymm14, ymm13                     
        vpmovsxdq ymm1, xmm11                           
        vpaddq  ymm8, ymm7, ymm10                       
        vpmaxsd ymm9, ymm4, yword [rcx+r11+40H]         
        vpaddq  ymm13, ymm1, ymm8                       
        vmovdqa ymm8, yword [r14+r11+60H]               
        vpmovsxdq ymm14, xmm9                           
        vextracti128 xmm0, ymm9, 01H                    
        vpmaxsd ymm11, ymm8, yword [rcx+r11+60H]        
        vpaddq  ymm10, ymm14, ymm13                     
        vpmovsxdq ymm12, xmm0                           
        sub     r11, -128                               
        vpaddq  ymm7, ymm12, ymm10                      
        vpmovsxdq ymm1, xmm11                           
        vextracti128 xmm4, ymm11, 01H                   
        vpaddq  ymm13, ymm1, ymm7                       
        vpmovsxdq ymm9, xmm4                            
        vpaddq  ymm8, ymm9, ymm13                       
        cmp     r11, rsi                                
        jne     ?_045                                   
?_046:  vextracti128 xmm14, ymm8, 01H                   
        mov     ecx, eax                                
        vpaddq  xmm10, xmm14, xmm8                      
        and     ecx, 0FFFFFFF8H                         
        vpsrldq xmm0, xmm10, 8                          
        mov     r14d, ecx                               
        vmovdqa xmm13, xmm10                            
        vpaddq  xmm12, xmm10, xmm0                      
        vmovq   rsi, xmm12                              
        add     rsi, rdx                                
        cmp     ecx, eax                                
        je      ?_056                                   
        mov     r13d, eax                               
        sub     r13d, r14d                              
        lea     r15d, [r13-1H]                          
        cmp     r15d, 2                                 
        jbe     ?_058                                   
?_047:  lea     r12, [rel M]                            
        lea     r11, [rel O]                            
        mov     r9d, r13d                               
        vmovdqa xmm7, oword [r12+r14*4]                 
        and     r9d, 0FFFFFFFCH                         
        add     ecx, r9d                                
        vpmaxsd xmm8, xmm7, oword [r11+r14*4]           
        vpmovsxdq xmm11, xmm8                           
        vpaddq  xmm1, xmm11, xmm13                      
        vpsrldq xmm13, xmm8, 8                          
        vpmovsxdq xmm4, xmm13                           
        vpaddq  xmm9, xmm4, xmm1                        
        vpsrldq xmm14, xmm9, 8                          
        vpaddq  xmm10, xmm9, xmm14                      
        vmovq   rbx, xmm10                              
        add     rdx, rbx                                
        and     r13d, 03H                               
        jz      ?_049                                   
?_048:  movsxd  rdi, ecx                                
        lea     r8, [rel O]                             
        lea     r14, [rel M]                            
        movsxd  rsi, dword [r8+rdi*4]                   
        movsxd  r13, dword [r14+rdi*4]                  
        lea     r15d, [rcx+1H]                          
        cmp     esi, r13d                               
        cmovl   rsi, r13                                
        add     rdx, rsi                                
        cmp     r15d, eax                               
        jge     ?_049                                   
        movsxd  r12, r15d                               
        movsxd  r11, dword [r8+r12*4]                   
        movsxd  rbx, dword [r14+r12*4]                  
        cmp     r11d, ebx                               
        cmovl   r11, rbx                                
        add     ecx, 2                                  
        add     rdx, r11                                
        cmp     eax, ecx                                
        jle     ?_049                                   
        movsxd  rcx, ecx                                
        movsxd  r9, dword [r14+rcx*4]                   
        movsxd  rdi, dword [r8+rcx*4]                   
        cmp     r9d, edi                                
        cmovl   r9, rdi                                 
        add     rdx, r9                                 
?_049:  inc     dword [rsp+0CH]                         
        add     qword [rsp-8H], 2000                    
        add     qword [rsp-50H], 500                    
        mov     r8d, dword [rsp+0CH]                    
        cmp     r8d, eax                                
        jl      ?_027                                   
        mov     r8d, dword [rsp-54H]                    
        mov     rcx, qword [rsp-60H]                    
        mov     rdi, qword [rsp-68H]                    
        mov     r9, qword [rsp-70H]                     
?_050:  inc     r8d                                     
        add     r9, 2000                                
        add     rdi, 500                                
        cmp     r8d, eax                                
        jne     ?_020                                   
        mov     qword [rel R], rdx                      
        mov     rsi, rdx                                
        mov     rax, rcx                                
?_051:  sub     rax, rsi                                
        vpxor   xmm2, xmm2, xmm2                        
        mov     r14d, 28                                
        mov     r10, qword 0CCCCCCCCCCCCCCCDH           
        vmovdqa oword [rsp+38H], xmm2                   
        mov     rcx, rax                                
        lea     r13, [rsp+38H]                          
        vmovdqu oword [rsp+46H], xmm2                   
        mov     qword [rel r], rax                      
        mov     byte [rsp+55H], 10                      
?_052:  mov     rax, rcx                                
        mov     r11, rcx                                
        lea     rbx, [r14-1H]                           
        mov     rdi, r14                                
        mul     r10                                     
        mov     r15, rdx                                
        shr     r15, 3                                  
        lea     r12, [r15+r15*4]                        
        add     r12, r12                                
        sub     r11, r12                                
        add     r11d, 48                                
        mov     byte [r13+r14], r11b                    
        cmp     rcx, 9                                  
        jbe     ?_053                                   
        mov     rax, r15                                
        mov     rdi, r15                                
        lea     r9, [r14-2H]                            
        mul     r10                                     
        mov     rcx, rdx                                
        shr     rcx, 3                                  
        lea     r8, [rcx+rcx*4]                         
        add     r8, r8                                  
        sub     rdi, r8                                 
        add     edi, 48                                 
        mov     byte [r13+r14-1H], dil                  
        mov     rdi, rbx                                
        cmp     r15, 9                                  
        jbe     ?_053                                   
        mov     rax, rcx                                
        mov     r12, rcx                                
        lea     r11, [r14-3H]                           
        mov     rdi, r9                                 
        mul     r10                                     
        mov     rsi, rdx                                
        shr     rsi, 3                                  
        lea     r15, [rsi+rsi*4]                        
        add     r15, r15                                
        sub     r12, r15                                
        add     r12d, 48                                
        mov     byte [r13+r14-2H], r12b                 
        cmp     rcx, 9                                  
        jbe     ?_053                                   
        mov     rax, rsi                                
        mov     r8, rsi                                 
        mov     rdi, r11                                
        mul     r10                                     
        mov     rcx, rdx                                
        shr     rcx, 3                                  
        lea     rbx, [rcx+rcx*4]                        
        add     rbx, rbx                                
        sub     r8, rbx                                 
        add     r8d, 48                                 
        mov     byte [r13+r14-3H], r8b                  
        sub     r14, 4                                  
        cmp     rsi, 9                                  
        ja      ?_052                                   
?_053:  mov     r14d, 30                                
        mov     eax, 1                                  
        movsxd  rsi, edi                                
        sub     r14d, edi                               
        add     rsi, r13                                
        mov     edi, eax                                
        movsxd  rdx, r14d                               
        syscall                                         
        mov     eax, 60                                 
        xor     edi, edi                                
        syscall                                         
        vzeroupper                                      
        lea     rsp, [rbp-28H]                          
        pop     rbx                                     
        pop     r12                                     
        pop     r13                                     
        pop     r14                                     
        pop     r15                                     
        pop     rbp                                     
        ret                                             





ALIGN   8
?_054:  mov     edx, dword [rel K]                      
        lea     r14d, [rdx+1H]                          
        mov     dword [rsp+r8*4+58H], r14d              
        shlx    r8d, r10d, edx                          
        mov     dword [r9+r15*4], r8d                   
        inc     r15                                     
        or      dword [rel C], r8d                      
        mov     dword [rel K], r14d                     
        cmp     r12d, r15d                              
        jle     ?_007                                   
        movsxd  r13, r11d                               
        cmp     r13, rax                                
        jl      ?_005                                   
?_055:  mov     r8d, r12d                               
        lea     eax, [r12+1H]                           
        sub     r8d, ebx                                
        dec     r8d                                     
        imul    r8d, eax                                
        mov     eax, edi                                
        add     r8d, r12d                               
        sub     r8d, r15d                               
        inc     r8d                                     
        movsxd  rdx, r8d                                
        syscall                                         
        mov     r12d, dword [rel n]                     
        mov     qword [rel BS], rax                     
        mov     r13d, 1                                 
        mov     r11d, 1                                 
        xor     ecx, ecx                                
        jmp     ?_006                                   





ALIGN   8
?_056:  inc     dword [rsp+0CH]                         
        add     qword [rsp-8H], 2000                    
        add     qword [rsp-50H], 500                    
        mov     edx, dword [rsp+0CH]                    
        cmp     edx, eax                                
        jge     ?_060                                   
        mov     rdx, rsi                                
        jmp     ?_028                                   






ALIGN   16
?_057:  xor     r14d, r14d                              
        mov     r13d, eax                               
        mov     rsi, rdx                                
        xor     ecx, ecx                                
        sub     r13d, r14d                              
        vpxor   xmm13, xmm13, xmm13                     
        lea     r15d, [r13-1H]                          
        cmp     r15d, 2                                 
        ja      ?_047                                   
?_058:  mov     rdx, rsi                                
        jmp     ?_048                                   





ALIGN   8
?_059:  xor     r14d, r14d                              
        xor     r11d, r11d                              
        jmp     ?_037                                   

?_060:  mov     r8d, dword [rsp-54H]                    
        mov     rcx, qword [rsp-60H]                    
        mov     rdx, rsi                                
        mov     rdi, qword [rsp-68H]                    
        mov     r9, qword [rsp-70H]                     
        jmp     ?_050                                   

?_061:  vmovdqa ymm7, ymm1                              
        mov     r8d, 1                                  
        vpaddd  ymm1, ymm1, ymm5                        
        vpsllvd ymm0, ymm6, ymm7                        
        jmp     ?_010                                   

?_062:  mov     dword [rel n], 0                        
        xor     eax, eax                                
        xor     ebx, ebx                                
?_063:  mov     r15d, dword [rel K]                     
        mov     rsi, qword [rel R]                      
        cmp     r15d, 25                                
        jle     ?_009                                   
        jmp     ?_051                                   

?_064:  mov     dword [rsp-18H], 0                      
        jmp     ?_019                                   

?_065:  mov     dword [rsp-18H], 0                      
        jmp     ?_018                                   


?_066:  
        lea     eax, [r8+1H]                            
        mov     r12d, 2                                 
        imul    eax, r8d                                
        cdq                                             
        idiv    r12d                                    
        cdqe                                            
        imul    rax, rax                                
        jmp     ?_063                                   


SECTION .data   align=1 noexec                          


SECTION .bss    align=32 noexec                         

r:      resq    1                                       

R:      resq    1                                       

BS:     resq    2                                       

O:                                                      
        resd    504                                     

M:                                                      
        resb    2016                                    

z:                                                      
        resb    2016                                    

t:                                                      
        resb    1000000                                 

C:      resd    1                                       

n:      resd    1                                       

K:      resd    6                                       

B:                                                      
        resb    350600                                  


SECTION .rodata.cst32 align=32 noexec                   

ALIGN   32
?_009.LC0:                                                   
        dd 00000000H, 00000001H                         
        dd 00000002H, 00000003H                         
        dd 00000004H, 00000005H                         
        dd 00000006H, 00000007H                         


SECTION .rodata.cst16 align=16 noexec                   

ALIGN   16
?_019.LC3:
        dq 0100000002000000H                            
        dq 0040000000800000H                            

?_040.LC5:
?_041.LC5:
?_041.LC5:
        dq 0010000000200000H                            
        dq 0004000000080000H                            

?_040.LC6:
?_041.LC6:
        dq 0001000000020000H                            
        dq 0000200000008000H                            

?_040.LC9:
        dq 0000000000000001H                            
        dq 0000000000000000H                            


SECTION .note.gnu.property align=8 noexec               

        db 04H, 00H, 00H, 00H, 20H, 00H, 00H, 00H       
        db 05H, 00H, 00H, 00H, 47H, 4EH, 55H, 00H       
        db 02H, 00H, 01H, 0C0H, 04H, 00H, 00H, 00H      
        db 05H, 00H, 00H, 00H, 00H, 00H, 00H, 00H       
        db 01H, 00H, 01H, 0C0H, 04H, 00H, 00H, 00H      
        db 19H, 00H, 00H, 00H, 00H, 00H, 00H, 00H       


Test details

Test 1

Group: 1, 2, 3, 4, 5, 6

Verdict: ACCEPTED

input
10
TNCTNPNTPC
NPPNTNTPTP
NTNTTCNTCT
NPCPNPPNTT
...

correct output
2035

user output
2035

Test 2

Group: 1, 2, 3, 4, 5, 6

Verdict: ACCEPTED

input
10
NFWQLWNWYS
DZOQJVXFPJ
CNHXPXMCQD
QRTBVNLTQC
...

correct output
9

user output
9

Test 3

Group: 1, 2, 3, 4, 5, 6

Verdict: ACCEPTED

input
10
XXXXXXXXXX
XXXXXXXXXX
XXXXXXXXXX
XXXXXXXXXX
...

correct output
3025

user output
3025

Test 4

Group: 1, 2, 3, 4, 5, 6

Verdict: ACCEPTED

input
10
FFFFFFFFFF
FFFFFCFFFF
FFFFFFJFFF
FFFFFFFFFF
...

correct output
12

user output
12

Test 5

Group: 1, 2, 3, 4, 5, 6

Verdict: ACCEPTED

input
1
X

correct output
1

user output
1

Test 6

Group: 2, 3, 4, 5, 6

Verdict: ACCEPTED

input
20
BBCBUBOUOBBCUUBBCOUO
BOUCOOCUBCOOOCOBOCUO
UCCUUUOBCOCBCBUBUCOO
BUOBUCUCUOOBCOOUBUOO
...

correct output
38724

user output
38724

Test 7

Group: 2, 3, 4, 5, 6

Verdict: ACCEPTED

input
20
CBGLSHGZHYZDWBNDBJUG
SMUXOJQYPXZDTMJUIWOJ
XIDSTNBGHKRKOVUVMINB
MTQGCFRUHQKALXRNCQGS
...

correct output
8334

user output
8334

Test 8

Group: 2, 3, 4, 5, 6

Verdict: ACCEPTED

input
20
KKKKKKKKKKKKKKKKKKKK
KKKKKKKKKKKKKKKKKKKK
KKKKKKKKKKKKKKKKKKKK
KKKKKKKKKKKKKKKKKKKK
...

correct output
44100

user output
44100

Test 9

Group: 2, 3, 4, 5, 6

Verdict: ACCEPTED

input
20
AAAAAAAAXAAAAAAAAAAA
AAAWAAAAAAAAAAAAAOAA
AAAAAAAAAAAAAAAAAPAA
AAAAAAAAKAAAAAAAAAAZ
...

correct output
18

user output
18

Test 10

Group: 3, 4, 5, 6

Verdict: ACCEPTED

input
50
GRGREEEGREGXRXXEGXXREXGRRRGRRR...

correct output
1584665

user output
1584665

Test 11

Group: 3, 4, 5, 6

Verdict: ACCEPTED

input
50
AITIISJUHCCRZNKSDCNQKYSQRINFWJ...

correct output
1077746

user output
1077746

Test 12

Group: 3, 4, 5, 6

Verdict: ACCEPTED

input
50
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO...

correct output
1625625

user output
1625625

Test 13

Group: 3, 4, 5, 6

Verdict: ACCEPTED

input
50
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF...

correct output
1680

user output
1680

Test 14

Group: 4, 5, 6

Verdict: ACCEPTED

input
100
NNCMDCDDCCNNNDNCMMNCDCDCCDCDNM...

correct output
25325366

user output
25325366

Test 15

Group: 4, 5, 6

Verdict: ACCEPTED

input
100
LIMQQIHASECROEVILNVULGWZJPPKOG...

correct output
22342463

user output
22342463

Test 16

Group: 4, 5, 6

Verdict: ACCEPTED

input
100
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...

correct output
25502500

user output
25502500

Test 17

Group: 4, 5, 6

Verdict: ACCEPTED

input
100
QXQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...

correct output
25650

user output
25650

Test 18

Group: 5, 6

Verdict: ACCEPTED

input
200
NAANANMMKNKKAKMKMAKNKMNKMMNNAA...

correct output
403292767

user output
403292767

Test 19

Group: 5, 6

Verdict: ACCEPTED

input
200
OMYWATTLURKQPTKEFMGGYAOONXWVSC...

correct output
388111321

user output
388111321

Test 20

Group: 5, 6

Verdict: ACCEPTED

input
200
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC...

correct output
404010000

user output
404010000

Test 21

Group: 5, 6

Verdict: ACCEPTED

input
200
LLLLLLLLLLLLLLLLLHLLLLLLLLLLLL...

correct output
14159445

user output
14159445

Test 22

Group: 6

Verdict: ACCEPTED

input
500
VVHWVUHVHUWWWVUUUWVUUHUUWHWUVW...

correct output
15683003812

user output
15683003812

Test 23

Group: 6

Verdict: ACCEPTED

input
500
OIMZGEQSBMBDSDXSWRFNKSGFEBBTJE...

correct output
15575906951

user output
15575906951

Test 24

Group: 6

Verdict: ACCEPTED

input
500
IIIIIIIIIIIIIIIIIIIIIIIIIIIIII...

correct output
15687562500

user output
15687562500

Test 25

Group: 6

Verdict: ACCEPTED

input
500
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...

correct output
3058970930

user output
3058970930