// File: btbujiangjun[P]abcdl/src/utils/Log.cpp
// Function: abcdl::utils::log::initialize_log_fds(char*)
static void initialize_log_fds(char* argc){
    g_log_fds.resize(NUM_SEVERITIES);
    for(int i = g_log_min_level; i < NUM_SEVERITIES && g_log_to_stderr; i++){
        std::vector<int>& fds = g_log_fds[i];
        fds.push_back(STDERR_FILENO);
    }
    char* log_dir = getenv("ABCDL_LOG_LOGDIR");
    if(log_dir == nullptr){
        log_dir = new char[1];
        *log_dir = '.';
    }
    for(int i = g_log_min_level; i != NUM_SEVERITIES && log_dir != nullptr; i++){
        std::string file_name = join(log_dir, std::string(argc) + "." + g_log_level_name[i]);
        int fd = open(file_name.c_str(), O_CREAT | O_WRONLY, 0644);
        if(fd == -1){
            printf("[%s][%s][%s]\n",log_dir, argc, file_name.c_str());
            fprintf(stderr, "Open log file[%s] error!", file_name.c_str());
            exit(-1);
        }
        g_log_file_fds.push_back(fd);
        std::vector<int>& current_fds = g_log_fds[i];
        current_fds.insert(current_fds.end(), g_log_file_fds.begin(), g_log_file_fds.end());
    }
    atexit(free_log_file_fds);
    g_log_inited = true;
}

// Assembly:
subq $0x188, %rsp            # imm = 0x188
movq %rdi, 0x180(%rsp)
leaq 0x4319a(%rip), %rdi     # 0xcc490
movl $0x4, %esi
callq 0x8a520
movl 0x43182(%rip), %eax     # 0xcc488
movl %eax, 0x17c(%rsp)
xorl %eax, %eax
cmpl $0x4, 0x17c(%rsp)
movb %al, 0x67(%rsp)
jge 0x89327
movb 0x43145(%rip), %al      # 0xcc468
movb %al, 0x67(%rsp)
movb 0x67(%rsp), %al
testb $0x1, %al
jne 0x89331
jmp 0x89380
movslq 0x17c(%rsp), %rsi
leaq 0x43150(%rip), %rdi     # 0xcc490
callq 0x8a0a0
movq %rax, 0x170(%rsp)
movq 0x170(%rsp), %rdi
movl $0x2, 0x16c(%rsp)
leaq 0x16c(%rsp), %rsi
callq 0x8a5c0
movl 0x17c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x17c(%rsp)
jmp 0x8930d
leaq 0xb139(%rip), %rdi      # 0x944c0
callq 0x94d0
movq %rax, 0x160(%rsp)
cmpq $0x0, 0x160(%rsp)
jne 0x893bc
movl $0x1, %edi
callq 0x9030
movq %rax, 0x160(%rsp)
movq 0x160(%rsp), %rax
movb $0x2e, (%rax)
movl 0x430c6(%rip), %eax     # 0xcc488
movl %eax, 0x15c(%rsp)
xorl %eax, %eax
cmpl $0x4, 0x15c(%rsp)
movb %al, 0x66(%rsp)
je 0x893e9
cmpq $0x0, 0x160(%rsp)
setne %al
movb %al, 0x66(%rsp)
movb 0x66(%rsp), %al
testb $0x1, %al
jne 0x893f6
jmp 0x8979d
movq 0x160(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x117(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x9710
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x118(%rsp), %rdi
callq 0x9580
jmp 0x8942e
movq 0x180(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x9f(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x9710
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
leaq 0xa0(%rsp), %rdi
callq 0x9580
jmp 0x89466
leaq 0x6b67(%rip), %rdx      # 0x8ffd4
leaq 0xc0(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x18c80
jmp 0x89484
movslq 0x15c(%rsp), %rsi
leaq 0x42fdd(%rip), %rdi     # 0xcc470
callq 0x8a080
movq %rax, %rdx
leaq 0xe0(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x18cd0
jmp 0x894b2
leaq 0x138(%rsp), %rdi
leaq 0x118(%rsp), %rsi
leaq 0xe0(%rsp), %rdx
callq 0x89cd0
jmp 0x894d1
leaq 0xe0(%rsp), %rdi
callq 0x9260
leaq 0xc0(%rsp), %rdi
callq 0x9260
leaq 0xa0(%rsp), %rdi
callq 0x9260
leaq 0x9f(%rsp), %rdi
callq 0x9470
leaq 0x118(%rsp), %rdi
callq 0x9260
leaq 0x117(%rsp), %rdi
callq 0x9470
leaq 0x138(%rsp), %rdi
callq 0x9170
movq %rax, %rdi
xorl %eax, %eax
movl $0x41, %esi
movl $0x1a4, %edx            # imm = 0x1A4
callq 0x92e0
movl %eax, 0x3c(%rsp)
jmp 0x89546
movl 0x3c(%rsp), %eax
movl %eax, 0x98(%rsp)
cmpl $-0x1, 0x98(%rsp)
jne 0x896c7
movq 0x160(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x180(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x9170
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rax, %rcx
leaq 0xaf37(%rip), %rdi      # 0x944d1
xorl %eax, %eax
callq 0x9060
jmp 0x895a3
movq 0x42a16(%rip), %rax     # 0xcbfc0
movq (%rax), %rax
movq %rax, 0x20(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x9170
movq 0x20(%rsp), %rdi
movq %rax, %rdx
leaq 0xaf11(%rip), %rsi      # 0x944df
movb $0x0, %al
callq 0x95f0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x94c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
jmp 0x8968f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
jmp 0x89675
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
jmp 0x89668
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
jmp 0x8965b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
leaq 0xe0(%rsp), %rdi
callq 0x9260
leaq 0xc0(%rsp), %rdi
callq 0x9260
leaq 0xa0(%rsp), %rdi
callq 0x9260
leaq 0x9f(%rsp), %rdi
callq 0x9470
leaq 0x118(%rsp), %rdi
callq 0x9260
leaq 0x117(%rsp), %rdi
callq 0x9470
jmp 0x897b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x9260
jmp 0x897b8
leaq 0x42dda(%rip), %rdi     # 0xcc4a8
leaq 0x98(%rsp), %rsi
callq 0x8a5f0
jmp 0x896dd
movslq 0x15c(%rsp), %rsi
leaq 0x42da4(%rip), %rdi     # 0xcc490
callq 0x8a0a0
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x8a0f0
movq %rax, 0x80(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x8a720
leaq 0x42d79(%rip), %rdi     # 0xcc4a8
movq %rdi, 0x8(%rsp)
callq 0x8a0c0
movq 0x8(%rsp), %rdi
movq %rax, 0x78(%rsp)
callq 0x8a0f0
movq 0x10(%rsp), %rdi
movq %rax, 0x70(%rsp)
movq 0x88(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rcx
callq 0x8a660
movq %rax, 0x18(%rsp)
jmp 0x89770
movq 0x18(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x9260
movl 0x15c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x15c(%rsp)
jmp 0x893c9
leaq 0x66c(%rip), %rdi       # 0x89e10
callq 0x8d870
movb $0x1, 0x42d10(%rip)     # 0xcc4c0
addq $0x188, %rsp            # imm = 0x188
retq
movq 0x108(%rsp), %rdi
callq 0x9700
nopw %cs:(%rax,%rax)