xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ strcat(char *, char *);
int strlen(char *);
void CrashLog_LogCompiler(char *buffer) {
  sprintf(buffer + strlen(buffer),
          " Compiler: "
          "GCC %d.%d.%d",
          9, 4, 0);
  strcat(buffer, " \""
                 "9.4.0"
                 "\"\n\n");
}


x86 assembly (clang, -O0):
<CrashLog_LogCompiler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
cltq
add    %rax,%rdi
lea    0xea3(%rip),%rsi
mov    $0x9,%edx
mov    $0x4,%ecx
xor    %r8d,%r8d
call   1050 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe9e(%rip),%rsi
call   1040 <strcat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CrashLog_LogCompiler>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%rdi
add    %rbx,%rdi
lea    0xeba(%rip),%rsi
mov    $0x9,%edx
mov    $0x4,%ecx
xor    %r8d,%r8d
call   1050 <sprintf@plt>
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <strcat@plt>

LLVM IR (-O0):
@.str = [24 x i8] c" Compiler: GCC %d.%d.%d\00"
@.str.1 = [11 x i8] c" \229.4.0\22\0A\0A\00"
define void @CrashLog_LogCompiler(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %3, i64 %6
%8 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 9, i32 4, i32 0)
%9 = load i8*, i8** %2
%10 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c" Compiler: GCC %d.%d.%d\00"
@.str.1 = [11 x i8] c" \229.4.0\22\0A\0A\00"
define void @CrashLog_LogCompiler(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 9, i32 4, i32 0)
%6 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mu_fail(char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ upper(char *);
void test_upper() {
  char text[10] = "Test Text";
  upper(text);
  do {
    if (!((strcmp(text, "TEST TEXT") == 0))) {
      mu_fail("test_uppper: text should be 'TEST TEXT'");
      return;
    }
  } while (0);
}


x86 assembly (clang, -O0):
<test_upper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0xa(%rbp)
mov    0xebe(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0xa(%rbp),%rdi
call   1040 <upper@plt>
lea    -0xa(%rbp),%rdi
lea    0xea8(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     1182 <test_upper+0x52>
lea    0xe9c(%rip),%rdi
call   1050 <mu_fail@plt>
jmp    1187 <test_upper+0x57>
jmp    1187 <test_upper+0x57>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_upper>:
push   %rbx
sub    $0x10,%rsp
movabs $0x7865542074736554,%rax
54 65 78
mov    %rax,(%rsp)
movw   $0x74,0x8(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <upper@plt>
lea    0xeae(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1175 <test_upper+0x45>
lea    0xea4(%rip),%rdi
call   1050 <mu_fail@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.test_upper.text = [10 x i8] c"Test Text\00"
@.str = [10 x i8] c"TEST TEXT\00"
@.str.1 = [40 x i8] c"test_uppper: text should be 'TEST TEXT'\00"
define void @test_upper() {
%1 = alloca [10 x i8]
%2 = bitcast [10 x i8]* %1 to i8*
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%4 = call i32 @upper(i8* %3)
br label %5
5: ; preds = %0
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %5
%10 = call i32 @mu_fail(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
br label %12
11: ; preds = %5
br label %12
12: ; preds = %9, %11
ret void
}

LLVM IR (-O2):
@__const.test_upper.text = [10 x i8] c"Test Text\00"
@.str = [10 x i8] c"TEST TEXT\00"
@.str.1 = [40 x i8] c"test_uppper: text should be 'TEST TEXT'\00"
define void @test_upper() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @upper(i8* %2)
%4 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 @mu_fail(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %0, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void ErrorGIFNotAvailable() {
  fprintf(stderr, "GIF support not compiled. Please install the libgif-dev "
                  "package before building.\n");
}


x86 assembly (clang, -O0):
<ErrorGIFNotAvailable>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ErrorGIFNotAvailable>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [82 x i8] c"GIF support not compiled. Please install the libgif-dev package before building.\0A\00"
define void @ErrorGIFNotAvailable() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [82 x i8] c"GIF support not compiled. Please install the libgif-dev package before building.\0A\00"
define void @ErrorGIFNotAvailable() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int yahoo_M1ObfuscatedTableCommon(int, int, unsigned char *);
int yahoo_f01_13(int Salt, int Parameter) {
  static unsigned char LUT[32] = {
      0x13, 0x08, 0x1E, 0x1D, 0x17, 0x16, 0x07, 0x1F, 0x0E, 0x03, 0x1A,
      0x19, 0x01, 0x12, 0x11, 0x10, 0x09, 0x0C, 0x0F, 0x14, 0x0B, 0x05,
      0x00, 0x04, 0x1C, 0x18, 0x0A, 0x15, 0x02, 0x1B, 0x06, 0x0D,
  };
  return yahoo_M1ObfuscatedTableCommon(Salt, Parameter, LUT);
}


x86 assembly (clang, -O0):
<yahoo_f01_13>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    0x2f05(%rip),%rdx
call   1030 <yahoo_M1ObfuscatedTableCommon@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_13>:
lea    0x2f19(%rip),%rdx
jmp    1030 <yahoo_M1ObfuscatedTableCommon@plt>

LLVM IR (-O0):
@yahoo_f01_13.LUT = internal global [32 x i8] c"\13\08\1E\1D\17\16\07\1F\0E\03\1A\19\01\12\11\10\09\0C\0F\14\0B\05\00\04\1C\18\0A\15\02\1B\06\0D"
define i32 @yahoo_f01_13(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @yahoo_M1ObfuscatedTableCommon(i32 %5, i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @yahoo_f01_13.LUT, i64 0, i64 0))
ret i32 %7
}

LLVM IR (-O2):
@yahoo_f01_13.LUT = internal global [32 x i8] c"\13\08\1E\1D\17\16\07\1F\0E\03\1A\19\01\12\11\10\09\0C\0F\14\0B\05\00\04\1C\18\0A\15\02\1B\06\0D"
define i32 @yahoo_f01_13(i32 %0, i32 %1) {
%3 = tail call i32 @yahoo_M1ObfuscatedTableCommon(i32 %0, i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @yahoo_f01_13.LUT, i64 0, i64 0))
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ TOP_LEVEL_linalgtests_test1_dps(int /*<<< orphan*/,
                                                   int /*<<< orphan*/,
                                                   int /*<<< orphan*/);
int /*<<< orphan*/ TOP_LEVEL_usecases_ba_test_ba_dps(int /*<<< orphan*/,
                                                     int /*<<< orphan*/,
                                                     int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  TOP_LEVEL_usecases_ba_test_ba_dps(0, 0, 0);
  printf("---linalg tests---\n");
  TOP_LEVEL_linalgtests_test1_dps(0, 0, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1050 <TOP_LEVEL_usecases_ba_test_ba_dps@plt>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1040 <TOP_LEVEL_linalgtests_test1_dps@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <TOP_LEVEL_usecases_ba_test_ba_dps@plt>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <TOP_LEVEL_linalgtests_test1_dps@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"---linalg tests---\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @TOP_LEVEL_usecases_ba_test_ba_dps(i32 0, i32 0, i32 0)
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @TOP_LEVEL_linalgtests_test1_dps(i32 0, i32 0, i32 0)
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"---linalg tests---\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @TOP_LEVEL_usecases_ba_test_ba_dps(i32 0, i32 0, i32 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @TOP_LEVEL_linalgtests_test1_dps(i32 0, i32 0, i32 0)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int pmh7_register_read(int /*<<< orphan*/);
uint8_t pmh7_register_read_bit(int16_t reg, uint8_t bit) {
  uint8_t val;
  val = pmh7_register_read(reg);
  return (val >> bit) & 1;
}


x86 assembly (clang, -O0):
<pmh7_register_read_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <pmh7_register_read@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmh7_register_read_bit>:
push   %rbx
mov    %esi,%ebx
call   1030 <pmh7_register_read@plt>
mov    %ebx,%ecx
shr    %cl,%eax
and    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @pmh7_register_read_bit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @pmh7_register_read(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = ashr i32 %8, %9
%11 = and i32 %10, 1
ret i32 %11
}

LLVM IR (-O2):
define i32 @pmh7_register_read_bit(i32 %0, i32 %1) {
%3 = tail call i32 @pmh7_register_read(i32 %0)
%4 = lshr i32 %3, %1
%5 = and i32 %4, 1
ret i32 %5
}
/* Variables and functions */
int *alloca(int);
int main() {
  int *x1 = alloca(sizeof(int));
  int *x2 = alloca(sizeof(int));
  while (*x1 <= 10) {
    *x2 = 10;
    while (*x2 > 1) {
      *x2 = *x2 - 1;
    }
    *x1 = *x1 + 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,-0x10(%rbp)
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0xa,(%rax)
jg     1187 <main+0x77>
mov    -0x18(%rbp),%rax
movl   $0xa,(%rax)
mov    -0x18(%rbp),%rax
cmpl   $0x1,(%rax)
jle    1173 <main+0x63>
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
sub    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    1152 <main+0x42>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    113b <main+0x2b>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,%rbx
mov    $0x4,%edi
call   1030 <alloca@plt>
cmpl   $0xa,(%rbx)
jg     1142 <main+0x32>
nopl   (%rax)
movl   $0x1,(%rax)
mov    (%rbx),%ecx
lea    0x1(%rcx),%edx
mov    %edx,(%rbx)
cmp    $0xa,%ecx
jl     1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32* @alloca(i32 4)
store i32* %4, i32** %2
%5 = call i32* @alloca(i32 4)
store i32* %5, i32** %3
br label %6
6: ; preds = %21, %0
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
%9 = icmp sle i32 %8, 10
br i1 %9, label %10, label %26
10: ; preds = %6
%11 = load i32*, i32** %3
store i32 10, i32* %11
br label %12
12: ; preds = %16, %10
%13 = load i32*, i32** %3
%14 = load i32, i32* %13
%15 = icmp sgt i32 %14, 1
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i32*, i32** %3
%18 = load i32, i32* %17
%19 = sub nsw i32 %18, 1
%20 = load i32*, i32** %3
store i32 %19, i32* %20
br label %12
21: ; preds = %12
%22 = load i32*, i32** %2
%23 = load i32, i32* %22
%24 = add nsw i32 %23, 1
%25 = load i32*, i32** %2
store i32 %24, i32* %25
br label %6
26: ; preds = %6
%27 = load i32, i32* %1
ret i32 %27
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @alloca(i32 4)
%2 = tail call i32* @alloca(i32 4)
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 11
br i1 %4, label %5, label %9
5: ; preds = %0, %5
store i32 1, i32* %2
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
%8 = icmp slt i32 %6, 10
br i1 %8, label %5, label %9
9: ; preds = %5, %0
ret i32 0
}
int main(int argc, char **argv) {
  int ret = 0;
  double bin1[] = {(double)3.9865557444897601e-105, (double)0.0};
  float bin2[] = {(float)1.81480400e-013, (float)0.0};
  ret += ((int *)bin1)[argc];
  ret += ((int *)bin2)[argc];
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    0xee0(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xedd(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x38(%rbp)
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
movslq -0x8(%rbp),%rax
mov    -0x38(%rbp,%rax,4),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movslq %edi,%rcx
lea    0xef6(%rip),%rdx
lea    0xeff(%rip),%rax
mov    (%rax,%rcx,4),%eax
add    (%rdx,%rcx,4),%eax
ret

LLVM IR (-O0):
@__const.main.bin1 = [2 x double] [double 0x2A42494C4741542A, double 0.000000e+00]
@__const.main.bin2 = [2 x float] [float 0x3D498A8540000000, float 0.000000e+00]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [2 x double]
%8 = alloca [2 x float]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%9 = bitcast [2 x double]* %7 to i8*
%10 = bitcast [2 x float]* %8 to i8*
%11 = getelementptr inbounds [2 x double], [2 x double]* %7, i64 0, i64 0
%12 = bitcast double* %11 to i32*
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = load i32, i32* %6
%18 = add nsw i32 %17, %16
store i32 %18, i32* %6
%19 = getelementptr inbounds [2 x float], [2 x float]* %8, i64 0, i64 0
%20 = bitcast float* %19 to i32*
%21 = load i32, i32* %4
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %20, i64 %22
%24 = load i32, i32* %23
%25 = load i32, i32* %6
%26 = add nsw i32 %25, %24
store i32 %26, i32* %6
%27 = load i32, i32* %6
ret i32 %27
}

LLVM IR (-O2):
@__const.main.bin1 = [2 x double] [double 0x2A42494C4741542A, double 0.000000e+00]
@__const.main.bin2 = [2 x float] [float 0x3D498A8540000000, float 0.000000e+00]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = sext i32 %0 to i64
%4 = getelementptr inbounds i32, i32* bitcast ([2 x double]* @__const.main.bin1 to i32*), i64 %3
%5 = load i32, i32* %4
%6 = getelementptr inbounds [2 x float], [2 x float]* @__const.main.bin2, i64 0, i64 %3
%7 = bitcast float* %6 to i32*
%8 = load i32, i32* %7
%9 = add nsw i32 %8, %5
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int readpasswd(char *);
int main() {
  char buf[16];
  if (readpasswd(buf) != -1) {
    printf("password is: %s\n", buf);
    return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <readpasswd@plt>
cmp    $0xffffffff,%eax
je     115d <main+0x3d>
lea    -0x20(%rbp),%rsi
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1164 <main+0x44>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    %rsp,%rdi
call   1030 <readpasswd@plt>
cmp    $0xffffffff,%eax
je     1147 <main+0x27>
lea    0xec8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret
mov    $0x1,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"password is: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%4 = call i32 @readpasswd(i8* %3)
%5 = icmp ne i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %7)
store i32 0, i32* %1
br label %10
9: ; preds = %0
store i32 1, i32* %1
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [17 x i8] c"password is: %s\0A\00"
define i32 @main() {
%1 = alloca [16 x i8]
%2 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%3 = call i32 @readpasswd(i8* %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %7
7: ; preds = %0, %5
%8 = phi i32 [ 0, %5 ], [ 1, %0 ]
ret i32 %8
}
/* Type definitions */
typedef scalar_t__ off_t;

/* Variables and functions */
int /*<<< orphan*/ move(scalar_t__, scalar_t__, scalar_t__);
void move_r_pos(off_t from, off_t len, off_t to) { move(from, from + len, to); }


x86 assembly (clang, -O0):
<move_r_pos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <move@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<move_r_pos>:
add    %rdi,%rsi
jmp    1030 <move@plt>

LLVM IR (-O0):
define void @move_r_pos(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = add nsw i64 %8, %9
%11 = load i64, i64* %6
%12 = call i32 @move(i64 %7, i64 %10, i64 %11)
ret void
}

LLVM IR (-O2):
define void @move_r_pos(i64 %0, i64 %1, i64 %2) {
%4 = add nsw i64 %1, %0
%5 = tail call i32 @move(i64 %0, i64 %4, i64 %2)
ret void
}
/* Variables and functions */
void *lwork(void const *, void *, size_t *, size_t,
            int (*)(void const *, void const *), int);
void *lsearch(const void *key, void *base, size_t *nelp, size_t width,
              int (*compar)(const void *, const void *)) {
  return (lwork(key, base, nelp, width, compar, 1));
}


x86 assembly (clang, -O0):
<lsearch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x1,%r9d
call   1030 <lwork@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lsearch>:
mov    $0x1,%r9d
jmp    1030 <lwork@plt>

LLVM IR (-O0):
define i8* @lsearch(i8* %0, i8* %1, i64* %2, i64 %3, i32 (i8*, i8*)* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64*
%9 = alloca i64
%10 = alloca i32 (i8*, i8*)*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i64* %2, i64** %8
store i64 %3, i64* %9
store i32 (i8*, i8*)* %4, i32 (i8*, i8*)** %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i64*, i64** %8
%14 = load i64, i64* %9
%15 = load i32 (i8*, i8*)*, i32 (i8*, i8*)** %10
%16 = call i8* @lwork(i8* %11, i8* %12, i64* %13, i64 %14, i32 (i8*, i8*)* %15, i32 1)
ret i8* %16
}

LLVM IR (-O2):
define i8* @lsearch(i8* %0, i8* %1, i64* %2, i64 %3, i32 (i8*, i8*)* %4) {
%6 = tail call i8* @lwork(i8* %0, i8* %1, i64* %2, i64 %3, i32 (i8*, i8*)* %4, i32 1)
ret i8* %6
}
/* Type definitions */
typedef size_t uint8_t;

/* Variables and functions */
uint8_t *vi_lvp(void *vi, uint8_t i) { return &(((uint8_t *)vi)[i]); }


x86 assembly (clang, -O0):
<vi_lvp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vi_lvp>:
lea    (%rdi,%rsi,8),%rax
ret

LLVM IR (-O0):
define i64* @vi_lvp(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %4
%8 = getelementptr inbounds i64, i64* %6, i64 %7
ret i64* %8
}

LLVM IR (-O2):
define i64* @vi_lvp(i8* readnone %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
%4 = getelementptr inbounds i64, i64* %3, i64 %1
ret i64* %4
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ daemonize();
int /*<<< orphan*/ get_options(int, char **);
int listening();
int /*<<< orphan*/ start_workers(int);
int main(int argc, char **argv) {
  get_options(argc, argv);
  int sock = listening();
  daemonize();
  start_workers(sock);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <get_options@plt>
mov    $0x0,%al
call   1030 <listening@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <daemonize@plt>
mov    -0x14(%rbp),%edi
call   1050 <start_workers@plt>
mov    0x2e5e(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
call   1060 <get_options@plt>
xor    %eax,%eax
call   1030 <listening@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <daemonize@plt>
mov    %ebx,%edi
call   1050 <start_workers@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @get_options(i32 %7, i8** %8)
%10 = call i32 (...) @listening()
store i32 %10, i32* %6
%11 = call i32 (...) @daemonize()
%12 = load i32, i32* %6
%13 = call i32 @start_workers(i32 %12)
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @get_options(i32 %0, i8** %1)
%4 = tail call i32 (...) @listening()
%5 = tail call i32 (...) @daemonize()
%6 = tail call i32 @start_workers(i32 %4)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
double calculate_average_minute(double monthly_bill, int total_minutes) {
  double average_cost = monthly_bill / total_minutes;
  return average_cost;
}


x86 assembly (clang, -O0):
<calculate_average_minute>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_average_minute>:
cvtsi2sd %edi,%xmm1
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @calculate_average_minute(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double
store double %0, double* %3
store i32 %1, i32* %4
%6 = load double, double* %3
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = fdiv double %6, %8
store double %9, double* %5
%10 = load double, double* %5
ret double %10
}

LLVM IR (-O2):
define double @calculate_average_minute(double %0, i32 %1) {
%3 = sitofp i32 %1 to double
%4 = fdiv double %0, %3
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ __NR_gettid;
int /*<<< orphan*/ syscall(int /*<<< orphan*/);
pid_t gettid_(void) { return syscall(__NR_gettid); }


x86 assembly (clang, -O0):
<gettid_>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettid_>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_gettid = global i32 0
define i32 @gettid_() {
%1 = load i32, i32* @__NR_gettid
%2 = call i32 @syscall(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@__NR_gettid = global i32 0
define i32 @gettid_() {
%1 = load i32, i32* @__NR_gettid
%2 = tail call i32 @syscall(i32 %1)
ret i32 %2
}
/* Variables and functions */
int _fib(int /*<<< orphan*/, int, int);
int fib(int n) { return _fib(0, 1, n); }


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <_fib@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
mov    %edi,%edx
xor    %edi,%edi
mov    $0x1,%esi
jmp    1030 <_fib@plt>

LLVM IR (-O0):
define i32 @fib(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_fib(i32 0, i32 1, i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = tail call i32 @_fib(i32 0, i32 1, i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ NetworkingLayersTest();
int /*<<< orphan*/ main_reader();
int /*<<< orphan*/ main_writer(char const **);
int main(int argc, const char *argv[]) {
  NetworkingLayersTest();
  return 1;
  if (argc - 1 == 4) {
    main_writer(argv);
  } else {
    main_reader();
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <NetworkingLayersTest@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <NetworkingLayersTest@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @NetworkingLayersTest()
ret i32 1
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @NetworkingLayersTest()
ret i32 1
}
/* Variables and functions */
void console_ignore_non_nlip(bool ignore) {}


x86 assembly (clang, -O0):
<console_ignore_non_nlip>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_ignore_non_nlip>:
ret

LLVM IR (-O0):
define void @console_ignore_non_nlip(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @console_ignore_non_nlip(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getNSGetExecutablePath(char *);
int /*<<< orphan*/ printf(char *);
int bar(void) {
  printf("-- libbar:bar() --\n");
  getNSGetExecutablePath((char *)"barLIb");
  return 0;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
call   1040 <getNSGetExecutablePath@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
call   1040 <getNSGetExecutablePath@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"-- libbar:bar() --\0A\00"
@.str.1 = [7 x i8] c"barLIb\00"
define i32 @bar() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @getNSGetExecutablePath(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"barLIb\00"
@str = [19 x i8] c"-- libbar:bar() --\00"
define i32 @bar() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @getNSGetExecutablePath(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
DIR *fdopendir(int __fd) {
  errno = ENOSYS;
  return NULL;
}


x86 assembly (clang, -O0):
<fdopendir>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec1(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdopendir>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32* @fdopendir(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32* null
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define noalias i32* @fdopendir(i32 %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32* null
}
/* Type definitions */
struct skynet_context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ context_dec();
int /*<<< orphan*/ skynet_context_grab(struct skynet_context *);
void skynet_context_reserve(struct skynet_context *ctx) {
  skynet_context_grab(ctx);
  context_dec();
}


x86 assembly (clang, -O0):
<skynet_context_reserve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <skynet_context_grab@plt>
mov    $0x0,%al
call   1030 <context_dec@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skynet_context_reserve>:
push   %rax
call   1040 <skynet_context_grab@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <context_dec@plt>

LLVM IR (-O0):
%struct.skynet_context = type { i32 }
define void @skynet_context_reserve(%struct.skynet_context* %0) {
%2 = alloca %struct.skynet_context*
store %struct.skynet_context* %0, %struct.skynet_context** %2
%3 = load %struct.skynet_context*, %struct.skynet_context** %2
%4 = call i32 @skynet_context_grab(%struct.skynet_context* %3)
%5 = call i32 (...) @context_dec()
ret void
}

LLVM IR (-O2):
%struct.skynet_context = type { i32 }
define void @skynet_context_reserve(%struct.skynet_context* %0) {
%2 = tail call i32 @skynet_context_grab(%struct.skynet_context* %0)
%3 = tail call i32 (...) @context_dec()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Msp430Adc12ImplP__CompareA1__fired();
void Msp430TimerCapComP__1__Compare__fired(void) {
  Msp430Adc12ImplP__CompareA1__fired();
}


x86 assembly (clang, -O0):
<Msp430TimerCapComP__1__Compare__fired>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Msp430Adc12ImplP__CompareA1__fired@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Msp430TimerCapComP__1__Compare__fired>:
xor    %eax,%eax
jmp    1030 <Msp430Adc12ImplP__CompareA1__fired@plt>

LLVM IR (-O0):
define void @Msp430TimerCapComP__1__Compare__fired() {
%1 = call i32 (...) @Msp430Adc12ImplP__CompareA1__fired()
ret void
}

LLVM IR (-O2):
define void @Msp430TimerCapComP__1__Compare__fired() {
%1 = tail call i32 (...) @Msp430Adc12ImplP__CompareA1__fired()
ret void
}
const char *getenv_nonempty(const char *var) { return ((void *)0); }


x86 assembly (clang, -O0):
<getenv_nonempty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getenv_nonempty>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @getenv_nonempty(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @getenv_nonempty(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ copyMat4(float *, float *);
int /*<<< orphan*/ hpm2DScaling(float, float, float *);
int /*<<< orphan*/ hpmMultMat4(float *, float *, float *);
void hpmScale2D(float scaleX, float scaleY, float *mat) {
  float scale[16], r[16];
  hpm2DScaling(scaleX, scaleY, scale);
  hpmMultMat4(scale, mat, r);
  copyMat4(mat, r);
}


x86 assembly (clang, -O0):
<hpmScale2D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1050 <hpm2DScaling@plt>
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x90(%rbp),%rdx
call   1030 <hpmMultMat4@plt>
mov    -0x10(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1040 <copyMat4@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hpmScale2D>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%rbx
lea    0x40(%rsp),%r14
mov    %r14,%rdi
call   1050 <hpm2DScaling@plt>
mov    %rsp,%r15
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1030 <hpmMultMat4@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <copyMat4@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @hpmScale2D(float %0, float %1, float* %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float*
%7 = alloca [16 x float]
%8 = alloca [16 x float]
store float %0, float* %4
store float %1, float* %5
store float* %2, float** %6
%9 = load float, float* %4
%10 = load float, float* %5
%11 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 0
%12 = call i32 @hpm2DScaling(float %9, float %10, float* %11)
%13 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 0
%14 = load float*, float** %6
%15 = getelementptr inbounds [16 x float], [16 x float]* %8, i64 0, i64 0
%16 = call i32 @hpmMultMat4(float* %13, float* %14, float* %15)
%17 = load float*, float** %6
%18 = getelementptr inbounds [16 x float], [16 x float]* %8, i64 0, i64 0
%19 = call i32 @copyMat4(float* %17, float* %18)
ret void
}

LLVM IR (-O2):
define void @hpmScale2D(float %0, float %1, float* %2) {
%4 = alloca [16 x float]
%5 = alloca [16 x float]
%6 = bitcast [16 x float]* %4 to i8*
%7 = bitcast [16 x float]* %5 to i8*
%8 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 0
%9 = call i32 @hpm2DScaling(float %0, float %1, float* %8)
%10 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 0
%11 = call i32 @hpmMultMat4(float* %8, float* %2, float* %10)
%12 = call i32 @copyMat4(float* %2, float* %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void Eeof(void) { error("Premature EOF"); }


x86 assembly (clang, -O0):
<Eeof>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <error@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Eeof>:
lea    0xee9(%rip),%rdi
jmp    1030 <error@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Premature EOF\00"
define void @Eeof() {
%1 = call i32 @error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Premature EOF\00"
define void @Eeof() {
%1 = tail call i32 @error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gameframe();
void zresmstep(void) { gameframe(); }


x86 assembly (clang, -O0):
<zresmstep>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <gameframe@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<zresmstep>:
xor    %eax,%eax
jmp    1030 <gameframe@plt>

LLVM IR (-O0):
define void @zresmstep() {
%1 = call i32 (...) @gameframe()
ret void
}

LLVM IR (-O2):
define void @zresmstep() {
%1 = tail call i32 (...) @gameframe()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(unsigned char, unsigned int);
void nsp32_write1(unsigned int base, unsigned int index, unsigned char val) {
  outb(val, (base + index));
}


x86 assembly (clang, -O0):
<nsp32_write1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    -0x4(%rbp),%esi
add    -0x8(%rbp),%esi
movzbl %al,%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsp32_write1>:
add    %edi,%esi
mov    %edx,%edi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @nsp32_write1(i32 %0, i32 %1, i8 zeroext %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%7 = load i8, i8* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = add i32 %8, %9
%11 = call i32 @outb(i8 zeroext %7, i32 %10)
ret void
}

LLVM IR (-O2):
define void @nsp32_write1(i32 %0, i32 %1, i8 zeroext %2) {
%4 = add i32 %1, %0
%5 = tail call i32 @outb(i8 zeroext %2, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void AbortIfMemoryAllocationFailed(void *ptr, char *whatIsNotAllocated,
                                   char *message) {
  if (ptr == NULL) {
    fprintf(stderr, "\nFatal ERROR while allocating memory for: %s.",
            whatIsNotAllocated);
    fprintf(stderr, message);
    abort();
  }
}


x86 assembly (clang, -O0):
<AbortIfMemoryAllocationFailed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1175 <AbortIfMemoryAllocationFailed+0x55>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xead(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AbortIfMemoryAllocationFailed>:
test   %rdi,%rdi
je     1126 <AbortIfMemoryAllocationFailed+0x6>
ret
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%rdx
mov    0x2ea9(%rip),%r14
mov    (%r14),%edi
lea    0xebf(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [46 x i8] c"\0AFatal ERROR while allocating memory for: %s.\00"
define void @AbortIfMemoryAllocationFailed(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %17
9: ; preds = %3
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %5
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i32, i32* @stderr
%14 = load i8*, i8** %6
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* %14)
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %3
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [46 x i8] c"\0AFatal ERROR while allocating memory for: %s.\00"
define void @AbortIfMemoryAllocationFailed(i8* readnone %0, i8* %1, i8* %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %5, label %11
5: ; preds = %3
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %1)
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* %2)
%10 = tail call i32 (...) @abort()
unreachable
11: ; preds = %3
ret void
}
/* Variables and functions */
unsigned long GetPos71();
unsigned long getpos() { return GetPos71(); }


x86 assembly (clang, -O0):
<getpos>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <GetPos71@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpos>:
xor    %eax,%eax
jmp    1030 <GetPos71@plt>

LLVM IR (-O0):
define i64 @getpos() {
%1 = call i64 (...) @GetPos71()
ret i64 %1
}

LLVM IR (-O2):
define i64 @getpos() {
%1 = tail call i64 (...) @GetPos71()
ret i64 %1
}
void test_PTHREAD_MUTEX_RECURSIVE(void) {
  int dummy = "PTHREAD_MUTEX_RECURSIVE";
}


x86 assembly (clang, -O0):
<test_PTHREAD_MUTEX_RECURSIVE>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_PTHREAD_MUTEX_RECURSIVE>:
ret

LLVM IR (-O0):
@.str = [24 x i8] c"PTHREAD_MUTEX_RECURSIVE\00"
define void @test_PTHREAD_MUTEX_RECURSIVE() {
%1 = alloca i32
store i32 ptrtoint ([24 x i8]* @.str to i32), i32* %1
ret void
}

LLVM IR (-O2):
define void @test_PTHREAD_MUTEX_RECURSIVE() {
ret void
}
void vec4_inverse(float *dst) {
  dst[0] = 1.0 / dst[0];
  dst[1] = 1.0 / dst[1];
  dst[2] = 1.0 / dst[2];
  dst[3] = 1.0 / dst[3];
}


x86 assembly (clang, -O0):
<vec4_inverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee4(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xebf(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe99(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe73(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec4_inverse>:
movups (%rdi),%xmm0
movaps 0xef6(%rip),%xmm1
divps  %xmm0,%xmm1
movups %xmm1,(%rdi)
ret

LLVM IR (-O0):
define void @vec4_inverse(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
%6 = fpext float %5 to double
%7 = fdiv double 1.000000e+00, %6
%8 = fptrunc double %7 to float
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 0
store float %8, float* %10
%11 = load float*, float** %2
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = fpext float %13 to double
%15 = fdiv double 1.000000e+00, %14
%16 = fptrunc double %15 to float
%17 = load float*, float** %2
%18 = getelementptr inbounds float, float* %17, i64 1
store float %16, float* %18
%19 = load float*, float** %2
%20 = getelementptr inbounds float, float* %19, i64 2
%21 = load float, float* %20
%22 = fpext float %21 to double
%23 = fdiv double 1.000000e+00, %22
%24 = fptrunc double %23 to float
%25 = load float*, float** %2
%26 = getelementptr inbounds float, float* %25, i64 2
store float %24, float* %26
%27 = load float*, float** %2
%28 = getelementptr inbounds float, float* %27, i64 3
%29 = load float, float* %28
%30 = fpext float %29 to double
%31 = fdiv double 1.000000e+00, %30
%32 = fptrunc double %31 to float
%33 = load float*, float** %2
%34 = getelementptr inbounds float, float* %33, i64 3
store float %32, float* %34
ret void
}

LLVM IR (-O2):
define void @vec4_inverse(float* nocapture %0) {
%2 = bitcast float* %0 to <4 x float>*
%3 = load <4 x float>, <4 x float>* %2
%4 = fdiv <4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>, %3
%5 = bitcast float* %0 to <4 x float>*
store <4 x float> %4, <4 x float>* %5
ret void
}
void suborbital(double altitude, double speed) { float g = 0.096; }


x86 assembly (clang, -O0):
<suborbital>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movss  0xeea(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<suborbital>:
ret

LLVM IR (-O0):
define void @suborbital(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca float
store double %0, double* %3
store double %1, double* %4
store float 0x3FB89374C0000000, float* %5
ret void
}

LLVM IR (-O2):
define void @suborbital(double %0, double %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gds_swap2bytes(unsigned char *);
int /*<<< orphan*/ write(int, short *, int);
void gds_write_path(int fd) {
  static short int count, token;
  count = 4;
  gds_swap2bytes((unsigned char *)&count);
  write(fd, &count, 2);
  token = 0x0900;
  gds_swap2bytes((unsigned char *)&token);
  write(fd, &token, 2);
}


x86 assembly (clang, -O0):
<gds_write_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movw   $0x4,0x2efe(%rip)
lea    0x2ef7(%rip),%rdi
call   1040 <gds_swap2bytes@plt>
mov    -0x4(%rbp),%edi
lea    0x2ee8(%rip),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
movw   $0x900,0x2ed7(%rip)
lea    0x2ed0(%rip),%rdi
call   1040 <gds_swap2bytes@plt>
mov    -0x4(%rbp),%edi
lea    0x2ec1(%rip),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gds_write_path>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
movw   $0x4,0x2f03(%rip)
lea    0x2efc(%rip),%r14
mov    %r14,%rdi
call   1040 <gds_swap2bytes@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x2,%edx
call   1030 <write@plt>
movw   $0x900,0x2ede(%rip)
lea    0x2ed7(%rip),%r14
mov    %r14,%rdi
call   1040 <gds_swap2bytes@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x2,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <write@plt>

LLVM IR (-O0):
@gds_write_path.count = internal global i16 0
@gds_write_path.token = internal global i16 0
define void @gds_write_path(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
store i16 4, i16* @gds_write_path.count
%3 = call i32 @gds_swap2bytes(i8* bitcast (i16* @gds_write_path.count to i8*))
%4 = load i32, i32* %2
%5 = call i32 @write(i32 %4, i16* @gds_write_path.count, i32 2)
store i16 2304, i16* @gds_write_path.token
%6 = call i32 @gds_swap2bytes(i8* bitcast (i16* @gds_write_path.token to i8*))
%7 = load i32, i32* %2
%8 = call i32 @write(i32 %7, i16* @gds_write_path.token, i32 2)
ret void
}

LLVM IR (-O2):
@gds_write_path.count = internal global i16 0
@gds_write_path.token = internal global i16 0
define void @gds_write_path(i32 %0) {
store i16 4, i16* @gds_write_path.count
%2 = tail call i32 @gds_swap2bytes(i8* bitcast (i16* @gds_write_path.count to i8*))
%3 = tail call i32 @write(i32 %0, i16* @gds_write_path.count, i32 2)
store i16 2304, i16* @gds_write_path.token
%4 = tail call i32 @gds_swap2bytes(i8* bitcast (i16* @gds_write_path.token to i8*))
%5 = tail call i32 @write(i32 %0, i16* @gds_write_path.token, i32 2)
ret void
}