// File: /workspace/github_c_makefile_star2_O2/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
pushq $0xa
popq %r12
leaq 0xd8bb(%rip), %rbp      # 0x1e010
leaq 0xda36(%rip), %r15      # 0x1e192
movzbl (%r14), %eax
cmpl $0x25, %eax
je 0x107b5
testl %eax, %eax
je 0x10a69
movq 0x17e9c(%rip), %rcx     # 0x28610
leaq 0x1(%rcx), %rdx
movq %rdx, 0x17e91(%rip)     # 0x28610
movb %al, (%rcx)
cmpb $0xa, %al
jne 0x10a61
movq 0x17e80(%rip), %rax     # 0x28610
movl 0x17e82(%rip), %ecx     # 0x28618
leaq 0x16d93(%rip), %rdx     # 0x27530
movq (%rdx,%rcx,8), %rcx
cmpq 0x18(%rcx), %rax
jbe 0x10a61
callq 0x10613
jmp 0x10a61
movb 0x1(%r14), %al
incq %r14
movzbl %al, %ecx
leal -0x6b(%rcx), %edx
cmpl $0xd, %edx
ja 0x107ee
movslq (%rbp,%rdx,4), %rcx
addq %rbp, %rcx
jmpq *%rcx
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x108f3
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x108ff
cmpl $0x64, %ecx
je 0x108ae
cmpl $0x63, %ecx
jne 0x10a43
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x10a35
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x10a41
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x108cb
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x108d7
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x1091d
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x10929
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x10952
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x1095e
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x1099a
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x109a6
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x109bc
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x109c8
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x109ef
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x109fb
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rdi
testq %rdi, %rdi
jne 0x108e9
leaq 0x216fa(%rip), %rax     # 0x31fe0
movq (%rax), %rdi
callq 0x182be
jmp 0x10a61
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movl (%rax), %eax
andl $0x7f, %eax
leaq 0x16c45(%rip), %rcx     # 0x27550
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
jne 0x10a5c
jmp 0x10a78
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 0x10935
jmp 0x10a5c
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %r13
movq (%r13), %rsi
testq %rsi, %rsi
je 0x1097d
cmpb $0x0, (%rsi)
je 0x1097d
leaq 0xd82d(%rip), %rdi      # 0x1e1a3
xorl %eax, %eax
callq 0x106a9
movzwl 0xa(%r13), %esi
leaq 0xee69(%rip), %rdi      # 0x1f7f2
xorl %eax, %eax
callq 0x106a9
leaq 0x27(%rsp), %r13
jmp 0x10a61
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rdi
testq %rdi, %rdi
leaq 0xd1e2(%rip), %rax      # 0x1db95
cmoveq %rax, %rdi
jmp 0x10a5c
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 0x109d4
jmp 0x10a5c
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movl (%rax), %esi
movl %esi, %ecx
negl %ecx
cmovsl %esi, %ecx
movb $0x0, 0x27(%rsp)
movl $0x80000000, %eax       # imm = 0x80000000
cmovol %eax, %ecx
leaq 0x26(%rsp), %rdi
movl %ecx, %eax
xorl %edx, %edx
divl %r12d
orb $0x30, %dl
movb %dl, (%rdi)
decq %rdi
cmpl $0x9, %ecx
movl %eax, %ecx
ja 0x10a16
testl %esi, %esi
js 0x10a59
incq %rdi
jmp 0x10a5c
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movb (%rax), %al
movq 0x17bc6(%rip), %rcx     # 0x28610
leaq 0x1(%rcx), %rdx
movq %rdx, 0x17bbb(%rip)     # 0x28610
movb %al, (%rcx)
jmp 0x10a61
movb $0x2d, (%rdi)
callq 0x1066f
incq %r14
jmp 0x1075c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd6f6(%rip), %rdi      # 0x1e175
leaq 0xd5c5(%rip), %rsi      # 0x1e04b
leaq 0xd6f7(%rip), %rcx      # 0x1e184
movl $0x92, %edx
callq 0x30d0