xunge/DecIR huggingface dataset:
int isalnum2(int c) {}


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

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

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

LLVM IR (-O2):
define i32 @isalnum2(i32 %0) {
ret i32 undef
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double logbl(long double x) { return __infer_nondet_long_double(); }


x86 assembly (clang, -O0):
<logbl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @logbl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @logbl(x86_fp80 %0) {
%2 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ delwin(int /*<<< orphan*/ *);
int /*<<< orphan*/ free(int /*<<< orphan*/ **);
void delete_menu(WINDOW **items, int count) {
  int i;
  for (i = 0; i < count; i++)
    delwin(items[i]);
  free(items);
}


x86 assembly (clang, -O0):
<delete_menu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1161 <delete_menu+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <delwin@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <delete_menu+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_menu>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1152 <delete_menu+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1040 <delwin@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1140 <delete_menu+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @delete_menu(i32** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32*, i32** %0, i64 %7
%9 = load i32*, i32** %8
%10 = tail call i32 @delwin(i32* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @free(i32** %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_usage(void) {
  fprintf(stderr, "Usage: HXFsplit [FW] [OUTPUT_DIR]\n\n");
  fprintf(stderr, "Example: HXFsplit VX747.HXF VX747_extracted/\n\n");
}


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

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef5(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"Usage: HXFsplit [FW] [OUTPUT_DIR]\0A\0A\00"
@.str.1 = [47 x i8] c"Example: HXFsplit VX747.HXF VX747_extracted/\0A\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"Usage: HXFsplit [FW] [OUTPUT_DIR]\0A\0A\00"
@.str.1 = [47 x i8] c"Example: HXFsplit VX747.HXF VX747_extracted/\0A\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
ret void
}
main() {
  typedef struct {
    int i;
  } A;
  volatile A v;
  const A c;
  _Static_assert(0 == _Generic(0 ? c : v, A : 0, default : 1), "bad type prop");
}


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

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

LLVM IR (-O0):
%struct.A = type { i32 }
define i32 @main() {
%1 = alloca %struct.A
%2 = alloca %struct.A
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ DebugLogStatusHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void DebugLogStatusLogging() { UAVObjLogging(DebugLogStatusHandle()); }


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

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

LLVM IR (-O0):
define void @DebugLogStatusLogging() {
%1 = call i32 (...) @DebugLogStatusHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @DebugLogStatusLogging() {
%1 = tail call i32 (...) @DebugLogStatusHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
int okarea2(int i1, int i2, int j1, int j2) {
  return ((i2 >= i1) && (j2 >= j1) && (i1 > 0) && (j1 > 0));
}


x86 assembly (clang, -O0):
<okarea2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0x4(%rbp),%ecx
mov    %al,-0x11(%rbp)
jl     114b <okarea2+0x4b>
mov    -0x10(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0x11(%rbp)
jl     114b <okarea2+0x4b>
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x11(%rbp)
jle    114b <okarea2+0x4b>
cmpl   $0x0,-0xc(%rbp)
setg   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<okarea2>:
xor    %eax,%eax
cmp    %edi,%esi
jl     1115 <okarea2+0x15>
test   %edi,%edi
jle    1115 <okarea2+0x15>
cmp    %edx,%ecx
jl     1115 <okarea2+0x15>
xor    %eax,%eax
test   %edx,%edx
setg   %al
ret

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

LLVM IR (-O2):
define i32 @okarea2(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp slt i32 %1, %0
br i1 %5, label %13, label %6
6: ; preds = %4
%7 = icmp sge i32 %3, %2
%8 = icmp sgt i32 %0, 0
%9 = and i1 %8, %7
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = icmp sgt i32 %2, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %10, %6, %4
%14 = phi i32 [ 0, %6 ], [ 0, %4 ], [ %12, %10 ]
ret i32 %14
}
void SNG_close() {}


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

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

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

LLVM IR (-O2):
define void @SNG_close() {
ret void
}
int is_square_matrix(int *p_row, int *p_col) {
  return *p_row > 0 && *p_col > 0 && *p_row == *p_col;
}


x86 assembly (clang, -O0):
<is_square_matrix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x0,(%rcx)
mov    %al,-0x11(%rbp)
jle    1142 <is_square_matrix+0x42>
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x0,(%rcx)
mov    %al,-0x11(%rbp)
jle    1142 <is_square_matrix+0x42>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_square_matrix>:
mov    (%rdi),%ecx
xor    %eax,%eax
test   %ecx,%ecx
jle    1115 <is_square_matrix+0x15>
mov    (%rsi),%edx
test   %edx,%edx
jle    1115 <is_square_matrix+0x15>
xor    %eax,%eax
cmp    %edx,%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @is_square_matrix(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* %5
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %2
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %8
%13 = load i32*, i32** %3
%14 = load i32, i32* %13
%15 = load i32*, i32** %4
%16 = load i32, i32* %15
%17 = icmp eq i32 %14, %16
br label %18
18: ; preds = %12, %8, %2
%19 = phi i1 [ false, %8 ], [ false, %2 ], [ %17, %12 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @is_square_matrix(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = icmp eq i32 %3, %6
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %8, %5, %2
%12 = phi i32 [ 0, %5 ], [ 0, %2 ], [ %10, %8 ]
ret i32 %12
}
void map_update(void) { ; }


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

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

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

LLVM IR (-O2):
define void @map_update() {
ret void
}
void foo094() {}


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

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

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

LLVM IR (-O2):
define void @foo094() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ elf_magic();
int /*<<< orphan*/ readfile();
int /*<<< orphan*/ writefile();
int main() {
  readfile();
  elf_magic();
  writefile();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <readfile@plt>
mov    $0x0,%al
call   1040 <elf_magic@plt>
mov    $0x0,%al
call   1030 <writefile@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @readfile()
%2 = call i32 (...) @elf_magic()
%3 = call i32 (...) @writefile()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @readfile()
%2 = tail call i32 (...) @elf_magic()
%3 = tail call i32 (...) @writefile()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
scalar_t__ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ init_gpio(int);
int /*<<< orphan*/ init_pwm(int);
scalar_t__ open_mem();
int /*<<< orphan*/ set_realtime();
void init_rpi4() {
  set_realtime();
  if (open_mem() != EXIT_SUCCESS) {
    exit(EXIT_FAILURE);
  }
  init_gpio(0xFE000000);
  init_pwm(0xFE000000);
}


x86 assembly (clang, -O0):
<init_rpi4>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <set_realtime@plt>
mov    $0x0,%al
call   1040 <open_mem@plt>
mov    0x2e6f(%rip),%rcx
cmp    (%rcx),%rax
je     1180 <init_rpi4+0x30>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
mov    $0xfe000000,%edi
call   1060 <init_gpio@plt>
mov    $0xfe000000,%edi
call   1050 <init_pwm@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_rpi4>:
push   %rax
xor    %eax,%eax
call   1030 <set_realtime@plt>
xor    %eax,%eax
call   1040 <open_mem@plt>
mov    0x2e72(%rip),%rcx
cmp    (%rcx),%rax
jne    1180 <init_rpi4+0x30>
mov    $0xfe000000,%edi
call   1060 <init_gpio@plt>
mov    $0xfe000000,%edi
pop    %rax
jmp    1050 <init_pwm@plt>
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i64 0
@EXIT_FAILURE = global i32 0
define void @init_rpi4() {
%1 = call i32 (...) @set_realtime()
%2 = call i64 (...) @open_mem()
%3 = load i64, i64* @EXIT_SUCCESS
%4 = icmp ne i64 %2, %3
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
8: ; preds = %0
%9 = call i32 @init_gpio(i32 -33554432)
%10 = call i32 @init_pwm(i32 -33554432)
ret void
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i64 0
@EXIT_FAILURE = global i32 0
define void @init_rpi4() {
%1 = tail call i32 (...) @set_realtime()
%2 = tail call i64 (...) @open_mem()
%3 = load i64, i64* @EXIT_SUCCESS
%4 = icmp eq i64 %2, %3
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %0
%9 = tail call i32 @init_gpio(i32 -33554432)
%10 = tail call i32 @init_pwm(i32 -33554432)
ret void
}
void kol_exit() { asm("int $0x40" ::"a"(-1)); }


x86 assembly (clang, -O0):
<kol_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%eax
int    $0x40
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_exit>:
mov    $0xffffffff,%eax
int    $0x40
ret

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

LLVM IR (-O2):
define void @kol_exit() {
tail call void asm sideeffect "int $$0x40", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 -1)
ret void
}
int __attribute__((no)) test_ifelse2(int i) {
  int result = 0;
  if (!i)
    result = 1;
  if (i == 1)
    result = 1024;
  if (i == 2)
    result = 2;
  if (i == 3)
    return 8;
  if (i == 4)
    return 2048;
  return result;
}


x86 assembly (clang, -O0):
<test_ifelse2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111f <test_ifelse2+0x1f>
movl   $0x1,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1130 <test_ifelse2+0x30>
movl   $0x400,-0xc(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1141 <test_ifelse2+0x41>
movl   $0x2,-0xc(%rbp)
cmpl   $0x3,-0x8(%rbp)
jne    1157 <test_ifelse2+0x57>
movl   $0x8,-0x4(%rbp)
jmp    1173 <test_ifelse2+0x73>
cmpl   $0x4,-0x8(%rbp)
jne    116d <test_ifelse2+0x6d>
movl   $0x800,-0x4(%rbp)
jmp    1173 <test_ifelse2+0x73>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ifelse2>:
cmp    $0x3,%edi
je     1110 <test_ifelse2+0x10>
cmp    $0x4,%edi
jne    1116 <test_ifelse2+0x16>
mov    $0x800,%eax
ret
mov    $0x8,%eax
ret
xor    %ecx,%ecx
test   %edi,%edi
sete   %cl
cmp    $0x1,%edi
mov    $0x400,%eax
cmovne %ecx,%eax
cmp    $0x2,%edi
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @test_ifelse2(i32 %0) {
switch i32 %0, label %3 [
i32 3, label %10
i32 4, label %2
]
2: ; preds = %1
br label %10
3: ; preds = %1
%4 = icmp eq i32 %0, 2
%5 = icmp eq i32 %0, 1
%6 = icmp eq i32 %0, 0
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 1024, i32 %7
%9 = select i1 %4, i32 2, i32 %8
br label %10
10: ; preds = %1, %3, %2
%11 = phi i32 [ 2048, %2 ], [ %9, %3 ], [ 8, %1 ]
ret i32 %11
}
regx0adr1_set(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{ (p0[x0]) = (*((int *)11111111)); }


x86 assembly (clang, -O0):
<regx0adr1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    $0xa98ac7,%eax
mov    (%rax),%edx
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regx0adr1_set>:
mov    0xa98ac7,%eax
movslq %edx,%rcx
mov    %eax,(%r8,%rcx,4)
ret

LLVM IR (-O0):
define i32 @regx0adr1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32, i32* inttoptr (i64 11111111 to i32*)
%15 = load i32*, i32** %12
%16 = load i32, i32* %10
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
store i32 %14, i32* %18
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @regx0adr1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture writeonly %4, i32* nocapture readnone %5) {
%7 = load i32, i32* inttoptr (i64 11111111 to i32*)
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds i32, i32* %4, i64 %8
store i32 %7, i32* %9
ret i32 undef
}
__attribute__((weak)) void setUp(void) {}


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

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

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

LLVM IR (-O2):
define weak void @setUp() {
ret void
}
int dev_set_param(struct device_d *dev, const char *name, const char *val) {
  return 0;
}


x86 assembly (clang, -O0):
<dev_set_param>:
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):
<dev_set_param>:
xor    %eax,%eax
ret

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

LLVM IR (-O2):
%struct.device_d = type opaque
define i32 @dev_set_param(%struct.device_d* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
int test_imm_4Euint16_mem(unsigned short *val) {
  return ((*val) & (-0x4E << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_4Euint16_mem>:
movzwl (%rdi),%eax
test   $0xffb2,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_4Euint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -78
%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_4Euint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -78
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
bool SHAREMIND_SET_KEY_EQUALS_long(long const k1, long const k2) {
  return k1 == k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_SET_KEY_EQUALS_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_EQUALS_long>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_EQUALS_long(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_EQUALS_long(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _report_space(int, char const *, int const);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int const,
                           int const);
int /*<<< orphan*/ stderr;
void malloc_error(const char *file, const int line, const int space) {
  fprintf(stderr, "%12.12s:%-4d Malloc Failure of %5d bytes\n", file, line,
          space);
  _report_space(1, file, line);
  exit(99);
}


x86 assembly (clang, -O0):
<malloc_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xea3(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x1,%edi
call   1050 <_report_space@plt>
mov    $0x63,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<malloc_error>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%r8d
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
mov    %rbx,%rdx
mov    %ebp,%ecx
call   1030 <fprintf@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1050 <_report_space@plt>
mov    $0x63,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"%12.12s:%-4d Malloc Failure of %5d bytes\0A\00"
define void @malloc_error(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9, i32 %10)
%12 = load i8*, i8** %4
%13 = load i32, i32* %5
%14 = call i32 @_report_space(i32 1, i8* %12, i32 %13)
%15 = call i32 @exit(i32 99)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"%12.12s:%-4d Malloc Failure of %5d bytes\0A\00"
define void @malloc_error(i8* %0, i32 %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i32 %2)
%6 = tail call i32 @_report_space(i32 1, i8* %0, i32 %1)
%7 = tail call i32 @exit(i32 99)
unreachable
}
/* Variables and functions */
scalar_t__ check(int, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int strlen(char *);
int main() {
  char palindromlisi[128];
  scanf("%s", palindromlisi);
  int len = strlen(palindromlisi);
  if (check(len, palindromlisi)) {
    printf("1");
  } else
    printf("0");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rsi
lea    0xea0(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x90(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x94(%rbp)
mov    -0x94(%rbp),%edi
lea    -0x90(%rbp),%rsi
call   1060 <check@plt>
cmp    $0x0,%rax
je     11a4 <main+0x64>
lea    0xe69(%rip),%rdi
call   1040 <printf@plt>
jmp    11b0 <main+0x70>
lea    0xe5a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
lea    0xeb1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
mov    %rbx,%rsi
call   1060 <check@plt>
cmp    $0x1,%rax
mov    $0x31,%edi
sbb    $0x0,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @strlen(i8* %2)
%5 = call i64 @check(i32 %4, i8* %2)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i32 48, i32 49
%8 = call i32 @putchar(i32 %7)
ret i32 0
}
void risk_yield(void) {
  void risk_entry(void);
  risk_entry();
}


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

x86 assembly (clang, -O2):
<risk_yield>:
jmp    1030 <risk_entry@plt>

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

LLVM IR (-O2):
define void @risk_yield() {
tail call void @risk_entry()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
void ipr_strncpy_0(char *dest, char *source, int length) {
  memcpy(dest, source, length);
  dest[length] = '\0';
}


x86 assembly (clang, -O0):
<ipr_strncpy_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipr_strncpy_0>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <memcpy@plt>
movslq %ebp,%rax
movb   $0x0,(%rbx,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @ipr_strncpy_0(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @memcpy(i8* %7, i8* %8, i32 %9)
%11 = load i8*, i8** %4
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
store i8 0, i8* %14
ret void
}

LLVM IR (-O2):
define void @ipr_strncpy_0(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %2)
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 0, i8* %6
ret void
}
short fn1(short p1, unsigned short p2) { return p1 + p2; }


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswl -0x2(%rbp),%eax
movzwl -0x4(%rbp),%ecx
add    %ecx,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn1>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define signext i16 @fn1(i16 signext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = sext i16 %5 to i32
%7 = load i16, i16* %4
%8 = zext i16 %7 to i32
%9 = add nsw i32 %6, %8
%10 = trunc i32 %9 to i16
ret i16 %10
}

LLVM IR (-O2):
define signext i16 @fn1(i16 signext %0, i16 zeroext %1) {
%3 = add i16 %1, %0
ret i16 %3
}
/* Variables and functions */
char *malloc(int);
int main() {
  char *c = malloc(42);
  c[42] = 1;
  return c[0];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2a,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x1,0x2a(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @malloc(i32 42)
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 42
store i8 1, i8* %5
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
struct timespec {
  unsigned int tv_sec;
  unsigned int tv_nsec;
};

/* Variables and functions */
scalar_t__ nanosleep(struct timespec *, int /*<<< orphan*/ *);
int sleep_ms(unsigned int ms) {
  struct timespec req;
  req.tv_sec = ms / 1000;
  req.tv_nsec = (ms % 1000) * 1000000;
  if (nanosleep(&req, NULL) < 0) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<sleep_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %ecx
imul   $0xf4240,%edx,%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
cmp    $0x0,%rax
jge    1162 <sleep_ms+0x52>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <sleep_ms+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep_ms>:
push   %rax
mov    %edi,%eax
imul   $0x10624dd3,%rax,%rax
shr    $0x26,%rax
mov    %eax,(%rsp)
imul   $0x3e8,%eax,%eax
sub    %eax,%edi
imul   $0xf4240,%edi,%eax
mov    %eax,0x4(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
sar    $0x3f,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define i32 @sleep_ms(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.timespec
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = udiv i32 %5, 1000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
store i32 %6, i32* %7
%8 = load i32, i32* %3
%9 = urem i32 %8, 1000
%10 = mul i32 %9, 1000000
%11 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
store i32 %10, i32* %11
%12 = call i64 @nanosleep(%struct.timespec* %4, i32* null)
%13 = icmp slt i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %1
store i32 -1, i32* %2
br label %16
15: ; preds = %1
store i32 0, i32* %2
br label %16
16: ; preds = %15, %14
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define i32 @sleep_ms(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = udiv i32 %0, 1000
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %4, i32* %5
%6 = urem i32 %0, 1000
%7 = mul nuw nsw i32 %6, 1000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i32 %7, i32* %8
%9 = call i64 @nanosleep(%struct.timespec* %2, i32* null)
%10 = ashr i64 %9, 63
%11 = trunc i64 %10 to i32
ret i32 %11
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ printf(char *, char const *, int, char *);
char *strerror(int);
int bitch(const char *pszMsg) {
  printf("failure: %s: %d %s\n", pszMsg, errno, strerror(errno));
  return 1;
}


x86 assembly (clang, -O0):
<bitch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    %rax,%rcx
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitch>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebp
mov    %ebp,%edi
call   1040 <strerror@plt>
lea    0xec3(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
mov    %rax,%rcx
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"failure: %s: %d %s\0A\00"
@errno = global i32 0
define i32 @bitch(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @errno
%5 = load i32, i32* @errno
%6 = call i8* @strerror(i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %4, i8* %6)
ret i32 1
}

LLVM IR (-O2):
@.str = [20 x i8] c"failure: %s: %d %s\0A\00"
@errno = global i32 0
define i32 @bitch(i8* %0) {
%2 = load i32, i32* @errno
%3 = tail call i8* @strerror(i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %2, i8* %3)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void errx(int exv, char *str) {
  fprintf(stderr, "cal: %s\n", str);
  exit(exv);
}


x86 assembly (clang, -O0):
<errx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<errx>:
push   %rbx
mov    %rsi,%rdx
mov    %edi,%ebx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [9 x i8] c"cal: %s\0A\00"
define void @errx(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %4
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %3
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [9 x i8] c"cal: %s\0A\00"
define void @errx(i32 %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
void budd_panic_int(char *a, int b) {
  fprintf(stderr, "error: %s: 0x%x\n", a, b);
  exit(1);
}


x86 assembly (clang, -O0):
<budd_panic_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<budd_panic_int>:
push   %rax
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"error: %s: 0x%x\0A\00"
define void @budd_panic_int(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"error: %s: 0x%x\0A\00"
define void @budd_panic_int(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%5 = tail call i32 @exit(i32 1)
unreachable
}
int test_imm_FCuint8_reg(unsigned char val) {
  return ((val) & (-0xFC << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FCuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff04,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_FCuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 4
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int is_boot_nor() {
  int tmp = (*(volatile int *)0);
  (*(volatile int *)0) = 0xabcdef;
  if ((*(volatile int *)0) == 0xabcdef) {
    (*(volatile int *)0) = tmp;
    return 0;
  } else {
    (*(volatile int *)0) = tmp;
    return 1;
  }
}


x86 assembly (clang, -O0):
<is_boot_nor>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
movl   $0xabcdef,(%rax)
xor    %eax,%eax
mov    (%rax),%eax
cmp    $0xabcdef,%eax
jne    1135 <is_boot_nor+0x35>
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    1143 <is_boot_nor+0x43>
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_boot_nor>:
mov    0x0,%ecx
movl   $0xabcdef,0x0
mov    0x0,%edx
xor    %eax,%eax
cmp    $0xabcdef,%edx
setne  %al
mov    %ecx,0x0
ret

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

LLVM IR (-O2):
define i32 @is_boot_nor() {
%1 = load volatile i32, i32* null
store volatile i32 11259375, i32* null
%2 = load volatile i32, i32* null
%3 = icmp ne i32 %2, 11259375
store volatile i32 %1, i32* null
%4 = zext i1 %3 to i32
ret i32 %4
}
void ff_hevc_put_hevc_bi_w_qpel_h4_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_h4_8_sse4() {
ret void
}
int c_add(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<c_add>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @c_add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ keyItem(unsigned char, int /*<<< orphan*/,
                           int /*<<< orphan*/);
void menuItem(int item) { keyItem((unsigned char)item, 0, 0); }


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

x86 assembly (clang, -O2):
<menuItem>:
movzbl %dil,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <keyItem@plt>

LLVM IR (-O0):
define void @menuItem(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
%5 = call i32 @keyItem(i8 zeroext %4, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @menuItem(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i32 @keyItem(i8 zeroext %2, i32 0, i32 0)
ret void
}
int isascii(int c) { return (c >= 0x00 && c <= 0x7f); }


x86 assembly (clang, -O0):
<isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isascii+0x20>
cmpl   $0x7f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isascii>:
xor    %eax,%eax
cmp    $0x80,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isascii(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_15(uint64_t x) {
  __asm__("rolq $15, %0" : "=r"(x) : "0"(x));
  return x;
}


x86 assembly (clang, -O0):
<ROL64_15>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
rol    $0xf,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ROL64_15>:
mov    %rdi,%rax
rol    $0xf,%rax
ret

LLVM IR (-O0):
define i8* @ROL64_15(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$15, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_15(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$15, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
int cmpfunc(const void *p, const void *q) { return *(int *)p - *(int *)q; }


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

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

LLVM IR (-O0):
define i32 @cmpfunc(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @cmpfunc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
void put_user_byte_io(char val, char *addr) {
  __asm__ __volatile__("mov  %0,%1" : : "r"(val), "r"(*addr));
}


x86 assembly (clang, -O0):
<put_user_byte_io>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rcx
mov    (%rcx),%cl
mov    %al,%cl
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_user_byte_io>:
mov    (%rsi),%al
mov    %dil,%al
ret

LLVM IR (-O0):
define void @put_user_byte_io(i8 signext %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 = load i8, i8* %6
ret void
}

LLVM IR (-O2):
define void @put_user_byte_io(i8 signext %0, i8* nocapture %1) {
%3 = load i8, i8* %1
tail call void asm sideeffect "mov $0,$1", "r,r,~{dirflag},~{fpsr},~{flags}"(i8 %0, i8 %3)
ret void
}
/* Type definitions */
struct _Locale_monetary {
  int dummy;
};

/* Variables and functions */
int CHAR_MAX;
int _Locale_p_sign_posn(struct _Locale_monetary *lmon) { return CHAR_MAX; }


x86 assembly (clang, -O0):
<_Locale_p_sign_posn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Locale_p_sign_posn>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct._Locale_monetary = type { i32 }
@CHAR_MAX = global i32 0
define i32 @_Locale_p_sign_posn(%struct._Locale_monetary* %0) {
%2 = alloca %struct._Locale_monetary*
store %struct._Locale_monetary* %0, %struct._Locale_monetary** %2
%3 = load i32, i32* @CHAR_MAX
ret i32 %3
}

LLVM IR (-O2):
%struct._Locale_monetary = type { i32 }
@CHAR_MAX = global i32 0
define i32 @_Locale_p_sign_posn(%struct._Locale_monetary* nocapture readnone %0) {
%2 = load i32, i32* @CHAR_MAX
ret i32 %2
}
int test_int_3(int a, int b, int c) { return -8; }


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

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

LLVM IR (-O0):
define i32 @test_int_3(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 -8
}

LLVM IR (-O2):
define i32 @test_int_3(i32 %0, i32 %1, i32 %2) {
ret i32 -8
}