xunge/DecIR huggingface dataset:
int wps_validate_upnp_set_selected_registrar(const struct wpabuf *tlvs) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.wpabuf = type opaque
define i32 @wps_validate_upnp_set_selected_registrar(%struct.wpabuf* %0) {
%2 = alloca %struct.wpabuf*
store %struct.wpabuf* %0, %struct.wpabuf** %2
ret i32 0
}

LLVM IR (-O2):
%struct.wpabuf = type opaque
define i32 @wps_validate_upnp_set_selected_registrar(%struct.wpabuf* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ lou_getTable(char const *);
int lou_checkTable(const char *tableList) {
  if (lou_getTable(tableList))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<lou_checkTable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <lou_getTable@plt>
cmp    $0x0,%rax
je     113b <lou_checkTable+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <lou_checkTable+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @lou_checkTable(i8* %0) {
%2 = tail call i64 @lou_getTable(i8* %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ failed();
void fatal_failed(void) { failed(); }


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

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

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

LLVM IR (-O2):
define void @fatal_failed() {
%1 = tail call i32 (...) @failed()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GCSTelemetryStatsHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void GCSTelemetryStatsUpdated() { UAVObjUpdated(GCSTelemetryStatsHandle()); }


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

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

LLVM IR (-O0):
define void @GCSTelemetryStatsUpdated() {
%1 = call i32 (...) @GCSTelemetryStatsHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @GCSTelemetryStatsUpdated() {
%1 = tail call i32 (...) @GCSTelemetryStatsHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ nonl();
int /*<<< orphan*/ qiflush();
void curses_init() {
  initscr();
  cbreak();
  noecho();
  qiflush();
  nonl();
}


x86 assembly (clang, -O0):
<curses_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <initscr@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    $0x0,%al
call   1060 <noecho@plt>
mov    $0x0,%al
call   1070 <qiflush@plt>
mov    $0x0,%al
call   1050 <nonl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<curses_init>:
push   %rax
xor    %eax,%eax
call   1040 <initscr@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
xor    %eax,%eax
call   1060 <noecho@plt>
xor    %eax,%eax
call   1070 <qiflush@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <nonl@plt>

LLVM IR (-O0):
define void @curses_init() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @cbreak()
%3 = call i32 (...) @noecho()
%4 = call i32 (...) @qiflush()
%5 = call i32 (...) @nonl()
ret void
}

LLVM IR (-O2):
define void @curses_init() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @cbreak()
%3 = tail call i32 (...) @noecho()
%4 = tail call i32 (...) @qiflush()
%5 = tail call i32 (...) @nonl()
ret void
}
int luythua(int t) {
  if (t == 0)
    return 1;
  else
    return 64 * luythua(t - 1);
}


x86 assembly (clang, -O0):
<luythua>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <luythua+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1142 <luythua+0x32>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <luythua@plt>
shl    $0x6,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<luythua>:
test   %edi,%edi
je     1125 <luythua+0x15>
push   %rax
add    $0xffffffff,%edi
call   1030 <luythua@plt>
shl    $0x6,%eax
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @luythua(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1, %5
%4 = phi i32 [ %8, %5 ], [ 1, %1 ]
ret i32 %4
5: ; preds = %1
%6 = add nsw i32 %0, -1
%7 = tail call i32 @luythua(i32 %6)
%8 = shl nsw i32 %7, 6
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void __VERIFIER_atomic_begin() {
  fprintf(stderr, "__VERIFIER_atomic_begin() is a no-op\n");
}


x86 assembly (clang, -O0):
<__VERIFIER_atomic_begin>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__VERIFIER_atomic_begin>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"__VERIFIER_atomic_begin() is a no-op\0A\00"
define void @__VERIFIER_atomic_begin() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"__VERIFIER_atomic_begin() is a no-op\0A\00"
define void @__VERIFIER_atomic_begin() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int flat_dev_open(char const *, char const *);
int flat_open(const char *flatfs, const char *mode) {
  int rc;
  rc = flat_dev_open(flatfs, mode);
  return rc;
}


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

x86 assembly (clang, -O2):
<flat_open>:
jmp    1030 <flat_dev_open@plt>

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

LLVM IR (-O2):
define i32 @flat_open(i8* %0, i8* %1) {
%3 = tail call i32 @flat_dev_open(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int g(int *);
int f(void) {
  int tt = 0;
  int t = 4;
  {
    int a[t];
    tt = g(a);
    tt += a[0];
  }
  {
    int a[4];
    tt += g(a);
    tt += a[0];
  }
  return tt;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x38(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
call   1030 <g@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,-0x4(%rbp)
mov    (%rax),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
lea    -0x30(%rbp),%rdi
call   1030 <g@plt>
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x30(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsp,%r14
mov    %rsp,%rdi
call   1030 <g@plt>
mov    %eax,%ebx
add    (%rsp),%ebx
mov    %r14,%rsp
lea    0x10(%rsp),%rdi
call   1030 <g@plt>
add    %ebx,%eax
add    0x10(%rsp),%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @f() {
%1 = alloca [4 x i32]
%2 = tail call i8* @llvm.stacksave()
%3 = alloca [4 x i32]
%4 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%5 = call i32 @g(i32* %4)
%6 = load i32, i32* %4
%7 = add nsw i32 %6, %5
%8 = bitcast [4 x i32]* %1 to i8*
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%10 = call i32 @g(i32* %9)
%11 = add nsw i32 %7, %10
%12 = load i32, i32* %9
%13 = add nsw i32 %11, %12
ret i32 %13
}
int dummy_unlockmutex(void *m) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dummy_unlockmutex(i8* nocapture readnone %0) {
ret i32 0
}
int xmlUCSIsSmallFormVariants(int code) {
  return (((code >= 0xFE50) && (code <= 0xFE6F)));
}


x86 assembly (clang, -O0):
<xmlUCSIsSmallFormVariants>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xfe50,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsSmallFormVariants+0x26>
cmpl   $0xfe6f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsSmallFormVariants>:
add    $0xffff01b0,%edi
xor    %eax,%eax
cmp    $0x20,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsSmallFormVariants(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65104
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 65135
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsSmallFormVariants(i32 %0) {
%2 = add i32 %0, -65104
%3 = icmp ult i32 %2, 32
%4 = zext i1 %3 to i32
ret i32 %4
}
int cmpint(const void *a, const void *b) {
  int aa = *(int *)a;
  int bb = *(int *)b;
  if (aa < bb)
    return -1;
  else if (bb < aa)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<cmpint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1136 <cmpint+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <cmpint+0x55>
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    114e <cmpint+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <cmpint+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpint>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %eax,%ecx
setl   %dl
mov    $0xffffffff,%eax
cmovle %edx,%eax
ret

LLVM IR (-O0):
define i32 @cmpint(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
store i32 %10, i32* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i32*
%13 = load i32, i32* %12
store i32 %13, i32* %7
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %24
18: ; preds = %2
%19 = load i32, i32* %7
%20 = load i32, i32* %6
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @cmpint(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp slt i32 %6, %4
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
double logb(double);
double c_logb(double arg0) { return logb(arg0); }


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

x86 assembly (clang, -O2):
<c_logb>:
jmp    1030 <logb@plt>

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

LLVM IR (-O2):
define double @c_logb(double %0) {
%2 = tail call double @logb(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ open;
int test_flcow(int /*<<< orphan*/, char *);
int main(int argc, char **argv) {
  int res;
  if ((res = test_flcow(open, "open")) != 0)
    return res;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <test_flcow@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1152 <main+0x42>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1159 <main+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <test_flcow@plt>

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

LLVM IR (-O2):
@open = global i32 0
@.str = [5 x i8] c"open\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @open
%4 = tail call i32 @test_flcow(i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}
void ff_hevc_put_hevc_bi_pel_pixels32_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_pel_pixels32_10_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int handleDisconnection(int clientSocket) {
  printf("Socket %d disconnected.\n", clientSocket);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [25 x i8] c"Socket %d disconnected.\0A\00"
define i32 @handleDisconnection(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 0
}
unsigned kol_skin_height() { asm("int $0x40" ::"a"(48), "b"(4)); }


x86 assembly (clang, -O0):
<kol_skin_height>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    $0x30,%eax
mov    $0x4,%ebx
int    $0x40
mov    -0xc(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_skin_height>:
push   %rbx
mov    $0x30,%eax
mov    $0x4,%ebx
int    $0x40
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @kol_skin_height() {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 48, i32 4)
ret i32 undef
}
void g_main_context_wakeup() {}


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

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

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

LLVM IR (-O2):
define void @g_main_context_wakeup() {
ret void
}
void B_Free(void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @B_Free(i8* nocapture %0) {
ret void
}
void ostatue() {}


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

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

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

LLVM IR (-O2):
define void @ostatue() {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ test_findWords();
int /*<<< orphan*/ test_initializeAndShuffleDeck();
int /*<<< orphan*/ test_multiply();
int /*<<< orphan*/ test_readAndDisplayBookInformation();
int /*<<< orphan*/ test_rotate();
int main(int argc, char *argv[]) {
  test_multiply();
  test_rotate();
  test_readAndDisplayBookInformation();
  test_initializeAndShuffleDeck();
  test_findWords();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <test_multiply@plt>
mov    $0x0,%al
call   1030 <test_rotate@plt>
mov    $0x0,%al
call   1040 <test_readAndDisplayBookInformation@plt>
mov    $0x0,%al
call   1050 <test_initializeAndShuffleDeck@plt>
mov    $0x0,%al
call   1070 <test_findWords@plt>
mov    0x2e50(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <test_multiply@plt>
xor    %eax,%eax
call   1030 <test_rotate@plt>
xor    %eax,%eax
call   1040 <test_readAndDisplayBookInformation@plt>
xor    %eax,%eax
call   1050 <test_initializeAndShuffleDeck@plt>
xor    %eax,%eax
call   1070 <test_findWords@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test_multiply()
%7 = call i32 (...) @test_rotate()
%8 = call i32 (...) @test_readAndDisplayBookInformation()
%9 = call i32 (...) @test_initializeAndShuffleDeck()
%10 = call i32 (...) @test_findWords()
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_multiply()
%4 = tail call i32 (...) @test_rotate()
%5 = tail call i32 (...) @test_readAndDisplayBookInformation()
%6 = tail call i32 (...) @test_initializeAndShuffleDeck()
%7 = tail call i32 (...) @test_findWords()
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}
void wmf_newpage(void) {
  int color;
  return;
}


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

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

LLVM IR (-O0):
define void @wmf_newpage() {
%1 = alloca i32
ret void
}

LLVM IR (-O2):
define void @wmf_newpage() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stop_rt_timer();
void rtos_timer_stop(void) { stop_rt_timer(); }


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

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

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

LLVM IR (-O2):
define void @rtos_timer_stop() {
%1 = tail call i32 (...) @stop_rt_timer()
ret void
}
/* Variables and functions */
char *_crypt_blowfish_rn(char const *, char const *, char *, int);
scalar_t__ _crypt_data_alloc(void **, int *, int);
char *crypt_ra(const char *key, const char *setting, void **data, int *size) {
  if (_crypt_data_alloc(data, size, (7 + 22 + 31 + 1)))
    return NULL;
  return _crypt_blowfish_rn(key, setting, (char *)*data, *size);
}


x86 assembly (clang, -O0):
<crypt_ra>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    $0x3d,%edx
call   1030 <_crypt_data_alloc@plt>
cmp    $0x0,%rax
je     1161 <crypt_ra+0x41>
movq   $0x0,-0x8(%rbp)
jmp    117f <crypt_ra+0x5f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rax
mov    (%rax),%rdx
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
call   1040 <_crypt_blowfish_rn@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypt_ra>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r12
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
mov    %rcx,%rsi
mov    $0x3d,%edx
call   1030 <_crypt_data_alloc@plt>
test   %rax,%rax
je     1157 <crypt_ra+0x37>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
mov    (%rbx),%rdx
mov    (%r12),%ecx
mov    %r15,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <_crypt_blowfish_rn@plt>

LLVM IR (-O0):
define i8* @crypt_ra(i8* %0, i8* %1, i8** %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8**
%9 = alloca i32*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8** %2, i8*** %8
store i32* %3, i32** %9
%10 = load i8**, i8*** %8
%11 = load i32*, i32** %9
%12 = call i64 @_crypt_data_alloc(i8** %10, i32* %11, i32 61)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %4
store i8* null, i8** %5
br label %23
15: ; preds = %4
%16 = load i8*, i8** %6
%17 = load i8*, i8** %7
%18 = load i8**, i8*** %8
%19 = load i8*, i8** %18
%20 = load i32*, i32** %9
%21 = load i32, i32* %20
%22 = call i8* @_crypt_blowfish_rn(i8* %16, i8* %17, i8* %19, i32 %21)
store i8* %22, i8** %5
br label %23
23: ; preds = %15, %14
%24 = load i8*, i8** %5
ret i8* %24
}

LLVM IR (-O2):
define i8* @crypt_ra(i8* %0, i8* %1, i8** %2, i32* %3) {
%5 = tail call i64 @_crypt_data_alloc(i8** %2, i32* %3, i32 61)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load i8*, i8** %2
%9 = load i32, i32* %3
%10 = tail call i8* @_crypt_blowfish_rn(i8* %0, i8* %1, i8* %8, i32 %9)
br label %11
11: ; preds = %4, %7
%12 = phi i8* [ %10, %7 ], [ null, %4 ]
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ STDERR_FILENO;
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ close(int /*<<< orphan*/);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void do_exit() {
  write(STDOUT_FILENO, "exit", 4);
  close(STDIN_FILENO);
  close(STDOUT_FILENO);
  close(STDERR_FILENO);
  exit(0);
}


x86 assembly (clang, -O0):
<do_exit>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1040 <close@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1040 <close@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
call   1040 <close@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<do_exit>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xebf(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
call   1040 <close@plt>
mov    (%rbx),%edi
call   1040 <close@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1040 <close@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@.str = [5 x i8] c"exit\00"
@STDIN_FILENO = global i32 0
@STDERR_FILENO = global i32 0
define void @do_exit() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = call i32 @write(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = load i32, i32* @STDIN_FILENO
%4 = call i32 @close(i32 %3)
%5 = load i32, i32* @STDOUT_FILENO
%6 = call i32 @close(i32 %5)
%7 = load i32, i32* @STDERR_FILENO
%8 = call i32 @close(i32 %7)
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@.str = [5 x i8] c"exit\00"
@STDIN_FILENO = global i32 0
@STDERR_FILENO = global i32 0
define void @do_exit() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = tail call i32 @write(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = load i32, i32* @STDIN_FILENO
%4 = tail call i32 @close(i32 %3)
%5 = load i32, i32* @STDOUT_FILENO
%6 = tail call i32 @close(i32 %5)
%7 = load i32, i32* @STDERR_FILENO
%8 = tail call i32 @close(i32 %7)
%9 = tail call i32 @exit(i32 0)
unreachable
}
unsigned int myrnd(void) {
  static unsigned int s = 1388815473;
  s *= 1103515245;
  s += 12345;
}


x86 assembly (clang, -O0):
<myrnd>:
push   %rbp
mov    %rsp,%rbp
imul   $0x41c64e6d,0x2f12(%rip),%eax
4e c6 41
mov    %eax,0x2f0c(%rip)
mov    0x2f06(%rip),%eax
add    $0x3039,%eax
mov    %eax,0x2efb(%rip)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myrnd>:
imul   $0x41c64e6d,0x2f16(%rip),%eax
4e c6 41
add    $0x3039,%eax
mov    %eax,0x2f0b(%rip)
ret

LLVM IR (-O0):
@myrnd.s = internal global i32 1388815473
define i32 @myrnd() {
%1 = alloca i32
%2 = load i32, i32* @myrnd.s
%3 = mul i32 %2, 1103515245
store i32 %3, i32* @myrnd.s
%4 = load i32, i32* @myrnd.s
%5 = add i32 %4, 12345
store i32 %5, i32* @myrnd.s
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@myrnd.s = internal unnamed_addr global i32 1388815473
define i32 @myrnd() {
%1 = load i32, i32* @myrnd.s
%2 = mul i32 %1, 1103515245
%3 = add i32 %2, 12345
store i32 %3, i32* @myrnd.s
ret i32 undef
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int accept(int, struct sockaddr *, int /*<<< orphan*/ *);
int errno;
int __sulong_posix_accept(int socket, struct sockaddr *restrict address,
                          socklen_t *restrict address_len) {
  {
    int native_errno = errno;
    int result = accept(socket, address, address_len);
    if (result == (int)-1) {
      result = (int)(long)-errno;
    }
    errno = native_errno;
    return result;
  };
}


x86 assembly (clang, -O0):
<__sulong_posix_accept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <accept@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0xffffffff,-0x20(%rbp)
jne    115c <__sulong_posix_accept+0x4c>
xor    %eax,%eax
mov    0x2e8b(%rip),%rcx
sub    (%rcx),%eax
cltq
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%ecx
mov    0x2e7a(%rip),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sulong_posix_accept>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ec6(%rip),%rbx
mov    (%rbx),%ebp
call   1030 <accept@plt>
xor    %ecx,%ecx
sub    (%rbx),%ecx
cmp    $0xffffffff,%eax
cmove  %ecx,%eax
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
@errno = global i32 0
define i32 @__sulong_posix_accept(i32 %0, %struct.sockaddr* noalias %1, i32* noalias %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32* %2, i32** %6
%9 = load i32, i32* @errno
store i32 %9, i32* %7
%10 = load i32, i32* %4
%11 = load %struct.sockaddr*, %struct.sockaddr** %5
%12 = load i32*, i32** %6
%13 = call i32 @accept(i32 %10, %struct.sockaddr* %11, i32* %12)
store i32 %13, i32* %8
%14 = load i32, i32* %8
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %21
16: ; preds = %3
%17 = load i32, i32* @errno
%18 = sub nsw i32 0, %17
%19 = sext i32 %18 to i64
%20 = trunc i64 %19 to i32
store i32 %20, i32* %8
br label %21
21: ; preds = %16, %3
%22 = load i32, i32* %7
store i32 %22, i32* @errno
%23 = load i32, i32* %8
ret i32 %23
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@errno = global i32 0
define i32 @__sulong_posix_accept(i32 %0, %struct.sockaddr* noalias %1, i32* noalias %2) {
%4 = load i32, i32* @errno
%5 = tail call i32 @accept(i32 %0, %struct.sockaddr* %1, i32* %2)
%6 = icmp eq i32 %5, -1
%7 = load i32, i32* @errno
%8 = sub nsw i32 0, %7
%9 = select i1 %6, i32 %8, i32 %5
store i32 %4, i32* @errno
ret i32 %9
}
const int GetNumDigits(int num) {
  int num_digits_in_num = 0;
  while (num) {
    num /= 10;
    num_digits_in_num++;
  }
  return num_digits_in_num;
}


x86 assembly (clang, -O0):
<GetNumDigits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1134 <GetNumDigits+0x34>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <GetNumDigits+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetNumDigits>:
xor    %eax,%eax
test   %edi,%edi
je     1132 <GetNumDigits+0x32>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
add    $0x1,%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <GetNumDigits+0x10>
ret

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

LLVM IR (-O2):
define i32 @GetNumDigits(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = sdiv i32 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = add i32 %5, 9
%9 = icmp ult i32 %8, 19
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
/* Variables and functions */
int bar(int);
int foo(int i) {
  static int static1 = 0;
  static int static2;
  if (static2 = bar(i))
    static1 = 1;
  static2 = static1 + 30;
  return static1 + static2;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <bar@plt>
mov    %eax,0x2f07(%rip)
cmp    $0x0,%eax
je     113c <foo+0x2c>
movl   $0x1,0x2ef0(%rip)
mov    0x2eea(%rip),%eax
add    $0x1e,%eax
mov    %eax,0x2ee5(%rip)
mov    0x2edb(%rip),%eax
add    0x2ed9(%rip),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
call   1030 <bar@plt>
test   %eax,%eax
je     1123 <foo+0x13>
movb   $0x1,0x2f0b(%rip)
jmp    112c <foo+0x1c>
cmpb   $0x1,0x2f02(%rip)
jne    1138 <foo+0x28>
mov    $0x1f,%ecx
mov    $0x1,%eax
jmp    113f <foo+0x2f>
mov    $0x1e,%ecx
xor    %eax,%eax
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@foo.static1 = internal global i32 0
@foo.static2 = internal global i32 0
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @bar(i32 %3)
store i32 %4, i32* @foo.static2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* @foo.static1
br label %7
7: ; preds = %6, %1
%8 = load i32, i32* @foo.static1
%9 = add nsw i32 %8, 30
store i32 %9, i32* @foo.static2
%10 = load i32, i32* @foo.static1
%11 = load i32, i32* @foo.static2
%12 = add nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
@foo.static1 = internal unnamed_addr global i1 false
define i32 @foo(i32 %0) {
%2 = tail call i32 @bar(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %1
store i1 true, i1* @foo.static1
br label %7
5: ; preds = %1
%6 = load i1, i1* @foo.static1
br i1 %6, label %7, label %8
7: ; preds = %4, %5
br label %8
8: ; preds = %5, %7
%9 = phi i32 [ 1, %7 ], [ 0, %5 ]
%10 = phi i32 [ 31, %7 ], [ 30, %5 ]
%11 = add nuw nsw i32 %10, %9
ret i32 %11
}
int int_sqrt(int x, int y) {
  int Sqr_Table[12] = {1, 4, 9, 6, 25, 36, 49, 64, 81, 100, 121, 144};
  int r, d;
  d = (x * x) + (y * y);
  r = 0;
  while (d >= Sqr_Table[r]) {
    r++;
  }
  return (r);
}


x86 assembly (clang, -O0):
<int_sqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xed7(%rip),%rsi
mov    $0x30,%edx
call   1030 <memcpy@plt>
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x48(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x48(%rbp),%eax
movslq -0x44(%rbp),%rcx
cmp    -0x40(%rbp,%rcx,4),%eax
jl     116c <int_sqrt+0x5c>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    114d <int_sqrt+0x3d>
mov    -0x44(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_sqrt>:
imul   %edi,%edi
imul   %esi,%esi
add    %edi,%esi
mov    $0xffffffff,%eax
lea    0xeec(%rip),%rcx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%eax
lea    0x4(%rcx),%rdx
cmp    (%rcx),%esi
mov    %rdx,%rcx
jge    1120 <int_sqrt+0x20>
ret

LLVM IR (-O0):
@__const.int_sqrt.Sqr_Table = [12 x i32] [i32 1, i32 4, i32 9, i32 6, i32 25, i32 36, i32 49, i32 64, i32 81, i32 100, i32 121, i32 144]
define i32 @int_sqrt(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [12 x i32]
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = bitcast [12 x i32]* %5 to i8*
%9 = load i32, i32* %3
%10 = load i32, i32* %3
%11 = mul nsw i32 %9, %10
%12 = load i32, i32* %4
%13 = load i32, i32* %4
%14 = mul nsw i32 %12, %13
%15 = add nsw i32 %11, %14
store i32 %15, i32* %7
store i32 0, i32* %6
br label %16
16: ; preds = %23, %2
%17 = load i32, i32* %7
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [12 x i32], [12 x i32]* %5, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = icmp sge i32 %17, %21
br i1 %22, label %23, label %26
23: ; preds = %16
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
br label %16
26: ; preds = %16
%27 = load i32, i32* %6
ret i32 %27
}

LLVM IR (-O2):
@__const.int_sqrt.Sqr_Table = [12 x i32] [i32 1, i32 4, i32 9, i32 6, i32 25, i32 36, i32 49, i32 64, i32 81, i32 100, i32 121, i32 144]
define i32 @int_sqrt(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, %0
%4 = mul nsw i32 %1, %1
%5 = add nuw nsw i32 %4, %3
br label %6
6: ; preds = %6, %2
%7 = phi i64 [ %11, %6 ], [ 0, %2 ]
%8 = getelementptr inbounds [12 x i32], [12 x i32]* @__const.int_sqrt.Sqr_Table, i64 0, i64 %7
%9 = load i32, i32* %8
%10 = icmp slt i32 %5, %9
%11 = add nuw i64 %7, 1
br i1 %10, label %12, label %6
12: ; preds = %6
%13 = trunc i64 %7 to i32
ret i32 %13
}
_falwcDefaultTextPerCharExtents() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_falwcDefaultTextPerCharExtents() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, int);
void playFreqForMs(float freq, int ms) {
  printf("Play frequency %.6f for %1d milliseconds\n", freq, ms);
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"Play frequency %.6f for %1d milliseconds\0A\00"
define void @playFreqForMs(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
store float %0, float* %3
store i32 %1, i32* %4
%5 = load float, float* %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), float %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"Play frequency %.6f for %1d milliseconds\0A\00"
define void @playFreqForMs(float %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), float %0, i32 %1)
ret void
}
int isOperand(char ch) {
  return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z');
}


x86 assembly (clang, -O0):
<isOperand>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1129 <isOperand+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jle    114e <isOperand+0x4e>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x3(%rbp)
jl     1148 <isOperand+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isOperand>:
and    $0xdf,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isOperand(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %20, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 90
br label %18
18: ; preds = %14, %10
%19 = phi i1 [ false, %10 ], [ %17, %14 ]
br label %20
20: ; preds = %18, %6
%21 = phi i1 [ true, %6 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @isOperand(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
void task_inet() {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<task_inet>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <task_inet+0x9>
jmp    1109 <task_inet+0x9>

x86 assembly (clang, -O2):
<task_inet>:
jmp    1100 <task_inet>

LLVM IR (-O0):
define void @task_inet() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @task_inet() {
br label %1
1: ; preds = %0, %1
br label %1
}
int i1(int w3, int n9) { return w3 >> ((long int)(1 + 0.1) + -!n9); }


x86 assembly (clang, -O0):
<i1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmpl   $0x0,-0x8(%rbp)
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
movslq %ecx,%rcx
add    $0x1,%rcx
sar    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i1>:
mov    %edi,%eax
test   %esi,%esi
setne  %cl
sar    %cl,%eax
ret

LLVM IR (-O0):
define i32 @i1(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 ne i32 %6, 0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
%10 = sub nsw i32 0, %9
%11 = sext i32 %10 to i64
%12 = add nsw i64 1, %11
%13 = trunc i64 %12 to i32
%14 = ashr i32 %5, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @i1(i32 %0, i32 %1) {
%3 = icmp ne i32 %1, 0
%4 = zext i1 %3 to i32
%5 = ashr i32 %0, %4
ret i32 %5
}
/* Type definitions */
struct fsm {
  int dummy;
};

/* Variables and functions */
struct fsm *fsm_symbol(char *);
struct fsm *fsm_escape(char *symbol) {
  return (fsm_symbol(symbol + 1));
}


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

x86 assembly (clang, -O2):
<fsm_escape>:
add    $0x1,%rdi
jmp    1030 <fsm_symbol@plt>

LLVM IR (-O0):
%struct.fsm = type { i32 }
define %struct.fsm* @fsm_escape(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = call %struct.fsm* @fsm_symbol(i8* %4)
ret %struct.fsm* %5
}

LLVM IR (-O2):
%struct.fsm = type { i32 }
define %struct.fsm* @fsm_escape(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = tail call %struct.fsm* @fsm_symbol(i8* %2)
ret %struct.fsm* %3
}
int ft_strlen(char *str) {
  int i;
  i = 0;
  while (str && str[i])
    i++;
  return (i);
}


x86 assembly (clang, -O0):
<ft_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
je     1134 <ft_strlen+0x34>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1144 <ft_strlen+0x44>
jmp    1152 <ft_strlen+0x52>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <ft_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strlen>:
test   %rdi,%rdi
je     111d <ft_strlen+0x1d>
mov    $0xffffffff,%eax
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <ft_strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ 0, %1 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add nuw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = trunc i64 %4 to i32
br label %11
11: ; preds = %9, %1
%12 = phi i32 [ 0, %1 ], [ %10, %9 ]
ret i32 %12
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int bits_per_rgb;
};
typedef TYPE_1__ XVisualInfo;

/* Variables and functions */
void set_XVisualInfo_bits_per_rgb(void *_p, int _v) {
  ((XVisualInfo *)_p)->bits_per_rgb = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XVisualInfo_bits_per_rgb>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XVisualInfo_bits_per_rgb(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CheckByte(long);
long Eval();
int EvalByte(void) {
  long val;
  val = Eval();
  CheckByte(val);
  return val & 0xFF;
}


x86 assembly (clang, -O0):
<EvalByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <Eval@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <CheckByte@plt>
mov    -0x8(%rbp),%rax
and    $0xff,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EvalByte>:
push   %rbx
xor    %eax,%eax
call   1030 <Eval@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <CheckByte@plt>
movzbl %bl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @EvalByte() {
%1 = alloca i64
%2 = call i64 (...) @Eval()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = call i32 @CheckByte(i64 %3)
%5 = load i64, i64* %1
%6 = and i64 %5, 255
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @EvalByte() {
%1 = tail call i64 (...) @Eval()
%2 = tail call i32 @CheckByte(i64 %1)
%3 = trunc i64 %1 to i32
%4 = and i32 %3, 255
ret i32 %4
}
signed test_failure(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @test_failure() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ VL_Present();
void CK_GalExplodePageFlip(int offset) { VL_Present(); }


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

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

LLVM IR (-O0):
define void @CK_GalExplodePageFlip(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @VL_Present()
ret void
}

LLVM IR (-O2):
define void @CK_GalExplodePageFlip(i32 %0) {
%2 = tail call i32 (...) @VL_Present()
ret void
}