// File: /workspace/github_c_makefile_star2_O0/blasphemy[P]mmc-utils/lsmmc.c
// Function: parse_bin
void parse_bin(char *hexstr, char *fmt, ...)
{
	va_list args;
	char *origstr;
	char *binstr;
	unsigned long width = 0;

	binstr = to_binstr(hexstr);
	origstr = binstr;

	va_start(args, fmt);

	while (binstr && fmt && *fmt != '\0') {
		if (isdigit(*fmt)) {
			char *rest;

			errno = 0;
			width = strtoul(fmt, &rest, 10);
			if (width == ULONG_MAX && errno != 0)
				fprintf(stderr, "strtoul()");
			fmt = rest;
		} else if (*fmt == 'u') {
			unsigned int *u = va_arg(args, unsigned int *);

			if (u)
				bin_to_unsigned(u, binstr, width);
			binstr += width;
			width = 0;
			fmt++;
		} else if (*fmt == 'r') {
			binstr += width;
			width = 0;
			fmt++;
		} else if (*fmt == 'a') {
			char *c = va_arg(args, char *);

			if (c)
				bin_to_ascii(c, binstr, width);
			binstr += width;
			width = 0;
			fmt++;
		} else {
			fmt++;
		}
	}

	va_end(args);
	free(origstr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
testb %al, %al
je 0xabc1
movaps %xmm0, -0xe0(%rbp)
movaps %xmm1, -0xd0(%rbp)
movaps %xmm2, -0xc0(%rbp)
movaps %xmm3, -0xb0(%rbp)
movaps %xmm4, -0xa0(%rbp)
movaps %xmm5, -0x90(%rbp)
movaps %xmm6, -0x80(%rbp)
movaps %xmm7, -0x70(%rbp)
movq %r9, -0xe8(%rbp)
movq %r8, -0xf0(%rbp)
movq %rcx, -0xf8(%rbp)
movq %rdx, -0x100(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa810
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
xorl %eax, %eax
cmpq $0x0, -0x40(%rbp)
movb %al, -0x111(%rbp)
je 0xac57
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x111(%rbp)
je 0xac57
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x111(%rbp)
movb -0x111(%rbp), %al
testb $0x1, %al
jne 0xac66
jmp 0xae8c
callq 0x3270
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0xacdd
callq 0x3050
movl $0x0, (%rax)
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movl $0xa, %edx
callq 0x3220
movq %rax, -0x48(%rbp)
cmpq $-0x1, -0x48(%rbp)
jne 0xacd0
callq 0x3050
cmpl $0x0, (%rax)
je 0xacd0
movq 0x10331(%rip), %rax     # 0x1aff0
movq (%rax), %rdi
leaq 0xc4e3(%rip), %rsi      # 0x171ac
movb $0x0, %al
callq 0x3180
movq -0x50(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xae87
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x75, %eax
jne 0xad92
leaq -0x30(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x118(%rbp)
cmpl $0x28, %eax
ja 0xad28
movq -0x120(%rbp), %rcx
movl -0x118(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x128(%rbp)
jmp 0xad45
movq -0x120(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0xad6d
movq -0x58(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rax
movl %eax, %edx
callq 0xa9e0
movq -0x48(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xae85
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x72, %eax
jne 0xadc3
movq -0x48(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xae83
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x61, %eax
jne 0xae75
leaq -0x30(%rbp), %rax
movq %rax, -0x138(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x12c(%rbp)
cmpl $0x28, %eax
ja 0xae0e
movq -0x138(%rbp), %rcx
movl -0x12c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x140(%rbp)
jmp 0xae2b
movq -0x138(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0xae53
movq -0x60(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rax
movl %eax, %edx
callq 0xaaa0
movq -0x48(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xae81
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xae83
jmp 0xae85
jmp 0xae87
jmp 0xac26
movq -0x38(%rbp), %rdi
callq 0x3030
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nop