// File: /workspace/github_c_makefile_star2_O0/DeforaOS[P]libSystem/tests/config.c
// Function: test2
static int _test2(char const * progname, size_t size, ...)
{
	int ret = 0;
	va_list ap;
	char tmpname[] = P_tmpdir "/config-test2-XXXXXX";
	int fd;
	Config * config;
	String const * section;
	String const * variable;
	String const * value;
	struct stat st;

	/* config_save */
	printf("%s: Testing config_save()\n", progname);
	fflush(stdout);
	if((fd = mkstemp(tmpname)) < 0)
		return -error_set_print(progname, -errno, "%s: %s", "mktemp",
				strerror(errno));
	if((config = config_new()) == NULL)
	{
		unlink(tmpname);
		close(fd);
		return -error_print(progname);
	}
	va_start(ap, size);
	while(ret == 0 && (section = va_arg(ap, String const *)) != NULL)
	{
		variable = va_arg(ap, String const *);
		value = va_arg(ap, String const *);
		ret = config_set(config, section, variable, value);
	}
	va_end(ap);
	if(ret == 0)
		ret = config_save(config, tmpname);
	if(ret != 0)
		error_print(progname);
	config_delete(config);
	if(stat(tmpname, &st) != 0)
		ret = -error_set_print(progname, -errno, "%s: %s", tmpname,
				strerror(errno));
	else if(st.st_size < 0 || (size_t)st.st_size != size)
		ret = -error_set_print(progname, 2, "%s: %lu: Size mismatch"
				" (expected: %lu)", tmpname, st.st_size, size);
	if(unlink(tmpname) != 0)
		ret = -error_set_print(progname, -errno, "%s: %s", tmpname,
				strerror(errno));
	close(fd);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
testb %al, %al
je 0x1937
movaps %xmm0, -0x1a0(%rbp)
movaps %xmm1, -0x190(%rbp)
movaps %xmm2, -0x180(%rbp)
movaps %xmm3, -0x170(%rbp)
movaps %xmm4, -0x160(%rbp)
movaps %xmm5, -0x150(%rbp)
movaps %xmm6, -0x140(%rbp)
movaps %xmm7, -0x130(%rbp)
movq %r9, -0x1a8(%rbp)
movq %r8, -0x1b0(%rbp)
movq %rcx, -0x1b8(%rbp)
movq %rdx, -0x1c0(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq 0x817(%rip), %rax       # 0x2180
movq %rax, -0x60(%rbp)
movq 0x814(%rip), %rax       # 0x2188
movq %rax, -0x58(%rbp)
movq 0x811(%rip), %rax       # 0x2190
movq %rax, -0x50(%rbp)
movb 0x80f(%rip), %al        # 0x2198
movb %al, -0x48(%rbp)
movq -0x10(%rbp), %rsi
leaq 0x790(%rip), %rdi       # 0x2127
movb $0x0, %al
callq 0x1080
movq 0x263b(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
callq 0x10e0
leaq -0x60(%rbp), %rdi
callq 0x1100
movl %eax, -0x64(%rbp)
cmpl $0x0, %eax
jge 0x1a1a
movq -0x10(%rbp), %rax
movq %rax, -0x1e0(%rbp)
callq 0x1030
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x1d4(%rbp)
callq 0x1030
movl (%rax), %edi
callq 0x1130
movq -0x1e0(%rbp), %rdi
movl -0x1d4(%rbp), %esi
movq %rax, %r8
leaq 0x744(%rip), %rdx       # 0x2142
leaq 0x744(%rip), %rcx       # 0x2149
movb $0x0, %al
callq 0x1050
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x1d65
callq 0x1120
movq %rax, -0x70(%rbp)
cmpq $0x0, %rax
jne 0x1a51
leaq -0x60(%rbp), %rdi
callq 0x1040
movl -0x64(%rbp), %edi
callq 0x10a0
movq -0x10(%rbp), %rdi
callq 0x1110
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x1d65
leaq -0x40(%rbp), %rax
leaq -0x1d0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
xorl %eax, %eax
cmpl $0x0, -0x1c(%rbp)
movb %al, -0x1e1(%rbp)
jne 0x1af6
leaq -0x40(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x1e8(%rbp)
cmpl $0x28, %eax
ja 0x1abe
movq -0x1f0(%rbp), %rcx
movl -0x1e8(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1f8(%rbp)
jmp 0x1adb
movq -0x1f0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1f8(%rbp)
movq -0x1f8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, %rax
setne %al
movb %al, -0x1e1(%rbp)
movb -0x1e1(%rbp), %al
testb $0x1, %al
jne 0x1b05
jmp 0x1bf4
leaq -0x40(%rbp), %rax
movq %rax, -0x208(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x1fc(%rbp)
cmpl $0x28, %eax
ja 0x1b40
movq -0x208(%rbp), %rcx
movl -0x1fc(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x210(%rbp)
jmp 0x1b5d
movq -0x208(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x220(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x214(%rbp)
cmpl $0x28, %eax
ja 0x1ba6
movq -0x220(%rbp), %rcx
movl -0x214(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x228(%rbp)
jmp 0x1bc3
movq -0x220(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq -0x88(%rbp), %rcx
callq 0x1140
movl %eax, -0x1c(%rbp)
jmp 0x1a75
leaq -0x40(%rbp), %rax
cmpl $0x0, -0x1c(%rbp)
jne 0x1c0e
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x10f0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1c1d
movq -0x10(%rbp), %rdi
callq 0x1110
movq -0x70(%rbp), %rdi
callq 0x10b0
leaq -0x60(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x10d0
cmpl $0x0, %eax
je 0x1c9f
movq -0x10(%rbp), %rax
movq %rax, -0x240(%rbp)
callq 0x1030
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x234(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x230(%rbp)
callq 0x1030
movl (%rax), %edi
callq 0x1130
movq -0x240(%rbp), %rdi
movl -0x234(%rbp), %esi
movq -0x230(%rbp), %rcx
movq %rax, %r8
leaq 0x4b5(%rip), %rdx       # 0x2142
movb $0x0, %al
callq 0x1050
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1ce7
cmpq $0x0, -0xe8(%rbp)
jl 0x1cb6
movq -0xe8(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x1ce5
movq -0x10(%rbp), %rdi
leaq -0x60(%rbp), %rcx
movq -0xe8(%rbp), %r8
movq -0x18(%rbp), %r9
movl $0x2, %esi
leaq 0x47b(%rip), %rdx       # 0x2150
movb $0x0, %al
callq 0x1050
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1ce7
leaq -0x60(%rbp), %rdi
callq 0x1040
cmpl $0x0, %eax
je 0x1d57
movq -0x10(%rbp), %rax
movq %rax, -0x258(%rbp)
callq 0x1030
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x24c(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x248(%rbp)
callq 0x1030
movl (%rax), %edi
callq 0x1130
movq -0x258(%rbp), %rdi
movl -0x24c(%rbp), %esi
movq -0x248(%rbp), %rcx
movq %rax, %r8
leaq 0x3fb(%rip), %rdx       # 0x2142
movb $0x0, %al
callq 0x1050
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x64(%rbp), %edi
callq 0x10a0
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq