// File: /workspace/github_c_makefile_star2_O0/Carton32[P]quectel-CM/mbim-cm.c
// Function: mbim_packet_service_set
static int mbim_packet_service_set(MBIM_PACKET_SERVICE_ACTION_E action) {
    MBIM_MESSAGE_HEADER *pRequest = NULL;
    MBIM_COMMAND_DONE_T *pCmdDone = NULL;
    UINT32 value = htole32(action);
    int err;

    mbim_debug("%s()", __func__);
    pRequest = compose_basic_connect_command(MBIM_CID_PACKET_SERVICE, MBIM_CID_CMD_TYPE_SET, &value, sizeof(value));
    err = mbim_send_command(pRequest, &pCmdDone, mbim_default_timeout);
    mbim_check_err(err, pRequest, pCmdDone);

    if (le32toh(pCmdDone->InformationBufferLength)) {
        MBIM_PACKET_SERVICE_INFO_T *pInfo = (MBIM_PACKET_SERVICE_INFO_T *)pCmdDone->InformationBuffer;
        PacketServiceState = le32toh(pInfo->PacketServiceState);
        mbim_update_state();
    }
    mbim_free(pRequest); mbim_free(pCmdDone);
    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl -0x8(%rbp), %edi
callq 0x191c0
movl %eax, -0x1c(%rbp)
movq 0x19483(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
callq 0x13930
movq -0x38(%rbp), %rdi
movq %rax, %rdx
leaq 0x11917(%rip), %rsi     # 0x2f48e
leaq 0x11b72(%rip), %rcx     # 0x2f6f0
movb $0x0, %al
callq 0x52c0
leaq 0x1a2dc(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0x1dbc1
leaq 0x1a2cf(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x40(%rbp)
callq 0x13930
movq -0x40(%rbp), %rdi
movq %rax, %rdx
leaq 0x118db(%rip), %rsi     # 0x2f48e
leaq 0x11b36(%rip), %rcx     # 0x2f6f0
movb $0x0, %al
callq 0x52c0
jmp 0x1dbc3
movl $0xa, %edi
movl $0x1, %esi
leaq -0x1c(%rbp), %rdx
movl $0x4, %ecx
callq 0x16eb0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl 0x19837(%rip), %edx     # 0x37420
leaq -0x18(%rbp), %rsi
callq 0x17270
movl %eax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1dc06
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x1dc0e
xorl %eax, %eax
movq %rax, -0x48(%rbp)
jmp 0x1dc0e
movq -0x48(%rbp), %rdi
callq 0x17480
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x1dc31
cmpl $0x0, -0x24(%rbp)
jne 0x1dc31
cmpq $0x0, -0x18(%rbp)
jne 0x1dd3f
cmpq $0x0, -0x18(%rbp)
je 0x1dc50
movq -0x18(%rbp), %rdi
cmpl $0x0, 0x1b2ad(%rip)     # 0x38ef0
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x17560
jmp 0x1dc52
cmpq $0x0, -0x10(%rbp)
je 0x1dc6a
movq -0x10(%rbp), %rdi
callq 0x5040
movq $0x0, -0x10(%rbp)
jmp 0x1dc6c
jmp 0x1dc6e
cmpq $0x0, -0x18(%rbp)
je 0x1dc86
movq -0x18(%rbp), %rdi
callq 0x5040
movq $0x0, -0x18(%rbp)
jmp 0x1dc88
jmp 0x1dc8a
movq 0x1934f(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x50(%rbp)
callq 0x13930
movq -0x50(%rbp), %rdi
movq %rax, %rdx
movl -0x20(%rbp), %r9d
movl -0x24(%rbp), %eax
leaq 0x1093b(%rip), %rsi     # 0x2e5ed
leaq 0x11a37(%rip), %rcx     # 0x2f6f0
movl $0x7ad, %r8d            # imm = 0x7AD
movl %eax, (%rsp)
movb $0x0, %al
callq 0x52c0
leaq 0x1a198(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0x1dd15
leaq 0x1a18b(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x58(%rbp)
callq 0x13930
movq -0x58(%rbp), %rdi
movq %rax, %rdx
movl -0x20(%rbp), %r9d
movl -0x24(%rbp), %eax
leaq 0x108ef(%rip), %rsi     # 0x2e5ed
leaq 0x119eb(%rip), %rcx     # 0x2f6f0
movl $0x7ad, %r8d            # imm = 0x7AD
movl %eax, (%rsp)
movb $0x0, %al
callq 0x52c0
jmp 0x1dd17
cmpl $0x0, -0x20(%rbp)
je 0x1dd28
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1ddb3
cmpl $0x0, -0x24(%rbp)
je 0x1dd36
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1ddb3
movl $0x22b8, -0x4(%rbp)     # imm = 0x22B8
jmp 0x1ddb3
jmp 0x1dd41
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %edi
callq 0x191c0
cmpl $0x0, %eax
je 0x1dd75
movq -0x18(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x191c0
movl %eax, 0x1b368(%rip)     # 0x390d8
callq 0x1bd30
jmp 0x1dd77
cmpq $0x0, -0x10(%rbp)
je 0x1dd8f
movq -0x10(%rbp), %rdi
callq 0x5040
movq $0x0, -0x10(%rbp)
jmp 0x1dd91
jmp 0x1dd93
cmpq $0x0, -0x18(%rbp)
je 0x1ddab
movq -0x18(%rbp), %rdi
callq 0x5040
movq $0x0, -0x18(%rbp)
jmp 0x1ddad
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)