// File: /workspace/github_c_makefile_star2_O1/Carton32[P]quectel-CM/QMIThread.c
// Function: requestRegistrationState
static int requestRegistrationState(UCHAR *pPSAttachedState) {
    PQCQMIMSG pRequest;
    PQCQMIMSG pResponse;
    PQMUX_MSG pMUXMsg;
    int err;
    PQMINAS_CURRENT_PLMN_MSG pCurrentPlmn;
    PSERVING_SYSTEM pServingSystem;
    PQMINAS_DATA_CAP pDataCap;
    USHORT MobileCountryCode = 0;
    USHORT MobileNetworkCode = 0;
    const char *pDataCapStr = "UNKNOW";

    if (s_9x07) {
        return requestRegistrationState2(pPSAttachedState);
    }

    pRequest = ComposeQMUXMsg(QMUX_TYPE_NAS, QMINAS_GET_SERVING_SYSTEM_REQ, NULL, NULL);
    err = QmiThreadSendQMI(pRequest, &pResponse);
    qmi_rsp_check_and_return();

    pCurrentPlmn = (PQMINAS_CURRENT_PLMN_MSG)GetTLV(&pResponse->MUXMsg.QMUXMsgHdr, 0x12);
    if (pCurrentPlmn) {
        MobileCountryCode = le16_to_cpu(pCurrentPlmn->MobileCountryCode);
        MobileNetworkCode = le16_to_cpu(pCurrentPlmn->MobileNetworkCode);
    }

    *pPSAttachedState = 0;
    pServingSystem = (PSERVING_SYSTEM)GetTLV(&pResponse->MUXMsg.QMUXMsgHdr, 0x01);
    if (pServingSystem) {
    //Packet-switched domain attach state of the mobile.
    //0x00    PS_UNKNOWN ?Unknown or not applicable
    //0x01    PS_ATTACHED ?Attached
    //0x02    PS_DETACHED ?Detached
        *pPSAttachedState = pServingSystem->RegistrationState;
        if (pServingSystem->RegistrationState == 0x01) //0x01 ?C REGISTERED ?C Registered with a network
            *pPSAttachedState  = pServingSystem->PSAttachedState;
        else {
            //MobileCountryCode = MobileNetworkCode = 0;
            *pPSAttachedState  = 0x02;
        }
    }

    pDataCap = (PQMINAS_DATA_CAP)GetTLV(&pResponse->MUXMsg.QMUXMsgHdr, 0x11);
    if (pDataCap && pDataCap->DataCapListLen) {
        UCHAR *DataCap = &pDataCap->DataCap;
        if (pDataCap->DataCapListLen == 2) {
            if ((DataCap[0] == 0x06) && ((DataCap[1] == 0x08) || (DataCap[1] == 0x0A)))
                DataCap[0] = DataCap[1];
        }
        switch (DataCap[0]) {
             case 0x01: pDataCapStr = "GPRS"; break;
             case 0x02: pDataCapStr = "EDGE"; break;
             case 0x03: pDataCapStr = "HSDPA"; break;
             case 0x04: pDataCapStr = "HSUPA"; break;
             case 0x05: pDataCapStr = "UMTS"; break;
             case 0x06: pDataCapStr = "1XRTT"; break;
             case 0x07: pDataCapStr = "1XEVDO"; break;
             case 0x08: pDataCapStr = "1XEVDO_REVA"; break;
             case 0x09: pDataCapStr = "GPRS"; break;
             case 0x0A: pDataCapStr = "1XEVDO_REVB"; break;
             case 0x0B: pDataCapStr = "LTE"; break;
             case 0x0C: pDataCapStr = "HSDPA"; break;
             case 0x0D: pDataCapStr = "HSDPA"; break;
             default: pDataCapStr = "UNKNOW"; break;
        }
    }

    if (pServingSystem && pServingSystem->RegistrationState == 0x01 && pServingSystem->InUseRadioIF && pServingSystem->RadioIF == 0x09) {
        pDataCapStr = "TD-SCDMA";
    }

    s_is_cdma = 0;
    if (pServingSystem && pServingSystem->RegistrationState == 0x01 && pServingSystem->InUseRadioIF && (pServingSystem->RadioIF == 0x01 || pServingSystem->RadioIF == 0x02)) {
        USHORT cmda_mcc = 0, cdma_mnc = 0;
        s_is_cdma = 1;
        if(!requestGetHomeNetwork(&cmda_mcc, &cdma_mnc,NULL, NULL) && cmda_mcc) {
            quectel_convert_cdma_mcc_2_ascii_mcc(&MobileCountryCode, cmda_mcc);
            quectel_convert_cdma_mnc_2_ascii_mnc(&MobileNetworkCode, cdma_mnc);
        }
        if (1) {
            PQCQMUX_TLV pTLV = (PQCQMUX_TLV)GetTLV(&pResponse->MUXMsg.QMUXMsgHdr, 0x23);
            if (pTLV)
                s_hdr_personality = pTLV->Value;
            else
                s_hdr_personality = 0;
            if (s_hdr_personality == 2)
                pDataCapStr = "eHRPD";
        }
    }

    dbg_time("%s MCC: %d, MNC: %d, PS: %s, DataCap: %s", __func__,
        MobileCountryCode, MobileNetworkCode, (*pPSAttachedState == 1) ? "Attached" : "Detached" , pDataCapStr);

    free(pResponse);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movw $0x0, 0x1c(%rsp)
cmpl $0x0, 0x1e360(%rip)     # 0x2a2f8
je 0xc04a
movw $0x0, 0xe(%rsp)
movb $0x0, (%rbx)
movl $0x3, %edi
movl $0x4d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xda86
leaq 0x14b1b(%rip), %rcx     # 0x20add
leaq 0x28(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
movl $0x7530, %edx           # imm = 0x7530
callq 0xa317
movl %eax, %ebp
testl %eax, %eax
sets %al
movq (%r14), %r12
testq %r12, %r12
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0xc0fc
movq 0x1dfc7(%rip), %rax     # 0x29fc0
movq (%rax), %rbx
callq 0xeb2f
leaq 0x1477d(%rip), %rsi     # 0x20785
leaq 0x14ace(%rip), %rcx     # 0x20add
movq %rbx, %rdi
movq %rax, %rdx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x52c0
leaq 0x1ec82(%rip), %rax     # 0x2aca8
movq (%rax), %rbx
testq %rbx, %rbx
je 0xc26d
callq 0xeb2f
leaq 0x14747(%rip), %rsi     # 0x20785
leaq 0x14a98(%rip), %rcx     # 0x20add
jmp 0xc0e7
movl $0x3, %edi
movl $0x24, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xda86
leaq 0x149d2(%rip), %rcx     # 0x20a36
leaq 0x28(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
movl $0x7530, %edx           # imm = 0x7530
callq 0xa317
movl %eax, %ebp
testl %eax, %eax
sets %al
movq (%r14), %r12
testq %r12, %r12
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0xc1ac
movq 0x1df25(%rip), %rax     # 0x29fc0
movq (%rax), %rbx
callq 0xeb2f
leaq 0x146db(%rip), %rsi     # 0x20785
leaq 0x14985(%rip), %rcx     # 0x20a36
movq %rbx, %rdi
movq %rax, %rdx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x52c0
leaq 0x1ebe0(%rip), %rax     # 0x2aca8
movq (%rax), %rbx
testq %rbx, %rbx
je 0xc26d
callq 0xeb2f
leaq 0x146a5(%rip), %rsi     # 0x20785
leaq 0x1494f(%rip), %rcx     # 0x20a36
movq %rbx, %rdi
movq %rax, %rdx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x52c0
jmp 0xc26d
movzwl 0x10(%r12), %edi
callq 0xef61
testw %ax, %ax
jne 0xc120
movzwl 0x12(%r12), %edi
callq 0xef61
testw %ax, %ax
je 0xc27e
movzwl 0x12(%r12), %edi
callq 0xef61
movl %eax, %ebx
movq 0x1de8c(%rip), %rax     # 0x29fc0
movq (%rax), %r14
callq 0xeb2f
movq %rax, %r15
movzwl 0x10(%r12), %edi
callq 0xef61
movzwl %ax, %r8d
movzwl %bx, %ebp
leaq 0x1463f(%rip), %rsi     # 0x20797
leaq 0x1497e(%rip), %rcx     # 0x20add
movq %r14, %rdi
movq %r15, %rdx
movl %ebp, %r9d
xorl %eax, %eax
callq 0x52c0
leaq 0x1eb32(%rip), %rax     # 0x2aca8
movq (%rax), %rbx
testq %rbx, %rbx
je 0xc263
callq 0xeb2f
movq %rax, %r14
movzwl 0x10(%r12), %edi
callq 0xef61
movzwl %ax, %r8d
leaq 0x145f7(%rip), %rsi     # 0x20797
leaq 0x14936(%rip), %rcx     # 0x20add
jmp 0xc253
movzwl 0x10(%r12), %edi
callq 0xef61
testw %ax, %ax
jne 0xc1d0
movzwl 0x12(%r12), %edi
callq 0xef61
testw %ax, %ax
je 0xc63e
movzwl 0x12(%r12), %edi
callq 0xef61
movl %eax, %ebx
movq 0x1dddc(%rip), %rax     # 0x29fc0
movq (%rax), %r14
callq 0xeb2f
movq %rax, %r15
movzwl 0x10(%r12), %edi
callq 0xef61
movzwl %ax, %r8d
movzwl %bx, %ebp
leaq 0x1458f(%rip), %rsi     # 0x20797
leaq 0x14827(%rip), %rcx     # 0x20a36
movq %r14, %rdi
movq %r15, %rdx
movl %ebp, %r9d
xorl %eax, %eax
callq 0x52c0
leaq 0x1ea82(%rip), %rax     # 0x2aca8
movq (%rax), %rbx
testq %rbx, %rbx
je 0xc263
callq 0xeb2f
movq %rax, %r14
movzwl 0x10(%r12), %edi
callq 0xef61
movzwl %ax, %r8d
leaq 0x1454b(%rip), %rsi     # 0x20797
leaq 0x147e3(%rip), %rcx     # 0x20a36
movq %rbx, %rdi
movq %r14, %rdx
movl %ebp, %r9d
xorl %eax, %eax
callq 0x52c0
movq 0x28(%rsp), %rdi
callq 0x5040
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzwl 0xb(%r12), %edi
callq 0xef61
xorl %r14d, %r14d
movl %r14d, 0x1e9a1(%rip)    # 0x2ac34
movl %r14d, 0x1e99e(%rip)    # 0x2ac38
testw %ax, %ax
je 0xc67c
movzwl %ax, %r14d
addq $0xd, %r12
leaq 0x1477d(%rip), %rax     # 0x20a2f
movq %rax, 0x30(%rsp)
movb $0x1, 0x1b(%rsp)
leaq 0x143cd(%rip), %r13     # 0x20690
movl $0x0, 0x40(%rsp)
movl $0x0, 0x44(%rsp)
movl $0x0, 0x3c(%rsp)
xorl %r15d, %r15d
xorl %ebp, %ebp
movl $0x0, 0x20(%rsp)
movl $0x0, 0x10(%rsp)
movzbl (%r12), %eax
leal -0x10(%rax), %ecx
cmpl $0x15, %ecx
ja 0xc32e
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
cmpb $0x2, 0x3(%r12)
jne 0xc585
xorl %eax, %eax
cmpl $0x0, 0x20(%rsp)
sete %al
movl %eax, 0x1e911(%rip)     # 0x2ac34
movl $0x2f0000, %r15d        # imm = 0x2F0000
jmp 0xc470
addl $-0x4a, %eax
cmpl $0x5, %eax
ja 0xc585
leaq 0x143a7(%rip), %rcx     # 0x206e8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpb $0x2, 0x3(%r12)
jne 0xc585
orl $0x80, %r15d
movl $0x0, 0x1e8cd(%rip)     # 0x2ac34
jmp 0xc3a5
cmpb $0x1, 0x3(%r12)
jne 0xc49d
testb $0x2, 0x4(%r12)
je 0xc49d
movb $0x1, (%rbx)
jmp 0xc49d
cmpb $0x2, 0x3(%r12)
jne 0xc585
movl $0x0, 0x1e895(%rip)     # 0x2ac34
movl $0x20, %r15d
movb $0x2, %bpl
movl $0x1, 0x20(%rsp)
jmp 0xc585
cmpb $0x1, 0x3(%r12)
jne 0xc3d8
testb $0x2, 0x4(%r12)
je 0xc3d8
movb $0x1, (%rbx)
xorl %eax, %eax
cmpl $0x0, 0x20(%rsp)
sete %al
movl %eax, 0x1e85c(%rip)     # 0x2ac34
cmpb $0x0, (%rbx)
je 0xc3f7
cmpb $0x1, 0xd(%r12)
jne 0xc3f7
cmpb $0x3, 0xe(%r12)
jne 0xc3f7
movl $0x2, 0x1e841(%rip)     # 0x2ac38
xorl %eax, %eax
movw %ax, 0x1e(%rsp)
movw %ax, 0x26(%rsp)
leaq 0x1e(%rsp), %rdi
leaq 0x26(%rsp), %rsi
callq 0xe3b4
testl %eax, %eax
sete %cl
movzwl 0x1e(%rsp), %eax
testw %ax, %ax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0xc585
movzwl %ax, %esi
leaq 0xe(%rsp), %rdi
callq 0xe59a
movzwl 0x26(%rsp), %eax
cmpl $0x7f, %eax
jne 0xc5ba
movw $0x7, %ax
jmp 0xc4c2
cmpb $0x2, 0x3(%r12)
jne 0xc585
xorl %eax, %eax
cmpl $0x0, 0x20(%rsp)
sete %al
movl %eax, 0x1e7ca(%rip)     # 0x2ac34
movl $0x500000, %r15d        # imm = 0x500000
movb $0x1, %bpl
jmp 0xc585
cmpb $0x1, 0x3(%r12)
jne 0xc49d
testb $0x2, 0x4(%r12)
je 0xc49d
movb $0x1, (%rbx)
movl $0x0, 0x1e79f(%rip)     # 0x2ac34
movl $0x1, 0x20(%rsp)
cmpb $0x1, 0x16(%r12)
jne 0xc585
leaq 0x17(%r12), %rdi
callq 0xe62a
movw %ax, 0xe(%rsp)
leaq 0x1a(%r12), %rdi
callq 0xe62a
movl %eax, 0x10(%rsp)
jmp 0xc585
cmpb $0x2, 0x3(%r12)
movzbl %bpl, %ebp
movl $0x2, %eax
cmovel %eax, %ebp
movl $0x3, %eax
jmp 0xc4fb
cmpb $0x2, 0x3(%r12)
movzbl %bpl, %ebp
movl $0x2, %eax
cmovel %eax, %ebp
movl $0x4, %eax
cmovel %eax, %r15d
jmp 0xc585
cmpb $0x1, 0x3(%r12)
jne 0xc527
testb $0x2, 0x4(%r12)
je 0xc527
movb $0x1, (%rbx)
xorl %eax, %eax
cmpl $0x0, 0x20(%rsp)
sete %al
movl %eax, 0x1e70d(%rip)     # 0x2ac34
cmpb $0x1, 0x26(%r12)
jne 0xc585
leaq 0x27(%r12), %rdi
callq 0xe62a
movw %ax, 0xe(%rsp)
leaq 0x2a(%r12), %rdi
jmp 0xc4bd
cmpb $0x2, 0x3(%r12)
movq 0x30(%rsp), %rax
leaq 0x14533(%rip), %rcx     # 0x20a8d
cmoveq %rcx, %rax
movq %rax, 0x30(%rsp)
jmp 0xc585
movb 0x3(%r12), %al
movl %eax, 0x44(%rsp)
movb $0x1, %al
movl %eax, 0x3c(%rsp)
jmp 0xc585
movb 0x3(%r12), %al
movb %al, 0x1b(%rsp)
movb $0x1, %al
movl %eax, 0x40(%rsp)
movzwl 0x1(%r12), %edi
callq 0xef61
movzwl %ax, %eax
subq %rax, %r14
addq $-0x3, %r14
movzwl 0x1(%r12), %edi
callq 0xef61
movzwl %ax, %eax
addq %rax, %r12
addq $0x3, %r12
testq %r14, %r14
jg 0xc2f0
jmp 0xc609
leal 0xb(%rax), %edx
imulq $0x1999999a, %rdx, %rcx # imm = 0x1999999A
shrq $0x20, %rcx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %esi
incl %eax
movl %edx, %ecx
subl %esi, %ecx
cmovnel %edx, %eax
imulq $0x1999999a, %rax, %rdx # imm = 0x1999999A
shrq $0x20, %rdx
addl $-0x64, %eax
xorl %esi, %esi
cmpl $0xa, %eax
cmovbl %esi, %edx
cmpl $0x9, %edx
ja 0xc5fc
leal (%rdx,%rdx,4), %eax
leal (%rcx,%rax,2), %eax
jmp 0xc4c2
movl $0x0, 0x10(%rsp)
jmp 0xc585
cmpb $0x0, 0x3c(%rsp)
sete %al
cmpb $0x0, 0x40(%rsp)
sete %cl
orb %al, %cl
cmpb $0x0, 0x44(%rsp)
sete %al
cmpb $0x0, 0x1b(%rsp)
setne %sil
orb %al, %sil
cmpb $0x1, %bpl
sete %dl
movzwl 0x10(%rsp), %r14d
jmp 0xc692
movq 0x28(%rsp), %rdi
addq $0x9, %rdi
movl $0x12, %esi
callq 0xa29c
testq %rax, %rax
je 0xc74a
movq %rax, %r14
movzwl 0x3(%rax), %edi
callq 0xef61
movw %ax, 0x1c(%rsp)
movzwl 0x5(%r14), %edi
callq 0xef61
movl %eax, %ebp
jmp 0xc74c
movb $0x1, %cl
leaq 0x143aa(%rip), %rax     # 0x20a2f
movq %rax, 0x30(%rsp)
xorl %edx, %edx
xorl %r15d, %r15d
movb $0x1, %sil
movl %r15d, %eax
orl $0x40, %eax
testb $0x1, %sil
cmovnel %r15d, %eax
testb $0x1, %cl
cmovnel %r15d, %eax
testb $0x20, %r15b
cmovel %r15d, %eax
testb %dl, %dl
je 0xc6c8
cmpl $0x2, 0x1e57e(%rip)     # 0x2ac38
jne 0xc6f6
leaq 0x143d3(%rip), %rax     # 0x20a96
jmp 0xca27
testb %al, %al
js 0xc73e
testb $0x40, %al
jne 0xc9a2
testb $0x20, %al
jne 0xc9b4
movl %eax, %ecx
andl $0x18, %ecx
cmpl $0x18, %ecx
jne 0xc9c6
leaq 0x14406(%rip), %rax     # 0x20af7
jmp 0xca27
btl $0x15, %eax
jb 0xc9ab
btl $0x12, %eax
jb 0xc9bd
btl $0x11, %eax
jb 0xc9fc
btl $0x10, %eax
jb 0xca05
btl $0x14, %eax
jb 0xca0e
btl $0x16, %eax
leaq 0x143e3(%rip), %rax     # 0x20b16
cmovaeq 0x30(%rsp), %rax
jmp 0xca27
leaq 0x143c5(%rip), %rax     # 0x20b0a
jmp 0xca27
xorl %ebp, %ebp
movb $0x0, (%rbx)
movq 0x28(%rsp), %rdi
addq $0x9, %rdi
movl $0x1, %esi
callq 0xa29c
movq %rax, %r14
testq %rax, %rax
je 0xc77f
movb 0x3(%r14), %al
movb %al, (%rbx)
movb $0x2, %al
cmpb $0x1, 0x3(%r14)
jne 0xc77d
movb 0x5(%r14), %al
movb %al, (%rbx)
movq 0x28(%rsp), %rdi
addq $0x9, %rdi
movl $0x11, %esi
callq 0xa29c
leaq 0x14296(%rip), %r12     # 0x20a2f
testq %rax, %rax
je 0xc7db
movb 0x3(%rax), %cl
testb %cl, %cl
je 0xc7db
cmpb $0x2, %cl
jne 0xc7c1
cmpb $0x6, 0x4(%rax)
jne 0xc7c1
movzbl 0x5(%rax), %ecx
movl %ecx, %edx
orl $0x2, %edx
cmpl $0xa, %edx
jne 0xc7c1
movb %cl, 0x4(%rax)
movb 0x4(%rax), %al
decb %al
cmpb $0xc, %al
ja 0xc7db
movzbl %al, %eax
leaq 0x13f2c(%rip), %rcx     # 0x20700
movslq (%rcx,%rax,4), %r12
addq %rcx, %r12
testq %r14, %r14
je 0xc7fe
cmpb $0x1, 0x3(%r14)
jne 0xc7fe
cmpb $0x0, 0x7(%r14)
je 0xc7fe
cmpb $0x9, 0x8(%r14)
leaq 0x14293(%rip), %rax     # 0x20a8d
cmoveq %rax, %r12
movl $0x0, 0x1e42c(%rip)     # 0x2ac34
testq %r14, %r14
je 0xc8fd
cmpb $0x1, 0x3(%r14)
jne 0xc8fd
cmpb $0x0, 0x7(%r14)
je 0xc8fd
movb 0x8(%r14), %al
decb %al
cmpb $0x1, %al
ja 0xc8fd
xorl %r15d, %r15d
leaq 0xe(%rsp), %r14
movw %r15w, (%r14)
leaq 0x1e(%rsp), %rsi
movw %r15w, (%rsi)
movl $0x1, 0x1e3e0(%rip)     # 0x2ac34
movq %r14, %rdi
callq 0xe3b4
testl %eax, %eax
sete %cl
movzwl (%r14), %eax
testw %ax, %ax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0xc8ca
movzwl %ax, %esi
leaq 0x1c(%rsp), %rdi
callq 0xe59a
movzwl 0x1e(%rsp), %eax
movw $0x7, %bp
cmpl $0x7f, %eax
je 0xc8ca
leal 0xb(%rax), %edx
imulq $0x1999999a, %rdx, %rcx # imm = 0x1999999A
shrq $0x20, %rcx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %esi
incl %eax
movl %edx, %ecx
subl %esi, %ecx
cmovnel %edx, %eax
imulq $0x1999999a, %rax, %rdx # imm = 0x1999999A
shrq $0x20, %rdx
addl $-0x64, %eax
xorl %ebp, %ebp
cmpl $0xa, %eax
cmovbl %ebp, %edx
cmpl $0x9, %edx
ja 0xc8ca
leal (%rdx,%rdx,4), %eax
leal (%rcx,%rax,2), %ebp
movq 0x28(%rsp), %rdi
addq $0x9, %rdi
movl $0x23, %esi
callq 0xa29c
testq %rax, %rax
je 0xc8e7
movzbl 0x3(%rax), %r15d
movl %r15d, 0x1e34a(%rip)    # 0x2ac38
cmpl $0x2, %r15d
leaq 0x1419d(%rip), %rax     # 0x20a96
cmoveq %rax, %r12
movq 0x1d6bc(%rip), %rax     # 0x29fc0
movq (%rax), %r15
callq 0xeb2f
movzwl 0x1c(%rsp), %r8d
movzwl %bp, %r14d
cmpb $0x1, (%rbx)
leaq 0x141ab(%rip), %rcx     # 0x20acb
leaq 0x141ad(%rip), %r13     # 0x20ad4
movq %r13, %r10
cmoveq %rcx, %r10
leaq 0x14167(%rip), %rsi     # 0x20a9c
leaq 0x140fa(%rip), %rcx     # 0x20a36
xorl %ebp, %ebp
movq %r15, %rdi
movq %rax, %rdx
movl %r14d, %r9d
xorl %eax, %eax
pushq %r12
pushq %r10
callq 0x52c0
addq $0x10, %rsp
leaq 0x1e34b(%rip), %rax     # 0x2aca8
movq (%rax), %r15
testq %r15, %r15
je 0xc263
callq 0xeb2f
movzwl 0x1c(%rsp), %r8d
cmpb $0x1, (%rbx)
leaq 0x1414d(%rip), %rcx     # 0x20acb
cmoveq %rcx, %r13
leaq 0x14113(%rip), %rsi     # 0x20a9c
leaq 0x140a6(%rip), %rcx     # 0x20a36
movq %r15, %rdi
movq %rax, %rdx
movl %r14d, %r9d
xorl %eax, %eax
pushq %r12
jmp 0xcac5
leaq 0x1415a(%rip), %rax     # 0x20b03
jmp 0xca27
leaq 0x140cb(%rip), %rax     # 0x20a7d
jmp 0xca27
leaq 0x140ce(%rip), %rax     # 0x20a89
jmp 0xca27
leaq 0x140ad(%rip), %rax     # 0x20a71
jmp 0xca27
testb $0x8, %al
leaq 0x1412e(%rip), %rdx     # 0x20afd
leaq 0x14083(%rip), %rsi     # 0x20a59
cmoveq %rdx, %rsi
movq %rsi, 0x10(%rsp)
testl %ecx, %ecx
jne 0xca2c
testb $0x4, %al
jne 0xca17
testb $0x2, %al
jne 0xca20
testb $0x1, %al
leaq 0x1405b(%rip), %rax     # 0x20a4f
cmoveq 0x30(%rsp), %rax
jmp 0xca27
leaq 0x14067(%rip), %rax     # 0x20a6a
jmp 0xca27
leaq 0x14058(%rip), %rax     # 0x20a64
jmp 0xca27
leaq 0x140fb(%rip), %rax     # 0x20b10
jmp 0xca27
leaq 0x14041(%rip), %rax     # 0x20a5f
jmp 0xca27
leaq 0x1402d(%rip), %rax     # 0x20a54
movq %rax, 0x10(%rsp)
movq 0x1d58d(%rip), %rax     # 0x29fc0
movq (%rax), %r15
callq 0xeb2f
movzwl 0xe(%rsp), %r8d
cmpb $0x1, (%rbx)
leaq 0x14080(%rip), %r12     # 0x20acb
leaq 0x14082(%rip), %r13     # 0x20ad4
movq %r13, %r10
cmoveq %r12, %r10
leaq 0x1403c(%rip), %rsi     # 0x20a9c
leaq 0x14076(%rip), %rcx     # 0x20add
xorl %ebp, %ebp
movq %r15, %rdi
movq %rax, %rdx
movl %r14d, %r9d
xorl %eax, %eax
pushq 0x10(%rsp)
pushq %r10
callq 0x52c0
addq $0x10, %rsp
leaq 0x1e21e(%rip), %rax     # 0x2aca8
movq (%rax), %r15
testq %r15, %r15
je 0xc263
callq 0xeb2f
movzwl 0xe(%rsp), %r8d
cmpb $0x1, (%rbx)
cmoveq %r12, %r13
leaq 0x13fed(%rip), %rsi     # 0x20a9c
leaq 0x14027(%rip), %rcx     # 0x20add
movq %r15, %rdi
movq %rax, %rdx
movl %r14d, %r9d
xorl %eax, %eax
pushq 0x10(%rsp)
pushq %r13
callq 0x52c0
addq $0x10, %rsp
jmp 0xc263