// File: /workspace/github_c_makefile_star2_O0/tomka[P]cliaspora/config.c
// Function: write_var
static int
write_var(var_t *var, FILE *fp)
{
	char *p, **s;

	if (var == NULL)
		return (0);

	switch (var->type) {
	case VAR_STRING:
		if (*var->val.string == NULL)
			return (0);
		p = escape_str(*var->val.string);
		if (p == NULL)
			return (-1);
		(void)fprintf(fp, "%s = \"%s\"\n",
		    var->name, p);
		free(p);
		break;
	case VAR_STRINGS:
		(void)fprintf(fp, "%s = ", var->name);
		for (s = *var->val.strings;
		    s != NULL && *s != NULL; s++) {
			if (s != *var->val.strings)
				(void)fputc(' ', fp);
			p = escape_str(*s);
			if (p == NULL)
				return (-1);
			(void)fprintf(fp, "\"%s\"", p);
			free(p);
		}
		(void)fputc('\n', fp);
		break;
	case VAR_INTEGER:
		(void)fprintf(fp, "%s = %d\n", var->name, *var->val.integer);
		break;
	case VAR_BOOLEAN:
		(void)fprintf(fp, "%s = %s\n", var->name,
		    *var->val.boolean ? "true" : "false");
		break;
	}
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x9853
movl $0x0, -0x4(%rbp)
jmp 0x9a19
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movq %rax, -0x30(%rbp)
subq $0x3, %rax
ja 0x9a12
movq -0x30(%rbp), %rax
leaq 0x5c71(%rip), %rcx      # 0xf4e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpq $0x0, (%rax)
jne 0x9896
movl $0x0, -0x4(%rbp)
jmp 0x9a19
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
callq 0x9e50
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x98bd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9a19
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x20(%rbp), %rcx
leaq 0x5dae(%rip), %rsi      # 0xf681
movb $0x0, %al
callq 0x24a0
movq -0x20(%rbp), %rdi
callq 0x23d0
jmp 0x9a12
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x5d92(%rip), %rsi      # 0xf68c
movb $0x0, %al
callq 0x24a0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x28(%rbp)
movb %al, -0x31(%rbp)
je 0x992a
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x9933
jmp 0x99a5
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpq (%rcx), %rax
je 0x9952
movq -0x18(%rbp), %rsi
movl $0x20, %edi
callq 0x2410
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x9e50
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x9975
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9a19
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x5d0e(%rip), %rsi      # 0xf692
movb $0x0, %al
callq 0x24a0
movq -0x20(%rbp), %rdi
callq 0x23d0
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
jmp 0x9910
movq -0x18(%rbp), %rsi
movl $0xa, %edi
callq 0x2410
jmp 0x9a12
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %ecx
leaq 0x5cc6(%rip), %rsi      # 0xf697
movb $0x0, %al
callq 0x24a0
jmp 0x9a12
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %esi
leaq 0x5c0c(%rip), %rcx      # 0xf602
leaq 0x5cac(%rip), %rax      # 0xf6a9
cmpl $0x0, %esi
cmovneq %rax, %rcx
leaq 0x5c95(%rip), %rsi      # 0xf6a0
movb $0x0, %al
callq 0x24a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)