// File: /workspace/github_cpp_makefile_star2_O1/lmclaramunt[P]AES-Crypto/Cipher.cpp
// Function: Cipher::setBlockRoundCombinations(int*, bool)
void Cipher::setBlockRoundCombinations(int* keyLength, bool setKeyPath) {
    switch (*keyLength) {
    case 128:
        Nk = 4, Nr = 10;
        break;
    case 192:
        Nk = 6, Nr = 12;
        break;
    case 256:
        Nk = 8, Nr = 14;
        break;
    default: 
        throw "Invalid Key Length -- Valid: 128, 192, 256"; 
        break;
    }
    if(setKeyPath){ 
        string length = to_string(*keyLength);              //Default AES and MAC keys location
        aesKeyPath = home + "/.AES-" + length + ".aes";
        macKeyPath = home + "/.MAC-" + length + ".aes";   
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
movl (%rsi), %eax
cmpl $0x80, %eax
je 0x3ee5
cmpl $0x100, %eax            # imm = 0x100
je 0x3ed9
cmpl $0xc0, %eax
jne 0x4217
movl $0xc, %eax
movl $0x6, %ecx
jmp 0x3eef
movl $0xe, %eax
movl $0x8, %ecx
jmp 0x3eef
movl $0xa, %eax
movl $0x4, %ecx
movl %ecx, 0x18(%rbx)
movl %eax, 0x1c(%rbx)
testb %dl, %dl
je 0x4205
movl (%rsi), %r13d
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x3f5d
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x3f54
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x3f5a
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x3f5d
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x3f21
addl $-0x3, %r14d
jmp 0x3f5d
addl $-0x2, %r14d
jmp 0x3f5d
decl %r14d
shrl $0x1f, %r13d
movl %r13d, %esi
addl %r14d, %esi
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x68(%rsp), %r15
movq %r15, %rdi
movl $0x2d, %edx
callq 0x2270
movq (%r15), %rdi
addq %r13, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x63db
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x64c0
leaq 0x372f(%rip), %rsi      # 0x76e7
leaq 0x8(%rsp), %rdi
callq 0x2430
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x20a0
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3ffd
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x4005
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x36c6(%rip), %rsi      # 0x76ee
callq 0x2430
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4054
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x405b
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x50(%rbx), %rdi
movq %r14, %rsi
callq 0x22a0
movq (%r14), %rdi
cmpq %rbp, %rdi
je 0x4098
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2250
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x40af
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2250
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x40c6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2250
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rdx
addq %rsi, %rdx
callq 0x64c0
leaq 0x360e(%rip), %rsi      # 0x76f3
leaq 0x8(%rsp), %rdi
callq 0x2430
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x20a0
movq %r13, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4126
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x412e
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x359d(%rip), %rsi      # 0x76ee
callq 0x2430
movq %rbp, 0x48(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4179
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x4180
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
addq $0x70, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22a0
movq (%r14), %rdi
cmpq %rbp, %rdi
je 0x41c0
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2250
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x41d7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2250
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x41ee
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2250
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x4205
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2250
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x2120
leaq 0x3494(%rip), %rcx      # 0x76bc
movq %rcx, (%rax)
movq 0x6d8e(%rip), %rsi      # 0xafc0
movq %rax, %rdi
xorl %edx, %edx
callq 0x23d0
jmp 0x4244
jmp 0x4262
jmp 0x4262
jmp 0x427e
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4265
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2250
jmp 0x4265
jmp 0x4262
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4281
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2250
jmp 0x4281
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x4298
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x2400