// File: /workspace/github_c_makefile_star2_O2/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)
andq $0x0, 0x8(%rsp)
movl 0x184de(%rip), %ebp     # 0x2af14
cmpl $0x1, 0x184d3(%rip)     # 0x2af10
jne 0x12a48
cmpl $0x0, 0x182ea(%rip)     # 0x2ad30
je 0x12aa7
movq 0x16569(%rip), %rax     # 0x28fb8
movq (%rax), %r14
callq 0xe343
leaq 0xdace(%rip), %rsi      # 0x2052c
leaq 0xdade(%rip), %rcx      # 0x20543
movq %r14, %rdi
movq %rax, %rdx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x52c0
leaq 0x1722c(%rip), %rax     # 0x29ca8
movq (%rax), %r14
testq %r14, %r14
je 0x12aa7
callq 0xe343
leaq 0xda9c(%rip), %rsi      # 0x2052c
leaq 0xdaac(%rip), %rcx      # 0x20543
movq %r14, %rdi
movq %rax, %rdx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x52c0
leaq 0x14(%rsp), %rdx
movl %ebp, (%rdx)
pushq $0xc
popq %rdi
pushq $0x3c
popq %rcx
xorl %esi, %esi
callq 0x1022b
movq %rax, %r15
leaq 0x8(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
movl $0x7530, %edx           # imm = 0x7530
callq 0x103ea
movl %eax, %ebp
movq (%r14), %r12
movq %r12, %rdi
callq 0x1055f
movl %eax, %r14d
testq %r12, %r12
je 0x12b42
testl %ebp, %ebp
jne 0x12b42
testl %r14d, %r14d
jne 0x12b42
cmpl $0x0, 0x2c(%r12)
je 0x12b0e
movl 0x34(%r12), %eax
movl %eax, 0x1840c(%rip)     # 0x2af10
callq 0x14cde
movq 0x8(%rsp), %r12
movq %r15, %rdi
callq 0x5040
movq %r12, %rdi
callq 0x5040
movl 0x183ec(%rip), %eax     # 0x2af10
cmpq $0x4, %rax
ja 0x12b3a
leaq 0xc837(%rip), %rcx      # 0x1f368
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, (%rbx)
jmp 0x12c0e
testq %r12, %r12
je 0x12b63
xorl %esi, %esi
cmpl $0x0, 0x181e0(%rip)     # 0x2ad30
sete %sil
movq %r12, %rdi
callq 0x10583
movq 0x8(%rsp), %rbx
jmp 0x12b65
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x5040
testq %rbx, %rbx
je 0x12b80
movq %rbx, %rdi
callq 0x5040
andq $0x0, 0x8(%rsp)
movq 0x16431(%rip), %rax     # 0x28fb8
movq (%rax), %rbx
callq 0xe343
movl %r14d, (%rsp)
leaq 0xc807(%rip), %rsi      # 0x1f3a1
leaq 0xd9a2(%rip), %rcx      # 0x20543
movq %rbx, %rdi
movq %rax, %rdx
movl $0x6c2, %r8d            # imm = 0x6C2
movl %ebp, %r9d
xorl %eax, %eax
callq 0x52c0
leaq 0x170ea(%rip), %rax     # 0x29ca8
movq (%rax), %rbx
testq %rbx, %rbx
je 0x12bf3
callq 0xe343
movl %r14d, (%rsp)
leaq 0xc7cb(%rip), %rsi      # 0x1f3a1
leaq 0xd966(%rip), %rcx      # 0x20543
movq %rbx, %rdi
movq %rax, %rdx
movl $0x6c2, %r8d            # imm = 0x6C2
movl %ebp, %r9d
xorl %eax, %eax
callq 0x52c0
testl %r14d, %r14d
movl $0x22b8, %eax           # imm = 0x22B8
cmovnel %r14d, %eax
testl %ebp, %ebp
cmovnel %ebp, %eax
jmp 0x12c10
movb $0x2, (%rbx)
jmp 0x12c0e
movb $0x0, (%rbx)
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq