// File: /workspace/github_cpp_makefile_star2_O1/FFY00[P]uicc/include/uicc.h
// Function: SIM::readFileInfo()
bool readFileInfo() {
        string order(u8"\xa0\xc0\x00\x00\x0f",5);
        string good(u8"\x90\x00",2);
        write(order);
        string values=read();
        memcpy(&curFile,values.c_str(),
               min(values.size(),sizeof(curFile)) );

        if (debug) {
            static map<char, string> FileType= {{'\x01',"Master dir"}, {'\x02',"Sub dir"},{'\x04',"Element File"},};
            string fName=UICCFile(string((char *)&curFile.id,2),true);
            printf("File: %s, type: %s ",
                   fName.c_str(),
                   FileType[curFile.type].c_str());

            if ( curFile.type == 4 ) {
                static map<char, string> FileAccess= {{'\x00',"Always"},{'\x01',"Pin1"},{'\x02',"Pin2"},{'\x03',"RFU"},{'\x04',"ADM"},{'\x0e',"ADM"},{'\x0F',"Never"}, {'\x0a',"GR"}};
                static map<char, string> FileType= {{'\x00',"Transparent"},{'\x01',"Linear Fixed"},{'\x03',"Cyclic"}};
                printf("Type: %s, Access: read=%x (%s), update=%x (%s), size %hu\n",
                       FileType[curFile.structure].c_str(),
                       curFile.access[0]>>4,
                       FileAccess[curFile.access[0]>>4].c_str(),
                       curFile.access[0]&0xf,
                       FileAccess[curFile.access[0]&0xf].c_str(),
                       ntohs(curFile.size)
                      );
            } else
                printf("\n");
        }

        return values.substr(values.size()-2) == good;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rdi, %r14
leaq -0x68(%rbp), %r15
movq %r15, -0x10(%r15)
movl $0xc0a0, (%r15)         # imm = 0xC0A0
movw $0xf, 0x4(%r15)
movq $0x5, -0x8(%r15)
leaq -0x63(%rbp), %rdx
leaq -0x48(%rbp), %r12
movq %r12, -0x10(%r12)
movw $0x90, (%r12)
movq $0x2, -0x8(%r12)
movb $0x0, 0x2(%r12)
leaq -0xc8(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq -0xd8(%rbp), %rdi
movq %r15, %rsi
callq 0x1372a
leaq -0xd8(%rbp), %rsi
movq %r14, %rdi
callq 0xe6b2
movq -0xd8(%rbp), %rdi
cmpq %rbx, %rdi
je 0xfd82
callq 0x2220
leaq -0x98(%rbp), %rdi
movl $0x400, %edx            # imm = 0x400
movq %r14, %rsi
callq 0xde7c
leaq 0x8(%r14), %rdi
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rax
cmpq $0xf, %rax
movl $0xf, %edx
cmovbq %rax, %rdx
callq 0x21f0
cmpb $0x1, (%r14)
jne 0xff22
movb 0xf716(%rip), %al       # 0x1f4e0
testb %al, %al
je 0xffd1
leaq -0xe8(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movzwl 0xc(%r14), %eax
movw %ax, (%rbx)
movq $0x2, -0x8(%rbx)
movb $0x0, 0x2(%rbx)
leaq -0xb8(%rbp), %rdi
leaq -0xf8(%rbp), %rdx
movq %r14, %rsi
movl $0x1, %ecx
callq 0xed88
movq -0xf8(%rbp), %rdi
cmpq %rbx, %rdi
je 0xfe1d
callq 0x2220
movq -0xb8(%rbp), %rbx
movb 0xe(%r14), %al
leaq -0x238(%rbp), %rsi
movb %al, (%rsi)
leaq 0xf678(%rip), %rdi      # 0x1f4b0
callq 0x10ea2
movq (%rax), %rdx
leaq 0x8a99(%rip), %rdi      # 0x188e0
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2060
cmpb $0x4, 0xe(%r14)
jne 0xff03
movb 0xf6b6(%rip), %al       # 0x1f518
testb %al, %al
je 0x100bc
movb 0xf6e0(%rip), %al       # 0x1f550
testb %al, %al
je 0x10230
movb 0x15(%r14), %al
leaq -0x238(%rbp), %rsi
movb %al, (%rsi)
leaq 0xf694(%rip), %rdi      # 0x1f520
callq 0x10ea2
movq (%rax), %r15
movzbl 0x10(%r14), %r12d
shrl $0x4, %r12d
leaq -0x2a(%rbp), %rsi
movb %r12b, (%rsi)
leaq 0xf63d(%rip), %rdi      # 0x1f4e8
callq 0x10ea2
movq (%rax), %r13
movzbl 0x10(%r14), %ebx
andl $0xf, %ebx
leaq -0x29(%rbp), %rsi
movb %bl, (%rsi)
leaq 0xf620(%rip), %rdi      # 0x1f4e8
callq 0x10ea2
movq (%rax), %r9
movzwl 0xa(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, (%rsp)
leaq 0x8a50(%rip), %rdi      # 0x18936
movq %r15, %rsi
movl %r12d, %edx
movq %r13, %rcx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x2060
leaq -0x68(%rbp), %r15
leaq -0x48(%rbp), %r12
jmp 0xff0d
movl $0xa, %edi
callq 0x2340
leaq -0xa8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xff22
callq 0x2220
leaq -0x98(%rbp), %rsi
movq 0x8(%rsi), %rdx
addq $-0x2, %rdx
leaq -0x238(%rbp), %rdi
movq $-0x1, %rcx
callq 0x2270
movq -0x230(%rbp), %rdx
cmpq -0x50(%rbp), %rdx
jne 0xff6e
testq %rdx, %rdx
je 0xff73
movq -0x58(%rbp), %rsi
movq -0x238(%rbp), %rdi
callq 0x2260
testl %eax, %eax
sete %r14b
jmp 0xff76
xorl %r14d, %r14d
jmp 0xff76
movb $0x1, %r14b
leaq -0x228(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xff8b
callq 0x2220
leaq -0x88(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xffa0
callq 0x2220
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0xffae
callq 0x2220
movq -0x78(%rbp), %rdi
cmpq %r15, %rdi
je 0xffbc
callq 0x2220
movl %r14d, %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf508(%rip), %rdi      # 0x1f4e0
callq 0x2430
testl %eax, %eax
je 0xfdd2
leaq -0xb8(%rbp), %rsi
movb $0x1, (%rsi)
leaq 0x88ca(%rip), %rdx      # 0x188c0
leaq -0x238(%rbp), %r12
movq %r12, %rdi
callq 0x10d72
leaq -0x210(%rbp), %r15
leaq -0x2a(%rbp), %rsi
movb $0x2, (%rsi)
leaq 0x88b1(%rip), %rdx      # 0x188cb
movq %r15, %rdi
callq 0x10da8
leaq -0x1e8(%rbp), %r15
leaq -0x29(%rbp), %rsi
movb $0x4, (%rsi)
leaq 0x889c(%rip), %rdx      # 0x188d3
movq %r15, %rdi
callq 0x10dde
leaq 0xf46a(%rip), %rdi      # 0x1f4b0
leaq -0x238(%rbp), %rsi
leaq -0x2c(%rbp), %rcx
leaq -0x2b(%rbp), %r8
movl $0x3, %edx
callq 0x10e14
leaq -0x1d0(%rbp), %rbx
xorl %r15d, %r15d
movq -0x1e0(%rbp,%r15), %rdi
leaq (%rbx,%r15), %rax
cmpq %rdi, %rax
je 0x1007f
callq 0x2220
addq $-0x28, %r15
cmpq $-0x78, %r15
jne 0x10069
leaq 0xe08(%rip), %rdi       # 0x10e98
leaq 0xf419(%rip), %rsi      # 0x1f4b0
leaq 0xf1aa(%rip), %rdx      # 0x1f248
callq 0x2210
leaq 0xf436(%rip), %rdi      # 0x1f4e0
callq 0x2180
leaq -0x68(%rbp), %r15
leaq -0x48(%rbp), %r12
jmp 0xfdd2
leaq 0xf455(%rip), %rdi      # 0x1f518
callq 0x2430
testl %eax, %eax
je 0xfe6a
leaq -0x2a(%rbp), %rsi
movb $0x0, (%rsi)
leaq 0x8816(%rip), %rdx      # 0x188f4
leaq -0x238(%rbp), %r12
movq %r12, %rdi
callq 0x10f0a
leaq -0x210(%rbp), %r15
leaq -0x29(%rbp), %rsi
movb $0x1, (%rsi)
leaq 0x87f9(%rip), %rdx      # 0x188fb
movq %r15, %rdi
callq 0x10f40
leaq -0x1e8(%rbp), %r15
leaq -0x2c(%rbp), %rsi
movb $0x2, (%rsi)
leaq 0x87e1(%rip), %rdx      # 0x18900
movq %r15, %rdi
callq 0x10f40
leaq -0x1c0(%rbp), %r15
leaq -0x2b(%rbp), %rsi
movb $0x3, (%rsi)
leaq 0x87c9(%rip), %rdx      # 0x18905
movq %r15, %rdi
callq 0x10f76
leaq -0x198(%rbp), %r15
leaq -0x2d(%rbp), %rsi
movb $0x4, (%rsi)
leaq 0x87b0(%rip), %rdx      # 0x18909
movq %r15, %rdi
callq 0x10f76
leaq -0x170(%rbp), %r15
leaq -0x32(%rbp), %rsi
movb $0xe, (%rsi)
leaq 0x8793(%rip), %rdx      # 0x18909
movq %r15, %rdi
callq 0x10f76
leaq -0x148(%rbp), %r15
leaq -0x31(%rbp), %rsi
movb $0xf, (%rsi)
leaq 0x877a(%rip), %rdx      # 0x1890d
movq %r15, %rdi
callq 0x10fac
leaq -0x120(%rbp), %r15
leaq -0x30(%rbp), %rsi
movb $0xa, (%rsi)
leaq 0x8763(%rip), %rdx      # 0x18913
movq %r15, %rdi
callq 0x10fe2
leaq 0xf329(%rip), %rdi      # 0x1f4e8
leaq -0x238(%rbp), %rsi
leaq -0x2f(%rbp), %rcx
leaq -0x2e(%rbp), %r8
movl $0x8, %edx
callq 0x10e14
leaq -0x108(%rbp), %rbx
xorl %r15d, %r15d
movq -0x118(%rbp,%r15), %rdi
leaq (%rbx,%r15), %rax
cmpq %rdi, %rax
je 0x101f8
callq 0x2220
addq $-0x28, %r15
cmpq $-0x140, %r15           # imm = 0xFEC0
jne 0x101e2
leaq 0xc8c(%rip), %rdi       # 0x10e98
leaq 0xf2d5(%rip), %rsi      # 0x1f4e8
leaq 0xf02e(%rip), %rdx      # 0x1f248
callq 0x2210
leaq 0xf2f2(%rip), %rdi      # 0x1f518
callq 0x2180
jmp 0xfe6a
leaq 0xf319(%rip), %rdi      # 0x1f550
callq 0x2430
testl %eax, %eax
je 0xfe78
leaq -0x2a(%rbp), %rsi
movb $0x0, (%rsi)
leaq 0x86c4(%rip), %rdx      # 0x18916
leaq -0x238(%rbp), %r12
movq %r12, %rdi
callq 0x11018
leaq -0x210(%rbp), %r15
leaq -0x29(%rbp), %rsi
movb $0x1, (%rsi)
leaq 0x86ac(%rip), %rdx      # 0x18922
movq %r15, %rdi
callq 0x10dde
leaq -0x1e8(%rbp), %r15
leaq -0x2c(%rbp), %rsi
movb $0x3, (%rsi)
leaq 0x869c(%rip), %rdx      # 0x1892f
movq %r15, %rdi
callq 0x10f0a
leaq 0xf27e(%rip), %rdi      # 0x1f520
leaq -0x238(%rbp), %rsi
leaq -0x2b(%rbp), %rcx
leaq -0x2d(%rbp), %r8
movl $0x3, %edx
callq 0x10e14
leaq -0x1d0(%rbp), %rbx
xorl %r15d, %r15d
movq -0x1e0(%rbp,%r15), %rdi
leaq (%rbx,%r15), %rax
cmpq %rdi, %rax
je 0x102db
callq 0x2220
addq $-0x28, %r15
cmpq $-0x78, %r15
jne 0x102c5
leaq 0xbac(%rip), %rdi       # 0x10e98
leaq 0xf22d(%rip), %rsi      # 0x1f520
leaq 0xef4e(%rip), %rdx      # 0x1f248
callq 0x2210
leaq 0xf24a(%rip), %rdi      # 0x1f550
callq 0x2180
jmp 0xfe78
movq %rax, %r14
movq $-0x78, %rbx
leaq -0x1d0(%rbp), %r13
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x1032f
callq 0x2220
addq $-0x28, %r13
addq $0x28, %rbx
jne 0x10321
movb $0x1, %al
jmp 0x1034e
jmp 0x1033f
movq %rax, %r14
xorl %eax, %eax
jmp 0x1034e
movq %rax, %r14
xorl %eax, %eax
movq %r12, %r15
cmpq %r15, %r12
sete %cl
orb %al, %cl
jne 0x10381
addq $-0x10, %r15
leaq -0x238(%rbp), %rbx
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x10371
callq 0x2220
leaq -0x28(%r15), %rax
addq $-0x18, %r15
cmpq %rbx, %r15
movq %rax, %r15
jne 0x10363
leaq 0xf1c8(%rip), %rdi      # 0x1f550
jmp 0x10406
movq %rax, %r14
movq $-0x140, %rbx           # imm = 0xFEC0
leaq -0x108(%rbp), %r13
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x103a9
callq 0x2220
addq $-0x28, %r13
addq $0x28, %rbx
jne 0x1039b
movb $0x1, %al
jmp 0x103c8
jmp 0x103c3
jmp 0x103c3
jmp 0x103c3
jmp 0x103c3
jmp 0x103c3
jmp 0x103c3
movq %rax, %r14
xorl %eax, %eax
cmpq %r15, %r12
sete %cl
testb %al, %al
jne 0x103ff
testb %cl, %cl
jne 0x103ff
addq $-0x10, %r15
leaq -0x238(%rbp), %rbx
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x103ef
callq 0x2220
leaq -0x28(%r15), %rax
addq $-0x18, %r15
cmpq %rbx, %r15
movq %rax, %r15
jne 0x103e1
leaq 0xf112(%rip), %rdi      # 0x1f518
callq 0x2170
jmp 0x104a2
movq %rax, %r14
xorl %eax, %eax
movq %r12, %r15
jmp 0x103c8
movq %rax, %r14
movq $-0x78, %rbx
leaq -0x1d0(%rbp), %r13
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x10439
callq 0x2220
addq $-0x28, %r13
addq $0x28, %rbx
jne 0x1042b
movb $0x1, %al
jmp 0x10458
jmp 0x10449
movq %rax, %r14
xorl %eax, %eax
jmp 0x10458
movq %rax, %r14
xorl %eax, %eax
movq %r12, %r15
cmpq %r15, %r12
sete %cl
orb %al, %cl
jne 0x1048b
addq $-0x10, %r15
leaq -0x238(%rbp), %rbx
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x1047b
callq 0x2220
leaq -0x28(%r15), %rax
addq $-0x18, %r15
cmpq %rbx, %r15
movq %rax, %r15
jne 0x1046d
leaq 0xf04e(%rip), %rdi      # 0x1f4e0
callq 0x2170
jmp 0x104cd
jmp 0x1049f
jmp 0x1049f
jmp 0x1049f
movq %rax, %r14
leaq -0xa8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x104c3
jmp 0x104cd
movq %rax, %r14
movq -0xf8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x104cd
callq 0x2220
jmp 0x104cd
movq %rax, %r14
leaq -0x88(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x104f0
jmp 0x104fa
jmp 0x104f7
movq %rax, %r14
movq -0xd8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x104fa
callq 0x2220
jmp 0x104fa
movq %rax, %r14
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x1050c
callq 0x2220
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x1051e
callq 0x2220
movq %r14, %rdi
callq 0x2400