// File: /workspace/github_c_makefile_star2_O1/Oric4ever[P]lcc65/6502/build/../src/output.c
// Function: vprint
void vprint(fmt, ap) char *fmt; va_list ap; {
	char buf[40], *s;

	for (; *fmt; fmt++)
		if (*fmt == '%')
			switch (*++fmt) {
			case 'c':
				*bp++ = va_arg(ap, int);
				break;
			case 'd': {
				int n = va_arg(ap, int);
				unsigned m;
				s = buf + sizeof buf;
				*--s = 0;
				if (n == INT_MIN)
					m = (unsigned)INT_MAX + 1;
				else if (n < 0)
					m = -n;
				else
					m = n;
				do
					*--s = m%10 + '0';
				while (m /= 10);
				if (n < 0)
					*--s = '-';
				outs(s);
				break;
				}
			case 'k': {	/* print a token */
				int t = va_arg(ap, int);
				static char *tokens[] = {
#define xx(a,b,c,d,e,f,g) g,
#define yy xx
#include "token.h"
				};
				assert(tokens[t&0177]);
				outs(tokens[t&0177]);
				break;
				}
			case 'o': {
				unsigned n = va_arg(ap, unsigned);
				s = buf + sizeof buf;
				*--s = 0;
				do
					*--s = (n&7) + '0';
				while (n >>= 3);
				outs(s);
				break;
				}
			case 'x': {
				unsigned n = va_arg(ap, unsigned);
				s = buf + sizeof buf;
				*--s = 0;
				do
					*--s = "0123456789abcdef"[n&0xf];
				while (n >>= 4);
				outs(s);
				break;
				}
			case 's':
				s = va_arg(ap, char *);
				outs(s ? s : "");
				break;
			case 't': {	/* print a type */
				Type ty = va_arg(ap, Type);
				outtype(ty ? ty : voidtype);
				break;
				}
			case 'w': {	/* print a source coordinate */
				Coordinate *p = va_arg(ap, Coordinate *);
				if (p->file && *p->file)
					print("%s:", p->file);
				print("%d", p->y);
				break;
				}
			default:
				*bp++ = *fmt;
				break;
			}
		else if ((*bp++ = *fmt) == '\n' && bp > io[fd]->limit)
			outflush();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x27(%rsp), %r13
movl $0xcccccccd, %r12d      # imm = 0xCCCCCCCD
leaq 0xe660(%rip), %rbp      # 0x1ff8c
leaq 0xe7db(%rip), %r15      # 0x2010e
movzbl (%r14), %eax
cmpl $0x25, %eax
je 0x1198c
testl %eax, %eax
je 0x11c51
movq 0x16cc5(%rip), %rcx     # 0x28610
leaq 0x1(%rcx), %rdx
movq %rdx, 0x16cba(%rip)     # 0x28610
movb %al, (%rcx)
cmpb $0xa, %al
jne 0x11c49
movq 0x16ca9(%rip), %rax     # 0x28610
movl 0x16cab(%rip), %ecx     # 0x28618
leaq 0x15bbc(%rip), %rdx     # 0x27530
movq (%rdx,%rcx,8), %rcx
cmpq 0x18(%rcx), %rax
jbe 0x11c49
callq 0x117df
jmp 0x11c49
movb 0x1(%r14), %al
incq %r14
movzbl %al, %ecx
leal -0x6b(%rcx), %edx
cmpl $0xd, %edx
ja 0x119c5
movslq (%rbp,%rdx,4), %rcx
addq %rbp, %rcx
jmpq *%rcx
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x11aca
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x11ad6
cmpl $0x64, %ecx
je 0x11a85
cmpl $0x63, %ecx
jne 0x11c2b
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x11c1d
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x11c29
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x11aa2
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x11aae
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x11af4
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x11b00
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x11b29
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x11b35
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x11b71
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x11b7d
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x11b93
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x11b9f
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x11bc6
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x11bd2
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rdi
testq %rdi, %rdi
jne 0x11ac0
leaq 0x20523(%rip), %rax     # 0x31fe0
movq (%rax), %rdi
callq 0x19a81
jmp 0x11c49
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movl (%rax), %eax
andl $0x7f, %eax
leaq 0x15a6e(%rip), %rcx     # 0x27550
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
jne 0x11c44
jmp 0x11c60
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movl (%rax), %eax
movb $0x0, 0x27(%rsp)
movq %r13, %rdi
movl %eax, %ecx
movl %eax, %edx
andb $0x7, %dl
orb $0x30, %dl
movb %dl, -0x1(%rdi)
decq %rdi
shrl $0x3, %ecx
cmpl $0x7, %eax
movl %ecx, %eax
ja 0x11b0c
jmp 0x11c44
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %r13
movq (%r13), %rsi
testq %rsi, %rsi
je 0x11b54
cmpb $0x0, (%rsi)
je 0x11b54
leaq 0xe5d2(%rip), %rdi      # 0x2011f
xorl %eax, %eax
callq 0x1187e
movzwl 0xa(%r13), %esi
leaq 0xfc12(%rip), %rdi      # 0x21772
xorl %eax, %eax
callq 0x1187e
leaq 0x27(%rsp), %r13
jmp 0x11c49
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rdi
testq %rdi, %rdi
leaq 0xdfbb(%rip), %rax      # 0x1fb45
cmoveq %rax, %rdi
jmp 0x11c44
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movl (%rax), %eax
movb $0x0, 0x27(%rsp)
movq %r13, %rdi
movl %eax, %ecx
movl %eax, %edx
andl $0xf, %edx
movb (%rdx,%r15), %dl
movb %dl, -0x1(%rdi)
decq %rdi
shrl $0x4, %ecx
cmpl $0xf, %eax
movl %ecx, %eax
ja 0x11bab
jmp 0x11c44
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movl (%rax), %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movb $0x0, 0x27(%rsp)
movl $0x80000000, %edx       # imm = 0x80000000
cmovol %edx, %ecx
leaq 0x26(%rsp), %rdi
movl %ecx, %edx
imulq %r12, %rdx
shrq $0x23, %rdx
leal (%rdx,%rdx), %esi
leal (%rsi,%rsi,4), %esi
movl %ecx, %r8d
subl %esi, %r8d
orb $0x30, %r8b
movb %r8b, (%rdi)
decq %rdi
cmpl $0x9, %ecx
movl %edx, %ecx
ja 0x11bed
testl %eax, %eax
js 0x11c41
incq %rdi
jmp 0x11c44
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movb (%rax), %al
movq 0x169de(%rip), %rcx     # 0x28610
leaq 0x1(%rcx), %rdx
movq %rdx, 0x169d3(%rip)     # 0x28610
movb %al, (%rcx)
jmp 0x11c49
movb $0x2d, (%rdi)
callq 0x1183d
incq %r14
jmp 0x11933
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe48a(%rip), %rdi      # 0x200f1
leaq 0xe359(%rip), %rsi      # 0x1ffc7
leaq 0xe48b(%rip), %rcx      # 0x20100
movl $0x92, %edx
callq 0x30d0