xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, char *);
int /*<<< orphan*/ stderr;
__attribute__((noreturn)) void _ba_error(int line, char *file, char *msg) {
  fprintf(stderr, "%s:%d\t%s\n", file, line, msg);
  _exit(1);
}


x86 assembly (clang, -O0):
<_ba_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x4(%rbp),%ecx
mov    -0x18(%rbp),%r8
lea    0xeb2(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<_ba_error>:
push   %rax
mov    %rdx,%r8
mov    %rsi,%rdx
mov    %edi,%ecx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [10 x i8] c"%s:%d\09%s\0A\00"
define void @_ba_error(i32 %0, i8* %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %0, i8* %2)
%6 = tail call i32 @_exit(i32 1)
unreachable
}
long test_long_5(long a, long b, long c, long d, long e) {
  return a * b * c * d * e;
}


x86 assembly (clang, -O0):
<test_long_5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
imul   -0x18(%rbp),%rax
imul   -0x20(%rbp),%rax
imul   -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_long_5>:
mov    %rdx,%rax
imul   %rsi,%rdi
imul   %rcx,%rax
imul   %rdi,%rax
imul   %r8,%rax
ret

LLVM IR (-O0):
define i64 @test_long_5(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = mul nsw i64 %11, %12
%14 = load i64, i64* %8
%15 = mul nsw i64 %13, %14
%16 = load i64, i64* %9
%17 = mul nsw i64 %15, %16
%18 = load i64, i64* %10
%19 = mul nsw i64 %17, %18
ret i64 %19
}

LLVM IR (-O2):
define i64 @test_long_5(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = mul nsw i64 %1, %0
%7 = mul nsw i64 %6, %2
%8 = mul nsw i64 %7, %3
%9 = mul nsw i64 %8, %4
ret i64 %9
}
int test_imm_71int16_mem(short *val) {
  return ((*val) & (-0x71 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_71int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -113
%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_71int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -113
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int find_first_of(int *, int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ system(char *);
int main() {
  int A[16] = {1, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6};
  printf("Found index = %d\n", find_first_of(A, 16, 6));
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xea6(%rip),%rsi
mov    $0x40,%edx
call   1060 <memcpy@plt>
lea    -0x50(%rbp),%rdi
mov    $0x10,%esi
mov    $0x6,%edx
call   1030 <find_first_of@plt>
mov    %eax,%esi
lea    0xec0(%rip),%rdi
call   1050 <printf@plt>
lea    0xec6(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x10,%esi
mov    $0x6,%edx
call   1030 <find_first_of@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
lea    0xec8(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.A = [16 x i32] [i32 1, i32 2, i32 3, i32 3, i32 4, i32 4, i32 4, i32 5, i32 5, i32 5, i32 5, i32 6, i32 6, i32 6, i32 6, i32 6]
@.str = [18 x i8] c"Found index = %d\0A\00"
@.str.1 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i32]
store i32 0, i32* %1
%3 = bitcast [16 x i32]* %2 to i8*
%4 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%5 = call i32 @find_first_of(i32* %4, i32 16, i32 6)
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.A = [16 x i32] [i32 1, i32 2, i32 3, i32 3, i32 4, i32 4, i32 4, i32 5, i32 5, i32 5, i32 5, i32 6, i32 6, i32 6, i32 6, i32 6]
@.str = [18 x i8] c"Found index = %d\0A\00"
@.str.1 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca [16 x i32]
%2 = bitcast [16 x i32]* %1 to i8*
%3 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%4 = call i32 @find_first_of(i32* %3, i32 16, i32 6)
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ test();
int /*<<< orphan*/ test_iteration(int);
int /*<<< orphan*/ test_resize(int);
int main() {
  puts("---- xhash test started ----");
  test();
  test_iteration(30);
  test_resize(300);
  puts("---- xhash test successfully finished ----");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1060 <test@plt>
mov    $0x1e,%edi
call   1040 <test_iteration@plt>
mov    $0x12c,%edi
call   1050 <test_resize@plt>
lea    0xea0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <test@plt>
mov    $0x1e,%edi
call   1040 <test_iteration@plt>
mov    $0x12c,%edi
call   1050 <test_resize@plt>
lea    0xeae(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"---- xhash test started ----\00"
@.str.1 = [43 x i8] c"---- xhash test successfully finished ----\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @test()
%4 = call i32 @test_iteration(i32 30)
%5 = call i32 @test_resize(i32 300)
%6 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"---- xhash test started ----\00"
@.str.1 = [43 x i8] c"---- xhash test successfully finished ----\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @test()
%3 = tail call i32 @test_iteration(i32 30)
%4 = tail call i32 @test_resize(i32 300)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
long g2(long a) { return a != 511; }


x86 assembly (clang, -O0):
<g2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x1ff,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2>:
xor    %eax,%eax
cmp    $0x1ff,%rdi
setne  %al
ret

LLVM IR (-O0):
define i64 @g2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 511
%5 = zext i1 %4 to i32
%6 = sext i32 %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @g2(i64 %0) {
%2 = icmp ne i64 %0, 511
%3 = zext i1 %2 to i64
ret i64 %3
}
/* Variables and functions */
int ARRAY_SIZE(int *);
int get_hbm_index(int idx) {
  int i = 0;
  int idx_list[] = {40000};
  while (i < ARRAY_SIZE(idx_list)) {
    if (idx < idx_list[i])
      break;
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<get_hbm_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <ARRAY_SIZE@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    116b <get_hbm_index+0x5b>
mov    -0x4(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0xc(%rbp,%rcx,4),%eax
jge    115d <get_hbm_index+0x4d>
jmp    116b <get_hbm_index+0x5b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112b <get_hbm_index+0x1b>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_hbm_index>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movl   $0x9c40,0xc(%rsp)
mov    $0xffffffff,%ebp
lea    0xc(%rsp),%r14
nopl   0x0(%rax)
add    $0x1,%ebp
mov    %r14,%rdi
call   1030 <ARRAY_SIZE@plt>
cmp    %eax,%ebp
jge    1145 <get_hbm_index+0x35>
cmp    %ebx,0xc(%rsp)
jle    1130 <get_hbm_index+0x20>
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @get_hbm_index(i32 %0) {
%2 = alloca [1 x i32]
%3 = bitcast [1 x i32]* %2 to i8*
%4 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
store i32 40000, i32* %4
br label %5
5: ; preds = %5, %1
%6 = phi i32 [ 0, %1 ], [ %12, %5 ]
%7 = call i32 @ARRAY_SIZE(i32* %4)
%8 = icmp sge i32 %6, %7
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, %0
%11 = select i1 %8, i1 true, i1 %10
%12 = add nuw nsw i32 %6, 1
br i1 %11, label %13, label %5
13: ; preds = %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xb5() {
  Assert_real((isspace(181) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              910, ("isspace should be 0 for 0xb5"));
}


x86 assembly (clang, -O0):
<t_isspace_0xb5>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb5,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x38e,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isspace_0xb5>:
push   %rax
mov    $0xb5,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x38e,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xb5\00"
define void @t_isspace_0xb5() {
%1 = call i64 @isspace(i32 181)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 910, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xb5\00"
define void @t_isspace_0xb5() {
%1 = tail call i64 @isspace(i32 181)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 910, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int is_little_endian() {
  int x = 1;
  if (*(char *)&x) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_little_endian>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
cmpb   $0x0,-0x8(%rbp)
je     1121 <is_little_endian+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1128 <is_little_endian+0x28>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @is_little_endian() {
ret i32 1
}
unsigned latin1_upcase(unsigned c) {
  if (c - 'a' <= 'z' - 'a' || (c - 0340 <= 0376 - 0340 && c != 0367))
    return c - 'a' + 'A';
  else
    return c;
}


x86 assembly (clang, -O0):
<latin1_upcase>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
cmp    $0x19,%eax
jbe    1134 <latin1_upcase+0x34>
mov    -0x8(%rbp),%eax
sub    $0xe0,%eax
cmp    $0x1e,%eax
ja     1145 <latin1_upcase+0x45>
cmpl   $0xf7,-0x8(%rbp)
je     1145 <latin1_upcase+0x45>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    114b <latin1_upcase+0x4b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<latin1_upcase>:
mov    %edi,%eax
lea    -0x61(%rax),%ecx
cmp    $0x1a,%ecx
jb     111c <latin1_upcase+0x1c>
cmp    $0xf7,%eax
je     111f <latin1_upcase+0x1f>
lea    -0xe0(%rax),%ecx
cmp    $0x1e,%ecx
ja     111f <latin1_upcase+0x1f>
add    $0xffffffe0,%eax
ret

LLVM IR (-O0):
define i32 @latin1_upcase(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = sub i32 %4, 97
%6 = icmp ule i32 %5, 25
br i1 %6, label %14, label %7
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub i32 %8, 224
%10 = icmp ule i32 %9, 30
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp ne i32 %12, 247
br i1 %13, label %14, label %18
14: ; preds = %11, %1
%15 = load i32, i32* %3
%16 = sub i32 %15, 97
%17 = add i32 %16, 65
store i32 %17, i32* %2
br label %20
18: ; preds = %11, %7
%19 = load i32, i32* %3
store i32 %19, i32* %2
br label %20
20: ; preds = %18, %14
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @latin1_upcase(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = add i32 %0, -224
%6 = icmp ult i32 %5, 31
%7 = icmp ne i32 %0, 247
%8 = and i1 %7, %6
br i1 %8, label %9, label %11
9: ; preds = %4, %1
%10 = add nsw i32 %0, -32
br label %11
11: ; preds = %4, %9
%12 = phi i32 [ %10, %9 ], [ %0, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void nrerror(char *message) {
  fprintf(stderr, "\n%s\n", message);
  exit(-1);
}


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

x86 assembly (clang, -O2):
<nrerror>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [5 x i8] c"\0A%s\0A\00"
define void @nrerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ bar();
int main() {
  if (bar() != 0)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <bar@plt>
cmp    $0x0,%rax
je     1147 <main+0x27>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <bar@plt>
test   %rax,%rax
jne    1131 <main+0x11>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @bar()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @bar()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
void show_3() { printf("%s\n", __func__); }


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

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

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

LLVM IR (-O2):
@__func__.show_3 = [7 x i8] c"show_3\00"
define void @show_3() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @__func__.show_3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void preOrder(int *a, int i, int n) {
  if (i < n) {
    preOrder(a, 2 * i, n);
    preOrder(a, 2 * i + 1, n);
    printf("%d, ", a[i]);
  }
}


x86 assembly (clang, -O0):
<preOrder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    117c <preOrder+0x5c>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <preOrder@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x1,%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <preOrder@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<preOrder>:
cmp    %edx,%esi
jge    115e <preOrder+0x3e>
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %esi,%ebx
mov    %rdi,%r14
lea    (%rbx,%rbx,1),%esi
call   1040 <preOrder@plt>
lea    (%rbx,%rbx,1),%esi
add    $0x1,%esi
mov    %r14,%rdi
mov    %ebp,%edx
call   1040 <preOrder@plt>
movslq %ebx,%rax
mov    (%r14,%rax,4),%esi
lea    0xeab(%rip),%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d, \00"
define void @preOrder(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* %5
%8 = load i32, i32* %6
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %26
10: ; preds = %3
%11 = load i32*, i32** %4
%12 = load i32, i32* %5
%13 = mul nsw i32 2, %12
%14 = load i32, i32* %6
%15 = load i32*, i32** %4
%16 = load i32, i32* %5
%17 = mul nsw i32 2, %16
%18 = add nsw i32 %17, 1
%19 = load i32, i32* %6
%20 = load i32*, i32** %4
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %20, i64 %22
%24 = load i32, i32* %23
%25 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %24)
br label %26
26: ; preds = %10, %3
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d, \00"
define void @preOrder(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = shl nsw i32 %1, 1
tail call void @preOrder(i32* %0, i32 %7, i32 %2)
%8 = or i32 %7, 1
tail call void @preOrder(i32* %0, i32 %8, i32 %2)
%9 = sext i32 %1 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %5
}
int omap_set_mmc_dev(const char *mmcdev) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @omap_set_mmc_dev(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ coin;

/* Variables and functions */
int coin_change_problem(int *, int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int coin[] = {2, 5, 3, 6};
  int n = 10, m = sizeof(coin) / sizeof(coin[0]);
  printf("%d\n", coin_change_problem(coin, m, n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0xa,-0x24(%rbp)
movl   $0x4,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%esi
mov    -0x24(%rbp),%edx
call   1040 <coin_change_problem@plt>
mov    %eax,%esi
lea    0xea5(%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    $0xa,%edx
call   1040 <coin_change_problem@plt>
lea    0xec8(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@__const.main.coin = [4 x i32] [i32 2, i32 5, i32 3, i32 6]
@.str = [4 x i8] c"%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 @coin_change_problem(i32* %3, i32 4, i32 10)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ factorial(int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(void) {
  printf("%ld ", factorial(5));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <factorial@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld \00"
define i32 @main() {
%1 = tail call i32 @factorial(i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ int64_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ __checkint_uint64_add_signed_unsigned(int /*<<< orphan*/,
                                                         int /*<<< orphan*/,
                                                         int /*<<< orphan*/ *);
__attribute__((always_)) uint64_t
__checkint_uint64_add_unsigned_signed(uint64_t x, int64_t y, int32_t *err) {
  return __checkint_uint64_add_signed_unsigned(y, x, err);
}


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

x86 assembly (clang, -O2):
<__checkint_uint64_add_unsigned_signed>:
mov    %edi,%eax
mov    %esi,%edi
mov    %eax,%esi
jmp    1030 <__checkint_uint64_add_signed_unsigned@plt>

LLVM IR (-O0):
define i32 @__checkint_uint64_add_unsigned_signed(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* %5
%8 = load i32, i32* %4
%9 = load i32*, i32** %6
%10 = call i32 @__checkint_uint64_add_signed_unsigned(i32 %7, i32 %8, i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @__checkint_uint64_add_unsigned_signed(i32 %0, i32 %1, i32* %2) {
%4 = tail call i32 @__checkint_uint64_add_signed_unsigned(i32 %1, i32 %0, i32* %2)
ret i32 %4
}
int rc_cpt_inval(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @rc_cpt_inval() {
ret i32 0
}
void VP8FiltersInitMSA(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ write_word_data(int, int, int /*<<< orphan*/);
void io_set_bus_pullups(uint16_t value) { write_word_data(0x20, 0x0C, value); }


x86 assembly (clang, -O0):
<io_set_bus_pullups>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x20,%edi
mov    $0xc,%esi
call   1030 <write_word_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_set_bus_pullups>:
mov    %edi,%edx
mov    $0x20,%edi
mov    $0xc,%esi
jmp    1030 <write_word_data@plt>

LLVM IR (-O0):
define void @io_set_bus_pullups(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @write_word_data(i32 32, i32 12, i32 %3)
ret void
}

LLVM IR (-O2):
define void @io_set_bus_pullups(i32 %0) {
%2 = tail call i32 @write_word_data(i32 32, i32 12, i32 %0)
ret void
}
void RTSocketSgWriteLNB(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSocketSgWriteLNB() {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ ex_arr4s16();
int /*<<< orphan*/ ex_bitfield();
int /*<<< orphan*/ ex_cstr();
int /*<<< orphan*/ ex_packed_struct();
int /*<<< orphan*/ ex_struct();
int /*<<< orphan*/ ex_union4B();
int main(int argc, char *argv[]) {
  ex_struct();
  ex_packed_struct();
  ex_cstr();
  ex_bitfield();
  ex_arr4s16();
  ex_union4B();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <ex_struct@plt>
mov    $0x0,%al
call   1060 <ex_packed_struct@plt>
mov    $0x0,%al
call   1050 <ex_cstr@plt>
mov    $0x0,%al
call   1040 <ex_bitfield@plt>
mov    $0x0,%al
call   1080 <ex_arr4s16@plt>
mov    $0x0,%al
call   1070 <ex_union4B@plt>
mov    0x2e39(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <ex_struct@plt>
xor    %eax,%eax
call   1060 <ex_packed_struct@plt>
xor    %eax,%eax
call   1050 <ex_cstr@plt>
xor    %eax,%eax
call   1040 <ex_bitfield@plt>
xor    %eax,%eax
call   1080 <ex_arr4s16@plt>
xor    %eax,%eax
call   1070 <ex_union4B@plt>
mov    0x2e4e(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @ex_struct()
%7 = call i32 (...) @ex_packed_struct()
%8 = call i32 (...) @ex_cstr()
%9 = call i32 (...) @ex_bitfield()
%10 = call i32 (...) @ex_arr4s16()
%11 = call i32 (...) @ex_union4B()
%12 = load i32, i32* @EXIT_SUCCESS
ret i32 %12
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @ex_struct()
%4 = tail call i32 (...) @ex_packed_struct()
%5 = tail call i32 (...) @ex_cstr()
%6 = tail call i32 (...) @ex_bitfield()
%7 = tail call i32 (...) @ex_arr4s16()
%8 = tail call i32 (...) @ex_union4B()
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}
int hash(char *p) {
  int ii = 0;
  char *pp = p;
  while (*pp)
    ii = ii << 1 ^ *pp++;
  if (ii < 0)
    ii = -ii;
  return ii % 23;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <hash+0x46>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
xor    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1117 <hash+0x17>
cmpl   $0x0,-0xc(%rbp)
jge    1158 <hash+0x58>
xor    %eax,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x17,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1124 <hash+0x24>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
add    %eax,%eax
movsbl %cl,%ecx
xor    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
jmp    1126 <hash+0x26>
xor    %eax,%eax
mov    %eax,%ecx
neg    %ecx
cmovs  %eax,%ecx
mov    $0xb21642c9,%eax
imul   %rcx,%rax
shr    $0x24,%rax
lea    (%rax,%rax,2),%edx
shl    $0x3,%edx
sub    %edx,%eax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = shl i32 %7, 1
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = sext i8 %5 to i32
%11 = xor i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
%16 = tail call i32 @llvm.abs.i32(i32 %15, i1 true)
%17 = urem i32 %16, 23
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_ContentDirectory_GetSortCapabilities(void *,
                                                                     char *);
int /*<<< orphan*/ printf(char *);
void UPnPContentDirectory_GetSortCapabilities(void *upnptoken) {
  printf("Invoke: UPnPContentDirectory_GetSortCapabilities();\r\n");
  UPnPResponse_ContentDirectory_GetSortCapabilities(upnptoken, "Sample String");
}


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

x86 assembly (clang, -O2):
<UPnPContentDirectory_GetSortCapabilities>:
push   %rbx
mov    %rdi,%rbx
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <UPnPResponse_ContentDirectory_GetSortCapabilities@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"Invoke: UPnPContentDirectory_GetSortCapabilities();\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UPnPContentDirectory_GetSortCapabilities(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @UPnPResponse_ContentDirectory_GetSortCapabilities(i8* %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"Sample String\00"
@str = [53 x i8] c"Invoke: UPnPContentDirectory_GetSortCapabilities();\0D\00"
define void @UPnPContentDirectory_GetSortCapabilities(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @UPnPResponse_ContentDirectory_GetSortCapabilities(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void ConvertToARGB() {}


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

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

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

LLVM IR (-O2):
define void @ConvertToARGB() {
ret void
}
void healthbar_display_graphics() {}


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

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

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

LLVM IR (-O2):
define void @healthbar_display_graphics() {
ret void
}
/* Variables and functions */
int strlen(char *);
char toupper(unsigned char);
char *util_toupper(char *buffer) {
  int i;
  for (i = 0; i < strlen(buffer); i++) {
    buffer[i] = toupper((unsigned char)buffer[i]);
  }
  return buffer;
}


x86 assembly (clang, -O0):
<util_toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    117b <util_toupper+0x5b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <util_toupper+0x13>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_toupper>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
test   %eax,%eax
jle    1161 <util_toupper+0x41>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%r14,%rbx,1),%edi
call   1030 <toupper@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1140 <util_toupper+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @util_toupper(i8* returned %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call signext i8 @toupper(i8 zeroext %7)
store i8 %8, i8* %6
%9 = add nuw nsw i64 %5, 1
%10 = tail call i32 @strlen(i8* %0)
%11 = sext i32 %10 to i64
%12 = icmp slt i64 %9, %11
br i1 %12, label %4, label %13
13: ; preds = %4, %1
ret i8* %0
}
int IsDigit(char c) { return ((c >= '0') && (c <= '9')); }


x86 assembly (clang, -O0):
<IsDigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <IsDigit+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsDigit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

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

LLVM IR (-O2):
define i32 @IsDigit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ isprint(int);
scalar_t__ strchr(char *, int);
int toprint(int c) {
  if (isprint(c))
    return c;
  return strchr("\t\n\r", c) ? c : '.';
}


x86 assembly (clang, -O0):
<toprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <isprint@plt>
cmp    $0x0,%rax
je     1148 <toprint+0x28>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117f <toprint+0x5f>
mov    -0x8(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     116c <toprint+0x4c>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1179 <toprint+0x59>
mov    $0x2e,%eax
mov    %eax,-0xc(%rbp)
jmp    1179 <toprint+0x59>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toprint>:
push   %rbx
mov    %edi,%ebx
call   1040 <isprint@plt>
test   %rax,%rax
jne    1146 <toprint+0x26>
lea    0xecc(%rip),%rdi
mov    %ebx,%esi
call   1030 <strchr@plt>
test   %rax,%rax
mov    $0x2e,%eax
cmove  %eax,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"\09\0A\0D\00"
define i32 @toprint(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @isprint(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32, i32* %3
store i32 %8, i32* %2
br label %18
9: ; preds = %1
%10 = load i32, i32* %3
%11 = call i64 @strchr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = load i32, i32* %3
br label %16
15: ; preds = %9
br label %16
16: ; preds = %15, %13
%17 = phi i32 [ %14, %13 ], [ 46, %15 ]
store i32 %17, i32* %2
br label %18
18: ; preds = %16, %7
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@.str = [4 x i8] c"\09\0A\0D\00"
define i32 @toprint(i32 %0) {
%2 = tail call i64 @isprint(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @strchr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i32 46, i32 %0
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ %0, %1 ]
ret i32 %9
}
long ksp_get_micro_version(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @ksp_get_micro_version() {
ret i64 0
}
void __DELETE_java_nio_charset_Charset_2(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_nio_charset_Charset_2(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
struct utmp {
  int dummy;
};

/* Variables and functions */
int O_APPEND;
int O_WRONLY;
int /*<<< orphan*/ _PATH_WTMP;
int /*<<< orphan*/ close(int);
int open(int /*<<< orphan*/, int);
int /*<<< orphan*/ write(int, struct utmp *, int);
void do_wtmp(struct utmp *utmp) {
  int fd;
  if ((fd = open(_PATH_WTMP, O_WRONLY | O_APPEND)) >= 0) {
    write(fd, utmp, sizeof(struct utmp));
    close(fd);
  }
}


x86 assembly (clang, -O0):
<do_wtmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    0x2e84(%rip),%rax
mov    (%rax),%esi
mov    0x2e73(%rip),%rax
or     (%rax),%esi
call   1050 <open@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jl     1181 <do_wtmp+0x51>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    -0xc(%rbp),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_wtmp>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
mov    0x2e8a(%rip),%rax
mov    0x2e7b(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
call   1050 <open@plt>
test   %eax,%eax
js     1178 <do_wtmp+0x48>
mov    %eax,%ebp
mov    %eax,%edi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <close@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.utmp = type { i32 }
@_PATH_WTMP = global i32 0
@O_WRONLY = global i32 0
@O_APPEND = global i32 0
define void @do_wtmp(%struct.utmp* %0) {
%2 = alloca %struct.utmp*
%3 = alloca i32
store %struct.utmp* %0, %struct.utmp** %2
%4 = load i32, i32* @_PATH_WTMP
%5 = load i32, i32* @O_WRONLY
%6 = load i32, i32* @O_APPEND
%7 = or i32 %5, %6
%8 = call i32 @open(i32 %4, i32 %7)
store i32 %8, i32* %3
%9 = icmp sge i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %1
%11 = load i32, i32* %3
%12 = load %struct.utmp*, %struct.utmp** %2
%13 = call i32 @write(i32 %11, %struct.utmp* %12, i32 4)
%14 = load i32, i32* %3
%15 = call i32 @close(i32 %14)
br label %16
16: ; preds = %10, %1
ret void
}

LLVM IR (-O2):
%struct.utmp = type { i32 }
@_PATH_WTMP = global i32 0
@O_WRONLY = global i32 0
@O_APPEND = global i32 0
define void @do_wtmp(%struct.utmp* nocapture %0) {
%2 = load i32, i32* @_PATH_WTMP
%3 = load i32, i32* @O_WRONLY
%4 = load i32, i32* @O_APPEND
%5 = or i32 %4, %3
%6 = tail call i32 @open(i32 %2, i32 %5)
%7 = icmp sgt i32 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = tail call i32 @write(i32 %6, %struct.utmp* %0, i32 4)
%10 = tail call i32 @close(i32 %6)
br label %11
11: ; preds = %8, %1
ret void
}
int thermal_notify_tz_enable(int tz_id) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @thermal_notify_tz_enable(i32 %0) {
ret i32 0
}