xunge/DecIR huggingface dataset:
void path_006_expected_5(int a, int b, int c) {
  if (a) {
    return;
  }
  if (b) {
  }
  if (c) {
  }
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     111c <path_006_expected_5+0x1c>
jmp    113a <path_006_expected_5+0x3a>
cmpl   $0x0,-0x8(%rbp)
je     112b <path_006_expected_5+0x2b>
jmp    112b <path_006_expected_5+0x2b>
cmpl   $0x0,-0xc(%rbp)
je     113a <path_006_expected_5+0x3a>
jmp    113a <path_006_expected_5+0x3a>
pop    %rbp
ret

x86 assembly (clang, -O2):
ret

LLVM IR (-O0):
define void @path_006_expected_5(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %3
br label %18
10: ; preds = %3
%11 = load i32, i32* %5
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %10
br label %14
14: ; preds = %13, %10
%15 = load i32, i32* %6
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %14
br label %18
18: ; preds = %9, %17, %14
ret void
}

LLVM IR (-O2):
define void @path_006_expected_5(i32 %0, i32 %1, i32 %2) {
ret void
}
int test_imm_7Auint16_reg(unsigned short val) {
  return ((val) & (0x7A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_7Auint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x7a,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_7Auint16_reg>:
test   $0x7a,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_7Auint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 122
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_7Auint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 122
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned xrop3_54_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D | T;
  stk1 = S ^ stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_54_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_54_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
lea    (%rcx,%rsi,1),%edx
or     $0xff,%ecx
xor    %eax,%ecx
not    %edx
or     %eax,%edx
and    %ecx,%edx
not    %eax
and    %esi,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_54_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %7
%24 = or i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %6
%26 = load i32, i32* %9
%27 = xor i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = load i32, i32* %6
%30 = and i32 %28, %29
%31 = load i32, i32* %8
%32 = load i32, i32* %7
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = or i32 %30, %34
%36 = load i32, i32* %7
%37 = load i32, i32* %6
%38 = xor i32 %37, -1
%39 = and i32 %36, %38
%40 = load i32, i32* %5
%41 = and i32 %39, %40
%42 = or i32 %35, %41
ret i32 %42
}

LLVM IR (-O2):
define i32 @xrop3_54_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = or i32 %6, %5
%8 = or i32 %6, 255
%9 = xor i32 %8, %4
%10 = xor i32 %7, -1
%11 = or i32 %4, %10
%12 = and i32 %9, %11
%13 = xor i32 %4, -1
%14 = and i32 %13, %5
%15 = or i32 %12, %14
ret i32 %15
}
int main() {
  int a = 42;
  int b = 54;
  while (a != b) {
    if (a > b) {
      a -= b;
    } else {
      b -= a;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x2a,-0x8(%rbp)
movl   $0x36,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1151 <main+0x51>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1141 <main+0x41>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    114c <main+0x4c>
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <main+0x19>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ execve(char *, int /*<<< orphan*/ *, char **);
int main(int argc, char **argv, char **envp) {
  char *null_filename = NULL;
  execve(null_filename, NULL, NULL);
  execve("../../tests/true", NULL, envp);
  assert(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1030 <execve@plt>
mov    -0x18(%rbp),%rdx
lea    0xeaa(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <execve@plt>
xor    %edi,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rdx,%rbx
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <execve@plt>
lea    0xeca(%rip),%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <execve@plt>
xor    %edi,%edi
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"../../tests/true\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
%7 = alloca i8*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
store i8* null, i8** %7
%8 = load i8*, i8** %7
%9 = call i32 @execve(i8* %8, i32* null, i8** null)
%10 = load i8**, i8*** %6
%11 = call i32 @execve(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32* null, i8** %10)
%12 = call i32 @assert(i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"../../tests/true\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** %2) {
%4 = tail call i32 @execve(i8* null, i32* null, i8** null)
%5 = tail call i32 @execve(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32* null, i8** %2)
%6 = tail call i32 @assert(i32 0)
ret i32 0
}
void VP8YUVInitSSE2(void) {}


x86 assembly (clang, -O0):
<VP8YUVInitSSE2>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @VP8YUVInitSSE2() {
ret void
}

LLVM IR (-O2):
define void @VP8YUVInitSSE2() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ CONF_IMODULE;

/* Variables and functions */
int /*<<< orphan*/ OBJ_cleanup();
void oid_module_finish(CONF_IMODULE *md) { OBJ_cleanup(); }


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

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

LLVM IR (-O0):
define void @oid_module_finish(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 (...) @OBJ_cleanup()
ret void
}

LLVM IR (-O2):
define void @oid_module_finish(i32* nocapture readnone %0) {
%2 = tail call i32 (...) @OBJ_cleanup()
ret void
}
void clock_init(void) {
  (*(volatile unsigned *)0x4c000000) = 0xffffffff;
  (*(volatile unsigned *)0x4c000004) = (0x5c << 12) | (1 << 4) | 1;
  (*(volatile unsigned *)0x4c000014) = 0x5;
}


x86 assembly (clang, -O0):
<clock_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4c000000,%eax
movl   $0xffffffff,(%rax)
mov    $0x4c000004,%eax
movl   $0x5c011,(%rax)
mov    $0x4c000014,%eax
movl   $0x5,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock_init>:
movl   $0xffffffff,0x4c000000
ff ff ff ff
movl   $0x5c011,0x4c000004
movl   $0x5,0x4c000014
ret

LLVM IR (-O0):
define void @clock_init() {
store volatile i32 -1, i32* inttoptr (i64 1275068416 to i32*)
store volatile i32 376849, i32* inttoptr (i64 1275068420 to i32*)
store volatile i32 5, i32* inttoptr (i64 1275068436 to i32*)
ret void
}

LLVM IR (-O2):
define void @clock_init() {
store volatile i32 -1, i32* inttoptr (i64 1275068416 to i32*)
store volatile i32 376849, i32* inttoptr (i64 1275068420 to i32*)
store volatile i32 5, i32* inttoptr (i64 1275068436 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eeconfig_init_user();
int /*<<< orphan*/ eeconfig_update_kb(int /*<<< orphan*/);
__attribute__((weak)) void eeconfig_init_kb(void) {
  eeconfig_update_kb(0);
  eeconfig_init_user();
}


x86 assembly (clang, -O0):
<eeconfig_init_kb>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <eeconfig_update_kb@plt>
mov    $0x0,%al
call   1040 <eeconfig_init_user@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eeconfig_init_kb>:
push   %rax
xor    %edi,%edi
call   1030 <eeconfig_update_kb@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <eeconfig_init_user@plt>

LLVM IR (-O0):
define weak void @eeconfig_init_kb() {
%1 = call i32 @eeconfig_update_kb(i32 0)
%2 = call i32 (...) @eeconfig_init_user()
ret void
}

LLVM IR (-O2):
define weak void @eeconfig_init_kb() {
%1 = tail call i32 @eeconfig_update_kb(i32 0)
%2 = tail call i32 (...) @eeconfig_init_user()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void cwde() { put8(0x98); }


x86 assembly (clang, -O0):
<cwde>:
push   %rbp
mov    %rsp,%rbp
mov    $0x98,%edi
call   1030 <put8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cwde>:
mov    $0x98,%edi
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @cwde() {
%1 = call i32 @put8(i32 152)
ret void
}

LLVM IR (-O2):
define void @cwde() {
%1 = tail call i32 @put8(i32 152)
ret void
}
double addfl(double a, double b) { return a + b; }


x86 assembly (clang, -O0):
<addfl>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<addfl>:
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @addfl(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fadd double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @addfl(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_5260() {
  Assert_real((isqrt(5260) == 72),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              1380, ("Integer square root of 5260 should be 72"));
}


x86 assembly (clang, -O0):
<t_sqrt_5260>:
push   %rbp
mov    %rsp,%rbp
mov    $0x148c,%edi
call   1030 <isqrt@plt>
cmp    $0x48,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x564,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_5260>:
push   %rax
mov    $0x148c,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x48,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x564,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 5260 should be 72\00"
define void @t_sqrt_5260() {
%1 = call i32 @isqrt(i32 5260)
%2 = icmp eq i32 %1, 72
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1380, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 5260 should be 72\00"
define void @t_sqrt_5260() {
%1 = tail call i32 @isqrt(i32 5260)
%2 = icmp eq i32 %1, 72
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1380, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void mixedSignedness8(unsigned a) {
  unsigned min = 0;
  clang_analyzer_eval(a <= min);
  clang_analyzer_eval((a + 2) <= min);
  clang_analyzer_eval((a + 2U) <= min);
}


x86 assembly (clang, -O0):
<mixedSignedness8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixedSignedness8>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %edi,%edi
test   %ebx,%ebx
sete   %dil
call   1030 <clang_analyzer_eval@plt>
xor    %ebp,%ebp
cmp    $0xfffffffe,%ebx
sete   %bpl
mov    %ebp,%edi
call   1030 <clang_analyzer_eval@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @mixedSignedness8(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp ule i32 %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
%9 = load i32, i32* %2
%10 = add i32 %9, 2
%11 = load i32, i32* %3
%12 = icmp ule i32 %10, %11
%13 = zext i1 %12 to i32
%14 = call i32 @clang_analyzer_eval(i32 %13)
%15 = load i32, i32* %2
%16 = add i32 %15, 2
%17 = load i32, i32* %3
%18 = icmp ule i32 %16, %17
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
ret void
}

LLVM IR (-O2):
define void @mixedSignedness8(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
%5 = icmp eq i32 %0, -2
%6 = zext i1 %5 to i32
%7 = tail call i32 @clang_analyzer_eval(i32 %6)
%8 = tail call i32 @clang_analyzer_eval(i32 %6)
ret void
}
/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int openat(int const, char const *const, int const);
int our_openat(const int dirfd, const char *const path, const int flags) {
  do {
    const int fd = openat(dirfd, path, flags);
    if (fd != -1) {
      return fd;
    }
  } while (errno == EINTR);
  return -1;
}


x86 assembly (clang, -O0):
<our_openat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <openat@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
je     1149 <our_openat+0x39>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116f <our_openat+0x5f>
jmp    114e <our_openat+0x3e>
mov    0x2e8b(%rip),%rax
mov    (%rax),%rax
mov    0x2e79(%rip),%rcx
cmp    (%rcx),%rax
je     1122 <our_openat+0x12>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<our_openat>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2eb9(%rip),%r15
mov    0x2eaa(%rip),%r12
xchg   %ax,%ax
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <openat@plt>
cmp    $0xffffffff,%eax
jne    114b <our_openat+0x3b>
mov    (%r15),%rcx
cmp    (%r12),%rcx
je     1130 <our_openat+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
define i32 @our_openat(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
br label %9
9: ; preds = %19, %3
%10 = load i32, i32* %5
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = call i32 @openat(i32 %10, i8* %11, i32 %12)
store i32 %13, i32* %8
%14 = load i32, i32* %8
%15 = icmp ne i32 %14, -1
br i1 %15, label %16, label %18
16: ; preds = %9
%17 = load i32, i32* %8
store i32 %17, i32* %4
br label %24
18: ; preds = %9
br label %19
19: ; preds = %18
%20 = load i64, i64* @errno
%21 = load i64, i64* @EINTR
%22 = icmp eq i64 %20, %21
br i1 %22, label %9, label %23
23: ; preds = %19
store i32 -1, i32* %4
br label %24
24: ; preds = %23, %16
%25 = load i32, i32* %4
ret i32 %25
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @our_openat(i32 %0, i8* %1, i32 %2) {
br label %4
4: ; preds = %7, %3
%5 = tail call i32 @openat(i32 %0, i8* %1, i32 %2)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load i64, i64* @errno
%9 = load i64, i64* @EINTR
%10 = icmp eq i64 %8, %9
br i1 %10, label %4, label %11
11: ; preds = %4, %7
ret i32 %5
}
void isakmp_ph2expire_stub(p) void *p;
{ isakmp_ph2expire((struct ph2handle *)p); }


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

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

LLVM IR (-O0):
%struct.ph2handle = type opaque
define void @isakmp_ph2expire_stub(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.ph2handle*
%5 = call i32 (%struct.ph2handle*, ...) bitcast (i32 (...)* @isakmp_ph2expire to i32 (%struct.ph2handle*, ...)*)(%struct.ph2handle* %4)
ret void
}

LLVM IR (-O2):
%struct.ph2handle = type opaque
define void @isakmp_ph2expire_stub(i8* %0) {
%2 = bitcast i8* %0 to %struct.ph2handle*
%3 = tail call i32 (%struct.ph2handle*, ...) bitcast (i32 (...)* @isakmp_ph2expire to i32 (%struct.ph2handle*, ...)*)(%struct.ph2handle* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ permute(char *, int /*<<< orphan*/, scalar_t__);
scalar_t__ strlen(char *);
int main() {
  char *s = "abcd";
  permute(s, 0, strlen(s) - 1);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %rax,%rdx
sub    $0x1,%rdx
xor    %esi,%esi
call   1030 <permute@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x3,%edx
xor    %esi,%esi
call   1030 <permute@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"abcd\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = sub nsw i64 %5, 1
%7 = call i32 @permute(i8* %3, i32 0, i64 %6)
ret i32 1
}

LLVM IR (-O2):
@.str = [5 x i8] c"abcd\00"
define i32 @main() {
%1 = tail call i32 @permute(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0, i64 3)
ret i32 1
}
void foo761() {}


x86 assembly (clang, -O0):
<foo761>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo761() {
ret void
}

LLVM IR (-O2):
define void @foo761() {
ret void
}
void ble_rsp_flash_ps_erase_all(const void *nul) {}


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

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

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

LLVM IR (-O2):
define void @ble_rsp_flash_ps_erase_all(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void __attribute__((destructor)) libtest2_dtor(void) {
  printf("libtest2: destructor!\n");
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"libtest2: destructor!\0A\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @libtest2_dtor, i8* null }]
define void @libtest2_dtor() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @libtest2_dtor, i8* null }]
@str = [22 x i8] c"libtest2: destructor!\00"
define void @libtest2_dtor() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int main() {
  char *a = (char *)malloc(15);
  free(a);
  a[0] = 1;
  free(a);
  exit(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xf,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
movb   $0x1,(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xf,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <free@plt>
movb   $0x1,(%rbx)
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i64 @malloc(i32 15)
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @free(i8* %5)
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 0
store i8 1, i8* %8
%9 = load i8*, i8** %2
%10 = call i32 @free(i8* %9)
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 15)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @free(i8* %2)
store i8 1, i8* %2
%4 = tail call i32 @free(i8* %2)
%5 = tail call i32 @exit(i32 0)
unreachable
}
int __eqdf2(double a __attribute__((unused)),
            double b __attribute__((unused))) {
  return 0;
}


x86 assembly (clang, -O0):
<__eqdf2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @__eqdf2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @__eqdf2(double %0, double %1) {
ret i32 0
}
/* Variables and functions */
scalar_t__ copy(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char readfileName[] = "origin.txt";
  char writefileName[] = "destiny.txt";
  if (copy(readfileName, writefileName)) {
    printf("%s\n", "Copied");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0xf(%rbp)
mov    0xec7(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xebf(%rip),%al
mov    %al,-0x5(%rbp)
mov    0xeb6(%rip),%rax
mov    %rax,-0x1b(%rbp)
mov    0xeb4(%rip),%eax
mov    %eax,-0x13(%rbp)
lea    -0xf(%rbp),%rdi
lea    -0x1b(%rbp),%rsi
call   1040 <copy@plt>
cmp    $0x0,%rax
je     118c <main+0x6c>
lea    0xe97(%rip),%rdi
lea    0xe94(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movabs $0x742e6e696769726f,%rax
6e 2e 74
mov    %rax,0x8(%rsp)
movl   $0x747874,0xf(%rsp)
movabs $0x2e796e6974736564,%rax
6e 79 2e
mov    %rax,0x18(%rsp)
movl   $0x747874,0x20(%rsp)
lea    0x8(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1040 <copy@plt>
test   %rax,%rax
je     1179 <main+0x59>
lea    0xeaa(%rip),%rdi
lea    0xea7(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.readfileName = [11 x i8] c"origin.txt\00"
@__const.main.writefileName = [12 x i8] c"destiny.txt\00"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [7 x i8] c"Copied\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i8]
%3 = alloca [12 x i8]
store i32 0, i32* %1
%4 = bitcast [11 x i8]* %2 to i8*
%5 = bitcast [12 x i8]* %3 to i8*
%6 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%8 = call i64 @copy(i8* %6, i8* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %0
ret i32 0
}

LLVM IR (-O2):
@__const.main.readfileName = [11 x i8] c"origin.txt\00"
@__const.main.writefileName = [12 x i8] c"destiny.txt\00"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [7 x i8] c"Copied\00"
define i32 @main() {
%1 = alloca [11 x i8]
%2 = alloca [12 x i8]
%3 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%5 = call i64 @copy(i8* %3, i8* %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
ret i32 0
}
/* Variables and functions */
char *Tut_Malloc(size_t);
int /*<<< orphan*/ strcpy(char *, char const *);
size_t strlen(char const *);
char *Tut_Strdup(const char *string) {
  size_t length = strlen(string);
  char *str = Tut_Malloc(length + 1);
  strcpy(str, string);
  return str;
}


x86 assembly (clang, -O0):
<Tut_Strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1050 <Tut_Malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Tut_Strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <Tut_Malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @Tut_Strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = add i64 %7, 1
%9 = call i8* @Tut_Malloc(i64 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i8*, i8** %2
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
define i8* @Tut_Strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i8* @Tut_Malloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ my_putstr(int /*<<< orphan*/);
void my_ptr_putstr(char **str) {
  while (*str != 0)
    my_putstr(*str++);
}


x86 assembly (clang, -O0):
<my_ptr_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1148 <my_ptr_putstr+0x38>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%rax
mov    %eax,%edi
call   1030 <my_putstr@plt>
jmp    111c <my_ptr_putstr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_ptr_putstr>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1131 <my_ptr_putstr+0x21>
add    $0x8,%rbx
call   1030 <my_putstr@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1120 <my_ptr_putstr+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @my_ptr_putstr(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
br label %3
3: ; preds = %7, %1
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i8**, i8*** %2
%9 = getelementptr inbounds i8*, i8** %8, i32 1
store i8** %9, i8*** %2
%10 = load i8*, i8** %8
%11 = ptrtoint i8* %10 to i32
%12 = call i32 @my_putstr(i32 %11)
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @my_ptr_putstr(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %11, %4 ], [ %2, %1 ]
%6 = phi i8** [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = ptrtoint i8* %5 to i64
%9 = trunc i64 %8 to i32
%10 = tail call i32 @my_putstr(i32 %9)
%11 = load i8*, i8** %7
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ getline(char **, int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
char *readInput() {
  char *result = 0;
  ssize_t bufsize = 0;
  getline(&result, &bufsize, stdin);
  return result;
}


x86 assembly (clang, -O0):
<readInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <getline@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readInput>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
mov    0x2ebc(%rip),%rax
mov    (%rax),%edx
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1030 <getline@plt>
mov    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@stdin = global i32 0
define i8* @readInput() {
%1 = alloca i8*
%2 = alloca i32
store i8* null, i8** %1
store i32 0, i32* %2
%3 = load i32, i32* @stdin
%4 = call i32 @getline(i8** %1, i32* %2, i32 %3)
%5 = load i8*, i8** %1
ret i8* %5
}

LLVM IR (-O2):
@stdin = global i32 0
define i8* @readInput() {
%1 = alloca i8*
%2 = alloca i32
%3 = bitcast i8** %1 to i8*
store i8* null, i8** %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = load i32, i32* @stdin
%6 = call i32 @getline(i8** %1, i32* %2, i32 %5)
%7 = load i8*, i8** %1
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ narcissistic(int);
int main() {
  narcissistic(20000);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @narcissistic(i32 20000)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @narcissistic(i32 20000)
ret i32 0
}
/* Variables and functions */
int code_table_4_0(unsigned char **);
scalar_t__ uint2(unsigned char *);
int mode_number(unsigned char **sec) {
  int pdt;
  pdt = code_table_4_0(sec);
  if (pdt == 57)
    return (int)uint2(sec[4] + 15);
  return -1;
}


x86 assembly (clang, -O0):
<mode_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <code_table_4_0@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x39,-0x14(%rbp)
jne    115b <mode_number+0x3b>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
add    $0xf,%rdi
call   1030 <uint2@plt>
mov    %eax,-0x4(%rbp)
jmp    1162 <mode_number+0x42>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mode_number>:
push   %rbx
mov    %rdi,%rbx
call   1040 <code_table_4_0@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x39,%ecx
jne    1142 <mode_number+0x22>
mov    0x20(%rbx),%rdi
add    $0xf,%rdi
call   1030 <uint2@plt>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mode_number(i8** %0) {
%2 = alloca i32
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
%5 = load i8**, i8*** %3
%6 = call i32 @code_table_4_0(i8** %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 57
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = load i8**, i8*** %3
%11 = getelementptr inbounds i8*, i8** %10, i64 4
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8, i8* %12, i64 15
%14 = call i64 @uint2(i8* %13)
%15 = trunc i64 %14 to i32
store i32 %15, i32* %2
br label %17
16: ; preds = %1
store i32 -1, i32* %2
br label %17
17: ; preds = %16, %9
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @mode_number(i8** %0) {
%2 = tail call i32 @code_table_4_0(i8** %0)
%3 = icmp eq i32 %2, 57
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = getelementptr inbounds i8*, i8** %0, i64 4
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8, i8* %6, i64 15
%8 = tail call i64 @uint2(i8* %7)
%9 = trunc i64 %8 to i32
br label %10
10: ; preds = %1, %4
%11 = phi i32 [ %9, %4 ], [ -1, %1 ]
ret i32 %11
}
int max(int x, int y) {
  int z;
  extern A;
  z = x > y ? x : y;
  A++;
  return z;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1127 <max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2eb4(%rip),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    0x2ea8(%rip),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
mov    0x2eda(%rip),%rcx
addl   $0x1,(%rcx)
ret

LLVM IR (-O0):
@A = external global i32
define i32 @max(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 = load i32, i32* %4
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %4
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
store i32 %14, i32* %5
%15 = load i32, i32* @A
%16 = add nsw i32 %15, 1
store i32 %16, i32* @A
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@A = external global i32
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
%5 = load i32, i32* @A
%6 = add nsw i32 %5, 1
store i32 %6, i32* @A
ret i32 %4
}
void X509_CERT_AUX_free(void) {}


x86 assembly (clang, -O0):
<X509_CERT_AUX_free>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @X509_CERT_AUX_free() {
ret void
}

LLVM IR (-O2):
define void @X509_CERT_AUX_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fz_isbigendian();
void fz_accelerate(void) {
  if (sizeof(int) == 4 && sizeof(unsigned int) == 4 && !fz_isbigendian()) {
  }
}


x86 assembly (clang, -O0):
<fz_accelerate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <fz_isbigendian@plt>
cmp    $0x0,%eax
jne    1129 <fz_accelerate+0x19>
jmp    1129 <fz_accelerate+0x19>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @fz_accelerate() {
%1 = call i32 (...) @fz_isbigendian()
%2 = icmp ne i32 %1, 0
br i1 %2, label %4, label %3
3: ; preds = %0
br label %4
4: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @fz_accelerate() {
%1 = tail call i32 (...) @fz_isbigendian()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
int /*<<< orphan*/ sleep(int);
int main(int argc, char **args) {
  printf("REPORT %s:%s\n", "127.0.0.1", "80");
  while (1)
    sleep(1);
  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)
lea    0xec3(%rip),%rdi
lea    0xeca(%rip),%rsi
lea    0xecd(%rip),%rdx
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1150 <main+0x30>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xedf(%rip),%rsi
lea    0xee2(%rip),%rdx
call   1030 <printf@plt>
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1140 <main+0x20>

LLVM IR (-O0):
@.str = [14 x i8] c"REPORT %s:%s\0A\00"
@.str.1 = [10 x i8] c"127.0.0.1\00"
@.str.2 = [3 x i8] c"80\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 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %7
7: ; preds = %2, %7
%8 = call i32 @sleep(i32 1)
br label %7
}

LLVM IR (-O2):
@.str = [14 x i8] c"REPORT %s:%s\0A\00"
@.str.1 = [10 x i8] c"127.0.0.1\00"
@.str.2 = [3 x i8] c"80\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %4
4: ; preds = %2, %4
%5 = tail call i32 @sleep(i32 1)
br label %4
}
/* Variables and functions */
double tan(double);
double ECtan(double x) {
  double y;
  double r;
  y = x;
  r = tan(y);
  return (r);
}


x86 assembly (clang, -O0):
<ECtan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <tan@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ECtan>:
jmp    1030 <tan@plt>

LLVM IR (-O0):
define double @ECtan(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
store double %5, double* %3
%6 = load double, double* %3
%7 = call double @tan(double %6)
store double %7, double* %4
%8 = load double, double* %4
ret double %8
}

LLVM IR (-O2):
define double @ECtan(double %0) {
%2 = tail call double @tan(double %0)
ret double %2
}
/* Variables and functions */
scalar_t__ valid_dq_raw_prefix(char const *);
scalar_t__ valid_dq_reg_prefix(char const *);
bool valid_dq_prefix(const char *prefix) {
  return valid_dq_reg_prefix(prefix) || valid_dq_raw_prefix(prefix);
}


x86 assembly (clang, -O0):
<valid_dq_prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <valid_dq_reg_prefix@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    115a <valid_dq_prefix+0x3a>
mov    -0x8(%rbp),%rdi
call   1040 <valid_dq_raw_prefix@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_dq_prefix>:
push   %rbx
mov    %rdi,%rbx
call   1030 <valid_dq_reg_prefix@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1138 <valid_dq_prefix+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <valid_dq_raw_prefix@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @valid_dq_prefix(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @valid_dq_reg_prefix(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i64 @valid_dq_raw_prefix(i8* %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @valid_dq_prefix(i8* %0) {
%2 = tail call i64 @valid_dq_reg_prefix(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @valid_dq_raw_prefix(i8* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
struct udcRemoteFileInfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ errAbort(char *, char *, int);
int udcInfoViaTransparent(char *url, struct udcRemoteFileInfo *retInfo) {
  errAbort("Internal error %s %d",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/CRG-Barcelona/libbeato/refs/heads/master/"
           "jkweb/udc.c",
           270);
  return 0;
}


x86 assembly (clang, -O0):
<udcInfoViaTransparent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed9(%rip),%rdi
lea    0xee7(%rip),%rsi
mov    $0x10e,%edx
call   1030 <errAbort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<udcInfoViaTransparent>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xef6(%rip),%rsi
mov    $0x10e,%edx
call   1030 <errAbort@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.udcRemoteFileInfo = type { i32 }
@.str = [21 x i8] c"Internal error %s %d\00"
@.str.1 = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CRG-Barcelona/libbeato/refs/heads/master/jkweb/udc.c\00"
define i32 @udcInfoViaTransparent(i8* %0, %struct.udcRemoteFileInfo* %1) {
%3 = alloca i8*
%4 = alloca %struct.udcRemoteFileInfo*
store i8* %0, i8** %3
store %struct.udcRemoteFileInfo* %1, %struct.udcRemoteFileInfo** %4
%5 = call i32 @errAbort(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.1, i64 0, i64 0), i32 270)
ret i32 0
}

LLVM IR (-O2):
%struct.udcRemoteFileInfo = type { i32 }
@.str = [21 x i8] c"Internal error %s %d\00"
@.str.1 = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CRG-Barcelona/libbeato/refs/heads/master/jkweb/udc.c\00"
define i32 @udcInfoViaTransparent(i8* nocapture readnone %0, %struct.udcRemoteFileInfo* nocapture readnone %1) {
%3 = tail call i32 @errAbort(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.1, i64 0, i64 0), i32 270)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ chop(char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
char *input(char *prompt, char *str, int size) {
  printf("%s", prompt);
  fgets(str, size, stdin);
  chop(str);
  return str;
}


x86 assembly (clang, -O0):
<input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    0x2e87(%rip),%rax
mov    (%rax),%edx
call   1050 <fgets@plt>
mov    -0x10(%rbp),%rdi
call   1040 <chop@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<input>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1040 <chop@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@stdin = global i32 0
define i8* @input(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i32, i32* @stdin
%12 = call i32 @fgets(i8* %9, i32 %10, i32 %11)
%13 = load i8*, i8** %5
%14 = call i32 @chop(i8* %13)
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@stdin = global i32 0
define i8* @input(i8* %0, i8* returned %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = load i32, i32* @stdin
%6 = tail call i32 @fgets(i8* %1, i32 %2, i32 %5)
%7 = tail call i32 @chop(i8* %1)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("\n");
  printf("Usage: rpbot [OPTIONS] [CONFIG]\n\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xf05(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xece(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [34 x i8] c"Usage: rpbot [OPTIONS] [CONFIG]\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [33 x i8] c"Usage: rpbot [OPTIONS] [CONFIG]\0A\00"
define void @usage() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret void
}