// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %edx
movl $0x11, %eax
movl $0x1, %ecx
cmpl $0x4, %edx
cmovel %ecx, %eax
movb %al, -0x35(%rbp)
cmpl $0x4, -0x14(%rbp)
jne 0x10383
cmpl $0x0, 0x27a8b(%rip)     # 0x37e00
jne 0x10383
movl $0x0, -0x4(%rbp)
jmp 0x10631
cmpl $0x6, -0x14(%rbp)
jne 0x1039e
cmpl $0x0, 0x27a74(%rip)     # 0x37e04
jne 0x1039e
movl $0x0, -0x4(%rbp)
jmp 0x10631
jmp 0x103a0
movq 0x26c39(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x40(%rbp)
callq 0x13930
movq -0x40(%rbp), %rdi
movq %rax, %rdx
movl -0x14(%rbp), %ecx
movl $0x6, %r8d
movl $0x4, %eax
cmpl $0x4, %ecx
cmovel %eax, %r8d
leaq 0x1da70(%rip), %rsi     # 0x2de46
leaq 0x1da8b(%rip), %rcx     # 0x2de68
movb $0x0, %al
callq 0x52c0
leaq 0x27a7d(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0x10435
leaq 0x27a70(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x48(%rbp)
callq 0x13930
movq -0x48(%rbp), %rdi
movq %rax, %rdx
movl -0x14(%rbp), %ecx
movl $0x6, %r8d
movl $0x4, %eax
cmpl $0x4, %ecx
cmovel %eax, %r8d
leaq 0x1da1f(%rip), %rsi     # 0x2de46
leaq 0x1da3a(%rip), %rcx     # 0x2de68
movb $0x0, %al
callq 0x52c0
jmp 0x10437
movl $0x21, %esi
leaq 0x31bd(%rip), %rdx      # 0x13600
leaq -0x14(%rbp), %rcx
movzbl -0x35(%rbp), %edi
callq 0x11170
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
movl $0x7530, %edx           # imm = 0x7530
leaq 0x1da00(%rip), %rcx     # 0x2de68
callq 0xc670
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jl 0x10481
cmpq $0x0, -0x28(%rbp)
jne 0x10503
jmp 0x10483
movq 0x26b56(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x50(%rbp)
callq 0x13930
movq -0x50(%rbp), %rdi
movq %rax, %rdx
movl -0x34(%rbp), %r8d
leaq 0x1d4b9(%rip), %rsi     # 0x2d961
leaq 0x1d9b9(%rip), %rcx     # 0x2de68
movb $0x0, %al
callq 0x52c0
leaq 0x279ab(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0x104f6
leaq 0x2799e(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x58(%rbp)
callq 0x13930
movq -0x58(%rbp), %rdi
movq %rax, %rdx
movl -0x34(%rbp), %r8d
leaq 0x1d479(%rip), %rsi     # 0x2d961
leaq 0x1d979(%rip), %rcx     # 0x2de68
movb $0x0, %al
callq 0x52c0
jmp 0x104f8
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x10631
movq -0x28(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x13ed0
movzwl %ax, %eax
cmpl $0x0, %eax
jne 0x1053d
movq -0x30(%rbp), %rax
movzwl 0xc(%rax), %edi
callq 0x13ed0
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x10603
movq -0x30(%rbp), %rax
movzwl 0xc(%rax), %edi
callq 0x13ed0
movw %ax, -0x38(%rbp)
movq 0x26a8b(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x68(%rbp)
callq 0x13930
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x13ed0
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rdx
movzwl %ax, %r8d
movzwl -0x38(%rbp), %r9d
leaq 0x1d3e9(%rip), %rsi     # 0x2d973
leaq 0x1d8d7(%rip), %rcx     # 0x2de68
movb $0x0, %al
callq 0x52c0
leaq 0x278c9(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0x105ef
leaq 0x278bc(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x78(%rbp)
callq 0x13930
movq %rax, -0x70(%rbp)
movq -0x30(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x13ed0
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rdx
movzwl %ax, %r8d
movzwl -0x38(%rbp), %r9d
leaq 0x1d392(%rip), %rsi     # 0x2d973
leaq 0x1d880(%rip), %rcx     # 0x2de68
movb $0x0, %al
callq 0x52c0
jmp 0x105f1
movq -0x28(%rbp), %rdi
callq 0x5040
movzwl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x10631
jmp 0x10605
cmpl $0x4, -0x14(%rbp)
jne 0x10617
movl $0x0, 0x277eb(%rip)     # 0x37e00
jmp 0x10621
movl $0x0, 0x277e3(%rip)     # 0x37e04
movq -0x28(%rbp), %rdi
callq 0x5040
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)