xunge/DecIR huggingface dataset:
int test_imm_60int32_mem(int *val) {
  return ((*val) & (0x60 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_60int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 96
%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_60int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 96
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
__attribute__((__always___)) void psnip_trap(void) {
  __asm__ __volatile__("int $03");
}


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

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

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

LLVM IR (-O2):
define void @psnip_trap() {
tail call void asm sideeffect "int $$03", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int mul5div8(int x) { return ((x << 2) + x) >> 3; }


x86 assembly (clang, -O0):
<mul5div8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
add    -0x4(%rbp),%eax
sar    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul5div8>:
lea    (%rdi,%rdi,4),%eax
sar    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @mul5div8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 2
%5 = load i32, i32* %2
%6 = add nsw i32 %4, %5
%7 = ashr i32 %6, 3
ret i32 %7
}

LLVM IR (-O2):
define i32 @mul5div8(i32 %0) {
%2 = mul i32 %0, 5
%3 = ashr i32 %2, 3
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void brazil() { printf("I am in brazil\n"); }


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

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

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

LLVM IR (-O2):
@str = [15 x i8] c"I am in brazil\00"
define void @brazil() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
int logging(const char namefmt[], ...) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @logging(i8* nocapture readnone %0, ...) {
ret i32 0
}
int do_330() { return 330; }


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

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

LLVM IR (-O0):
define i32 @do_330() {
ret i32 330
}

LLVM IR (-O2):
define i32 @do_330() {
ret i32 330
}
void move32() {}


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

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

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

LLVM IR (-O2):
define void @move32() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ knightTourHelper(int **, int, int, int);
int main() {
  int board[8][8] = {
      {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0},
      {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0},
      {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0},
      {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0},
  };
  knightTourHelper(board, -1, 2, 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1030 <memset@plt>
lea    -0x100(%rbp),%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1040 <knightTourHelper@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x108,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <knightTourHelper@plt>
xor    %eax,%eax
add    $0x108,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [8 x [8 x i32]]
%2 = bitcast [8 x [8 x i32]]* %1 to i8*
%3 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %1, i64 0, i64 0
%4 = bitcast [8 x i32]* %3 to i32**
%5 = call i32 @knightTourHelper(i32** %4, i32 -1, i32 2, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [8 x [8 x i32]]
%2 = bitcast [8 x [8 x i32]]* %1 to i8*
%3 = bitcast [8 x [8 x i32]]* %1 to i32**
%4 = call i32 @knightTourHelper(i32** %3, i32 -1, i32 2, i32 1)
ret i32 0
}
int main() {
  printf("%s\n", __func__);
  return func1(5) + func2(5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    0xeb7(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x5,%edi
mov    $0x0,%al
call   1030 <func1@plt>
mov    %eax,-0x8(%rbp)
mov    $0x5,%edi
mov    $0x0,%al
call   1050 <func2@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
mov    $0x5,%edi
xor    %eax,%eax
call   1030 <func1@plt>
mov    %eax,%ebx
mov    $0x5,%edi
xor    %eax,%eax
call   1050 <func2@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@__func__.main = [5 x i8] c"main\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0))
%3 = call i32 (i32, ...) bitcast (i32 (...)* @func1 to i32 (i32, ...)*)(i32 5)
%4 = call i32 (i32, ...) bitcast (i32 (...)* @func2 to i32 (i32, ...)*)(i32 5)
%5 = add nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
@__func__.main = [5 x i8] c"main\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0))
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @func1 to i32 (i32, ...)*)(i32 5)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @func2 to i32 (i32, ...)*)(i32 5)
%4 = add nsw i32 %3, %2
ret i32 %4
}
/* Type definitions */
struct typ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ definition_const(struct typ const *);
size_t node_fun_max_args_count(int /*<<< orphan*/);
int /*<<< orphan*/ typ_is_function(struct typ const *);
size_t typ_function_max_arity(const struct typ *t) {
  assert(typ_is_function(t));
  return node_fun_max_args_count(definition_const(t));
}


x86 assembly (clang, -O0):
<typ_function_max_arity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <typ_is_function@plt>
mov    %eax,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1050 <definition_const@plt>
mov    %eax,%edi
call   1060 <node_fun_max_args_count@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<typ_function_max_arity>:
push   %rbx
mov    %rdi,%rbx
call   1030 <typ_is_function@plt>
mov    %eax,%edi
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1050 <definition_const@plt>
mov    %eax,%edi
pop    %rbx
jmp    1060 <node_fun_max_args_count@plt>

LLVM IR (-O0):
%struct.typ = type { i32 }
define i64 @typ_function_max_arity(%struct.typ* %0) {
%2 = alloca %struct.typ*
store %struct.typ* %0, %struct.typ** %2
%3 = load %struct.typ*, %struct.typ** %2
%4 = call i32 @typ_is_function(%struct.typ* %3)
%5 = call i32 @assert(i32 %4)
%6 = load %struct.typ*, %struct.typ** %2
%7 = call i32 @definition_const(%struct.typ* %6)
%8 = call i64 @node_fun_max_args_count(i32 %7)
ret i64 %8
}

LLVM IR (-O2):
%struct.typ = type { i32 }
define i64 @typ_function_max_arity(%struct.typ* %0) {
%2 = tail call i32 @typ_is_function(%struct.typ* %0)
%3 = tail call i32 @assert(i32 %2)
%4 = tail call i32 @definition_const(%struct.typ* %0)
%5 = tail call i64 @node_fun_max_args_count(i32 %4)
ret i64 %5
}
/* Variables and functions */
scalar_t__ malloc(int);
void *getVal(unsigned int i) {
  int *val = (int *)malloc(sizeof(int));
  *(val) = i;
  return (void *)val;
}


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

x86 assembly (clang, -O2):
<getVal>:
push   %rbx
mov    %edi,%ebx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %ebx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define i8* @getVal(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %3
%6 = load i32, i32* %2
%7 = load i32*, i32** %3
store i32 %6, i32* %7
%8 = load i32*, i32** %3
%9 = bitcast i32* %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
define i8* @getVal(i32 %0) {
%2 = tail call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32 %0, i32* %3
%4 = inttoptr i64 %2 to i8*
ret i8* %4
}
/* Variables and functions */
scalar_t__ atanhf(float);
int /*<<< orphan*/ link_failure_atanhf();
void test_atanhf(float f) {
  if (atanhf(f) != atanhf(f))
    link_failure_atanhf();
}


x86 assembly (clang, -O0):
<test_atanhf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <atanhf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <atanhf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_atanhf+0x3c>
mov    $0x0,%al
call   1040 <link_failure_atanhf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_atanhf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1030 <atanhf@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1030 <atanhf@plt>
cmp    %rax,%rbx
jne    1149 <test_atanhf+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <link_failure_atanhf@plt>

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

LLVM IR (-O2):
define void @test_atanhf(float %0) {
%2 = tail call i64 @atanhf(float %0)
%3 = tail call i64 @atanhf(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_atanhf()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int *two_sum(int *, int, int);
int main(void) {
  int target = 8;
  int numbers[] = {-3, 4, 4, 90};
  int *indices = two_sum(numbers, 4, target);
  printf("index1 = %d, index2 = %d\n", indices[0], indices[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x8,-0x8(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%edx
mov    $0x4,%esi
call   1040 <two_sum@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%esi
mov    -0x28(%rbp),%rax
mov    0x4(%rax),%edx
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
mov    $0x8,%edx
call   1040 <two_sum@plt>
mov    (%rax),%esi
mov    0x4(%rax),%edx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.numbers = [4 x i32] [i32 -3, i32 4, i32 4, i32 90]
@.str = [26 x i8] c"index1 = %d, index2 = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [4 x i32]
%4 = alloca i32*
store i32 0, i32* %1
store i32 8, i32* %2
%5 = bitcast [4 x i32]* %3 to i8*
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%7 = load i32, i32* %2
%8 = call i32* @two_sum(i32* %6, i32 4, i32 %7)
store i32* %8, i32** %4
%9 = load i32*, i32** %4
%10 = getelementptr inbounds i32, i32* %9, i64 0
%11 = load i32, i32* %10
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %14)
ret i32 0
}

LLVM IR (-O2):
@__const.main.numbers = [4 x i32] [i32 -3, i32 4, i32 4, i32 90]
@.str = [26 x i8] c"index1 = %d, index2 = %d\0A\00"
define i32 @main() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32* @two_sum(i32* %3, i32 4, i32 8)
%5 = load i32, i32* %4
%6 = getelementptr inbounds i32, i32* %4, i64 1
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int sqlite3OsSleep(int ms) {
  sleep((ms + 999) / 1000);
  return 1000 * ((ms + 999) / 1000);
}


x86 assembly (clang, -O0):
<sqlite3OsSleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3e7,%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <sleep@plt>
mov    -0x4(%rbp),%eax
add    $0x3e7,%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
imul   $0x3e8,%eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqlite3OsSleep>:
push   %rbx
add    $0x3e7,%edi
movslq %edi,%rax
imul   $0x10624dd3,%rax,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
sar    $0x26,%rbx
add    %eax,%ebx
mov    %ebx,%edi
call   1030 <sleep@plt>
imul   $0x3e8,%ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @sqlite3OsSleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 999
%5 = sdiv i32 %4, 1000
%6 = call i32 @sleep(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 999
%9 = sdiv i32 %8, 1000
%10 = mul nsw i32 1000, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @sqlite3OsSleep(i32 %0) {
%2 = add nsw i32 %0, 999
%3 = sdiv i32 %2, 1000
%4 = tail call i32 @sleep(i32 %3)
%5 = mul nsw i32 %3, 1000
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ configurePropPatch();
void refreshPropPatch(void) { configurePropPatch(); }


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

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

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

LLVM IR (-O2):
define void @refreshPropPatch() {
%1 = tail call i32 (...) @configurePropPatch()
ret void
}
/* Type definitions */
typedef int uint_least32_t;
typedef int /*<<< orphan*/ uint_least16_t;

/* Variables and functions */
uint_least16_t endian_32hi16(uint_least32_t dword) {
  return (uint_least16_t)(dword >> 16);
}


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

x86 assembly (clang, -O2):
<endian_32hi16>:
mov    %edi,%eax
sar    $0x10,%eax
ret

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

LLVM IR (-O2):
define i32 @endian_32hi16(i32 %0) {
%2 = ashr i32 %0, 16
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
double rate(long long, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, long long *);
void backup_query() {
  long long t;
  scanf("%lld", &t);
  printf("%d\n", (int)(rate(t, 0) * 0.9 + rate(t + 1, 0) * 0.1));
}


x86 assembly (clang, -O0):
<backup_query>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <rate@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
xor    %esi,%esi
call   1030 <rate@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  0xe91(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe7d(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xe7f(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<backup_query>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <rate@plt>
movsd  %xmm0,0x10(%rsp)
mov    0x8(%rsp),%rdi
add    $0x1,%rdi
xor    %esi,%esi
call   1030 <rate@plt>
mulsd  0xe91(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  0xe8b(%rip),%xmm1
addsd  %xmm0,%xmm1
cvttsd2si %xmm1,%esi
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define void @backup_query() {
%1 = alloca i64
%2 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%3 = load i64, i64* %1
%4 = call double @rate(i64 %3, i32 0)
%5 = load i64, i64* %1
%6 = add nsw i64 %5, 1
%7 = call double @rate(i64 %6, i32 0)
%8 = fmul double %7, 1.000000e-01
%9 = call double @llvm.fmuladd.f64(double %4, double 9.000000e-01, double %8)
%10 = fptosi double %9 to i32
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define void @backup_query() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = call double @rate(i64 %4, i32 0)
%6 = load i64, i64* %1
%7 = add nsw i64 %6, 1
%8 = call double @rate(i64 %7, i32 0)
%9 = fmul double %8, 1.000000e-01
%10 = call double @llvm.fmuladd.f64(double %5, double 9.000000e-01, double %9)
%11 = fptosi double %10 to i32
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aMethod();
int main(void) {
  aMethod();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @aMethod()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @aMethod()
ret i32 0
}
/* Variables and functions */
unsigned int ring_data_avail(unsigned int, unsigned int, unsigned int);
unsigned ring_space_avail(unsigned size, unsigned head, unsigned tail) {
  return size - ring_data_avail(size, head, tail) - 1;
}


x86 assembly (clang, -O0):
<ring_space_avail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <ring_data_avail@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
sub    %ecx,%eax
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ring_space_avail>:
push   %rbx
mov    %edi,%ebx
call   1030 <ring_data_avail@plt>
not    %eax
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ring_space_avail(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
%7 = load i32, i32* %4
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @ring_data_avail(i32 %8, i32 %9, i32 %10)
%12 = sub i32 %7, %11
%13 = sub i32 %12, 1
ret i32 %13
}

LLVM IR (-O2):
define i32 @ring_space_avail(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @ring_data_avail(i32 %0, i32 %1, i32 %2)
%5 = xor i32 %4, -1
%6 = add i32 %5, %0
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
scalar_t__ malloc(int);
pthread_mutex_t *doMalloc() {
  return (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
}


x86 assembly (clang, -O0):
<doMalloc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
call   1030 <malloc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<doMalloc>:
mov    $0x4,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @doMalloc() {
%1 = call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
define i32* @doMalloc() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(char const, int /*<<< orphan*/ *);
void WriteEscaped(FILE *F, const char *Name) {
  while (*Name) {
    if (*Name == ' ') {
      fputc('\\', F);
    }
    fputc(*Name, F);
    ++Name;
  }
}


x86 assembly (clang, -O0):
<WriteEscaped>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     116e <WriteEscaped+0x5e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    114b <WriteEscaped+0x3b>
mov    -0x8(%rbp),%rsi
mov    $0x5c,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x8(%rbp),%rsi
movsbl %al,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <WriteEscaped+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteEscaped>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
jmp    113f <WriteEscaped+0x2f>
nopl   0x0(%rax)
mov    $0x5c,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
movzbl (%rbx),%eax
movsbl %al,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
add    $0x1,%rbx
movzbl (%rbx),%eax
cmp    $0x20,%al
je     1120 <WriteEscaped+0x10>
test   %al,%al
jne    1130 <WriteEscaped+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @WriteEscaped(i32* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %1, %2 ], [ %12, %9 ]
%5 = load i8, i8* %4
switch i8 %5, label %9 [
i8 0, label %13
i8 32, label %6
]
6: ; preds = %3
%7 = tail call i32 @fputc(i8 signext 92, i32* %0)
%8 = load i8, i8* %4
br label %9
9: ; preds = %3, %6
%10 = phi i8 [ %5, %3 ], [ %8, %6 ]
%11 = tail call i32 @fputc(i8 signext %10, i32* %0)
%12 = getelementptr inbounds i8, i8* %4, i64 1
br label %3
13: ; preds = %3
ret void
}
/* Variables and functions */
long double logl(scalar_t__);
scalar_t__ sqrtl(long double);
long double acoshl(long double x) { return logl(x + sqrtl(x * x - 1.L)); }


x86 assembly (clang, -O0):
<acoshl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fld    %st(0)
fstpt  -0x30(%rbp)
fmul   %st,%st(0)
fld1
fchs
faddp  %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <sqrtl@plt>
fldt   -0x30(%rbp)
mov    %rax,-0x20(%rbp)
fildll -0x20(%rbp)
faddp  %st,%st(1)
fnstcw -0x22(%rbp)
movzwl -0x22(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x24(%rbp)
fldcw  -0x24(%rbp)
fistpll -0x18(%rbp)
fldcw  -0x22(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <logl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acoshl>:
sub    $0x38,%rsp
fldt   0x40(%rsp)
fld    %st(0)
fstpt  0x2c(%rsp)
fmul   %st,%st(0)
fld1
fchs
faddp  %st,%st(1)
fstpt  (%rsp)
call   1040 <sqrtl@plt>
mov    %rax,0x18(%rsp)
fildll 0x18(%rsp)
fldt   0x2c(%rsp)
faddp  %st,%st(1)
fnstcw 0x14(%rsp)
movzwl 0x14(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x16(%rsp)
fldcw  0x16(%rsp)
fistpll 0x20(%rsp)
fldcw  0x14(%rsp)
mov    0x20(%rsp),%rdi
add    $0x38,%rsp
jmp    1030 <logl@plt>

LLVM IR (-O0):
define x86_fp80 @acoshl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = load x86_fp80, x86_fp80* %2
%5 = load x86_fp80, x86_fp80* %2
%6 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %4, x86_fp80 %5, x86_fp80 0xKBFFF8000000000000000)
%7 = call i64 @sqrtl(x86_fp80 %6)
%8 = sitofp i64 %7 to x86_fp80
%9 = fadd x86_fp80 %3, %8
%10 = fptosi x86_fp80 %9 to i64
%11 = call x86_fp80 @logl(i64 %10)
ret x86_fp80 %11
}

LLVM IR (-O2):
define x86_fp80 @acoshl(x86_fp80 %0) {
%2 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %0, x86_fp80 %0, x86_fp80 0xKBFFF8000000000000000)
%3 = tail call i64 @sqrtl(x86_fp80 %2)
%4 = sitofp i64 %3 to x86_fp80
%5 = fadd x86_fp80 %4, %0
%6 = fptosi x86_fp80 %5 to i64
%7 = tail call x86_fp80 @logl(i64 %6)
ret x86_fp80 %7
}
/* Variables and functions */
int /*<<< orphan*/ ccvt_420i(int, int, unsigned char *, unsigned char *, int);
void ccvt_420i_rgb32(int width, int height, void *src, void *dst) {
  ccvt_420i(width, height, (unsigned char *)src, (unsigned char *)dst, 3);
}


x86 assembly (clang, -O0):
<ccvt_420i_rgb32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x3,%r8d
call   1030 <ccvt_420i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccvt_420i_rgb32>:
mov    $0x3,%r8d
jmp    1030 <ccvt_420i@plt>

LLVM IR (-O0):
define void @ccvt_420i_rgb32(i32 %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @ccvt_420i(i32 %9, i32 %10, i8* %11, i8* %12, i32 3)
ret void
}

LLVM IR (-O2):
define void @ccvt_420i_rgb32(i32 %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i32 @ccvt_420i(i32 %0, i32 %1, i8* %2, i8* %3, i32 3)
ret void
}
void gtk_hruler_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_hruler_new() {
ret void
}
int mpk_uninstall(const char *name) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mpk_uninstall(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ KeyWasDown(unsigned short);
unsigned short KeyboardGetChar(void) {
  unsigned int i;
  for (i = 0; i < 6; i++) {
    unsigned short key = 0;
    if (key == 0)
      return 0;
    if (KeyWasDown(key))
      continue;
    if (key >= 104)
      continue;
    return key;
  }
  return 0;
}


x86 assembly (clang, -O0):
<KeyboardGetChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
jae    118c <KeyboardGetChar+0x7c>
movw   $0x0,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
cmp    $0x0,%eax
jne    1147 <KeyboardGetChar+0x37>
movw   $0x0,-0x2(%rbp)
jmp    1192 <KeyboardGetChar+0x82>
movzwl -0xa(%rbp),%edi
call   1030 <KeyWasDown@plt>
cmp    $0x0,%rax
je     115f <KeyboardGetChar+0x4f>
jmp    117e <KeyboardGetChar+0x6e>
movzwl -0xa(%rbp),%eax
cmp    $0x68,%eax
jl     1171 <KeyboardGetChar+0x61>
jmp    117e <KeyboardGetChar+0x6e>
mov    -0xa(%rbp),%ax
mov    %ax,-0x2(%rbp)
jmp    1192 <KeyboardGetChar+0x82>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <KeyboardGetChar+0xf>
movw   $0x0,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @KeyboardGetChar() {
%1 = alloca i16
%2 = alloca i32
%3 = alloca i16
store i32 0, i32* %2
br label %4
4: ; preds = %24, %0
%5 = load i32, i32* %2
%6 = icmp ult i32 %5, 6
br i1 %6, label %7, label %27
7: ; preds = %4
store i16 0, i16* %3
%8 = load i16, i16* %3
%9 = zext i16 %8 to i32
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
store i16 0, i16* %1
br label %28
12: ; preds = %7
%13 = load i16, i16* %3
%14 = call i64 @KeyWasDown(i16 zeroext %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %12
br label %24
17: ; preds = %12
%18 = load i16, i16* %3
%19 = zext i16 %18 to i32
%20 = icmp sge i32 %19, 104
br i1 %20, label %21, label %22
21: ; preds = %17
br label %24
22: ; preds = %17
%23 = load i16, i16* %3
store i16 %23, i16* %1
br label %28
24: ; preds = %21, %16
%25 = load i32, i32* %2
%26 = add i32 %25, 1
store i32 %26, i32* %2
br label %4
27: ; preds = %4
store i16 0, i16* %1
br label %28
28: ; preds = %27, %22, %11
%29 = load i16, i16* %1
ret i16 %29
}

LLVM IR (-O2):
define zeroext i16 @KeyboardGetChar() {
ret i16 0
}
/* Variables and functions */
int /*<<< orphan*/ gen_args(char *, int);
int gen_actual_args_new(char *dirname) {
  gen_args(dirname, 4);
  return (0);
}


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

x86 assembly (clang, -O2):
<gen_actual_args_new>:
push   %rax
mov    $0x4,%esi
call   1030 <gen_args@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @gen_actual_args_new(i8* %0) {
%2 = tail call i32 @gen_args(i8* %0, i32 4)
ret i32 0
}
int end_of_string(char c) { return '\0' == c ? 1 : 0; }


x86 assembly (clang, -O0):
<end_of_string>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %edx,%eax
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_of_string>:
xor    %eax,%eax
test   %dil,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @end_of_string(i8 signext %0) {
%2 = icmp eq i8 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
int mik_isascii(int c) { return ((c & ~0x7f) == 0); }


x86 assembly (clang, -O0):
<mik_isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffff80,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @mik_isascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -128
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

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

/* Variables and functions */
int /*<<< orphan*/ EPERM;
int /*<<< orphan*/ errno;
int setuid(uid_t uid) {
  if (uid == 1)
    return 0;
  errno = EPERM;
  return -1;
}


x86 assembly (clang, -O0):
<setuid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    111d <setuid+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1136 <setuid+0x36>
mov    0x2eac(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb3(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setuid>:
xor    %eax,%eax
cmp    $0x1,%edi
je     111e <setuid+0x1e>
mov    0x2ec2(%rip),%rax
mov    (%rax),%eax
mov    0x2ec9(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
@EPERM = global i32 0
@errno = global i32 0
define i32 @setuid(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = load i32, i32* @EPERM
store i32 %4, i32* @errno
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ -1, %3 ], [ 0, %1 ]
ret i32 %6
}
int my_search(char *str, char src) {
  unsigned int i;
  i = 0;
  while (str[i]) {
    if (str[i] == src)
      return (i);
    i = i + 1;
  }
  return (-1);
}


x86 assembly (clang, -O0):
<my_search>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
cmpb   $0x0,(%rax,%rcx,1)
je     1156 <my_search+0x56>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    1148 <my_search+0x48>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115d <my_search+0x5d>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <my_search+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_search>:
mov    (%rdi),%dl
mov    $0xffffffff,%eax
test   %dl,%dl
je     1120 <my_search+0x20>
xor    %ecx,%ecx
nopl   (%rax)
cmp    %sil,%dl
je     1121 <my_search+0x21>
add    $0x1,%ecx
movzbl (%rdi,%rcx,1),%edx
test   %dl,%dl
jne    1110 <my_search+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @my_search(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %9
%6 = phi i8 [ %13, %9 ], [ %3, %2 ]
%7 = phi i32 [ %10, %9 ], [ 0, %2 ]
%8 = icmp eq i8 %6, %1
br i1 %8, label %15, label %9
9: ; preds = %5
%10 = add i32 %7, 1
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %9, %2
%16 = phi i32 [ -1, %2 ], [ -1, %9 ], [ %7, %5 ]
ret i32 %16
}
void _M2_CharClass_finish(__attribute__((unused)) int argc,
                          __attribute__((unused)) char *argv[]) {}


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

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

LLVM IR (-O0):
define void @_M2_CharClass_finish(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 @_M2_CharClass_finish(i32 %0, i8** nocapture %1) {
ret void
}
int main() {
  int status;
  return ((__extension__({
            union {
              __typeof(status) __in;
              int __i;
            } __u;
            __u.__in = status;
            __u.__i;
          })) &
          0xff00) >>
         8;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %union.anon
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %2
%6 = bitcast %union.anon* %3 to i32*
store i32 %5, i32* %6
%7 = bitcast %union.anon* %3 to i32*
%8 = load i32, i32* %7
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = and i32 %9, 65280
%11 = ashr i32 %10, 8
ret i32 %11
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
double E(double cosg) { return 1; }


x86 assembly (clang, -O0):
<E>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @E(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @E(double %0) {
ret double 1.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ showFiles();
int main(int argc, char *argv[], char *envp[]) {
  showFiles();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 (...) @showFiles()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ processInput();
void loop() { processInput(); }


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

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

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

LLVM IR (-O2):
define void @loop() {
%1 = tail call i32 (...) @processInput()
ret void
}
void gtk_calendar_select_month() {}


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

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

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

LLVM IR (-O2):
define void @gtk_calendar_select_month() {
ret void
}
const char *openr2_get_revision() { return "(release)"; }


x86 assembly (clang, -O0):
<openr2_get_revision>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"(release)\00"
define i8* @openr2_get_revision() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [10 x i8] c"(release)\00"
define i8* @openr2_get_revision() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
int test_imm_AAint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xAA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_AAint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0xaa,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_AAint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 170
%7 = icmp ne i64 %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_AAint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 730144440320
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int S_ISDIR(int /*<<< orphan*/);
int C_S_ISDIR(mode_t mode) { return S_ISDIR(mode); }


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

x86 assembly (clang, -O2):
<C_S_ISDIR>:
jmp    1030 <S_ISDIR@plt>

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

LLVM IR (-O2):
define i32 @C_S_ISDIR(i32 %0) {
%2 = tail call i32 @S_ISDIR(i32 %0)
ret i32 %2
}
int dontgenerate3(void) { return 3; }


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

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

LLVM IR (-O0):
define i32 @dontgenerate3() {
ret i32 3
}

LLVM IR (-O2):
define i32 @dontgenerate3() {
ret i32 3
}
void g_uri_list_extract_uris() {}


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

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

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

LLVM IR (-O2):
define void @g_uri_list_extract_uris() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
f2(float x, float y) {
  if (x != 1 || y != 1)
    abort();
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xed1(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    115f <f2+0x4f>
jp     115f <f2+0x4f>
movss  -0xc(%rbp),%xmm0
movss  0xeb5(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    115f <f2+0x4f>
jp     115f <f2+0x4f>
jmp    1166 <f2+0x56>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %rax
ucomiss 0xee8(%rip),%xmm0
jne    1129 <f2+0x19>
jp     1129 <f2+0x19>
ucomiss 0xedd(%rip),%xmm1
jne    1129 <f2+0x19>
jp     1129 <f2+0x19>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @f2(float %0, float %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = fcmp une float %6, 1.000000e+00
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load float, float* %5
%10 = fcmp une float %9, 1.000000e+00
br i1 %10, label %11, label %13
11: ; preds = %8, %2
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %8
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @f2(float %0, float %1) {
%3 = fcmp une float %0, 1.000000e+00
%4 = fcmp une float %1, 1.000000e+00
%5 = or i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %2
ret i32 undef
}
/* Variables and functions */
scalar_t__ isany_deferred();
int /*<<< orphan*/ pop_deferred();
void imap_undefer(void) {
  if (isany_deferred())
    pop_deferred();
}


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

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

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

LLVM IR (-O2):
define void @imap_undefer() {
%1 = tail call i64 (...) @isany_deferred()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @pop_deferred()
br label %5
5: ; preds = %3, %0
ret void
}
/* Type definitions */
struct vec2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec2_snap(float *, float *, float *);
__attribute__((always_)) struct vec2 *
psvec2_snap(struct vec2 *result, struct vec2 *a, struct vec2 *b) {
  vec2_snap((float *)result, (float *)a, (float *)b);
  return result;
}


x86 assembly (clang, -O0):
<psvec2_snap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <vec2_snap@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec2_snap>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec2_snap@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_snap(%struct.vec2* %0, %struct.vec2* %1, %struct.vec2* %2) {
%4 = alloca %struct.vec2*
%5 = alloca %struct.vec2*
%6 = alloca %struct.vec2*
store %struct.vec2* %0, %struct.vec2** %4
store %struct.vec2* %1, %struct.vec2** %5
store %struct.vec2* %2, %struct.vec2** %6
%7 = load %struct.vec2*, %struct.vec2** %4
%8 = bitcast %struct.vec2* %7 to float*
%9 = load %struct.vec2*, %struct.vec2** %5
%10 = bitcast %struct.vec2* %9 to float*
%11 = load %struct.vec2*, %struct.vec2** %6
%12 = bitcast %struct.vec2* %11 to float*
%13 = call i32 @vec2_snap(float* %8, float* %10, float* %12)
%14 = load %struct.vec2*, %struct.vec2** %4
ret %struct.vec2* %14
}

LLVM IR (-O2):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_snap(%struct.vec2* returned %0, %struct.vec2* %1, %struct.vec2* %2) {
%4 = bitcast %struct.vec2* %0 to float*
%5 = bitcast %struct.vec2* %1 to float*
%6 = bitcast %struct.vec2* %2 to float*
%7 = tail call i32 @vec2_snap(float* %4, float* %5, float* %6)
ret %struct.vec2* %0
}