xunge/DecIR huggingface dataset:
int legendre_dreieck_free(double ***lf_anker) {
  double *pd;
  double **lf_matrix;
  lf_matrix = *lf_anker;
  pd = *lf_matrix;
  free(lf_matrix);
  free(pd);
  return 0;
}


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

x86 assembly (clang, -O2):
<legendre_dreieck_free>:
push   %rbx
mov    (%rdi),%rdi
mov    (%rdi),%rbx
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @legendre_dreieck_free(double*** %0) {
%2 = alloca double***
%3 = alloca double*
%4 = alloca double**
store double*** %0, double**** %2
%5 = load double***, double**** %2
%6 = load double**, double*** %5
store double** %6, double*** %4
%7 = load double**, double*** %4
%8 = load double*, double** %7
store double* %8, double** %3
%9 = load double**, double*** %4
%10 = bitcast double** %9 to i8*
%11 = load double*, double** %3
%12 = bitcast double* %11 to i8*
ret i32 0
}

LLVM IR (-O2):
define i32 @legendre_dreieck_free(double*** nocapture %0) {
%2 = load double**, double*** %0
%3 = bitcast double** %2 to i8**
%4 = load i8*, i8** %3
%5 = bitcast double** %2 to i8*
tail call void @free(i8* %5)
tail call void @free(i8* %4)
ret i32 0
}
int ocfs2_set_bit(int nr, void *addr) {
  int mask, retval;
  unsigned char *ADDR = (unsigned char *)addr;
  ADDR += nr >> 3;
  mask = 1 << (nr & 0x07);
  retval = (mask & *ADDR) != 0;
  *ADDR |= mask;
  return retval;
}


x86 assembly (clang, -O0):
<ocfs2_set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x3,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
movzbl (%rcx),%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rax
movzbl (%rax),%ecx
or     %edx,%ecx
mov    %cl,(%rax)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ocfs2_set_bit>:
mov    %edi,%ecx
mov    %edi,%eax
sar    $0x3,%eax
movslq %eax,%rdx
and    $0x7,%cl
movzbl (%rsi,%rdx,1),%edi
mov    %edi,%eax
shr    %cl,%eax
and    $0x1,%eax
bts    %ecx,%edi
mov    %dil,(%rsi,%rdx,1)
ret

LLVM IR (-O0):
define i32 @ocfs2_set_bit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%8 = load i8*, i8** %4
store i8* %8, i8** %7
%9 = load i32, i32* %3
%10 = ashr i32 %9, 3
%11 = load i8*, i8** %7
%12 = sext i32 %10 to i64
%13 = getelementptr inbounds i8, i8* %11, i64 %12
store i8* %13, i8** %7
%14 = load i32, i32* %3
%15 = and i32 %14, 7
%16 = shl i32 1, %15
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = load i8*, i8** %7
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = and i32 %17, %20
%22 = icmp ne i32 %21, 0
%23 = zext i1 %22 to i32
store i32 %23, i32* %6
%24 = load i32, i32* %5
%25 = load i8*, i8** %7
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = or i32 %27, %24
%29 = trunc i32 %28 to i8
store i8 %29, i8* %25
%30 = load i32, i32* %6
ret i32 %30
}

