// File: /workspace/github_cpp_makefile_star2_O3/FFY00[P]uicc/src/program_uicc.c
// Function: setOPc(uicc_vals&)
void setOPc(struct uicc_vals &values) {
    string key;
    Assert(makeBin(values.key, key) == 16, "can't read a correct key: 16 hexa figures\n");
    string op;
    Assert(makeBin(values.op, op) == 16, "can't read a correct op: 16 hexa figures\n");
    uint8_t opc[16];
    milenage_opc_gen((const uint8_t *)key.c_str(),
                     (const uint8_t *)op.c_str(),
                     opc);

    for (int i=0 ; i<16; i++) {
        char tmp[8];
        sprintf(tmp,"%02hhx",opc[i]);
        values.opc+= tmp;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0xe8(%rdi), %rsi
movq 0xf0(%rdi), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x1394e
leaq -0x48(%rbp), %rdi
movq 0x8(%rdi), %rdx
leaq 0xf26e(%rip), %rcx      # 0x183b2
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x23d0
movq -0x80(%rbp), %rax
testq %rax, %rax
sete %cl
orb %al, %cl
testb $0x1, %cl
je 0x92a9
xorl %r14d, %r14d
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x9177
callq 0x2220
testb %r14b, %r14b
je 0x9417
leaq -0xb0(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x88(%rbx), %rsi
movq 0x90(%rbx), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x1394e
leaq -0xc0(%rbp), %rdi
movq 0x8(%rdi), %rdx
leaq 0xf1e6(%rip), %rcx      # 0x183b2
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x23d0
movq -0x60(%rbp), %rax
testq %rax, %rax
sete %cl
orb %al, %cl
testb $0x1, %cl
je 0x9360
xorl %r14d, %r14d
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x91fc
callq 0x2220
testb %r14b, %r14b
je 0x941c
movq -0x48(%rbp), %rdi
movq -0xc0(%rbp), %r14
leaq -0xa0(%rbp), %rdx
movq %r14, %rsi
callq 0x4053
xorl %eax, %eax
movb (%r14,%rax), %cl
xorb %cl, -0xa0(%rbp,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x9221
addq $0x68, %rbx
leaq 0xed3a(%rip), %r14      # 0x17f7a
leaq -0xc8(%rbp), %r15
xorl %r12d, %r12d
movzbl -0xa0(%rbp,%r12), %edx
movq %r15, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2090
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2450
incq %r12
cmpq $0x10, %r12
jne 0x924a
movq -0xc0(%rbp), %rdi
cmpq %r13, %rdi
je 0x9285
callq 0x2220
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9297
callq 0x2220
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r13d, %r13d
leaq -0x48(%rbp), %r14
movq -0x88(%rbp), %rdx
movb (%rdx,%r13), %al
cmpb $0x30, %al
jl 0x9163
movb $-0x30, %cl
cmpb $0x3a, %al
jb 0x92e7
cmpb $0x61, %al
jb 0x92d8
movb $-0x57, %cl
cmpb $0x67, %al
jb 0x92e7
jmp 0x9163
leal -0x41(%rax), %esi
movb $-0x37, %cl
cmpb $0x5, %sil
ja 0x9163
movb 0x1(%rdx,%r13), %dl
cmpb $0x30, %dl
jl 0x9163
movb $-0x30, %sil
cmpb $0x3a, %dl
jb 0x931f
cmpb $0x61, %dl
jb 0x930f
movb $-0x57, %sil
cmpb $0x67, %dl
jb 0x931f
jmp 0x9163
leal -0x41(%rdx), %edi
movb $-0x37, %sil
cmpb $0x5, %dil
ja 0x9163
addb %al, %cl
addb %dl, %sil
shlb $0x4, %cl
orb %sil, %cl
movsbl %cl, %esi
movq %r14, %rdi
callq 0x2200
addq $0x2, %r13
movq -0x80(%rbp), %rax
cmpq %rax, %r13
jb 0x92b0
movabsq $0x1fffffffe, %rcx      # imm = 0x1FFFFFFFE
andq %rcx, %rax
cmpq $0x20, %rax
sete %r14b
jmp 0x9166
xorl %r12d, %r12d
leaq -0xc0(%rbp), %r14
movq -0x68(%rbp), %rdx
movb (%rdx,%r12), %al
cmpb $0x30, %al
jl 0x91eb
movb $-0x30, %cl
cmpb $0x3a, %al
jb 0x939e
cmpb $0x61, %al
jb 0x938f
movb $-0x57, %cl
cmpb $0x67, %al
jb 0x939e
jmp 0x91eb
leal -0x41(%rax), %esi
movb $-0x37, %cl
cmpb $0x5, %sil
ja 0x91eb
movb 0x1(%rdx,%r12), %dl
cmpb $0x30, %dl
jl 0x91eb
movb $-0x30, %sil
cmpb $0x3a, %dl
jb 0x93d6
cmpb $0x61, %dl
jb 0x93c6
movb $-0x57, %sil
cmpb $0x67, %dl
jb 0x93d6
jmp 0x91eb
leal -0x41(%rdx), %edi
movb $-0x37, %sil
cmpb $0x5, %dil
ja 0x91eb
addb %al, %cl
addb %dl, %sil
shlb $0x4, %cl
orb %sil, %cl
movsbl %cl, %esi
movq %r14, %rdi
callq 0x2200
addq $0x2, %r12
movq -0x60(%rbp), %rax
cmpq %rax, %r12
jb 0x936a
movabsq $0x1fffffffe, %rcx      # imm = 0x1FFFFFFFE
andq %rcx, %rax
cmpq $0x20, %rax
sete %r14b
jmp 0x91ee
callq 0x384e
callq 0x38b2
jmp 0x942c
jmp 0x9450
jmp 0x943f
movq %rax, %rbx
jmp 0x9464
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x9453
callq 0x2220
jmp 0x9453
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
jne 0x945f
jmp 0x9464
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
cmpq %r13, %rdi
je 0x9464
callq 0x2220
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9476
callq 0x2220
movq %rbx, %rdi
callq 0x2400