// File: /workspace/github_c_makefile_star2_O3/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 0xe830(%rip), %rbp      # 0x20010
leaq 0xe9ab(%rip), %r15      # 0x20192
movzbl (%r14), %eax
cmpl $0x25, %eax
je 0x11840
testl %eax, %eax
je 0x11b05
movq 0x17e11(%rip), %rcx     # 0x29610
leaq 0x1(%rcx), %rdx
movq %rdx, 0x17e06(%rip)     # 0x29610
movb %al, (%rcx)
cmpb $0xa, %al
jne 0x11afd
movq 0x17df5(%rip), %rax     # 0x29610
movl 0x17df7(%rip), %ecx     # 0x29618
leaq 0x16d08(%rip), %rdx     # 0x28530
movq (%rdx,%rcx,8), %rcx
cmpq 0x18(%rcx), %rax
jbe 0x11afd
callq 0x11693
jmp 0x11afd
movb 0x1(%r14), %al
incq %r14
movzbl %al, %ecx
leal -0x6b(%rcx), %edx
cmpl $0xd, %edx
ja 0x11879
movslq (%rbp,%rdx,4), %rcx
addq %rbp, %rcx
jmpq *%rcx
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x1197e
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x1198a
cmpl $0x64, %ecx
je 0x11939
cmpl $0x63, %ecx
jne 0x11adf
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x11ad1
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x11add
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x11956
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x11962
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x119a8
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x119b4
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x119dd
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x119e9
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x11a25
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x11a31
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x11a47
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x11a53
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x11a7a
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x11a86
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rdi
testq %rdi, %rdi
jne 0x11974
leaq 0x2166f(%rip), %rax     # 0x32fe0
movq (%rax), %rdi
callq 0x1986e
jmp 0x11afd
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movl (%rax), %eax
andl $0x7f, %eax
leaq 0x16bba(%rip), %rcx     # 0x28550
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
jne 0x11af8
jmp 0x11b14
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 0x119c0
jmp 0x11af8
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %r13
movq (%r13), %rsi
testq %rsi, %rsi
je 0x11a08
cmpb $0x0, (%rsi)
je 0x11a08
leaq 0xe7a2(%rip), %rdi      # 0x201a3
xorl %eax, %eax
callq 0x11732
movzwl 0xa(%r13), %esi
leaq 0xfdde(%rip), %rdi      # 0x217f2
xorl %eax, %eax
callq 0x11732
leaq 0x27(%rsp), %r13
jmp 0x11afd
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rdi
testq %rdi, %rdi
leaq 0xe157(%rip), %rax      # 0x1fb95
cmoveq %rax, %rdi
jmp 0x11af8
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 0x11a5f
jmp 0x11af8
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 0x11aa1
testl %eax, %eax
js 0x11af5
incq %rdi
jmp 0x11af8
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movb (%rax), %al
movq 0x17b2a(%rip), %rcx     # 0x29610
leaq 0x1(%rcx), %rdx
movq %rdx, 0x17b1f(%rip)     # 0x29610
movb %al, (%rcx)
jmp 0x11afd
movb $0x2d, (%rdi)
callq 0x116f1
incq %r14
jmp 0x117e7
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe65a(%rip), %rdi      # 0x20175
leaq 0xe529(%rip), %rsi      # 0x2004b
leaq 0xe65b(%rip), %rcx      # 0x20184
movl $0x92, %edx
callq 0x30d0