// File: /workspace/github_c_makefile_star2_O1/rakitzis[P]rc/print.c
// Function: intconv
static void intconv(Format *format, unsigned int radix, int upper, const char *altform) {
	static const char * const table[] = {
		"0123456789abcdefghijklmnopqrstuvwxyz",
		"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",
	};
	char padchar;
	size_t len, pre, zeroes, padding, width;
	long n, flags;
	unsigned long u;
	char number[64], prefix[20];

	if (radix > 36)
		return;

	flags = format->flags;

#if HAVE_QUAD_T
	if (flags & FMT_quad)
		n = va_arg(format->args, quad_t);
	else
#endif

	if (flags & FMT_long)
		n = va_arg(format->args, long);
	else
		n = va_arg(format->args, int);

	pre = 0;
	if ((flags & FMT_unsigned) || n >= 0)
		u = n;
	else {
		prefix[pre++] = '-';
		u = -n;
	}

	if (flags & FMT_altform)
		while (*altform != '\0')
			prefix[pre++] = *altform++;

	len = rc_utoa(u, number, radix, table[upper]) - number;
	if ((flags & FMT_f2set) && (size_t) format->f2 > len)
		zeroes = format->f2 - len;
	else
		zeroes = 0;

	width = pre + zeroes + len;
	if ((flags & FMT_f1set) && (size_t) format->f1 > width) {
		padding = format->f1 - width;
	} else
		padding = 0;

	padchar = ' ';
	if (padding > 0 && flags & FMT_zeropad) {
		padchar = '0';
		if ((flags & FMT_leftside) == 0) {
			zeroes += padding;
			padding = 0;
		}
	}


	if ((flags & FMT_leftside) == 0)
		pad(format, padding, padchar);
	fmtappend(format, prefix, pre);
	pad(format, zeroes, '0');
	fmtappend(format, number, len);
	if (flags & FMT_leftside)
		pad(format, padding, padchar);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %rax
movl %esi, %edx
movq %rdi, %rbx
movq 0x18(%rdi), %r8
movl (%rdi), %ecx
testb $0x2, %r8b
jne 0xb61a
cmpl $0x28, %ecx
ja 0xb62d
movq %rcx, %rsi
addq 0x10(%rbx), %rsi
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0xb639
cmpl $0x28, %ecx
ja 0xb63e
movq 0x10(%rbx), %rsi
addq %rcx, %rsi
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0xb64a
movq 0x8(%rbx), %rsi
leaq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rbx)
movslq (%rsi), %rdi
jmp 0xb64d
movq 0x8(%rbx), %rsi
leaq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rbx)
movq (%rsi), %rdi
xorl %r14d, %r14d
testb $0x8, %r8b
jne 0xb669
testq %rdi, %rdi
jns 0xb669
movb $0x2d, 0x10(%rsp)
negq %rdi
movl $0x1, %r14d
testb $0x40, %r8b
je 0xb68e
movb (%rax), %cl
testb %cl, %cl
je 0xb68e
movq %r8, %r15
incq %rax
movb %cl, 0x10(%rsp,%r14)
incq %r14
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0xb67b
jmp 0xb691
movq %r8, %r15
leaq 0x30(%rsp), %r12
movq %r12, %rsi
callq 0xb7e3
subq %r12, %rax
movq %r15, %rdx
btl $0x8, %edx
jb 0xb6ae
xorl %ebp, %ebp
jmp 0xb6bb
movq 0x28(%rbx), %rcx
xorl %ebp, %ebp
subq %rax, %rcx
cmovaeq %rcx, %rbp
testb %dl, %dl
movq %rax, (%rsp)
js 0xb6c8
xorl %r13d, %r13d
jmp 0xb6dc
addq %r14, %rax
addq %rbp, %rax
movq 0x20(%rbx), %rcx
xorl %r13d, %r13d
subq %rax, %rcx
cmovaeq %rcx, %r13
movb $0x20, %r15b
testq %r13, %r13
je 0xb708
testb $0x10, %dl
je 0xb70b
movq %rdx, %rax
shlq $0x3a, %rax
sarq $0x3f, %rax
xorl %ecx, %ecx
testb $0x20, %dl
cmoveq %r13, %rcx
addq %rcx, %rbp
andq %rax, %r13
movb $0x30, %r15b
jmp 0xb70b
xorl %r13d, %r13d
movq %rdx, 0x8(%rsp)
testb $0x20, %dl
jne 0xb749
testq %r13, %r13
je 0xb749
movq %r13, %r12
movq 0x30(%rbx), %rax
cmpq 0x40(%rbx), %rax
jb 0xb732
movl $0x1, %esi
movq %rbx, %rdi
callq *0x50(%rbx)
decq %r12
movq 0x30(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rbx)
movb %r15b, (%rax)
testq %r12, %r12
jne 0xb71d
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0xae5e
testq %rbp, %rbp
movq 0x8(%rsp), %r14
je 0xb78f
movq 0x30(%rbx), %rax
cmpq 0x40(%rbx), %rax
jb 0xb778
movl $0x1, %esi
movq %rbx, %rdi
callq *0x50(%rbx)
decq %rbp
movq 0x30(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rbx)
movb $0x30, (%rax)
testq %rbp, %rbp
jne 0xb763
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
movq (%rsp), %rdx
callq 0xae5e
testb $0x20, %r14b
je 0xb7d4
testq %r13, %r13
je 0xb7d4
movq 0x30(%rbx), %rax
cmpq 0x40(%rbx), %rax
jb 0xb7c0
movl $0x1, %esi
movq %rbx, %rdi
callq *0x50(%rbx)
decq %r13
movq 0x30(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rbx)
movb %r15b, (%rax)
jmp 0xb7a6
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq