xunge/DecIR huggingface dataset:
int foo(int i) {
  if (i)
    return 1;
  return 0;
}


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

x86 assembly (clang, -O2):
<foo>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int SIGTERM;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ stdout;
char *strsignal(int);
void sighandler(int signal) {
  fprintf(stdout, "Received signal %d: %s.  Shutting down.\n", signal,
          strsignal(signal));
  if (signal == SIGTERM) {
    exit(signal);
  }
}


x86 assembly (clang, -O0):
<sighandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e96(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <strsignal@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    %rax,%rcx
lea    0xe9b(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%eax
mov    0x2e74(%rip),%rcx
cmp    (%rcx),%eax
jne    1184 <sighandler+0x54>
mov    -0x4(%rbp),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sighandler>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2e9c(%rip),%rax
mov    (%rax),%ebp
call   1040 <strsignal@plt>
lea    0xeb6(%rip),%rsi
mov    %ebp,%edi
mov    %ebx,%edx
mov    %rax,%rcx
call   1030 <fprintf@plt>
mov    0x2e8b(%rip),%rax
cmp    %ebx,(%rax)
je     1168 <sighandler+0x38>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %ebx,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [41 x i8] c"Received signal %d: %s. Shutting down.\0A\00"
@SIGTERM = global i32 0
define void @sighandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = call i8* @strsignal(i32 %5)
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %4, i8* %6)
%8 = load i32, i32* %2
%9 = load i32, i32* @SIGTERM
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = load i32, i32* %2
%13 = call i32 @exit(i32 %12)
unreachable
14: ; preds = %1
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [41 x i8] c"Received signal %d: %s. Shutting down.\0A\00"
@SIGTERM = global i32 0
define void @sighandler(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i8* @strsignal(i32 %0)
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %3)
%5 = load i32, i32* @SIGTERM
%6 = icmp eq i32 %5, %0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 @exit(i32 %0)
unreachable
9: ; preds = %1
ret void
}
/* Variables and functions */
int floor(double);
float numeroArrotondatoACentesimi(double x) {
  return floor(x * 100 + .5) / 100;
}


x86 assembly (clang, -O0):
<numeroArrotondatoACentesimi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed2(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <floor@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numeroArrotondatoACentesimi>:
push   %rax
mulsd  0xee7(%rip),%xmm0
addsd  0xee7(%rip),%xmm0
call   1030 <floor@plt>
cltq
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @numeroArrotondatoACentesimi(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.fmuladd.f64(double %3, double 1.000000e+02, double 5.000000e-01)
%5 = call i32 @floor(double %4)
%6 = sdiv i32 %5, 100
%7 = sitofp i32 %6 to float
ret float %7
}

LLVM IR (-O2):
define float @numeroArrotondatoACentesimi(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 1.000000e+02, double 5.000000e-01)
%3 = tail call i32 @floor(double %2)
%4 = sdiv i32 %3, 100
%5 = sitofp i32 %4 to float
ret float %5
}
/* Variables and functions */
float EaseBounceOut(float, float, float, float);
float EaseBounceIn(float t, float b, float c, float d) {
  return (c - EaseBounceOut(d - t, 0.0f, c, d) + b);
}


x86 assembly (clang, -O0):
<EaseBounceIn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
xorps  %xmm1,%xmm1
call   1030 <EaseBounceOut@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
subss  %xmm1,%xmm0
addss  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EaseBounceIn>:
push   %rax
movss  %xmm2,(%rsp)
movss  %xmm1,0x4(%rsp)
movaps %xmm3,%xmm4
subss  %xmm0,%xmm4
xorps  %xmm1,%xmm1
movaps %xmm4,%xmm0
call   1030 <EaseBounceOut@plt>
movss  (%rsp),%xmm1
subss  %xmm0,%xmm1
addss  0x4(%rsp),%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @EaseBounceIn(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %7
%10 = load float, float* %8
%11 = load float, float* %5
%12 = fsub float %10, %11
%13 = load float, float* %7
%14 = load float, float* %8
%15 = call float @EaseBounceOut(float %12, float 0.000000e+00, float %13, float %14)
%16 = fsub float %9, %15
%17 = load float, float* %6
%18 = fadd float %16, %17
ret float %18
}

