// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]libcperciva/tests/humansize/main.c
// Function: main
int
main(int argc, char * argv[])
{
	size_t i;
	uint64_t size;
	char * s;
	int failures = 0;

	WARNP_INIT;
	(void)argc; /* UNUSED */

	for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) {
		/* Notify about what we're trying to do. */
		if (!tests[i].bad)
			printf("Parsing \"%s\" as a number of bytes:",
			    tests[i].s);
		else
			printf("Should fail to parse \"%s\" as a number"
			    " of bytes:", tests[i].s);

		/* Try to parse the test string. */
		if (humansize_parse(tests[i].s, &size)) {
			if (!tests[i].bad) {
				printf(" FAILED!\n");
				failures++;
			} else {
				printf(" PASSED!\n");
			}
		} else {
			if (tests[i].bad || tests[i].val != size) {
				printf(" FAILED!\n");
				failures++;
			} else {
				printf(" PASSED!\n");
			}
		}
	}

	for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) {
		/* Don't try to do anything with the "bad values". */
		if (tests[i].bad)
			continue;

		/* Notify about what we're trying to do. */
		printf("Generating a string for %" PRIu64 ":", tests[i].val);

		/* Generate (and check) a string. */
		s = humansize(tests[i].val);
		if (strcmp(tests[i].canonical, s) == 0)
			printf(" PASSED!\n");
		else {
			printf(" FAILED!\n");
			failures++;
		}
		free(s);
	}

	if (failures)
		return (1);
	else
		return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1253
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x1840
jmp 0x1255
movq $0x0, -0x18(%rbp)
cmpq $0xb, -0x18(%rbp)
jae 0x139c
movq -0x18(%rbp), %rcx
leaq 0x2e2d(%rip), %rax      # 0x40a0
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jne 0x12a5
movq -0x18(%rbp), %rcx
leaq 0x2e15(%rip), %rax      # 0x40a0
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rsi
leaq 0xd68(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1080
jmp 0x12c8
movq -0x18(%rbp), %rcx
leaq 0x2df0(%rip), %rax      # 0x40a0
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rsi
leaq 0xd66(%rip), %rdi       # 0x2027
movb $0x0, %al
callq 0x1080
movq -0x18(%rbp), %rcx
leaq 0x2dcd(%rip), %rax      # 0x40a0
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x15f0
cmpl $0x0, %eax
je 0x132c
movq -0x18(%rbp), %rcx
leaq 0x2daa(%rip), %rax      # 0x40a0
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jne 0x131c
leaq 0xd4d(%rip), %rdi       # 0x2057
movb $0x0, %al
callq 0x1080
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x132a
leaq 0xd3e(%rip), %rdi       # 0x2061
movb $0x0, %al
callq 0x1080
jmp 0x1389
movq -0x18(%rbp), %rcx
leaq 0x2d69(%rip), %rax      # 0x40a0
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jne 0x1360
movq -0x18(%rbp), %rcx
leaq 0x2d51(%rip), %rax      # 0x40a0
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
cmpq -0x20(%rbp), %rax
je 0x1379
leaq 0xcf0(%rip), %rdi       # 0x2057
movb $0x0, %al
callq 0x1080
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1387
leaq 0xce1(%rip), %rdi       # 0x2061
movb $0x0, %al
callq 0x1080
jmp 0x1389
jmp 0x138b
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x125d
movq $0x0, -0x18(%rbp)
cmpq $0xb, -0x18(%rbp)
jae 0x1474
movq -0x18(%rbp), %rcx
leaq 0x2ce6(%rip), %rax      # 0x40a0
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
je 0x13cc
jmp 0x1463
movq -0x18(%rbp), %rcx
leaq 0x2cc9(%rip), %rax      # 0x40a0
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rsi
leaq 0xc82(%rip), %rdi       # 0x206b
movb $0x0, %al
callq 0x1080
movq -0x18(%rbp), %rcx
leaq 0x2ca5(%rip), %rax      # 0x40a0
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
callq 0x14a0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rcx
leaq 0x2c86(%rip), %rax      # 0x40a0
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x10a0
cmpl $0x0, %eax
jne 0x1443
leaq 0xc27(%rip), %rdi       # 0x2061
movb $0x0, %al
callq 0x1080
jmp 0x145a
leaq 0xc0d(%rip), %rdi       # 0x2057
movb $0x0, %al
callq 0x1080
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1030
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x13a4
cmpl $0x0, -0x2c(%rbp)
je 0x1483
movl $0x1, -0x4(%rbp)
jmp 0x148a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)