// File: /workspace/github_c_makefile_star2_O3/hansvanstaveren[P]BigDeal/output.c
// Function: output_hand
void
output_hand(int boardno, dl_num *dnp)
/*
 * Convert goedel number to various internal forms as necessary
 * Output all desired formats
 */
{
	dl_int	dinternal;
	dl_byh	dbyhand;
	dl_byc	dbycard;
	of_p	ofp;
	hr_t	handrep;

	/*
	 * First create all necessary internal forms
	 * Bits in formatset have been inited in output_createfiles
	 */
	if (formatset&bit(BF_INTERNAL))
		code_to_hand(dnp, &dinternal);
	if (formatset&bit(BF_BYHAND))
		cnv_int_byh(&dinternal, &dbyhand);
	if (formatset&bit(BF_BYCARD))
		cnv_byh_byc(&dbyhand, &dbycard);

	/*
	 * Now call output routines
	 */
	for(ofp = output_formats; ofp->of_name; ofp++) {
		if (ofp->of_file == NULL)
			continue;
		handrep.hr_baseform = ofp->of_baseform;
		switch (ofp->of_baseform) {
		case BF_GOEDEL:
			handrep.hr_value.hv_dnp = dnp;
			break;
		case BF_INTERNAL:
			handrep.hr_value.hv_dip = &dinternal;
			break;
		case BF_BYHAND:
			handrep.hr_value.hv_dbhp = &dbyhand;
			break;
		case BF_BYCARD:
			handrep.hr_value.hv_dbcp = &dbycard;
			break;
		}
		(*ofp->of_printit)(ofp->of_file, boardno, &handrep);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rsi, %rbx
movl %edi, %ebp
movl 0x725a(%rip), %eax      # 0xbc88
testb $0x2, %al
je 0x4a45
leaq 0x4c(%rsp), %rsi
movq %rbx, %rdi
callq 0x39bc
movl 0x7243(%rip), %eax      # 0xbc88
testb $0x4, %al
je 0x4b22
movaps 0x198c(%rip), %xmm0     # 0x63e0
movaps 0x1995(%rip), %xmm1     # 0x63f0
xorl %ecx, %ecx
pcmpeqd %xmm2, %xmm2
movdqa 0x1997(%rip), %xmm3     # 0x6400
movaps %xmm1, %xmm4
shufps $0x88, %xmm0, %xmm4     # xmm4 = xmm4[0,2],xmm0[0,2]
psubd %xmm2, %xmm4
movdqa %xmm4, 0x80(%rsp,%rcx,4)
addq $0x4, %rcx
paddq %xmm3, %xmm1
paddq %xmm3, %xmm0
cmpq $0x34, %rcx
jne 0x4a69
movl $0x0, 0x150(%rsp)
xorl %ecx, %ecx
movl 0x80(%rsp), %esi
leaq (%rcx,%rcx,2), %rdx
leaq (%rcx,%rdx,4), %rdi
leaq (%rsp,%rdi), %rdx
addq $0x4c, %rdx
addq %rsp, %rdi
addq $0x18, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
testq %r8, %r8
je 0x4ad5
movzbl (%r8,%rdx), %r10d
movzbl -0x1(%r8,%rdx), %r11d
subl %r11d, %r10d
jmp 0x4ad9
movzbl (%rdx), %r10d
testl %r10d, %r10d
jle 0x4af3
movl %esi, %r9d
movslq %esi, %r11
movl 0x80(%rsp,%r11,4), %esi
decl %r10d
jne 0x4ade
jmp 0x4af6
movslq %r9d, %r11
movb %sil, (%r8,%rdi)
movslq %esi, %rsi
movl 0x80(%rsp,%rsi,4), %esi
movl %esi, 0x80(%rsp,%r11,4)
incq %r8
cmpq $0xd, %r8
jne 0x4ac0
incq %rcx
cmpq $0x4, %rcx
jne 0x4a9c
testb $0x8, %al
je 0x4b55
leaq 0x18(%rsp), %rax
xorl %ecx, %ecx
leaq 0x80(%rsp), %rdx
xorl %esi, %esi
movzbl (%rax,%rsi), %edi
movb %cl, -0x1(%rdi,%rdx)
incq %rsi
cmpq $0xd, %rsi
jne 0x4b37
incq %rcx
addq $0xd, %rax
cmpq $0x4, %rcx
jne 0x4b35
cmpq $0x0, 0x4753(%rip)      # 0x92b0
je 0x4bc6
leaq 0x4792(%rip), %r15      # 0x92f8
leaq 0x8(%rsp), %r14
leaq 0x18ae(%rip), %r12      # 0x6420
leaq 0x80(%rsp), %r13
movq -0x38(%r15), %rdi
testq %rdi, %rdi
je 0x4bbc
movl -0x28(%r15), %eax
movl %eax, 0x8(%rsp)
cmpq $0x3, %rax
ja 0x4bb3
movslq (%r12,%rax,4), %rcx
addq %r12, %rcx
movq %rbx, %rax
jmpq *%rcx
leaq 0x4c(%rsp), %rax
jmp 0x4bae
leaq 0x18(%rsp), %rax
jmp 0x4bae
movq %r13, %rax
movq %rax, 0x10(%rsp)
movl %ebp, %esi
movq %r14, %rdx
callq *-0x10(%r15)
cmpq $0x0, (%r15)
leaq 0x48(%r15), %r15
jne 0x4b7a
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq