// File: /workspace/github_c_makefile_star2_O0/krinkinmu[P]64bit/vsinkprintf.c
// Function: format_number
static void format_number(struct vsinkprintf_sink *sink, uintmax_t value,
			const struct format_spec *spec)
{
	const intmax_t svalue = value;

	char buffer[256];
	const char *sign = "";
	const char *prefix = "";
	const char *num;
	int len, padding;

	if ((spec->flags & FF_SIGNED) && svalue < 0) {
		len = untoa(-svalue, buffer, spec->base) + 1;
		sign = "-";
	} else {
		len = untoa(value, buffer, spec->base);
		if (spec->flags & FF_SIGN) {
			sign = "+";
			++len;
		}
	}
	num = buffer;

	if (spec->flags & FF_PREFIX) {
		if (spec->base == 8) {
			prefix = "0";
			++len;
		} else if (spec->base == 16) {
			prefix = "0x";
			len += 2;
		}
	}

	padding = 0;
	if (len < spec->width)
		padding = spec->width - len;

	vsinkprintf_repeat(sink, ' ', padding);
	vsinkprintf_puts_nonewline(sink, sign);
	vsinkprintf_puts_nonewline(sink, prefix);
	vsinkprintf_puts_nonewline(sink, num);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x1016b(%rip), %rax     # 0xffffffff80112e71
movq %rax, -0x128(%rbp)
leaq 0x1015d(%rip), %rax     # 0xffffffff80112e71
movq %rax, -0x130(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xffffffff80102d68
cmpq $0x0, -0x20(%rbp)
jge 0xffffffff80102d68
xorl %eax, %eax
movl %eax, %edi
subq -0x20(%rbp), %rdi
leaq -0x120(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edx
callq 0xffffffff80102eb0
addl $0x1, %eax
movl %eax, -0x13c(%rbp)
leaq 0xf500(%rip), %rax      # 0xffffffff8011225f
movq %rax, -0x128(%rbp)
jmp 0xffffffff80102db6
movq -0x10(%rbp), %rdi
leaq -0x120(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edx
callq 0xffffffff80102eb0
movl %eax, -0x13c(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
andq $0x4, %rax
cmpq $0x0, %rax
je 0xffffffff80102db4
leaq 0xf4c3(%rip), %rax      # 0xffffffff80112261
movq %rax, -0x128(%rbp)
movl -0x13c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x13c(%rbp)
jmp 0xffffffff80102db6
leaq -0x120(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
andq $0x8, %rax
cmpq $0x0, %rax
je 0xffffffff80102e2a
movq -0x18(%rbp), %rax
cmpl $0x8, 0x10(%rax)
jne 0xffffffff80102dff
leaq 0x10213(%rip), %rax     # 0xffffffff80112ffa
movq %rax, -0x130(%rbp)
movl -0x13c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x13c(%rbp)
jmp 0xffffffff80102e28
movq -0x18(%rbp), %rax
cmpl $0x10, 0x10(%rax)
jne 0xffffffff80102e26
leaq 0xf453(%rip), %rax      # 0xffffffff80112263
movq %rax, -0x130(%rbp)
movl -0x13c(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x13c(%rbp)
jmp 0xffffffff80102e28
jmp 0xffffffff80102e2a
movl $0x0, -0x140(%rbp)
movl -0x13c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jge 0xffffffff80102e56
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
subl -0x13c(%rbp), %eax
movl %eax, -0x140(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x140(%rbp), %rdx
movl $0x20, %esi
callq 0xffffffff80102be0
movq -0x8(%rbp), %rdi
movq -0x128(%rbp), %rsi
callq 0xffffffff80102ca0
movq -0x8(%rbp), %rdi
movq -0x130(%rbp), %rsi
callq 0xffffffff80102ca0
movq -0x8(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq 0xffffffff80102ca0
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)