// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: printcoords16
void printcoords16(int posxe, int posye, short ange)
{
	char snotbuf[80];
	int i, maxsect = 0, maxwall = 0, maxspri = 0;

	setstatusbarviewport16();

	Bsprintf(snotbuf,"x=%d y=%d ang=%d",posxe,posye,ange);
	i = 0;
	while ((snotbuf[i] != 0) && (i < 30))
		i++;
	while (i < 30)
	{
		snotbuf[i] = 32;
		i++;
	}
	snotbuf[30] = 0;

	switch (mapversion) {
		case 5:
			maxsect = MAXSECTORSV5;
			maxwall = MAXWALLSV5;
			maxspri = MAXSPRITESV5;
			break;
		case 6:
			maxsect = MAXSECTORSV6;
			maxwall = MAXWALLSV6;
			maxspri = MAXSPRITESV6;
			break;
		case 7:
			maxsect = MAXSECTORSV7;
			maxwall = MAXWALLSV7;
			maxspri = MAXSPRITESV7;
			break;
		case 8:
			maxsect = MAXSECTORSV8;
			maxwall = MAXWALLSV8;
			maxspri = MAXSPRITESV8;
			break;
	}

	printext16(8,128, 11, 6, snotbuf,0);

	Bsprintf(snotbuf,"v%d %d/%d sect %d/%d wall %d/%d spri",
					mapversion,
					numsectors, maxsect,
					numwalls, maxwall,
					numsprites, maxspri);
	i = 0;
	while ((snotbuf[i] != 0) && (i < 46))
		i++;
	while (i < 46)
	{
		snotbuf[i] = 32;
		i++;
	}
	snotbuf[46] = 0;

	printext16(264,128, 14, 6, snotbuf,0);

	restoreviewport16();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edx, %r8d
movl %esi, %ecx
movl %edi, %edx
movl 0x112692(%rip), %eax    # 0x12cd68
movl %eax, 0x88934(%rip)     # 0xa3010
movl 0x11268a(%rip), %eax    # 0x12cd6c
movl %eax, 0x8892c(%rip)     # 0xa3014
movl $0x90, 0x112676(%rip)   # 0x12cd68
leaq 0x8893b(%rip), %rax     # 0xa3034
movl $0xffffff70, %esi       # imm = 0xFFFFFF70
addl (%rax), %esi
movl %esi, 0x112666(%rip)    # 0x12cd6c
leaq 0x5950b(%rip), %rsi     # 0x73c18
xorl %ebx, %ebx
movq %rsp, %rdi
xorl %eax, %eax
callq 0x6b00
leaq 0x1(%rbx), %rax
cmpq $0x1d, %rbx
ja 0x1a72c
cmpb $0x0, (%rsp,%rbx)
movq %rax, %rbx
jne 0x1a719
leaq -0x1(%rax), %rcx
cmpq $0x1d, %rcx
ja 0x1a751
leaq (%rsp,%rax), %rdi
decq %rdi
movl $0x1e, %edx
subl %eax, %edx
incq %rdx
movl $0x20, %esi
callq 0x62f0
movb $0x0, 0x1e(%rsp)
leaq 0x8903b(%rip), %rbp     # 0xa3798
movl (%rbp), %eax
addl $-0x5, %eax
xorl %ebx, %ebx
movl $0x0, %r15d
movl $0x0, %r13d
cmpl $0x3, %eax
ja 0x1a798
movl %eax, %eax
leaq 0x597c1(%rip), %rcx     # 0x73f40
movl (%rcx,%rax,4), %ebx
leaq 0x597c7(%rip), %rcx     # 0x73f50
movl (%rcx,%rax,4), %r15d
leaq 0x597cc(%rip), %rcx     # 0x73f60
movl (%rcx,%rax,4), %r13d
movq %rsp, %r14
xorl %r12d, %r12d
movl $0x8, %edi
movl $0x80, %esi
movl $0xb, %edx
movl $0x6, %ecx
movq %r14, %r8
xorl %r9d, %r9d
callq 0x19108
movl (%rbp), %edx
leaq 0x3b4799(%rip), %rax    # 0x3cef60
movswl (%rax), %ecx
leaq 0x3fb497(%rip), %rax    # 0x415c68
movswl (%rax), %r9d
movl 0x15e9f0(%rip), %r10d   # 0x1791cc
subq $0x8, %rsp
leaq 0x59442(%rip), %rsi     # 0x73c29
movq %r14, %rdi
movl %ebx, %r8d
xorl %eax, %eax
pushq %r13
pushq %r10
pushq %r15
callq 0x6b00
addq $0x20, %rsp
leaq 0x1(%r12), %rax
cmpq $0x2d, %r12
ja 0x1a813
cmpb $0x0, (%rsp,%r12)
movq %rax, %r12
jne 0x1a7fe
leaq -0x1(%rax), %rcx
cmpq $0x2d, %rcx
ja 0x1a838
leaq (%rsp,%rax), %rdi
decq %rdi
movl $0x2e, %edx
subl %eax, %edx
incq %rdx
movl $0x20, %esi
callq 0x62f0
movq %rsp, %r8
movb $0x0, 0x2e(%r8)
movl $0x108, %edi            # imm = 0x108
movl $0x80, %esi
movl $0xe, %edx
movl $0x6, %ecx
xorl %r9d, %r9d
callq 0x19108
movl 0x887b2(%rip), %eax     # 0xa3014
testl %eax, %eax
js 0x1a898
movl 0x887a4(%rip), %ecx     # 0xa3010
movl %ecx, 0x1124f6(%rip)    # 0x12cd68
movl %eax, 0x1124f4(%rip)    # 0x12cd6c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x8878d(%rip)     # 0xa3010
movl %eax, 0x8878b(%rip)     # 0xa3014
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x58b9f(%rip), %rdi     # 0x7343e
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6c31f