xunge/DecIR huggingface dataset:
/* Variables and functions */
long double log(double);
__attribute__((weak)) long double logl(long double x) { return log((double)x); }


x86 assembly (clang, -O0):
<logl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <log@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logl>:
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
jmp    1030 <log@plt>

LLVM IR (-O0):
define weak x86_fp80 @logl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call x86_fp80 @log(double %4)
ret x86_fp80 %5
}

LLVM IR (-O2):
define weak x86_fp80 @logl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call x86_fp80 @log(double %2)
ret x86_fp80 %3
}
int main() {
  int a = 5;
  int b = 10;
  int c = a + b;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_assume(int);
int /*<<< orphan*/ assert(int);
int f(int);
int main() {
  int i;
  __ESBMC_assume(i == 3 || i == 4);
  switch (f(i)) {
  case 4:
    assert(i == 3);
    break;
  case 5:
    assert(i == 4);
    break;
  default:
    assert(0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x3,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1158 <main+0x28>
cmpl   $0x4,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
movzbl %al,%edi
and    $0x1,%edi
call   1030 <__ESBMC_assume@plt>
mov    -0x8(%rbp),%edi
call   1040 <f@plt>
mov    %eax,%ecx
mov    %ecx,-0x10(%rbp)
sub    $0x4,%eax
je     1192 <main+0x62>
jmp    1181 <main+0x51>
mov    -0x10(%rbp),%eax
sub    $0x5,%eax
je     11a8 <main+0x78>
jmp    11be <main+0x8e>
cmpl   $0x3,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
jmp    11c5 <main+0x95>
cmpl   $0x4,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
jmp    11c5 <main+0x95>
xor    %edi,%edi
call   1050 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <__ESBMC_assume@plt>
call   1040 <f@plt>
xor    %edi,%edi
call   1050 <assert@plt>
xor    %eax,%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 = icmp eq i32 %3, 3
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 4
br label %8
8: ; preds = %5, %0
%9 = phi i1 [ true, %0 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @__ESBMC_assume(i32 %10)
%12 = load i32, i32* %2
%13 = call i32 @f(i32 %12)
switch i32 %13, label %24 [
i32 4, label %14
i32 5, label %19
]
14: ; preds = %8
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 3
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
br label %26
19: ; preds = %8
%20 = load i32, i32* %2
%21 = icmp eq i32 %20, 4
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
br label %26
24: ; preds = %8
%25 = call i32 @assert(i32 0)
br label %26
26: ; preds = %24, %19, %14
%27 = load i32, i32* %1
ret i32 %27
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__ESBMC_assume(i32 0)
%2 = tail call i32 @f(i32 undef)
%3 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_hour;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int date_get_hour(void) {
  time_t t;
  struct tm *lt;
  t = time(NULL);
  lt = localtime(&t);
  return lt->tm_hour;
}


x86 assembly (clang, -O0):
<date_get_hour>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<date_get_hour>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @date_get_hour() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %4, %struct.tm** %2
%5 = load %struct.tm*, %struct.tm** %2
%6 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 0
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @date_get_hour() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call %struct.tm* @localtime(i32* %1)
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long event;
};
struct TYPE_4__ {
  TYPE_1__ xgravity;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xgravity_event(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xgravity.event = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XEvent_xgravity_event(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
void g_strsignal() {}


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

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

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

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

/* Variables and functions */
uint32_t __udivsi3(uint32_t n, uint32_t d) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__udivsi3(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
char *strstr(char *, char *);
int tosString_locateSubString(char *s, char *sub, int startingAt) {
  char *p = strstr(s + startingAt, sub);
  return p ? p - s : -1;
}


x86 assembly (clang, -O0):
<tosString_locateSubString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     115a <tosString_locateSubString+0x4a>
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x28(%rbp)
jmp    116a <tosString_locateSubString+0x5a>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x28(%rbp)
jmp    116a <tosString_locateSubString+0x5a>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tosString_locateSubString>:
push   %rbx
mov    %rdi,%rbx
movslq %edx,%rdi
add    %rbx,%rdi
call   1030 <strstr@plt>
mov    %eax,%ecx
sub    %ebx,%ecx
cmp    $0x1,%rax
sbb    %eax,%eax
or     %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @tosString_locateSubString(i8* %0, i8* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i8* @strstr(i8* dereferenceable(1) %5, i8* dereferenceable(1) %1)
%7 = icmp eq i8* %6, null
%8 = ptrtoint i8* %6 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
%12 = select i1 %7, i32 -1, i32 %11
ret i32 %12
}
void _start(void) {
  extern void marker(void);
  marker();
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
call   1030 <marker@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_start>:
jmp    1030 <marker@plt>

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

LLVM IR (-O2):
define void @_start() {
tail call void @marker()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ m136_setParams4101(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ m172doBitRev(int /*<<< orphan*/);
void m172_setParams4101(uint16_t addr, uint8_t val) {
  m136_setParams4101(addr, m172doBitRev(val));
}


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

x86 assembly (clang, -O2):
<m172_setParams4101>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <m172doBitRev@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <m136_setParams4101@plt>

LLVM IR (-O0):
define void @m172_setParams4101(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 = call i32 @m172doBitRev(i32 %6)
%8 = call i32 @m136_setParams4101(i32 %5, i32 %7)
ret void
}

LLVM IR (-O2):
define void @m172_setParams4101(i32 %0, i32 %1) {
%3 = tail call i32 @m172doBitRev(i32 %1)
%4 = tail call i32 @m136_setParams4101(i32 %0, i32 %3)
ret void
}
/* Variables and functions */
void *realloc(void *, size_t);
void *xxrealloc(void *ptr, size_t size) { return (realloc(ptr, size)); }


x86 assembly (clang, -O0):
<xxrealloc>:
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 <realloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xxrealloc>:
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define noalias i8* @xxrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int a, b;
  scanf("%d %d", &a, &b);
  printf("%d", a + b);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
add    0x4(%rsp),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, %6
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
int test_imm_DDuint16_reg(unsigned short val) {
  return ((val) & (0xDD << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_DDuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 221
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ demo_throw(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void foo(int fail) {
  fprintf(stderr, "enter foo(%d)\n", fail);
  demo_throw(fail);
  fprintf(stderr, "return from foo(%d)\n", fail);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xec2(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1030 <demo_throw@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xeb1(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2eb3(%rip),%r14
mov    (%r14),%edi
lea    0xec9(%rip),%rsi
mov    %ebx,%edx
call   1040 <fprintf@plt>
mov    %ebx,%edi
call   1030 <demo_throw@plt>
mov    (%r14),%edi
lea    0xec0(%rip),%rsi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"enter foo(%d)\0A\00"
@.str.1 = [21 x i8] c"return from foo(%d)\0A\00"
define void @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @demo_throw(i32 %6)
%8 = load i32, i32* @stderr
%9 = load i32, i32* %2
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"enter foo(%d)\0A\00"
@.str.1 = [21 x i8] c"return from foo(%d)\0A\00"
define void @foo(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @demo_throw(i32 %0)
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
float max_f(float, int /*<<< orphan*/);
int /*<<< orphan*/ min_f(float, float);
float clip(float n, float lower, float upper) {
  return max_f(lower, min_f(n, upper));
}


x86 assembly (clang, -O0):
<clip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1030 <min_f@plt>
movss  -0x10(%rbp),%xmm0
mov    %eax,%edi
call   1040 <max_f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clip>:
push   %rax
movss  %xmm1,0x4(%rsp)
movaps %xmm2,%xmm1
call   1030 <min_f@plt>
movss  0x4(%rsp),%xmm0
mov    %eax,%edi
pop    %rax
jmp    1040 <max_f@plt>

LLVM IR (-O0):
define float @clip(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* %5
%8 = load float, float* %4
%9 = load float, float* %6
%10 = call i32 @min_f(float %8, float %9)
%11 = call float @max_f(float %7, i32 %10)
ret float %11
}

LLVM IR (-O2):
define float @clip(float %0, float %1, float %2) {
%4 = tail call i32 @min_f(float %0, float %2)
%5 = tail call float @max_f(float %1, i32 %4)
ret float %5
}
char *getEndpoint() { return "local"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"local\00"
define i8* @getEndpoint() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"local\00"
define i8* @getEndpoint() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void print_char(char x) { printf("%c", x); }


x86 assembly (clang, -O0):
<print_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @print_char(i8 signext %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *);
void __misaligned_u16(void) { panic("misaligned (__u16 *) in __xchg\n"); }


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"misaligned (__u16 *) in __xchg\0A\00"
define void @__misaligned_u16() {
%1 = call i32 @panic(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"misaligned (__u16 *) in __xchg\0A\00"
define void @__misaligned_u16() {
%1 = tail call i32 @panic(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void set_bit(uint8_t bitmap[], size_t bit) {
  bitmap[bit / 8] |= (1 << (bit % 8));
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x7,%rax
mov    %eax,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    $0x3,%rcx
or     (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
mov    %esi,%ecx
and    $0x7,%cl
mov    $0x1,%eax
shl    %cl,%eax
shr    $0x3,%rsi
or     %eax,(%rdi,%rsi,4)
ret

LLVM IR (-O0):
define void @set_bit(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = urem i64 %5, 8
%7 = trunc i64 %6 to i32
%8 = shl i32 1, %7
%9 = load i32*, i32** %3
%10 = load i64, i64* %4
%11 = udiv i64 %10, 8
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = load i32, i32* %12
%14 = or i32 %13, %8
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @set_bit(i32* nocapture %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = and i32 %3, 7
%5 = shl nuw nsw i32 1, %4
%6 = lshr i64 %1, 3
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = or i32 %8, %5
store i32 %9, i32* %7
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void element_table_opening_output(FILE *output_file) {
  fprintf(output_file, "<td colspan=99><table border=1><tr>\n");
}


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

x86 assembly (clang, -O2):
<element_table_opening_output>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x24,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"<td colspan=99><table border=1><tr>\0A\00"
define void @element_table_opening_output(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"<td colspan=99><table border=1><tr>\0A\00"
define void @element_table_opening_output(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i64 36, i64 1, i32* %0)
ret void
}
/* Variables and functions */
double scalbln(double, long);
double test8(double x, long exp) { return scalbln(x, exp); }


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

x86 assembly (clang, -O2):
<test8>:
jmp    1030 <scalbln@plt>

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

LLVM IR (-O2):
define double @test8(double %0, i64 %1) {
%3 = tail call double @scalbln(double %0, i64 %1)
ret double %3
}
int __attribute__((no)) isubv(int a, int b) { return a - b; }


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

x86 assembly (clang, -O2):
<isubv>:
mov    %edi,%eax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @isubv(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 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @isubv(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int evaluate_postfix(char *);
void test_simple() {
  assert(evaluate_postfix("1") == 1);
  assert(evaluate_postfix("11") == 11);
}


x86 assembly (clang, -O0):
<test_simple>:
push   %rbp
mov    %rsp,%rbp
lea    0xed6(%rip),%rdi
call   1030 <evaluate_postfix@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xeb9(%rip),%rdi
call   1030 <evaluate_postfix@plt>
cmp    $0xb,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_simple>:
push   %rax
lea    0xed9(%rip),%rdi
call   1030 <evaluate_postfix@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xebe(%rip),%rdi
call   1030 <evaluate_postfix@plt>
xor    %edi,%edi
cmp    $0xb,%eax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"1\00"
@.str.1 = [3 x i8] c"11\00"
define void @test_simple() {
%1 = call i32 @evaluate_postfix(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
%5 = call i32 @evaluate_postfix(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32 %5, 11
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"1\00"
@.str.1 = [3 x i8] c"11\00"
define void @test_simple() {
%1 = tail call i32 @evaluate_postfix(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @evaluate_postfix(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32 %5, 11
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct tcphdr {
  int /*<<< orphan*/ seq;
};

/* Variables and functions */
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
uint32_t _tcphdr_seq_ntohl(struct tcphdr *h) { return ntohl(h->seq); }


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

x86 assembly (clang, -O2):
<_tcphdr_seq_ntohl>:
mov    (%rdi),%edi
jmp    1030 <ntohl@plt>

LLVM IR (-O0):
%struct.tcphdr = type { i32 }
define i32 @_tcphdr_seq_ntohl(%struct.tcphdr* %0) {
%2 = alloca %struct.tcphdr*
store %struct.tcphdr* %0, %struct.tcphdr** %2
%3 = load %struct.tcphdr*, %struct.tcphdr** %2
%4 = getelementptr inbounds %struct.tcphdr, %struct.tcphdr* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @ntohl(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.tcphdr = type { i32 }
define i32 @_tcphdr_seq_ntohl(%struct.tcphdr* nocapture %0) {
%2 = getelementptr inbounds %struct.tcphdr, %struct.tcphdr* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @ntohl(i32 %3)
ret i32 %4
}
int prog_q84decision(int A) {
  int S;
  if (A < 0)
    S = 0;
  else
    S = 1;
  return S;
}


x86 assembly (clang, -O0):
<prog_q84decision>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111d <prog_q84decision+0x1d>
movl   $0x0,-0x8(%rbp)
jmp    1124 <prog_q84decision+0x24>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prog_q84decision>:
mov    %edi,%eax
not    %eax
shr    $0x1f,%eax
ret

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

LLVM IR (-O2):
define i32 @prog_q84decision(i32 %0) {
%2 = xor i32 %0, -1
%3 = lshr i32 %2, 31
ret i32 %3
}
/* Variables and functions */
void *malloc(size_t);
void *test22_malloc(size_t n) {
  static int invoke_count = 0;
  switch (++invoke_count) {
  case 1:
    return malloc(n);
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<test22_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2f0a(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f01(%rip)
sub    $0x1,%eax
jne    114b <test22_malloc+0x3b>
jmp    1139 <test22_malloc+0x29>
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
jmp    1153 <test22_malloc+0x43>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test22_malloc>:
mov    0x2f16(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f0d(%rip)
test   %eax,%eax
je     1126 <test22_malloc+0x16>
xor    %eax,%eax
ret
jmp    1030 <malloc@plt>

LLVM IR (-O0):
@test22_malloc.invoke_count = internal global i32 0
define i8* @test22_malloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i32, i32* @test22_malloc.invoke_count
%5 = add nsw i32 %4, 1
store i32 %5, i32* @test22_malloc.invoke_count
switch i32 %5, label %9 [
i32 1, label %6
]
6: ; preds = %1
%7 = load i64, i64* %3
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %2
br label %10
9: ; preds = %1
store i8* null, i8** %2
br label %10
10: ; preds = %9, %6
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@test22_malloc.invoke_count = internal unnamed_addr global i32 0
define noalias i8* @test22_malloc(i64 %0) {
%2 = load i32, i32* @test22_malloc.invoke_count
%3 = add nsw i32 %2, 1
store i32 %3, i32* @test22_malloc.invoke_count
%4 = icmp eq i32 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i8* @malloc(i64 %0)
br label %7
7: ; preds = %1, %5
%8 = phi i8* [ %6, %5 ], [ null, %1 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/
Atm128Rfa1Uart1InterruptsP__Uart1Interrupts__clearTxInterrupt();
void Atm128Rfa1SerialP__Uart1Interrupts__clearTxInterrupt(void) {
  Atm128Rfa1Uart1InterruptsP__Uart1Interrupts__clearTxInterrupt();
}


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

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

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

LLVM IR (-O2):
define void @Atm128Rfa1SerialP__Uart1Interrupts__clearTxInterrupt() {
%1 = tail call i32 (...) @Atm128Rfa1Uart1InterruptsP__Uart1Interrupts__clearTxInterrupt()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int DisplayHeight(int /*<<< orphan*/ *, int);
int DisplayWidth(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ printf(char *, int, int);
void dpyinfo(Display *display, int screen_num) {
  printf("let SCREEN_WIDTH=%d;\nlet SCREEN_HEIGHT=%d;\n",
         DisplayWidth(display, screen_num), DisplayHeight(display, screen_num));
}


x86 assembly (clang, -O0):
<dpyinfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <DisplayWidth@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <DisplayHeight@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xe9a(%rip),%rdi
call   1050 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dpyinfo>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <DisplayWidth@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <DisplayHeight@plt>
lea    0xeae(%rip),%rdi
mov    %r14d,%esi
mov    %eax,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"let SCREEN_WIDTH=%d;\0Alet SCREEN_HEIGHT=%d;\0A\00"
define void @dpyinfo(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 = call i32 @DisplayWidth(i32* %5, i32 %6)
%8 = load i32*, i32** %3
%9 = load i32, i32* %4
%10 = call i32 @DisplayHeight(i32* %8, i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"let SCREEN_WIDTH=%d;\0Alet SCREEN_HEIGHT=%d;\0A\00"
define void @dpyinfo(i32* %0, i32 %1) {
%3 = tail call i32 @DisplayWidth(i32* %0, i32 %1)
%4 = tail call i32 @DisplayHeight(i32* %0, i32 %1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret void
}
int test_imm_98uint32_mem(unsigned int *val) {
  return ((*val) & (0x98 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_98uint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x98,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_98uint32_mem>:
testb  $0x98,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_98uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 152
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *strdup(char const *);
char *memory_strdup(const char *s) { return strdup(s); }


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

x86 assembly (clang, -O2):
<memory_strdup>:
jmp    1030 <strdup@plt>

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

LLVM IR (-O2):
define noalias i8* @memory_strdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}
/* Type definitions */
struct iocb {
  int dummy;
};
struct io_event {
  int dummy;
};
typedef int /*<<< orphan*/ aio_context_t;

/* Variables and functions */
int /*<<< orphan*/ __NR_io_cancel;
int syscall(int /*<<< orphan*/, int /*<<< orphan*/, struct iocb *,
            struct io_event *);
int __io_cancel(aio_context_t ctx_id, struct iocb *iocb,
                struct io_event *result) {
  return syscall(__NR_io_cancel, ctx_id, iocb, result);
}


x86 assembly (clang, -O0):
<__io_cancel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__io_cancel>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.iocb = type { i32 }
%struct.io_event = type { i32 }
@__NR_io_cancel = global i32 0
define i32 @__io_cancel(i32 %0, %struct.iocb* %1, %struct.io_event* %2) {
%4 = alloca i32
%5 = alloca %struct.iocb*
%6 = alloca %struct.io_event*
store i32 %0, i32* %4
store %struct.iocb* %1, %struct.iocb** %5
store %struct.io_event* %2, %struct.io_event** %6
%7 = load i32, i32* @__NR_io_cancel
%8 = load i32, i32* %4
%9 = load %struct.iocb*, %struct.iocb** %5
%10 = load %struct.io_event*, %struct.io_event** %6
%11 = call i32 @syscall(i32 %7, i32 %8, %struct.iocb* %9, %struct.io_event* %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.iocb = type { i32 }
%struct.io_event = type { i32 }
@__NR_io_cancel = global i32 0
define i32 @__io_cancel(i32 %0, %struct.iocb* %1, %struct.io_event* %2) {
%4 = load i32, i32* @__NR_io_cancel
%5 = tail call i32 @syscall(i32 %4, i32 %0, %struct.iocb* %1, %struct.io_event* %2)
ret i32 %5
}
int max(int x, int y) { return (x >= y ? x : y); }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1121 <max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

LLVM IR (-O0):
define i32 @max(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 = icmp sge i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ pretty_print_colour_set_state(int);
void pretty_print_color_set_state(bool state) {
  pretty_print_colour_set_state(state);
}


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

x86 assembly (clang, -O2):
<pretty_print_color_set_state>:
jmp    1030 <pretty_print_colour_set_state@plt>

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

LLVM IR (-O2):
define void @pretty_print_color_set_state(i32 %0) {
%2 = tail call i32 @pretty_print_colour_set_state(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ oosmos_DelayMS(int);
int /*<<< orphan*/ oosmos_RunStateMachines();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ testNew();
extern int main(void) {
  (void)testNew();
  for (;;) {
    oosmos_RunStateMachines();
    printf("---\n");
    oosmos_DelayMS(1);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <testNew@plt>
mov    $0x0,%al
call   1060 <oosmos_RunStateMachines@plt>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <oosmos_DelayMS@plt>
jmp    1156 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <testNew@plt>
lea    0xeb1(%rip),%rbx
nop
xor    %eax,%eax
call   1060 <oosmos_RunStateMachines@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <oosmos_DelayMS@plt>
jmp    1150 <main+0x10>

LLVM IR (-O0):
@.str = [5 x i8] c"---\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @testNew()
br label %3
3: ; preds = %3, %0
%4 = call i32 (...) @oosmos_RunStateMachines()
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @oosmos_DelayMS(i32 1)
br label %3
}

LLVM IR (-O2):
@str = [4 x i8] c"---\00"
define i32 @main() {
%1 = tail call i32 (...) @testNew()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 (...) @oosmos_RunStateMachines()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @oosmos_DelayMS(i32 1)
br label %2
}
int main() { return sizeof(long long int); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%eax
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @__VERIFIER_nondet_int() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ start_ccw(int, int, int, void *);
void sense(void *sense_data) { start_ccw(0x04, 0x20, 0x20, sense_data); }


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

x86 assembly (clang, -O2):
<sense>:
mov    %rdi,%rcx
mov    $0x4,%edi
mov    $0x20,%esi
mov    $0x20,%edx
jmp    1030 <start_ccw@plt>

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

LLVM IR (-O2):
define void @sense(i8* %0) {
%2 = tail call i32 @start_ccw(i32 4, i32 32, i32 32, i8* %0)
ret void
}
signed int Get_dmvector(void) {
  unsigned int return_value_Get_Bits$2;
  return_value_Get_Bits$2 = Get_Bits(1);
  if (!(return_value_Get_Bits$2 == 0u)) {
    unsigned int return_value_Get_Bits$1;
    return_value_Get_Bits$1 = Get_Bits(1);
    return return_value_Get_Bits$1 != 0u ? -1 : 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<Get_dmvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <Get_Bits@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     115b <Get_dmvector+0x4b>
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <Get_Bits@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edx
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1162 <Get_dmvector+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Get_dmvector>:
push   %rbx
xor    %ebx,%ebx
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <Get_Bits@plt>
test   %eax,%eax
je     1136 <Get_dmvector+0x26>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <Get_Bits@plt>
neg    %eax
sbb    %ebx,%ebx
or     $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Get_dmvector() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (i32, ...) bitcast (i32 (...)* @Get_Bits to i32 (i32, ...)*)(i32 1)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %0
%8 = call i32 (i32, ...) bitcast (i32 (...)* @Get_Bits to i32 (i32, ...)*)(i32 1)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 -1, i32 1
store i32 %12, i32* %1
br label %14
13: ; preds = %0
store i32 0, i32* %1
br label %14
14: ; preds = %13, %7
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @Get_dmvector() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @Get_Bits to i32 (i32, ...)*)(i32 1)
%2 = icmp eq i32 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @Get_Bits to i32 (i32, ...)*)(i32 1)
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 1, i32 -1
br label %7
7: ; preds = %0, %3
%8 = phi i32 [ %6, %3 ], [ 0, %0 ]
ret i32 %8
}
/* Variables and functions */
scalar_t__ floor(double);
int DoubleRoundToInt(double number) { return ((int)floor(number + 0.5)); }


x86 assembly (clang, -O0):
<DoubleRoundToInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoubleRoundToInt>:
addsd  0xee8(%rip),%xmm0
jmp    1030 <floor@plt>

LLVM IR (-O0):
define i32 @DoubleRoundToInt(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 5.000000e-01
%5 = call i64 @floor(double %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @DoubleRoundToInt(double %0) {
%2 = fadd double %0, 5.000000e-01
%3 = tail call i64 @floor(double %2)
%4 = trunc i64 %3 to i32
ret i32 %4
}
void lcd_off() {}


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

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

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

LLVM IR (-O2):
define void @lcd_off() {
ret void
}
void hanoi(int n, int *count) {
  if (n == 1) {
    *count += 6;
  } else {
    hanoi(n - 1, &*count);
    *count += 3;
    hanoi(n - 1, &*count);
    *count += 3;
    hanoi(n - 1, &*count);
  }
}


x86 assembly (clang, -O0):
<hanoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1139 <hanoi+0x29>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x6,%ecx
mov    %ecx,(%rax)
jmp    117c <hanoi+0x6c>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
call   1030 <hanoi@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x3,%ecx
mov    %ecx,(%rax)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
call   1030 <hanoi@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x3,%ecx
mov    %ecx,(%rax)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
call   1030 <hanoi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hanoi>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x1,%edi
jne    111f <hanoi+0xf>
mov    (%rbx),%eax
jmp    1153 <hanoi+0x43>
mov    %edi,%ebp
add    $0xffffffff,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <hanoi@plt>
addl   $0x3,(%rbx)
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <hanoi@plt>
mov    (%rbx),%eax
add    $0x3,%eax
mov    %eax,(%rbx)
add    $0xffffffff,%ebp
jne    1130 <hanoi+0x20>
add    $0x6,%eax
mov    %eax,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @hanoi(i32 %0, i32* %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i32, i32* %1
br label %6
6: ; preds = %9, %4
%7 = phi i32 [ %5, %4 ], [ %15, %9 ]
%8 = add nsw i32 %7, 6
store i32 %8, i32* %1
ret void
9: ; preds = %2, %9
%10 = phi i32 [ %11, %9 ], [ %0, %2 ]
%11 = add nsw i32 %10, -1
tail call void @hanoi(i32 %11, i32* %1)
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 3
store i32 %13, i32* %1
tail call void @hanoi(i32 %11, i32* %1)
%14 = load i32, i32* %1
%15 = add nsw i32 %14, 3
store i32 %15, i32* %1
%16 = icmp eq i32 %11, 1
br i1 %16, label %6, label %9
}