// File: /workspace/github_cpp_makefile_star2_O3/FFY00[P]uicc/src/program_uicc.c
// Function: readSIMvalues(char*)
bool readSIMvalues(char *port) {
    SIM SIMcard;
    string ATR;
    Assert((ATR=SIMcard.open(port))!="", "Failed to open %s", port);
    //dump_hex("ATR", ATR);
    vector<string> res;
    cout << "GSM IMSI: " << SIMcard.decodeIMSI(SIMcard.readFile("IMSI")[0]) << endl;
    // Show only the first isdn (might be several)
    cout << "GSM MSISDN: " << SIMcard.decodeISDN(SIMcard.readFile("MSISDN")[0]) <<endl;
    SIMcard.close();
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
movb $0x0, -0x40(%rbp)
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
leaq 0x13cc8(%rip), %rdi     # 0x18400
callq 0x2310
testq %rax, %rax
je 0x4751
movzbl (%rax), %eax
orl $0x20, %eax
cmpl $0x79, %eax
jne 0x4751
movb $0x1, -0x40(%rbp)
leaq -0x120(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq %rbx, %rdx
callq 0xaaf4
leaq -0x130(%rbp), %rdi
leaq -0x60(%rbp), %r15
movq %r15, %rsi
callq 0x2320
leaq 0x13c1d(%rip), %rsi     # 0x183b2
movq %rax, %rdi
callq 0x20b0
movl %eax, %r14d
movq (%r15), %rdi
leaq -0x50(%rbp), %r15
cmpq %r15, %rdi
je 0x47b1
callq 0x2220
testl %r14d, %r14d
je 0x4a1c
xorps %xmm0, %xmm0
movaps %xmm0, -0x90(%rbp)
movq $0x0, -0x80(%rbp)
movq 0x1a7f5(%rip), %rdi     # 0x1efc8
leaq 0x11b77(%rip), %rsi     # 0x16351
movl $0xa, %edx
callq 0x22c0
leaq -0xe0(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x11b66(%rip), %rsi     # 0x1635c
leaq 0x11b63(%rip), %rdx     # 0x16360
leaq -0xf0(%rbp), %rdi
callq 0x139ec
leaq -0x78(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0xad0c
movq -0x78(%rbp), %rax
leaq -0x100(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x110(%rbp), %rdi
callq 0x1394e
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x110(%rbp), %rdx
callq 0xabf6
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq 0x1a763(%rip), %rdi     # 0x1efc8
callq 0x22c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2190
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x48a2
callq 0x2220
movq -0x110(%rbp), %rdi
cmpq %r13, %rdi
je 0x48b3
callq 0x2220
leaq -0x78(%rbp), %rdi
callq 0xb2cc
movq -0xf0(%rbp), %rdi
cmpq %r14, %rdi
je 0x48cd
callq 0x2220
movq 0x1a6f4(%rip), %rdi     # 0x1efc8
leaq 0x11a86(%rip), %rsi     # 0x16361
movl $0xc, %edx
callq 0x22c0
leaq -0xa0(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x11a77(%rip), %rsi     # 0x1636e
leaq 0x11a76(%rip), %rdx     # 0x16374
leaq -0xb0(%rbp), %rdi
callq 0x139ec
leaq -0x78(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0xad0c
movq -0x78(%rbp), %rax
leaq -0xc0(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0xd0(%rbp), %rdi
callq 0x1394e
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0xb324
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq 0x1a662(%rip), %rdi     # 0x1efc8
callq 0x22c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2190
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x49a3
callq 0x2220
movq -0xd0(%rbp), %rdi
cmpq %r13, %rdi
je 0x49b4
callq 0x2220
leaq -0x78(%rbp), %rdi
callq 0xb2cc
movq -0xb0(%rbp), %rdi
cmpq %r14, %rdi
je 0x49ce
callq 0x2220
movl -0x3c(%rbp), %edi
cmpl $-0x1, %edi
je 0x49db
callq 0x2470
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
leaq -0x90(%rbp), %rdi
callq 0xb2cc
movq -0x130(%rbp), %rdi
cmpq %r12, %rdi
je 0x49ff
callq 0x2220
leaq -0x40(%rbp), %rdi
callq 0xb442
movb $0x1, %al
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2490
movq %rax, %rbx
jmp 0x4a64
movq %rax, %rbx
jmp 0x4a75
movq %rax, %rbx
jmp 0x4a7e
jmp 0x4a4e
movq %rax, %rbx
jmp 0x4a98
movq %rax, %rbx
jmp 0x4aa9
movq %rax, %rbx
jmp 0x4ab2
jmp 0x4a4e
movq %rax, %rbx
jmp 0x4acf
movq %rax, %rbx
jmp 0x4ac3
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x4a64
callq 0x2220
movq -0xd0(%rbp), %rdi
cmpq %r13, %rdi
je 0x4a75
callq 0x2220
leaq -0x78(%rbp), %rdi
callq 0xb2cc
movq -0xb0(%rbp), %rdi
jmp 0x4ab9
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x4a98
callq 0x2220
movq -0x110(%rbp), %rdi
cmpq %r13, %rdi
je 0x4aa9
callq 0x2220
leaq -0x78(%rbp), %rdi
callq 0xb2cc
movq -0xf0(%rbp), %rdi
cmpq %r14, %rdi
je 0x4ac3
callq 0x2220
leaq -0x90(%rbp), %rdi
callq 0xb2cc
movq -0x130(%rbp), %rdi
cmpq %r12, %rdi
je 0x4ae0
callq 0x2220
leaq -0x40(%rbp), %rdi
callq 0xb442
movq %rbx, %rdi
callq 0x2400