// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/config.c
// Function: parse_line
static int
parse_line(char *str)
{
	int   i;
	bool  error;
	char  *var, *val, *p, **sv, **pp;
	
	for (var = str; *var != '\0' && isspace(*var); var++)
		;
	if (*var == '\0' || *var == '#')
		return (0);
	for (val = var + strcspn(var, " =\t"); *val != '=' && *val != '\0';
	    val++)
		*val = '\0';
	if (*val != '=') {
		warnx("Syntax error: Missing '=':"); return (-1);
	}
	*val++ = '\0'; val += strspn(val, " \t\n");
	if (*val == '\0' || isspace(*val)) {
		warnx("Syntax error: Missing value:"); return (-1);
	}
	for (i = 0; i < sizeof(vars) / sizeof(vars[0]); i++) {
		if (strcmp(var, vars[i].name) != 0)
			continue;
		switch (vars[i].type) {
		case VAR_STRINGS:
			for (pp = *vars[i].val.strings;
			    pp != NULL && *pp != NULL; pp++)
				free(*pp);
			for (p = val; (p = cutok(p, &error)) != NULL;
			    p = NULL) {
				sv = *vars[i].val.strings;
				if ((sv = add_string(&sv, p)) == NULL)
					err(EXIT_FAILURE, "add_string()");
				*vars[i].val.strings = sv;
			}
			if (error)
				return (-1);
			break;
		case VAR_STRING:
			if ((p = cutok(val, &error)) == NULL)
				return (-1);
			free(*vars[i].val.string);
			if ((*vars[i].val.string = strdup(p)) == NULL)
				err(EXIT_FAILURE, "strdup()");
			break;
		case VAR_BOOLEAN:
			if ((p = cutok(val, &error)) == NULL)
				return (-1);
			if (strcasecmp(p, "false") == 0 ||
			    strcasecmp(p, "no") == 0  ||
			    (strchr("0123456789", p[0]) != NULL &&
			     strtol(p, NULL, 10) == 0))
				*vars[i].val.boolean = false;
			else
				*vars[i].val.boolean = true;
			break;
		case VAR_INTEGER:
			if ((p = cutok(val, &error)) == NULL)
				return (-1);
			*vars[i].val.integer = strtol(p, NULL, 10);
			break;
		}
		return (0);
	}
	warnx("Unknown variable '%s':", var);
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
xorl %ebx, %ebx
movsbq (%r15), %r14
testq %r14, %r14
je 0x67b2
callq 0x22f0
movq %rax, %r12
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r14,2)
je 0x669b
incq %r15
jmp 0x6676
cmpb $0x23, %r14b
je 0x67b2
leaq 0x4e65(%rip), %rsi      # 0xb511
movq %r15, %rdi
callq 0x20a0
leaq (%r15,%rax), %r14
incq %r14
movzbl -0x1(%r14), %eax
testl %eax, %eax
je 0x6798
cmpl $0x3d, %eax
je 0x66d7
movb $0x0, -0x1(%r14)
incq %r14
jmp 0x66bb
movb $0x0, -0x1(%r14)
leaq 0x4e4d(%rip), %rsi      # 0xb530
movq %r14, %rdi
callq 0x2140
movsbq (%r14,%rax), %rcx
testq %rcx, %rcx
je 0x67a1
movq (%r12), %rdx
testb $0x20, 0x1(%rdx,%rcx,2)
jne 0x67a1
addq %rax, %r14
pushq $-0xc
popq %rcx
leaq 0x8bfb(%rip), %r13      # 0xf310
leaq 0x18(%rcx), %rbp
cmpq $0x84, %rbp
je 0x67c3
movq 0xc(%rcx,%r13), %rsi
movq %r15, %rdi
callq 0x2460
movq %rbp, %rcx
testl %eax, %eax
jne 0x6715
movl (%rbp,%r13), %eax
cmpq $0x3, %rax
ja 0x67b2
leaq 0x4ce4(%rip), %rcx      # 0xb430
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x6f10
testq %rax, %rax
je 0x67af
movq %rax, %r14
movq 0x4(%rbp,%r13), %rax
movq (%rax), %rdi
callq 0x23d0
movq %r14, %rdi
callq 0x2580
movq 0x4(%rbp,%r13), %rcx
movq %rax, (%rcx)
testq %rax, %rax
jne 0x67b2
leaq 0x3efc(%rip), %rsi      # 0xa68f
jmp 0x695a
leaq 0x4d76(%rip), %rdi      # 0xb515
jmp 0x67a8
leaq 0x4d8c(%rip), %rdi      # 0xb534
xorl %eax, %eax
callq 0x22e0
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4da8(%rip), %rdi      # 0xb572
movq %r15, %rsi
xorl %eax, %eax
callq 0x22e0
jmp 0x67af
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x6f10
testq %rax, %rax
je 0x67af
pushq $0xa
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2470
movq %rax, %r15
jmp 0x6869
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x6f10
testq %rax, %rax
je 0x67af
movq %rax, %r14
leaq 0x4d48(%rip), %rsi      # 0xb55e
movq %rax, %rdi
callq 0x2300
xorl %r15d, %r15d
testl %eax, %eax
je 0x6869
leaq 0x4d38(%rip), %rsi      # 0xb564
movq %r14, %rdi
callq 0x2300
testl %eax, %eax
je 0x6869
movsbl (%r14), %esi
leaq 0x4d24(%rip), %rdi      # 0xb567
pushq $0xb
popq %rdx
callq 0x2330
testq %rax, %rax
je 0x6865
xorl %r15d, %r15d
pushq $0xa
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2470
testq %rax, %rax
je 0x6869
pushq $0x1
popq %r15
movq 0x4(%rbp,%r13), %rax
movl %r15d, (%rax)
jmp 0x67b2
movq 0x4(%rbp,%r13), %rax
movq (%rax), %r15
testq %r15, %r15
je 0x6896
movq (%r15), %rdi
testq %rdi, %rdi
je 0x6896
callq 0x23d0
addq $0x8, %r15
jmp 0x687e
movabsq $0x100000000, %r12      # imm = 0x100000000
movq %r14, %rdi
leaq 0xc(%rsp), %rsi
callq 0x6f10
testq %rax, %rax
je 0x6936
movq %rax, 0x10(%rsp)
movq 0x4(%rbp,%r13), %rax
movq (%rax), %r14
pushq $0x2
popq %r15
testq %r14, %r14
je 0x68e3
movq %r14, %rax
movq %r12, %r15
addq %r12, %r15
cmpq $0x0, (%rax)
leaq 0x8(%rax), %rax
jne 0x68d2
sarq $0x20, %r15
leaq (,%r15,8), %rsi
movq %r14, %rdi
callq 0x2550
movq %rax, 0x935e(%rip)      # 0xfc58
testq %rax, %rax
je 0x6946
movq %rax, %r13
movq 0x10(%rsp), %rdi
callq 0x2580
movq %rax, -0x10(%r13,%r15,8)
testq %rax, %rax
je 0x694b
andq $0x0, -0x8(%r13,%r15,8)
leaq 0x89ed(%rip), %r14      # 0xf310
movq 0x4(%rbp,%r14), %rax
movq %r13, (%rax)
movq %r14, %r13
xorl %r14d, %r14d
jmp 0x68a0
cmpl $0x0, 0xc(%rsp)
jne 0x67af
jmp 0x67b2
movq %r14, %rdi
jmp 0x694e
movq %r13, %rdi
callq 0x23d0
leaq 0x4bf7(%rip), %rsi      # 0xb551
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x2250