// File: /workspace/github_c_makefile_star2_O1/Carton32[P]quectel-CM/QMIThread.c
// Function: requestDeactivateDefaultPDP
static int requestDeactivateDefaultPDP(PROFILE_T *profile, int curIpFamily) {
    PQCQMIMSG pRequest;
    PQCQMIMSG pResponse;
    PQMUX_MSG pMUXMsg;
    int err;
    UCHAR QMIType = (curIpFamily == 0x04) ? QMUX_TYPE_WDS : QMUX_TYPE_WDS_IPV6;

    (void)profile;
    if (curIpFamily == IpFamilyV4 && WdsConnectionIPv4Handle == 0)
        return 0;
    if (curIpFamily == IpFamilyV6 && WdsConnectionIPv6Handle == 0)
        return 0;

    dbg_time("%s WdsConnectionIPv%dHandle", __func__, curIpFamily == IpFamilyV4 ? 4 : 6);

    pRequest = ComposeQMUXMsg(QMIType, QMIWDS_STOP_NETWORK_INTERFACE_REQ , WdsStopNwInterfaceReq, &curIpFamily);
    err = QmiThreadSendQMI(pRequest, &pResponse);
    qmi_rsp_check_and_return();

    if (curIpFamily == IpFamilyV4)
        WdsConnectionIPv4Handle = 0;
    else
         WdsConnectionIPv6Handle = 0;
    free(pResponse);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %ebx, %ebx
movl %esi, 0xc(%rsp)
cmpl $0x4, %esi
setne %bpl
jne 0xd1ad
cmpl $0x0, 0x1da95(%rip)     # 0x2ac3c
je 0xd395
cmpl $0x6, %esi
jne 0xd1bf
cmpl $0x0, 0x1da87(%rip)     # 0x2ac40
je 0xd395
shlb $0x4, %bpl
incb %bpl
movq 0x1cdf3(%rip), %r15     # 0x29fc0
movq (%r15), %rbx
callq 0xeb2f
xorl %ecx, %ecx
cmpl $0x4, 0xc(%rsp)
setne %cl
leal 0x4(%rcx,%rcx), %r8d
leaq 0x13a69(%rip), %rsi     # 0x20c54
leaq 0x13a84(%rip), %rcx     # 0x20c76
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x1daa2(%rip), %r12     # 0x2aca8
movq (%r12), %rbx
testq %rbx, %rbx
je 0xd23e
callq 0xeb2f
xorl %ecx, %ecx
cmpl $0x4, 0xc(%rsp)
setne %cl
leal 0x4(%rcx,%rcx), %r8d
leaq 0x13a2a(%rip), %rsi     # 0x20c54
leaq 0x13a45(%rip), %rcx     # 0x20c76
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
movzbl %bpl, %edi
leaq 0x16ac(%rip), %rdx      # 0xe8f5
leaq 0xc(%rsp), %rcx
movl $0x21, %esi
callq 0xda86
leaq 0x13a17(%rip), %rcx     # 0x20c76
leaq 0x10(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
movl $0x7530, %edx           # imm = 0x7530
callq 0xa317
movl %eax, %ebx
testl %eax, %eax
sets %al
movq (%r14), %r13
testq %r13, %r13
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0xd2e6
movq (%r15), %r14
callq 0xeb2f
leaq 0x134eb(%rip), %rsi     # 0x20785
leaq 0x139d5(%rip), %rcx     # 0x20c76
movq %r14, %rdi
movq %rax, %rdx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x52c0
movq (%r12), %r14
testq %r14, %r14
je 0xd395
callq 0xeb2f
leaq 0x134bb(%rip), %rsi     # 0x20785
leaq 0x139a5(%rip), %rcx     # 0x20c76
movq %r14, %rdi
movq %rax, %rdx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x52c0
jmp 0xd395
movzwl 0x10(%r13), %edi
callq 0xef61
testw %ax, %ax
jne 0xd308
movzwl 0x12(%r13), %edi
callq 0xef61
testw %ax, %ax
je 0xd3a6
movzwl 0x12(%r13), %edi
callq 0xef61
movl %eax, %ebx
movq (%r15), %r14
callq 0xeb2f
movq %rax, %r15
movzwl 0x10(%r13), %edi
callq 0xef61
movzwl %ax, %r8d
movzwl %bx, %ebx
leaq 0x13460(%rip), %rsi     # 0x20797
leaq 0x13938(%rip), %rcx     # 0x20c76
movq %r14, %rdi
movq %r15, %rdx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x52c0
movq (%r12), %r14
testq %r14, %r14
je 0xd38b
callq 0xeb2f
movq %rax, %r15
movzwl 0x10(%r13), %edi
callq 0xef61
movzwl %ax, %r8d
leaq 0x13423(%rip), %rsi     # 0x20797
leaq 0x138fb(%rip), %rcx     # 0x20c76
movq %r14, %rdi
movq %r15, %rdx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x52c0
movq 0x10(%rsp), %rdi
callq 0x5040
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x4, 0xc(%rsp)
leaq 0x1d88a(%rip), %rax     # 0x2ac3c
leaq 0x1d887(%rip), %rcx     # 0x2ac40
cmoveq %rax, %rcx
movl $0x0, (%rcx)
movq 0x10(%rsp), %rdi
callq 0x5040
xorl %ebx, %ebx
jmp 0xd395