// File: /workspace/github_c_makefile_star2_O2/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 0x21d0d(%rip), %rax     # 0x28fb8
movq (%rax), %r14
callq 0xe343
leaq 0x151ea(%rip), %rsi     # 0x1c4a4
xorl %r12d, %r12d
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x229d7(%rip), %rax     # 0x29ca8
movq (%rax), %r14
testq %r14, %r14
je 0x72f2
callq 0xe343
leaq 0x151bf(%rip), %rsi     # 0x1c4a4
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
movl $0x1, 0x2212c(%rip)     # 0x29428
movslq %ebp, %rax
movq -0x8(%rbx,%rax,8), %rax
cmpb $0x26, (%rax)
jne 0x7313
xorl %r12d, %r12d
cmpb $0x1, 0x1(%rax)
sbbl %r12d, %r12d
addl %ebp, %r12d
pushq $0x1
popq %r15
leaq 0x150ff(%rip), %r14     # 0x1c420
cmpl %r12d, %r15d
jge 0x770d
movl %r15d, %ebp
movslq %r15d, %rax
movq (%rbx,%rax,8), %rax
cmpb $0x2d, (%rax)
jne 0x76f0
leal 0x1(%rbp), %r15d
movzbl 0x1(%rax), %eax
leal -0x62(%rax), %ecx
cmpl $0x14, %ecx
ja 0x7365
movslq (%r14,%rcx,4), %rcx
addq %r14, %rcx
movslq %r15d, %rax
jmpq *%rcx
movl $0x1, 0x220c9(%rip)     # 0x2942c
jmp 0x7321
cmpl $0x34, %eax
je 0x76a3
cmpl $0x36, %eax
jne 0x76f0
movb $0x1, 0x220b3(%rip)     # 0x29431
jmp 0x7321
cmpl %r12d, %r15d
jge 0x7321
movq (%rbx,%rax,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x7321
addl $0x2, %ebp
addl $-0x30, %eax
movl %eax, 0x2208b(%rip)     # 0x29428
movl %ebp, %r15d
jmp 0x7321
cmpl %r12d, %r15d
jge 0x7321
movq (%rbx,%rax,8), %rax
cmpb $0x2d, (%rax)
je 0x7321
addl $0x2, %ebp
movq %rax, 0x22075(%rip)     # 0x2943a
movl %ebp, %r15d
jmp 0x7321
cmpl %r12d, %r15d
jge 0x7321
movq (%rbx,%rax,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x7321
addl $0x2, %ebp
addl $-0x30, %eax
movl %eax, 0x22070(%rip)     # 0x29462
movl %ebp, %r15d
jmp 0x7321
movl $0x1, 0x21fcc(%rip)     # 0x293d0
jmp 0x7321
cmpl %r12d, %r15d
jge 0x7321
movq (%rbx,%rax,8), %rax
cmpb $0x2d, (%rax)
je 0x7321
addl $0x2, %ebp
movq %rax, 0x22009(%rip)     # 0x29432
movl %ebp, %r15d
jmp 0x7321
cmpl %r12d, %r15d
jge 0x7321
movq (%rbx,%rax,8), %rdi
cmpb $0x2d, (%rdi)
je 0x7321
addl $0x2, %ebp
callq 0x54c0
movl %eax, 0x22011(%rip)     # 0x29466
movl %ebp, %r15d
testl %eax, %eax
jle 0x7321
movb $0x1, 0x2218e(%rip)     # 0x295f5
movl %ebp, %r15d
jmp 0x7321
cmpl %r12d, %r15d
jge 0x7321
movq (%rbx,%rax,8), %rsi
cmpb $0x2d, (%rsi)
je 0x7321
addl $0x2, %ebp
leaq 0x21fb3(%rip), %rdi     # 0x29442
pushq $0x20
popq %rdx
callq 0x5080
movl %ebp, %r15d
jmp 0x7321
cmpl %r12d, %r15d
jge 0x7321
movq (%rbx,%rax,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x7321
addl $0x2, %ebp
addl $0x50, %eax
movl %eax, 0x2203a(%rip)     # 0x294fe
movl %ebp, %r15d
jmp 0x7321
leaq 0x159ce(%rip), %rcx     # 0x1cea1
movq %rcx, 0x21f16(%rip)     # 0x293f0
movq %rcx, 0x21f07(%rip)     # 0x293e8
movq %rcx, 0x21ef8(%rip)     # 0x293e0
cmpl %r12d, %r15d
jge 0x7503
movq (%rbx,%rax,8), %rax
cmpb $0x2d, (%rax)
je 0x7503
addl $0x2, %ebp
movq %rax, 0x21ee0(%rip)     # 0x293e0
movl %ebp, %r15d
cmpl %r12d, %r15d
jge 0x751e
movslq %r15d, %rax
movq (%rbx,%rax,8), %rax
cmpb $0x2d, (%rax)
je 0x751e
incl %r15d
movq %rax, 0x21eca(%rip)     # 0x293e8
cmpl %r12d, %r15d
jge 0x7548
movslq %r15d, %rax
movq (%rbx,%rax,8), %rax
cmpb $0x2d, (%rax)
je 0x7548
incl %r15d
movq %rax, 0x21eb7(%rip)     # 0x293f0
cmpb $0x0, (%rax)
je 0x7548
movl $0x2, 0x21eb0(%rip)     # 0x293f8
cmpl %r12d, %r15d
jge 0x7321
movslq %r15d, %rax
movq (%rbx,%rax,8), %r13
movb (%r13), %bpl
cmpb $0x2d, %bpl
je 0x7321
incl %r15d
cmpb $0x30, %bpl
jne 0x757a
cmpb $0x0, 0x1(%r13)
je 0x76c6
movq %r13, %rdi
leaq 0x14f6b(%rip), %rsi     # 0x1c4ef
callq 0x5050
testl %eax, %eax
je 0x76c6
cmpb $0x31, %bpl
jne 0x75a2
cmpb $0x0, 0x1(%r13)
je 0x76d2
movq %r13, %rdi
leaq 0x14f48(%rip), %rsi     # 0x1c4f4
callq 0x5050
testl %eax, %eax
je 0x76d2
cmpb $0x32, %bpl
jne 0x75ca
cmpb $0x0, 0x1(%r13)
je 0x76e1
movq %r13, %rdi
leaq 0x14f24(%rip), %rsi     # 0x1c4f8
callq 0x5050
testl %eax, %eax
je 0x76e1
cmpb $0x33, %bpl
jne 0x75ee
cmpb $0x0, 0x1(%r13)
je 0x7605
movq %r13, %rdi
leaq 0x14f05(%rip), %rsi     # 0x1c4fd
callq 0x5050
testl %eax, %eax
jne 0x7c95
movl $0x3, 0x21de9(%rip)     # 0x293f8
jmp 0x7321
cmpl %r12d, %r15d
jge 0x7321
movq (%rbx,%rax,8), %r13
cmpb $0x2d, (%r13)
je 0x7321
movl %ebp, %r15d
addl $0x2, %r15d
movq %r13, %rdi
leaq 0x14ad4(%rip), %rsi     # 0x1c111
callq 0x52a0
testl %eax, %eax
je 0x76af
movq %r13, %rdi
leaq 0x14ecd(%rip), %rsi     # 0x1c51d
callq 0x52a0
testl %eax, %eax
je 0x76af
movq %r13, %rdi
leaq 0x14ab6(%rip), %rsi     # 0x1c119
callq 0x52a0
testl %eax, %eax
je 0x76af
movq %r13, %rdi
leaq 0x14eaf(%rip), %rsi     # 0x1c525
callq 0x52a0
testl %eax, %eax
je 0x76af
movq %r13, %rdi
callq 0x54c0
addl $0xfffffc18, %eax       # imm = 0xFFFFFC18
cmpl $0x2327, %eax           # imm = 0x2327
ja 0x7c4f
movq %r13, 0x21d62(%rip)     # 0x29400
jmp 0x7321
movb $0x1, 0x21d86(%rip)     # 0x29430
jmp 0x7321
leaq 0x21d52(%rip), %rdi     # 0x29408
movq %r13, %rsi
pushq $0x20
popq %rdx
callq 0x5080
jmp 0x7321
andl $0x0, 0x21d2b(%rip)     # 0x293f8
jmp 0x7321
movl $0x1, 0x21d1c(%rip)     # 0x293f8
jmp 0x7321
movl $0x2, 0x21d0d(%rip)     # 0x293f8
jmp 0x7321
movq (%rbx), %rdi
callq 0x7d1c
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x1, 0x21d1c(%rip)     # 0x29430
je 0x7726
cmpb $0x1, 0x21d14(%rip)     # 0x29431
je 0x7726
movb $0x1, 0x21d0a(%rip)     # 0x29430
movl 0x21d36(%rip), %edi     # 0x29462
testl %edi, %edi
je 0x77c8
movq (%rbx), %rsi
leaq 0x1(%rsi), %rax
movzbl -0x1(%rax), %ecx
cmpl $0x2f, %ecx
je 0x774a
testl %ecx, %ecx
jne 0x774d
jmp 0x7752
movq %rax, %rsi
incq %rax
jmp 0x773b
callq 0xea4b
testl %eax, %eax
jle 0x7c46
movl %eax, %ebx
movq 0x21850(%rip), %rax     # 0x28fb8
movq (%rax), %r14
callq 0xe343
leaq 0x15368(%rip), %rsi     # 0x1cadf
movq %r14, %rdi
movq %rax, %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x52c0
leaq 0x2251b(%rip), %rax     # 0x29ca8
movq (%rax), %r14
testq %r14, %r14
je 0x77b0
callq 0xe343
leaq 0x1533e(%rip), %rsi     # 0x1cadf
movq %r14, %rdi
movq %rax, %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x52c0
pushq $0x2
popq %rsi
movl %ebx, %edi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5310
movq 0x21c63(%rip), %rdi     # 0x29432
testq %rdi, %rdi
je 0x7882
leaq 0x14ce8(%rip), %rsi     # 0x1c4c7
callq 0x5480
leaq 0x224bd(%rip), %rcx     # 0x29ca8
movq %rax, (%rcx)
testq %rax, %rax
jne 0x7882
movq 0x217ba(%rip), %rax     # 0x28fb8
movq (%rax), %r14
callq 0xe343
movq %rax, %r15
movq 0x21c22(%rip), %r12     # 0x29432
callq 0x5070
movq %rax, %rbx
movl (%rax), %ebp
movl %ebp, %edi
callq 0x5540
leaq 0x14ca2(%rip), %rsi     # 0x1c4ca
movq %r14, %rdi
movq %r15, %rdx
movq %r12, %rcx
movl %ebp, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x52c0
leaq 0x22463(%rip), %rax     # 0x29ca8
movq (%rax), %r14
testq %r14, %r14
je 0x7882
callq 0xe343
movq %rax, %r15
movq 0x21bd6(%rip), %r12     # 0x29432
movl (%rbx), %ebx
movl %ebx, %edi
callq 0x5540
leaq 0x14c5e(%rip), %rsi     # 0x1c4ca
movq %r14, %rdi
movq %r15, %rdx
movq %r12, %rcx
movl %ebx, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x52c0
leaq 0x46d(%rip), %rbx       # 0x7cf6
pushq $0x2
popq %rdi
movq %rbx, %rsi
callq 0x52b0
pushq $0xf
popq %rdi
movq %rbx, %rsi
callq 0x52b0
pushq $0xe
popq %rdi
movq %rbx, %rsi
callq 0x52b0
leaq 0x1fc8f(%rip), %rax     # 0x27540
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsp)
leaq 0x1fc5f(%rip), %rax     # 0x27520
movq 0x10(%rax), %rax
movq %rax, (%rsp)
leaq 0x21b10(%rip), %rbx     # 0x293e0
leaq 0x40(%rsp), %r13
leaq 0x10(%rsp), %r15
leaq 0x1525b(%rip), %r14     # 0x1cb3c
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
xorl %eax, %eax
movb %al, 0x60(%rsp)
movb %al, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
cmpb %al, 0x21b3a(%rip)      # 0x29442
je 0x791c
movq %r15, %rdi
leaq 0x21b2e(%rip), %rsi     # 0x29442
pushq $0x21
popq %rdx
callq 0x5080
movq %r13, %rdi
movq %r15, %rsi
pushq $0x21
popq %rdx
movq %rbx, %rcx
callq 0x15538
pushq $0x6
popq %rcx
testl %eax, %eax
jne 0x7962
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x163a5
pushq $0x5
popq %rcx
testl %eax, %eax
jne 0x7962
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x164de
pushq $0x5
popq %rcx
testl %eax, %eax
je 0x7bcc
movl %ecx, 0x21c35(%rip)     # 0x2959d
leaq 0x21afb(%rip), %rdi     # 0x2946a
movq %r13, %rbp
movq %r13, %rsi
pushq $0x20
popq %r12
movq %r12, %rdx
callq 0x5080
leaq 0x21b02(%rip), %r13     # 0x2948a
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x5080
movq %r13, %rdi
callq 0x1695e
cmpl $0x6, 0x21bf8(%rip)     # 0x2959d
jne 0x79d2
movq 0x21a8c(%rip), %rsi     # 0x2943a
testq %rsi, %rsi
je 0x79c4
movq %rbx, %rdi
callq 0x16d24
cmpl $0x6, 0x21bdb(%rip)     # 0x2959d
jne 0x79d2
movq %rbx, %rdi
callq 0x162c7
movl %eax, 0x21bcf(%rip)     # 0x295a1
movq %rbx, %rdi
callq 0xf832
movl 0x21bc0(%rip), %r12d    # 0x295a1
movq 0x215d0(%rip), %rax     # 0x28fb8
movq (%rax), %r13
callq 0xe343
cmpl $0x1, %r12d
je 0x7ab8
cmpl $0x3, %r12d
je 0x7a5c
cmpl $0x2, %r12d
jne 0x7b79
movq %r13, %rdi
leaq 0x15109(%rip), %r13     # 0x1cb1d
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x22280(%rip), %rax     # 0x29ca8
movq (%rax), %r12
testq %r12, %r12
je 0x7a45
callq 0xe343
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x20a64(%rip), %rax     # 0x284b0
movq %rax, 0x21cb3(%rip)     # 0x29706
leaq 0x20a36(%rip), %rax     # 0x28490
jmp 0x7aac
movq %r13, %rdi
leaq 0x150ff(%rip), %r13     # 0x1cb65
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x2222e(%rip), %rax     # 0x29ca8
movq (%rax), %r12
testq %r12, %r12
je 0x7a97
callq 0xe343
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x21272(%rip), %rax     # 0x28d10
movq %rax, 0x21c61(%rip)     # 0x29706
leaq 0x21244(%rip), %rax     # 0x28cf0
movq %rax, 0x21c4b(%rip)     # 0x296fe
jmp 0x7b3f
movq %r13, %rdi
movq %r14, %r13
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x221d6(%rip), %rax     # 0x29ca8
movq (%rax), %r12
testq %r12, %r12
je 0x7aef
callq 0xe343
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x207aa(%rip), %rax     # 0x282a0
movq %rax, 0x21c09(%rip)     # 0x29706
leaq 0x21966(%rip), %rdi     # 0x2946a
leaq 0x1504f(%rip), %rsi     # 0x1cb5a
pushq $0xa
popq %rdx
callq 0x53a0
testl %eax, %eax
leaq 0x1fa04(%rip), %rax     # 0x27520
cmoveq 0x214b4(%rip), %rax     # 0x28fd8
movq %rax, 0x21bd3(%rip)     # 0x296fe
movq (%rsp), %rax
cmoveq 0x8(%rsp), %rax
leaq 0x220ec(%rip), %rcx     # 0x29c28
movq %rax, (%rcx)
callq 0x81f0
movl %eax, %r12d
movq %rbx, %rdi
callq 0x170d4
cmpl $0x0, 0x2187e(%rip)     # 0x293d4
jle 0x7c29
movq %rbp, %r13
pushq $0x3
popq %rdi
callq 0x5550
cmpl $0x0, 0x21866(%rip)     # 0x293d4
jg 0x78e1
jmp 0x7c29
movl 0x21a22(%rip), %ecx     # 0x295a1
xorl %r12d, %r12d
movq %r13, %rdi
leaq 0x15001(%rip), %rsi     # 0x1cb8d
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x2210b(%rip), %rax     # 0x29ca8
movq (%rax), %r13
testq %r13, %r13
je 0x7b47
callq 0xe343
movl 0x219f1(%rip), %ecx     # 0x295a1
xorl %r12d, %r12d
movq %r13, %rdi
leaq 0x14fd0(%rip), %rsi     # 0x1cb8d
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
jmp 0x7b47
movq %r13, %rbp
movq 0x213e2(%rip), %rax     # 0x28fb8
movq (%rax), %r13
callq 0xe343
xorl %r12d, %r12d
movq %r13, %rdi
leaq 0x14f14(%rip), %rsi     # 0x1caff
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x220ac(%rip), %rax     # 0x29ca8
movq (%rax), %r13
testq %r13, %r13
je 0x7b4f
callq 0xe343
xorl %r12d, %r12d
movq %r13, %rdi
leaq 0x14ee5(%rip), %rsi     # 0x1caff
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
jmp 0x7b4f
leaq 0x22078(%rip), %rax     # 0x29ca8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x76fb
callq 0x5130
jmp 0x76fb
pushq $-0x1
popq %r12
jmp 0x76fb
movq 0x21362(%rip), %rax     # 0x28fb8
movq (%rax), %r14
callq 0xe343
leaq 0x148cb(%rip), %rsi     # 0x1c530
xorl %r12d, %r12d
movq %r14, %rdi
movq %rax, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x52c0
leaq 0x22029(%rip), %rax     # 0x29ca8
movq (%rax), %r14
testq %r14, %r14
je 0x7ce9
callq 0xe343
leaq 0x1489d(%rip), %rsi     # 0x1c530
jmp 0x7cd9
movq 0x2131c(%rip), %rax     # 0x28fb8
movq (%rax), %r14
callq 0xe343
leaq 0x1485b(%rip), %rsi     # 0x1c506
xorl %r12d, %r12d
movq %r14, %rdi
movq %rax, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x52c0
leaq 0x21fe3(%rip), %rax     # 0x29ca8
movq (%rax), %r14
testq %r14, %r14
je 0x7ce9
callq 0xe343
leaq 0x1482d(%rip), %rsi     # 0x1c506
movq %r14, %rdi
movq %rax, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x52c0
movq (%rbx), %rdi
callq 0x7d1c
jmp 0x76fb