// File: /workspace/github_cpp_makefile_star2_O1/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 0x13cc7(%rip), %rdi     # 0x18400
callq 0x2310
testq %rax, %rax
je 0x4752
movzbl (%rax), %eax
orl $0x20, %eax
cmpl $0x79, %eax
jne 0x4752
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 0xa812
leaq -0x130(%rbp), %rdi
leaq -0x60(%rbp), %r15
movq %r15, %rsi
callq 0x2320
leaq 0x13c1c(%rip), %rsi     # 0x183b2
movq %rax, %rdi
callq 0x20b0
movl %eax, %r14d
movq (%r15), %rdi
leaq -0x50(%rbp), %r15
cmpq %r15, %rdi
je 0x47b2
callq 0x2220
testl %r14d, %r14d
je 0x4a1d
xorps %xmm0, %xmm0
movaps %xmm0, -0x90(%rbp)
movq $0x0, -0x80(%rbp)
movq 0x1a7f4(%rip), %rdi     # 0x1efc8
leaq 0x11b76(%rip), %rsi     # 0x16351
movl $0xa, %edx
callq 0x22c0
leaq -0xe0(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x11b65(%rip), %rsi     # 0x1635c
leaq 0x11b62(%rip), %rdx     # 0x16360
leaq -0xf0(%rbp), %rdi
callq 0x137c4
leaq -0x78(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0xaa24
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 0x1372a
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x110(%rbp), %rdx
callq 0xa914
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq 0x1a762(%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 0x48a3
callq 0x2220
movq -0x110(%rbp), %rdi
cmpq %r13, %rdi
je 0x48b4
callq 0x2220
leaq -0x78(%rbp), %rdi
callq 0xafd4
movq -0xf0(%rbp), %rdi
cmpq %r14, %rdi
je 0x48ce
callq 0x2220
movq 0x1a6f3(%rip), %rdi     # 0x1efc8
leaq 0x11a85(%rip), %rsi     # 0x16361
movl $0xc, %edx
callq 0x22c0
leaq -0xa0(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x11a76(%rip), %rsi     # 0x1636e
leaq 0x11a75(%rip), %rdx     # 0x16374
leaq -0xb0(%rbp), %rdi
callq 0x137c4
leaq -0x78(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0xaa24
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 0x1372a
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0xb022
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq 0x1a661(%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 0x49a4
callq 0x2220
movq -0xd0(%rbp), %rdi
cmpq %r13, %rdi
je 0x49b5
callq 0x2220
leaq -0x78(%rbp), %rdi
callq 0xafd4
movq -0xb0(%rbp), %rdi
cmpq %r14, %rdi
je 0x49cf
callq 0x2220
movl -0x3c(%rbp), %edi
cmpl $-0x1, %edi
je 0x49dc
callq 0x2470
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
leaq -0x90(%rbp), %rdi
callq 0xafd4
movq -0x130(%rbp), %rdi
cmpq %r12, %rdi
je 0x4a00
callq 0x2220
leaq -0x40(%rbp), %rdi
callq 0xb13c
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 0x4a65
movq %rax, %rbx
jmp 0x4a76
movq %rax, %rbx
jmp 0x4a7f
jmp 0x4a4f
movq %rax, %rbx
jmp 0x4a99
movq %rax, %rbx
jmp 0x4aaa
movq %rax, %rbx
jmp 0x4ab3
jmp 0x4a4f
movq %rax, %rbx
jmp 0x4ad0
movq %rax, %rbx
jmp 0x4ac4
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x4a65
callq 0x2220
movq -0xd0(%rbp), %rdi
cmpq %r13, %rdi
je 0x4a76
callq 0x2220
leaq -0x78(%rbp), %rdi
callq 0xafd4
movq -0xb0(%rbp), %rdi
jmp 0x4aba
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x4a99
callq 0x2220
movq -0x110(%rbp), %rdi
cmpq %r13, %rdi
je 0x4aaa
callq 0x2220
leaq -0x78(%rbp), %rdi
callq 0xafd4
movq -0xf0(%rbp), %rdi
cmpq %r14, %rdi
je 0x4ac4
callq 0x2220
leaq -0x90(%rbp), %rdi
callq 0xafd4
movq -0x130(%rbp), %rdi
cmpq %r12, %rdi
je 0x4ae1
callq 0x2220
leaq -0x40(%rbp), %rdi
callq 0xb13c
movq %rbx, %rdi
callq 0x2400