xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t set_H_1(uint64_t x) { return x |= 0x8000000000000000; }


x86 assembly (clang, -O0):
<set_H_1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0x8000000000000000,%rcx
or     %rcx,%rax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @set_H_1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = or i64 %4, -9223372036854775808
%6 = trunc i64 %5 to i32
store i32 %6, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @set_H_1(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ dbg_break();
void gdb_arch_single_step(void) { dbg_break(); }


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

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

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

LLVM IR (-O2):
define void @gdb_arch_single_step() {
%1 = tail call i32 (...) @dbg_break()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(int *, int *, int);
void memcpy_integer_Bad() {
  int src = 5;
  int dst;
  memcpy(&dst, &src, sizeof(int));
  int a[5];
  a[dst] = 0;
}


x86 assembly (clang, -O0):
<memcpy_integer_Bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x5,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
movslq -0x8(%rbp),%rax
movl   $0x0,-0x20(%rbp,%rax,4)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcpy_integer_Bad>:
push   %rax
movl   $0x5,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @memcpy_integer_Bad() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [5 x i32]
store i32 5, i32* %1
%4 = call i32 @memcpy(i32* %2, i32* %1, i32 4)
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 %6
store i32 0, i32* %7
ret void
}

LLVM IR (-O2):
define void @memcpy_integer_Bad() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 5, i32* %1
%4 = bitcast i32* %2 to i8*
%5 = call i32 @memcpy(i32* %2, i32* %1, i32 4)
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
void test_vorr_u16x4(uint16_t *__restrict__ dest, uint16_t *a, uint16_t *b) {
  int i;
  for (i = 0; i < 4; i++) {
    dest[i] = a[i] | b[i];
  }
}


x86 assembly (clang, -O0):
<test_vorr_u16x4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    1150 <test_vorr_u16x4+0x50>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
or     (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <test_vorr_u16x4+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_vorr_u16x4>:
movups (%rsi),%xmm0
movups (%rdx),%xmm1
orps   %xmm0,%xmm1
movups %xmm1,(%rdi)
ret

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

LLVM IR (-O2):
define void @test_vorr_u16x4(i32* noalias nocapture writeonly %0, i32* nocapture %1, i32* nocapture %2) {
%4 = bitcast i32* %1 to <4 x i32>*
%5 = load <4 x i32>, <4 x i32>* %4
%6 = bitcast i32* %2 to <4 x i32>*
%7 = load <4 x i32>, <4 x i32>* %6
%8 = or <4 x i32> %7, %5
%9 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %8, <4 x i32>* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("something ");
  printf("needs to be done ");
  printf("about the goose poop.\n");
  printf("there is nothing to do.\n");
  printf("oh well.\n");
  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 <printf@plt>
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
lea    0xef7(%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
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
call   1040 <printf@plt>
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xee7(%rip),%rdi
call   1030 <puts@plt>
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"something \00"
@.str.1 = [18 x i8] c"needs to be done \00"
@.str.2 = [23 x i8] c"about the goose poop.\0A\00"
@.str.3 = [25 x i8] c"there is nothing to do.\0A\00"
@.str.4 = [10 x i8] c"oh well.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"something \00"
@.str.1 = [18 x i8] c"needs to be done \00"
@str = [22 x i8] c"about the goose poop.\00"
@str.5 = [24 x i8] c"there is nothing to do.\00"
@str.6 = [9 x i8] c"oh well.\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.5, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.6, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int llib_sys_fchdir(int);
__attribute__((unused)) int fchdir(int fd) { return llib_sys_fchdir(fd); }


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

x86 assembly (clang, -O2):
<fchdir>:
jmp    1030 <llib_sys_fchdir@plt>

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

LLVM IR (-O2):
define i32 @fchdir(i32 %0) {
%2 = tail call i32 @llib_sys_fchdir(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
scalar_t__ IsLedOutOfBounds(int /*<<< orphan*/);
int /*<<< orphan*/ setLedImageBit(int /*<<< orphan*/);
int /*<<< orphan*/ updateHardware();
void LedDriver_TurnON_ALed(uint8_t NLed) {
  if (IsLedOutOfBounds(NLed)) {
    return;
  }
  setLedImageBit(NLed);
  updateHardware();
  return;
}


x86 assembly (clang, -O0):
<LedDriver_TurnON_ALed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <IsLedOutOfBounds@plt>
cmp    $0x0,%rax
je     1152 <LedDriver_TurnON_ALed+0x22>
jmp    1161 <LedDriver_TurnON_ALed+0x31>
mov    -0x4(%rbp),%edi
call   1040 <setLedImageBit@plt>
mov    $0x0,%al
call   1050 <updateHardware@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LedDriver_TurnON_ALed>:
push   %rbx
mov    %edi,%ebx
call   1030 <IsLedOutOfBounds@plt>
test   %rax,%rax
je     113f <LedDriver_TurnON_ALed+0xf>
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <setLedImageBit@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <updateHardware@plt>

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

LLVM IR (-O2):
define void @LedDriver_TurnON_ALed(i32 %0) {
%2 = tail call i64 @IsLedOutOfBounds(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @setLedImageBit(i32 %0)
%6 = tail call i32 (...) @updateHardware()
br label %7
7: ; preds = %1, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ empty_log(char *);
void pa_operation_unref(int *o) {
  empty_log("pa_operation_unref: nothing to do\n");
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"pa_operation_unref: nothing to do\0A\00"
define void @pa_operation_unref(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @empty_log(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"pa_operation_unref: nothing to do\0A\00"
define void @pa_operation_unref(i32* nocapture readnone %0) {
%2 = tail call i32 @empty_log(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int lmsc_get_max_per_path(char *);
int lmsc_get_max_path(void) {
  static int pm;
  if (!pm || pm == -1) {
    pm = lmsc_get_max_per_path("/");
  }
  return pm;
}


x86 assembly (clang, -O0):
<lmsc_get_max_path>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f11(%rip)
je     112e <lmsc_get_max_path+0x1e>
cmpl   $0xffffffff,0x2f04(%rip)
jne    1140 <lmsc_get_max_path+0x30>
lea    0xecb(%rip),%rdi
call   1030 <lmsc_get_max_per_path@plt>
mov    %eax,0x2eec(%rip)
mov    0x2ee6(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lmsc_get_max_path>:
push   %rax
mov    0x2f15(%rip),%eax
lea    0x1(%rax),%ecx
cmp    $0x1,%ecx
ja     1131 <lmsc_get_max_path+0x21>
lea    0xeda(%rip),%rdi
call   1030 <lmsc_get_max_per_path@plt>
mov    %eax,0x2efb(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@lmsc_get_max_path.pm = internal global i32 0
@.str = [2 x i8] c"/\00"
define i32 @lmsc_get_max_path() {
%1 = load i32, i32* @lmsc_get_max_path.pm
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @lmsc_get_max_path.pm
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3, %0
%7 = call i32 @lmsc_get_max_per_path(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 %7, i32* @lmsc_get_max_path.pm
br label %8
8: ; preds = %6, %3
%9 = load i32, i32* @lmsc_get_max_path.pm
ret i32 %9
}

LLVM IR (-O2):
@lmsc_get_max_path.pm = internal unnamed_addr global i32 0
@.str = [2 x i8] c"/\00"
define i32 @lmsc_get_max_path() {
%1 = load i32, i32* @lmsc_get_max_path.pm
%2 = add i32 %1, 1
%3 = icmp ult i32 %2, 2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @lmsc_get_max_per_path(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 %5, i32* @lmsc_get_max_path.pm
br label %6
6: ; preds = %0, %4
%7 = phi i32 [ %1, %0 ], [ %5, %4 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ DAC1_DriverIRQHandler();
__attribute__((weak)) void DAC1_IRQHandler(void) { DAC1_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @DAC1_IRQHandler() {
%1 = call i32 (...) @DAC1_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @DAC1_IRQHandler() {
%1 = tail call i32 (...) @DAC1_DriverIRQHandler()
ret void
}
int _isatty_r(struct _reent *r, int fd) {
  (void)r;
  (void)fd;
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct._reent = type opaque
define i32 @_isatty_r(%struct._reent* nocapture readnone %0, i32 %1) {
ret i32 0
}
unsigned int __gid() {
  static unsigned int gid = 40000;
  return gid++;
}


x86 assembly (clang, -O0):
<__gid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f16(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2f0b(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__gid>:
mov    0x2f1a(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f11(%rip)
ret

LLVM IR (-O0):
@__gid.gid = internal global i32 40000
define i32 @__gid() {
%1 = load i32, i32* @__gid.gid
%2 = add i32 %1, 1
store i32 %2, i32* @__gid.gid
ret i32 %1
}

LLVM IR (-O2):
@__gid.gid = internal unnamed_addr global i32 40000
define i32 @__gid() {
%1 = load i32, i32* @__gid.gid
%2 = add i32 %1, 1
store i32 %2, i32* @__gid.gid
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Hello(void) { printf("Hello World\n"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\0A\00"
define void @Hello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
define void @Hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ scan_devices(char *);
int main(int argc, char **argv) {
  if (argc >= 2) {
    return scan_devices(argv[1]) ? 0 : 1;
  } else {
    scan_devices(NULL);
    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)
cmpl   $0x2,-0x8(%rbp)
jl     1156 <main+0x46>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <scan_devices@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1166 <main+0x56>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <scan_devices@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jl     1129 <main+0x19>
mov    0x8(%rsi),%rdi
call   1030 <scan_devices@plt>
xor    %ebx,%ebx
test   %rax,%rax
sete   %bl
jmp    1132 <main+0x22>
xor    %ebx,%ebx
xor    %edi,%edi
call   1030 <scan_devices@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
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 = load i32, i32* %4
%7 = icmp sge i32 %6, 2
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i64 @scan_devices(i8* %11)
%13 = icmp ne i64 %12, 0
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 0, i32 1
store i32 %15, i32* %3
br label %18
16: ; preds = %2
%17 = call i64 @scan_devices(i8* null)
store i32 0, i32* %3
br label %18
18: ; preds = %16, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @scan_devices(i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %12
10: ; preds = %2
%11 = tail call i64 @scan_devices(i8* null)
br label %12
12: ; preds = %10, %4
%13 = phi i32 [ %9, %4 ], [ 0, %10 ]
ret i32 %13
}
void noMetaOutput(char *str) {}


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

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

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

LLVM IR (-O2):
define void @noMetaOutput(i8* nocapture %0) {
ret void
}
/* Variables and functions */
double strtod(char const *, char **);
double atof(const char *p) { return strtod(p, (char **)0); }


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

x86 assembly (clang, -O2):
<atof>:
xor    %esi,%esi
jmp    1030 <strtod@plt>

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

LLVM IR (-O2):
define double @atof(i8* nocapture %0) {
%2 = tail call double @strtod(i8* nocapture %0, i8** null)
ret double %2
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ print_and_set(int, int);
int main(int argc, char **argv) {
  int voltage = -1;
  if (argc == 2) {
    voltage = atoi(argv[1]);
    print_and_set(1, voltage);
  } else {
    print_and_set(0, 0);
  }
  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)
movl   $0xffffffff,-0x14(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1169 <main+0x49>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
mov    $0x1,%edi
call   1030 <print_and_set@plt>
jmp    1172 <main+0x52>
xor    %esi,%esi
mov    %esi,%edi
call   1030 <print_and_set@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1138 <main+0x18>
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    $0x1,%edi
mov    %eax,%esi
jmp    113c <main+0x1c>
xor    %edi,%edi
xor    %esi,%esi
call   1030 <print_and_set@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 -1, i32* %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 2
br i1 %8, label %9, label %16
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = call i32 @print_and_set(i32 1, i32 %14)
br label %18
16: ; preds = %2
%17 = call i32 @print_and_set(i32 0, i32 0)
br label %18
18: ; preds = %16, %9
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = tail call i32 @print_and_set(i32 1, i32 %7)
br label %11
9: ; preds = %2
%10 = tail call i32 @print_and_set(i32 0, i32 0)
br label %11
11: ; preds = %9, %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_partitioner();
int /*<<< orphan*/ test_single_partition();
int main(int argc, char **argv) {
  test_single_partition();
  test_partitioner();
  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)
mov    $0x0,%al
call   1030 <test_single_partition@plt>
mov    $0x0,%al
call   1040 <test_partitioner@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_single_partition@plt>
xor    %eax,%eax
call   1040 <test_partitioner@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_single_partition()
%4 = tail call i32 (...) @test_partitioner()
ret i32 0
}
/* Variables and functions */
int shm_rd();
int main(int argc, char *argv[]) { return shm_rd(); }


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

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

LLVM IR (-O0):
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 (...) @shm_rd()
ret i32 %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @shm_rd()
ret i32 %3
}
/* Variables and functions */
int mystrlen(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char *test = "   select    ";
  char *test2 = "     * ";
  printf("%d \n", mystrlen(test));
  printf("%d \n", mystrlen(test2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xecd(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <mystrlen@plt>
mov    %eax,%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <mystrlen@plt>
mov    %eax,%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1040 <mystrlen@plt>
lea    0xee2(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
call   1040 <mystrlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c" select \00"
@.str.1 = [8 x i8] c" * \00"
@.str.2 = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = tail call i32 @mystrlen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %1)
%3 = tail call i32 @mystrlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %3)
ret i32 0
}
void XShapeCombineMask() {}


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

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

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

LLVM IR (-O2):
define void @XShapeCombineMask() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ oof(int);
com(int *blah) {
  int z = *blah;
  if (z == 256) {
    oof(z);
    abort();
  }
  return *blah;
}


x86 assembly (clang, -O0):
<com>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x100,-0xc(%rbp)
jne    1151 <com+0x31>
mov    -0xc(%rbp),%edi
call   1040 <oof@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<com>:
push   %rax
mov    (%rdi),%eax
cmp    $0x100,%eax
je     112c <com+0xc>
pop    %rcx
ret
mov    $0x100,%edi
call   1040 <oof@plt>
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @com(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 256
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @oof(i32 256)
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %1
ret i32 %2
}
void Get_config(int required, char *path) {}


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

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

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

LLVM IR (-O2):
define void @Get_config(i32 %0, i8* nocapture %1) {
ret void
}
int mult_shft12(int a, int b) { return ((a * b) >> 12); }


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

x86 assembly (clang, -O2):
<mult_shft12>:
mov    %edi,%eax
imul   %esi,%eax
sar    $0xc,%eax
ret

LLVM IR (-O0):
define i32 @mult_shft12(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
%8 = ashr i32 %7, 12
ret i32 %8
}

LLVM IR (-O2):
define i32 @mult_shft12(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = ashr i32 %3, 12
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fcn_0561(short, short, int);
void fcn_0573(short a, short l, short v) { fcn_0561(a, l, 0x0001); }


x86 assembly (clang, -O0):
<fcn_0573>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %si,%cx
mov    %di,%dx
mov    %dx,-0x2(%rbp)
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    -0x2(%rbp),%ax
mov    $0x1,%edx
movswl %ax,%edi
movswl -0x4(%rbp),%esi
call   1030 <fcn_0561@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcn_0573>:
mov    $0x1,%edx
jmp    1030 <fcn_0561@plt>

LLVM IR (-O0):
define void @fcn_0573(i16 signext %0, i16 signext %1, i16 signext %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16
store i16 %0, i16* %4
store i16 %1, i16* %5
store i16 %2, i16* %6
%7 = load i16, i16* %4
%8 = load i16, i16* %5
%9 = call i32 @fcn_0561(i16 signext %7, i16 signext %8, i32 1)
ret void
}

LLVM IR (-O2):
define void @fcn_0573(i16 signext %0, i16 signext %1, i16 signext %2) {
%4 = tail call i32 @fcn_0561(i16 signext %0, i16 signext %1, i32 1)
ret void
}
void ff_hevc_put_hevc_bi_qpel_hv16_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_hv16_12_sse4() {
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int func(const char *str1, const char *str2) { return strcmp(str1, str2); }


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

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

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

LLVM IR (-O2):
define i32 @func(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int atoi(char *);
char *get_string(int);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  int stringNum = 0;
  if (argc > 1) {
    stringNum = atoi(argv[1]);
  }
  printf("Kibblez 'n %s\n", get_string(stringNum));
}


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)
movl   $0x0,-0x14(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1167 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <get_string@plt>
mov    %rax,%rsi
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %edi,%eax
xor    %edi,%edi
cmp    $0x2,%eax
jl     1145 <main+0x15>
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
call   1030 <get_string@plt>
lea    0xeaf(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Kibblez 'n %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
store i32 %13, i32* %6
br label %14
14: ; preds = %9, %2
%15 = load i32, i32* %6
%16 = call i8* @get_string(i32 %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@.str = [15 x i8] c"Kibblez 'n %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
br label %8
8: ; preds = %4, %2
%9 = phi i32 [ %7, %4 ], [ 0, %2 ]
%10 = tail call i8* @get_string(i32 %9)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %10)
ret i32 0
}
unsigned int MIN(unsigned int a, unsigned int b) { return ((a <= b) ? a : b); }


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

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

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

LLVM IR (-O2):
define i32 @MIN(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ x(char ***);
void y(char ***p) { x(p); }


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

x86 assembly (clang, -O2):
<y>:
jmp    1030 <x@plt>

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

LLVM IR (-O2):
define void @y(i8*** %0) {
%2 = tail call i32 @x(i8*** %0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool errata_136(void) {
  if (*(uint32_t *)0x10000130ul == 0x8ul) {
    if (*(uint32_t *)0x10000134ul == 0x0ul) {
      return true;
    }
    if (*(uint32_t *)0x10000134ul == 0x1ul) {
      return true;
    }
    if (*(uint32_t *)0x10000134ul == 0x2ul) {
      return true;
    }
  }
  return true;
}


x86 assembly (clang, -O0):
<errata_136>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10000130,%eax
movslq (%rax),%rax
cmp    $0x8,%rax
jne    1175 <errata_136+0x75>
mov    $0x10000134,%eax
movslq (%rax),%rax
cmp    $0x0,%rax
jne    1134 <errata_136+0x34>
movl   $0x1,-0x4(%rbp)
jmp    117c <errata_136+0x7c>
mov    $0x10000134,%eax
movslq (%rax),%rax
cmp    $0x1,%rax
jne    1152 <errata_136+0x52>
movl   $0x1,-0x4(%rbp)
jmp    117c <errata_136+0x7c>
mov    $0x10000134,%eax
movslq (%rax),%rax
cmp    $0x2,%rax
jne    1170 <errata_136+0x70>
movl   $0x1,-0x4(%rbp)
jmp    117c <errata_136+0x7c>
jmp    1175 <errata_136+0x75>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @errata_136() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ buzzer_init();
int /*<<< orphan*/ buzzer_off();
int /*<<< orphan*/ buzzer_on();
int /*<<< orphan*/ delay(int);
void main() {
  buzzer_init();
  while (1) {
    buzzer_on();
    delay(0x50000);
    buzzer_off();
    delay(0x50000);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <buzzer_init@plt>
mov    $0x0,%al
call   1040 <buzzer_on@plt>
mov    $0x50000,%edi
call   1030 <delay@plt>
mov    $0x0,%al
call   1060 <buzzer_off@plt>
mov    $0x50000,%edi
call   1030 <delay@plt>
jmp    114b <main+0xb>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <buzzer_init@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <buzzer_on@plt>
mov    $0x50000,%edi
call   1030 <delay@plt>
xor    %eax,%eax
call   1060 <buzzer_off@plt>
mov    $0x50000,%edi
call   1030 <delay@plt>
jmp    1150 <main+0x10>

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @buzzer_init()
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @buzzer_on()
%4 = call i32 @delay(i32 327680)
%5 = call i32 (...) @buzzer_off()
%6 = call i32 @delay(i32 327680)
br label %2
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @buzzer_init()
br label %2
2: ; preds = %0, %2
%3 = tail call i32 (...) @buzzer_on()
%4 = tail call i32 @delay(i32 327680)
%5 = tail call i32 (...) @buzzer_off()
%6 = tail call i32 @delay(i32 327680)
br label %2
}
int to_hex(int x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @to_hex(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ test_msg(char *);
int /*<<< orphan*/ test_waitsig();
void *thread_func(void *args) {
  test_waitsig();
  test_msg("PASS\n");
  exit(0);
}


x86 assembly (clang, -O0):
<thread_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <test_waitsig@plt>
lea    0xeb6(%rip),%rdi
call   1030 <test_msg@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<thread_func>:
push   %rax
xor    %eax,%eax
call   1040 <test_waitsig@plt>
lea    0xec1(%rip),%rdi
call   1030 <test_msg@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"PASS\0A\00"
define i8* @thread_func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @test_waitsig()
%4 = call i32 @test_msg(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [6 x i8] c"PASS\0A\00"
define noalias i8* @thread_func(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @test_waitsig()
%3 = tail call i32 @test_msg(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i = -1;
  int i2 = -2;
  printf("%d", -i + i2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movl   $0xfffffffe,-0xc(%rbp)
xor    %esi,%esi
sub    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
lea    0xec4(%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
mov    $0xffffffff,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 -1)
ret i32 0
}
/* Variables and functions */
char *blurb();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void nice_process(int nice_level) {
  if (nice_level == 0)
    return;
  fprintf(stderr,
          "%s: don't know how to change process priority on this system.\n",
          blurb());
}


x86 assembly (clang, -O0):
<nice_process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    113a <nice_process+0x1a>
jmp    115f <nice_process+0x3f>
mov    0x2e9f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <blurb@plt>
mov    -0x8(%rbp),%edi
mov    %rax,%rdx
lea    0xea6(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nice_process>:
test   %edi,%edi
je     1147 <nice_process+0x27>
push   %rbx
mov    0x2eb4(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1040 <blurb@plt>
lea    0xec4(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
pop    %rbx
jmp    1030 <fprintf@plt>
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [63 x i8] c"%s: don't know how to change process priority on this system.\0A\00"
define void @nice_process(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %10
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = call i8* (...) @blurb()
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [63 x i8] c"%s: don't know how to change process priority on this system.\0A\00"
define void @nice_process(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load i32, i32* @stderr
%5 = tail call i8* (...) @blurb()
%6 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %7
7: ; preds = %1, %3
ret void
}
void gator_hrtimer_shutdown(void) {}


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

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

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

LLVM IR (-O2):
define void @gator_hrtimer_shutdown() {
ret void
}
int fun793() { return 793; }


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

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

LLVM IR (-O0):
define i32 @fun793() {
ret i32 793
}

LLVM IR (-O2):
define i32 @fun793() {
ret i32 793
}
int v9fs_set_create_acl(struct dentry *dentry, struct posix_acl **dpacl,
                        struct posix_acl **pacl) {
  return 0;
}


x86 assembly (clang, -O0):
<v9fs_set_create_acl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.dentry = type opaque
%struct.posix_acl = type opaque
define i32 @v9fs_set_create_acl(%struct.dentry* %0, %struct.posix_acl** %1, %struct.posix_acl** %2) {
%4 = alloca %struct.dentry*
%5 = alloca %struct.posix_acl**
%6 = alloca %struct.posix_acl**
store %struct.dentry* %0, %struct.dentry** %4
store %struct.posix_acl** %1, %struct.posix_acl*** %5
store %struct.posix_acl** %2, %struct.posix_acl*** %6
ret i32 0
}

LLVM IR (-O2):
%struct.dentry = type opaque
%struct.posix_acl = type opaque
define i32 @v9fs_set_create_acl(%struct.dentry* nocapture readnone %0, %struct.posix_acl** nocapture readnone %1, %struct.posix_acl** nocapture readnone %2) {
ret i32 0
}
const char *uuid128_to_str(const unsigned char *uuid) { return "Unknown"; }


x86 assembly (clang, -O0):
<uuid128_to_str>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"Unknown\00"
define i8* @uuid128_to_str(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void prtusage(void) {
  printf("Usage notice. Very much a test program, reads first word from a "
         "file.\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [71 x i8] c"Usage notice. Very much a test program, reads first word from a file.\0A\00"
define void @prtusage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [70 x i8] c"Usage notice. Very much a test program, reads first word from a file.\00"
define void @prtusage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wait(int /*<<< orphan*/ *);
void wait_child(int sig) { wait(NULL); }


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

x86 assembly (clang, -O2):
<wait_child>:
xor    %edi,%edi
jmp    1030 <wait@plt>

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

LLVM IR (-O2):
define void @wait_child(i32 %0) {
%2 = tail call i32 @wait(i32* null)
ret void
}
void save_init() {}


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

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

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

LLVM IR (-O2):
define void @save_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("some lame hello world string.\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 = [31 x i8] c"some lame hello world string.\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 ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [30 x i8] c"some lame hello world string.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int64_t f64i(int64_t x) { return x ^ 1; }


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

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

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

LLVM IR (-O2):
define i32 @f64i(i32 %0) {
%2 = xor i32 %0, 1
ret i32 %2
}