xunge/DecIR huggingface dataset:
int main() {
  float raiz = 3.1415;
  float *aponta_para_raiz = &raiz;
  *aponta_para_raiz = 3.141592;
  printf("RAIZ = %f\n", raiz);
  printf("ENDEREÇO DA RAIZ MODIFICADA = %p", (void *)aponta_para_raiz);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xee4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  0xec7(%rip),%xmm0
movss  %xmm0,(%rax)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xebb(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x40490fd8,0x4(%rsp)
40
lea    0xee8(%rip),%rdi
movsd  0xed8(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"RAIZ = %f\0A\00"
@.str.1 = [34 x i8] c"ENDERE\C3\87O DA RAIZ MODIFICADA = %p\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float*
store float 0x400921CAC0000000, float* %1
store float* %1, float** %2
%3 = load float*, float** %2
store float 0x400921FB00000000, float* %3
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double %5)
%7 = load float*, float** %2
%8 = bitcast float* %7 to i8*
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"RAIZ = %f\0A\00"
@.str.1 = [34 x i8] c"ENDERE\C3\87O DA RAIZ MODIFICADA = %p\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
store float 0x400921FB00000000, float* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double 0x400921FB00000000)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), float* %1)
ret i32 0
}
/* Variables and functions */
int StatMomentInt(int *, int, int, int);
double StatVarInt(int a[], int n, int s) {
  return StatMomentInt(a, n, s, 2) / (n - 1);
}


x86 assembly (clang, -O0):
<StatVarInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    $0x2,%ecx
call   1030 <StatMomentInt@plt>
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StatVarInt>:
push   %rbx
mov    %esi,%ebx
mov    $0x2,%ecx
call   1030 <StatMomentInt@plt>
add    $0xffffffff,%ebx
cltd
idiv   %ebx
cvtsi2sd %eax,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define double @StatVarInt(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 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @StatMomentInt(i32* %7, i32 %8, i32 %9, i32 2)
%11 = load i32, i32* %5
%12 = sub nsw i32 %11, 1
%13 = sdiv i32 %10, %12
%14 = sitofp i32 %13 to double
ret double %14
}

LLVM IR (-O2):
define double @StatVarInt(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @StatMomentInt(i32* %0, i32 %1, i32 %2, i32 2)
%5 = add nsw i32 %1, -1
%6 = sdiv i32 %4, %5
%7 = sitofp i32 %6 to double
ret double %7
}
/* Variables and functions */
scalar_t__ opaquePropertyCheck(void *);
int *alwaysReturnNull(void *input) {
  if (opaquePropertyCheck(input))
    return 0;
  return 0;
}


