// File: /workspace/github_c_makefile_star2_O0/hansvanstaveren[P]BigDeal/output.c
// Function: output_createfiles
void
output_createfiles(char *fileprefix, progparams_p ppp)
/*
 * Create a file for every wanted output format
 * Set the formatset variable
 */
{
	char filename[100];
	of_p ofp;
	FILE *f;

	prparp = ppp;
	/* For all formats: */
	for (ofp=output_formats; ofp->of_name; ofp++) {
		/* If not in use forget it */
		if (!(ofp->of_flags&OFF_USEIT))
			continue;

		if (ofp->of_high_board &&
		    ppp->pp_highboard > ofp->of_high_board) {
			fprintf(stderr, "Format %s supports %d as high board, skipping\n", ofp->of_name, ofp->of_high_board);
			continue;
		}
		/* Make note of internal formats we have to make */
		formatset |= formatclosure[ofp->of_baseform];

		/* If no suffix use Standard Output */
		if (ofp->of_suffix) {
			if (strlen(fileprefix)+strlen(ofp->of_suffix)+1 >
					sizeof(filename)) {
				fprintf(stderr, "File name %s%s too long(cannot happen)\n", fileprefix, ofp->of_suffix);
				exit(-1);
			}
			strcpy(filename, fileprefix);
			strcat(filename, ofp->of_suffix);
			f = fopen(filename, ofp->of_flags&OFF_BINARY ? "wb" : "w");
			if (f == NULL) {
				fprintf(stderr, "Cannot create %s\n", filename);
				exit(-1);
			}
			ofp->of_file = f;
		} else {
			ofp->of_file = stdout;
		}
		/*
		 * If there is an init routine call it now
		 */
		if (ofp->of_init)
			(*ofp->of_init)(ofp->of_file);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, 0x7ec2(%rip)      # 0xed50
leaq 0x540b(%rip), %rax      # 0xc2a0
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
cmpq $0x0, (%rax)
je 0x709b
movq -0x88(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x6ec4
jmp 0x7084
movq -0x88(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0x6f15
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x88(%rbp), %rcx
cmpl 0x24(%rcx), %eax
jle 0x6f15
movq 0x510d(%rip), %rax      # 0xbff8
movq (%rax), %rdi
movq -0x88(%rbp), %rax
movq (%rax), %rdx
movq -0x88(%rbp), %rax
movl 0x24(%rax), %ecx
leaq 0x25e2(%rip), %rsi      # 0x94eb
movb $0x0, %al
callq 0x2150
jmp 0x7084
movq -0x88(%rbp), %rax
movslq 0x20(%rax), %rcx
leaq 0x5769(%rip), %rax      # 0xc690
movl (%rax,%rcx,4), %eax
orl 0x7e28(%rip), %eax      # 0xed58
movl %eax, 0x7e22(%rip)      # 0xed58
movq -0x88(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x7047
movq -0x8(%rbp), %rdi
callq 0x2070
movq %rax, -0x98(%rbp)
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2070
movq %rax, %rcx
movq -0x98(%rbp), %rax
addq %rcx, %rax
addq $0x1, %rax
cmpq $0x64, %rax
jbe 0x6fb0
movq 0x5072(%rip), %rax      # 0xbff8
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rcx
leaq 0x257b(%rip), %rsi      # 0x951a
movb $0x0, %al
callq 0x2150
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21c0
leaq -0x80(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x2040
leaq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x21b0
leaq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rax
movl 0x8(%rax), %ecx
andl $0x2, %ecx
leaq 0x26e5(%rip), %rsi      # 0x96ce
leaq 0x2552(%rip), %rax      # 0x9542
cmpl $0x0, %ecx
cmovneq %rax, %rsi
callq 0x2180
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x90(%rbp)
jne 0x7033
movq 0x4fe4(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq -0x80(%rbp), %rdx
leaq 0x2523(%rip), %rsi      # 0x9545
movb $0x0, %al
callq 0x2150
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21c0
movq -0x90(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x705c
movq 0x4f7a(%rip), %rax      # 0xbfc8
movq (%rax), %rcx
movq -0x88(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x88(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x7082
movq -0x88(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x88(%rbp), %rcx
movq 0x10(%rcx), %rdi
callq *%rax
jmp 0x7084
movq -0x88(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x88(%rbp)
jmp 0x6e9c
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)