LLVM IR (-O2):
define float @EaseBounceIn(float %0, float %1, float %2, float %3) {
%5 = fsub float %3, %0
%6 = tail call float @EaseBounceOut(float %5, float 0.000000e+00, float %2, float %3)
%7 = fsub float %2, %6
%8 = fadd float %7, %1
ret float %8
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};
struct slInt {
  int dummy;
};

/* Variables and functions */
struct slInt *matchingExtId(struct sqlConnection *, char *, char *);
struct slInt *visiGeneSelectLocusLink(struct sqlConnection *conn, char *id) {
  return matchingExtId(conn, id, "locusLink");
}


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

x86 assembly (clang, -O2):
<visiGeneSelectLocusLink>:
lea    0xee9(%rip),%rdx
jmp    1030 <matchingExtId@plt>

LLVM IR (-O0):
%struct.slInt = type { i32 }
%struct.sqlConnection = type { i32 }
@.str = [10 x i8] c"locusLink\00"
define %struct.slInt* @visiGeneSelectLocusLink(%struct.sqlConnection* %0, i8* %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i8*
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i8* %1, i8** %4
%5 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%6 = load i8*, i8** %4
%7 = call %struct.slInt* @matchingExtId(%struct.sqlConnection* %5, i8* %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret %struct.slInt* %7
}

LLVM IR (-O2):
%struct.slInt = type { i32 }
%struct.sqlConnection = type { i32 }
@.str = [10 x i8] c"locusLink\00"
define %struct.slInt* @visiGeneSelectLocusLink(%struct.sqlConnection* %0, i8* %1) {
%3 = tail call %struct.slInt* @matchingExtId(%struct.sqlConnection* %0, i8* %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret %struct.slInt* %3
}
void BN_lshift1(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_lshift1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __ISB();
unsigned long __get_SCTLR();
int /*<<< orphan*/ __set_SCTLR(unsigned long);
__attribute__((always_)) void L1C_EnableCaches(void) {
  __set_SCTLR(__get_SCTLR() | (1UL << 12U) | (1UL << 2U));
  __ISB();
}


x86 assembly (clang, -O0):
<L1C_EnableCaches>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <__get_SCTLR@plt>
mov    %rax,%rdi
or     $0x1000,%rdi
or     $0x4,%rdi
call   1050 <__set_SCTLR@plt>
mov    $0x0,%al
call   1030 <__ISB@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<L1C_EnableCaches>:
push   %rax
xor    %eax,%eax
call   1040 <__get_SCTLR@plt>
or     $0x1004,%rax
mov    %rax,%rdi
call   1050 <__set_SCTLR@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <__ISB@plt>

LLVM IR (-O0):
define void @L1C_EnableCaches() {
%1 = call i64 (...) @__get_SCTLR()
%2 = or i64 %1, 4096
%3 = or i64 %2, 4
%4 = call i32 @__set_SCTLR(i64 %3)
%5 = call i32 (...) @__ISB()
ret void
}

LLVM IR (-O2):
define void @L1C_EnableCaches() {
%1 = tail call i64 (...) @__get_SCTLR()
%2 = or i64 %1, 4100
%3 = tail call i32 @__set_SCTLR(i64 %2)
%4 = tail call i32 (...) @__ISB()
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(void) {
  int c;
  while ((c = getchar()) != EOF)
    if (c < 128)
      (void)putchar(c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     1162 <main+0x42>
cmpl   $0x80,-0x8(%rbp)
jge    115d <main+0x3d>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
jmp    1147 <main+0x27>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
je     1159 <main+0x39>
cmp    $0x7f,%eax
jg     1140 <main+0x20>
mov    %eax,%edi
call   1030 <putchar@plt>
jmp    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %13, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %14
7: ; preds = %3
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 128
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %2
%12 = call i32 @putchar(i32 %11)
br label %13
13: ; preds = %10, %7
br label %3
14: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %9
%5 = phi i32 [ %10, %9 ], [ %1, %0 ]
%6 = icmp slt i32 %5, 128
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @putchar(i32 %5)
br label %9
9: ; preds = %7, %4
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %9, %0
ret i32 0
}
/* Variables and functions */
int sq2_count_impl();
int sq2_count() { return sq2_count_impl(); }


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

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

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

LLVM IR (-O2):
define i32 @sq2_count() {
%1 = tail call i32 (...) @sq2_count_impl()
ret i32 %1
}
/* Variables and functions */
int dired_init();
int module_dired_init(void) { return dired_init(); }


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

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

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

LLVM IR (-O2):
define i32 @module_dired_init() {
%1 = tail call i32 (...) @dired_init()
ret i32 %1
}
main() {
  int *apt1;
  int n;
  apt1 = &n;
  *apt1 = 10;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    -0xc(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xa,(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int toupper(int);
int trio_to_upper(int source) { return toupper(source); }


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

x86 assembly (clang, -O2):
<trio_to_upper>:
jmp    1030 <toupper@plt>

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

LLVM IR (-O2):
define i32 @trio_to_upper(i32 %0) {
%2 = tail call i32 @toupper(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void helptext(char *p_name) {
  printf("Usage: %s [--dos2unix,--unix2dos] -i <input file> -o <output file>\n",
         p_name);
}


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

x86 assembly (clang, -O2):
<helptext>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [68 x i8] c"Usage: %s [--dos2unix,--unix2dos] -i <input file> -o <output file>\0A\00"
define void @helptext(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [68 x i8] c"Usage: %s [--dos2unix,--unix2dos] -i <input file> -o <output file>\0A\00"
define void @helptext(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ erase();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ refresh();
int quit() {
  erase();
  refresh();
  endwin();
  exit(0);
}


x86 assembly (clang, -O0):
<quit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <erase@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
mov    $0x0,%al
call   1050 <endwin@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<quit>:
push   %rax
xor    %eax,%eax
call   1030 <erase@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
xor    %eax,%eax
call   1050 <endwin@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define i32 @quit() {
%1 = call i32 (...) @erase()
%2 = call i32 (...) @refresh()
%3 = call i32 (...) @endwin()
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @quit() {
%1 = tail call i32 (...) @erase()
%2 = tail call i32 (...) @refresh()
%3 = tail call i32 (...) @endwin()
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  printf("XXXXX\nX   X\nXXXXX\n");
  return 0;
}


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)
lea    0xed3(%rip),%rdi
call   1030 <printf@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 = [19 x i8] c"XXXXX\0AX X\0AXXXXX\0A\00"
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 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [18 x i8] c"XXXXX\0AX X\0AXXXXX\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void n32016_close() {}


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

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

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

LLVM IR (-O2):
define void @n32016_close() {
ret void
}
int test_imm_96uint8_mem(unsigned char *val) {
  return ((*val) & (0x96 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_96uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -106
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr1setBank4(int);
void m33setParamsAXX0(uint16_t addr, uint8_t val) {
  (void)addr;
  chr1setBank4(val << 10);
}


x86 assembly (clang, -O0):
<m33setParamsAXX0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
shl    $0xa,%edi
call   1030 <chr1setBank4@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m33setParamsAXX0>:
mov    %esi,%edi
shl    $0xa,%edi
jmp    1030 <chr1setBank4@plt>

LLVM IR (-O0):
define void @m33setParamsAXX0(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 = shl i32 %6, 10
%8 = call i32 @chr1setBank4(i32 %7)
ret void
}

LLVM IR (-O2):
define void @m33setParamsAXX0(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = tail call i32 @chr1setBank4(i32 %3)
ret void
}
long __ocl_rotate_long(long src1, long src2) {
  long lshift = src2 & ((1 << 6) - 1);
  long overflow = (src1 >> (64 - lshift)) & ((((long)1) << lshift) - 1);
  return (src1 << lshift) | overflow;
}


x86 assembly (clang, -O0):
<__ocl_rotate_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x3f,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x40,%ecx
sub    -0x18(%rbp),%rcx
sar    %cl,%rax
mov    -0x18(%rbp),%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
and    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
shl    %cl,%rax
or     -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_rotate_long>:
and    $0x3f,%esi
mov    %esi,%ecx
neg    %cl
mov    %rdi,%rdx
sar    %cl,%rdx
mov    $0xffffffffffffffff,%rax
mov    %esi,%ecx
shl    %cl,%rax
not    %rax
and    %rdx,%rax
shl    %cl,%rdi
or     %rdi,%rax
ret

LLVM IR (-O0):
define i64 @__ocl_rotate_long(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %4
%8 = and i64 %7, 63
store i64 %8, i64* %5
%9 = load i64, i64* %3
%10 = load i64, i64* %5
%11 = sub nsw i64 64, %10
%12 = ashr i64 %9, %11
%13 = load i64, i64* %5
%14 = shl i64 1, %13
%15 = sub nsw i64 %14, 1
%16 = and i64 %12, %15
store i64 %16, i64* %6
%17 = load i64, i64* %3
%18 = load i64, i64* %5
%19 = shl i64 %17, %18
%20 = load i64, i64* %6
%21 = or i64 %19, %20
ret i64 %21
}

LLVM IR (-O2):
define i64 @__ocl_rotate_long(i64 %0, i64 %1) {
%3 = and i64 %1, 63
%4 = sub nuw nsw i64 64, %3
%5 = ashr i64 %0, %4
%6 = shl nsw i64 -1, %3
%7 = xor i64 %6, -1
%8 = and i64 %5, %7
%9 = shl i64 %0, %3
%10 = or i64 %8, %9
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int munmap(void *, size_t);
int /*<<< orphan*/ perror(char *);
void munmap_fortran(size_t bytes, int fd, void *map) {
  if (munmap(map, bytes) == -1) {
    perror("Error un-mmapping the file");
  }
  close(fd);
}


x86 assembly (clang, -O0):
<munmap_fortran>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <munmap@plt>
cmp    $0xffffffff,%eax
jne    1165 <munmap_fortran+0x35>
lea    0xea0(%rip),%rdi
call   1050 <perror@plt>
mov    -0xc(%rbp),%edi
call   1030 <close@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<munmap_fortran>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
mov    %rdx,%rdi
call   1040 <munmap@plt>
cmp    $0xffffffff,%eax
je     114b <munmap_fortran+0x1b>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close@plt>
lea    0xeae(%rip),%rdi
call   1050 <perror@plt>
jmp    1143 <munmap_fortran+0x13>

LLVM IR (-O0):
@.str = [27 x i8] c"Error un-mmapping the file\00"
define void @munmap_fortran(i64 %0, i32 %1, i8* %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i8*
store i64 %0, i64* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i64, i64* %4
%9 = call i32 @munmap(i8* %7, i64 %8)
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %3
%14 = load i32, i32* %5
%15 = call i32 @close(i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Error un-mmapping the file\00"
define void @munmap_fortran(i64 %0, i32 %1, i8* %2) {
%4 = tail call i32 @munmap(i8* %2, i64 %0)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
%9 = tail call i32 @close(i32 %1)
ret void
}
int checkkey(unsigned char rawcode) { return 0; }


x86 assembly (clang, -O0):
<checkkey>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @checkkey(i8 zeroext %0) {
ret i32 0
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double stdlib_strided_dvariancetk(int, int, double *, int);
int main() {
  double x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  double v = stdlib_strided_dvariancetk(N, 1, x, stride);
  printf("sample variance: %lf\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
movl   $0x4,-0x44(%rbp)
movl   $0x2,-0x48(%rbp)
mov    -0x44(%rbp),%edi
lea    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%ecx
mov    $0x1,%esi
call   1050 <stdlib_strided_dvariancetk@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x2,%ecx
call   1040 <stdlib_strided_dvariancetk@plt>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [22 x i8] c"sample variance: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = bitcast [8 x double]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call double @stdlib_strided_dvariancetk(i32 %6, i32 1, double* %7, i32 %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [22 x i8] c"sample variance: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = bitcast [8 x double]* %1 to i8*
%3 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%4 = call double @stdlib_strided_dvariancetk(i32 4, i32 1, double* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
/* Variables and functions */
char *mbed_trace_ipv6(const void *addr_ptr) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @mbed_trace_ipv6(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int binaryfind(int, int /*<<< orphan*/, int);
int binarysearch(int key) { return binaryfind(key, 0, 21 - 1); }


x86 assembly (clang, -O0):
<binarysearch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
mov    $0x14,%edx
call   1030 <binaryfind@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binarysearch>:
xor    %esi,%esi
mov    $0x14,%edx
jmp    1030 <binaryfind@plt>

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

LLVM IR (-O2):
define i32 @binarysearch(i32 %0) {
%2 = tail call i32 @binaryfind(i32 %0, i32 0, i32 20)
ret i32 %2
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_2f(int Salt, int Parameter) {
  unsigned b = Salt * 0x689B4017 + 0x3CFB;
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_f01_2f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x689b4017,-0x4(%rbp),%eax
add    $0x3cfb,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_2f>:
imul   $0x689b4017,%edi,%edi
add    $0x3cfb,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_2f(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = mul nsw i32 %6, 1755004951
%8 = add nsw i32 %7, 15611
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = call i32 @yahoo_M1Common(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @yahoo_f01_2f(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 1755004951
%4 = add nsw i32 %3, 15611
%5 = tail call i32 @yahoo_M1Common(i32 %4, i32 %1)
ret i32 %5
}
/* Variables and functions */
bool single_bit_set(unsigned char c) { return (c & (c - 1)) == 0; }


x86 assembly (clang, -O0):
<single_bit_set>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x1(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<single_bit_set>:
lea    -0x1(%rdi),%ecx
xor    %eax,%eax
test   %cl,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @single_bit_set(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = sub nsw i32 %6, 1
%8 = and i32 %4, %7
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @single_bit_set(i8 zeroext %0) {
%2 = tail call i8 @llvm.ctpop.i8(i8 %0)
%3 = icmp ult i8 %2, 2
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int japi_isselect(int, int);
int j_isselect(int arg0, int arg1) { return (japi_isselect(arg0, arg1)); }


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

x86 assembly (clang, -O2):
<j_isselect>:
jmp    1030 <japi_isselect@plt>

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

LLVM IR (-O2):
define i32 @j_isselect(i32 %0, i32 %1) {
%3 = tail call i32 @japi_isselect(i32 %0, i32 %1)
ret i32 %3
}
int is_in_bound(int *arr, int size, int *ptr) {
  if (arr + 49 > ptr)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_in_bound>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
add    $0xc4,%rax
cmp    -0x20(%rbp),%rax
jbe    112f <is_in_bound+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1136 <is_in_bound+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_in_bound>:
add    $0xc4,%rdi
xor    %eax,%eax
cmp    %rdx,%rdi
seta   %al
ret

LLVM IR (-O0):
define i32 @is_in_bound(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32*
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
%8 = load i32*, i32** %5
%9 = getelementptr inbounds i32, i32* %8, i64 49
%10 = load i32*, i32** %7
%11 = icmp ugt i32* %9, %10
br i1 %11, label %12, label %13
12: ; preds = %3
store i32 1, i32* %4
br label %14
13: ; preds = %3
store i32 0, i32* %4
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %4
ret i32 %15
}

LLVM IR (-O2):
define i32 @is_in_bound(i32* readnone %0, i32 %1, i32* readnone %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 49
%5 = icmp ugt i32* %4, %2
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128GeneralIOPinP__5__IO__makeOutput();
void CC2420ControlP__VREN__makeOutput(void) {
  HplAtm128GeneralIOPinP__5__IO__makeOutput();
}


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

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

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

LLVM IR (-O2):
define void @CC2420ControlP__VREN__makeOutput() {
%1 = tail call i32 (...) @HplAtm128GeneralIOPinP__5__IO__makeOutput()
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int arc_mode;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
void set_XGCValues_arc_mode(void *_p, int _v) {
  ((XGCValues *)_p)->arc_mode = (int)_v;
}


x86 assembly (clang, -O0):
<set_XGCValues_arc_mode>:
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_XGCValues_arc_mode>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XGCValues_arc_mode(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_XGCValues_arc_mode(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gpio_clear(int);
int /*<<< orphan*/ gpio_direction(int, int);
int /*<<< orphan*/ gpio_set(int);
void CS(unsigned int status) {
  gpio_direction(43, 251);
  if (status)
    gpio_set(43);
  else
    gpio_clear(43);
}


x86 assembly (clang, -O0):
<CS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x2b,%edi
mov    $0xfb,%esi
call   1040 <gpio_direction@plt>
cmpl   $0x0,-0x4(%rbp)
je     1163 <CS+0x33>
mov    $0x2b,%edi
call   1050 <gpio_set@plt>
jmp    116d <CS+0x3d>
mov    $0x2b,%edi
call   1030 <gpio_clear@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CS>:
push   %rbx
mov    %edi,%ebx
mov    $0x2b,%edi
mov    $0xfb,%esi
call   1040 <gpio_direction@plt>
mov    $0x2b,%edi
test   %ebx,%ebx
je     1151 <CS+0x21>
pop    %rbx
jmp    1050 <gpio_set@plt>
pop    %rbx
jmp    1030 <gpio_clear@plt>

LLVM IR (-O0):
define void @CS(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @gpio_direction(i32 43, i32 251)
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @gpio_set(i32 43)
br label %10
8: ; preds = %1
%9 = call i32 @gpio_clear(i32 43)
br label %10
10: ; preds = %8, %6
ret void
}

LLVM IR (-O2):
define void @CS(i32 %0) {
%2 = tail call i32 @gpio_direction(i32 43, i32 251)
%3 = icmp eq i32 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @gpio_set(i32 43)
br label %8
6: ; preds = %1
%7 = tail call i32 @gpio_clear(i32 43)
br label %8
8: ; preds = %6, %4
ret void
}
/* Type definitions */
struct Connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Database_close(struct Connection *);
scalar_t__ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ printf(char *, char const *);
void die(const char *msg, struct Connection *conn) {
  if (errno)
    perror(msg);
  else
    printf("Error: %s\n", msg);
  Database_close(conn);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e89(%rip),%rax
cmpq   $0x0,(%rax)
je     116f <die+0x2f>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
jmp    117f <die+0x3f>
mov    -0x8(%rbp),%rsi
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1060 <Database_close@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    0x2e92(%rip),%rax
cmpq   $0x0,(%rax)
je     116e <die+0x2e>
mov    %rsi,%rdi
call   1040 <perror@plt>
mov    %rbx,%rdi
call   1060 <Database_close@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
jmp    115c <die+0x1c>

LLVM IR (-O0):
%struct.Connection = type { i32 }
@errno = global i64 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @die(i8* %0, %struct.Connection* %1) {
%3 = alloca i8*
%4 = alloca %struct.Connection*
store i8* %0, i8** %3
store %struct.Connection* %1, %struct.Connection** %4
%5 = load i64, i64* @errno
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 @perror(i8* %8)
br label %13
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %10, %7
%14 = load %struct.Connection*, %struct.Connection** %4
%15 = call i32 @Database_close(%struct.Connection* %14)
%16 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
%struct.Connection = type { i32 }
@errno = global i64 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @die(i8* %0, %struct.Connection* %1) {
%3 = load i64, i64* @errno
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @perror(i8* %0)
br label %9
7: ; preds = %2
%8 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %9
9: ; preds = %7, %5
%10 = tail call i32 @Database_close(%struct.Connection* %1)
%11 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ InitGL(char const *, int, int, int, int);
int CreateWindow(const char *title, int x, int y, int w, int h) {
  if (InitGL(title, x, y, w, h))
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<CreateWindow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
call   1030 <InitGL@plt>
cmp    $0x0,%rax
je     1155 <CreateWindow+0x45>
movl   $0xffffffff,-0x4(%rbp)
jmp    115c <CreateWindow+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CreateWindow>:
push   %rax
call   1030 <InitGL@plt>
neg    %rax
sbb    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @CreateWindow(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i64 @InitGL(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4)
%7 = icmp ne i64 %6, 0
%8 = sext i1 %7 to i32
ret i32 %8
}
void ClientKill() {}


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

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

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

LLVM IR (-O2):
define void @ClientKill() {
ret void
}
void test_debug() { ; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ UINT32_MAX;
int /*<<< orphan*/ xsd_integer_value(char const *, int /*<<< orphan*/,
                                     int /*<<< orphan*/);
uint32_t xsd_uint32_value(const char *literal) {
  return (uint32_t)xsd_integer_value(literal, 0, UINT32_MAX);
}


x86 assembly (clang, -O0):
<xsd_uint32_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1030 <xsd_integer_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xsd_uint32_value>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
jmp    1030 <xsd_integer_value@plt>

LLVM IR (-O0):
@UINT32_MAX = global i32 0
define i32 @xsd_uint32_value(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @UINT32_MAX
%5 = call i32 @xsd_integer_value(i8* %3, i32 0, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@UINT32_MAX = global i32 0
define i32 @xsd_uint32_value(i8* %0) {
%2 = load i32, i32* @UINT32_MAX
%3 = tail call i32 @xsd_integer_value(i8* %0, i32 0, i32 %2)
ret i32 %3
}
__attribute__((always_)) const float fmaxfk(float x, float y) {
  return x > y ? x : y;
}


x86 assembly (clang, -O0):
<fmaxfk>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <fmaxfk+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <fmaxfk+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmaxfk>:
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @fmaxfk(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 ogt 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 @fmaxfk(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
double MMtoFT(double MM) { return MM / 304.8; }


x86 assembly (clang, -O0):
<MMtoFT>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @MMtoFT(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 3.048000e+02
ret double %4
}

LLVM IR (-O2):
define double @MMtoFT(double %0) {
%2 = fdiv double %0, 3.048000e+02
ret double %2
}
/* Variables and functions */
int unknown_function();
void band_negative_Bad() {
  char a[2];
  int x = unknown_function();
  int y = unknown_function();
  if (x <= -3 && y <= -2) {
    int z = x & y;
    z = z + 5;
    if (z >= 0) {
      a[z] = 0;
    }
  }
}


x86 assembly (clang, -O0):
<band_negative_Bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <unknown_function@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <unknown_function@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xfffffffd,-0x8(%rbp)
jg     116a <band_negative_Bad+0x5a>
cmpl   $0xfffffffe,-0xc(%rbp)
jg     116a <band_negative_Bad+0x5a>
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1165 <band_negative_Bad+0x55>
movslq -0x10(%rbp),%rax
movb   $0x0,-0x2(%rbp,%rax,1)
jmp    116a <band_negative_Bad+0x5a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<band_negative_Bad>:
push   %rax
xor    %eax,%eax
call   1030 <unknown_function@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <unknown_function@plt>

LLVM IR (-O0):
define void @band_negative_Bad() {
%1 = alloca [2 x i8]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 (...) @unknown_function()
store i32 %5, i32* %2
%6 = call i32 (...) @unknown_function()
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = icmp sle i32 %7, -3
br i1 %8, label %9, label %25
9: ; preds = %0
%10 = load i32, i32* %3
%11 = icmp sle i32 %10, -2
br i1 %11, label %12, label %25
12: ; preds = %9
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = and i32 %13, %14
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 5
store i32 %17, i32* %4
%18 = load i32, i32* %4
%19 = icmp sge i32 %18, 0
br i1 %19, label %20, label %24
20: ; preds = %12
%21 = load i32, i32* %4
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 %22
store i8 0, i8* %23
br label %24
24: ; preds = %20, %12
br label %25
25: ; preds = %24, %9, %0
ret void
}

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

/* Variables and functions */
int pthread_setspecific(int /*<<< orphan*/, void *);
int thrd_error;
int thrd_success;
int tss_set(tss_t key, void *val) {
  switch (pthread_setspecific(key, val)) {
  case 0:
    return thrd_success;
  default:
    return thrd_error;
  }
}


x86 assembly (clang, -O0):
<tss_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <pthread_setspecific@plt>
test   %eax,%eax
jne    1149 <tss_set+0x39>
jmp    1138 <tss_set+0x28>
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1155 <tss_set+0x45>
mov    0x2e88(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tss_set>:
push   %rax
call   1030 <pthread_setspecific@plt>
test   %eax,%eax
jne    1123 <tss_set+0x13>
mov    0x2ec7(%rip),%rax
jmp    112a <tss_set+0x1a>
mov    0x2eae(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@thrd_success = global i32 0
@thrd_error = global i32 0
define i32 @tss_set(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = load i8*, i8** %5
%8 = call i32 @pthread_setspecific(i32 %6, i8* %7)
switch i32 %8, label %11 [
i32 0, label %9
]
9: ; preds = %2
%10 = load i32, i32* @thrd_success
store i32 %10, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* @thrd_error
store i32 %12, i32* %3
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@thrd_success = global i32 0
@thrd_error = global i32 0
define i32 @tss_set(i32 %0, i8* %1) {
%3 = tail call i32 @pthread_setspecific(i32 %0, i8* %1)
%4 = icmp eq i32 %3, 0
%5 = load i32, i32* @thrd_success
%6 = load i32, i32* @thrd_error
%7 = select i1 %4, i32 %5, i32 %6
ret i32 %7
}
/* Variables and functions */
long fpathconf(int fd, int name) { return -1; }


x86 assembly (clang, -O0):
<fpathconf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fpathconf>:
mov    $0xffffffffffffffff,%rax
ret

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

LLVM IR (-O2):
define i64 @fpathconf(i32 %0, i32 %1) {
ret i64 -1
}
/* Variables and functions */
bool nrf52_errata_108(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_108() {
ret i32 0
}
long Long_neg(long x) { return -x; }


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

x86 assembly (clang, -O2):
<Long_neg>:
mov    %rdi,%rax
neg    %rax
ret

LLVM IR (-O0):
define i64 @Long_neg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub nsw i64 0, %3
ret i64 %4
}

LLVM IR (-O2):
define i64 @Long_neg(i64 %0) {
%2 = sub nsw i64 0, %0
ret i64 %2
}
int do_171() { return 171; }


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

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

LLVM IR (-O0):
define i32 @do_171() {
ret i32 171
}

LLVM IR (-O2):
define i32 @do_171() {
ret i32 171
}