// File: /workspace/github_c_makefile_star2_O2/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 $0x68, %rsp
movq %rdx, %rax
movl %esi, %edx
movq %rdi, %rbx
movq 0x18(%rdi), %rbp
movl (%rdi), %ecx
testb $0x2, %bpl
jne 0xae17
cmpl $0x28, %ecx
ja 0xae2a
movq %rcx, %rsi
addq 0x10(%rbx), %rsi
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0xae36
cmpl $0x28, %ecx
ja 0xae3b
movq 0x10(%rbx), %rsi
addq %rcx, %rsi
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0xae47
movq 0x8(%rbx), %rsi
leaq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rbx)
movslq (%rsi), %rdi
jmp 0xae4a
movq 0x8(%rbx), %rsi
leaq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rbx)
movq (%rsi), %rdi
xorl %r14d, %r14d
testb $0x8, %bpl
jne 0xae63
testq %rdi, %rdi
jns 0xae63
movb $0x2d, (%rsp)
negq %rdi
pushq $0x1
popq %r14
testb $0x40, %bpl
jne 0xae87
leaq 0x20(%rsp), %r12
movq %r12, %rsi
callq 0xaf71
movq %rax, %r15
subq %r12, %r15
btl $0x8, %ebp
jb 0xae99
xorl %r12d, %r12d
jmp 0xaea7
movb (%rax), %cl
testb %cl, %cl
je 0xae69
incq %rax
movb %cl, (%rsp,%r14)
incq %r14
jmp 0xae87
movq 0x28(%rbx), %rax
xorl %r12d, %r12d
subq %r15, %rax
cmovaeq %rax, %r12
pushq $0x20
popq %rdx
testb %bpl, %bpl
jns 0xaee5
leaq (%r15,%r14), %rax
addq %r12, %rax
movq 0x20(%rbx), %r13
subq %rax, %r13
jbe 0xaee5
testb $0x10, %bpl
je 0xaee8
movq %rbp, %rax
shlq $0x3a, %rax
sarq $0x3f, %rax
xorl %ecx, %ecx
testb $0x20, %bpl
cmoveq %r13, %rcx
addq %rcx, %r12
andq %rax, %r13
pushq $0x30
popq %rdx
jmp 0xaee8
xorl %r13d, %r13d
testb $0x20, %bpl
jne 0xaf27
movq %rbx, %rdi
movq %r13, %rsi
callq 0xad98
movq %rsp, %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0xa6fe
pushq $0x30
popq %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xad98
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0xa6fe
jmp 0xaf62
movq %rsp, %rsi
movq %rbx, %rdi
movl %edx, %ebp
movq %r14, %rdx
callq 0xa6fe
pushq $0x30
popq %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xad98
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0xa6fe
movq %rbx, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0xad98
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq