// File: /workspace/github_c_makefile_star2_O0/Carton32[P]quectel-CM/mbim-cm.c
// Function: mbim_subscriber_status_query
static int mbim_subscriber_status_query(void) {
    MBIM_MESSAGE_HEADER *pRequest = NULL;
    MBIM_COMMAND_DONE_T *pCmdDone = NULL;
    int err;

    mbim_debug("%s()", __func__);
    pRequest = compose_basic_connect_command(MBIM_CID_SUBSCRIBER_READY_STATUS, MBIM_CID_CMD_TYPE_QUERY, NULL, 0);
    err = mbim_send_command(pRequest, &pCmdDone, mbim_default_timeout);
    mbim_check_err(err, pRequest, pCmdDone);

    if (le32toh(pCmdDone->InformationBufferLength)) {
         MBIM_SUBSCRIBER_READY_STATUS_T *pInfo = (MBIM_SUBSCRIBER_READY_STATUS_T *)pCmdDone->InformationBuffer;
         char tmp[32];

        wchar2char((const char *)pInfo + le32toh(pInfo->SubscriberIdOffset), le32toh(pInfo->SubscriberIdSize), tmp, sizeof(tmp));
        mbim_debug("SubscriberId: %s", tmp);
        wchar2char((const char *)pInfo + le32toh(pInfo->SimIccIdOffset), le32toh(pInfo->SimIccIdSize), tmp, sizeof(tmp));
        mbim_debug("SimIccId:     %s", tmp);
        ReadyState = le32toh(pInfo->ReadyState);
        mbim_update_state();
    }
    mbim_free(pRequest); mbim_free(pCmdDone);
    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq 0x19e6e(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x58(%rbp)
callq 0x13930
movq -0x58(%rbp), %rdi
movq %rax, %rdx
leaq 0x12302(%rip), %rsi     # 0x2f48e
leaq 0x124c2(%rip), %rcx     # 0x2f655
movb $0x0, %al
callq 0x52c0
leaq 0x1acc7(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0x1d1d6
leaq 0x1acba(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x60(%rbp)
callq 0x13930
movq -0x60(%rbp), %rdi
movq %rax, %rdx
leaq 0x122c6(%rip), %rsi     # 0x2f48e
leaq 0x12486(%rip), %rcx     # 0x2f655
movb $0x0, %al
callq 0x52c0
jmp 0x1d1d8
movl $0x2, %edi
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %edx
movl %ecx, %esi
callq 0x16eb0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl 0x1a228(%rip), %edx     # 0x37420
leaq -0x18(%rbp), %rsi
callq 0x17270
movl %eax, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1d215
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x1d21d
xorl %eax, %eax
movq %rax, -0x68(%rbp)
jmp 0x1d21d
movq -0x68(%rbp), %rdi
callq 0x17480
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x1d240
cmpl $0x0, -0x20(%rbp)
jne 0x1d240
cmpq $0x0, -0x18(%rbp)
jne 0x1d354
cmpq $0x0, -0x18(%rbp)
je 0x1d25f
movq -0x18(%rbp), %rdi
cmpl $0x0, 0x1bc9e(%rip)     # 0x38ef0
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x17560
jmp 0x1d261
cmpq $0x0, -0x10(%rbp)
je 0x1d279
movq -0x10(%rbp), %rdi
callq 0x5040
movq $0x0, -0x10(%rbp)
jmp 0x1d27b
jmp 0x1d27d
cmpq $0x0, -0x18(%rbp)
je 0x1d295
movq -0x18(%rbp), %rdi
callq 0x5040
movq $0x0, -0x18(%rbp)
jmp 0x1d297
jmp 0x1d299
movq 0x19d40(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x70(%rbp)
callq 0x13930
movq -0x70(%rbp), %rdi
movq %rax, %rdx
movl -0x1c(%rbp), %r9d
movl -0x20(%rbp), %eax
leaq 0x1132c(%rip), %rsi     # 0x2e5ed
leaq 0x1238d(%rip), %rcx     # 0x2f655
movl $0x768, %r8d            # imm = 0x768
movl %eax, (%rsp)
movb $0x0, %al
callq 0x52c0
leaq 0x1ab89(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0x1d324
leaq 0x1ab7c(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x78(%rbp)
callq 0x13930
movq -0x78(%rbp), %rdi
movq %rax, %rdx
movl -0x1c(%rbp), %r9d
movl -0x20(%rbp), %eax
leaq 0x112e0(%rip), %rsi     # 0x2e5ed
leaq 0x12341(%rip), %rcx     # 0x2f655
movl $0x768, %r8d            # imm = 0x768
movl %eax, (%rsp)
movb $0x0, %al
callq 0x52c0
jmp 0x1d326
cmpl $0x0, -0x1c(%rbp)
je 0x1d337
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d54d
cmpl $0x0, -0x20(%rbp)
je 0x1d348
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1d54d
movl $0x22b8, -0x4(%rbp)     # imm = 0x22B8
jmp 0x1d54d
jmp 0x1d356
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %edi
callq 0x191c0
cmpl $0x0, %eax
je 0x1d50f
movq -0x18(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x191c0
movl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x28(%rbp), %rax
movl 0x8(%rax), %edi
callq 0x191c0
movq -0x80(%rbp), %rdi
movl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdx
movl $0x20, %ecx
callq 0x1c840
movq 0x19c17(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x90(%rbp)
callq 0x13930
movq -0x90(%rbp), %rdi
movq %rax, %rdx
leaq -0x50(%rbp), %rcx
leaq 0x12285(%rip), %rsi     # 0x2f672
movb $0x0, %al
callq 0x52c0
leaq 0x1aa6d(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0x1d433
leaq 0x1aa60(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x98(%rbp)
callq 0x13930
movq -0x98(%rbp), %rdi
movq %rax, %rdx
leaq -0x50(%rbp), %rcx
leaq 0x12246(%rip), %rsi     # 0x2f672
movb $0x0, %al
callq 0x52c0
jmp 0x1d435
movq -0x28(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x28(%rbp), %rax
movl 0xc(%rax), %edi
callq 0x191c0
movl %eax, %ecx
movq -0xa8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
movq -0x28(%rbp), %rax
movl 0x10(%rax), %edi
callq 0x191c0
movq -0xa0(%rbp), %rdi
movl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdx
movl $0x20, %ecx
callq 0x1c840
movq 0x19b53(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
callq 0x13930
movq -0xb0(%rbp), %rdi
movq %rax, %rdx
leaq -0x50(%rbp), %rcx
leaq 0x121d8(%rip), %rsi     # 0x2f689
movb $0x0, %al
callq 0x52c0
leaq 0x1a9a9(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0x1d4f7
leaq 0x1a99c(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0xb8(%rbp)
callq 0x13930
movq -0xb8(%rbp), %rdi
movq %rax, %rdx
leaq -0x50(%rbp), %rcx
leaq 0x12199(%rip), %rsi     # 0x2f689
movb $0x0, %al
callq 0x52c0
jmp 0x1d4f9
movq -0x28(%rbp), %rax
movl (%rax), %edi
callq 0x191c0
movl %eax, 0x1bbbe(%rip)     # 0x390c8
callq 0x1bd30
jmp 0x1d511
cmpq $0x0, -0x10(%rbp)
je 0x1d529
movq -0x10(%rbp), %rdi
callq 0x5040
movq $0x0, -0x10(%rbp)
jmp 0x1d52b
jmp 0x1d52d
cmpq $0x0, -0x18(%rbp)
je 0x1d545
movq -0x18(%rbp), %rdi
callq 0x5040
movq $0x0, -0x18(%rbp)
jmp 0x1d547
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax)