#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 */

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, char);
int main(int argc, char **argv) {
  char value[8] = {'E', 'N', 'G', 'T', 'g', 'p', 'd', 'h'};
  int freq[8] = {1, 2, 7, 7, 19, 23, 46, 73};
  int ind1;
  int ind2;
  for (ind1 = 0; ind1 < 8; ind1++) {
    for (ind2 = 0; ind2 < freq[ind1]; ind2++) {
      printf("%c", value[ind1]);
    }
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xed5(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xed2(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xecf(%rip),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x8,-0x44(%rbp)
jge    11bc <main+0xac>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
movslq -0x44(%rbp),%rcx
cmp    -0x40(%rbp,%rcx,4),%eax
jge    11a9 <main+0x99>
movslq -0x44(%rbp),%rax
lea    0xe9f(%rip),%rdi
movsbl -0x18(%rbp,%rax,1),%esi
call   1030 <printf@plt>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1175 <main+0x65>
jmp    11ae <main+0x9e>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1164 <main+0x54>
mov    0x2e1d(%rip),%rax
mov    (%rax),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xee6(%rip),%rbx
mov    %rbx,%rdi
mov    $0x45,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4e,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4e,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x47,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x47,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x47,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x47,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x47,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x47,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x47,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x54,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x54,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x54,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x54,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x54,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x54,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x54,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x67,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x70,%esi
call   1030 <printf@plt>
mov    $0x2e,%ebp
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x64,%esi
call   1030 <printf@plt>
add    $0xffffffff,%ebp
jne    1420 <main+0x310>
mov    $0x49,%ebp
lea    0xbc2(%rip),%rbx
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x68,%esi
call   1030 <printf@plt>
add    $0xffffffff,%ebp
jne    1440 <main+0x330>
mov    0x2b87(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.value = [8 x i8] c"ENGTgpdh"
@__const.main.freq = [8 x i32] [i32 1, i32 2, i32 7, i32 7, i32 19, i32 23, i32 46, i32 73]
@.str = [3 x i8] c"%c\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [8 x i8]
%7 = alloca [8 x i32]
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = bitcast [8 x i8]* %6 to i8*
%11 = bitcast [8 x i32]* %7 to i8*
store i32 0, i32* %8
br label %12
12: ; preds = %33, %2
%13 = load i32, i32* %8
%14 = icmp slt i32 %13, 8
br i1 %14, label %15, label %36
15: ; preds = %12
store i32 0, i32* %9
br label %16
16: ; preds = %29, %15
%17 = load i32, i32* %9
%18 = load i32, i32* %8
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [8 x i32], [8 x i32]* %7, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = icmp slt i32 %17, %21
br i1 %22, label %23, label %32
23: ; preds = %16
%24 = load i32, i32* %8
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [8 x i8], [8 x i8]* %6, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %27)
br label %29
29: ; preds = %23
%30 = load i32, i32* %9
%31 = add nsw i32 %30, 1
store i32 %31, i32* %9
br label %16
32: ; preds = %16
br label %33
33: ; preds = %32
%34 = load i32, i32* %8
%35 = add nsw i32 %34, 1
store i32 %35, i32* %8
br label %12
36: ; preds = %12
%37 = load i32, i32* @EXIT_SUCCESS
ret i32 %37
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 69)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 78)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 78)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 71)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 71)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 71)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 71)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 71)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 71)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 71)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 84)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 84)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 84)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 84)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 84)
%18 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 84)
%19 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 84)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%21 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%22 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%23 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%24 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%25 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%26 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%27 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%28 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%29 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%30 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%31 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%32 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%33 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%34 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%35 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%36 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%37 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%38 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 103)
%39 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%40 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%41 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%42 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%43 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%44 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%45 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%46 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%47 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%48 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%49 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%50 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%51 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%52 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%53 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%54 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%55 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%56 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%57 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%58 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%59 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%60 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
%61 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 112)
br label %62
62: ; preds = %62, %2
%63 = phi i32 [ 0, %2 ], [ %65, %62 ]
%64 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 100)
%65 = add nuw nsw i32 %63, 1
%66 = icmp eq i32 %65, 46
br i1 %66, label %67, label %62
67: ; preds = %62, %67
%68 = phi i32 [ %70, %67 ], [ 0, %62 ]
%69 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 104)
%70 = add nuw nsw i32 %68, 1
%71 = icmp eq i32 %70, 73
br i1 %71, label %72, label %67
72: ; preds = %67
%73 = load i32, i32* @EXIT_SUCCESS
ret i32 %73
}