// File: /workspace/github_c_makefile_star2_O1/Carton32[P]quectel-CM/mbim-cm.c
// Function: requestQueryDataCall
static int requestQueryDataCall(UCHAR  *pConnectionStatus, int curIpFamily) {
    int retval;

    (void)curIpFamily;

    *pConnectionStatus = QWDS_PKT_DATA_DISCONNECTED;

    retval = mbim_query_connect(mbim_sessionID);
    if (retval)
        goto exit;

    switch(ActivationState) {
        case MBIMActivationStateUnknown: *pConnectionStatus = QWDS_PKT_DATA_UNKNOW; break;
        case MBIMActivationStateActivated: *pConnectionStatus = QWDS_PKT_DATA_CONNECTED; break;
        case MBIMActivationStateActivating: *pConnectionStatus = QWDS_PKT_DATA_DISCONNECTED; break;
        case MBIMActivationStateDeactivated: *pConnectionStatus = QWDS_PKT_DATA_DISCONNECTED; break;
        case MBIMActivationStateDeactivating: *pConnectionStatus = QWDS_PKT_DATA_DISCONNECTED; break;
        default: *pConnectionStatus = QWDS_PKT_DATA_DISCONNECTED; break;
    }

exit:
    return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
movb $0x1, (%rdi)
movl 0x18870(%rip), %ebp     # 0x2bf14
movq $0x0, 0x8(%rsp)
cmpl $0x1, 0x1885c(%rip)     # 0x2bf10
jne 0x136bf
cmpl $0x0, 0x18673(%rip)     # 0x2bd30
je 0x1371e
movq 0x168fa(%rip), %rax     # 0x29fc0
movq (%rax), %r14
callq 0xeb2f
leaq 0xee1a(%rip), %rsi      # 0x224ef
leaq 0xee2a(%rip), %rcx      # 0x22506
movq %r14, %rdi
movq %rax, %rdx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x52c0
leaq 0x175b5(%rip), %rax     # 0x2aca8
movq (%rax), %r14
testq %r14, %r14
je 0x1371e
callq 0xeb2f
leaq 0xede8(%rip), %rsi      # 0x224ef
leaq 0xedf8(%rip), %rcx      # 0x22506
movq %r14, %rdi
movq %rax, %rdx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x52c0
leaq 0x14(%rsp), %rdx
movl %ebp, (%rdx)
xorl %r12d, %r12d
movl $0xc, %edi
xorl %esi, %esi
movl $0x3c, %ecx
callq 0x10b66
movq %rax, %r14
leaq 0x8(%rsp), %r15
movq %rax, %rdi
movq %r15, %rsi
movl $0x7530, %edx           # imm = 0x7530
callq 0x10d09
movl %eax, %ebp
movq (%r15), %rdi
testq %rdi, %rdi
je 0x13778
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addl (%rdi), %eax
cmpl $0x3, %eax
ja 0x13778
movl %eax, %eax
leaq 0xf098(%rip), %rcx      # 0x22808
movq (%rcx,%rax,8), %rax
movl (%rdi,%rax), %r12d
movl %ebp, %eax
orl %r12d, %eax
sete %al
testq %rdi, %rdi
setne %r15b
andb %al, %r15b
je 0x13791
jmp 0x13854
testq %rdi, %rdi
je 0x137a8
xorl %esi, %esi
cmpl $0x0, 0x18591(%rip)     # 0x2bd30
sete %sil
callq 0x10e8f
testq %r14, %r14
je 0x137b5
movq %r14, %rdi
callq 0x5040
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x137cd
callq 0x5040
movq $0x0, 0x8(%rsp)
movq 0x167ec(%rip), %rax     # 0x29fc0
movq (%rax), %r14
callq 0xeb2f
movl %r12d, (%rsp)
leaq 0xdb76(%rip), %rsi      # 0x2135d
leaq 0xed18(%rip), %rcx      # 0x22506
movq %r14, %rdi
movq %rax, %rdx
movl $0x6c2, %r8d            # imm = 0x6C2
movl %ebp, %r9d
xorl %eax, %eax
callq 0x52c0
leaq 0x1749d(%rip), %rax     # 0x2aca8
movq (%rax), %r14
testq %r14, %r14
je 0x13840
callq 0xeb2f
movl %r12d, (%rsp)
leaq 0xdb3a(%rip), %rsi      # 0x2135d
leaq 0xecdc(%rip), %rcx      # 0x22506
movq %r14, %rdi
movq %rax, %rdx
movl $0x6c2, %r8d            # imm = 0x6C2
movl %ebp, %r9d
xorl %eax, %eax
callq 0x52c0
testl %r12d, %r12d
movl $0x22b8, %eax           # imm = 0x22B8
cmovnel %r12d, %eax
testl %ebp, %ebp
cmovnel %ebp, %eax
xorl %r14d, %r14d
testb %r15b, %r15b
je 0x13899
movq 0x8(%rsp), %rax
cmpl $0x0, 0x2c(%rax)
je 0x13872
movl 0x34(%rax), %eax
movl %eax, 0x186a3(%rip)     # 0x2bf10
callq 0x15c62
testq %r14, %r14
je 0x1387f
movq %r14, %rdi
callq 0x5040
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x13897
callq 0x5040
movq $0x0, 0x8(%rsp)
movl %ebp, %eax
testl %eax, %eax
jne 0x138c4
movl 0x1866d(%rip), %edx     # 0x2bf10
leal (,%rdx,8), %ecx
movabsq $0x101010200, %rsi      # imm = 0x101010200
shrq %cl, %rsi
cmpl $0x5, %edx
movl $0x1, %ecx
cmovbl %esi, %ecx
movb %cl, (%rbx)
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq