#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 /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char, char, char, char,
                           char, int);
void print_results(FILE *output, int *total_count) {
  char bases[4] = {'a', 'c', 'g', 't'};
  int pos = 0;
  for (int z = 0; z < 4; z++) {
    for (int x = 0; x < 4; x++) {
      for (int c = 0; c < 4; c++) {
        for (int v = 0; v < 4; v++) {
          for (int b = 0; b < 4; b++) {
            fprintf(output, "%c%c%c%c%c: %d\n", bases[z], bases[x], bases[c],
                    bases[v], bases[b], total_count[pos]);
            pos++;
          }
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<print_results>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeda(%rip),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    1248 <print_results+0x138>
movl   $0x0,-0x20(%rbp)
cmpl   $0x4,-0x20(%rbp)
jge    1235 <print_results+0x125>
movl   $0x0,-0x24(%rbp)
cmpl   $0x4,-0x24(%rbp)
jge    1222 <print_results+0x112>
movl   $0x0,-0x28(%rbp)
cmpl   $0x4,-0x28(%rbp)
jge    120f <print_results+0xff>
movl   $0x0,-0x2c(%rbp)
cmpl   $0x4,-0x2c(%rbp)
jge    11fc <print_results+0xec>
mov    -0x8(%rbp),%rdi
movslq -0x1c(%rbp),%rax
mov    -0x14(%rbp,%rax,1),%dl
movslq -0x20(%rbp),%rax
mov    -0x14(%rbp,%rax,1),%cl
movslq -0x24(%rbp),%rax
mov    -0x14(%rbp,%rax,1),%r8b
movslq -0x28(%rbp),%rax
mov    -0x14(%rbp,%rax,1),%r9b
movslq -0x2c(%rbp),%rax
mov    -0x14(%rbp,%rax,1),%r10b
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rsi
mov    (%rax,%rsi,4),%eax
lea    0xe3e(%rip),%rsi
movsbl %dl,%edx
movsbl %cl,%ecx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %r10b,%r10d
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    117b <print_results+0x6b>
jmp    1201 <print_results+0xf1>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    116a <print_results+0x5a>
jmp    1214 <print_results+0x104>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1159 <print_results+0x49>
jmp    1227 <print_results+0x117>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1148 <print_results+0x38>
jmp    123a <print_results+0x12a>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1137 <print_results+0x27>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_results>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rdi,%r13
xor    %eax,%eax
lea    0xed6(%rip),%rdx
lea    0xed3(%rip),%rbp
xor    %r14d,%r14d
mov    %rsi,0x8(%rsp)
nopl   0x0(%rax)
mov    %rax,0x20(%rsp)
mov    (%rax,%rdx,1),%bl
xor    %eax,%eax
mov    %bl,0x5(%rsp)
xchg   %ax,%ax
mov    %rax,0x28(%rsp)
mov    (%rax,%rdx,1),%al
xor    %ecx,%ecx
mov    %al,0x6(%rsp)
xchg   %ax,%ax
mov    %rcx,0x30(%rsp)
mov    (%rcx,%rdx,1),%cl
mov    %cl,0x7(%rsp)
xor    %r12d,%r12d
nop
movsbl (%r12,%rdx,1),%r9d
mov    %r9d,0x14(%rsp)
movslq %r14d,%r14
mov    (%rsi,%r14,4),%r10d
movsbl %bl,%edx
movsbl %al,%ebx
movsbl 0x7(%rsp),%r15d
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %edx,%ebp
mov    %ebx,%ecx
mov    %ebx,0x18(%rsp)
mov    %r15d,%r8d
push   %r10
push   $0x61
call   1030 <fprintf@plt>
add    $0x10,%rsp
mov    0x8(%rsp),%rax
mov    0x4(%rax,%r14,4),%eax
mov    %r13,%rdi
lea    0xe45(%rip),%rsi
mov    %ebp,%edx
mov    %ebp,0x1c(%rsp)
mov    %ebx,%ecx
mov    %r15d,%r8d
mov    0x14(%rsp),%ebx
mov    %ebx,%r9d
push   %rax
push   $0x63
call   1030 <fprintf@plt>
add    $0x10,%rsp
mov    0x8(%rsp),%rax
mov    0x8(%rax,%r14,4),%eax
mov    %r13,%rdi
lea    0xe13(%rip),%rsi
mov    %ebp,%edx
mov    0x18(%rsp),%ebp
mov    %ebp,%ecx
mov    %r15d,%r8d
mov    %ebx,%r9d
push   %rax
push   $0x67
call   1030 <fprintf@plt>
add    $0x10,%rsp
mov    0x8(%rsp),%rax
mov    0xc(%rax,%r14,4),%eax
mov    %r13,%rdi
lea    0xde5(%rip),%rsi
mov    0x1c(%rsp),%edx
mov    %ebp,%ecx
mov    %r15d,%r8d
mov    %ebx,%r9d
push   %rax
push   $0x74
call   1030 <fprintf@plt>
movzbl 0x16(%rsp),%eax
movzbl 0x15(%rsp),%ebx
lea    0xdc0(%rip),%rbp
lea    0xdb5(%rip),%rdx
mov    0x18(%rsp),%rsi
add    $0x10,%rsp
add    $0x4,%r14
add    $0x1,%r12
cmp    $0x4,%r12
jne    1170 <print_results+0x60>
mov    0x30(%rsp),%rcx
add    $0x1,%rcx
cmp    $0x4,%rcx
jne    1160 <print_results+0x50>
mov    0x28(%rsp),%rax
add    $0x1,%rax
cmp    $0x4,%rax
jne    1150 <print_results+0x40>
mov    0x20(%rsp),%rax
add    $0x1,%rax
cmp    $0x4,%rax
jne    1140 <print_results+0x30>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.print_results.bases = [4 x i8] c"acgt"
@.str = [16 x i8] c"%c%c%c%c%c: %d\0A\00"
define void @print_results(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [4 x i8]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%12 = bitcast [4 x i8]* %5 to i8*
store i32 0, i32* %6
store i32 0, i32* %7
br label %13
13: ; preds = %78, %2
%14 = load i32, i32* %7
%15 = icmp slt i32 %14, 4
br i1 %15, label %16, label %81
16: ; preds = %13
store i32 0, i32* %8
br label %17
17: ; preds = %74, %16
%18 = load i32, i32* %8
%19 = icmp slt i32 %18, 4
br i1 %19, label %20, label %77
20: ; preds = %17
store i32 0, i32* %9
br label %21
21: ; preds = %70, %20
%22 = load i32, i32* %9
%23 = icmp slt i32 %22, 4
br i1 %23, label %24, label %73
24: ; preds = %21
store i32 0, i32* %10
br label %25
25: ; preds = %66, %24
%26 = load i32, i32* %10
%27 = icmp slt i32 %26, 4
br i1 %27, label %28, label %69
28: ; preds = %25
store i32 0, i32* %11
br label %29
29: ; preds = %62, %28
%30 = load i32, i32* %11
%31 = icmp slt i32 %30, 4
br i1 %31, label %32, label %65
32: ; preds = %29
%33 = load i32*, i32** %3
%34 = load i32, i32* %7
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 %35
%37 = load i8, i8* %36
%38 = load i32, i32* %8
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 %39
%41 = load i8, i8* %40
%42 = load i32, i32* %9
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 %43
%45 = load i8, i8* %44
%46 = load i32, i32* %10
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 %47
%49 = load i8, i8* %48
%50 = load i32, i32* %11
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 %51
%53 = load i8, i8* %52
%54 = load i32*, i32** %4
%55 = load i32, i32* %6
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds i32, i32* %54, i64 %56
%58 = load i32, i32* %57
%59 = call i32 @fprintf(i32* %33, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8 signext %37, i8 signext %41, i8 signext %45, i8 signext %49, i8 signext %53, i32 %58)
%60 = load i32, i32* %6
%61 = add nsw i32 %60, 1
store i32 %61, i32* %6
br label %62
62: ; preds = %32
%63 = load i32, i32* %11
%64 = add nsw i32 %63, 1
store i32 %64, i32* %11
br label %29
65: ; preds = %29
br label %66
66: ; preds = %65
%67 = load i32, i32* %10
%68 = add nsw i32 %67, 1
store i32 %68, i32* %10
br label %25
69: ; preds = %25
br label %70
70: ; preds = %69
%71 = load i32, i32* %9
%72 = add nsw i32 %71, 1
store i32 %72, i32* %9
br label %21
73: ; preds = %21
br label %74
74: ; preds = %73
%75 = load i32, i32* %8
%76 = add nsw i32 %75, 1
store i32 %76, i32* %8
br label %17
77: ; preds = %17
br label %78
78: ; preds = %77
%79 = load i32, i32* %7
%80 = add nsw i32 %79, 1
store i32 %80, i32* %7
br label %13
81: ; preds = %13
ret void
}

LLVM IR (-O2):
@__const.print_results.bases = [4 x i8] c"acgt"
@.str = [16 x i8] c"%c%c%c%c%c: %d\0A\00"
define void @print_results(i32* nocapture %0, i32* nocapture %1) {
br label %3
3: ; preds = %2, %14
%4 = phi i64 [ 0, %2 ], [ %15, %14 ]
%5 = phi i64 [ 0, %2 ], [ %47, %14 ]
%6 = getelementptr inbounds [4 x i8], [4 x i8]* @__const.print_results.bases, i64 0, i64 %4
%7 = load i8, i8* %6
br label %9
8: ; preds = %14
ret void
9: ; preds = %3, %22
%10 = phi i64 [ 0, %3 ], [ %23, %22 ]
%11 = phi i64 [ %5, %3 ], [ %47, %22 ]
%12 = getelementptr inbounds [4 x i8], [4 x i8]* @__const.print_results.bases, i64 0, i64 %10
%13 = load i8, i8* %12
br label %17
14: ; preds = %22
%15 = add nuw nsw i64 %4, 1
%16 = icmp eq i64 %15, 4
br i1 %16, label %8, label %3
17: ; preds = %9, %50
%18 = phi i64 [ 0, %9 ], [ %51, %50 ]
%19 = phi i64 [ %11, %9 ], [ %47, %50 ]
%20 = getelementptr inbounds [4 x i8], [4 x i8]* @__const.print_results.bases, i64 0, i64 %18
%21 = load i8, i8* %20
br label %25
22: ; preds = %50
%23 = add nuw nsw i64 %10, 1
%24 = icmp eq i64 %23, 4
br i1 %24, label %14, label %9
25: ; preds = %17, %25
%26 = phi i64 [ 0, %17 ], [ %48, %25 ]
%27 = phi i64 [ %19, %17 ], [ %47, %25 ]
%28 = getelementptr inbounds [4 x i8], [4 x i8]* @__const.print_results.bases, i64 0, i64 %26
%29 = load i8, i8* %28
%30 = shl i64 %27, 32
%31 = ashr exact i64 %30, 32
%32 = getelementptr inbounds i32, i32* %1, i64 %31
%33 = load i32, i32* %32
%34 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8 signext %7, i8 signext %13, i8 signext %21, i8 signext %29, i8 signext 97, i32 %33)
%35 = add nsw i64 %31, 1
%36 = getelementptr inbounds i32, i32* %1, i64 %35
%37 = load i32, i32* %36
%38 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8 signext %7, i8 signext %13, i8 signext %21, i8 signext %29, i8 signext 99, i32 %37)
%39 = add nsw i64 %31, 2
%40 = getelementptr inbounds i32, i32* %1, i64 %39
%41 = load i32, i32* %40
%42 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8 signext %7, i8 signext %13, i8 signext %21, i8 signext %29, i8 signext 103, i32 %41)
%43 = add nsw i64 %31, 3
%44 = getelementptr inbounds i32, i32* %1, i64 %43
%45 = load i32, i32* %44
%46 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8 signext %7, i8 signext %13, i8 signext %21, i8 signext %29, i8 signext 116, i32 %45)
%47 = add nsw i64 %31, 4
%48 = add nuw nsw i64 %26, 1
%49 = icmp eq i64 %48, 4
br i1 %49, label %50, label %25
50: ; preds = %25
%51 = add nuw nsw i64 %18, 1
%52 = icmp eq i64 %51, 4
br i1 %52, label %22, label %17
}