// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x100078, %rsp         # imm = 0x100078
movl $0x0, 0x100074(%rsp)
movl %edi, 0x100070(%rsp)
movq %rsi, 0x100068(%rsp)
callq 0x11a0
cmpl $0x3, 0x100070(%rsp)
jge 0x1313
movq 0x2d11(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq 0x100068(%rsp), %rax
movq (%rax), %rdx
leaq 0xd08(%rip), %rsi       # 0x2004
movb $0x0, %al
callq 0x1060
movl $0x1, 0x100074(%rsp)
jmp 0x14ee
movq 0x100068(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x100060(%rsp)
movq 0x100068(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x100058(%rsp)
movq 0x100060(%rsp), %rdi
leaq 0xcd2(%rip), %rsi       # 0x201c
callq 0x1070
movq %rax, 0x100050(%rsp)
cmpq $0x0, 0x100050(%rsp)
jne 0x13b5
movq 0x2c8f(%rip), %rax      # 0x3ff8
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x100060(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x1030
movl (%rax), %edi
callq 0x1090
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rdx
movq %rax, %rcx
leaq 0xc81(%rip), %rsi       # 0x201f
movb $0x0, %al
callq 0x1060
movl $0x1, 0x100074(%rsp)
jmp 0x14ee
movq 0x100058(%rsp), %rdi
leaq 0xc6e(%rip), %rsi       # 0x2032
callq 0x1070
movq %rax, 0x100048(%rsp)
cmpq $0x0, 0x100048(%rsp)
jne 0x142f
movq 0x2c15(%rip), %rax      # 0x3ff8
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x100058(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x1030
movl (%rax), %edi
callq 0x1090
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
leaq 0xc07(%rip), %rsi       # 0x201f
movb $0x0, %al
callq 0x1060
movl $0x1, 0x100074(%rsp)
jmp 0x14ee
leaq 0x40(%rsp), %rax
addq $0x100000, %rax         # imm = 0x100000
movq %rax, 0x38(%rsp)
leaq 0x40(%rsp), %rdi
movq 0x100050(%rsp), %rcx
movl $0x1, %esi
movl $0x100000, %edx         # imm = 0x100000
callq 0x1040
movq %rax, 0x30(%rsp)
cmpq $0x0, %rax
je 0x14c9
leaq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0x14a8
movq 0x28(%rsp), %rax
movswq (%rax), %rcx
leaq 0x2ce4(%rip), %rax      # 0x4170
movw (%rax,%rcx,2), %cx
movq 0x28(%rsp), %rax
movw %cx, (%rax)
movq 0x28(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x28(%rsp)
jmp 0x1470
leaq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq 0x100048(%rsp), %rcx
movl $0x1, %esi
callq 0x1080
jmp 0x143f
movq 0x100050(%rsp), %rdi
callq 0x1050
movq 0x100048(%rsp), %rdi
callq 0x1050
movl $0x0, 0x100074(%rsp)
movl 0x100074(%rsp), %eax
addq $0x100078, %rsp         # imm = 0x100078
retq