// File: /workspace/github_c_makefile_star2_O0/Carton32[P]quectel-CM/mbim-cm.c
// Function: mbim_close_device
static int mbim_close_device(void) {
    MBIM_MESSAGE_HEADER *pRequest = NULL;
    MBIM_CLOSE_DONE_T *pCloseDone = NULL;
    int err = 0;

    mbim_debug("%s()", __func__);
    pRequest = compose_close_command();
    err = mbim_send_command(pRequest, (MBIM_COMMAND_DONE_T **)&pCloseDone, mbim_default_timeout);
    mbim_check_err(err, pRequest, pCloseDone);

    err = le32toh(pCloseDone->Status);
    mbim_free(pRequest); mbim_free(pCloseDone);

    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq 0x1a44a(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x28(%rbp)
callq 0x13930
movq -0x28(%rbp), %rdi
movq %rax, %rdx
leaq 0x128de(%rip), %rsi     # 0x2f48e
leaq 0x12a53(%rip), %rcx     # 0x2f60a
movb $0x0, %al
callq 0x52c0
leaq 0x1b2a3(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0x1cbfa
leaq 0x1b296(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x30(%rbp)
callq 0x13930
movq -0x30(%rbp), %rdi
movq %rax, %rdx
leaq 0x128a2(%rip), %rsi     # 0x2f48e
leaq 0x12a17(%rip), %rcx     # 0x2f60a
movb $0x0, %al
callq 0x52c0
jmp 0x1cbfc
callq 0x1cdc0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl 0x1a811(%rip), %edx     # 0x37420
leaq -0x18(%rbp), %rsi
callq 0x17270
movl %eax, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1cc2c
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x1cc34
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0x1cc34
movq -0x38(%rbp), %rdi
callq 0x17480
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x1cc57
cmpl $0x0, -0x20(%rbp)
jne 0x1cc57
cmpq $0x0, -0x18(%rbp)
jne 0x1cd62
cmpq $0x0, -0x18(%rbp)
je 0x1cc76
movq -0x18(%rbp), %rdi
cmpl $0x0, 0x1c287(%rip)     # 0x38ef0
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x17560
jmp 0x1cc78
cmpq $0x0, -0x10(%rbp)
je 0x1cc90
movq -0x10(%rbp), %rdi
callq 0x5040
movq $0x0, -0x10(%rbp)
jmp 0x1cc92
jmp 0x1cc94
cmpq $0x0, -0x18(%rbp)
je 0x1ccac
movq -0x18(%rbp), %rdi
callq 0x5040
movq $0x0, -0x18(%rbp)
jmp 0x1ccae
jmp 0x1ccb0
movq 0x1a329(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x40(%rbp)
callq 0x13930
movq -0x40(%rbp), %rdi
movq %rax, %rdx
movl -0x1c(%rbp), %r9d
movl -0x20(%rbp), %eax
leaq 0x11915(%rip), %rsi     # 0x2e5ed
leaq 0x1292b(%rip), %rcx     # 0x2f60a
movl $0x6af, %r8d            # imm = 0x6AF
movl %eax, (%rsp)
movb $0x0, %al
callq 0x52c0
leaq 0x1b172(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0x1cd3b
leaq 0x1b165(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x48(%rbp)
callq 0x13930
movq -0x48(%rbp), %rdi
movq %rax, %rdx
movl -0x1c(%rbp), %r9d
movl -0x20(%rbp), %eax
leaq 0x118c9(%rip), %rsi     # 0x2e5ed
leaq 0x128df(%rip), %rcx     # 0x2f60a
movl $0x6af, %r8d            # imm = 0x6AF
movl %eax, (%rsp)
movb $0x0, %al
callq 0x52c0
jmp 0x1cd3d
cmpl $0x0, -0x1c(%rbp)
je 0x1cd4b
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1cdaf
cmpl $0x0, -0x20(%rbp)
je 0x1cd59
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1cdaf
movl $0x22b8, -0x4(%rbp)     # imm = 0x22B8
jmp 0x1cdaf
jmp 0x1cd64
movq -0x18(%rbp), %rax
movl 0xc(%rax), %edi
callq 0x191c0
movl %eax, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1cd8b
movq -0x10(%rbp), %rdi
callq 0x5040
movq $0x0, -0x10(%rbp)
jmp 0x1cd8d
jmp 0x1cd8f
cmpq $0x0, -0x18(%rbp)
je 0x1cda7
movq -0x18(%rbp), %rdi
callq 0x5040
movq $0x0, -0x18(%rbp)
jmp 0x1cda9
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)