// File: /workspace/github_c_makefile_star2_O3/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), %r13
movl (%rdi), %ecx
testb $0x2, %r13b
jne 0xb530
cmpl $0x28, %ecx
ja 0xb543
movq %rcx, %rsi
addq 0x10(%rbx), %rsi
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0xb54f
cmpl $0x28, %ecx
ja 0xb554
movq 0x10(%rbx), %rsi
addq %rcx, %rsi
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0xb560
movq 0x8(%rbx), %rsi
leaq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rbx)
movslq (%rsi), %rdi
jmp 0xb563
movq 0x8(%rbx), %rsi
leaq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rbx)
movq (%rsi), %rdi
xorl %r14d, %r14d
testb $0x8, %r13b
jne 0xb57f
testq %rdi, %rdi
jns 0xb57f
movb $0x2d, 0x10(%rsp)
negq %rdi
movl $0x1, %r14d
testb $0x40, %r13b
je 0xb59f
movb (%rax), %cl
testb %cl, %cl
je 0xb59f
incq %rax
movb %cl, 0x10(%rsp,%r14)
incq %r14
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0xb58e
leaq 0x30(%rsp), %r12
movq %r12, %rsi
callq 0xb6fa
subq %r12, %rax
btl $0x8, %r13d
jb 0xb5ba
xorl %ebp, %ebp
jmp 0xb5c7
movq 0x28(%rbx), %rcx
xorl %ebp, %ebp
subq %rax, %rcx
cmovaeq %rcx, %rbp
testb %r13b, %r13b
movq %rax, 0x8(%rsp)
jns 0xb656
leaq (%rax,%r14), %rcx
addq %rbp, %rcx
movq 0x20(%rbx), %r12
subq %rcx, %r12
jbe 0xb656
movb $0x20, %r15b
testb $0x10, %r13b
je 0xb60c
movq %r13, %rax
shlq $0x3a, %rax
sarq $0x3f, %rax
xorl %ecx, %ecx
testb $0x20, %r13b
cmoveq %r12, %rcx
addq %rcx, %rbp
andq %rax, %r12
movb $0x30, %r15b
testb $0x20, %r13b
sete %r13b
jne 0xb664
testq %r12, %r12
je 0xb664
movb %r13b, 0x7(%rsp)
movq %r12, %r13
movq 0x30(%rbx), %rax
cmpq 0x40(%rbx), %rax
jb 0xb63c
movl $0x1, %esi
movq %rbx, %rdi
callq *0x50(%rbx)
movq 0x30(%rbx), %rax
decq %r13
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rbx)
movb %r15b, (%rax)
testq %r13, %r13
jne 0xb623
movb 0x7(%rsp), %r13b
jmp 0xb664
testb $0x20, %r13b
sete %r13b
movb $0x20, %r15b
xorl %r12d, %r12d
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0xad93
testq %rbp, %rbp
je 0xb6a2
movq 0x30(%rbx), %rax
cmpq 0x40(%rbx), %rax
jb 0xb692
movl $0x1, %esi
movq %rbx, %rdi
callq *0x50(%rbx)
movq 0x30(%rbx), %rax
decq %rbp
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rbx)
movb $0x30, (%rax)
jmp 0xb674
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
movq 0x8(%rsp), %rdx
callq 0xad93
testq %r12, %r12
sete %al
orb %al, %r13b
jne 0xb6eb
movq 0x30(%rbx), %rax
cmpq 0x40(%rbx), %rax
jb 0xb6d8
movl $0x1, %esi
movq %rbx, %rdi
callq *0x50(%rbx)
movq 0x30(%rbx), %rax
decq %r12
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rbx)
movb %r15b, (%rax)
testq %r12, %r12
jne 0xb6bf
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq