// File: /workspace/github_c_makefile_star2_O0/buf1024[P]mysch/mysch.c
// Function: load_conf
int load_conf(sch_info_t* info, int flag)
{
    int ret = 0;
    ini_conf_t* ini = ini_create();
    ret = ini_load(ini, info->conf);
    if (ret != 0) {
        ini_destroy(ini);
        printf("ini_load failed.\n");
        return -1;
    }

    ini_sec_t* sec = ini_get_sec(ini, "COMMON");
    if(sec == NULL) {
        printf("ini_get_sec failed.\n");
        ini_destroy(ini);
        return -1;
    }

    READ_CONF_STR_OPT(sec, "RUN_USER", info->run_user);

    if(runas(info->run_user) != 0) {
        printf("runas %s failed.\n", info->run_user);
        return -1;
    }

    {
        char file_level[64] = { 0 };
        char log_path[256] = { 0 };
        char log_header[64] = { 0 };
        int log_buffer = 0;
        int log_sw_time = 0;

        READ_CONF_STR_MUST(sec, "LOG_LEVEL", file_level);
        READ_CONF_STR_MUST(sec, "LOG_PATH", log_path);
        READ_CONF_STR_MUST(sec, "LOG_HEADER", log_header);
        READ_CONF_INT_MUST(sec, "LOG_BUFFER", log_buffer);
        READ_CONF_INT_MUST(sec, "LOG_SWITCH_TIME", log_sw_time);

        if(log_buffer < 0 || log_sw_time < 0) {
            printf("log_buffer = %d or log_switch_time = %d invalid.\n",
                    log_buffer, log_sw_time);
            return -1;
        }
        if(log_sw_time > 86400) {
            log_sw_time %= 86400;
        }

        if (flag != LOAD_CONF_TEST) {
            if (flag == LOAD_CONF_RELOAD) {
                log_finish();
                log_clearup();
            }

            int lvl = log_get_level(file_level);

            if (log_initialize_console(lvl) != 0) {
                printf("log_initialize_console failed.\n");
                return -1;
            }

            if (log_initialize_file(lvl, log_path, log_header, log_buffer,
                        log_sw_time, -1) != 0) {
                printf("log_initialize_file failed.\n");
                return -1;
            }
            if (log_start() != 0) {
                printf("log_initilize failed.\n");
                return -1;
            }
            LOG_INFO("logger is ready.\n");
        }
    }

    READ_CONF_INT_MUST(sec, "SLEEP_TIME", info->sleep_time);
    READ_CONF_INT_MUST(sec, "KILL_CHILD_FLAG", info->kill_flag);
    READ_CONF_STR_OPT(sec, "PID_FILE", info->pid_file);

    {
        char prog_list[2048] = { 0 };
        char progs[128][64] = { { 0 } };
        int num = 0;
        READ_CONF_STR_MUST(sec, "PROG_LIST", prog_list);

        num = split(prog_list, '|', (char **)progs, 64, 128);
        if(num <= 0) {
            LOG_ERROR("split %s failed.\n", prog_list);
            ini_destroy(ini);
            log_finish();
            return -1;
        }

        if(flag == LOAD_CONF_RELOAD) {
            if(info->progq){
                list_iter* it = list_get_iterator(info->progq, AL_START_HEAD);
                list_node* n = NULL;
                while((n = list_next(it)) != NULL) {
                    prog_t* p = list_node_value(n);
                    if(p->cond) {
                        list_release(p->cond, AL_FREE);
                    }
                }

                list_release_iterator(it);
                list_release(info->progq, AL_FREE);
            }

            info->progq = list_create();
        }

        int i = 0;
        for(i=0; i<num; i++) {

            ini_sec_t* ssec = ini_get_sec(ini, progs[i]);
            if (ssec == NULL ) {
                LOG_ERROR("get section %s failed.\n", progs[i]);
                ini_destroy(ini);
                log_finish();
                return -1;
            }


            prog_t* prog = (prog_t*)malloc(sizeof(*prog));
            memset(prog, 0, sizeof(*prog));

            char run_cmd[1024] = {0};

            READ_CONF_STR_MUST(ssec, "RUN_COMMAND", run_cmd);
            READ_CONF_STR_MUST(ssec, "RUN_USER", prog->user);
            char run_flag[256] = {0};
            READ_CONF_STR_MUST(ssec, "RUN_FLAG", run_flag);
            if(strcasecmp(run_flag, "forkfirst") == 0){
                prog->flag = FORK_FIRST;
            }else if(strcasecmp(run_flag, "forkonce") == 0){
                prog->flag = FORK_ONCE;
            }else if(strcasecmp(run_flag, "forkwatch") == 0){
                prog->flag = FORK_WATCH;
            }else if(strcasecmp(run_flag, "forkperiod") == 0){
                prog->flag = FORK_PERIOD;
            }else{
                printf("syntax not right, available value: forkfirst forkonce forkwatch\n");
                return -1;
            } 
            int ncmd = 0;
            ncmd = split(run_cmd, ' ',  (char**)prog->argv, 128, 16);
            if(ncmd <= 0){
                LOG_ERROR("split cmd %s failed\n", run_cmd);
                free(prog);

                ini_destroy(ini);
                log_finish();
                return -1;
            }
            prog->argc = ncmd;
            strcpy(prog->cmd, prog->argv[0]);

            if(prog->flag) {
                char cond[1024] = {0};
                READ_CONF_STR_MUST(ssec, "RUN_TIME", cond);

                if(build_condition(prog, cond) != 0) {
                    LOG_ERROR("build_condition failed. condition=%s\n", cond);
                    free(prog);

                    ini_destroy(ini);
                    log_finish();
                    return -1;
                }
                char has_pid[1024] = {0};
                READ_CONF_STR_OPT(ssec, "RUN_HAS_PID_FILE", has_pid);
                if(strcmp(has_pid, "1") == 0) {
                    prog->has_pid_file = 1;
                } 
                if(prog->has_pid_file == 0) {
                    if(strcasecmp(has_pid, "yes") == 0) {
                        prog->has_pid_file = 1;
                    }
                }
                READ_CONF_STR_OPT(ssec, "RUN_PID_FILE", prog->pid_file);
            }


            list_iter* it = list_get_iterator(info->progq, AL_START_HEAD);
            list_node* node = NULL;
            while((node = list_next(it))) {
                prog_t* lp = list_node_value(node);
                if(lp->flag > prog->flag) {
                    break;
                }
            }
            if(node == NULL) {
                if(list_length(info->progq) == 0) {
                    list_add_node_head(info->progq, prog);
                }else{
                    list_add_node_tail(info->progq, prog);
                }
            }else{
                list_insert_node(info->progq, node, prog, 0);
            }
            list_release_iterator(it);
        }

        list_iter* it = list_get_iterator(info->progq, AL_START_HEAD);
        list_node* node = NULL;
        while((node = list_next(it))) {
            prog_t* lp = list_node_value(node);
            LOG_DEBUG("prog = %s\n", lp->cmd);
        }
        list_release_iterator(it);
    }


    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x37b0, %rsp           # imm = 0x37B0
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movb $0x0, %al
callq 0x44b0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x148, %rsi            # imm = 0x148
callq 0x44c0
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x79d4
movq -0x20(%rbp), %rdi
callq 0x4420
leaq 0x293d(%rip), %rdi      # 0xa2fe
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
movq -0x20(%rbp), %rdi
leaq 0x2931(%rip), %rsi      # 0xa310
callq 0x5090
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x7a12
leaq 0x2921(%rip), %rdi      # 0xa317
movb $0x0, %al
callq 0x2150
movq -0x20(%rbp), %rdi
callq 0x4420
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
jmp 0x7a14
movq -0x28(%rbp), %rdi
leaq 0x290d(%rip), %rsi      # 0xa32c
callq 0x5160
movq %rax, -0x30(%rbp)
xorl %eax, %eax
cmpq -0x30(%rbp), %rax
je 0x7a44
movq -0x10(%rbp), %rdi
addq $0x108, %rdi            # imm = 0x108
movq -0x30(%rbp), %rsi
callq 0x2090
jmp 0x7a46
movq -0x10(%rbp), %rdi
addq $0x108, %rdi            # imm = 0x108
callq 0x68f0
cmpl $0x0, %eax
je 0x7a80
movq -0x10(%rbp), %rsi
addq $0x108, %rsi            # imm = 0x108
leaq 0x28c8(%rip), %rdi      # 0xa335
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x2190
leaq -0x170(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x2190
leaq -0x1b0(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x2190
movl $0x0, -0x1b4(%rbp)
movl $0x0, -0x1b8(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x2872(%rip), %rsi      # 0xa347
callq 0x5160
movq %rax, -0x1c0(%rbp)
xorl %eax, %eax
cmpq -0x1c0(%rbp), %rax
jne 0x7b0d
leaq 0x285e(%rip), %rdi      # 0xa351
leaq 0x284d(%rip), %rsi      # 0xa347
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
leaq -0x70(%rbp), %rdi
movq -0x1c0(%rbp), %rsi
callq 0x2090
jmp 0x7b1f
jmp 0x7b21
movq -0x28(%rbp), %rdi
leaq 0x2852(%rip), %rsi      # 0xa37e
callq 0x5160
movq %rax, -0x1c8(%rbp)
xorl %eax, %eax
cmpq -0x1c8(%rbp), %rax
jne 0x7b64
leaq 0x2807(%rip), %rdi      # 0xa351
leaq 0x282d(%rip), %rsi      # 0xa37e
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
leaq -0x170(%rbp), %rdi
movq -0x1c8(%rbp), %rsi
callq 0x2090
jmp 0x7b79
jmp 0x7b7b
movq -0x28(%rbp), %rdi
leaq 0x2801(%rip), %rsi      # 0xa387
callq 0x5160
movq %rax, -0x1d0(%rbp)
xorl %eax, %eax
cmpq -0x1d0(%rbp), %rax
jne 0x7bbe
leaq 0x27ad(%rip), %rdi      # 0xa351
leaq 0x27dc(%rip), %rsi      # 0xa387
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
leaq -0x1b0(%rbp), %rdi
movq -0x1d0(%rbp), %rsi
callq 0x2090
jmp 0x7bd3
jmp 0x7bd5
movq -0x28(%rbp), %rdi
leaq 0x27b2(%rip), %rsi      # 0xa392
callq 0x5160
movq %rax, -0x1d8(%rbp)
xorl %eax, %eax
cmpq -0x1d8(%rbp), %rax
jne 0x7c18
leaq 0x2753(%rip), %rdi      # 0xa351
leaq 0x278d(%rip), %rsi      # 0xa392
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
movq -0x1d8(%rbp), %rdi
callq 0x2330
movl %eax, -0x1b4(%rbp)
jmp 0x7c2c
jmp 0x7c2e
movq -0x28(%rbp), %rdi
leaq 0x2764(%rip), %rsi      # 0xa39d
callq 0x5160
movq %rax, -0x1e0(%rbp)
xorl %eax, %eax
cmpq -0x1e0(%rbp), %rax
jne 0x7c71
leaq 0x26fa(%rip), %rdi      # 0xa351
leaq 0x273f(%rip), %rsi      # 0xa39d
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
movq -0x1e0(%rbp), %rdi
callq 0x2330
movl %eax, -0x1b8(%rbp)
jmp 0x7c85
cmpl $0x0, -0x1b4(%rbp)
jl 0x7c97
cmpl $0x0, -0x1b8(%rbp)
jge 0x7cbd
movl -0x1b4(%rbp), %esi
movl -0x1b8(%rbp), %edx
leaq 0x2703(%rip), %rdi      # 0xa3ad
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
cmpl $0x15180, -0x1b8(%rbp)  # imm = 0x15180
jle 0x7cdd
movl -0x1b8(%rbp), %eax
movl $0x15180, %ecx          # imm = 0x15180
cltd
idivl %ecx
movl %edx, -0x1b8(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x7db7
cmpl $0x1, -0x14(%rbp)
jne 0x7cfb
movb $0x0, %al
callq 0x5a20
movb $0x0, %al
callq 0x5460
leaq -0x70(%rbp), %rdi
callq 0x51c0
movl %eax, -0x1e4(%rbp)
movl -0x1e4(%rbp), %edi
callq 0x5b40
cmpl $0x0, %eax
je 0x7d34
leaq 0x26be(%rip), %rdi      # 0xa3df
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
movl -0x1e4(%rbp), %edi
leaq -0x170(%rbp), %rsi
leaq -0x1b0(%rbp), %rdx
movl -0x1b4(%rbp), %ecx
movl -0x1b8(%rbp), %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0x5b70
cmpl $0x0, %eax
je 0x7d7f
leaq 0x2693(%rip), %rdi      # 0xa3ff
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
movb $0x0, %al
callq 0x53e0
cmpl $0x0, %eax
je 0x7da5
leaq 0x268a(%rip), %rdi      # 0xa41c
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
jmp 0x7da7
leaq 0x2685(%rip), %rdi      # 0xa433
movb $0x0, %al
callq 0x5720
jmp 0x7db7
jmp 0x7db9
movq -0x28(%rbp), %rdi
leaq 0x2681(%rip), %rsi      # 0xa445
callq 0x5160
movq %rax, -0x1f0(%rbp)
xorl %eax, %eax
cmpq -0x1f0(%rbp), %rax
jne 0x7dfc
leaq 0x256f(%rip), %rdi      # 0xa351
leaq 0x265c(%rip), %rsi      # 0xa445
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
movq -0x1f0(%rbp), %rdi
callq 0x2330
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x7e12
jmp 0x7e14
movq -0x28(%rbp), %rdi
leaq 0x2631(%rip), %rsi      # 0xa450
callq 0x5160
movq %rax, -0x1f8(%rbp)
xorl %eax, %eax
cmpq -0x1f8(%rbp), %rax
jne 0x7e57
leaq 0x2514(%rip), %rdi      # 0xa351
leaq 0x260c(%rip), %rsi      # 0xa450
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
movq -0x1f8(%rbp), %rdi
callq 0x2330
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
jmp 0x7e6e
jmp 0x7e70
movq -0x28(%rbp), %rdi
leaq 0x26f6(%rip), %rsi      # 0xa571
callq 0x5160
movq %rax, -0x200(%rbp)
xorl %eax, %eax
cmpq -0x200(%rbp), %rax
je 0x7ea6
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
movq -0x200(%rbp), %rsi
callq 0x2090
jmp 0x7ea8
leaq -0xa00(%rbp), %rdi
xorl %esi, %esi
movl $0x800, %edx            # imm = 0x800
callq 0x2190
leaq -0x2a00(%rbp), %rdi
xorl %esi, %esi
movl $0x2000, %edx           # imm = 0x2000
callq 0x2190
movl $0x0, -0x2a04(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x257d(%rip), %rsi      # 0xa460
callq 0x5160
movq %rax, -0x2a10(%rbp)
xorl %eax, %eax
cmpq -0x2a10(%rbp), %rax
jne 0x7f1b
leaq 0x2450(%rip), %rdi      # 0xa351
leaq 0x2558(%rip), %rsi      # 0xa460
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
leaq -0xa00(%rbp), %rdi
movq -0x2a10(%rbp), %rsi
callq 0x2090
jmp 0x7f30
leaq -0xa00(%rbp), %rdi
leaq -0x2a00(%rbp), %rdx
movl $0x7c, %esi
movl $0x40, %ecx
movl $0x80, %r8d
callq 0x7110
movl %eax, -0x2a04(%rbp)
cmpl $0x0, -0x2a04(%rbp)
jg 0x7f95
jmp 0x7f64
leaq -0xa00(%rbp), %rsi
leaq 0x24f8(%rip), %rdi      # 0xa46a
movb $0x0, %al
callq 0x58a0
movq -0x20(%rbp), %rdi
callq 0x4420
movb $0x0, %al
callq 0x5a20
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
cmpl $0x1, -0x14(%rbp)
jne 0x8059
movq -0x10(%rbp), %rax
cmpq $0x0, 0x248(%rax)
je 0x8046
movq -0x10(%rbp), %rax
movq 0x248(%rax), %rdi
xorl %esi, %esi
callq 0x40f0
movq %rax, -0x2a18(%rbp)
movq $0x0, -0x2a20(%rbp)
movq -0x2a18(%rbp), %rdi
callq 0x41e0
movq %rax, -0x2a20(%rbp)
cmpq $0x0, %rax
je 0x8028
movq -0x2a20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x2a28(%rbp)
movq -0x2a28(%rbp), %rax
cmpq $0x0, 0xa58(%rax)
je 0x8026
movq -0x2a28(%rbp), %rax
movq 0xa58(%rax), %rdi
xorl %esi, %esi
callq 0x3d10
jmp 0x7fd5
movq -0x2a18(%rbp), %rdi
callq 0x4160
movq -0x10(%rbp), %rax
movq 0x248(%rax), %rdi
xorl %esi, %esi
callq 0x3d10
callq 0x3cb0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x248(%rax)
movl $0x0, -0x2a2c(%rbp)
movl $0x0, -0x2a2c(%rbp)
movl -0x2a2c(%rbp), %eax
cmpl -0x2a04(%rbp), %eax
jge 0x8698
movq -0x20(%rbp), %rdi
movslq -0x2a2c(%rbp), %rax
leaq -0x2a00(%rbp), %rsi
shlq $0x6, %rax
addq %rax, %rsi
callq 0x5090
movq %rax, -0x2a38(%rbp)
cmpq $0x0, -0x2a38(%rbp)
jne 0x80ef
jmp 0x80b0
movslq -0x2a2c(%rbp), %rax
leaq -0x2a00(%rbp), %rsi
shlq $0x6, %rax
addq %rax, %rsi
leaq 0x23b0(%rip), %rdi      # 0xa47c
movb $0x0, %al
callq 0x58a0
movq -0x20(%rbp), %rdi
callq 0x4420
movb $0x0, %al
callq 0x5a20
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
movl $0xa70, %edi            # imm = 0xA70
callq 0x22b0
movq %rax, -0x2a40(%rbp)
movq -0x2a40(%rbp), %rdi
xorl %esi, %esi
movl $0xa70, %edx            # imm = 0xA70
callq 0x2190
leaq -0x2e40(%rbp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x2190
movq -0x2a38(%rbp), %rdi
leaq 0x2360(%rip), %rsi      # 0xa494
callq 0x5160
movq %rax, -0x2e48(%rbp)
xorl %eax, %eax
cmpq -0x2e48(%rbp), %rax
jne 0x816c
leaq 0x21ff(%rip), %rdi      # 0xa351
leaq 0x233b(%rip), %rsi      # 0xa494
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
leaq -0x2e40(%rbp), %rdi
movq -0x2e48(%rbp), %rsi
callq 0x2090
jmp 0x8181
jmp 0x8183
movq -0x2a38(%rbp), %rdi
leaq 0x219b(%rip), %rsi      # 0xa32c
callq 0x5160
movq %rax, -0x2e50(%rbp)
xorl %eax, %eax
cmpq -0x2e50(%rbp), %rax
jne 0x81c9
leaq 0x21a2(%rip), %rdi      # 0xa351
leaq 0x2176(%rip), %rsi      # 0xa32c
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
movq -0x2a40(%rbp), %rdi
addq $0xa10, %rdi            # imm = 0xA10
movq -0x2e50(%rbp), %rsi
callq 0x2090
jmp 0x81e5
leaq -0x2f50(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x2190
movq -0x2a38(%rbp), %rdi
leaq 0x229a(%rip), %rsi      # 0xa4a0
callq 0x5160
movq %rax, -0x2f58(%rbp)
xorl %eax, %eax
cmpq -0x2f58(%rbp), %rax
jne 0x823e
leaq 0x212d(%rip), %rdi      # 0xa351
leaq 0x2275(%rip), %rsi      # 0xa4a0
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
leaq -0x2f50(%rbp), %rdi
movq -0x2f58(%rbp), %rsi
callq 0x2090
jmp 0x8253
leaq -0x2f50(%rbp), %rdi
leaq 0x2248(%rip), %rsi      # 0xa4a9
callq 0x2040
cmpl $0x0, %eax
jne 0x8281
movq -0x2a40(%rbp), %rax
movl $0xffffffff, 0xa50(%rax) # imm = 0xFFFFFFFF
jmp 0x8322
leaq -0x2f50(%rbp), %rdi
leaq 0x2224(%rip), %rsi      # 0xa4b3
callq 0x2040
cmpl $0x0, %eax
jne 0x82ac
movq -0x2a40(%rbp), %rax
movl $0x0, 0xa50(%rax)
jmp 0x8320
leaq -0x2f50(%rbp), %rdi
leaq 0x2202(%rip), %rsi      # 0xa4bc
callq 0x2040
cmpl $0x0, %eax
jne 0x82d7
movq -0x2a40(%rbp), %rax
movl $0x1, 0xa50(%rax)
jmp 0x831e
leaq -0x2f50(%rbp), %rdi
leaq 0x21e1(%rip), %rsi      # 0xa4c6
callq 0x2040
cmpl $0x0, %eax
jne 0x8302
movq -0x2a40(%rbp), %rax
movl $0x2, 0xa50(%rax)
jmp 0x831c
leaq 0x21c8(%rip), %rdi      # 0xa4d1
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
jmp 0x831e
jmp 0x8320
jmp 0x8322
movl $0x0, -0x2f5c(%rbp)
leaq -0x2e40(%rbp), %rdi
movq -0x2a40(%rbp), %rdx
addq $0x210, %rdx            # imm = 0x210
movl $0x20, %esi
movl $0x80, %ecx
movl $0x10, %r8d
callq 0x7110
movl %eax, -0x2f5c(%rbp)
cmpl $0x0, -0x2f5c(%rbp)
jg 0x83a4
jmp 0x8367
leaq -0x2e40(%rbp), %rsi
leaq 0x219d(%rip), %rdi      # 0xa512
movb $0x0, %al
callq 0x58a0
movq -0x2a40(%rbp), %rdi
callq 0x2030
movq -0x20(%rbp), %rdi
callq 0x4420
movb $0x0, %al
callq 0x5a20
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
movl -0x2f5c(%rbp), %ecx
movq -0x2a40(%rbp), %rax
movl %ecx, 0x20c(%rax)
movq -0x2a40(%rbp), %rdi
addq $0x10c, %rdi            # imm = 0x10C
movq -0x2a40(%rbp), %rsi
addq $0x210, %rsi            # imm = 0x210
callq 0x2090
movq -0x2a40(%rbp), %rax
cmpl $0x0, 0xa50(%rax)
je 0x859b
leaq -0x3360(%rbp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x2190
movq -0x2a38(%rbp), %rdi
leaq 0x211a(%rip), %rsi      # 0xa527
callq 0x5160
movq %rax, -0x3368(%rbp)
xorl %eax, %eax
cmpq -0x3368(%rbp), %rax
jne 0x8445
leaq 0x1f26(%rip), %rdi      # 0xa351
leaq 0x20f5(%rip), %rsi      # 0xa527
movb $0x0, %al
callq 0x2150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
leaq -0x3360(%rbp), %rdi
movq -0x3368(%rbp), %rsi
callq 0x2090
jmp 0x845a
movq -0x2a40(%rbp), %rdi
leaq -0x3360(%rbp), %rsi
callq 0x8730
cmpl $0x0, %eax
je 0x84b1
jmp 0x8474
leaq -0x3360(%rbp), %rsi
leaq 0x20ae(%rip), %rdi      # 0xa530
movb $0x0, %al
callq 0x58a0
movq -0x2a40(%rbp), %rdi
callq 0x2030
movq -0x20(%rbp), %rdi
callq 0x4420
movb $0x0, %al
callq 0x5a20
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8718
leaq -0x3770(%rbp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x2190
movq -0x2a38(%rbp), %rdi
leaq 0x2084(%rip), %rsi      # 0xa556
callq 0x5160
movq %rax, -0x3778(%rbp)
xorl %eax, %eax
cmpq -0x3778(%rbp), %rax
je 0x84fc
leaq -0x3770(%rbp), %rdi
movq -0x3778(%rbp), %rsi
callq 0x2090
jmp 0x84fe
leaq -0x3770(%rbp), %rdi
leaq 0x205b(%rip), %rsi      # 0xa567
callq 0x2200
cmpl $0x0, %eax
jne 0x8524
movq -0x2a40(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x2a40(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x8559
leaq -0x3770(%rbp), %rdi
leaq 0x202a(%rip), %rsi      # 0xa569
callq 0x2040
cmpl $0x0, %eax
jne 0x8557
movq -0x2a40(%rbp), %rax
movl $0x1, 0x8(%rax)
jmp 0x8559
jmp 0x855b
movq -0x2a38(%rbp), %rdi
leaq 0x2004(%rip), %rsi      # 0xa56d
callq 0x5160
movq %rax, -0x3780(%rbp)
xorl %eax, %eax
cmpq -0x3780(%rbp), %rax
je 0x8597
movq -0x2a40(%rbp), %rdi
addq $0xc, %rdi
movq -0x3780(%rbp), %rsi
callq 0x2090
jmp 0x8599
jmp 0x859b
movq -0x10(%rbp), %rax
movq 0x248(%rax), %rdi
xorl %esi, %esi
callq 0x40f0
movq %rax, -0x3788(%rbp)
movq $0x0, -0x3790(%rbp)
movq -0x3788(%rbp), %rdi
callq 0x41e0
movq %rax, -0x3790(%rbp)
cmpq $0x0, %rax
je 0x860a
movq -0x3790(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x3798(%rbp)
movq -0x3798(%rbp), %rax
movl 0xa50(%rax), %eax
movq -0x2a40(%rbp), %rcx
cmpl 0xa50(%rcx), %eax
jle 0x8608
jmp 0x860a
jmp 0x85bf
cmpq $0x0, -0x3790(%rbp)
jne 0x8658
movq -0x10(%rbp), %rax
movq 0x248(%rax), %rax
cmpq $0x0, 0x10(%rax)
jne 0x863f
movq -0x10(%rbp), %rax
movq 0x248(%rax), %rdi
movq -0x2a40(%rbp), %rsi
callq 0x3d90
jmp 0x8656
movq -0x10(%rbp), %rax
movq 0x248(%rax), %rdi
movq -0x2a40(%rbp), %rsi
callq 0x3e60
jmp 0x8678
movq -0x10(%rbp), %rax
movq 0x248(%rax), %rdi
movq -0x3790(%rbp), %rsi
movq -0x2a40(%rbp), %rdx
xorl %ecx, %ecx
callq 0x3f30
movq -0x3788(%rbp), %rdi
callq 0x4160
movl -0x2a2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2a2c(%rbp)
jmp 0x806d
movq -0x10(%rbp), %rax
movq 0x248(%rax), %rdi
xorl %esi, %esi
callq 0x40f0
movq %rax, -0x37a0(%rbp)
movq $0x0, -0x37a8(%rbp)
movq -0x37a0(%rbp), %rdi
callq 0x41e0
movq %rax, -0x37a8(%rbp)
cmpq $0x0, %rax
je 0x8705
movq -0x37a8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x37b0(%rbp)
movq -0x37b0(%rbp), %rsi
addq $0x10c, %rsi            # imm = 0x10C
leaq 0x1e7e(%rip), %rdi      # 0xa57a
movb $0x0, %al
callq 0x5520
jmp 0x86bc
movq -0x37a0(%rbp), %rdi
callq 0x4160
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x37b0, %rsp           # imm = 0x37B0
popq %rbp
retq
nopw %cs:(%rax,%rax)