xunge/DecIR huggingface dataset:
void test_four(int x, int y) {
#pragma omp taskloop simd collapse(2)
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      ;
}


x86 assembly (clang, -O0):
<test_four>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1156 <test_four+0x56>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1143 <test_four+0x43>
jmp    1135 <test_four+0x35>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1124 <test_four+0x24>
jmp    1148 <test_four+0x48>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <test_four+0x11>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_four(i32 %0, i32 %1) {
ret void
}
OP(dd, ca) {
  illegal_1();
  op_ca();
}


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

x86 assembly (clang, -O2):
<OP>:
push   %rax
xor    %eax,%eax
call   1040 <illegal_1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <op_ca@plt>

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_ca()
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int NSIG;
int __SIGISMEMBER(int /*<<< orphan*/ const *, int);
int /*<<< orphan*/ errno;
int sigismember(const sigset_t *set, int signo) {
  if (signo <= 0 || signo >= NSIG) {
    errno = EINVAL;
    return -1;
  }
  return (__SIGISMEMBER(set, signo));
}


x86 assembly (clang, -O0):
<sigismember>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    113b <sigismember+0x2b>
mov    -0x14(%rbp),%eax
mov    0x2e9d(%rip),%rcx
cmp    (%rcx),%eax
jl     1159 <sigismember+0x49>
mov    0x2e96(%rip),%rax
mov    (%rax),%ecx
mov    0x2e95(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <sigismember+0x58>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <__SIGISMEMBER@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigismember>:
test   %esi,%esi
jle    1124 <sigismember+0x14>
mov    0x2eb5(%rip),%rax
cmp    %esi,(%rax)
jle    1124 <sigismember+0x14>
jmp    1030 <__SIGISMEMBER@plt>
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    0x2eac(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@NSIG = global i32 0
@EINVAL = global i32 0
@errno = global i32 0
define i32 @sigismember(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp sle i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load i32, i32* %5
%10 = load i32, i32* @NSIG
%11 = icmp sge i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %8, %2
%13 = load i32, i32* @EINVAL
store i32 %13, i32* @errno
store i32 -1, i32* %3
br label %18
14: ; preds = %8
%15 = load i32*, i32** %4
%16 = load i32, i32* %5
%17 = call i32 @__SIGISMEMBER(i32* %15, i32 %16)
store i32 %17, i32* %3
br label %18
18: ; preds = %14, %12
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@NSIG = global i32 0
@EINVAL = global i32 0
@errno = global i32 0
define i32 @sigismember(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
%4 = load i32, i32* @NSIG
%5 = icmp sgt i32 %4, %1
%6 = select i1 %3, i1 %5, i1 false
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = load i32, i32* @EINVAL
store i32 %8, i32* @errno
br label %11
9: ; preds = %2
%10 = tail call i32 @__SIGISMEMBER(i32* %0, i32 %1)
br label %11
11: ; preds = %9, %7
%12 = phi i32 [ -1, %7 ], [ %10, %9 ]
ret i32 %12
}
__attribute__((noipa)) int fn21(int x, int y) { return x * y; }


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

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

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

LLVM IR (-O2):
define i32 @fn21(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage() {
  printf("Usage: ccalc [-bcdostux?] [-g DIGITS] [-p DIGITS] [-r RADIX] "
         "[--binary]\n            [--bool] [--caret-exp] [--degrees] "
         "[--grouping=DIGITS] [--octal]\n            [--precision=DIGITS] "
         "[--radix=RADIX] [--scientific-notation]\n            [--time] "
         "[--uppercase] [--hexadecimal] [--help] [--usage]\n            "
         "[--version] EXPRESSION\n");
}


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

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

LLVM IR (-O0):
@.str = [328 x i8] c"Usage: ccalc [-bcdostux?] [-g DIGITS] [-p DIGITS] [-r RADIX] [--binary]\0A [--bool] [--caret-exp] [--degrees] [--grouping=DIGITS] [--octal]\0A [--precision=DIGITS] [--radix=RADIX] [--scientific-notation]\0A [--time] [--uppercase] [--hexadecimal] [--help] [--usage]\0A [--version] EXPRESSION\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([328 x i8], [328 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [327 x i8] c"Usage: ccalc [-bcdostux?] [-g DIGITS] [-p DIGITS] [-r RADIX] [--binary]\0A [--bool] [--caret-exp] [--degrees] [--grouping=DIGITS] [--octal]\0A [--precision=DIGITS] [--radix=RADIX] [--scientific-notation]\0A [--time] [--uppercase] [--hexadecimal] [--help] [--usage]\0A [--version] EXPRESSION\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([327 x i8], [327 x i8]* @str, i64 0, i64 0))
ret void
}
void send_group_sig_info(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<send_group_sig_info>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_group_sig_info>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.send_group_sig_info = [20 x i8] c"send_group_sig_info\00"
define void @send_group_sig_info() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.send_group_sig_info, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.send_group_sig_info = [20 x i8] c"send_group_sig_info\00"
define void @send_group_sig_info() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.send_group_sig_info, i64 0, i64 0))
ret void
}
void ARGBToAR30Row_C() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToAR30Row_C() {
ret void
}
unsigned int ___swab32(unsigned int x) {
  unsigned int __x = (x);
  return (
      unsigned int)((((unsigned int)(__x) & (unsigned int)0x000000ffUL) << 24) |
                    (((unsigned int)(__x) & (unsigned int)0x0000ff00UL) << 8) |
                    (((unsigned int)(__x) & (unsigned int)0x00ff0000UL) >> 8) |
                    (((unsigned int)(__x) & (unsigned int)0xff000000UL) >> 24));
}


