// File: /workspace/github_c_makefile_star2_O1/Carton32[P]quectel-CM/main.c
// Function: main
int main(int argc, char *argv[])
{
    int ret;
    PROFILE_T *ctx = &s_profile;

    dbg_time("QConnectManager_Linux_V1.6.1");

    ret = parse_user_input(argc, argv, ctx);
    if (!ret)
        return ret;

    if (ctx->kill_pdp) {
        return kill_data_call_pdp(ctx->kill_pdp, argv[0]);
    }

    if (ctx->logfile) {
        logfilefp = fopen(ctx->logfile, "a+");
        if (!logfilefp) {
            dbg_time("Fail to open %s, errno: %d(%s)", ctx->logfile, errno, strerror(errno));
        }
    }

    signal(SIGINT, ql_sigaction);
    signal(SIGTERM, ql_sigaction);
    signal(SIGALRM, ql_sigaction);

    do {
        ret = quectel_CM(ctx);
        if (g_donot_exit_when_modem_hangup > 0)
            sleep(3);
    } while (g_donot_exit_when_modem_hangup > 0);

    if (logfilefp) {
        fclose(logfilefp);
    }

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movq 0x22b11(%rip), %rax     # 0x29fc0
movq (%rax), %r14
callq 0xeb2f
leaq 0x16fe6(%rip), %rsi     # 0x1e4a4
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x237d6(%rip), %rax     # 0x2aca8
movq (%rax), %r14
testq %r14, %r14
je 0x74f3
callq 0xeb2f
leaq 0x16fbe(%rip), %rsi     # 0x1e4a4
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
movl $0x1, 0x22f2b(%rip)     # 0x2a428
movslq %ebp, %r12
movq -0x8(%rbx,%r12,8), %rdi
leaq 0x16fe3(%rip), %rsi     # 0x1e4ef
callq 0x52a0
cmpl $0x1, %eax
sbbl $0x0, %r12d
cmpl $0x2, %r12d
jl 0x790f
movl $0x1, %r15d
leaq 0x16ef1(%rip), %r14     # 0x1e420
movslq %r15d, %rax
movq (%rbx,%rax,8), %rax
cmpb $0x2d, (%rax)
jne 0x7e50
leal 0x1(%r15), %ebp
movzbl 0x1(%rax), %eax
leal -0x62(%rax), %ecx
cmpl $0x14, %ecx
ja 0x7567
movslq (%r14,%rcx,4), %rax
addq %r14, %rax
jmpq *%rax
movl $0x1, 0x22eca(%rip)     # 0x2a42c
jmp 0x78c7
cmpl $0x34, %eax
je 0x78c0
cmpl $0x36, %eax
jne 0x7e50
movb $0x1, 0x22eb1(%rip)     # 0x2a431
jmp 0x78c7
cmpl %r12d, %ebp
jge 0x78c7
movslq %ebp, %rax
movq (%rbx,%rax,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x78c7
addl $0x2, %r15d
addl $-0x30, %eax
movl %eax, 0x22e7a(%rip)     # 0x2a428
jmp 0x76d0
cmpl %r12d, %ebp
jge 0x78c7
movslq %ebp, %rax
movq (%rbx,%rax,8), %rax
cmpb $0x2d, (%rax)
je 0x78c7
addl $0x2, %r15d
movq %rax, 0x22e63(%rip)     # 0x2a43a
jmp 0x76d0
cmpl %r12d, %ebp
jge 0x78c7
movslq %ebp, %rax
movq (%rbx,%rax,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x78c7
addl $0x2, %r15d
addl $-0x30, %eax
movl %eax, 0x22e5d(%rip)     # 0x2a462
jmp 0x76d0
movl $0x1, 0x22dbc(%rip)     # 0x2a3d0
jmp 0x78c7
cmpl %r12d, %ebp
jge 0x78c7
movslq %ebp, %rax
movq (%rbx,%rax,8), %rax
cmpb $0x2d, (%rax)
je 0x78c7
addl $0x2, %r15d
movq %rax, 0x22df5(%rip)     # 0x2a432
jmp 0x76d0
cmpl %r12d, %ebp
jge 0x78c7
movslq %ebp, %rax
movq (%rbx,%rax,8), %rdi
cmpb $0x2d, (%rdi)
je 0x78c7
addl $0x2, %r15d
callq 0x54b0
movl %eax, 0x22dfc(%rip)     # 0x2a466
testl %eax, %eax
jle 0x76d0
movb $0x1, 0x22f80(%rip)     # 0x2a5f5
jmp 0x76d0
cmpl %r12d, %ebp
jge 0x78c7
movslq %ebp, %rax
movq (%rbx,%rax,8), %rsi
cmpb $0x2d, (%rsi)
je 0x78c7
addl $0x2, %r15d
movl $0x20, %edx
leaq 0x22da2(%rip), %rdi     # 0x2a442
callq 0x5080
jmp 0x76d0
cmpl %r12d, %ebp
jge 0x78c7
movslq %ebp, %rax
movq (%rbx,%rax,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x78c7
addl $0x2, %r15d
addl $0x50, %eax
movl %eax, 0x22e2e(%rip)     # 0x2a4fe
movl %r15d, %ebp
jmp 0x78c7
leaq 0x177c6(%rip), %rax     # 0x1eea5
movq %rax, 0x22d0a(%rip)     # 0x2a3f0
movq %rax, 0x22cfb(%rip)     # 0x2a3e8
movq %rax, 0x22cec(%rip)     # 0x2a3e0
cmpl %r12d, %ebp
jge 0x7713
movslq %ebp, %rax
movq (%rbx,%rax,8), %rax
cmpb $0x2d, (%rax)
je 0x7713
addl $0x2, %r15d
movq %rax, 0x22cd0(%rip)     # 0x2a3e0
movl %r15d, %ebp
cmpl %r12d, %ebp
jge 0x772d
movslq %ebp, %rax
movq (%rbx,%rax,8), %rax
cmpb $0x2d, (%rax)
je 0x772d
incl %ebp
movq %rax, 0x22cbb(%rip)     # 0x2a3e8
cmpl %r12d, %ebp
jge 0x7756
movslq %ebp, %rax
movq (%rbx,%rax,8), %rax
cmpb $0x2d, (%rax)
je 0x7756
incl %ebp
movq %rax, 0x22ca9(%rip)     # 0x2a3f0
cmpb $0x0, (%rax)
je 0x7756
movl $0x2, 0x22ca2(%rip)     # 0x2a3f8
cmpl %r12d, %ebp
jge 0x78c7
movslq %ebp, %rax
movq (%rbx,%rax,8), %r13
cmpb $0x2d, (%r13)
je 0x78c7
incl %ebp
movq %r13, %rdi
leaq 0x1b9bd(%rip), %rsi     # 0x2313a
callq 0x52a0
testl %eax, %eax
je 0x78eb
movq %r13, %rdi
leaq 0x16d5d(%rip), %rsi     # 0x1e4f1
callq 0x5050
testl %eax, %eax
je 0x78eb
movq %r13, %rdi
leaq 0x1b87a(%rip), %rsi     # 0x23025
callq 0x52a0
testl %eax, %eax
je 0x78f7
movq %r13, %rdi
leaq 0x16d34(%rip), %rsi     # 0x1e4f6
callq 0x5050
testl %eax, %eax
je 0x78f7
movq %r13, %rdi
leaq 0x1b7f2(%rip), %rsi     # 0x22fcb
callq 0x52a0
testl %eax, %eax
je 0x7903
movq %r13, %rdi
leaq 0x16d0a(%rip), %rsi     # 0x1e4fa
callq 0x5050
testl %eax, %eax
je 0x7903
movq %r13, %rdi
leaq 0x1a58e(%rip), %rsi     # 0x21d95
callq 0x52a0
testl %eax, %eax
je 0x7827
movq %r13, %rdi
leaq 0x16ce5(%rip), %rsi     # 0x1e4ff
callq 0x5050
testl %eax, %eax
jne 0x7ed3
movl $0x3, 0x22bc7(%rip)     # 0x2a3f8
jmp 0x78c7
cmpl %r12d, %ebp
jge 0x78c7
movslq %ebp, %rax
movq (%rbx,%rax,8), %r13
cmpb $0x2d, (%r13)
je 0x78c7
movl %r15d, %ebp
addl $0x2, %ebp
movq %r13, %rdi
leaq 0x168b4(%rip), %rsi     # 0x1e111
callq 0x52a0
testl %eax, %eax
je 0x78d5
movq %r13, %rdi
leaq 0x16caf(%rip), %rsi     # 0x1e51f
callq 0x52a0
testl %eax, %eax
je 0x78d5
movq %r13, %rdi
leaq 0x16896(%rip), %rsi     # 0x1e119
callq 0x52a0
testl %eax, %eax
je 0x78d5
movq %r13, %rdi
leaq 0x16c91(%rip), %rsi     # 0x1e527
callq 0x52a0
testl %eax, %eax
je 0x78d5
movq %r13, %rdi
callq 0x54b0
addl $0xfffffc18, %eax       # imm = 0xFFFFFC18
cmpl $0x2327, %eax           # imm = 0x2327
ja 0x7e75
movq %r13, 0x22b42(%rip)     # 0x2a400
jmp 0x78c7
movb $0x1, 0x22b69(%rip)     # 0x2a430
movl %ebp, %r15d
cmpl %r12d, %ebp
jl 0x752f
jmp 0x790f
movl $0x20, %edx
leaq 0x22b27(%rip), %rdi     # 0x2a408
movq %r13, %rsi
callq 0x5080
jmp 0x78c7
movl $0x0, 0x22b03(%rip)     # 0x2a3f8
jmp 0x78c7
movl $0x1, 0x22af7(%rip)     # 0x2a3f8
jmp 0x78c7
movl $0x2, 0x22aeb(%rip)     # 0x2a3f8
jmp 0x78c7
cmpb $0x1, 0x22b1a(%rip)     # 0x2a430
je 0x7928
cmpb $0x1, 0x22b12(%rip)     # 0x2a431
je 0x7928
movb $0x1, 0x22b08(%rip)     # 0x2a430
movl 0x22b34(%rip), %edi     # 0x2a462
testl %edi, %edi
je 0x79cc
movq (%rbx), %rsi
leaq 0x1(%rsi), %rax
movzbl -0x1(%rax), %ecx
cmpl $0x2f, %ecx
je 0x794c
testl %ecx, %ecx
jne 0x794f
jmp 0x7954
movq %rax, %rsi
incq %rax
jmp 0x793d
callq 0xf289
testl %eax, %eax
jle 0x7e5d
movl %eax, %ebx
movq 0x22656(%rip), %rax     # 0x29fc0
movq (%rax), %r14
callq 0xeb2f
leaq 0x17168(%rip), %rsi     # 0x1eae1
movq %r14, %rdi
movq %rax, %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x52c0
leaq 0x23319(%rip), %rax     # 0x2aca8
movq (%rax), %r14
testq %r14, %r14
je 0x79b2
callq 0xeb2f
leaq 0x1713e(%rip), %rsi     # 0x1eae1
movq %r14, %rdi
movq %rax, %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x52c0
movl %ebx, %edi
movl $0x2, %esi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5310
movq 0x22a5f(%rip), %rdi     # 0x2a432
testq %rdi, %rdi
je 0x7a86
leaq 0x16ae4(%rip), %rsi     # 0x1e4c7
callq 0x5470
leaq 0x232b9(%rip), %rcx     # 0x2aca8
movq %rax, (%rcx)
testq %rax, %rax
jne 0x7a86
movq 0x225be(%rip), %rax     # 0x29fc0
movq (%rax), %r14
callq 0xeb2f
movq %rax, %r15
movq 0x22a1e(%rip), %r12     # 0x2a432
callq 0x5070
movq %rax, %rbx
movl (%rax), %ebp
movl %ebp, %edi
callq 0x5530
leaq 0x16a9e(%rip), %rsi     # 0x1e4ca
movq %r14, %rdi
movq %r15, %rdx
movq %r12, %rcx
movl %ebp, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x52c0
leaq 0x2325f(%rip), %rax     # 0x2aca8
movq (%rax), %r14
testq %r14, %r14
je 0x7a86
callq 0xeb2f
movq %rax, %r15
movq 0x229d2(%rip), %r12     # 0x2a432
movl (%rbx), %ebx
movl %ebx, %edi
callq 0x5530
leaq 0x16a5a(%rip), %rsi     # 0x1e4ca
movq %r14, %rdi
movq %r15, %rdx
movq %r12, %rcx
movl %ebx, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x52c0
leaq 0x48c(%rip), %rbx       # 0x7f19
movl $0x2, %edi
movq %rbx, %rsi
callq 0x52b0
movl $0xf, %edi
movq %rbx, %rsi
callq 0x52b0
movl $0xe, %edi
movq %rbx, %rsi
callq 0x52b0
leaq 0x20b25(%rip), %rax     # 0x285e0
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsp)
leaq 0x20af5(%rip), %rax     # 0x285c0
movq 0x10(%rax), %rax
movq %rax, (%rsp)
xorl %ebp, %ebp
leaq 0x22904(%rip), %rbx     # 0x2a3e0
leaq 0x40(%rsp), %r14
leaq 0x10(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movb %bpl, 0x60(%rsp)
movb %bpl, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
cmpb %bpl, 0x22934(%rip)     # 0x2a442
je 0x7b24
movl $0x21, %edx
movq %r15, %rdi
leaq 0x22923(%rip), %rsi     # 0x2a442
callq 0x5080
movq %r14, %rdi
movq %r15, %rsi
movl $0x21, %edx
movq %rbx, %rcx
callq 0x16700
movl $0x6, %r12d
testl %eax, %eax
jne 0x7b6f
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x17696
movl $0x5, %r12d
testl %eax, %eax
jne 0x7b6f
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x177d1
testl %eax, %eax
je 0x7de0
movl %r12d, 0x22a27(%rip)    # 0x2a59d
movl $0x20, %edx
leaq 0x228e8(%rip), %rdi     # 0x2a46a
movq %r14, %rsi
callq 0x5080
movl $0x20, %edx
leaq 0x228f4(%rip), %r12     # 0x2a48a
movq %r12, %rdi
movq %r15, %rsi
callq 0x5080
movq %r12, %rdi
callq 0x17c5f
cmpl $0x6, 0x229ed(%rip)     # 0x2a59d
jne 0x7bc6
movq 0x22881(%rip), %rsi     # 0x2a43a
testq %rsi, %rsi
je 0x7bc6
movq %rbx, %rdi
callq 0x1803d
cmpl $0x6, 0x229d0(%rip)     # 0x2a59d
jne 0x7bdd
movq %rbx, %rdi
callq 0x175a6
movl %eax, 0x229c4(%rip)     # 0x2a5a1
movq %rbx, %rdi
callq 0x100e4
movl 0x229b5(%rip), %r12d    # 0x2a5a1
movq 0x223cd(%rip), %rax     # 0x29fc0
movq (%rax), %r13
callq 0xeb2f
cmpl $0x1, %r12d
je 0x7cc3
cmpl $0x3, %r12d
je 0x7c67
cmpl $0x2, %r12d
jne 0x7d90
movq %r13, %rdi
leaq 0x16f00(%rip), %r13     # 0x1eb1f
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x23075(%rip), %rax     # 0x2aca8
movq (%rax), %r12
testq %r12, %r12
je 0x7c50
callq 0xeb2f
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x217e9(%rip), %rax     # 0x29440
movq %rax, 0x22aa8(%rip)     # 0x2a706
leaq 0x217bb(%rip), %rax     # 0x29420
jmp 0x7cb7
movq %r13, %rdi
leaq 0x16ef6(%rip), %r13     # 0x1eb67
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x23023(%rip), %rax     # 0x2aca8
movq (%rax), %r12
testq %r12, %r12
je 0x7ca2
callq 0xeb2f
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x21ff7(%rip), %rax     # 0x29ca0
movq %rax, 0x22a56(%rip)     # 0x2a706
leaq 0x21fc9(%rip), %rax     # 0x29c80
movq %rax, 0x22a40(%rip)     # 0x2a6fe
jmp 0x7d5b
movq %r13, %rdi
leaq 0x16e71(%rip), %r13     # 0x1eb3e
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x22fc7(%rip), %rax     # 0x2aca8
movq (%rax), %r12
testq %r12, %r12
je 0x7cfe
callq 0xeb2f
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x2163b(%rip), %rax     # 0x29340
movq %rax, 0x229fa(%rip)     # 0x2a706
movq 0x22757(%rip), %rax     # 0x2a46a
movabsq $0x7163712f7665642f, %rcx # imm = 0x7163712F7665642F
xorq %rcx, %rax
movzwl 0x2274b(%rip), %ecx     # 0x2a472
xorq $0x696d, %rcx           # imm = 0x696D
orq %rax, %rcx
leaq 0x20888(%rip), %rax     # 0x285c0
cmoveq 0x222a0(%rip), %rax     # 0x29fe0
movq %rax, 0x229b7(%rip)     # 0x2a6fe
movq (%rsp), %rax
cmoveq 0x8(%rsp), %rax
leaq 0x22ed0(%rip), %rcx     # 0x2ac28
movq %rax, (%rcx)
callq 0x841d
movl %eax, %r12d
movq %rbx, %rdi
callq 0x183fe
cmpl $0x0, 0x22662(%rip)     # 0x2a3d4
jle 0x7d7e
movl $0x3, %edi
callq 0x5540
cmpl $0x0, 0x2264f(%rip)     # 0x2a3d4
jg 0x7ae6
jmp 0x7e3a
movl 0x2280b(%rip), %ecx     # 0x2a5a1
xorl %r12d, %r12d
movq %r13, %rdi
leaq 0x16dec(%rip), %rsi     # 0x1eb8f
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x22ef4(%rip), %rax     # 0x2aca8
movq (%rax), %r13
testq %r13, %r13
je 0x7d63
callq 0xeb2f
movl 0x227da(%rip), %ecx     # 0x2a5a1
xorl %r12d, %r12d
movq %r13, %rdi
leaq 0x16dbb(%rip), %rsi     # 0x1eb8f
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
jmp 0x7d63
movq 0x221d9(%rip), %rax     # 0x29fc0
movq (%rax), %r13
callq 0xeb2f
xorl %r12d, %r12d
movq %r13, %rdi
leaq 0x16d05(%rip), %rsi     # 0x1eb01
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x22e9b(%rip), %rax     # 0x2aca8
movq (%rax), %r13
testq %r13, %r13
je 0x7d6b
callq 0xeb2f
xorl %r12d, %r12d
movq %r13, %rdi
leaq 0x16cd6(%rip), %rsi     # 0x1eb01
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
jmp 0x7d6b
leaq 0x22e67(%rip), %rax     # 0x2aca8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x7e63
callq 0x5130
jmp 0x7e63
movq (%rbx), %rdi
callq 0x7f79
xorl %r12d, %r12d
jmp 0x7e63
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x22144(%rip), %rax     # 0x29fc0
movq (%rax), %r14
callq 0xeb2f
leaq 0x166a7(%rip), %rsi     # 0x1e532
xorl %r12d, %r12d
movq %r14, %rdi
movq %rax, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x52c0
leaq 0x22e03(%rip), %rax     # 0x2aca8
movq (%rax), %r14
testq %r14, %r14
je 0x7ec9
callq 0xeb2f
leaq 0x16679(%rip), %rsi     # 0x1e532
movq %r14, %rdi
movq %rax, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x52c0
movq (%rbx), %rdi
callq 0x7f79
jmp 0x7e63
movq 0x220e6(%rip), %rax     # 0x29fc0
movq (%rax), %r14
callq 0xeb2f
leaq 0x1661f(%rip), %rsi     # 0x1e508
xorl %r12d, %r12d
movq %r14, %rdi
movq %rax, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x52c0
leaq 0x22da5(%rip), %rax     # 0x2aca8
movq (%rax), %r14
testq %r14, %r14
je 0x7ec9
callq 0xeb2f
leaq 0x165f1(%rip), %rsi     # 0x1e508
jmp 0x7eb9