xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ __u_char;

/* Variables and functions */
int cbmarch_listen(int, int /*<<< orphan*/, int /*<<< orphan*/);
int cbm_listen(int HandleDevice, __u_char DeviceAddress,
               __u_char SecondaryAddress) {
  ;
  return cbmarch_listen(HandleDevice, DeviceAddress, SecondaryAddress);
}


x86 assembly (clang, -O0):
<cbm_listen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <cbmarch_listen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbm_listen>:
jmp    1030 <cbmarch_listen@plt>

LLVM IR (-O0):
define i32 @cbm_listen(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 @cbmarch_listen(i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @cbm_listen(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @cbmarch_listen(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
int main() {
  int x[100], b, *pa, *pb;
  x[50] = 10;
  pa = &x[50];
  b = *pa + 1;
  b = *(pa + 1);
  pb = &x[10];
  *pb = 0;
  *pb += 2;
  (*pb)--;
  x[0] = *pb--;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0xa,-0xc8(%rbp)
lea    -0x190(%rbp),%rax
add    $0xc8,%rax
mov    %rax,-0x1a0(%rbp)
mov    -0x1a0(%rbp),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
mov    -0x1a0(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x194(%rbp)
lea    -0x190(%rbp),%rax
add    $0x28,%rax
mov    %rax,-0x1a8(%rbp)
mov    -0x1a8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x1a8(%rbp),%rax
mov    (%rax),%ecx
add    $0x2,%ecx
mov    %ecx,(%rax)
mov    -0x1a8(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
mov    -0x1a8(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x1a8(%rbp)
mov    (%rax),%eax
mov    %eax,-0x190(%rbp)
xor    %eax,%eax
add    $0x130,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_add_standard_term(int i, int n, int *exp, double *c) {
  int a[2], fail;
  a[0] = n;
  a[1] = i;
  fail = _ada_use_c2phc4c(26, a, exp, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_add_standard_term>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x20(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1a,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_add_standard_term>:
push   %rax
mov    %esi,(%rsp)
mov    %edi,0x4(%rsp)
mov    %rsp,%rsi
mov    $0x1a,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syscon_add_standard_term(i32 %0, i32 %1, i32* %2, double* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca double*
%9 = alloca [2 x i32]
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store double* %3, double** %8
%11 = load i32, i32* %6
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
store i32 %11, i32* %12
%13 = load i32, i32* %5
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 1
store i32 %13, i32* %14
%15 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
%16 = load i32*, i32** %7
%17 = load double*, double** %8
%18 = call i32 @_ada_use_c2phc4c(i32 26, i32* %15, i32* %16, double* %17, i32 0)
store i32 %18, i32* %10
%19 = load i32, i32* %10
ret i32 %19
}

LLVM IR (-O2):
define i32 @syscon_add_standard_term(i32 %0, i32 %1, i32* %2, double* %3) {
%5 = alloca [2 x i32]
%6 = bitcast [2 x i32]* %5 to i8*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %1, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %0, i32* %8
%9 = call i32 @_ada_use_c2phc4c(i32 26, i32* %7, i32* %2, double* %3, i32 0)
ret i32 %9
}
void glTexParameterfv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glTexParameterfv() {
ret void
}
/* Variables and functions */
int exact_square(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  if (exact_square(n) == 1) {
    printf("1");
  } else {
    printf("0");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <exact_square@plt>
cmp    $0x1,%eax
jne    1171 <main+0x41>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
jmp    117d <main+0x4d>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <exact_square@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
or     $0x30,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @exact_square(i32 %4)
%6 = icmp eq i32 %5, 1
%7 = select i1 %6, i32 49, i32 48
%8 = call i32 @putchar(i32 %7)
ret i32 0
}
int c_label(wp)
char **wp;
{ return wp[0][0] == 'f' ? 1 : 0; }


x86 assembly (clang, -O0):
<c_label>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x66,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_label>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmpb   $0x66,(%rcx)
sete   %al
ret

LLVM IR (-O0):
define i32 @c_label(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 102
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @c_label(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 102
%5 = zext i1 %4 to i32
ret i32 %5
}
int fun547() { return 547; }


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

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

LLVM IR (-O0):
define i32 @fun547() {
ret i32 547
}

LLVM IR (-O2):
define i32 @fun547() {
ret i32 547
}
/* Type definitions */
struct lb {
  int dummy;
};

/* Variables and functions */
int lb_add(struct lb *, int, int, int /*<<< orphan*/ *, int /*<<< orphan*/,
           int /*<<< orphan*/ *, int /*<<< orphan*/, int /*<<< orphan*/ *,
           int /*<<< orphan*/ *);
int lb_penalty(struct lb *p, int penalty) {
  return lb_add(p, 3, penalty, NULL, 0, NULL, 0, NULL, NULL);
}


x86 assembly (clang, -O0):
<lb_penalty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0x3,%esi
xor    %eax,%eax
mov    %eax,%r9d
xor    %r8d,%r8d
mov    %r9,%rcx
movl   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <lb_add@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lb_penalty>:
sub    $0x18,%rsp
mov    %esi,%edx
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
movl   $0x0,(%rsp)
mov    $0x3,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <lb_add@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.lb = type { i32 }
define i32 @lb_penalty(%struct.lb* %0, i32 %1) {
%3 = alloca %struct.lb*
%4 = alloca i32
store %struct.lb* %0, %struct.lb** %3
store i32 %1, i32* %4
%5 = load %struct.lb*, %struct.lb** %3
%6 = load i32, i32* %4
%7 = call i32 @lb_add(%struct.lb* %5, i32 3, i32 %6, i32* null, i32 0, i32* null, i32 0, i32* null, i32* null)
ret i32 %7
}

LLVM IR (-O2):
%struct.lb = type { i32 }
define i32 @lb_penalty(%struct.lb* %0, i32 %1) {
%3 = tail call i32 @lb_add(%struct.lb* %0, i32 3, i32 %1, i32* null, i32 0, i32* null, i32 0, i32* null, i32* null)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ invalid_phase(char *);
void phase_3(char *input) { invalid_phase("3b"); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"3b\00"
define void @phase_3(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @invalid_phase(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"3b\00"
define void @phase_3(i8* nocapture readnone %0) {
%2 = tail call i32 @invalid_phase(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
void agl_unloaded(void) {}


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

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

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

LLVM IR (-O2):
define void @agl_unloaded() {
ret void
}
void *val() {
  int *ret = (int *)malloc(sizeof(int) * 10);
  for (int i = 0; i < 10; i++) {
    ret[i] = 3;
  }
  return ret;
}


x86 assembly (clang, -O0):
<val>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x28,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1154 <val+0x44>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x3,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <val+0x1d>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<val>:
push   %rax
mov    $0x28,%edi
call   1030 <malloc@plt>
movaps 0xede(%rip),%xmm0
movups %xmm0,(%rax)
movups %xmm0,0x10(%rax)
movabs $0x300000003,%rcx
mov    %rcx,0x20(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i8* @val() {
%1 = alloca i32*
%2 = alloca i32
%3 = call i8* @malloc(i64 40)
%4 = bitcast i8* %3 to i32*
store i32* %4, i32** %1
store i32 0, i32* %2
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 10
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i32*, i32** %1
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
store i32 3, i32* %12
br label %13
13: ; preds = %8
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %5
16: ; preds = %5
%17 = load i32*, i32** %1
%18 = bitcast i32* %17 to i8*
ret i8* %18
}

LLVM IR (-O2):
define noalias i8* @val() {
%1 = tail call dereferenceable_or_null(40) i8* @malloc(i64 40)
%2 = bitcast i8* %1 to i32*
%3 = bitcast i8* %1 to <4 x i32>*
store <4 x i32> <i32 3, i32 3, i32 3, i32 3>, <4 x i32>* %3
%4 = getelementptr inbounds i32, i32* %2, i64 4
%5 = bitcast i32* %4 to <4 x i32>*
store <4 x i32> <i32 3, i32 3, i32 3, i32 3>, <4 x i32>* %5
%6 = getelementptr inbounds i32, i32* %2, i64 8
store i32 3, i32* %6
%7 = getelementptr inbounds i32, i32* %2, i64 9
store i32 3, i32* %7
ret i8* %1
}
int t(int i) {
  int j;
  if (i >= 0)
    j = i;
  else
    j = -i;
  return j;
}


x86 assembly (clang, -O0):
<t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     111c <t+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <t+0x24>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @t(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ mcal_cpu_nop();
int main(void) {
  volatile uint32_t counter = 0;
  while (1) {
    mcal_cpu_nop();
    counter++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <mcal_cpu_nop@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    %rax,-0x10(%rbp)
jmp    1127 <main+0x17>

x86 assembly (clang, -O2):
<main>:
push   %rax
movq   $0x0,(%rsp)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <mcal_cpu_nop@plt>
addq   $0x1,(%rsp)
jmp    1120 <main+0x10>

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store volatile i64 0, i64* %1
br label %3
3: ; preds = %3, %0
%4 = tail call i32 (...) @mcal_cpu_nop()
%5 = load volatile i64, i64* %1
%6 = add nsw i64 %5, 1
store volatile i64 %6, i64* %1
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int whatIsThis(int *, int);
int main() {
  int x, a[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  x = whatIsThis(a, 10);
  printf("Result is %d\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1050 <whatIsThis@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1040 <whatIsThis@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
@.str = [14 x i8] c"Result is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x i32]
store i32 0, i32* %1
%4 = bitcast [10 x i32]* %3 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%6 = call i32 @whatIsThis(i32* %5, i32 10)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
@.str = [14 x i8] c"Result is %d\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @whatIsThis(i32* %3, i32 10)
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
void load_cr0(unsigned long cr0) { asm volatile("mov %0, %%cr0" : : "r"(cr0)); }


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

x86 assembly (clang, -O2):
<load_cr0>:
mov    %rdi,%cr0
ret

LLVM IR (-O0):
define void @load_cr0(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret void
}

LLVM IR (-O2):
define void @load_cr0(i64 %0) {
tail call void asm sideeffect "mov $0, %cr0", "r,~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret void
}
int mvebu_pwm_probe(struct platform_device *pdev,
                    struct mvebu_gpio_chip *mvchip, int id) {
  return 0;
}


x86 assembly (clang, -O0):
<mvebu_pwm_probe>:
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):
<mvebu_pwm_probe>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.platform_device = type opaque
%struct.mvebu_gpio_chip = type opaque
define i32 @mvebu_pwm_probe(%struct.platform_device* %0, %struct.mvebu_gpio_chip* %1, i32 %2) {
%4 = alloca %struct.platform_device*
%5 = alloca %struct.mvebu_gpio_chip*
%6 = alloca i32
store %struct.platform_device* %0, %struct.platform_device** %4
store %struct.mvebu_gpio_chip* %1, %struct.mvebu_gpio_chip** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.platform_device = type opaque
%struct.mvebu_gpio_chip = type opaque
define i32 @mvebu_pwm_probe(%struct.platform_device* nocapture readnone %0, %struct.mvebu_gpio_chip* nocapture readnone %1, i32 %2) {
ret i32 0
}
void __attribute__((weak)) tim8_trg_com_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<tim8_trg_com_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tim8_trg_com_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.tim8_trg_com_isr = [17 x i8] c"tim8_trg_com_isr\00"
define weak void @tim8_trg_com_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.tim8_trg_com_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.tim8_trg_com_isr = [17 x i8] c"tim8_trg_com_isr\00"
define weak void @tim8_trg_com_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.tim8_trg_com_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HwFreedomHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void HwFreedomRequestUpdate() { UAVObjRequestUpdate(HwFreedomHandle()); }


x86 assembly (clang, -O0):
<HwFreedomRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <HwFreedomHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HwFreedomRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <HwFreedomHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @HwFreedomRequestUpdate() {
%1 = call i32 (...) @HwFreedomHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @HwFreedomRequestUpdate() {
%1 = tail call i32 (...) @HwFreedomHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
int rchild(int i) { return 2 * i + 1; }


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

x86 assembly (clang, -O2):
<rchild>:
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @rchild(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = or i32 %2, 1
ret i32 %3
}
int compound_assign_2() {
  int x;
  return x += 1;
}


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

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

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

LLVM IR (-O2):
define i32 @compound_assign_2() {
ret i32 undef
}
/* Variables and functions */
int GL_COLOR_BUFFER_BIT;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ drawGifts();
int /*<<< orphan*/ drawSnow();
int /*<<< orphan*/ drawSnowMan();
int /*<<< orphan*/ drawTree();
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ glutSwapBuffers();
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  drawSnow();
  drawTree();
  drawSnowMan();
  drawGifts();
  glutSwapBuffers();
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e5d(%rip),%rax
mov    (%rax),%edi
mov    0x2e64(%rip),%rax
or     (%rax),%edi
call   1030 <glClear@plt>
mov    $0x0,%al
call   1040 <drawSnow@plt>
mov    $0x0,%al
call   1070 <drawTree@plt>
mov    $0x0,%al
call   1090 <drawSnowMan@plt>
mov    $0x0,%al
call   1080 <drawGifts@plt>
mov    $0x0,%al
call   1050 <glutSwapBuffers@plt>
mov    $0x0,%al
call   1060 <glFlush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2e60(%rip),%rax
mov    0x2e69(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1030 <glClear@plt>
xor    %eax,%eax
call   1040 <drawSnow@plt>
xor    %eax,%eax
call   1070 <drawTree@plt>
xor    %eax,%eax
call   1090 <drawSnowMan@plt>
xor    %eax,%eax
call   1080 <drawGifts@plt>
xor    %eax,%eax
call   1050 <glutSwapBuffers@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <glFlush@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %1, %2
%4 = call i32 @glClear(i32 %3)
%5 = call i32 (...) @drawSnow()
%6 = call i32 (...) @drawTree()
%7 = call i32 (...) @drawSnowMan()
%8 = call i32 (...) @drawGifts()
%9 = call i32 (...) @glutSwapBuffers()
%10 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %2, %1
%4 = tail call i32 @glClear(i32 %3)
%5 = tail call i32 (...) @drawSnow()
%6 = tail call i32 (...) @drawTree()
%7 = tail call i32 (...) @drawSnowMan()
%8 = tail call i32 (...) @drawGifts()
%9 = tail call i32 (...) @glutSwapBuffers()
%10 = tail call i32 (...) @glFlush()
ret void
}
/* Variables and functions */
double sqrt(scalar_t__);
scalar_t__ square(double);
double radius_from_totallength(double radius_bell, double radius,
                               double length) {
  const double h = sqrt(square(radius_bell) - square(radius));
  const double half_length = 0.5 * length;
  return half_length + radius_bell + h;
}


x86 assembly (clang, -O0):
<radius_from_totallength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <square@plt>
mov    %rax,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <square@plt>
mov    -0x30(%rbp),%rdi
sub    %rax,%rdi
call   1040 <sqrt@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  0xe98(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radius_from_totallength>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
call   1030 <square@plt>
mov    %rax,%rbx
movsd  0x8(%rsp),%xmm0
call   1030 <square@plt>
sub    %rax,%rbx
mov    %rbx,%rdi
call   1040 <sqrt@plt>
movsd  0x18(%rsp),%xmm1
mulsd  0xe9d(%rip),%xmm1
addsd  0x10(%rsp),%xmm1
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @radius_from_totallength(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%9 = load double, double* %4
%10 = call i64 @square(double %9)
%11 = load double, double* %5
%12 = call i64 @square(double %11)
%13 = sub nsw i64 %10, %12
%14 = call double @sqrt(i64 %13)
store double %14, double* %7
%15 = load double, double* %6
%16 = fmul double 5.000000e-01, %15
store double %16, double* %8
%17 = load double, double* %8
%18 = load double, double* %4
%19 = fadd double %17, %18
%20 = load double, double* %7
%21 = fadd double %19, %20
ret double %21
}

LLVM IR (-O2):
define double @radius_from_totallength(double %0, double %1, double %2) {
%4 = tail call i64 @square(double %0)
%5 = tail call i64 @square(double %1)
%6 = sub nsw i64 %4, %5
%7 = tail call double @sqrt(i64 %6)
%8 = fmul double %2, 5.000000e-01
%9 = fadd double %8, %0
%10 = fadd double %9, %7
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ memmove(void *, void const *, size_t);
void bcopy(const void *s1, void *s2, size_t n) { memmove(s2, s1, n); }


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

x86 assembly (clang, -O2):
<bcopy>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <memmove@plt>

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

LLVM IR (-O2):
define void @bcopy(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memmove(i8* %1, i8* %0, i64 %2)
ret void
}
void busyloop(n) {
  while (--n > 0)
    ;
}


x86 assembly (clang, -O0):
<busyloop>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
jle    111e <busyloop+0x1e>
jmp    1107 <busyloop+0x7>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @busyloop(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
store i32 %5, i32* %2
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @busyloop(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
int system(char *);
void remove_old_files() {
  char rm_command[80];
  sprintf(rm_command, "rm %s/*-*-*", ".");
  int ignore = system(rm_command);
}


x86 assembly (clang, -O0):
<remove_old_files>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x50(%rbp),%rdi
lea    0xecd(%rip),%rsi
lea    0xed2(%rip),%rdx
call   1040 <sprintf@plt>
lea    -0x50(%rbp),%rdi
call   1030 <system@plt>
mov    %eax,-0x54(%rbp)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_old_files>:
push   %rbx
sub    $0x50,%rsp
lea    0xed4(%rip),%rsi
lea    0xed9(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"rm %s/*-*-*\00"
@.str.1 = [2 x i8] c".\00"
define void @remove_old_files() {
%1 = alloca [80 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%6 = call i32 @system(i8* %5)
store i32 %6, i32* %2
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"rm %s/*-*-*\00"
@.str.1 = [2 x i8] c".\00"
define void @remove_old_files() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @system(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int main() {
  signed char a = -30;
  signed char b = -31;
  if (a > (unsigned short)b)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0xe2,-0x5(%rbp)
movb   $0xe1,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
movzwl %cx,%ecx
cmp    %ecx,%eax
jle    1141 <main+0x31>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
store i8 -30, i8* %2
store i8 -31, i8* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = load i8, i8* %3
%7 = sext i8 %6 to i16
%8 = zext i16 %7 to i32
%9 = icmp sgt i32 %5, %8
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int fetestexcept(int excepts) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fetestexcept(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void cleanup_free(void **ptr) { free(*ptr); }


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

x86 assembly (clang, -O2):
<cleanup_free>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @cleanup_free(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *html_encode(char *);
char *html_encode_and_free_original(char *s) {
  char *result;
  if (s == NULL) {
    return NULL;
  }
  result = html_encode(s);
  free(s);
  return result;
}


x86 assembly (clang, -O0):
<html_encode_and_free_original>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1144 <html_encode_and_free_original+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1162 <html_encode_and_free_original+0x42>
mov    -0x10(%rbp),%rdi
call   1040 <html_encode@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<html_encode_and_free_original>:
test   %rdi,%rdi
je     1147 <html_encode_and_free_original+0x27>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <html_encode@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @html_encode_and_free_original(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* null, i8** %2
br label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i8* @html_encode(i8* %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %3
%12 = call i32 @free(i8* %11)
%13 = load i8*, i8** %4
store i8* %13, i8** %2
br label %14
14: ; preds = %8, %7
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
define i8* @html_encode_and_free_original(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i8* @html_encode(i8* %0)
%5 = tail call i32 @free(i8* %0)
br label %6
6: ; preds = %1, %3
%7 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %7
}
int hcf(int a, int b) {
  while (a != b) {
    if (a > b)
      a -= b;
    else
      b -= a;
  }
  return a;
}


x86 assembly (clang, -O0):
<hcf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1142 <hcf+0x42>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1132 <hcf+0x32>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    113d <hcf+0x3d>
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    110a <hcf+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hcf>:
mov    %edi,%eax
cmp    %esi,%edi
je     1127 <hcf+0x27>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %eax,%esi
mov    $0x0,%edx
cmovl  %esi,%edx
mov    %eax,%edi
cmovl  %ecx,%edi
sub    %edx,%eax
sub    %edi,%esi
cmp    %esi,%eax
jne    1110 <hcf+0x10>
ret

LLVM IR (-O0):
define i32 @hcf(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 = %21, %2
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = icmp ne i32 %6, %7
br i1 %8, label %9, label %22
9: ; preds = %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = icmp sgt i32 %10, %11
br i1 %12, label %13, label %17
13: ; preds = %9
%14 = load i32, i32* %4
%15 = load i32, i32* %3
%16 = sub nsw i32 %15, %14
store i32 %16, i32* %3
br label %21
17: ; preds = %9
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = sub nsw i32 %19, %18
store i32 %20, i32* %4
br label %21
21: ; preds = %17, %13
br label %5
22: ; preds = %5
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @hcf(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ %1, %2 ]
%6 = phi i32 [ %9, %4 ], [ %0, %2 ]
%7 = icmp slt i32 %5, %6
%8 = select i1 %7, i32 %5, i32 0
%9 = sub nsw i32 %6, %8
%10 = select i1 %7, i32 0, i32 %6
%11 = sub nsw i32 %5, %10
%12 = icmp eq i32 %9, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %2
%14 = phi i32 [ %0, %2 ], [ %9, %4 ]
ret i32 %14
}
void scroll() { asm volatile("movl $0xD, %%eax; int $0x80" : : : "eax"); }


x86 assembly (clang, -O0):
<scroll>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd,%eax
int    $0x80
pop    %rbp
ret

x86 assembly (clang, -O2):
<scroll>:
mov    $0xd,%eax
int    $0x80
ret

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

LLVM IR (-O2):
define void @scroll() {
tail call void asm sideeffect "movl $$0xD, %eax; int $$0x80", "~{eax},~{dirflag},~{fpsr},~{flags}"()
ret void
}
void network_shutdown(void) {}


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

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

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

LLVM IR (-O2):
define void @network_shutdown() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_byte(int /*<<< orphan*/);
void write_string_as_big_endian_unicode(char *s) {
  while (*s != 0) {
    write_byte(0);
    write_byte(*s++);
  }
}


x86 assembly (clang, -O0):
<write_string_as_big_endian_unicode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114f <write_string_as_big_endian_unicode+0x3f>
xor    %edi,%edi
call   1030 <write_byte@plt>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <write_byte@plt>
jmp    111c <write_string_as_big_endian_unicode+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_string_as_big_endian_unicode>:
push   %rbx
cmpb   $0x0,(%rdi)
je     1139 <write_string_as_big_endian_unicode+0x29>
mov    %rdi,%rbx
add    $0x1,%rbx
nopl   (%rax)
xor    %edi,%edi
call   1030 <write_byte@plt>
movsbl -0x1(%rbx),%edi
call   1030 <write_byte@plt>
cmpb   $0x0,(%rbx)
lea    0x1(%rbx),%rbx
jne    1120 <write_string_as_big_endian_unicode+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @write_string_as_big_endian_unicode(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %7, %4 ], [ %0, %1 ]
%6 = tail call i32 @write_byte(i32 0)
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = load i8, i8* %5
%9 = sext i8 %8 to i32
%10 = tail call i32 @write_byte(i32 %9)
%11 = load i8, i8* %7
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}
char *plugin_info(void) { return "Test V0.1"; }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"Test V0.1\00"
define i8* @plugin_info() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [10 x i8] c"Test V0.1\00"
define i8* @plugin_info() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
scalar_t__ setjmp(int /*<<< orphan*/);
int main() {
  jmp_buf entry;
  if (setjmp(entry) != 0) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <setjmp@plt>
cmp    $0x0,%rax
je     113d <main+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <main+0x34>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <setjmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @setjmp(i32 undef)
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
float sqrtf(float);
float num_sqrt(float a) { return sqrtf(a); }


x86 assembly (clang, -O0):
<num_sqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sqrtf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_sqrt>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     111d <num_sqrt+0xd>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrtf@plt>

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

LLVM IR (-O2):
define float @num_sqrt(float %0) {
%2 = tail call float @sqrtf(float %0)
ret float %2
}
union U2 *f5() {
  ;
}


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

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

LLVM IR (-O0):
%union.U2 = type opaque
define %union.U2* @f5() {
%1 = alloca %union.U2*
%2 = load %union.U2*, %union.U2** %1
ret %union.U2* %2
}

LLVM IR (-O2):
%union.U2 = type opaque
define noalias %union.U2* @f5() {
ret %union.U2* undef
}
int foo(void) { return 34; }


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

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

LLVM IR (-O0):
define i32 @foo() {
ret i32 34
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 34
}
/* Variables and functions */
int f303(int *);
int f304(int *p) { return f303(p); }


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

x86 assembly (clang, -O2):
<f304>:
jmp    1030 <f303@plt>

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

LLVM IR (-O2):
define i32 @f304(i32* %0) {
%2 = tail call i32 @f303(i32* %0)
ret i32 %2
}
double MJD(const double et) {
  double jd = (et / 86400.0) - 0.5;
  return jd + 51545.0;
}


x86 assembly (clang, -O0):
<MJD>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xefa(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xee6(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xecd(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MJD>:
divsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @MJD(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fdiv double %4, 8.640000e+04
%6 = fsub double %5, 5.000000e-01
store double %6, double* %3
%7 = load double, double* %3
%8 = fadd double %7, 5.154500e+04
ret double %8
}

LLVM IR (-O2):
define double @MJD(double %0) {
%2 = fdiv double %0, 8.640000e+04
%3 = fadd double %2, -5.000000e-01
%4 = fadd double %3, 5.154500e+04
ret double %4
}
int is_whitespace(char c) {
  if (c == ' ' || c == '\t' || c == '\n')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1131 <is_whitespace+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
je     1131 <is_whitespace+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
jne    113d <is_whitespace+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <is_whitespace+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_whitespace>:
cmp    $0x20,%dil
ja     1120 <is_whitespace+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <is_whitespace+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_whitespace(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 32
br i1 %6, label %15, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 9
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 10
br i1 %14, label %15, label %16
15: ; preds = %11, %7, %1
store i32 1, i32* %2
br label %17
16: ; preds = %11
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 @is_whitespace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 10, label %3
i8 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
void websils_session_abi_0() {}


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

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

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

LLVM IR (-O2):
define void @websils_session_abi_0() {
ret void
}
/* Variables and functions */
scalar_t__ get_flag(int);
int /*<<< orphan*/ reset_flag(int);
int /*<<< orphan*/ set_flag(int);
void op0x3F(void) {
  reset_flag(0x40);
  reset_flag(0x20);
  if (get_flag(0x10))
    reset_flag(0x10);
  else
    set_flag(0x10);
}


x86 assembly (clang, -O0):
<op0x3F>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40,%edi
call   1030 <reset_flag@plt>
mov    $0x20,%edi
call   1030 <reset_flag@plt>
mov    $0x10,%edi
call   1040 <get_flag@plt>
cmp    $0x0,%rax
je     116b <op0x3F+0x3b>
mov    $0x10,%edi
call   1030 <reset_flag@plt>
jmp    1175 <op0x3F+0x45>
mov    $0x10,%edi
call   1050 <set_flag@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op0x3F>:
push   %rax
mov    $0x40,%edi
call   1030 <reset_flag@plt>
mov    $0x20,%edi
call   1030 <reset_flag@plt>
mov    $0x10,%edi
call   1040 <get_flag@plt>
mov    $0x10,%edi
test   %rax,%rax
je     115f <op0x3F+0x2f>
pop    %rax
jmp    1030 <reset_flag@plt>
pop    %rax
jmp    1050 <set_flag@plt>

LLVM IR (-O0):
define void @op0x3F() {
%1 = call i32 @reset_flag(i32 64)
%2 = call i32 @reset_flag(i32 32)
%3 = call i64 @get_flag(i32 16)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @reset_flag(i32 16)
br label %9
7: ; preds = %0
%8 = call i32 @set_flag(i32 16)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @op0x3F() {
%1 = tail call i32 @reset_flag(i32 64)
%2 = tail call i32 @reset_flag(i32 32)
%3 = tail call i64 @get_flag(i32 16)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = tail call i32 @reset_flag(i32 16)
br label %9
7: ; preds = %0
%8 = tail call i32 @set_flag(i32 16)
br label %9
9: ; preds = %7, %5
ret void
}