x86 assembly (clang, -O0):
<___swab32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    $0xff0000,%ecx
shr    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<___swab32>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @___swab32(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = and i32 %5, 255
%7 = shl i32 %6, 24
%8 = load i32, i32* %3
%9 = and i32 %8, 65280
%10 = shl i32 %9, 8
%11 = or i32 %7, %10
%12 = load i32, i32* %3
%13 = and i32 %12, 16711680
%14 = lshr i32 %13, 8
%15 = or i32 %11, %14
%16 = load i32, i32* %3
%17 = and i32 %16, -16777216
%18 = lshr i32 %17, 24
%19 = or i32 %15, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @___swab32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
int fun1047() { return 1047; }


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

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

LLVM IR (-O0):
define i32 @fun1047() {
ret i32 1047
}

LLVM IR (-O2):
define i32 @fun1047() {
ret i32 1047
}
/* Variables and functions */
int /*<<< orphan*/ block_tilde_setup();
int /*<<< orphan*/ samplerate_tilde_setup();
void d_ugen_setup(void) {
  block_tilde_setup();
  samplerate_tilde_setup();
}


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

x86 assembly (clang, -O2):
<d_ugen_setup>:
push   %rax
xor    %eax,%eax
call   1030 <block_tilde_setup@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <samplerate_tilde_setup@plt>

LLVM IR (-O0):
define void @d_ugen_setup() {
%1 = call i32 (...) @block_tilde_setup()
%2 = call i32 (...) @samplerate_tilde_setup()
ret void
}

LLVM IR (-O2):
define void @d_ugen_setup() {
%1 = tail call i32 (...) @block_tilde_setup()
%2 = tail call i32 (...) @samplerate_tilde_setup()
ret void
}
void foo018() {}


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

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

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

LLVM IR (-O2):
define void @foo018() {
ret void
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
int rbtree_strcasecmp(const void *p1, const void *p2) {
  return strcasecmp((const char *)p1, (const char *)p2);
}


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

x86 assembly (clang, -O2):
<rbtree_strcasecmp>:
jmp    1030 <strcasecmp@plt>

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

LLVM IR (-O2):
define i32 @rbtree_strcasecmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcasecmp(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_ptbl_get_port_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_port_table@%p::get_port (rtpp_ptbl_get_port) is invoked "
          "after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_ptbl_get_port_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_ptbl_get_port_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [87 x i8] c"Method rtpp_port_table@%p::get_port (rtpp_ptbl_get_port) is invoked after destruction\0A\00"
define void @rtpp_ptbl_get_port_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [87 x i8] c"Method rtpp_port_table@%p::get_port (rtpp_ptbl_get_port) is invoked after destruction\0A\00"
define void @rtpp_ptbl_get_port_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts(".");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
long check_long() { return 0; }


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

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

LLVM IR (-O0):
define i64 @check_long() {
ret i64 0
}

LLVM IR (-O2):
define i64 @check_long() {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int, int);
int main() {
  int x = 1;
  int y = 123;
  printf("Before swapping: x = %d y = %d\n", x, y);
  swap(x, y);
  printf("After swapping: x = %d y = %d\n", x, y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x7b,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <swap@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%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
mov    $0x1,%esi
mov    $0x7b,%edx
call   1030 <printf@plt>
mov    $0x1,%edi
mov    $0x7b,%esi
call   1040 <swap@plt>
lea    0xed3(%rip),%rdi
mov    $0x1,%esi
mov    $0x7b,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Before swapping: x = %d y = %d\0A\00"
@.str.1 = [31 x i8] c"After swapping: x = %d y = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
store i32 123, i32* %2
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @swap(i32 %6, i32 %7)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"Before swapping: x = %d y = %d\0A\00"
@.str.1 = [31 x i8] c"After swapping: x = %d y = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 1, i32 123)
%2 = tail call i32 @swap(i32 1, i32 123)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 123)
ret i32 0
}
_Bool SignalingGreater(double f1, double f2) { return f1 > f2; }


x86 assembly (clang, -O0):
<SignalingGreater>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SignalingGreater>:
ucomisd %xmm1,%xmm0
seta   %al
ret

LLVM IR (-O0):
define zeroext i1 @SignalingGreater(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
ret i1 %7
}

LLVM IR (-O2):
define zeroext i1 @SignalingGreater(double %0, double %1) {
%3 = fcmp ogt double %0, %1
ret i1 %3
}
/* Variables and functions */
unsigned char hc2i11(char);
unsigned char hc2i(char c) { return hc2i11(c); }


x86 assembly (clang, -O0):
<hc2i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <hc2i11@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hc2i>:
jmp    1030 <hc2i11@plt>

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

LLVM IR (-O2):
define zeroext i8 @hc2i(i8 signext %0) {
%2 = tail call zeroext i8 @hc2i11(i8 signext %0)
ret i8 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int server_init(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ server_loop(int);
void server_run(const char *server_ip, uint16_t port) {
  int socketfd = server_init(server_ip, port);
  server_loop(socketfd);
}


x86 assembly (clang, -O0):
<server_run>:
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   1030 <server_init@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1040 <server_loop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<server_run>:
push   %rax
call   1030 <server_init@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <server_loop@plt>

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

LLVM IR (-O2):
define void @server_run(i8* %0, i32 %1) {
%3 = tail call i32 @server_init(i8* %0, i32 %1)
%4 = tail call i32 @server_loop(i32 %3)
ret void
}
char *STRCAT(char *dest, const char *src) {
  char *tmp = dest;
  while (*dest)
    dest++;
  while ((*dest++ = *src++) != '\0')
    ;
  return tmp;
}


x86 assembly (clang, -O0):
<STRCAT>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1132 <STRCAT+0x32>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <STRCAT+0x14>
jmp    1137 <STRCAT+0x37>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     116a <STRCAT+0x6a>
jmp    1137 <STRCAT+0x37>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<STRCAT>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <STRCAT+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <STRCAT+0x20>
ret

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

LLVM IR (-O2):
define i8* @STRCAT(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %1, %3 ]
%10 = phi i8* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void report(char *mess) {
  fprintf(stderr, "lp: %s: %s\n", mess, strerror(errno));
}


x86 assembly (clang, -O0):
<report>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %rax,%rcx
lea    0xea1(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<report>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebp
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xebc(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"lp: %s: %s\0A\00"
@errno = global i32 0
define void @report(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i32, i32* @errno
%6 = call i8* @strerror(i32 %5)
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"lp: %s: %s\0A\00"
@errno = global i32 0
define void @report(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @errno
%4 = tail call i8* @strerror(i32 %3)
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %4)
ret void
}
unsigned int determinerNbTourAttendreFocusEnnemi(const unsigned int niveauIA) {
  static const unsigned int baseNbTourAttendreFocus[3] = {20, 15, 5};
  return baseNbTourAttendreFocus[niveauIA];
}


x86 assembly (clang, -O0):
<determinerNbTourAttendreFocusEnnemi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
lea    0xeed(%rip),%rax
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<determinerNbTourAttendreFocusEnnemi>:
mov    %edi,%eax
lea    0xef7(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
@determinerNbTourAttendreFocusEnnemi.baseNbTourAttendreFocus = internal constant [3 x i32] [i32 20, i32 15, i32 5]
define i32 @determinerNbTourAttendreFocusEnnemi(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [3 x i32], [3 x i32]* @determinerNbTourAttendreFocusEnnemi.baseNbTourAttendreFocus, i64 0, i64 %4
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
@determinerNbTourAttendreFocusEnnemi.baseNbTourAttendreFocus = internal unnamed_addr constant [3 x i32] [i32 20, i32 15, i32 5]
define i32 @determinerNbTourAttendreFocusEnnemi(i32 %0) {
%2 = zext i32 %0 to i64
%3 = getelementptr inbounds [3 x i32], [3 x i32]* @determinerNbTourAttendreFocusEnnemi.baseNbTourAttendreFocus, i64 0, i64 %2
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ chronometer_stop();
int /*<<< orphan*/ consolemanager_println(char *);
void shell_program_chrono_pause(int argc __attribute__((__unused__)),
                                char *argv[] __attribute__((__unused__))) {
  chronometer_stop();
  consolemanager_println("Chronometer paused ...");
}


x86 assembly (clang, -O0):
<shell_program_chrono_pause>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <chronometer_stop@plt>
lea    0xec3(%rip),%rdi
call   1030 <consolemanager_println@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shell_program_chrono_pause>:
push   %rax
xor    %eax,%eax
call   1040 <chronometer_stop@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <consolemanager_println@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Chronometer paused ...\00"
define void @shell_program_chrono_pause(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @chronometer_stop()
%6 = call i32 @consolemanager_println(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Chronometer paused ...\00"
define void @shell_program_chrono_pause(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @chronometer_stop()
%4 = tail call i32 @consolemanager_println(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t vga_makeentry(char c, uint8_t color) {
  uint16_t c16 = c;
  uint16_t color16 = color;
  return c16 | color16 << 8;
}


x86 assembly (clang, -O0):
<vga_makeentry>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vga_makeentry>:
mov    %esi,%eax
shl    $0x8,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @vga_makeentry(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
store i32 %8, i32* %5
%9 = load i32, i32* %4
store i32 %9, i32* %6
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = shl i32 %11, 8
%13 = or i32 %10, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @vga_makeentry(i8 signext %0, i32 %1) {
%3 = sext i8 %0 to i32
%4 = shl i32 %1, 8
%5 = or i32 %4, %3
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_vtab;
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int csvtabConnect(int /*<<< orphan*/ *, void *, int, char const *const *,
                  int /*<<< orphan*/ **, char **);
int csvtabCreate(sqlite3 *db, void *pAux, int argc, const char *const *argv,
                 sqlite3_vtab **ppVtab, char **pzErr) {
  return csvtabConnect(db, pAux, argc, argv, ppVtab, pzErr);
}


x86 assembly (clang, -O0):
<csvtabCreate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <csvtabConnect@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csvtabCreate>:
jmp    1030 <csvtabConnect@plt>

LLVM IR (-O0):
define i32 @csvtabCreate(i32* %0, i8* %1, i32 %2, i8** %3, i32** %4, i8** %5) {
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8**
%11 = alloca i32**
%12 = alloca i8**
store i32* %0, i32** %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i8** %3, i8*** %10
store i32** %4, i32*** %11
store i8** %5, i8*** %12
%13 = load i32*, i32** %7
%14 = load i8*, i8** %8
%15 = load i32, i32* %9
%16 = load i8**, i8*** %10
%17 = load i32**, i32*** %11
%18 = load i8**, i8*** %12
%19 = call i32 @csvtabConnect(i32* %13, i8* %14, i32 %15, i8** %16, i32** %17, i8** %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @csvtabCreate(i32* %0, i8* %1, i32 %2, i8** %3, i32** %4, i8** %5) {
%7 = tail call i32 @csvtabConnect(i32* %0, i8* %1, i32 %2, i8** %3, i32** %4, i8** %5)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ terminal_putchar(int);
void terminal_putnbr(int n) {
  if (n >= 10) {
    terminal_putnbr(n / 10);
    terminal_putnbr(n % 10);
  } else
    terminal_putchar(48 + n);
}


x86 assembly (clang, -O0):
<terminal_putnbr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jl     115e <terminal_putnbr+0x3e>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <terminal_putnbr@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1030 <terminal_putnbr@plt>
jmp    1169 <terminal_putnbr+0x49>
mov    -0x4(%rbp),%edi
add    $0x30,%edi
call   1040 <terminal_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminal_putnbr>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
cmp    $0xa,%edi
jl     1147 <terminal_putnbr+0x27>
mov    %ebp,%eax
mov    $0xcccccccd,%ebx
imul   %rax,%rbx
shr    $0x23,%rbx
mov    %ebx,%edi
call   1030 <terminal_putnbr@plt>
add    %ebx,%ebx
lea    (%rbx,%rbx,4),%eax
sub    %eax,%ebp
add    $0x30,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <terminal_putchar@plt>

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

LLVM IR (-O2):
define void @terminal_putnbr(i32 %0) {
%2 = icmp sgt i32 %0, 9
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = udiv i32 %0, 10
tail call void @terminal_putnbr(i32 %4)
%5 = urem i32 %0, 10
br label %6
6: ; preds = %3, %1
%7 = phi i32 [ %0, %1 ], [ %5, %3 ]
%8 = add nsw i32 %7, 48
%9 = tail call i32 @terminal_putchar(i32 %8)
ret void
}
int user_trace_enabled() {
  if (__dtrace_isenabled$haskell$user__trace$v1()) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<user_trace_enabled>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <__dtrace_isenabled$haskell$user__trace$v1@plt>
cmp    $0x0,%eax
je     1134 <user_trace_enabled+0x24>
movl   $0x1,-0x4(%rbp)
jmp    113b <user_trace_enabled+0x2b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<user_trace_enabled>:
push   %rax
xor    %eax,%eax
call   1030 <__dtrace_isenabled$haskell$user__trace$v1@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @user_trace_enabled() {
%1 = alloca i32
%2 = call i32 (...) @"__dtrace_isenabled$haskell$user__trace$v1"()
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 1, i32* %1
br label %6
5: ; preds = %0
store i32 0, i32* %1
br label %6
6: ; preds = %5, %4
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @user_trace_enabled() {
%1 = tail call i32 (...) @"__dtrace_isenabled$haskell$user__trace$v1"()
%2 = icmp ne i32 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ ubsan_report_overflow(void *, void *, void *, char *,
                                         char *);
void __ubsan_handle_add_overflow(void *data_raw, void *lhs_raw, void *rhs_raw) {
  ubsan_report_overflow(data_raw, lhs_raw, rhs_raw, "add", "+");
}


x86 assembly (clang, -O0):
<__ubsan_handle_add_overflow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xec9(%rip),%rcx
lea    0xec6(%rip),%r8
call   1030 <ubsan_report_overflow@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ubsan_handle_add_overflow>:
lea    0xee9(%rip),%rcx
lea    0xee6(%rip),%r8
jmp    1030 <ubsan_report_overflow@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"add\00"
@.str.1 = [2 x i8] c"+\00"
define void @__ubsan_handle_add_overflow(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @ubsan_report_overflow(i8* %7, i8* %8, i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"add\00"
@.str.1 = [2 x i8] c"+\00"
define void @__ubsan_handle_add_overflow(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @ubsan_report_overflow(i8* %0, i8* %1, i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void die_with_sys_msg(const char *message) {
  perror(message);
  exit(1);
}


x86 assembly (clang, -O0):
<die_with_sys_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die_with_sys_msg>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @die_with_sys_msg(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @die_with_sys_msg(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int check_assign(char *);
int check_evaluate(char *);
int check_var_eval(char a[]) {
  if (check_assign(a) == 1 || check_evaluate(a) == 1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<check_var_eval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <check_assign@plt>
cmp    $0x1,%eax
je     1150 <check_var_eval+0x30>
mov    -0x10(%rbp),%rdi
call   1040 <check_evaluate@plt>
cmp    $0x1,%eax
jne    115c <check_var_eval+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1163 <check_var_eval+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_var_eval>:
push   %rbx
mov    %rdi,%rbx
call   1030 <check_assign@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x1,%ecx
je     1147 <check_var_eval+0x27>
mov    %rbx,%rdi
call   1040 <check_evaluate@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
sete   %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @check_var_eval(i8* %0) {
%2 = tail call i32 @check_assign(i8* %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @check_evaluate(i8* %0)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
int default_select_key(const void *key, void *data) {
  (void)(key);
  (void)(data);
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @default_select_key(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 1
}
unsigned short test2(unsigned short a) {
  a |= 0x4002;
  a <<= 1;
  a ^= 0x0001;
  return a;
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
or     $0x4002,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
shl    $0x1,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
xor    $0x1,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
lea    (%rdi,%rdi,1),%eax
or     $0x8005,%eax
ret

LLVM IR (-O0):
define zeroext i16 @test2(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = or i32 %4, 16386
%6 = trunc i32 %5 to i16
store i16 %6, i16* %2
%7 = load i16, i16* %2
%8 = zext i16 %7 to i32
%9 = shl i32 %8, 1
%10 = trunc i32 %9 to i16
store i16 %10, i16* %2
%11 = load i16, i16* %2
%12 = zext i16 %11 to i32
%13 = xor i32 %12, 1
%14 = trunc i32 %13 to i16
store i16 %14, i16* %2
%15 = load i16, i16* %2
ret i16 %15
}

LLVM IR (-O2):
define zeroext i16 @test2(i16 zeroext %0) {
%2 = shl i16 %0, 1
%3 = or i16 %2, -32763
ret i16 %3
}
/* Variables and functions */
scalar_t__ GLeeInit();
int /*<<< orphan*/ pglEndTransformFeedback();
void _Lazy_glEndTransformFeedback(void) {
  if (GLeeInit())
    pglEndTransformFeedback();
}


x86 assembly (clang, -O0):
<_Lazy_glEndTransformFeedback>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <GLeeInit@plt>
cmp    $0x0,%rax
je     113c <_Lazy_glEndTransformFeedback+0x1c>
mov    $0x0,%al
call   1030 <pglEndTransformFeedback@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Lazy_glEndTransformFeedback>:
push   %rax
xor    %eax,%eax
call   1040 <GLeeInit@plt>
test   %rax,%rax
je     1135 <_Lazy_glEndTransformFeedback+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <pglEndTransformFeedback@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @_Lazy_glEndTransformFeedback() {
%1 = call i64 (...) @GLeeInit()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @pglEndTransformFeedback()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @_Lazy_glEndTransformFeedback() {
%1 = tail call i64 (...) @GLeeInit()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @pglEndTransformFeedback()
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lengthOfLongestSubstring(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char const *argv[]) {
  char *s = "pwwkew";
  printf("parse string:%s \n", s);
  lengthOfLongestSubstring(s);
  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)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <lengthOfLongestSubstring@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xedf(%rip),%rdi
lea    0xed1(%rip),%rbx
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <lengthOfLongestSubstring@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"pwwkew\00"
@.str.1 = [18 x i8] c"parse string:%s \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = load i8*, i8** %6
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %6
%10 = call i32 @lengthOfLongestSubstring(i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"pwwkew\00"
@.str.1 = [18 x i8] c"parse string:%s \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @lengthOfLongestSubstring(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int i;
  for (i = 0; i < 128; i++) {
    printf("%d:%c\n", i, i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jge    1153 <main+0x43>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x80,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d:%c\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 128
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
float minf(float a, float b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<minf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <minf+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <minf+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<minf>:
minss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @minf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp olt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @minf(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ portctl(char, int, char *);
int aux4on() {
  int pin = 1;
  char mask = 0x20;
  portctl(mask, pin, "aux4on");
  return 1;
}


x86 assembly (clang, -O0):
<aux4on>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movb   $0x20,-0x5(%rbp)
mov    -0x5(%rbp),%al
mov    -0x4(%rbp),%esi
lea    0xed0(%rip),%rdx
movsbl %al,%edi
call   1030 <portctl@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aux4on>:
push   %rax
lea    0xee8(%rip),%rdx
mov    $0x20,%edi
mov    $0x1,%esi
call   1030 <portctl@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"aux4on\00"
define i32 @aux4on() {
%1 = tail call i32 @portctl(i8 signext 32, i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ gc1(char *);
int /*<<< orphan*/ gc2(char *);
void gc_(void) {
  gc1("user requested");
  gc2("user requested");
  return;
}


x86 assembly (clang, -O0):
<gc_>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <gc1@plt>
lea    0xec9(%rip),%rdi
call   1040 <gc2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gc_>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <gc1@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <gc2@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"user requested\00"
define void @gc_() {
%1 = call i32 @gc1(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @gc2(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"user requested\00"
define void @gc_() {
%1 = tail call i32 @gc1(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @gc2(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
long double exp2l(long double x) {}


x86 assembly (clang, -O0):
<exp2l>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @exp2l(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
%4 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @exp2l(x86_fp80 %0) {
ret x86_fp80 undef
}