// File: /workspace/github_c_makefile_star2_O0/ArchLuke[P]YouSuck/Engine.c
// Function: GenerateAllMoves
static
void GenerateAllMoves(const S_BOARD *pos, S_MOVELIST *list, int cap_only) {
    
    
    list->count = 0;    
    
    int pce = EMPTY;
    int side = pos->side;
    int sq = 0; int t_sq = 0;
    int pceNum = 0;
    int dir = 0;
    int index = 0;
    int pceIndex = 0;
    
    if(side == WHITE) {
        
        for(pceNum = 0; pceNum < pos->pceNum[wP]; ++pceNum) {
            sq = pos->pList[wP][pceNum];
            
            if(pos->pieces[sq + 10] == EMPTY && !cap_only) {
                AddPawnMove(pos, sq, sq+10, list);
                if(RanksBrd[sq] == RANK_2 && pos->pieces[sq + 20] == EMPTY) {
                    AddQuietMove(pos, MOVE(sq,(sq+20),EMPTY,EMPTY,MFLAGPS),list);
                }
            }
            
            if(!SQOFFBOARD(sq + 9) && PieceCol[pos->pieces[sq + 9]] == BLACK) {
                AddPawnCapMove(pos, sq, sq+9, pos->pieces[sq + 9], list);
            }  
            if(!SQOFFBOARD(sq + 11) && PieceCol[pos->pieces[sq + 11]] == BLACK) {
                AddPawnCapMove(pos, sq, sq+11, pos->pieces[sq + 11], list);
            }
            
            if(pos->enPas != NO_SQ) {
                if(sq + 9 == pos->enPas) {
                    AddEnPassantMove(pos, MOVE(sq,sq + 9,EMPTY,EMPTY,MFLAGEP), list);
                }
                if(sq + 11 == pos->enPas) {
                    AddEnPassantMove(pos, MOVE(sq,sq + 11,EMPTY,EMPTY,MFLAGEP), list);
                }
            }
        }
        
        if(pos->castlePerm & WKCA && !cap_only) {
            if(pos->pieces[F1] == EMPTY && pos->pieces[G1] == EMPTY) {
                if(!SqAttacked(E1,BLACK,pos) && !SqAttacked(F1,BLACK,pos) ) {
                    AddQuietMove(pos, MOVE(E1, G1, EMPTY, EMPTY, MFLAGCA), list);
                }
            }
        }
        
        if(pos->castlePerm & WQCA && !cap_only) {
            if(pos->pieces[D1] == EMPTY && pos->pieces[C1] == EMPTY && pos->pieces[B1] == EMPTY) {
                if(!SqAttacked(E1,BLACK,pos) && !SqAttacked(D1,BLACK,pos) ) {
                    AddQuietMove(pos, MOVE(E1, C1, EMPTY, EMPTY, MFLAGCA), list);
                }
            }
        }
        
    } else {
        
        for(pceNum = 0; pceNum < pos->pceNum[bP]; ++pceNum) {
            sq = pos->pList[bP][pceNum];
            
            if(pos->pieces[sq - 10] == EMPTY && !cap_only) {
                AddPawnMove(pos, sq, sq-10, list);
                if(RanksBrd[sq] == RANK_7 && pos->pieces[sq - 20] == EMPTY) {
                    AddQuietMove(pos, MOVE(sq,(sq-20),EMPTY,EMPTY,MFLAGPS),list);
                }
            }
            
            if(!SQOFFBOARD(sq - 9) && PieceCol[pos->pieces[sq - 9]] == WHITE) {
                AddPawnCapMove(pos, sq, sq-9, pos->pieces[sq - 9], list);
            }
            
            if(!SQOFFBOARD(sq - 11) && PieceCol[pos->pieces[sq - 11]] == WHITE) {
                AddPawnCapMove(pos, sq, sq-11, pos->pieces[sq - 11], list);
            }
            if(pos->enPas != NO_SQ) {
                if(sq - 9 == pos->enPas) {
                    AddEnPassantMove(pos, MOVE(sq,sq - 9,EMPTY,EMPTY,MFLAGEP), list);
                }
                if(sq - 11 == pos->enPas) {
                    AddEnPassantMove(pos, MOVE(sq,sq - 11,EMPTY,EMPTY,MFLAGEP), list);
                }
            }
        }        
        
        // castling
        if(pos->castlePerm &  BKCA && !cap_only) {
            if(pos->pieces[F8] == EMPTY && pos->pieces[G8] == EMPTY) {
                if(!SqAttacked(E8,WHITE,pos) && !SqAttacked(F8,WHITE,pos) ) {
                    AddQuietMove(pos, MOVE(E8, G8, EMPTY, EMPTY, MFLAGCA), list);
                }
            }
        }
        
        if(pos->castlePerm &  BQCA && !cap_only) {
            if(pos->pieces[D8] == EMPTY && pos->pieces[C8] == EMPTY && pos->pieces[B8] == EMPTY) {
                if(!SqAttacked(E8,WHITE,pos) && !SqAttacked(D8,WHITE,pos) ) {
                    AddQuietMove(pos, MOVE(E8, C8, EMPTY, EMPTY, MFLAGCA), list);
                }
            }
        }
    }
    
    /* Loop for slide pieces */
    pceIndex = LoopSlideIndex[side];
    pce = LoopSlidePce[pceIndex++];
    while( pce != 0) {
        
        for(pceNum = 0; pceNum < pos->pceNum[pce]; ++pceNum) {
            sq = pos->pList[pce][pceNum];
            
            for(index = 0; index < NumDir[pce]; ++index) {
                dir = PceDir[pce][index];
                t_sq = sq + dir;
                
                while(!SQOFFBOARD(t_sq)) {                
                    // BLACK ^ 1 == WHITE       WHITE ^ 1 == BLACK
                    if(pos->pieces[t_sq] != EMPTY) {
                        if( PieceCol[pos->pieces[t_sq]] == (side ^ 1)) {
                            AddCaptureMove(pos, MOVE(sq, t_sq, pos->pieces[t_sq], EMPTY, 0), list);
                        }
                        break;
                    }
                    if (!cap_only)    
                        AddQuietMove(pos, MOVE(sq, t_sq, EMPTY, EMPTY, 0), list);
                    t_sq += dir;
                }
            }
        }
        
        pce = LoopSlidePce[pceIndex++];
    }

    /* Loop for non slide */
    pceIndex = LoopNonSlideIndex[side];
    pce = LoopNonSlidePce[pceIndex++];
    
    while( pce != 0) {
        
        for(pceNum = 0; pceNum < pos->pceNum[pce]; ++pceNum) {
            sq = pos->pList[pce][pceNum];
            
            for(index = 0; index < NumDir[pce]; ++index) {
                dir = PceDir[pce][index];
                t_sq = sq + dir;
                
                if(SQOFFBOARD(t_sq)) {                    
                    continue;
                }
                
                // BLACK ^ 1 == WHITE       WHITE ^ 1 == BLACK
                if(pos->pieces[t_sq] != EMPTY) {
                    if( PieceCol[pos->pieces[t_sq]] == (side ^ 1)) {
                        AddCaptureMove(pos, MOVE(sq, t_sq, pos->pieces[t_sq], EMPTY, 0), list);
                    }
                    continue;
                }    
                if (!cap_only)
                    AddQuietMove(pos, MOVE(sq, t_sq, EMPTY, EMPTY, 0), list);
            }
        }
                
        pce = LoopNonSlidePce[pceIndex++];
    }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movq 0x28(%rsp), %rax
movl $0x0, 0x800(%rax)
movl $0x0, 0x20(%rsp)
movq 0x30(%rsp), %rax
movl 0x200(%rax), %eax
movl %eax, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
cmpl $0x0, 0x1c(%rsp)
jne 0x497d
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x22c(%rcx), %eax
jge 0x4879
movq 0x30(%rsp), %rax
movslq 0x10(%rsp), %rcx
movl 0xc298(%rax,%rcx,4), %eax
movl %eax, 0x18(%rsp)
movq 0x30(%rsp), %rax
movl 0x18(%rsp), %ecx
addl $0xa, %ecx
movslq %ecx, %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x470f
cmpl $0x0, 0x24(%rsp)
jne 0x470f
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x18(%rsp), %edx
addl $0xa, %edx
movq 0x28(%rsp), %rcx
callq 0x5050
movslq 0x18(%rsp), %rcx
leaq 0x23769(%rip), %rax     # 0x27e30
cmpl $0x1, (%rax,%rcx,4)
jne 0x470d
movq 0x30(%rsp), %rax
movl 0x18(%rsp), %ecx
addl $0x14, %ecx
movslq %ecx, %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x470d
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x18(%rsp), %eax
addl $0x14, %eax
shll $0x7, %eax
orl %eax, %esi
orl $0x0, %esi
orl $0x0, %esi
orl $0x80000, %esi          # imm = 0x80000
movq 0x28(%rsp), %rdx
callq 0x51c0
jmp 0x470f
movl 0x18(%rsp), %eax
addl $0x9, %eax
movslq %eax, %rcx
leaq 0xb380(%rip), %rax      # 0xfaa0
cmpl $0x64, (%rax,%rcx,4)
je 0x4772
movq 0x30(%rsp), %rax
movl 0x18(%rsp), %ecx
addl $0x9, %ecx
movslq %ecx, %rcx
movslq (%rax,%rcx,4), %rcx
leaq 0x6c20(%rip), %rax      # 0xb360
cmpl $0x1, (%rax,%rcx,4)
jne 0x4772
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x18(%rsp), %edx
addl $0x9, %edx
movq 0x30(%rsp), %rax
movl 0x18(%rsp), %ecx
addl $0x9, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movq 0x28(%rsp), %r8
callq 0x52c0
movl 0x18(%rsp), %eax
addl $0xb, %eax
movslq %eax, %rcx
leaq 0xb31d(%rip), %rax      # 0xfaa0
cmpl $0x64, (%rax,%rcx,4)
je 0x47d5
movq 0x30(%rsp), %rax
movl 0x18(%rsp), %ecx
addl $0xb, %ecx
movslq %ecx, %rcx
movslq (%rax,%rcx,4), %rcx
leaq 0x6bbd(%rip), %rax      # 0xb360
cmpl $0x1, (%rax,%rcx,4)
jne 0x47d5
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x18(%rsp), %edx
addl $0xb, %edx
movq 0x30(%rsp), %rax
movl 0x18(%rsp), %ecx
addl $0xb, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movq 0x28(%rsp), %r8
callq 0x52c0
movq 0x30(%rsp), %rax
cmpl $0x63, 0x204(%rax)
je 0x4867
movl 0x18(%rsp), %eax
addl $0x9, %eax
movq 0x30(%rsp), %rcx
cmpl 0x204(%rcx), %eax
jne 0x4826
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x18(%rsp), %eax
addl $0x9, %eax
shll $0x7, %eax
orl %eax, %esi
orl $0x0, %esi
orl $0x0, %esi
orl $0x40000, %esi          # imm = 0x40000
movq 0x28(%rsp), %rdx
callq 0x5450
movl 0x18(%rsp), %eax
addl $0xb, %eax
movq 0x30(%rsp), %rcx
cmpl 0x204(%rcx), %eax
jne 0x4865
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x18(%rsp), %eax
addl $0xb, %eax
shll $0x7, %eax
orl %eax, %esi
orl $0x0, %esi
orl $0x0, %esi
orl $0x40000, %esi          # imm = 0x40000
movq 0x28(%rsp), %rdx
callq 0x5450
jmp 0x4867
jmp 0x4869
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x465b
movq 0x30(%rsp), %rax
movl 0x214(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x48f3
cmpl $0x0, 0x24(%rsp)
jne 0x48f3
movq 0x30(%rsp), %rax
cmpl $0x0, 0x68(%rax)
jne 0x48f1
movq 0x30(%rsp), %rax
cmpl $0x0, 0x6c(%rax)
jne 0x48f1
movq 0x30(%rsp), %rdx
movl $0x19, %edi
movl $0x1, %esi
callq 0x1750
cmpl $0x0, %eax
jne 0x48ef
movq 0x30(%rsp), %rdx
movl $0x1a, %edi
movl $0x1, %esi
callq 0x1750
cmpl $0x0, %eax
jne 0x48ef
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rdx
movl $0x1000d99, %esi        # imm = 0x1000D99
callq 0x51c0
jmp 0x48f1
jmp 0x48f3
movq 0x30(%rsp), %rax
movl 0x214(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4978
cmpl $0x0, 0x24(%rsp)
jne 0x4978
movq 0x30(%rsp), %rax
cmpl $0x0, 0x60(%rax)
jne 0x4976
movq 0x30(%rsp), %rax
cmpl $0x0, 0x5c(%rax)
jne 0x4976
movq 0x30(%rsp), %rax
cmpl $0x0, 0x58(%rax)
jne 0x4976
movq 0x30(%rsp), %rdx
movl $0x19, %edi
movl $0x1, %esi
callq 0x1750
cmpl $0x0, %eax
jne 0x4974
movq 0x30(%rsp), %rdx
movl $0x18, %edi
movl $0x1, %esi
callq 0x1750
cmpl $0x0, %eax
jne 0x4974
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rdx
movl $0x1000b99, %esi        # imm = 0x1000B99
callq 0x51c0
jmp 0x4976
jmp 0x4978
jmp 0x4ca7
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x244(%rcx), %eax
jge 0x4ba3
movq 0x30(%rsp), %rax
movslq 0x10(%rsp), %rcx
movl 0xc388(%rax,%rcx,4), %eax
movl %eax, 0x18(%rsp)
movq 0x30(%rsp), %rax
movl 0x18(%rsp), %ecx
subl $0xa, %ecx
movslq %ecx, %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x4a39
cmpl $0x0, 0x24(%rsp)
jne 0x4a39
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x18(%rsp), %edx
subl $0xa, %edx
movq 0x28(%rsp), %rcx
callq 0x5050
movslq 0x18(%rsp), %rcx
leaq 0x2343f(%rip), %rax     # 0x27e30
cmpl $0x6, (%rax,%rcx,4)
jne 0x4a37
movq 0x30(%rsp), %rax
movl 0x18(%rsp), %ecx
subl $0x14, %ecx
movslq %ecx, %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x4a37
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x18(%rsp), %eax
subl $0x14, %eax
shll $0x7, %eax
orl %eax, %esi
orl $0x0, %esi
orl $0x0, %esi
orl $0x80000, %esi          # imm = 0x80000
movq 0x28(%rsp), %rdx
callq 0x51c0
jmp 0x4a39
movl 0x18(%rsp), %eax
subl $0x9, %eax
movslq %eax, %rcx
leaq 0xb056(%rip), %rax      # 0xfaa0
cmpl $0x64, (%rax,%rcx,4)
je 0x4a9c
movq 0x30(%rsp), %rax
movl 0x18(%rsp), %ecx
subl $0x9, %ecx
movslq %ecx, %rcx
movslq (%rax,%rcx,4), %rcx
leaq 0x68f6(%rip), %rax      # 0xb360
cmpl $0x0, (%rax,%rcx,4)
jne 0x4a9c
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x18(%rsp), %edx
subl $0x9, %edx
movq 0x30(%rsp), %rax
movl 0x18(%rsp), %ecx
subl $0x9, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movq 0x28(%rsp), %r8
callq 0x52c0
movl 0x18(%rsp), %eax
subl $0xb, %eax
movslq %eax, %rcx
leaq 0xaff3(%rip), %rax      # 0xfaa0
cmpl $0x64, (%rax,%rcx,4)
je 0x4aff
movq 0x30(%rsp), %rax
movl 0x18(%rsp), %ecx
subl $0xb, %ecx
movslq %ecx, %rcx
movslq (%rax,%rcx,4), %rcx
leaq 0x6893(%rip), %rax      # 0xb360
cmpl $0x0, (%rax,%rcx,4)
jne 0x4aff
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x18(%rsp), %edx
subl $0xb, %edx
movq 0x30(%rsp), %rax
movl 0x18(%rsp), %ecx
subl $0xb, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movq 0x28(%rsp), %r8
callq 0x52c0
movq 0x30(%rsp), %rax
cmpl $0x63, 0x204(%rax)
je 0x4b91
movl 0x18(%rsp), %eax
subl $0x9, %eax
movq 0x30(%rsp), %rcx
cmpl 0x204(%rcx), %eax
jne 0x4b50
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x18(%rsp), %eax
subl $0x9, %eax
shll $0x7, %eax
orl %eax, %esi
orl $0x0, %esi
orl $0x0, %esi
orl $0x40000, %esi          # imm = 0x40000
movq 0x28(%rsp), %rdx
callq 0x5450
movl 0x18(%rsp), %eax
subl $0xb, %eax
movq 0x30(%rsp), %rcx
cmpl 0x204(%rcx), %eax
jne 0x4b8f
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x18(%rsp), %eax
subl $0xb, %eax
shll $0x7, %eax
orl %eax, %esi
orl $0x0, %esi
orl $0x0, %esi
orl $0x40000, %esi          # imm = 0x40000
movq 0x28(%rsp), %rdx
callq 0x5450
jmp 0x4b91
jmp 0x4b93
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x4985
movq 0x30(%rsp), %rax
movl 0x214(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4c1d
cmpl $0x0, 0x24(%rsp)
jne 0x4c1d
movq 0x30(%rsp), %rax
cmpl $0x0, 0x180(%rax)
jne 0x4c1b
movq 0x30(%rsp), %rax
cmpl $0x0, 0x184(%rax)
jne 0x4c1b
movq 0x30(%rsp), %rdx
movl $0x5f, %edi
xorl %esi, %esi
callq 0x1750
cmpl $0x0, %eax
jne 0x4c19
movq 0x30(%rsp), %rdx
movl $0x60, %edi
xorl %esi, %esi
callq 0x1750
cmpl $0x0, %eax
jne 0x4c19
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rdx
movl $0x10030df, %esi        # imm = 0x10030DF
callq 0x51c0
jmp 0x4c1b
jmp 0x4c1d
movq 0x30(%rsp), %rax
movl 0x214(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x4ca5
cmpl $0x0, 0x24(%rsp)
jne 0x4ca5
movq 0x30(%rsp), %rax
cmpl $0x0, 0x178(%rax)
jne 0x4ca3
movq 0x30(%rsp), %rax
cmpl $0x0, 0x174(%rax)
jne 0x4ca3
movq 0x30(%rsp), %rax
cmpl $0x0, 0x170(%rax)
jne 0x4ca3
movq 0x30(%rsp), %rdx
movl $0x5f, %edi
xorl %esi, %esi
callq 0x1750
cmpl $0x0, %eax
jne 0x4ca1
movq 0x30(%rsp), %rdx
movl $0x5e, %edi
xorl %esi, %esi
callq 0x1750
cmpl $0x0, %eax
jne 0x4ca1
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rdx
movl $0x1002edf, %esi        # imm = 0x1002EDF
callq 0x51c0
jmp 0x4ca3
jmp 0x4ca5
jmp 0x4ca7
movslq 0x1c(%rsp), %rcx
leaq 0x6a35(%rip), %rax      # 0xb6e8
movl (%rax,%rcx,4), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %eax, %rcx
leaq 0x6a1f(%rip), %rax      # 0xb6f0
movl (%rax,%rcx,4), %eax
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x20(%rsp)
je 0x4e80
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movq 0x30(%rsp), %rcx
movslq 0x20(%rsp), %rdx
cmpl 0x228(%rcx,%rdx,4), %eax
jge 0x4e5d
movq 0x30(%rsp), %rax
addq $0xc270, %rax           # imm = 0xC270
movslq 0x20(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movslq 0x10(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x18(%rsp)
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
movslq 0x20(%rsp), %rdx
leaq 0x69cf(%rip), %rcx      # 0xb710
cmpl (%rcx,%rdx,4), %eax
jge 0x4e4b
movslq 0x20(%rsp), %rcx
leaq 0x69fa(%rip), %rax      # 0xb750
shlq $0x5, %rcx
addq %rcx, %rax
movslq 0x8(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0xc(%rsp)
movl 0x18(%rsp), %eax
addl 0xc(%rsp), %eax
movl %eax, 0x14(%rsp)
movslq 0x14(%rsp), %rcx
leaq 0xad1f(%rip), %rax      # 0xfaa0
cmpl $0x64, (%rax,%rcx,4)
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x4d93
jmp 0x4e39
movq 0x30(%rsp), %rax
movslq 0x14(%rsp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x4dfc
movq 0x30(%rsp), %rax
movslq 0x14(%rsp), %rcx
movslq (%rax,%rcx,4), %rcx
leaq 0x65a8(%rip), %rax      # 0xb360
movl (%rax,%rcx,4), %eax
movl 0x1c(%rsp), %ecx
xorl $0x1, %ecx
cmpl %ecx, %eax
jne 0x4dfa
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x14(%rsp), %eax
shll $0x7, %eax
orl %eax, %esi
movq 0x30(%rsp), %rax
movslq 0x14(%rsp), %rcx
movl (%rax,%rcx,4), %eax
shll $0xe, %eax
orl %eax, %esi
orl $0x0, %esi
orl $0x0, %esi
movq 0x28(%rsp), %rdx
callq 0x54b0
jmp 0x4e39
cmpl $0x0, 0x24(%rsp)
jne 0x4e28
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x14(%rsp), %eax
shll $0x7, %eax
orl %eax, %esi
orl $0x0, %esi
orl $0x0, %esi
orl $0x0, %esi
movq 0x28(%rsp), %rdx
callq 0x51c0
movl 0xc(%rsp), %eax
addl 0x14(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0x4d75
jmp 0x4e3b
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4d31
jmp 0x4e4d
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x4ceb
movl 0x4(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %eax, %rcx
leaq 0x687c(%rip), %rax      # 0xb6f0
movl (%rax,%rcx,4), %eax
movl %eax, 0x20(%rsp)
jmp 0x4cd8
movslq 0x1c(%rsp), %rcx
leaq 0x6834(%rip), %rax      # 0xb6c0
movl (%rax,%rcx,4), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %eax, %rcx
leaq 0x6826(%rip), %rax      # 0xb6d0
movl (%rax,%rcx,4), %eax
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x20(%rsp)
je 0x5041
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movq 0x30(%rsp), %rcx
movslq 0x20(%rsp), %rdx
cmpl 0x228(%rcx,%rdx,4), %eax
jge 0x501e
movq 0x30(%rsp), %rax
addq $0xc270, %rax           # imm = 0xC270
movslq 0x20(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movslq 0x10(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x18(%rsp)
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
movslq 0x20(%rsp), %rdx
leaq 0x67f6(%rip), %rcx      # 0xb710
cmpl (%rcx,%rdx,4), %eax
jge 0x500c
movslq 0x20(%rsp), %rcx
leaq 0x6821(%rip), %rax      # 0xb750
shlq $0x5, %rcx
addq %rcx, %rax
movslq 0x8(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0xc(%rsp)
movl 0x18(%rsp), %eax
addl 0xc(%rsp), %eax
movl %eax, 0x14(%rsp)
movslq 0x14(%rsp), %rcx
leaq 0xab46(%rip), %rax      # 0xfaa0
cmpl $0x64, (%rax,%rcx,4)
jne 0x4f65
jmp 0x4ffc
movq 0x30(%rsp), %rax
movslq 0x14(%rsp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x4fce
movq 0x30(%rsp), %rax
movslq 0x14(%rsp), %rcx
movslq (%rax,%rcx,4), %rcx
leaq 0x63d6(%rip), %rax      # 0xb360
movl (%rax,%rcx,4), %eax
movl 0x1c(%rsp), %ecx
xorl $0x1, %ecx
cmpl %ecx, %eax
jne 0x4fcc
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x14(%rsp), %eax
shll $0x7, %eax
orl %eax, %esi
movq 0x30(%rsp), %rax
movslq 0x14(%rsp), %rcx
movl (%rax,%rcx,4), %eax
shll $0xe, %eax
orl %eax, %esi
orl $0x0, %esi
orl $0x0, %esi
movq 0x28(%rsp), %rdx
callq 0x54b0
jmp 0x4ffc
cmpl $0x0, 0x24(%rsp)
jne 0x4ffa
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x14(%rsp), %eax
shll $0x7, %eax
orl %eax, %esi
orl $0x0, %esi
orl $0x0, %esi
orl $0x0, %esi
movq 0x28(%rsp), %rdx
callq 0x51c0
jmp 0x4ffc
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4f0a
jmp 0x500e
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x4ec4
movl 0x4(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %eax, %rcx
leaq 0x669b(%rip), %rax      # 0xb6d0
movl (%rax,%rcx,4), %eax
movl %eax, 0x20(%rsp)
jmp 0x4eb1
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)