LLVM IR (-O2):
define i32 @ocfs2_set_bit(i32 %0, i8* nocapture %1) {
%3 = ashr i32 %0, 3
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = and i32 %0, 7
%7 = shl nuw nsw i32 1, %6
%8 = load i8, i8* %5
%9 = zext i8 %8 to i32
%10 = lshr i32 %9, %6
%11 = and i32 %10, 1
%12 = trunc i32 %7 to i8
%13 = or i8 %8, %12
store i8 %13, i8* %5
ret i32 %11
}
char *foo(char *p, char *q) {
  int x = (p != 0) + (q != 0);
  if (x == 2)
    return "a";
  else
    return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
cmpq   $0x0,-0x18(%rbp)
setne  %cl
and    $0x1,%cl
movzbl %cl,%ecx
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x2,-0x1c(%rbp)
jne    1146 <foo+0x46>
lea    0xec3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    114e <foo+0x4e>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %ecx,%ecx
test   %rsi,%rsi
setne  %cl
cmp    $0x1,%rdi
sbb    $0xffffffff,%ecx
xor    %eax,%eax
cmp    $0x2,%ecx
lea    0xee5(%rip),%rcx
cmove  %rcx,%rax
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
define i8* @foo(i8* readnone %0, i8* readnone %1) {
%3 = icmp ne i8* %0, null
%4 = zext i1 %3 to i32
%5 = icmp ne i8* %1, null
%6 = zext i1 %5 to i32
%7 = add nuw nsw i32 %6, %4
%8 = icmp eq i32 %7, 2
%9 = select i1 %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* null
ret i8* %9
}
void InitLoadPoint() { return; }


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

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

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

LLVM IR (-O2):
define void @InitLoadPoint() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gopanic();
void *die(void *x) {
  gopanic();
  return 0;
}


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

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

LLVM IR (-O0):
define i8* @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @gopanic()
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @die(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @gopanic()
ret i8* null
}
/* Variables and functions */
int strcmp(char const *, char const *);
int strcoll(const char *cs, const char *ct) { return strcmp(cs, ct); }


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

x86 assembly (clang, -O2):
<strcoll>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @strcoll(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void button_x(int state, int value2) { printf("Button X: %i\n", state); }


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

x86 assembly (clang, -O2):
<button_x>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"Button X: %i\0A\00"
define void @button_x(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VISIBLESTRING;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_VISIBLESTRING_it;
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void ASN1_VISIBLESTRING_free(ASN1_VISIBLESTRING *a) {
  ASN1_item_free((ASN1_VALUE *)a, &ASN1_VISIBLESTRING_it);
}


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

x86 assembly (clang, -O2):
<ASN1_VISIBLESTRING_free>:
mov    0x2ec9(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

LLVM IR (-O0):
@ASN1_VISIBLESTRING_it = global i32 0
define void @ASN1_VISIBLESTRING_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ASN1_item_free(i32* %3, i32* @ASN1_VISIBLESTRING_it)
ret void
}

LLVM IR (-O2):
@ASN1_VISIBLESTRING_it = global i32 0
define void @ASN1_VISIBLESTRING_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @ASN1_VISIBLESTRING_it)
ret void
}
void pwmSetModeSys(int mode) { return; }


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

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

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

LLVM IR (-O2):
define void @pwmSetModeSys(i32 %0) {
ret void
}
void g_async_queue_length_unlocked() {}


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

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

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

LLVM IR (-O2):
define void @g_async_queue_length_unlocked() {
ret void
}
/* Variables and functions */
int nondet_int();
int register_blkdev(unsigned int major, char const *name) {
  int result;
  int tmp;
  {
    tmp = nondet_int();
    result = tmp;
    return (result);
  }
}


x86 assembly (clang, -O0):
<register_blkdev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <nondet_int@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @register_blkdev(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%7 = call i32 (...) @nondet_int()
store i32 %7, i32* %6
%8 = load i32, i32* %6
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @register_blkdev(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @nondet_int()
ret i32 %3
}
/* Variables and functions */
int getConfigInt(char *, int);
int /*<<< orphan*/ setLogLevel(int);
void setCustomLogLevel() {
  int dbLogLevel = getConfigInt("web.loglevel", 1);
  if (dbLogLevel > 0) {
    setLogLevel(dbLogLevel);
  }
}


x86 assembly (clang, -O0):
<setCustomLogLevel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x1,%esi
call   1030 <getConfigInt@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    114e <setCustomLogLevel+0x2e>
mov    -0x4(%rbp),%edi
call   1040 <setLogLevel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setCustomLogLevel>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x1,%esi
call   1030 <getConfigInt@plt>
test   %eax,%eax
jle    113e <setCustomLogLevel+0x1e>
mov    %eax,%edi
pop    %rax
jmp    1040 <setLogLevel@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [13 x i8] c"web.loglevel\00"
define void @setCustomLogLevel() {
%1 = alloca i32
%2 = call i32 @getConfigInt(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 1)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* %1
%7 = call i32 @setLogLevel(i32 %6)
br label %8
8: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"web.loglevel\00"
define void @setCustomLogLevel() {
%1 = tail call i32 @getConfigInt(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = icmp sgt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @setLogLevel(i32 %1)
br label %5
5: ; preds = %3, %0
ret void
}
void __DELETE_org_xmlvm_runtime_Condition(void *me, void *client_data) {}


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

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

LLVM IR (-O0):
define void @__DELETE_org_xmlvm_runtime_Condition(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @__DELETE_org_xmlvm_runtime_Condition(i8* nocapture %0, i8* nocapture %1) {
ret void
}
int ekle(int i, int j) { return i + j; }


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

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

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

LLVM IR (-O2):
define i32 @ekle(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *const);
void serd_free_aligned(void *const ptr) { free(ptr); }


x86 assembly (clang, -O0):
<serd_free_aligned>:
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):
<serd_free_aligned>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @serd_free_aligned(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int _getch();
int getch(void) { return _getch(); }


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

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

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

LLVM IR (-O2):
define i32 @getch() {
%1 = tail call i32 (...) @_getch()
ret i32 %1
}
void notepad_unload(void) {}


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

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

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

LLVM IR (-O2):
define void @notepad_unload() {
ret void
}
int rl_abort(count, key)
int count __attribute__((unused)), key __attribute__((unused));
{ return (_rl_abort_internal()); }


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

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

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

LLVM IR (-O2):
define i32 @rl_abort(i32 %0, i32 %1) {
%3 = tail call i32 (...) @_rl_abort_internal()
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ leftSpeed(int /*<<< orphan*/);
int /*<<< orphan*/ rightSpeed(int /*<<< orphan*/);
void stopRobot() {
  leftSpeed(0);
  rightSpeed(0);
}


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

x86 assembly (clang, -O2):
<stopRobot>:
push   %rax
xor    %edi,%edi
call   1040 <leftSpeed@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <rightSpeed@plt>

LLVM IR (-O0):
define void @stopRobot() {
%1 = call i32 @leftSpeed(i32 0)
%2 = call i32 @rightSpeed(i32 0)
ret void
}

LLVM IR (-O2):
define void @stopRobot() {
%1 = tail call i32 @leftSpeed(i32 0)
%2 = tail call i32 @rightSpeed(i32 0)
ret void
}
void DisableEtherdev(void) {}


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

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

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

LLVM IR (-O2):
define void @DisableEtherdev() {
ret void
}
void ARGBColorTableRow_C() {}


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

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

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

LLVM IR (-O2):
define void @ARGBColorTableRow_C() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f2();
void f3(void) { f2(); }


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

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

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

LLVM IR (-O2):
define void @f3() {
%1 = tail call i32 (...) @f2()
ret void
}
void f(int *x, int y) {
  int i;
  for (i = 0; i < 5; i++)
    *(x + i) += 2;
  y += 2;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
jge    113b <f+0x3b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x2,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <f+0x12>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movdqu (%rdi),%xmm0
paddd  0xef4(%rip),%xmm0
movdqu %xmm0,(%rdi)
addl   $0x2,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @f(i32* nocapture %0, i32 %1) {
%3 = bitcast i32* %0 to <4 x i32>*
%4 = load <4 x i32>, <4 x i32>* %3
%5 = add nsw <4 x i32> %4, <i32 2, i32 2, i32 2, i32 2>
%6 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %5, <4 x i32>* %6
%7 = getelementptr inbounds i32, i32* %0, i64 4
%8 = load i32, i32* %7
%9 = add nsw i32 %8, 2
store i32 %9, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ demo_task();
void init_tasks(void) { demo_task(); }


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

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

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

LLVM IR (-O2):
define void @init_tasks() {
%1 = tail call i32 (...) @demo_task()
ret void
}
void mcxHashFreeScalar(void *scalar __attribute__((unused))) { ; }


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

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

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

LLVM IR (-O2):
define void @mcxHashFreeScalar(i8* nocapture %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ state;
};
typedef TYPE_1__ XButtonReleasedEvent;

/* Variables and functions */
unsigned get_XButtonReleasedEvent_state(void *_p) {
  return (unsigned)((XButtonReleasedEvent *)_p)->state;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XButtonReleasedEvent_state(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7_RECIP_INFO;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_RECIP_INFO_it;
void PKCS7_RECIP_INFO_free(PKCS7_RECIP_INFO *a) {
  ASN1_item_free((ASN1_VALUE *)a, &PKCS7_RECIP_INFO_it);
}


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

x86 assembly (clang, -O2):
<PKCS7_RECIP_INFO_free>:
mov    0x2ed1(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

LLVM IR (-O0):
@PKCS7_RECIP_INFO_it = global i32 0
define void @PKCS7_RECIP_INFO_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ASN1_item_free(i32* %3, i32* @PKCS7_RECIP_INFO_it)
ret void
}

LLVM IR (-O2):
@PKCS7_RECIP_INFO_it = global i32 0
define void @PKCS7_RECIP_INFO_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @PKCS7_RECIP_INFO_it)
ret void
}
int close_modbus() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @close_modbus() {
ret i32 0
}
/* Variables and functions */
int f220(int *);
int f221(int *p) { return f220(p); }


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

x86 assembly (clang, -O2):
<f221>:
jmp    1030 <f220@plt>

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

LLVM IR (-O2):
define i32 @f221(i32* %0) {
%2 = tail call i32 @f220(i32* %0)
ret i32 %2
}
void genbgtzl() {}


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

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

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

LLVM IR (-O2):
define void @genbgtzl() {
ret void
}
/* Type definitions */
typedef char wchar_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwprintf(int /*<<< orphan*/ *, char const *, int);
void uninitvar_fwprintf(void) {
  FILE *stream;
  const wchar_t *format;
  int i;
  (void)fwprintf(stream, format, i);
}


x86 assembly (clang, -O0):
<uninitvar_fwprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <fwprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_fwprintf>:
jmp    1030 <fwprintf@plt>

LLVM IR (-O0):
define void @uninitvar_fwprintf() {
%1 = alloca i32*
%2 = alloca i8*
%3 = alloca i32
%4 = load i32*, i32** %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = call i32 @fwprintf(i32* %4, i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @uninitvar_fwprintf() {
%1 = tail call i32 @fwprintf(i32* undef, i8* undef, i32 undef)
ret void
}
point(x, y) float x, y;
{
  point1(x);
  point1(y);
}


x86 assembly (clang, -O0):
<point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm1,-0x18(%rbp)
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <point1@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <point1@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<point>:
push   %rax
cvtsd2ss %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,0x4(%rsp)
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <point1@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
pop    %rcx
jmp    1030 <point1@plt>

LLVM IR (-O0):
define i32 @point(double %0, double %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca float
%6 = fptrunc double %0 to float
%7 = fptrunc double %1 to float
store float %6, float* %4
store float %7, float* %5
%8 = load float, float* %4
%9 = fpext float %8 to double
%10 = call i32 (double, ...) bitcast (i32 (...)* @point1 to i32 (double, ...)*)(double %9)
%11 = load float, float* %5
%12 = fpext float %11 to double
%13 = call i32 (double, ...) bitcast (i32 (...)* @point1 to i32 (double, ...)*)(double %12)
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @point(double %0, double %1) {
%3 = fptrunc double %0 to float
%4 = fptrunc double %1 to float
%5 = fpext float %3 to double
%6 = tail call i32 (double, ...) bitcast (i32 (...)* @point1 to i32 (double, ...)*)(double %5)
%7 = fpext float %4 to double
%8 = tail call i32 (double, ...) bitcast (i32 (...)* @point1 to i32 (double, ...)*)(double %7)
ret i32 undef
}
/* Variables and functions */
unsigned int bpf_log2(unsigned long);
__attribute__((always_)) unsigned int bpf_log2l(unsigned long v) {
  unsigned int hi = v >> 32;
  if (hi)
    return bpf_log2(hi) + 32 + 1;
  else
    return bpf_log2(v) + 1;
}


x86 assembly (clang, -O0):
<bpf_log2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x20,%rax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1149 <bpf_log2l+0x39>
mov    -0x14(%rbp),%eax
mov    %eax,%edi
call   1030 <bpf_log2@plt>
add    $0x20,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <bpf_log2l+0x48>
mov    -0x10(%rbp),%rdi
call   1030 <bpf_log2@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_log2l>:
push   %rax
mov    %rdi,%rax
shr    $0x20,%rax
jne    1121 <bpf_log2l+0x11>
call   1030 <bpf_log2@plt>
jmp    112c <bpf_log2l+0x1c>
mov    %rax,%rdi
call   1030 <bpf_log2@plt>
add    $0x20,%eax
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bpf_log2l(i64 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = lshr i64 %5, 32
%7 = trunc i64 %6 to i32
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %1
%11 = load i32, i32* %4
%12 = zext i32 %11 to i64
%13 = call i32 @bpf_log2(i64 %12)
%14 = add i32 %13, 32
%15 = add i32 %14, 1
store i32 %15, i32* %2
br label %20
16: ; preds = %1
%17 = load i64, i64* %3
%18 = call i32 @bpf_log2(i64 %17)
%19 = add i32 %18, 1
store i32 %19, i32* %2
br label %20
20: ; preds = %16, %10
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @bpf_log2l(i64 %0) {
%2 = icmp ult i64 %0, 4294967296
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = lshr i64 %0, 32
%5 = tail call i32 @bpf_log2(i64 %4)
%6 = add i32 %5, 32
br label %9
7: ; preds = %1
%8 = tail call i32 @bpf_log2(i64 %0)
br label %9
9: ; preds = %7, %3
%10 = phi i32 [ %6, %3 ], [ %8, %7 ]
%11 = add i32 %10, 1
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void intro(void) {
  printf("Joust\n-----\n"
         "Hear ye, hear ye. Let all the noble knights of the kingdom come to "
         "joust\n"
         "at the King's tournament for the favor of the his daughter, the "
         "beautiful\n"
         "princess.\n\n");
}


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

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

LLVM IR (-O0):
@.str = [171 x i8] c"Joust\0A-----\0AHear ye, hear ye. Let all the noble knights of the kingdom come to joust\0Aat the King's tournament for the favor of the his daughter, the beautiful\0Aprincess.\0A\0A\00"
define void @intro() {
%1 = call i32 @printf(i8* getelementptr inbounds ([171 x i8], [171 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [170 x i8] c"Joust\0A-----\0AHear ye, hear ye. Let all the noble knights of the kingdom come to joust\0Aat the King's tournament for the favor of the his daughter, the beautiful\0Aprincess.\0A\00"
define void @intro() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([170 x i8], [170 x i8]* @str, i64 0, i64 0))
ret void
}
double baz(double x, double y, double z, double u) {
  return x * x * x * y * y * y * z * z * z * z * u * u * u * u;
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
movapd %xmm0,%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm4,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @baz(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %5
%11 = fmul double %9, %10
%12 = load double, double* %5
%13 = fmul double %11, %12
%14 = load double, double* %6
%15 = fmul double %13, %14
%16 = load double, double* %6
%17 = fmul double %15, %16
%18 = load double, double* %6
%19 = fmul double %17, %18
%20 = load double, double* %7
%21 = fmul double %19, %20
%22 = load double, double* %7
%23 = fmul double %21, %22
%24 = load double, double* %7
%25 = fmul double %23, %24
%26 = load double, double* %7
%27 = fmul double %25, %26
%28 = load double, double* %8
%29 = fmul double %27, %28
%30 = load double, double* %8
%31 = fmul double %29, %30
%32 = load double, double* %8
%33 = fmul double %31, %32
%34 = load double, double* %8
%35 = fmul double %33, %34
ret double %35
}

LLVM IR (-O2):
define double @baz(double %0, double %1, double %2, double %3) {
%5 = fmul double %0, %0
%6 = fmul double %5, %0
%7 = fmul double %6, %1
%8 = fmul double %7, %1
%9 = fmul double %8, %1
%10 = fmul double %9, %2
%11 = fmul double %10, %2
%12 = fmul double %11, %2
%13 = fmul double %12, %2
%14 = fmul double %13, %3
%15 = fmul double %14, %3
%16 = fmul double %15, %3
%17 = fmul double %16, %3
ret double %17
}
long div_round_up(long n, long d) {
  long tmp = n + d - 1;
  return tmp / d;
}


x86 assembly (clang, -O0):
<div_round_up>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cqto
idivq  -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<div_round_up>:
lea    (%rdi,%rsi,1),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     111a <div_round_up+0x1a>
cqto
idiv   %rsi
ret
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
define i64 @div_round_up(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = add nsw i64 %6, %7
%9 = sub nsw i64 %8, 1
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = load i64, i64* %4
%12 = sdiv i64 %10, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @div_round_up(i64 %0, i64 %1) {
%3 = add i64 %0, -1
%4 = add i64 %3, %1
%5 = sdiv i64 %4, %1
ret i64 %5
}
int do_734() { return 734; }


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

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

LLVM IR (-O0):
define i32 @do_734() {
ret i32 734
}

LLVM IR (-O2):
define i32 @do_734() {
ret i32 734
}
/* Variables and functions */
int mus_write_1(int, int, int, int, int **, int /*<<< orphan*/ *,
                int /*<<< orphan*/);
int mus_file_write_file(int tfd, int beg, int end, int chans, int **bufs) {
  return (mus_write_1(tfd, beg, end, chans, bufs, NULL, 0));
}


x86 assembly (clang, -O0):
<mus_file_write_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%r8
xor    %eax,%eax
mov    %eax,%r9d
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1030 <mus_write_1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_file_write_file>:
push   %rax
movl   $0x0,(%rsp)
xor    %r9d,%r9d
call   1030 <mus_write_1@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @mus_file_write_file(i32 %0, i32 %1, i32 %2, i32 %3, i32** %4) {
%6 = tail call i32 @mus_write_1(i32 %0, i32 %1, i32 %2, i32 %3, i32** %4, i32* null, i32 0)
ret i32 %6
}
unsigned libretro_dummy_retro_api_version(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @libretro_dummy_retro_api_version() {
ret i32 1
}

LLVM IR (-O2):
define i32 @libretro_dummy_retro_api_version() {
ret i32 1
}
void gui_chat_draw_line(struct t_gui_buffer *buffer, struct t_gui_line *line) {
  (void)buffer;
  (void)line;
}


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

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

LLVM IR (-O0):
%struct.t_gui_buffer = type opaque
%struct.t_gui_line = type opaque
define void @gui_chat_draw_line(%struct.t_gui_buffer* %0, %struct.t_gui_line* %1) {
%3 = alloca %struct.t_gui_buffer*
%4 = alloca %struct.t_gui_line*
store %struct.t_gui_buffer* %0, %struct.t_gui_buffer** %3
store %struct.t_gui_line* %1, %struct.t_gui_line** %4
%5 = load %struct.t_gui_buffer*, %struct.t_gui_buffer** %3
%6 = load %struct.t_gui_line*, %struct.t_gui_line** %4
ret void
}

LLVM IR (-O2):
%struct.t_gui_buffer = type opaque
%struct.t_gui_line = type opaque
define void @gui_chat_draw_line(%struct.t_gui_buffer* nocapture %0, %struct.t_gui_line* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void cleanup(void) { system("/bin/sh -c 'rm -rf tmp'"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"/bin/sh -c 'rm -rf tmp'\00"
define void @cleanup() {
%1 = call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"/bin/sh -c 'rm -rf tmp'\00"
define void @cleanup() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
void vsyslog(int pri, const char *fmt, va_list ap) { __set_errno(ENOSYS); }


x86 assembly (clang, -O0):
<vsyslog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@ENOSYS = global i32 0
define void @vsyslog(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
ret void
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define void @vsyslog(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret void
}
/* Variables and functions */
scalar_t__ printf(char *);
void main() {
  int i = 0;
  if (i == 0 && printf("Hello World")) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1144 <main+0x34>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
cmp    $0x0,%rax
je     1144 <main+0x34>
jmp    1144 <main+0x34>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"Hello World\00"
define void @main() {
%1 = tail call i64 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main(void) {
  signed char i;
  for (i = 0; i < 128; ++i) {
    if (i) {
      printf("TRUE %d\n", i);
    } else {
      printf("FALSE %d\n", i);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x80,%eax
jge    1173 <main+0x63>
cmpb   $0x0,-0x5(%rbp)
je     1151 <main+0x41>
lea    0xebd(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
jmp    1161 <main+0x51>
lea    0xeb1(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
jmp    1166 <main+0x56>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    1123 <main+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %ebp,%ebp
lea    0xeec(%rip),%r14
lea    0xedc(%rip),%rbx
jmp    1140 <main+0x30>
cs nopw 0x0(%rax,%rax,1)
movsbl %bpl,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x1,%bpl
test   %bpl,%bpl
jne    1130 <main+0x20>
mov    %r14,%rdi
xor    %esi,%esi
jmp    1137 <main+0x27>

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

LLVM IR (-O2):
@.str = [9 x i8] c"TRUE %d\0A\00"
@.str.1 = [10 x i8] c"FALSE %d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %8, %0
%2 = phi i8 [ 0, %0 ], [ %9, %8 ]
%3 = icmp eq i8 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %2)
br label %8
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8 signext 0)
br label %8
8: ; preds = %4, %6
%9 = add i8 %2, 1
br label %1
}
void Cyc_BansheeIf_resolve_or_default(void *t) { ; }


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

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

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

LLVM IR (-O2):
define void @Cyc_BansheeIf_resolve_or_default(i8* nocapture %0) {
ret void
}
/* Variables and functions */
char const *keystr_find_full(char const *, char const *, char const *, char);
const char *keystr_find_d(const char *restrict map, const char *restrict key,
                          const char *restrict deflt) {
  return keystr_find_full(map, key, deflt, ':');
}


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

x86 assembly (clang, -O2):
<keystr_find_d>:
mov    $0x3a,%ecx
jmp    1030 <keystr_find_full@plt>

LLVM IR (-O0):
define i8* @keystr_find_d(i8* noalias %0, i8* noalias %1, i8* noalias %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i8* @keystr_find_full(i8* %7, i8* %8, i8* %9, i8 signext 58)
ret i8* %10
}

LLVM IR (-O2):
define i8* @keystr_find_d(i8* noalias %0, i8* noalias %1, i8* noalias %2) {
%4 = tail call i8* @keystr_find_full(i8* %0, i8* %1, i8* %2, i8 signext 58)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ foo1();
int /*<<< orphan*/ foo2();
int /*<<< orphan*/ foo3();
int /*<<< orphan*/ foo4();
int main() {
  foo1();
  foo2();
  foo3();
  foo4();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <foo1@plt>
mov    $0x0,%al
call   1040 <foo2@plt>
mov    $0x0,%al
call   1050 <foo3@plt>
mov    $0x0,%al
call   1030 <foo4@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <foo1@plt>
xor    %eax,%eax
call   1040 <foo2@plt>
xor    %eax,%eax
call   1050 <foo3@plt>
xor    %eax,%eax
call   1030 <foo4@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @foo1()
%2 = call i32 (...) @foo2()
%3 = call i32 (...) @foo3()
%4 = call i32 (...) @foo4()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo1()
%2 = tail call i32 (...) @foo2()
%3 = tail call i32 (...) @foo3()
%4 = tail call i32 (...) @foo4()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ xa();
int /*<<< orphan*/ xa1();
int /*<<< orphan*/ xb2();
int xb() {
  xa1();
  xb2();
  xa();
}


x86 assembly (clang, -O0):
<xb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <xa1@plt>
mov    $0x0,%al
call   1040 <xb2@plt>
mov    $0x0,%al
call   1050 <xa@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xb>:
push   %rax
xor    %eax,%eax
call   1030 <xa1@plt>
xor    %eax,%eax
call   1040 <xb2@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <xa@plt>

LLVM IR (-O0):
define i32 @xb() {
%1 = alloca i32
%2 = call i32 (...) @xa1()
%3 = call i32 (...) @xb2()
%4 = call i32 (...) @xa()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @xb() {
%1 = tail call i32 (...) @xa1()
%2 = tail call i32 (...) @xb2()
%3 = tail call i32 (...) @xa()
ret i32 undef
}
/* Variables and functions */
double M_PI;
double cosf(double);
float hamming(float n, float N, float a) {
  (void)a;
  return 0.54 - 0.46 * cosf(2.0 * M_PI * n / (N - 1.0));
}


x86 assembly (clang, -O0):
<hamming>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movsd  0xee9(%rip),%xmm0
mov    0x2eb2(%rip),%rax
mulsd  (%rax),%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xeb8(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1030 <cosf@plt>
movsd  0xe93(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe8f(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hamming>:
push   %rax
mov    0x2ed0(%rip),%rax
movsd  (%rax),%xmm2
addsd  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm0
mulsd  %xmm2,%xmm0
cvtss2sd %xmm1,%xmm1
addsd  0xecc(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <cosf@plt>
mulsd  0xec3(%rip),%xmm0
addsd  0xec3(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define float @hamming(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load double, double* @M_PI
%9 = fmul double 2.000000e+00, %8
%10 = load float, float* %4
%11 = fpext float %10 to double
%12 = fmul double %9, %11
%13 = load float, float* %5
%14 = fpext float %13 to double
%15 = fsub double %14, 1.000000e+00
%16 = fdiv double %12, %15
%17 = call double @cosf(double %16)
%18 = call double @llvm.fmuladd.f64(double -4.600000e-01, double %17, double 5.400000e-01)
%19 = fptrunc double %18 to float
ret float %19
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define float @hamming(float %0, float %1, float %2) {
%4 = load double, double* @M_PI
%5 = fmul double %4, 2.000000e+00
%6 = fpext float %0 to double
%7 = fmul double %5, %6
%8 = fpext float %1 to double
%9 = fadd double %8, -1.000000e+00
%10 = fdiv double %7, %9
%11 = tail call double @cosf(double %10)
%12 = tail call double @llvm.fmuladd.f64(double %11, double -4.600000e-01, double 5.400000e-01)
%13 = fptrunc double %12 to float
ret float %13
}