// File: /workspace/github_c_makefile_star2_O2/starius[P]dna-complement/dna-complement.c
// Function: main
int main(int argc, char** argv) {
    initializeTranslate();
    if (argc < 1 + 2) {
        fprintf(stderr, "Usage: %s input output\n", argv[0]);
        return 1;
    }
    const char* input_fname = argv[1];
    const char* output_fname = argv[2];
    FILE* input = fopen(input_fname, "rb");
    if (!input) {
        fprintf(stderr, "Can't open %s: %s\n",
                input_fname, strerror(errno));
        return 1;
    }
    FILE* output = fopen(output_fname, "wb");
    if (!output) {
        fprintf(stderr, "Can't open %s: %s\n",
                output_fname, strerror(errno));
        return 1;
    }
    char input_buffer[BUFSIZE];
#ifdef SAME_BUFFER
# define output_buffer input_buffer
#else
    char output_buffer[BUFSIZE];
#endif
#if USE_SHORT
    short* input_buffer_end = (short*)(input_buffer + BUFSIZE);
#else
    char* input_buffer_end = input_buffer + BUFSIZE;
#endif
    size_t nread;
    while (nread = fread(input_buffer, 1, BUFSIZE, input)) {
#if USE_SHORT
        short* input_it;
# define table short_translate
# define input_buffer1 (short*)input_buffer
# define output_buffer1 (short*)output_buffer
# ifndef SAME_BUFFER
        short* output_it;
# endif
#else
        char* input_it;
# define table translate
# define input_buffer1 input_buffer
# define output_buffer1 output_buffer
# ifndef SAME_BUFFER
        char* output_it;
# endif
#endif
#ifdef SAME_BUFFER
# define output_it input_it
#endif
        for (input_it = input_buffer1
#ifndef SAME_BUFFER
             , output_it = output_buffer1
#endif
             ; input_it < input_buffer_end; input_it++
#ifndef SAME_BUFFER
             , output_it++
#endif
             )
        {
            *output_it = table[*input_it];
        }
        fwrite(output_buffer, 1, nread, output);
    }
    fclose(input);
    fclose(output);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x100008, %rsp         # imm = 0x100008
movq %rsi, %rbx
movl %edi, %ebp
callq 0x119c
cmpl $0x2, %ebp
jle 0x1310
movq 0x8(%rbx), %r14
movq 0x10(%rbx), %r15
leaq 0xdb8(%rip), %rsi       # 0x201c
movq %r14, %rdi
callq 0x1070
testq %rax, %rax
je 0x132d
movq %rax, %rbx
leaq 0xdb3(%rip), %rsi       # 0x2032
movq %r15, %rdi
callq 0x1070
testq %rax, %rax
je 0x1352
movq %rax, %r14
movq %rsp, %r15
pushq $0x1
popq %r12
leaq 0x2ecf(%rip), %r13      # 0x4170
movl $0x100000, %edx         # imm = 0x100000
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rcx
callq 0x1040
testq %rax, %rax
je 0x12ec
xorl %ecx, %ecx
cmpq $0xfffff, %rcx          # imm = 0xFFFFF
ja 0x12d9
movswq (%rsp,%rcx), %rdx
movzwl (%r13,%rdx,2), %edx
movw %dx, (%rsp,%rcx)
addq $0x2, %rcx
jmp 0x12bb
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0x1080
jmp 0x12a1
movq %rbx, %rdi
callq 0x1050
movq %r14, %rdi
callq 0x1050
xorl %eax, %eax
addq $0x100008, %rsp         # imm = 0x100008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2ce1(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0xce0(%rip), %rsi       # 0x2004
xorl %eax, %eax
callq 0x1060
jmp 0x137f
movq 0x2cc4(%rip), %rax      # 0x3ff8
movq (%rax), %rbx
callq 0x1030
movl (%rax), %edi
callq 0x1090
leaq 0xcd5(%rip), %rsi       # 0x201f
movq %rbx, %rdi
movq %r14, %rdx
jmp 0x1375
movq 0x2c9f(%rip), %rax      # 0x3ff8
movq (%rax), %rbx
callq 0x1030
movl (%rax), %edi
callq 0x1090
leaq 0xcb0(%rip), %rsi       # 0x201f
movq %rbx, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1060
pushq $0x1
popq %rax
jmp 0x12fe