// File: /workspace/github_c_makefile_star2_O0/ieyasu[P]funit/config.c
// Function: parse_config_setting
static int parse_config_setting(struct ParseState *ps, struct Config *conf)
{
    // config key
    size_t keylen;
    char *key = next_thing(ps, &keylen, key_end_finder);
    if (key == END_OF_LINE) {
        parse_fail(ps, ps->next_pos, "config key or comment ('#') expected");
        return -1;
    }

    // around the '='
    skip_next_ws(ps);
    if (*ps->next_pos == '=') {
        ps->next_pos++;
        skip_next_ws(ps);
    } else {
        parse_fail(ps, ps->next_pos, "'=' expected after config key");
        return -1;
    }

    // config value
    size_t valuelen;
    char *value = NULL;
    int escapes = 0;
    ps ->read_pos = ps->next_pos;
    if (*ps->read_pos == '"' || *ps->read_pos == '\'') {
        value = next_quoted_string(ps, &valuelen, &escapes);
    } else {
        value = next_thing(ps, &valuelen, value_end_finder);
    }
    if (!value) return -1;

    // check for trailing text
    skip_next_ws(ps);
    switch (*ps->next_pos) {
    case '\r':
    case '\n':
    case '#':
        break;
    default:
        parse_fail(ps, ps->next_pos, "unexpected text after config value -- add a comment or surround it with quotes (\" or ')");
        return -1;
    }

    // store value
    if (escapes) {
        value = copy_escaped_string(value, valuelen);
    } else {
        value = fu_strndup(value, valuelen);
    }

    if (keylen == 5 && !strncmp("build", key, 5)) {
        conf->build = value;
        conf->build_len = valuelen;
    } else if (keylen == 11 && !strncmp("fortran_ext", key, 11)) {
        conf->fortran_ext = value;
        conf->fortran_ext_len = valuelen;
    } else if (keylen == 12 && !strncmp("template_ext", key, 12)) {
        conf->template_ext = value;
        conf->template_ext_len = valuelen;
    } else {
        free(value);

        fprintf(stderr, "%s:%li: Error: unknown config key '",
                ps->path, ps->lineno);
        fwrite(key, 1, keylen, stderr);
        fputs("' in\n", stderr);
        fwrite(ps->line_pos, 1, ps->next_line_pos - ps->line_pos, stderr);
        fputs("\n", stderr);

        return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq 0x311(%rip), %rdx       # 0x4290
callq 0x69c0
movq %rax, -0x28(%rbp)
movl $0x1, %eax
cmpq %rax, -0x28(%rbp)
jne 0x3fb7
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
leaq 0x6903(%rip), %rdx      # 0xa8a9
callq 0x63e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4286
movq -0x10(%rbp), %rdi
callq 0x6920
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x3feb
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rdi
callq 0x6920
jmp 0x400f
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
leaq 0x68d0(%rip), %rdx      # 0xa8ce
callq 0x63e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4286
movq $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0x404e
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x4065
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x3c(%rbp), %rdx
callq 0x4300
movq %rax, -0x38(%rbp)
jmp 0x407d
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq 0x3ec(%rip), %rdx       # 0x4460
callq 0x69c0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x4090
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4286
movq -0x10(%rbp), %rdi
callq 0x6920
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movsbl (%rax), %eax
movl %eax, -0x40(%rbp)
subl $0xa, %eax
je 0x40c2
jmp 0x40ae
movl -0x40(%rbp), %eax
subl $0xd, %eax
je 0x40c2
jmp 0x40b8
movl -0x40(%rbp), %eax
subl $0x23, %eax
jne 0x40c4
jmp 0x40c2
jmp 0x40e8
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
leaq 0x6815(%rip), %rdx      # 0xa8ec
callq 0x63e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4286
cmpl $0x0, -0x3c(%rbp)
je 0x4101
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x44d0
movq %rax, -0x38(%rbp)
jmp 0x4112
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x9070
movq %rax, -0x38(%rbp)
cmpq $0x5, -0x20(%rbp)
jne 0x414f
movq -0x28(%rbp), %rsi
leaq 0x6820(%rip), %rdi      # 0xa944
movl $0x5, %edx
callq 0x2080
cmpl $0x0, %eax
jne 0x414f
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0x427f
cmpq $0xb, -0x20(%rbp)
jne 0x418d
movq -0x28(%rbp), %rsi
leaq 0x67e9(%rip), %rdi      # 0xa94a
movl $0xb, %edx
callq 0x2080
cmpl $0x0, %eax
jne 0x418d
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x427d
cmpq $0xc, -0x20(%rbp)
jne 0x41cb
movq -0x28(%rbp), %rsi
leaq 0x67b7(%rip), %rdi      # 0xa956
movl $0xc, %edx
callq 0x2080
cmpl $0x0, %eax
jne 0x41cb
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
jmp 0x427b
movq -0x38(%rbp), %rdi
callq 0x2040
movq 0xae1d(%rip), %rax      # 0xeff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
leaq 0x676f(%rip), %rsi      # 0xa963
movb $0x0, %al
callq 0x21a0
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq 0xadee(%rip), %rax      # 0xeff8
movq (%rax), %rcx
movl $0x1, %esi
callq 0x2270
movq 0xadda(%rip), %rax      # 0xeff8
movq (%rax), %rsi
leaq 0x675f(%rip), %rdi      # 0xa987
callq 0x2130
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
subq %rax, %rdx
movq 0xada9(%rip), %rax      # 0xeff8
movq (%rax), %rcx
movl $0x1, %esi
callq 0x2270
movq 0xad95(%rip), %rax      # 0xeff8
movq (%rax), %rsi
leaq 0x7b88(%rip), %rdi      # 0xbdf5
callq 0x2130
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4286
jmp 0x427d
jmp 0x427f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop