#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int codon_table(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ mysubstr(char *, char *, int, int);
int strlen(char *);
void translate_seq(char *O, FILE *fp, char *head) {
  char *temp;
  int i, j;
  int count = 0;
  temp = (char *)malloc(4 * sizeof(char));
  int seq_len = strlen(O);
  fprintf(fp, ">%s_1\n", head);
  for (i = 0; i <= seq_len - 3; i += 3) {
    mysubstr(temp, O, i, 3);
    for (j = 0; j < 3; j++) {
      if ((int)temp[j] > 90) {
        temp[j] -= 32;
      }
    }
    fprintf(fp, "%c", codon_table(temp));
    count++;
    if (count % 60 == 0) {
      fprintf(fp, "\n");
    }
  }
  count = 0;
  fprintf(fp, "\n>%s_2\n", head);
  for (i = 1; i <= seq_len - 3; i += 3) {
    mysubstr(temp, O, i, 3);
    for (j = 0; j < 3; j++) {
      if ((int)temp[j] > 90) {
        temp[j] -= 32;
      }
    }
    fprintf(fp, "%c", codon_table(temp));
    count++;
    if (count % 60 == 0) {
      fprintf(fp, "\n");
    }
  }
  count = 0;
  fprintf(fp, "\n>%s_3\n", head);
  for (i = 2; i <= seq_len - 3; i += 3) {
    mysubstr(temp, O, i, 3);
    for (j = 0; j < 3; j++) {
      if ((int)temp[j] > 90) {
        temp[j] -= 32;
      }
    }
    fprintf(fp, "%c", codon_table(temp));
    count++;
    if (count % 60 == 0) {
      fprintf(fp, "\n");
    }
  }
  free(temp);
}


x86 assembly (clang, -O0):
<translate_seq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    $0x4,%edi
call   1080 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe5c(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x30(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jg     128a <translate_seq+0x12a>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    $0x3,%ecx
call   1040 <mysubstr@plt>
movl   $0x0,-0x28(%rbp)
cmpl   $0x3,-0x28(%rbp)
jge    1223 <translate_seq+0xc3>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5a,%eax
jle    1210 <translate_seq+0xb0>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
sub    $0x20,%edx
mov    %dl,(%rax,%rcx,1)
jmp    1215 <translate_seq+0xb5>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11df <translate_seq+0x7f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rdi
call   1060 <codon_table@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%edx
lea    0xdc6(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1277 <translate_seq+0x117>
mov    -0x10(%rbp),%rdi
lea    0xd95(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    127c <translate_seq+0x11c>
mov    -0x24(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x24(%rbp)
jmp    11b2 <translate_seq+0x52>
movl   $0x0,-0x2c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xd6a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x30(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jg     1386 <translate_seq+0x226>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    $0x3,%ecx
call   1040 <mysubstr@plt>
movl   $0x0,-0x28(%rbp)
cmpl   $0x3,-0x28(%rbp)
jge    131f <translate_seq+0x1bf>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5a,%eax
jle    130c <translate_seq+0x1ac>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
sub    $0x20,%edx
mov    %dl,(%rax,%rcx,1)
jmp    1311 <translate_seq+0x1b1>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    12db <translate_seq+0x17b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%rdi
call   1060 <codon_table@plt>
mov    -0x40(%rbp),%rdi
mov    %eax,%edx
lea    0xcca(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1373 <translate_seq+0x213>
mov    -0x10(%rbp),%rdi
lea    0xc99(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1378 <translate_seq+0x218>
mov    -0x24(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x24(%rbp)
jmp    12ae <translate_seq+0x14e>
movl   $0x0,-0x2c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xc76(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x2,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x30(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jg     1482 <translate_seq+0x322>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    $0x3,%ecx
call   1040 <mysubstr@plt>
movl   $0x0,-0x28(%rbp)
cmpl   $0x3,-0x28(%rbp)
jge    141b <translate_seq+0x2bb>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5a,%eax
jle    1408 <translate_seq+0x2a8>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
sub    $0x20,%edx
mov    %dl,(%rax,%rcx,1)
jmp    140d <translate_seq+0x2ad>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    13d7 <translate_seq+0x277>
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x20(%rbp),%rdi
call   1060 <codon_table@plt>
mov    -0x48(%rbp),%rdi
mov    %eax,%edx
lea    0xbce(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    146f <translate_seq+0x30f>
mov    -0x10(%rbp),%rdi
lea    0xb9d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1474 <translate_seq+0x314>
mov    -0x24(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x24(%rbp)
jmp    13aa <translate_seq+0x24a>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<translate_seq>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%r15
mov    %rsi,%r13
mov    %rdi,%rbx
mov    $0x4,%edi
call   1090 <malloc@plt>
mov    %rax,%r14
mov    %rbx,0x8(%rsp)
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %eax,%ebx
lea    0xe56(%rip),%rsi
xor    %ebp,%ebp
mov    %r13,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
cmp    $0x2,%ebx
jg     11d7 <translate_seq+0x67>
lea    0xe42(%rip),%rsi
mov    %r13,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    12bf <translate_seq+0x14f>
mov    %r15,0x18(%rsp)
mov    %rbx,0x10(%rsp)
lea    -0x3(%rbx),%eax
mov    %eax,0x4(%rsp)
mov    $0xffffffff,%r12d
mov    $0x1,%r15d
mov    %r13,0x20(%rsp)
jmp    1230 <translate_seq+0xc0>
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1070 <codon_table@plt>
mov    %eax,%edi
mov    0x20(%rsp),%rbx
mov    %rbx,%rsi
call   1060 <fputc@plt>
test   %r13d,%r13d
mov    %rbx,%r13
je     1290 <translate_seq+0x120>
add    $0x3,%ebp
add    $0xffffffff,%r12d
add    $0x1,%r15d
cmp    0x4(%rsp),%ebp
jg     129f <translate_seq+0x12f>
mov    %r15d,%ebx
mov    $0x88888889,%eax
imul   %rax,%rbx
shr    $0x25,%rbx
mov    %r14,%rdi
mov    0x8(%rsp),%rsi
mov    %ebp,%edx
mov    $0x3,%ecx
call   1040 <mysubstr@plt>
movzbl (%r14),%eax
cmp    $0x5b,%al
jl     1261 <translate_seq+0xf1>
add    $0xe0,%al
mov    %al,(%r14)
imul   $0x3c,%ebx,%r13d
movzbl 0x1(%r14),%eax
cmp    $0x5b,%al
jl     1274 <translate_seq+0x104>
add    $0xe0,%al
mov    %al,0x1(%r14)
add    %r12d,%r13d
movzbl 0x2(%r14),%eax
cmp    $0x5b,%al
jl     1200 <translate_seq+0x90>
add    $0xe0,%al
mov    %al,0x2(%r14)
jmp    1200 <translate_seq+0x90>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
mov    %r13,%rsi
call   1060 <fputc@plt>
jmp    121f <translate_seq+0xaf>
lea    0xd61(%rip),%rsi
mov    %r13,%rdi
mov    0x18(%rsp),%r15
mov    %r15,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
cmpl   $0x4,0x10(%rsp)
jge    12e9 <translate_seq+0x179>
lea    0xd49(%rip),%rsi
mov    %r13,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %r14,%rdi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
mov    $0xffffffff,%r12d
mov    $0x1,%r15d
mov    $0x1,%ebp
jmp    1327 <translate_seq+0x1b7>
nopl   0x0(%rax)
mov    %r14,%rdi
call   1070 <codon_table@plt>
mov    %eax,%edi
mov    %r13,%rsi
call   1060 <fputc@plt>
test   %ebx,%ebx
je     1380 <translate_seq+0x210>
add    $0x3,%ebp
add    $0xffffffff,%r12d
add    $0x1,%r15d
cmp    0x4(%rsp),%ebp
jg     138f <translate_seq+0x21f>
mov    %r15d,%ebx
mov    $0x88888889,%eax
imul   %rax,%rbx
shr    $0x25,%rbx
mov    %r14,%rdi
mov    0x8(%rsp),%rsi
mov    %ebp,%edx
mov    $0x3,%ecx
call   1040 <mysubstr@plt>
movzbl (%r14),%eax
cmp    $0x5b,%al
jl     1358 <translate_seq+0x1e8>
add    $0xe0,%al
mov    %al,(%r14)
imul   $0x3c,%ebx,%ebx
movzbl 0x1(%r14),%eax
cmp    $0x5b,%al
jl     136a <translate_seq+0x1fa>
add    $0xe0,%al
mov    %al,0x1(%r14)
add    %r12d,%ebx
movzbl 0x2(%r14),%eax
cmp    $0x5b,%al
jl     1300 <translate_seq+0x190>
add    $0xe0,%al
mov    %al,0x2(%r14)
jmp    1300 <translate_seq+0x190>
xchg   %ax,%ax
mov    $0xa,%edi
mov    %r13,%rsi
call   1060 <fputc@plt>
jmp    1316 <translate_seq+0x1a6>
lea    0xc79(%rip),%rsi
mov    %r13,%rdi
mov    0x18(%rsp),%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
cmpl   $0x5,0x10(%rsp)
jl     12d3 <translate_seq+0x163>
mov    $0x2,%ebp
mov    $0xffffffff,%r12d
mov    $0x1,%r15d
jmp    13fb <translate_seq+0x28b>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
call   1070 <codon_table@plt>
mov    %eax,%edi
mov    %r13,%rsi
call   1060 <fputc@plt>
test   %ebx,%ebx
je     1460 <translate_seq+0x2f0>
add    $0x3,%ebp
add    $0xffffffff,%r12d
add    $0x1,%r15d
cmp    0x4(%rsp),%ebp
jg     12d3 <translate_seq+0x163>
mov    %r15d,%ebx
mov    $0x88888889,%eax
imul   %rax,%rbx
shr    $0x25,%rbx
mov    %r14,%rdi
mov    0x8(%rsp),%rsi
mov    %ebp,%edx
mov    $0x3,%ecx
call   1040 <mysubstr@plt>
movzbl (%r14),%eax
cmp    $0x5b,%al
jl     142c <translate_seq+0x2bc>
add    $0xe0,%al
mov    %al,(%r14)
imul   $0x3c,%ebx,%ebx
movzbl 0x1(%r14),%eax
cmp    $0x5b,%al
jl     143e <translate_seq+0x2ce>
add    $0xe0,%al
mov    %al,0x1(%r14)
add    %r12d,%ebx
movzbl 0x2(%r14),%eax
cmp    $0x5b,%al
jl     13d0 <translate_seq+0x260>
add    $0xe0,%al
mov    %al,0x2(%r14)
jmp    13d0 <translate_seq+0x260>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%edi
mov    %r13,%rsi
call   1060 <fputc@plt>
jmp    13e6 <translate_seq+0x276>

LLVM IR (-O0):
@.str = [7 x i8] c">%s_1\0A\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [8 x i8] c"\0A>%s_2\0A\00"
@.str.4 = [8 x i8] c"\0A>%s_3\0A\00"
define void @translate_seq(i8* %0, i32* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i8* %2, i8** %6
store i32 0, i32* %10
%12 = call i64 @malloc(i32 4)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %7
%14 = load i8*, i8** %4
%15 = call i32 @strlen(i8* %14)
store i32 %15, i32* %11
%16 = load i32*, i32** %5
%17 = load i8*, i8** %6
%18 = call i32 (i32*, i8*, ...) @fprintf(i32* %16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %17)
store i32 0, i32* %8
br label %19
19: ; preds = %67, %3
%20 = load i32, i32* %8
%21 = load i32, i32* %11
%22 = sub nsw i32 %21, 3
%23 = icmp sle i32 %20, %22
br i1 %23, label %24, label %70
24: ; preds = %19
%25 = load i8*, i8** %7
%26 = load i8*, i8** %4
%27 = load i32, i32* %8
%28 = call i32 @mysubstr(i8* %25, i8* %26, i32 %27, i32 3)
store i32 0, i32* %9
br label %29
29: ; preds = %50, %24
%30 = load i32, i32* %9
%31 = icmp slt i32 %30, 3
br i1 %31, label %32, label %53
32: ; preds = %29
%33 = load i8*, i8** %7
%34 = load i32, i32* %9
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8, i8* %33, i64 %35
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = icmp sgt i32 %38, 90
br i1 %39, label %40, label %49
40: ; preds = %32
%41 = load i8*, i8** %7
%42 = load i32, i32* %9
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8, i8* %41, i64 %43
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = sub nsw i32 %46, 32
%48 = trunc i32 %47 to i8
store i8 %48, i8* %44
br label %49
49: ; preds = %40, %32
br label %50
50: ; preds = %49
%51 = load i32, i32* %9
%52 = add nsw i32 %51, 1
store i32 %52, i32* %9
br label %29
53: ; preds = %29
%54 = load i32*, i32** %5
%55 = load i8*, i8** %7
%56 = call i32 @codon_table(i8* %55)
%57 = call i32 (i32*, i8*, ...) @fprintf(i32* %54, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %56)
%58 = load i32, i32* %10
%59 = add nsw i32 %58, 1
store i32 %59, i32* %10
%60 = load i32, i32* %10
%61 = srem i32 %60, 60
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %66
63: ; preds = %53
%64 = load i32*, i32** %5
%65 = call i32 (i32*, i8*, ...) @fprintf(i32* %64, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %66
66: ; preds = %63, %53
br label %67
67: ; preds = %66
%68 = load i32, i32* %8
%69 = add nsw i32 %68, 3
store i32 %69, i32* %8
br label %19
70: ; preds = %19
store i32 0, i32* %10
%71 = load i32*, i32** %5
%72 = load i8*, i8** %6
%73 = call i32 (i32*, i8*, ...) @fprintf(i32* %71, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %72)
store i32 1, i32* %8
br label %74
74: ; preds = %122, %70
%75 = load i32, i32* %8
%76 = load i32, i32* %11
%77 = sub nsw i32 %76, 3
%78 = icmp sle i32 %75, %77
br i1 %78, label %79, label %125
79: ; preds = %74
%80 = load i8*, i8** %7
%81 = load i8*, i8** %4
%82 = load i32, i32* %8
%83 = call i32 @mysubstr(i8* %80, i8* %81, i32 %82, i32 3)
store i32 0, i32* %9
br label %84
84: ; preds = %105, %79
%85 = load i32, i32* %9
%86 = icmp slt i32 %85, 3
br i1 %86, label %87, label %108
87: ; preds = %84
%88 = load i8*, i8** %7
%89 = load i32, i32* %9
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i8, i8* %88, i64 %90
%92 = load i8, i8* %91
%93 = sext i8 %92 to i32
%94 = icmp sgt i32 %93, 90
br i1 %94, label %95, label %104
95: ; preds = %87
%96 = load i8*, i8** %7
%97 = load i32, i32* %9
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds i8, i8* %96, i64 %98
%100 = load i8, i8* %99
%101 = sext i8 %100 to i32
%102 = sub nsw i32 %101, 32
%103 = trunc i32 %102 to i8
store i8 %103, i8* %99
br label %104
104: ; preds = %95, %87
br label %105
105: ; preds = %104
%106 = load i32, i32* %9
%107 = add nsw i32 %106, 1
store i32 %107, i32* %9
br label %84
108: ; preds = %84
%109 = load i32*, i32** %5
%110 = load i8*, i8** %7
%111 = call i32 @codon_table(i8* %110)
%112 = call i32 (i32*, i8*, ...) @fprintf(i32* %109, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %111)
%113 = load i32, i32* %10
%114 = add nsw i32 %113, 1
store i32 %114, i32* %10
%115 = load i32, i32* %10
%116 = srem i32 %115, 60
%117 = icmp eq i32 %116, 0
br i1 %117, label %118, label %121
118: ; preds = %108
%119 = load i32*, i32** %5
%120 = call i32 (i32*, i8*, ...) @fprintf(i32* %119, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %121
121: ; preds = %118, %108
br label %122
122: ; preds = %121
%123 = load i32, i32* %8
%124 = add nsw i32 %123, 3
store i32 %124, i32* %8
br label %74
125: ; preds = %74
store i32 0, i32* %10
%126 = load i32*, i32** %5
%127 = load i8*, i8** %6
%128 = call i32 (i32*, i8*, ...) @fprintf(i32* %126, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* %127)
store i32 2, i32* %8
br label %129
129: ; preds = %177, %125
%130 = load i32, i32* %8
%131 = load i32, i32* %11
%132 = sub nsw i32 %131, 3
%133 = icmp sle i32 %130, %132
br i1 %133, label %134, label %180
134: ; preds = %129
%135 = load i8*, i8** %7
%136 = load i8*, i8** %4
%137 = load i32, i32* %8
%138 = call i32 @mysubstr(i8* %135, i8* %136, i32 %137, i32 3)
store i32 0, i32* %9
br label %139
139: ; preds = %160, %134
%140 = load i32, i32* %9
%141 = icmp slt i32 %140, 3
br i1 %141, label %142, label %163
142: ; preds = %139
%143 = load i8*, i8** %7
%144 = load i32, i32* %9
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds i8, i8* %143, i64 %145
%147 = load i8, i8* %146
%148 = sext i8 %147 to i32
%149 = icmp sgt i32 %148, 90
br i1 %149, label %150, label %159
150: ; preds = %142
%151 = load i8*, i8** %7
%152 = load i32, i32* %9
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds i8, i8* %151, i64 %153
%155 = load i8, i8* %154
%156 = sext i8 %155 to i32
%157 = sub nsw i32 %156, 32
%158 = trunc i32 %157 to i8
store i8 %158, i8* %154
br label %159
159: ; preds = %150, %142
br label %160
160: ; preds = %159
%161 = load i32, i32* %9
%162 = add nsw i32 %161, 1
store i32 %162, i32* %9
br label %139
163: ; preds = %139
%164 = load i32*, i32** %5
%165 = load i8*, i8** %7
%166 = call i32 @codon_table(i8* %165)
%167 = call i32 (i32*, i8*, ...) @fprintf(i32* %164, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %166)
%168 = load i32, i32* %10
%169 = add nsw i32 %168, 1
store i32 %169, i32* %10
%170 = load i32, i32* %10
%171 = srem i32 %170, 60
%172 = icmp eq i32 %171, 0
br i1 %172, label %173, label %176
173: ; preds = %163
%174 = load i32*, i32** %5
%175 = call i32 (i32*, i8*, ...) @fprintf(i32* %174, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %176
176: ; preds = %173, %163
br label %177
177: ; preds = %176
%178 = load i32, i32* %8
%179 = add nsw i32 %178, 3
store i32 %179, i32* %8
br label %129
180: ; preds = %129
%181 = load i8*, i8** %7
%182 = call i32 @free(i8* %181)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c">%s_1\0A\00"
@.str.3 = [8 x i8] c"\0A>%s_2\0A\00"
@.str.4 = [8 x i8] c"\0A>%s_3\0A\00"
define void @translate_seq(i8* %0, i32* nocapture %1, i8* %2) {
%4 = tail call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strlen(i8* %0)
%7 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %2)
%8 = add nsw i32 %6, -3
%9 = icmp slt i32 %6, 3
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %2)
br label %79
12: ; preds = %3
%13 = getelementptr inbounds i8, i8* %5, i64 1
%14 = getelementptr inbounds i8, i8* %5, i64 2
br label %15
15: ; preds = %12, %41
%16 = phi i32 [ %42, %41 ], [ 0, %12 ]
%17 = phi i32 [ %36, %41 ], [ 0, %12 ]
%18 = tail call i32 @mysubstr(i8* %5, i8* %0, i32 %16, i32 3)
%19 = load i8, i8* %5
%20 = icmp sgt i8 %19, 90
br i1 %20, label %21, label %23
21: ; preds = %15
%22 = add nsw i8 %19, -32
store i8 %22, i8* %5
br label %23
23: ; preds = %15, %21
%24 = load i8, i8* %13
%25 = icmp sgt i8 %24, 90
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = add nsw i8 %24, -32
store i8 %27, i8* %13
br label %28
28: ; preds = %26, %23
%29 = load i8, i8* %14
%30 = icmp sgt i8 %29, 90
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = add nsw i8 %29, -32
store i8 %32, i8* %14
br label %33
33: ; preds = %31, %28
%34 = tail call i32 @codon_table(i8* %5)
%35 = tail call i32 @fputc(i32 %34, i32* %1)
%36 = add nuw nsw i32 %17, 1
%37 = urem i32 %36, 60
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %33
%40 = tail call i32 @fputc(i32 10, i32* %1)
br label %41
41: ; preds = %33, %39
%42 = add nuw nsw i32 %16, 3
%43 = icmp sgt i32 %42, %8
br i1 %43, label %44, label %15
44: ; preds = %41
%45 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%46 = icmp slt i32 %6, 4
br i1 %46, label %79, label %47
47: ; preds = %44
%48 = getelementptr inbounds i8, i8* %5, i64 1
%49 = getelementptr inbounds i8, i8* %5, i64 2
br label %50
50: ; preds = %47, %76
%51 = phi i32 [ %77, %76 ], [ 1, %47 ]
%52 = phi i32 [ %71, %76 ], [ 0, %47 ]
%53 = tail call i32 @mysubstr(i8* %5, i8* %0, i32 %51, i32 3)
%54 = load i8, i8* %5
%55 = icmp sgt i8 %54, 90
br i1 %55, label %56, label %58
56: ; preds = %50
%57 = add nsw i8 %54, -32
store i8 %57, i8* %5
br label %58
58: ; preds = %50, %56
%59 = load i8, i8* %48
%60 = icmp sgt i8 %59, 90
br i1 %60, label %61, label %63
61: ; preds = %58
%62 = add nsw i8 %59, -32
store i8 %62, i8* %48
br label %63
63: ; preds = %61, %58
%64 = load i8, i8* %49
%65 = icmp sgt i8 %64, 90
br i1 %65, label %66, label %68
66: ; preds = %63
%67 = add nsw i8 %64, -32
store i8 %67, i8* %49
br label %68
68: ; preds = %66, %63
%69 = tail call i32 @codon_table(i8* %5)
%70 = tail call i32 @fputc(i32 %69, i32* %1)
%71 = add nuw nsw i32 %52, 1
%72 = urem i32 %71, 60
%73 = icmp eq i32 %72, 0
br i1 %73, label %74, label %76
74: ; preds = %68
%75 = tail call i32 @fputc(i32 10, i32* %1)
br label %76
76: ; preds = %68, %74
%77 = add nuw nsw i32 %51, 3
%78 = icmp sgt i32 %77, %8
br i1 %78, label %81, label %50
79: ; preds = %10, %44
%80 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* %2)
br label %116
81: ; preds = %76
%82 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* %2)
%83 = icmp slt i32 %6, 5
br i1 %83, label %116, label %84
84: ; preds = %81
%85 = getelementptr inbounds i8, i8* %5, i64 1
%86 = getelementptr inbounds i8, i8* %5, i64 2
br label %87
87: ; preds = %84, %113
%88 = phi i32 [ %114, %113 ], [ 2, %84 ]
%89 = phi i32 [ %108, %113 ], [ 0, %84 ]
%90 = tail call i32 @mysubstr(i8* %5, i8* %0, i32 %88, i32 3)
%91 = load i8, i8* %5
%92 = icmp sgt i8 %91, 90
br i1 %92, label %93, label %95
93: ; preds = %87
%94 = add nsw i8 %91, -32
store i8 %94, i8* %5
br label %95
95: ; preds = %87, %93
%96 = load i8, i8* %85
%97 = icmp sgt i8 %96, 90
br i1 %97, label %98, label %100
98: ; preds = %95
%99 = add nsw i8 %96, -32
store i8 %99, i8* %85
br label %100
100: ; preds = %98, %95
%101 = load i8, i8* %86
%102 = icmp sgt i8 %101, 90
br i1 %102, label %103, label %105
103: ; preds = %100
%104 = add nsw i8 %101, -32
store i8 %104, i8* %86
br label %105
105: ; preds = %103, %100
%106 = tail call i32 @codon_table(i8* %5)
%107 = tail call i32 @fputc(i32 %106, i32* %1)
%108 = add nuw nsw i32 %89, 1
%109 = urem i32 %108, 60
%110 = icmp eq i32 %109, 0
br i1 %110, label %111, label %113
111: ; preds = %105
%112 = tail call i32 @fputc(i32 10, i32* %1)
br label %113
113: ; preds = %105, %111
%114 = add nuw nsw i32 %88, 3
%115 = icmp sgt i32 %114, %8
br i1 %115, label %116, label %87
116: ; preds = %113, %79, %81
%117 = tail call i32 @free(i8* %5)
ret void
}