// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/parseconf.c
// Function: parseconf_load_setting
int parseconf_load_setting(char* line)
{
    str_trim_crlf(line);

    while (' ' == *line)
        line++;

    if ('#' == *line)
        return 0;

    char config_key[128] = {0};
    char config_val[128] = {0};

    if ( 2 != str_split(line,config_key,config_val,'='))
    {
        fprintf(stderr, "config synax error:%s\n",line);
        return -1;
    }

    struct conf_str_t* conf_str = conf_str_array;
    while (NULL != conf_str->conf_str_key) 
    {
        if (0 == strcmp(conf_str->conf_str_key,config_key))
        {
            if (NULL != *(conf_str->conf_str_val))
                free(conf_str->conf_str_val);

            *(conf_str->conf_str_val) = strdup(config_val);
            return 0;
        } 
        conf_str++;
    }

    //查找整数型配置
    struct conf_uint_t* conf_uint = conf_uint_array;
    while ( NULL != conf_uint->conf_uint_key)
    {
        if (0 == strcmp(conf_uint->conf_uint_key,config_key))
        {
            unsigned int nval = 0;
            if ( '0' == config_val[0])
                nval = str_octal_to_uint(config_val);
            else
                nval = atoi(config_val);

            *(conf_uint->conf_uint_val) = nval;
            return 0;
        }
        conf_uint++;
    }


    //查找bool型配置
    struct conf_bool_t* conf_bool = conf_bool_array;
    while ( NULL != conf_bool->conf_bool_key)
    {
        if (0 == strcmp(conf_bool->conf_bool_key,config_key))
        {
            if ( 0 == strcmp(config_val,"yes")
              || 0 == strcmp(config_val,"YES")   
              || 0 == strcmp(config_val,"1"))
                *(conf_bool->conf_bool_val) = 1;
            if ( 0 == strcmp(config_val,"no")
              || 0 == strcmp(config_val,"NO")   
              || 0 == strcmp(config_val,"0"))
                *(conf_bool->conf_bool_val) = 0;

            return 0;
        }
        conf_bool++;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4f90
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
movl $0x20, %eax
cmpl %ecx, %eax
jne 0x52d6
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x52b8
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
movl $0x23, %eax
cmpl %ecx, %eax
jne 0x52f2
movl $0x0, -0x4(%rbp)
jmp 0x55e8
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x3220
leaq -0x110(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x3220
movq -0x10(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0x110(%rbp), %rdx
movl $0x3d, %ecx
callq 0x5010
movl %eax, %ecx
movl $0x2, %eax
cmpl %ecx, %eax
je 0x5367
movq 0x7cb2(%rip), %rax      # 0xcff8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x3e5f(%rip), %rsi      # 0x91b3
movb $0x0, %al
callq 0x3310
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x55e8
leaq 0x7f82(%rip), %rax      # 0xd2f0
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
je 0x5407
movq -0x118(%rbp), %rax
movq (%rax), %rdi
leaq -0x90(%rbp), %rsi
callq 0x32e0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x53f0
movq -0x118(%rbp), %rax
movq 0x8(%rax), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
je 0x53c7
movq -0x118(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3030
leaq -0x110(%rbp), %rdi
callq 0x3500
movq %rax, %rcx
movq -0x118(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x55e8
movq -0x118(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x118(%rbp)
jmp 0x5375
leaq 0x7f02(%rip), %rax      # 0xd310
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
je 0x54bb
movq -0x120(%rbp), %rax
movq (%rax), %rdi
leaq -0x90(%rbp), %rsi
callq 0x32e0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x54a4
movl $0x0, -0x124(%rbp)
movsbl -0x110(%rbp), %ecx
movl $0x30, %eax
cmpl %ecx, %eax
jne 0x5473
leaq -0x110(%rbp), %rdi
callq 0x5130
movl %eax, -0x124(%rbp)
jmp 0x5485
leaq -0x110(%rbp), %rdi
callq 0x34c0
movl %eax, -0x124(%rbp)
movl -0x124(%rbp), %ecx
movq -0x120(%rbp), %rax
movq 0x8(%rax), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x55e8
movq -0x120(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x120(%rbp)
jmp 0x5415
leaq 0x7efe(%rip), %rax      # 0xd3c0
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
je 0x55e1
movq -0x130(%rbp), %rax
movq (%rax), %rdi
leaq -0x90(%rbp), %rsi
callq 0x32e0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x55ca
leaq -0x110(%rbp), %rdi
leaq 0x3cbf(%rip), %rsi      # 0x91ca
callq 0x32e0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x554e
leaq -0x110(%rbp), %rdi
leaq 0x3ca8(%rip), %rsi      # 0x91ce
callq 0x32e0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x554e
leaq -0x110(%rbp), %rdi
leaq 0x3e00(%rip), %rsi      # 0x9341
callq 0x32e0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x555f
movq -0x130(%rbp), %rax
movq 0x8(%rax), %rax
movl $0x1, (%rax)
leaq -0x110(%rbp), %rdi
leaq 0x3c65(%rip), %rsi      # 0x91d2
callq 0x32e0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x55b0
leaq -0x110(%rbp), %rdi
leaq 0x3c4d(%rip), %rsi      # 0x91d5
callq 0x32e0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x55b0
leaq -0x110(%rbp), %rdi
leaq 0x3b8d(%rip), %rsi      # 0x9130
callq 0x32e0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x55c1
movq -0x130(%rbp), %rax
movq 0x8(%rax), %rax
movl $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x55e8
movq -0x130(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x130(%rbp)
jmp 0x54c9
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop