xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ swap(int *, int *);
uint32_t _gcd(uint32_t a, uint32_t b) {
  while (b) {
    a %= b;
    swap(&a, &b);
  }
  return a;
}


x86 assembly (clang, -O0):
<_gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1146 <_gcd+0x36>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <swap@plt>
jmp    111e <_gcd+0xe>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_gcd>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%eax
mov    %esi,(%rsp)
test   %esi,%esi
je     114d <_gcd+0x3d>
lea    0x4(%rsp),%r14
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
cltd
idiv   %esi
mov    %edx,0x4(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <swap@plt>
mov    (%rsp),%esi
mov    0x4(%rsp),%eax
test   %esi,%esi
jne    1130 <_gcd+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @_gcd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %1, i32* %4
%5 = icmp eq i32 %1, 0
br i1 %5, label %14, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %13, %6 ], [ %0, %2 ]
%8 = phi i32 [ %11, %6 ], [ %1, %2 ]
%9 = srem i32 %7, %8
store i32 %9, i32* %3
%10 = call i32 @swap(i32* %3, i32* %4)
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 0
%13 = load i32, i32* %3
br i1 %12, label %14, label %6
14: ; preds = %6, %2
%15 = phi i32 [ %0, %2 ], [ %13, %6 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ paint_finish_game();
void logic_finish_game() { paint_finish_game(); }


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

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

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

LLVM IR (-O2):
define void @logic_finish_game() {
%1 = tail call i32 (...) @paint_finish_game()
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
scalar_t__ bind(int, struct sockaddr const *, int /*<<< orphan*/);
int /*<<< orphan*/ perr_exit(char *);
void Bind(int fd, const struct sockaddr *sa, socklen_t salen) {
  if (bind(fd, sa, salen) < 0)
    perr_exit("bind error");
}


x86 assembly (clang, -O0):
<Bind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <bind@plt>
cmp    $0x0,%rax
jge    1157 <Bind+0x37>
lea    0xeae(%rip),%rdi
call   1040 <perr_exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bind>:
push   %rax
call   1030 <bind@plt>
test   %rax,%rax
js     112d <Bind+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <perr_exit@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
@.str = [11 x i8] c"bind error\00"
define void @Bind(i32 %0, %struct.sockaddr* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load %struct.sockaddr*, %struct.sockaddr** %5
%9 = load i32, i32* %6
%10 = call i64 @bind(i32 %7, %struct.sockaddr* %8, i32 %9)
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = call i32 @perr_exit(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %3
ret void
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@.str = [11 x i8] c"bind error\00"
define void @Bind(i32 %0, %struct.sockaddr* %1, i32 %2) {
%4 = tail call i64 @bind(i32 %0, %struct.sockaddr* %1, i32 %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @perr_exit(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nsc_assert(int);
void mi_switch(void) {
  nsc_assert(0 && "This function is unimplemented.");
  ;
}


x86 assembly (clang, -O0):
<mi_switch>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mi_switch>:
xor    %edi,%edi
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
define void @mi_switch() {
%1 = call i32 @nsc_assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @mi_switch() {
%1 = tail call i32 @nsc_assert(i32 0)
ret void
}
/* Variables and functions */
float fromRep32(int);
float makeInf32() { return fromRep32(0x7f800000U); }


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

x86 assembly (clang, -O2):
<makeInf32>:
mov    $0x7f800000,%edi
jmp    1030 <fromRep32@plt>

LLVM IR (-O0):
define float @makeInf32() {
%1 = call float @fromRep32(i32 2139095040)
ret float %1
}

LLVM IR (-O2):
define float @makeInf32() {
%1 = tail call float @fromRep32(i32 2139095040)
ret float %1
}
void main() {
  int a = 0;
  int b = 1;
  a = a + 11;
  a = a - b;
  a--;
  b++;
  b = a % 3;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xb,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = load i32, i32* %1
%4 = add nsw i32 %3, 11
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = sub nsw i32 %5, %6
store i32 %7, i32* %1
%8 = load i32, i32* %1
%9 = add nsw i32 %8, -1
store i32 %9, i32* %1
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
%12 = load i32, i32* %1
%13 = srem i32 %12, 3
store i32 %13, i32* %2
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
int mus_audio_systems(void) { return (0); }


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

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

LLVM IR (-O0):
define i32 @mus_audio_systems() {
ret i32 0
}

LLVM IR (-O2):
define i32 @mus_audio_systems() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_flipper_free_world();
void CClinkern_flipper_free_world(void) { test_flipper_free_world(); }


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

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

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

LLVM IR (-O2):
define void @CClinkern_flipper_free_world() {
%1 = tail call i32 (...) @test_flipper_free_world()
ret void
}
double f1(double x) { return x * x + 1; }


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

x86 assembly (clang, -O2):
<f1>:
mulsd  %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @f1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call double @llvm.fmuladd.f64(double %3, double %4, double 1.000000e+00)
ret double %5
}

LLVM IR (-O2):
define double @f1(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double %0, double 1.000000e+00)
ret double %2
}
int NdbDaemon_Make(const char *lockfile, const char *logfile, unsigned flags) {
  return 0;
}


x86 assembly (clang, -O0):
<NdbDaemon_Make>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @NdbDaemon_Make(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
ret i32 0
}

LLVM IR (-O2):
define i32 @NdbDaemon_Make(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
unsigned long next_pow2(unsigned long x) {
  if (x != 1 && (x & (x - 1)))
    return (((unsigned)(8 * sizeof(unsigned long) - __builtin_clzl((x)) - 1)) +
            1);
  return ((unsigned)(8 * sizeof(unsigned long) - __builtin_clzl((x)) - 1));
}


x86 assembly (clang, -O0):
<next_pow2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x1,-0x10(%rbp)
je     1155 <next_pow2+0x55>
mov    -0x10(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
je     1155 <next_pow2+0x55>
mov    -0x10(%rbp),%rax
bsr    %rax,%rax
xor    $0x3f,%rax
movslq %eax,%rcx
mov    $0x40,%eax
sub    %rcx,%rax
sub    $0x1,%rax
add    $0x1,%eax
mov    %eax,%eax
mov    %rax,-0x8(%rbp)
jmp    1176 <next_pow2+0x76>
mov    -0x10(%rbp),%rax
bsr    %rax,%rax
xor    $0x3f,%rax
movslq %eax,%rcx
mov    $0x40,%eax
sub    %rcx,%rax
sub    $0x1,%rax
mov    %eax,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_pow2>:
lea    -0x1(%rdi),%rcx
bsr    %rdi,%rdx
mov    %rdx,%rsi
xor    $0x3f,%rsi
mov    $0x40,%eax
sub    %rsi,%rax
test   %rcx,%rdi
cmove  %rdx,%rax
cmp    $0x1,%rdi
cmove  %rdx,%rax
ret

LLVM IR (-O0):
define i64 @next_pow2(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp ne i64 %4, 1
br i1 %5, label %6, label %22
6: ; preds = %1
%7 = load i64, i64* %3
%8 = load i64, i64* %3
%9 = sub i64 %8, 1
%10 = and i64 %7, %9
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %22
12: ; preds = %6
%13 = load i64, i64* %3
%14 = call i64 @llvm.ctlz.i64(i64 %13, i1 true)
%15 = trunc i64 %14 to i32
%16 = sext i32 %15 to i64
%17 = sub i64 64, %16
%18 = sub i64 %17, 1
%19 = trunc i64 %18 to i32
%20 = add i32 %19, 1
%21 = zext i32 %20 to i64
store i64 %21, i64* %2
br label %31
22: ; preds = %6, %1
%23 = load i64, i64* %3
%24 = call i64 @llvm.ctlz.i64(i64 %23, i1 true)
%25 = trunc i64 %24 to i32
%26 = sext i32 %25 to i64
%27 = sub i64 64, %26
%28 = sub i64 %27, 1
%29 = trunc i64 %28 to i32
%30 = zext i32 %29 to i64
store i64 %30, i64* %2
br label %31
31: ; preds = %22, %12
%32 = load i64, i64* %2
ret i64 %32
}

LLVM IR (-O2):
define i64 @next_pow2(i64 %0) {
%2 = icmp eq i64 %0, 1
%3 = tail call i64 @llvm.ctpop.i64(i64 %0)
%4 = icmp ult i64 %3, 2
%5 = or i1 %2, %4
%6 = tail call i64 @llvm.ctlz.i64(i64 %0, i1 true)
%7 = sub nuw nsw i64 64, %6
%8 = xor i64 %6, 63
%9 = select i1 %5, i64 %8, i64 %7
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int checkEvenOrNot(int num) {
  if (num % 2 == 0)
    goto even;
  else
    goto odd;
even:
  printf("is even\n");
  return 0;
odd:
  printf(" is odd\n");
  return 1;
}


x86 assembly (clang, -O0):
<checkEvenOrNot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1134 <checkEvenOrNot+0x24>
jmp    1139 <checkEvenOrNot+0x29>
jmp    1151 <checkEvenOrNot+0x41>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1164 <checkEvenOrNot+0x54>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkEvenOrNot>:
push   %rbx
mov    %edi,%ebx
and    $0x1,%ebx
lea    0xeeb(%rip),%rax
lea    0xedc(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"is even\0A\00"
@.str.1 = [9 x i8] c" is odd\0A\00"
define i32 @checkEvenOrNot(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
br label %9
8: ; preds = %1
br label %11
9: ; preds = %7
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %13
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %2
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@str = [8 x i8] c" is odd\00"
@str.2 = [8 x i8] c"is even\00"
define i32 @checkEvenOrNot(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0)
%5 = xor i1 %3, true
%6 = zext i1 %5 to i32
%7 = tail call i32 @puts(i8* dereferenceable(1) %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse_sentence(char *);
int main(int argc, char *args[]) {
  reverse_sentence(args[1]);
  printf("1:%s\n", args[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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <reverse_sentence@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <reverse_sentence@plt>
mov    0x8(%rbx),%rsi
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"1:%s\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 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @reverse_sentence(i8* %8)
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"1:%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @reverse_sentence(i8* %4)
%6 = load i8*, i8** %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Usage(void) {
  printf("usage:\n");
  printf("  t/T    draw a triangle (caps for clipped)\n");
  printf("  f      flush\n");
  printf("  s      swap\n");
}


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

x86 assembly (clang, -O2):
<Usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xf03(%rip),%rdi
call   1030 <puts@plt>
lea    0xf06(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"usage:\0A\00"
@.str.1 = [45 x i8] c" t/T draw a triangle (caps for clipped)\0A\00"
@.str.2 = [16 x i8] c" f flush\0A\00"
@.str.3 = [15 x i8] c" s swap\0A\00"
define void @Usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [7 x i8] c"usage:\00"
@str.4 = [44 x i8] c" t/T draw a triangle (caps for clipped)\00"
@str.5 = [15 x i8] c" f flush\00"
@str.6 = [14 x i8] c" s swap\00"
define void @Usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.6, i64 0, i64 0))
ret void
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int getFileSize(char *filePath) {
  struct stat statStruct;
  if (stat(filePath, &statStruct) == 0) {
    return statStruct.st_size;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<getFileSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jne    113e <getFileSize+0x2e>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1145 <getFileSize+0x35>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFileSize>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
neg    %rax
sbb    %eax,%eax
or     (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @getFileSize(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%10 = load i32, i32* %9
store i32 %10, i32* %2
br label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %12
12: ; preds = %11, %8
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @getFileSize(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 %7, i32 -1
ret i32 %8
}
void av_bprint_init_for_buffer() {}


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

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

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

LLVM IR (-O2):
define void @av_bprint_init_for_buffer() {
ret void
}
/* Variables and functions */
int annotated_inc_1_1(int);
int annotated_inc_1_2(int);
int annotated_inc_2_1(int);
int annotated_inc_2_2(int);
int annotated_inc_main(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 1;
  i = annotated_inc_main(i);
  i = annotated_inc_1_1(i);
  i = annotated_inc_1_2(i);
  i = annotated_inc_2_1(i);
  i = annotated_inc_2_2(i);
  printf("final value:   %i\n", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <annotated_inc_main@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1060 <annotated_inc_1_1@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1080 <annotated_inc_1_2@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <annotated_inc_2_1@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1070 <annotated_inc_2_2@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe49(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <annotated_inc_main@plt>
mov    %eax,%edi
call   1060 <annotated_inc_1_1@plt>
mov    %eax,%edi
call   1080 <annotated_inc_1_2@plt>
mov    %eax,%edi
call   1030 <annotated_inc_2_1@plt>
mov    %eax,%edi
call   1070 <annotated_inc_2_2@plt>
lea    0xe72(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"final value: %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @annotated_inc_main(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @annotated_inc_1_1(i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @annotated_inc_1_2(i32 %7)
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = call i32 @annotated_inc_2_1(i32 %9)
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = call i32 @annotated_inc_2_2(i32 %11)
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"final value: %i\0A\00"
define i32 @main() {
%1 = tail call i32 @annotated_inc_main(i32 1)
%2 = tail call i32 @annotated_inc_1_1(i32 %1)
%3 = tail call i32 @annotated_inc_1_2(i32 %2)
%4 = tail call i32 @annotated_inc_2_1(i32 %3)
%5 = tail call i32 @annotated_inc_2_2(i32 %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
char *cnfCreim(char *const, int);
int /*<<< orphan*/ cnfFree(char *);
int /*<<< orphan*/ cnfImpn(char *const, int, int, char *);
int /*<<< orphan*/ emsRep(char *, char *, int *const);
void ems_rep_(char *const err, char *const text, int *const status,
              int err_length, int text_length) {
  char cerr[15 + 1];
  char *ctext;

  cnfImpn(err, err_length, 15, cerr);
  ctext = cnfCreim(text, text_length);
  emsRep(cerr, ctext, status);
  cnfFree(ctext);
  return;
}


x86 assembly (clang, -O0):
<ems_rep_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
lea    -0x30(%rbp),%rcx
mov    $0xf,%edx
call   1030 <cnfImpn@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%esi
call   1060 <cnfCreim@plt>
mov    %rax,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1050 <emsRep@plt>
mov    -0x38(%rbp),%rdi
call   1040 <cnfFree@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ems_rep_>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %r8d,%ebp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rsp,%r15
mov    %ecx,%esi
mov    $0xf,%edx
mov    %r15,%rcx
call   1030 <cnfImpn@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1060 <cnfCreim@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %rax,%rsi
mov    %r14,%rdx
call   1050 <emsRep@plt>
mov    %rbx,%rdi
call   1040 <cnfFree@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @ems_rep_(i8* %0, i8* %1, i32* %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca [16 x i8]
%12 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%13 = load i8*, i8** %6
%14 = load i32, i32* %9
%15 = getelementptr inbounds [16 x i8], [16 x i8]* %11, i64 0, i64 0
%16 = call i32 @cnfImpn(i8* %13, i32 %14, i32 15, i8* %15)
%17 = load i8*, i8** %7
%18 = load i32, i32* %10
%19 = call i8* @cnfCreim(i8* %17, i32 %18)
store i8* %19, i8** %12
%20 = getelementptr inbounds [16 x i8], [16 x i8]* %11, i64 0, i64 0
%21 = load i8*, i8** %12
%22 = load i32*, i32** %8
%23 = call i32 @emsRep(i8* %20, i8* %21, i32* %22)
%24 = load i8*, i8** %12
%25 = call i32 @cnfFree(i8* %24)
ret void
}

LLVM IR (-O2):
define void @ems_rep_(i8* %0, i8* %1, i32* %2, i32 %3, i32 %4) {
%6 = alloca [16 x i8]
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%8 = call i32 @cnfImpn(i8* %0, i32 %3, i32 15, i8* %7)
%9 = call i8* @cnfCreim(i8* %1, i32 %4)
%10 = call i32 @emsRep(i8* %7, i8* %9, i32* %2)
%11 = call i32 @cnfFree(i8* %9)
ret void
}
void g_node_copy() {}


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

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

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

LLVM IR (-O2):
define void @g_node_copy() {
ret void
}
void rop3_220_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~*D;
  stk2 = T & stk3;
  stk1 = S | stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_220_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_220_1_0>:
mov    (%rdi),%al
mov    %eax,%ecx
or     %sil,%cl
not    %cl
and    %dl,%cl
and    %sil,%al
or     %cl,%al
mov    %al,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_220_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %4, %1
%6 = xor i8 %5, -1
%7 = and i8 %6, %2
%8 = and i8 %4, %1
%9 = or i8 %7, %8
store i8 %9, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ ENOTSUP;
int /*<<< orphan*/ errno;
int _read(int file, char *ptr, int len) {
  errno = file < 0 ? EINVAL : ENOTSUP;
  return -1;
}


x86 assembly (clang, -O0):
<_read>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1129 <_read+0x29>
mov    0x2eb1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
jmp    1135 <_read+0x35>
mov    0x2eb8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%ecx
mov    0x2e99(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_read>:
test   %edi,%edi
jns    110d <_read+0xd>
mov    0x2ec5(%rip),%rax
jmp    1114 <_read+0x14>
mov    0x2ed4(%rip),%rax
mov    (%rax),%eax
mov    0x2ebb(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@ENOTSUP = global i32 0
@errno = global i32 0
define i32 @_read(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = load i32, i32* @EINVAL
br label %13
11: ; preds = %3
%12 = load i32, i32* @ENOTSUP
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
store i32 %14, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EINVAL = global i32 0
@ENOTSUP = global i32 0
@errno = global i32 0
define i32 @_read(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = icmp slt i32 %0, 0
%5 = load i32, i32* @EINVAL
%6 = load i32, i32* @ENOTSUP
%7 = select i1 %4, i32 %5, i32 %6
store i32 %7, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char const *, int);
void ft_putstr(char const *s) {
  int i;
  i = 0;
  while (s && s[i])
    i++;
  if (s)
    write(1, s, i);
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
je     1148 <ft_putstr+0x38>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1158 <ft_putstr+0x48>
jmp    1166 <ft_putstr+0x56>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <ft_putstr+0x13>
cmpq   $0x0,-0x8(%rbp)
je     1182 <ft_putstr+0x72>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
test   %rdi,%rdi
je     1137 <ft_putstr+0x27>
mov    %rdi,%rsi
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,(%rsi,%rdx,1)
lea    0x1(%rdx),%rdx
jne    1120 <ft_putstr+0x10>
add    $0xffffffff,%edx
mov    $0x1,%edi
jmp    1030 <write@plt>
ret

LLVM IR (-O0):
define void @ft_putstr(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %17, %1
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i8*, i8** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br label %15
15: ; preds = %7, %4
%16 = phi i1 [ false, %4 ], [ %14, %7 ]
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %4
20: ; preds = %15
%21 = load i8*, i8** %2
%22 = icmp ne i8* %21, null
br i1 %22, label %23, label %27
23: ; preds = %20
%24 = load i8*, i8** %2
%25 = load i32, i32* %3
%26 = call i32 @write(i32 1, i8* %24, i32 %25)
br label %27
27: ; preds = %23, %20
ret void
}

LLVM IR (-O2):
define void @ft_putstr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %12, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ 0, %1 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add nuw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = trunc i64 %4 to i32
%11 = tail call i32 @write(i32 1, i8* %0, i32 %10)
br label %12
12: ; preds = %1, %9
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_number_of_symbols(int *n) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(293, n, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_number_of_symbols>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x125,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_number_of_symbols>:
mov    %rdi,%rsi
mov    $0x125,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @syscon_number_of_symbols(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc4c(i32 293, i32* %6, i32* %7, double* %8, i32 0)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @syscon_number_of_symbols(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc4c(i32 293, i32* %0, i32* undef, double* undef, i32 0)
ret i32 %2
}
void ff_hevc_put_hevc_bi_epel_v64_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_v64_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f1(int);
int recursiveTailCall(int data) {
  f1(data);
  return recursiveTailCall(data);
}


x86 assembly (clang, -O0):
<recursiveTailCall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <f1@plt>
mov    -0x4(%rbp),%edi
call   1040 <recursiveTailCall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recursiveTailCall>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <f1@plt>
jmp    1120 <recursiveTailCall+0x10>

LLVM IR (-O0):
define i32 @recursiveTailCall(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @f1(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @recursiveTailCall(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @recursiveTailCall(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @f1(i32 %0)
br label %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long window;
};
typedef TYPE_1__ XKeymapEvent;

/* Variables and functions */
void set_XKeymapEvent_window(void *_p, unsigned long _v) {
  ((XKeymapEvent *)_p)->window = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XKeymapEvent_window>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XKeymapEvent_window(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, int);
int /*<<< orphan*/ unlink(char *);
void remove_file(char *base, int nb) {
  char file[128];
  sprintf(file, "%s%d", base, nb);
  unlink(file);
}


x86 assembly (clang, -O0):
<remove_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xeb9(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x90(%rbp),%rdi
call   1030 <unlink@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_file>:
push   %rbx
sub    $0x80,%rsp
mov    %esi,%ecx
mov    %rdi,%rdx
lea    0xecc(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <unlink@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%s%d\00"
define void @remove_file(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [128 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8)
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%11 = call i32 @unlink(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%d\00"
define void @remove_file(i8* %0, i32 %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%6 = call i32 @unlink(i8* %4)
ret void
}
/* Variables and functions */
unsigned short TH_CONTROL_PHASE(unsigned char volatile *);
unsigned short read3Btn(unsigned short port) {
  volatile unsigned char *pb;
  unsigned short val;
  pb = (volatile unsigned char *)0xa10003 + port * 2;
  val = TH_CONTROL_PHASE(pb);
  val = ((val & 0x3000) >> 6) | (val & 0x003F);
  val ^= 0x00FF;
  return val | (0x00 << 12);
}


x86 assembly (clang, -O0):
<read3Btn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
shl    $0x1,%eax
movslq %eax,%rcx
mov    $0xa10003,%eax
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <TH_CONTROL_PHASE@plt>
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
and    $0x3000,%eax
sar    $0x6,%eax
movzwl -0x12(%rbp),%ecx
and    $0x3f,%ecx
or     %ecx,%eax
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
xor    $0xff,%eax
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
or     $0x0,%eax
movzwl %ax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read3Btn>:
push   %rax
mov    %edi,%eax
lea    (%rax,%rax,1),%rdi
add    $0xa10003,%rdi
call   1030 <TH_CONTROL_PHASE@plt>
mov    %eax,%ecx
shr    $0x6,%ecx
and    $0xc0,%ecx
and    $0x3f,%eax
or     %ecx,%eax
xor    $0xff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i16 @read3Btn(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8*
%4 = alloca i16
store i16 %0, i16* %2
%5 = load i16, i16* %2
%6 = zext i16 %5 to i32
%7 = mul nsw i32 %6, 2
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* inttoptr (i64 10551299 to i8*), i64 %8
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = call zeroext i16 @TH_CONTROL_PHASE(i8* %10)
store i16 %11, i16* %4
%12 = load i16, i16* %4
%13 = zext i16 %12 to i32
%14 = and i32 %13, 12288
%15 = ashr i32 %14, 6
%16 = load i16, i16* %4
%17 = zext i16 %16 to i32
%18 = and i32 %17, 63
%19 = or i32 %15, %18
%20 = trunc i32 %19 to i16
store i16 %20, i16* %4
%21 = load i16, i16* %4
%22 = zext i16 %21 to i32
%23 = xor i32 %22, 255
%24 = trunc i32 %23 to i16
store i16 %24, i16* %4
%25 = load i16, i16* %4
%26 = zext i16 %25 to i32
%27 = or i32 %26, 0
%28 = trunc i32 %27 to i16
ret i16 %28
}

LLVM IR (-O2):
define zeroext i16 @read3Btn(i16 zeroext %0) {
%2 = zext i16 %0 to i64
%3 = shl nuw nsw i64 %2, 1
%4 = getelementptr inbounds i8, i8* inttoptr (i64 10551299 to i8*), i64 %3
%5 = tail call zeroext i16 @TH_CONTROL_PHASE(i8* %4)
%6 = lshr i16 %5, 6
%7 = and i16 %6, 192
%8 = and i16 %5, 63
%9 = or i16 %7, %8
%10 = xor i16 %9, 255
ret i16 %10
}
/* Variables and functions */
int unlink(char const *);
int optk_unlink(const char *path) { return unlink(path); }


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

x86 assembly (clang, -O2):
<optk_unlink>:
jmp    1030 <unlink@plt>

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

LLVM IR (-O2):
define i32 @optk_unlink(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 %2
}
/* Variables and functions */
__attribute__((const, pure)) size_t arch_mm_page_size(int level) {
  if (level == 0)
    return 0x1000;
  else if (level == 1)
    return 2 * 1024 * 1024;
  else
    return 1024 * 1024 * 1024;
}


x86 assembly (clang, -O0):
<arch_mm_page_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    111e <arch_mm_page_size+0x1e>
movq   $0x1000,-0x8(%rbp)
jmp    113d <arch_mm_page_size+0x3d>
cmpl   $0x1,-0xc(%rbp)
jne    1135 <arch_mm_page_size+0x35>
movq   $0x200000,-0x8(%rbp)
jmp    113d <arch_mm_page_size+0x3d>
movq   $0x40000000,-0x8(%rbp)
40
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arch_mm_page_size>:
cmp    $0x1,%edi
mov    $0x200000,%eax
mov    $0x40000000,%ecx
cmove  %rax,%rcx
test   %edi,%edi
mov    $0x1000,%eax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
define i64 @arch_mm_page_size(i32 %0) {
%2 = alloca i64
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 4096, i64* %2
br label %12
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %7
store i64 2097152, i64* %2
br label %12
11: ; preds = %7
store i64 1073741824, i64* %2
br label %12
12: ; preds = %11, %10, %6
%13 = load i64, i64* %2
ret i64 %13
}

LLVM IR (-O2):
define i64 @arch_mm_page_size(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i64 2097152, i64 1073741824
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i64 4096, i64 %3
ret i64 %5
}
const char *GetCapabilityHelp(char *psz_capability, int i_type) {
  (void)psz_capability;
  (void)i_type;
  return " ";
}


x86 assembly (clang, -O0):
<GetCapabilityHelp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeee(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetCapabilityHelp>:
lea    0xef9(%rip),%rax
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define i8* @GetCapabilityHelp(i8* nocapture readnone %0, i32 %1) {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
int XDirectionalDependentDrawing() {}


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

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

LLVM IR (-O0):
define i32 @XDirectionalDependentDrawing() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XDirectionalDependentDrawing() {
ret i32 undef
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ klog_fileappend(char *, char *);
int /*<<< orphan*/ klog_filelog(char *);
int main(int argc, char **argv) {
  char string[2] = {'I', '\0'};
  klog_filelog("log.txt");
  while (1) {
    string[0] = getchar();
    klog_fileappend("log.txt", string);
  }
  return 0;
}


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    0xeb3(%rip),%ax
mov    %ax,-0x12(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <klog_filelog@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x12(%rbp)
lea    -0x12(%rbp),%rsi
lea    0xe90(%rip),%rdi
call   1050 <klog_fileappend@plt>
jmp    115d <main+0x2d>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movw   $0x49,0x6(%rsp)
lea    0xebe(%rip),%r14
mov    %r14,%rdi
call   1030 <klog_filelog@plt>
lea    0x6(%rsp),%rbx
nop
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %al,0x6(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <klog_fileappend@plt>
jmp    1150 <main+0x20>

LLVM IR (-O0):
@__const.main.string = [2 x i8] c"I\00"
@.str = [8 x i8] c"log.txt\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [2 x i8]* %6 to i8*
%8 = call i32 @klog_filelog(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %2, %9
%10 = call signext i8 (...) @getchar()
%11 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
store i8 %10, i8* %11
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
%13 = call i32 @klog_fileappend(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %9
}

LLVM IR (-O2):
@.str = [8 x i8] c"log.txt\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i16
%4 = bitcast i16* %3 to i8*
store i16 73, i16* %3
%5 = tail call i32 @klog_filelog(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %6, %2
%7 = call signext i8 (...) @getchar()
store i8 %7, i8* %4
%8 = call i32 @klog_fileappend(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %4)
br label %6
}
/* Variables and functions */
int /*<<< orphan*/ assert(double **);
int /*<<< orphan*/ memcpy(double **, double **, int);
void matrix3_copy(double dest[4][4], double src[4][4]) {
  assert(dest);
  assert(src);
  memcpy(dest, src, 16 * sizeof(double));
}


x86 assembly (clang, -O0):
<matrix3_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x80,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrix3_copy>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    %r14,%rdi
call   1030 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x80,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memcpy@plt>

LLVM IR (-O0):
define void @matrix3_copy([4 x double]* %0, [4 x double]* %1) {
%3 = alloca [4 x double]*
%4 = alloca [4 x double]*
store [4 x double]* %0, [4 x double]** %3
store [4 x double]* %1, [4 x double]** %4
%5 = load [4 x double]*, [4 x double]** %3
%6 = bitcast [4 x double]* %5 to double**
%7 = call i32 @assert(double** %6)
%8 = load [4 x double]*, [4 x double]** %4
%9 = bitcast [4 x double]* %8 to double**
%10 = call i32 @assert(double** %9)
%11 = load [4 x double]*, [4 x double]** %3
%12 = bitcast [4 x double]* %11 to double**
%13 = load [4 x double]*, [4 x double]** %4
%14 = bitcast [4 x double]* %13 to double**
%15 = call i32 @memcpy(double** %12, double** %14, i32 128)
ret void
}

LLVM IR (-O2):
define void @matrix3_copy([4 x double]* %0, [4 x double]* %1) {
%3 = bitcast [4 x double]* %0 to double**
%4 = tail call i32 @assert(double** %3)
%5 = bitcast [4 x double]* %1 to double**
%6 = tail call i32 @assert(double** %5)
%7 = tail call i32 @memcpy(double** %3, double** %5, i32 128)
ret void
}
char *assert_msg_pass() {
  do {
    if (!(0 == 0))
      return "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/marshall/mintest/refs/heads/master/"
             "tests/test_asserts.c"
             ":"
             "12"
             ": "
             "custom_msg";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<assert_msg_pass>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <assert_msg_pass+0x9>
jmp    110e <assert_msg_pass+0xe>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @assert_msg_pass() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @assert_msg_pass() {
ret i8* null
}