// File: /workspace/github_c_makefile_star2_O0/Cyan4973[P]FiniteStateEntropy/programs/fileio.c
// Function: get_fileHandle
static void get_fileHandle(const char* input_filename, const char* output_filename, FILE** pfinput, FILE** pfoutput)
{
    if (!strcmp (input_filename, stdinmark)) {
        DISPLAYLEVEL(4,"Using stdin for input\n");
        *pfinput = stdin;
        SET_BINARY_MODE(stdin);
    } else {
        *pfinput = fopen(input_filename, "rb");
    }

    if (*pfinput == 0) EXM_THROW(12, "Pb opening %s", input_filename);

    if (!strcmp (output_filename, stdoutmark)) {
        DISPLAYLEVEL(4,"Using stdout for output\n");
        *pfoutput = stdout;
        SET_BINARY_MODE(stdout);
    } else {
        /* Check if destination file already exists */
        *pfoutput=0;
        if (strcmp(output_filename,nulmark)) *pfoutput = fopen( output_filename, "rb" );
        if (*pfoutput!=0) {
            fclose(*pfoutput);
            if (!g_overwrite) {
                char ch;
                if (g_displayLevel <= 1)   /* No interaction possible */
                    EXM_THROW(11, "Operation aborted : %s already exists", output_filename);
                DISPLAYLEVEL(2, "Warning : %s already exists\n", output_filename);
                DISPLAYLEVEL(2, "Overwrite ? (Y/N) : ");
                ch = (char)getchar();
                if ((ch!='Y') && (ch!='y')) EXM_THROW(11, "Operation aborted : %s already exists", output_filename);
        }   }
        *pfoutput = fopen( output_filename, "wb" );
    }

    if ( *pfoutput==0) EXM_THROW(13, "Pb opening %s", output_filename);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x20d05(%rip), %rsi     # 0x259c8
callq 0x10e0
cmpl $0x0, %eax
jne 0x4d01
cmpl $0x4, 0x27418(%rip)     # 0x2c0ec
jl 0x4cee
movq 0x2731b(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x2116c(%rip), %rsi     # 0x25e53
movb $0x0, %al
callq 0x1100
movq 0x272e3(%rip), %rax     # 0x2bfd8
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x4d1b
movq -0x8(%rbp), %rdi
leaq 0x206c8(%rip), %rsi     # 0x253d4
callq 0x1110
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x4d9b
cmpl $0x1, 0x273c0(%rip)     # 0x2c0ec
jl 0x4d4b
movq 0x272c3(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x20c96(%rip), %rsi     # 0x259d5
movl $0xc, %edx
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x2739a(%rip)     # 0x2c0ec
jl 0x4d70
movq 0x2729d(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x21101(%rip), %rsi     # 0x25e6a
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27375(%rip)     # 0x2c0ec
jl 0x4d91
movq 0x27278(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x2071a(%rip), %rsi     # 0x254a4
movb $0x0, %al
callq 0x1100
movl $0xc, %edi
callq 0x1170
movq -0x10(%rbp), %rdi
leaq 0x20c28(%rip), %rsi     # 0x259ce
callq 0x10e0
cmpl $0x0, %eax
jne 0x4de7
cmpl $0x4, 0x27335(%rip)     # 0x2c0ec
jl 0x4dd1
movq 0x27238(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x210ae(%rip), %rsi     # 0x25e78
movb $0x0, %al
callq 0x1100
movq 0x271f8(%rip), %rax     # 0x2bfd0
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0x4fbb
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rdi
leaq 0x20955(%rip), %rsi     # 0x25752
callq 0x10e0
cmpl $0x0, %eax
je 0x4e21
movq -0x10(%rbp), %rdi
leaq 0x205c2(%rip), %rsi     # 0x253d4
callq 0x1110
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x4fa1
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x1080
cmpl $0x0, 0x2730a(%rip)     # 0x2c14c
jne 0x4f9f
cmpl $0x1, 0x2729d(%rip)     # 0x2c0ec
jg 0x4ec7
cmpl $0x1, 0x27294(%rip)     # 0x2c0ec
jl 0x4e77
movq 0x27197(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x20b6a(%rip), %rsi     # 0x259d5
movl $0xb, %edx
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x2726e(%rip)     # 0x2c0ec
jl 0x4e9c
movq 0x27171(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x20ffc(%rip), %rsi     # 0x25e91
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27249(%rip)     # 0x2c0ec
jl 0x4ebd
movq 0x2714c(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x205ee(%rip), %rsi     # 0x254a4
movb $0x0, %al
callq 0x1100
movl $0xb, %edi
callq 0x1170
cmpl $0x2, 0x2721e(%rip)     # 0x2c0ec
jl 0x4eec
movq 0x27121(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x20fd2(%rip), %rsi     # 0x25eb7
movb $0x0, %al
callq 0x1100
cmpl $0x2, 0x271f9(%rip)     # 0x2c0ec
jl 0x4f0d
movq 0x270fc(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x20fce(%rip), %rsi     # 0x25ed4
movb $0x0, %al
callq 0x1100
callq 0x10f0
movb %al, -0x21(%rbp)
movsbl -0x21(%rbp), %eax
cmpl $0x59, %eax
je 0x4f9d
movsbl -0x21(%rbp), %eax
cmpl $0x79, %eax
je 0x4f9d
cmpl $0x1, 0x271be(%rip)     # 0x2c0ec
jl 0x4f4d
movq 0x270c1(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x20a94(%rip), %rsi     # 0x259d5
movl $0xb, %edx
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27198(%rip)     # 0x2c0ec
jl 0x4f72
movq 0x2709b(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x20f26(%rip), %rsi     # 0x25e91
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27173(%rip)     # 0x2c0ec
jl 0x4f93
movq 0x27076(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x20518(%rip), %rsi     # 0x254a4
movb $0x0, %al
callq 0x1100
movl $0xb, %edi
callq 0x1170
jmp 0x4f9f
jmp 0x4fa1
movq -0x10(%rbp), %rdi
leaq 0x20f3d(%rip), %rsi     # 0x25ee9
callq 0x1110
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x503b
cmpl $0x1, 0x27120(%rip)     # 0x2c0ec
jl 0x4feb
movq 0x27023(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x209f6(%rip), %rsi     # 0x259d5
movl $0xd, %edx
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x270fa(%rip)     # 0x2c0ec
jl 0x5010
movq 0x26ffd(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x20e61(%rip), %rsi     # 0x25e6a
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x270d5(%rip)     # 0x2c0ec
jl 0x5031
movq 0x26fd8(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x2047a(%rip), %rsi     # 0x254a4
movb $0x0, %al
callq 0x1100
movl $0xd, %edi
callq 0x1170
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)