x86 assembly (clang, -O0):
<alwaysReturnNull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <opaquePropertyCheck@plt>
cmp    $0x0,%rax
je     113c <alwaysReturnNull+0x2c>
movq   $0x0,-0x8(%rbp)
jmp    1144 <alwaysReturnNull+0x34>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alwaysReturnNull>:
push   %rax
call   1030 <opaquePropertyCheck@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32* @alwaysReturnNull(i8* %0) {
%2 = alloca i32*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @opaquePropertyCheck(i8* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32* null, i32** %2
br label %9
8: ; preds = %1
store i32* null, i32** %2
br label %9
9: ; preds = %8, %7
%10 = load i32*, i32** %2
ret i32* %10
}

LLVM IR (-O2):
define noalias i32* @alwaysReturnNull(i8* %0) {
%2 = tail call i64 @opaquePropertyCheck(i8* %0)
ret i32* null
}
/* Variables and functions */
int /*<<< orphan*/ uart_puts_P(char *);
void uart_crlf(void) { uart_puts_P("\r\n"); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"\0D\0A\00"
define void @uart_crlf() {
%1 = call i32 @uart_puts_P(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\0D\0A\00"
define void @uart_crlf() {
%1 = tail call i32 @uart_puts_P(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned int nearest_pow(unsigned int num) {
  unsigned int n = 1;
  while (n < num)
    n <<= 1;
  return n;
}


x86 assembly (clang, -O0):
<nearest_pow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1128 <nearest_pow+0x28>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <nearest_pow+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nearest_pow>:
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
cmp    %edi,%eax
jb     1110 <nearest_pow+0x10>
ret

LLVM IR (-O0):
define i32 @nearest_pow(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp ult i32 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* %3
%10 = shl i32 %9, 1
store i32 %10, i32* %3
br label %4
11: ; preds = %4
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @nearest_pow(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %5, %2 ]
%4 = icmp ult i32 %3, %0
%5 = shl i32 %3, 1
br i1 %4, label %2, label %6
6: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ write_property_unknown();
void unknown_not_supported() { write_property_unknown(); }


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

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

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

LLVM IR (-O2):
define void @unknown_not_supported() {
%1 = tail call i32 (...) @write_property_unknown()
ret void
}
int add(int a, int b, int c, int d, int e, int f) {
  return a + b + c + d + e + f;
}


x86 assembly (clang, -O0):
<add>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
add    %ecx,%eax
add    %r8d,%eax
add    %r9d,%eax
ret

LLVM IR (-O0):
define i32 @add(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = add nsw i32 %13, %14
%16 = load i32, i32* %9
%17 = add nsw i32 %15, %16
%18 = load i32, i32* %10
%19 = add nsw i32 %17, %18
%20 = load i32, i32* %11
%21 = add nsw i32 %19, %20
%22 = load i32, i32* %12
%23 = add nsw i32 %21, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = add nsw i32 %1, %0
%8 = add nsw i32 %7, %2
%9 = add nsw i32 %8, %3
%10 = add nsw i32 %9, %4
%11 = add nsw i32 %10, %5
ret i32 %11
}
void __attribute__((format(printf, 1, 2))) no_printf(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @no_printf(i8* nocapture %0, ...) {
ret void
}
void loop_prune_Good(int length, int j) {
  int i;
  char a[length];
  for (i = length - 1; i >= 0; i--) {
    if (j >= 0 && j < i) {
      a[length - i] = 'Z';
    }
  }
}


x86 assembly (clang, -O0):
<loop_prune_Good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1181 <loop_prune_Good+0x81>
cmpl   $0x0,-0x8(%rbp)
jl     116e <loop_prune_Good+0x6e>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    116e <loop_prune_Good+0x6e>
mov    -0x28(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    -0xc(%rbp),%ecx
movslq %ecx,%rcx
movb   $0x5a,(%rax,%rcx,1)
jmp    1173 <loop_prune_Good+0x73>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <loop_prune_Good+0x3d>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @loop_prune_Good(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = zext i32 %8 to i64
%10 = call i8* @llvm.stacksave()
store i8* %10, i8** %6
%11 = alloca i8, i64 %9
store i64 %9, i64* %7
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 1
store i32 %13, i32* %5
br label %14
14: ; preds = %31, %2
%15 = load i32, i32* %5
%16 = icmp sge i32 %15, 0
br i1 %16, label %17, label %34
17: ; preds = %14
%18 = load i32, i32* %4
%19 = icmp sge i32 %18, 0
br i1 %19, label %20, label %30
20: ; preds = %17
%21 = load i32, i32* %4
%22 = load i32, i32* %5
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %30
24: ; preds = %20
%25 = load i32, i32* %3
%26 = load i32, i32* %5
%27 = sub nsw i32 %25, %26
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %11, i64 %28
store i8 90, i8* %29
br label %30
30: ; preds = %24, %20, %17
br label %31
31: ; preds = %30
%32 = load i32, i32* %5
%33 = add nsw i32 %32, -1
store i32 %33, i32* %5
br label %14
34: ; preds = %14
%35 = load i8*, i8** %6
ret void
}

LLVM IR (-O2):
define void @loop_prune_Good(i32 %0, i32 %1) {
ret void
}
void SNDDummySetVolume(__attribute((unused)) int volume) {}


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

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

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

LLVM IR (-O2):
define void @SNDDummySetVolume(i32 %0) {
ret void
}
double ts2ep(tsec)
double tsec;
{
  double date, time;
  ts2dt(tsec, &date, &time);
  return (dt2ep(date, time));
}


x86 assembly (clang, -O0):
<ts2ep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x1,%al
call   1030 <ts2dt@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mov    $0x2,%al
call   1040 <dt2ep@plt>
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts2ep>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    $0x1,%al
call   1030 <ts2dt@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mov    $0x2,%al
call   1040 <dt2ep@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @ts2ep(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @ts2dt to i32 (double, double*, double*, ...)*)(double %5, double* %3, double* %4)
%7 = load double, double* %3
%8 = load double, double* %4
%9 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2ep to i32 (double, double, ...)*)(double %7, double %8)
%10 = sitofp i32 %9 to double
ret double %10
}

LLVM IR (-O2):
define double @ts2ep(double %0) {
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %2 to i8*
%5 = bitcast double* %3 to i8*
%6 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @ts2dt to i32 (double, double*, double*, ...)*)(double %0, double* %2, double* %3)
%7 = load double, double* %2
%8 = load double, double* %3
%9 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2ep to i32 (double, double, ...)*)(double %7, double %8)
%10 = sitofp i32 %9 to double
ret double %10
}
int main(void) {
  int i = 0, n = 0;
  do {
    i = 10;
  } while (n < 0);
  do {
    n += i;
    i -= 1;
  } while (i > 0);
  return n;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0xa,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1119 <main+0x19>
jmp    112f <main+0x2f>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     112f <main+0x2f>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x37,%eax
ret

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

LLVM IR (-O2):
define i32 @main() {
ret i32 55
}
void RTAvlGCPhysInsert(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlGCPhysInsert() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void gen_signal() { printf("no signal\n"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"no signal\0A\00"
define void @gen_signal() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [10 x i8] c"no signal\00"
define void @gen_signal() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct astar_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct astar_node *);
void astar_node_destroy(struct astar_node *node) { free(node); }


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

x86 assembly (clang, -O2):
<astar_node_destroy>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.astar_node = type { i32 }
define void @astar_node_destroy(%struct.astar_node* %0) {
%2 = alloca %struct.astar_node*
store %struct.astar_node* %0, %struct.astar_node** %2
%3 = load %struct.astar_node*, %struct.astar_node** %2
%4 = call i32 @free(%struct.astar_node* %3)
ret void
}

LLVM IR (-O2):
%struct.astar_node = type { i32 }
define void @astar_node_destroy(%struct.astar_node* nocapture %0) {
%2 = tail call i32 @free(%struct.astar_node* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Recursive(int /*<<< orphan*/, int);
int main() {
  int i = 0;
  for (;; ++i) {
    Recursive(0, i);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%esi
xor    %edi,%edi
call   1030 <Recursive@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %edi,%edi
mov    %ebx,%esi
call   1030 <Recursive@plt>
add    $0x1,%ebx
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = call i32 @Recursive(i32 0, i32 %4)
br label %6
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
br label %3
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @Recursive(i32 0, i32 %2)
%4 = add nuw nsw i32 %2, 1
br label %1
}
char lw6sys_env_separator_char() { return ':'; }


x86 assembly (clang, -O0):
<lw6sys_env_separator_char>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3a,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lw6sys_env_separator_char>:
mov    $0x3a,%al
ret

LLVM IR (-O0):
define signext i8 @lw6sys_env_separator_char() {
ret i8 58
}

LLVM IR (-O2):
define signext i8 @lw6sys_env_separator_char() {
ret i8 58
}
/* Variables and functions */
int /*<<< orphan*/ swap(char **, int, int);
void reverse(char **s, int i, int size) {
  while (i < size - 1) {
    swap(s, i, size - 1);
    i++;
    size--;
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    115c <reverse+0x4c>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
sub    $0x1,%edx
call   1030 <swap@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1122 <reverse+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
add    $0xffffffff,%ebx
cmp    %esi,%ebx
jle    1146 <reverse+0x36>
mov    %esi,%ebp
mov    %rdi,%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <swap@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
cmp    %ebx,%ebp
jl     1130 <reverse+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @reverse(i8** %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, -1
%5 = icmp sgt i32 %4, %1
br i1 %5, label %6, label %13
6: ; preds = %3, %6
%7 = phi i32 [ %11, %6 ], [ %4, %3 ]
%8 = phi i32 [ %10, %6 ], [ %1, %3 ]
%9 = tail call i32 @swap(i8** %0, i32 %8, i32 %7)
%10 = add nsw i32 %8, 1
%11 = add nsw i32 %7, -1
%12 = icmp slt i32 %10, %11
br i1 %12, label %6, label %13
13: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void outOfMemory(void) {
  fflush(stdout);
  fprintf(stderr, "\nout of memory\n");
  abort();
}


x86 assembly (clang, -O0):
<outOfMemory>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<outOfMemory>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xeb1(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stdout = global i32 0
@stderr = global i32 0
@.str = [16 x i8] c"\0Aout of memory\0A\00"
define void @outOfMemory() {
%1 = load i32, i32* @stdout
%2 = call i32 @fflush(i32 %1)
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@stderr = global i32 0
@.str = [16 x i8] c"\0Aout of memory\0A\00"
define void @outOfMemory() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fflush(i32 %1)
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @abort()
unreachable
}
int functionPointer(int (*func)(int, int)) { return func(40, 2); }


x86 assembly (clang, -O0):
<functionPointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x28,%edi
mov    $0x2,%esi
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<functionPointer>:
mov    %rdi,%rax
mov    $0x28,%edi
mov    $0x2,%esi
jmp    *%rax

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

LLVM IR (-O2):
define i32 @functionPointer(i32 (i32, i32)* nocapture %0) {
%2 = tail call i32 %0(i32 40, i32 2)
ret i32 %2
}
/* Variables and functions */
scalar_t__ plus(int, int);
scalar_t__ plus2(int, int);
int main(int argc, char **argv) { return !(plus(1, 2) == plus2(1, 2)); }


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    $0x1,%edi
mov    $0x2,%esi
call   1030 <plus@plt>
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <plus2@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
sete   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <plus@plt>
mov    %rax,%rbx
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <plus2@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i64 @plus(i32 1, i32 2)
%7 = call i64 @plus2(i32 1, i32 2)
%8 = icmp eq i64 %6, %7
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @plus(i32 1, i32 2)
%4 = tail call i64 @plus2(i32 1, i32 2)
%5 = icmp ne i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ read_file(int /*<<< orphan*/);
int /*<<< orphan*/ usage();
void do_read_file(int argc, char *argv[]) {
  if (argc > 0)
    usage();
  read_file(STDOUT_FILENO);
}


x86 assembly (clang, -O0):
<do_read_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1140 <do_read_file+0x20>
mov    $0x0,%al
call   1040 <usage@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1030 <read_file@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_read_file>:
push   %rax
test   %edi,%edi
jle    112c <do_read_file+0xc>
xor    %eax,%eax
call   1040 <usage@plt>
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <read_file@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define void @do_read_file(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (...) @usage()
br label %9
9: ; preds = %7, %2
%10 = load i32, i32* @STDOUT_FILENO
%11 = call i32 @read_file(i32 %10)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define void @do_read_file(i32 %0, i8** nocapture readnone %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %6
6: ; preds = %4, %2
%7 = load i32, i32* @STDOUT_FILENO
%8 = tail call i32 @read_file(i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char, char, char);
void padding(char ch, int n) {
  int i;
  for (i = 0; i < n; i++)
    printf("%c%c%c%c", ch, ch, ch, ch);
}


x86 assembly (clang, -O0):
<padding>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1165 <padding+0x55>
mov    -0x1(%rbp),%dl
mov    -0x1(%rbp),%cl
mov    -0x1(%rbp),%al
lea    0xebc(%rip),%rdi
movsbl %dl,%esi
movsbl %cl,%edx
movsbl %al,%ecx
movsbl -0x1(%rbp),%r8d
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <padding+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padding>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    1146 <padding+0x36>
mov    %esi,%ebx
movsbl %dil,%ebp
lea    0xedb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebp,%edx
mov    %ebp,%ecx
mov    %ebp,%r8d
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1130 <padding+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%c%c%c%c\00"
define void @padding(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %16, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i8, i8* %3
%12 = load i8, i8* %3
%13 = load i8, i8* %3
%14 = load i8, i8* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %11, i8 signext %12, i8 signext %13, i8 signext %14)
br label %16
16: ; preds = %10
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%c%c%c%c\00"
define void @padding(i8 signext %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %0, i8 signext %0, i8 signext %0, i8 signext %0)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %1
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
void SteamAPI_ISteamHTMLSurface_FileLoadDialogResponse(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


x86 assembly (clang, -O0):
<SteamAPI_ISteamHTMLSurface_FileLoadDialogResponse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x0,%al
call   1030 <xlogf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamAPI_ISteamHTMLSurface_FileLoadDialogResponse>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamHTMLSurface_FileLoadDialogResponse = [50 x i8] c"SteamAPI_ISteamHTMLSurface_FileLoadDialogResponse\00"
define void @SteamAPI_ISteamHTMLSurface_FileLoadDialogResponse(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @__func__.SteamAPI_ISteamHTMLSurface_FileLoadDialogResponse, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamHTMLSurface_FileLoadDialogResponse = [50 x i8] c"SteamAPI_ISteamHTMLSurface_FileLoadDialogResponse\00"
define void @SteamAPI_ISteamHTMLSurface_FileLoadDialogResponse(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @__func__.SteamAPI_ISteamHTMLSurface_FileLoadDialogResponse, i64 0, i64 0), i8* %0)
ret void
}
int test_01(int a, int b, int c, int d) { return a + (c == d); }


x86 assembly (clang, -O0):
<test_01>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
cmp    -0x10(%rbp),%ecx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_01>:
xor    %eax,%eax
cmp    %ecx,%edx
sete   %al
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @test_01(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = icmp eq i32 %10, %11
%13 = zext i1 %12 to i32
%14 = add nsw i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @test_01(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %2, %3
%6 = zext i1 %5 to i32
%7 = add nsw i32 %6, %0
ret i32 %7
}
void path_022_expected_10(int a, int b) {
  switch (a) {
  case 0:
    if (b)
      break;
    break;
  case 1:
    if (b)
      break;
    break;
  default:
    break;
  }
  if (b > 0) {
    b--;
  }
}


x86 assembly (clang, -O0):
<path_022_expected_10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     112e <path_022_expected_10+0x2e>
jmp    111d <path_022_expected_10+0x1d>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     1142 <path_022_expected_10+0x42>
jmp    1156 <path_022_expected_10+0x56>
cmpl   $0x0,-0x8(%rbp)
je     113d <path_022_expected_10+0x3d>
jmp    115b <path_022_expected_10+0x5b>
jmp    115b <path_022_expected_10+0x5b>
cmpl   $0x0,-0x8(%rbp)
je     1151 <path_022_expected_10+0x51>
jmp    115b <path_022_expected_10+0x5b>
jmp    115b <path_022_expected_10+0x5b>
jmp    115b <path_022_expected_10+0x5b>
cmpl   $0x0,-0x8(%rbp)
jle    116e <path_022_expected_10+0x6e>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @path_022_expected_10(i32 %0, i32 %1) {
ret void
}
int puth(int (*printC)(char), unsigned n) {
  static const char hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7',
                               '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
  printC(hex[n & 15]);
  return 1;
}


x86 assembly (clang, -O0):
<puth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
and    $0xf,%ecx
mov    %ecx,%ecx
mov    %ecx,%edx
lea    0xedc(%rip),%rcx
movsbl (%rcx,%rdx,1),%edi
call   *%rax
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puth>:
push   %rax
mov    %rdi,%rax
and    $0xf,%esi
lea    0xef2(%rip),%rcx
movsbl (%rsi,%rcx,1),%edi
call   *%rax
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@puth.hex = internal constant [16 x i8] c"0123456789abcdef"
define i32 @puth(i32 (i8)* %0, i32 %1) {
%3 = alloca i32 (i8)*
%4 = alloca i32
store i32 (i8)* %0, i32 (i8)** %3
store i32 %1, i32* %4
%5 = load i32 (i8)*, i32 (i8)** %3
%6 = load i32, i32* %4
%7 = and i32 %6, 15
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds [16 x i8], [16 x i8]* @puth.hex, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = call i32 %5(i8 signext %10)
ret i32 1
}

LLVM IR (-O2):
@puth.hex = internal unnamed_addr constant [16 x i8] c"0123456789abcdef"
define i32 @puth(i32 (i8)* nocapture %0, i32 %1) {
%3 = and i32 %1, 15
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [16 x i8], [16 x i8]* @puth.hex, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = tail call i32 %0(i8 signext %6)
ret i32 1
}
/* Variables and functions */
int hal_gpio_uninit();
int hal_uninit() { return hal_gpio_uninit(); }


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

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

LLVM IR (-O0):
define i32 @hal_uninit() {
%1 = call i32 (...) @hal_gpio_uninit()
ret i32 %1
}

LLVM IR (-O2):
define i32 @hal_uninit() {
%1 = tail call i32 (...) @hal_gpio_uninit()
ret i32 %1
}
do_scale_tau(argc, argv) int argc;
char **argv;
{}


x86 assembly (clang, -O0):
<do_scale_tau>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @do_scale_tau(i32 %0, i8** nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ reach_error();
void __VERIFIER_assert(int cond) {
  if (!(cond)) {
  ERROR : {
    reach_error();
    abort();
  }
  }
  return;
}


x86 assembly (clang, -O0):
<__VERIFIER_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1148 <__VERIFIER_assert+0x28>
jmp    113a <__VERIFIER_assert+0x1a>
mov    $0x0,%al
call   1040 <reach_error@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__VERIFIER_assert>:
test   %edi,%edi
je     1125 <__VERIFIER_assert+0x5>
ret
push   %rax
xor    %eax,%eax
call   1040 <reach_error@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @__VERIFIER_assert(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %1
br label %6
6: ; preds = %5
%7 = call i32 (...) @reach_error()
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @__VERIFIER_assert(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 (...) @reach_error()
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret void
}
int *sumar_1_svc(int a, int b, struct svc_req *rqstp) {
  static int r;
  r = a + b;
  return (&r);
}


x86 assembly (clang, -O0):
<sumar_1_svc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,0x2f0a(%rip)
lea    0x2f03(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sumar_1_svc>:
add    %esi,%edi
mov    %edi,0x2f1c(%rip)
lea    0x2f15(%rip),%rax
ret

LLVM IR (-O0):
%struct.svc_req = type opaque
@sumar_1_svc.r = internal global i32 0
define i32* @sumar_1_svc(i32 %0, i32 %1, %struct.svc_req* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.svc_req*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.svc_req* %2, %struct.svc_req** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = add nsw i32 %7, %8
store i32 %9, i32* @sumar_1_svc.r
ret i32* @sumar_1_svc.r
}

LLVM IR (-O2):
%struct.svc_req = type opaque
@sumar_1_svc.r = internal global i32 0
define i32* @sumar_1_svc(i32 %0, i32 %1, %struct.svc_req* nocapture readnone %2) {
%4 = add nsw i32 %1, %0
store i32 %4, i32* @sumar_1_svc.r
ret i32* @sumar_1_svc.r
}
int addnumbers(int a, int b) {
  int sum;
  sum = a + b;
  return sum;
}


x86 assembly (clang, -O0):
<addnumbers>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addnumbers>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @addnumbers(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 = add nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @addnumbers(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
int my_dll_inc1(int y) { return y + 1; }


x86 assembly (clang, -O0):
<my_dll_inc1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_dll_inc1>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @my_dll_inc1(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ emptyObj();
int /*<<< orphan*/ l_push(int /*<<< orphan*/);
int /*<<< orphan*/ saveToSpace(int /*<<< orphan*/);
void l_new() { l_push(saveToSpace(emptyObj())); }


x86 assembly (clang, -O0):
<l_new>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <emptyObj@plt>
mov    %eax,%edi
call   1040 <saveToSpace@plt>
mov    %eax,%edi
call   1050 <l_push@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<l_new>:
push   %rax
xor    %eax,%eax
call   1030 <emptyObj@plt>
mov    %eax,%edi
call   1040 <saveToSpace@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <l_push@plt>

LLVM IR (-O0):
define void @l_new() {
%1 = call i32 (...) @emptyObj()
%2 = call i32 @saveToSpace(i32 %1)
%3 = call i32 @l_push(i32 %2)
ret void
}

LLVM IR (-O2):
define void @l_new() {
%1 = tail call i32 (...) @emptyObj()
%2 = tail call i32 @saveToSpace(i32 %1)
%3 = tail call i32 @l_push(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int deadbeef = 0xdeadbeef;
  printf("0x%x\n", deadbeef);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xdeadbeef,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"0x%x\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -559038737)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
int /*<<< orphan*/ sleep(int);
int write(int, char *, int);
void *h_ack(void *arg) {
  int sock = *((int *)arg);
  char msg = 0x01;
  while (write(sock, &msg, 1) != -1) {
    sleep(2);
  }
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<h_ack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
movb   $0x1,-0x15(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x15(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
cmp    $0xffffffff,%eax
je     1172 <h_ack+0x42>
mov    $0x2,%edi
call   1050 <sleep@plt>
jmp    1149 <h_ack+0x19>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h_ack>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%ebx
movb   $0x1,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    %ebx,%edi
mov    $0x1,%edx
call   1030 <write@plt>
cmp    $0xffffffff,%eax
je     117e <h_ack+0x4e>
lea    0x7(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
mov    $0x2,%edi
call   1050 <sleep@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
cmp    $0xffffffff,%eax
jne    1160 <h_ack+0x30>
xor    %edi,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <pthread_exit@plt>

LLVM IR (-O0):
define i8* @h_ack(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
store i32 %8, i32* %4
store i8 1, i8* %5
br label %9
9: ; preds = %13, %1
%10 = load i32, i32* %4
%11 = call i32 @write(i32 %10, i8* %5, i32 1)
%12 = icmp ne i32 %11, -1
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i32 @sleep(i32 2)
br label %9
15: ; preds = %9
%16 = call i32 @pthread_exit(i32* null)
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
define noalias i8* @h_ack(i8* nocapture %0) {
%2 = alloca i8
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
store i8 1, i8* %2
%5 = call i32 @write(i32 %4, i8* %2, i32 1)
%6 = icmp eq i32 %5, -1
br i1 %6, label %11, label %7
7: ; preds = %1, %7
%8 = tail call i32 @sleep(i32 2)
%9 = call i32 @write(i32 %4, i8* %2, i32 1)
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %7
11: ; preds = %7, %1
%12 = tail call i32 @pthread_exit(i32* null)
ret i8* undef
}
int getBytes(unsigned int e, int i) {
  int result = e >> (i - 1) & 0x1;
  return result;
}


x86 assembly (clang, -O0):
<getBytes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
shr    %cl,%eax
and    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBytes>:
mov    %edi,%eax
lea    -0x1(%rsi),%ecx
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @getBytes(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 = sub nsw i32 %7, 1
%9 = lshr i32 %6, %8
%10 = and i32 %9, 1
store i32 %10, i32* %5
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @getBytes(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = lshr i32 %0, %3
%5 = and i32 %4, 1
ret i32 %5
}
int aee_system_warning(const char *module, const char *path, unsigned int flags,
                       const char *msg, ...) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @aee_system_warning(i8* %0, i8* %1, i32 %2, i8* %3, ...) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
ret i32 0
}

LLVM IR (-O2):
define i32 @aee_system_warning(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i8* nocapture readnone %3, ...) {
ret i32 0
}
/* Variables and functions */
char const *strrchr(char const *, char);
int epr_if_no_scaling(const char *str) {
  int result;
  result = strrchr(str, '*') - str + 1;
  if (result == 1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<epr_if_no_scaling>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2a,%esi
call   1030 <strrchr@plt>
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
add    $0x1,%rax
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    114e <epr_if_no_scaling+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <epr_if_no_scaling+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<epr_if_no_scaling>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2a,%esi
call   1030 <strrchr@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @epr_if_no_scaling(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strrchr(i8* %5, i8 signext 42)
%7 = load i8*, i8** %3
%8 = ptrtoint i8* %6 to i64
%9 = ptrtoint i8* %7 to i64
%10 = sub i64 %8, %9
%11 = add nsw i64 %10, 1
%12 = trunc i64 %11 to i32
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %16
15: ; preds = %1
store i32 1, i32* %2
br label %17
16: ; preds = %1
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @epr_if_no_scaling(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 42)
%3 = ptrtoint i8* %2 to i64
%4 = ptrtoint i8* %0 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
struct rtattr {
  int dummy;
};
typedef int /*<<< orphan*/ __u16;

/* Variables and functions */
__u16 rta_getattr_u16(const struct rtattr *rta) {
  return *(__u16 *)((
      void *)(((char *)(rta)) +
              ((((sizeof(struct rtattr)) + 4 - 1) & ~(4 - 1)) + (0))));
}


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

x86 assembly (clang, -O2):
<rta_getattr_u16>:
mov    0x4(%rdi),%eax
ret

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

LLVM IR (-O2):
%struct.rtattr = type { i32 }
define i32 @rta_getattr_u16(%struct.rtattr* nocapture %0) {
%2 = getelementptr inbounds %struct.rtattr, %struct.rtattr* %0, i64 1, i32 0
%3 = load i32, i32* %2
ret i32 %3
}