xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void clear_screen() { system("tput clear"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"tput clear\00"
define void @clear_screen() {
%1 = call i32 @system(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"tput clear\00"
define void @clear_screen() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int uspe_match_help() {
  printf("tproxy	- match if packet belongs to a ongoing connection");
  return 0;
}


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

x86 assembly (clang, -O2):
<uspe_match_help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [57 x i8] c"tproxy\09- match if packet belongs to a ongoing connection\00"
define i32 @uspe_match_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [57 x i8] c"tproxy\09- match if packet belongs to a ongoing connection\00"
define i32 @uspe_match_help() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Scl_ConGetInArr(int);
float Scl_Int2Flt(int /*<<< orphan*/);
float Scl_ConGetInArrFloat(int i) { return Scl_Int2Flt(Scl_ConGetInArr(i)); }


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

x86 assembly (clang, -O2):
<Scl_ConGetInArrFloat>:
push   %rax
call   1030 <Scl_ConGetInArr@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <Scl_Int2Flt@plt>

LLVM IR (-O0):
define float @Scl_ConGetInArrFloat(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @Scl_ConGetInArr(i32 %3)
%5 = call float @Scl_Int2Flt(i32 %4)
ret float %5
}

LLVM IR (-O2):
define float @Scl_ConGetInArrFloat(i32 %0) {
%2 = tail call i32 @Scl_ConGetInArr(i32 %0)
%3 = tail call float @Scl_Int2Flt(i32 %2)
ret float %3
}
void Configure_Host(void) { return; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_loadr_pd(double const *);
__m128d test_mm_loadr_pd(double const *A) { return _mm_loadr_pd(A); }


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

x86 assembly (clang, -O2):
<test_mm_loadr_pd>:
jmp    1030 <_mm_loadr_pd@plt>

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

LLVM IR (-O2):
define i32 @test_mm_loadr_pd(double* %0) {
%2 = tail call i32 @_mm_loadr_pd(double* %0)
ret i32 %2
}
void SSMR3GetGCPhys32(void) {}


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

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

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

LLVM IR (-O2):
define void @SSMR3GetGCPhys32() {
ret void
}
/* Type definitions */
struct header_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ BFS(struct header_node *);
int /*<<< orphan*/ DFS(struct header_node *);
int /*<<< orphan*/ create_graph(struct header_node **);
int /*<<< orphan*/ print_graph(struct header_node *);
main() {
  struct header_node *G;
  create_graph(&G);
  print_graph(G);
  DFS(G);
  BFS(G);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1060 <create_graph@plt>
mov    -0x8(%rbp),%rdi
call   1030 <print_graph@plt>
mov    -0x8(%rbp),%rdi
call   1050 <DFS@plt>
mov    -0x8(%rbp),%rdi
call   1040 <BFS@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsp,%rdi
call   1060 <create_graph@plt>
mov    (%rsp),%rdi
call   1030 <print_graph@plt>
mov    (%rsp),%rdi
call   1050 <DFS@plt>
mov    (%rsp),%rdi
call   1040 <BFS@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.header_node = type { i32 }
define i32 @main() {
%1 = alloca %struct.header_node*
%2 = call i32 @create_graph(%struct.header_node** %1)
%3 = load %struct.header_node*, %struct.header_node** %1
%4 = call i32 @print_graph(%struct.header_node* %3)
%5 = load %struct.header_node*, %struct.header_node** %1
%6 = call i32 @DFS(%struct.header_node* %5)
%7 = load %struct.header_node*, %struct.header_node** %1
%8 = call i32 @BFS(%struct.header_node* %7)
ret i32 0
}

LLVM IR (-O2):
%struct.header_node = type { i32 }
define i32 @main() {
%1 = alloca %struct.header_node*
%2 = bitcast %struct.header_node** %1 to i8*
%3 = call i32 @create_graph(%struct.header_node** %1)
%4 = load %struct.header_node*, %struct.header_node** %1
%5 = call i32 @print_graph(%struct.header_node* %4)
%6 = load %struct.header_node*, %struct.header_node** %1
%7 = call i32 @DFS(%struct.header_node* %6)
%8 = load %struct.header_node*, %struct.header_node** %1
%9 = call i32 @BFS(%struct.header_node* %8)
ret i32 0
}
double sign(double d) { return d >= 0 ? 1 : -1; }


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
mov    $0xffffffff,%eax
mov    $0x1,%ecx
ucomisd %xmm1,%xmm0
cmovae %ecx,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setae  %al
lea    0xeec(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @sign(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 -1
%7 = sitofp i32 %6 to double
ret double %7
}

LLVM IR (-O2):
define double @sign(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = select i1 %2, double 1.000000e+00, double -1.000000e+00
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void show_message(char *message, int exitApp, int exitCode) {
  printf("%s\n", message);
  if (exitApp)
    exit(exitCode);
}


x86 assembly (clang, -O0):
<show_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
je     1154 <show_message+0x34>
mov    -0x10(%rbp),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_message>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
mov    %rdi,%rsi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
test   %ebp,%ebp
jne    1141 <show_message+0x21>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %ebx,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @show_message(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = icmp eq i32 %1, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @exit(i32 %2)
unreachable
8: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int a1 = 0x7a69;
  int v0 = 0;
  int v1 = 0xa;
  a1 ^= v0;
repeat:
  v0++;
  if (v0 != v1) {
    a1 ^= v0;
    goto repeat;
  }
  a1 ^= v0;
  printf("0x%x\n", a1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7a69,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0xa,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1160 <main+0x50>
mov    -0xc(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    113d <main+0x2d>
mov    -0xc(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"0x%x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 31337, i32* %2
store i32 0, i32* %3
store i32 10, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = xor i32 %6, %5
store i32 %7, i32* %2
br label %8
8: ; preds = %14, %0
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = icmp ne i32 %11, %12
br i1 %13, label %14, label %18
14: ; preds = %8
%15 = load i32, i32* %3
%16 = load i32, i32* %2
%17 = xor i32 %16, %15
store i32 %17, i32* %2
br label %8
18: ; preds = %8
%19 = load i32, i32* %3
%20 = load i32, i32* %2
%21 = xor i32 %20, %19
store i32 %21, i32* %2
%22 = load i32, i32* %2
%23 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %22)
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
@.str = [6 x i8] c"0x%x\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 31330)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ PR_SET_PDEATHSIG;
int /*<<< orphan*/ SIGKILL;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ prctl(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int child(void *args) {
  prctl(PR_SET_PDEATHSIG, SIGKILL);
  while (1)
    sleep(1);
  exit(0);
}


x86 assembly (clang, -O0):
<child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
call   1030 <prctl@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1143 <child+0x23>

x86 assembly (clang, -O2):
<child>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    0x2ea7(%rip),%rax
mov    (%rax),%esi
call   1030 <prctl@plt>
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1140 <child+0x20>

LLVM IR (-O0):
@PR_SET_PDEATHSIG = global i32 0
@SIGKILL = global i32 0
define i32 @child(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @PR_SET_PDEATHSIG
%4 = load i32, i32* @SIGKILL
%5 = call i32 @prctl(i32 %3, i32 %4)
br label %6
6: ; preds = %1, %6
%7 = call i32 @sleep(i32 1)
br label %6
}

LLVM IR (-O2):
@PR_SET_PDEATHSIG = global i32 0
@SIGKILL = global i32 0
define i32 @child(i8* nocapture readnone %0) {
%2 = load i32, i32* @PR_SET_PDEATHSIG
%3 = load i32, i32* @SIGKILL
%4 = tail call i32 @prctl(i32 %2, i32 %3)
br label %5
5: ; preds = %1, %5
%6 = tail call i32 @sleep(i32 1)
br label %5
}
/* Variables and functions */
int /*<<< orphan*/ gator_annotate_channel(int /*<<< orphan*/, char const *);
void gator_annotate(const char *str) { gator_annotate_channel(0, str); }


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

x86 assembly (clang, -O2):
<gator_annotate>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <gator_annotate_channel@plt>

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

LLVM IR (-O2):
define void @gator_annotate(i8* %0) {
%2 = tail call i32 @gator_annotate_channel(i32 0, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_angle_types();
int /*<<< orphan*/ set_parameters();
void step0(void) {
  set_parameters();
  set_angle_types();
}


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

x86 assembly (clang, -O2):
<step0>:
push   %rax
xor    %eax,%eax
call   1030 <set_parameters@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <set_angle_types@plt>

LLVM IR (-O0):
define void @step0() {
%1 = call i32 (...) @set_parameters()
%2 = call i32 (...) @set_angle_types()
ret void
}

LLVM IR (-O2):
define void @step0() {
%1 = tail call i32 (...) @set_parameters()
%2 = tail call i32 (...) @set_angle_types()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int prime_count_inverse(int);
void prime_count_inverse_test(void) {
  assert(prime_count_inverse(5) == 100);
  assert(prime_count_inverse(10000) == 1000000);
}


x86 assembly (clang, -O0):
<prime_count_inverse_test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1040 <prime_count_inverse@plt>
cmp    $0x64,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x2710,%edi
call   1040 <prime_count_inverse@plt>
cmp    $0xf4240,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<prime_count_inverse_test>:
push   %rax
mov    $0x5,%edi
call   1040 <prime_count_inverse@plt>
xor    %edi,%edi
cmp    $0x64,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x2710,%edi
call   1040 <prime_count_inverse@plt>
xor    %edi,%edi
cmp    $0xf4240,%eax
sete   %dil
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @prime_count_inverse_test() {
%1 = call i32 @prime_count_inverse(i32 5)
%2 = icmp eq i32 %1, 100
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
%5 = call i32 @prime_count_inverse(i32 10000)
%6 = icmp eq i32 %5, 1000000
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret void
}

LLVM IR (-O2):
define void @prime_count_inverse_test() {
%1 = tail call i32 @prime_count_inverse(i32 5)
%2 = icmp eq i32 %1, 100
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @prime_count_inverse(i32 10000)
%6 = icmp eq i32 %5, 1000000
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret void
}
int test_imm_76int64_highword_reg(long long val) {
  return ((val >> 32) & (0x76 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_76int64_highword_reg>:
movabs $0x7600000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_76int64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 118
%6 = icmp ne i64 %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_76int64_highword_reg(i64 %0) {
%2 = and i64 %0, 506806140928
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void ff_hevc_h_loop_filter_luma_8_sse2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_h_loop_filter_luma_8_sse2() {
ret void
}
void BGRAToUVRow_Any_NEON() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ ST7735_DrawPixel(int /*<<< orphan*/, int /*<<< orphan*/,
                                    int /*<<< orphan*/);
void ST7735_Circle(uint16_t x, uint16_t y, uint16_t radius, uint16_t color) {
  ST7735_DrawPixel(x, y, color);
}


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

x86 assembly (clang, -O2):
<ST7735_Circle>:
mov    %ecx,%edx
jmp    1030 <ST7735_DrawPixel@plt>

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

LLVM IR (-O2):
define void @ST7735_Circle(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @ST7735_DrawPixel(i32 %0, i32 %1, i32 %3)
ret void
}
void tagbase(const char *text, int len) {}


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

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

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

LLVM IR (-O2):
define void @tagbase(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gfx_outb(int, unsigned char);
int gfx_vga_seq_reset(int reset) {
  gfx_outb(0x3C4, 0);
  gfx_outb(0x3C5, (unsigned char)(reset ? 0x00 : 0x03));
  return (0);
}


x86 assembly (clang, -O0):
<gfx_vga_seq_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x3c4,%edi
xor    %esi,%esi
call   1030 <gfx_outb@plt>
mov    -0x4(%rbp),%edx
mov    $0x3,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    $0x3c5,%edi
movzbl %al,%esi
call   1030 <gfx_outb@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gfx_vga_seq_reset>:
push   %rbx
mov    %edi,%ebx
mov    $0x3c4,%edi
xor    %esi,%esi
call   1030 <gfx_outb@plt>
xor    %eax,%eax
test   %ebx,%ebx
sete   %al
lea    (%rax,%rax,2),%esi
mov    $0x3c5,%edi
call   1030 <gfx_outb@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @gfx_vga_seq_reset(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @gfx_outb(i32 964, i8 zeroext 0)
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 0, i32 3
%8 = trunc i32 %7 to i8
%9 = call i32 @gfx_outb(i32 965, i8 zeroext %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @gfx_vga_seq_reset(i32 %0) {
%2 = tail call i32 @gfx_outb(i32 964, i8 zeroext 0)
%3 = icmp eq i32 %0, 0
%4 = select i1 %3, i8 3, i8 0
%5 = tail call i32 @gfx_outb(i32 965, i8 zeroext %4)
ret i32 0
}
int atomicDecrement(volatile int *ptr) {
  unsigned char ret;
  asm volatile("lock\n"
               "decl %0\n"
               "setne %1"
               : "=m"(*ptr), "=qm"(ret)
               : "m"(*ptr)
               : "memory");
  return ret;
}


x86 assembly (clang, -O0):
<atomicDecrement>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
lock decl (%rax)
setne  -0x9(%rbp)
movzbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomicDecrement>:
lock decl (%rdi)
setne  -0x1(%rsp)
movzbl -0x1(%rsp),%eax
ret

LLVM IR (-O0):
define i32 @atomicDecrement(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32*, i32** %2
%6 = load i8, i8* %3
%7 = zext i8 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @atomicDecrement(i32* %0) {
%2 = alloca i8
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int min_element(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int array[4] = {1, 2, 3, 4};
  int min;
  min = min_element(array, 4);
  printf("The min value is: %d\n", min);
  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)
lea    -0x20(%rbp),%rdi
mov    $0x4,%esi
call   1040 <min_element@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xeb0(%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
call   1040 <min_element@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@__const.main.array = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
@.str = [22 x i8] c"The min value is: %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 @min_element(i32* %3, i32 4)
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
int test_imm_2Dint64_lowword_mem(long long *val) {
  return ((*val) & (0x2D << 0)) ? -20 : -40;
}


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

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

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

/* Variables and functions */
int /*<<< orphan*/ _bswap64(int /*<<< orphan*/);
void be64enc(void *buf, uint64_t x) { *((uint64_t *)buf) = _bswap64(x); }


x86 assembly (clang, -O0):
<be64enc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <_bswap64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<be64enc>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <_bswap64@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @be64enc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @_bswap64(i32 %5)
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32 %6, i32* %8
ret void
}

LLVM IR (-O2):
define void @be64enc(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @_bswap64(i32 %1)
%4 = bitcast i8* %0 to i32*
store i32 %3, i32* %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int seteuid(int /*<<< orphan*/);
int pthread_seteuid_np(uid_t uid) { return seteuid(uid); }


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

x86 assembly (clang, -O2):
<pthread_seteuid_np>:
jmp    1030 <seteuid@plt>

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

LLVM IR (-O2):
define i32 @pthread_seteuid_np(i32 %0) {
%2 = tail call i32 @seteuid(i32 %0)
ret i32 %2
}
void page_tracker_show(struct page *page, int order) {}


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

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

LLVM IR (-O0):
%struct.page = type opaque
define void @page_tracker_show(%struct.page* %0, i32 %1) {
%3 = alloca %struct.page*
%4 = alloca i32
store %struct.page* %0, %struct.page** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.page = type opaque
define void @page_tracker_show(%struct.page* nocapture %0, i32 %1) {
ret void
}
alph(i) {
  if (i >= 'a' && i <= 'z' || i >= 'A' && i <= 'Z')
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<alph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     111b <alph+0x1b>
cmpl   $0x7a,-0x8(%rbp)
jle    112f <alph+0x2f>
cmpl   $0x41,-0x8(%rbp)
jl     113b <alph+0x3b>
cmpl   $0x5a,-0x8(%rbp)
jg     113b <alph+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <alph+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<alph>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @alph(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 122
br i1 %8, label %15, label %9
9: ; preds = %6, %1
%10 = load i32, i32* %3
%11 = icmp sge i32 %10, 65
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp sle i32 %13, 90
br i1 %14, label %15, label %16
15: ; preds = %12, %6
store i32 1, i32* %2
br label %17
16: ; preds = %12, %9
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @alph(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
void Cyc_Absyndump_dumpvaropt(struct _fat_ptr *vo) {
  if (vo != 0)
    ({ Cyc_Absyndump_dump_str(vo); });
}


x86 assembly (clang, -O0):
<Cyc_Absyndump_dumpvaropt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1135 <Cyc_Absyndump_dumpvaropt+0x25>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <Cyc_Absyndump_dump_str@plt>
mov    %eax,-0xc(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Absyndump_dumpvaropt>:
test   %rdi,%rdi
je     111c <Cyc_Absyndump_dumpvaropt+0xc>
xor    %eax,%eax
jmp    1030 <Cyc_Absyndump_dump_str@plt>
ret

LLVM IR (-O0):
%struct._fat_ptr = type opaque
define void @Cyc_Absyndump_dumpvaropt(%struct._fat_ptr* %0) {
%2 = alloca %struct._fat_ptr*
%3 = alloca i32
store %struct._fat_ptr* %0, %struct._fat_ptr** %2
%4 = load %struct._fat_ptr*, %struct._fat_ptr** %2
%5 = icmp ne %struct._fat_ptr* %4, null
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load %struct._fat_ptr*, %struct._fat_ptr** %2
%8 = call i32 (%struct._fat_ptr*, ...) bitcast (i32 (...)* @Cyc_Absyndump_dump_str to i32 (%struct._fat_ptr*, ...)*)(%struct._fat_ptr* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
br label %10
10: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
%struct._fat_ptr = type opaque
define void @Cyc_Absyndump_dumpvaropt(%struct._fat_ptr* %0) {
%2 = icmp eq %struct._fat_ptr* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (%struct._fat_ptr*, ...) bitcast (i32 (...)* @Cyc_Absyndump_dump_str to i32 (%struct._fat_ptr*, ...)*)(%struct._fat_ptr* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef scalar_t__ i;

/* Variables and functions */
bool power_of_two_or_zero(unsigned int i) {
  if (((i) & (i - 1)) == 0) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<power_of_two_or_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
jne    1127 <power_of_two_or_zero+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <power_of_two_or_zero+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @power_of_two_or_zero(i32 %0) {
%2 = tail call i32 @llvm.ctpop.i32(i32 %0)
%3 = icmp ult i32 %2, 2
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fact(int);
int /*<<< orphan*/ print_int(int /*<<< orphan*/);
int main(void) {
  int i, x;
  x = 5;
  i = 0;
  print_int(fact(x));
  return i;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <fact@plt>
mov    %eax,%edi
call   1030 <print_int@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1040 <fact@plt>
mov    %eax,%edi
call   1030 <print_int@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fact(i32 5)
%2 = tail call i32 @print_int(i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EX_SOFTWARE;
int /*<<< orphan*/ errx(int /*<<< orphan*/, char *, int);
void *malloc(size_t);
void *dfu_malloc(size_t size) {
  void *ptr = malloc(size);
  if (ptr == NULL)
    errx(EX_SOFTWARE, "Cannot allocate memory of size %d bytes", (int)size);
  return (ptr);
}


x86 assembly (clang, -O0):
<dfu_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115f <dfu_malloc+0x3f>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    %eax,%edx
lea    0xea6(%rip),%rsi
call   1030 <errx@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dfu_malloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114c <dfu_malloc+0x2c>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
mov    %r14d,%edx
call   1030 <errx@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EX_SOFTWARE = global i32 0
@.str = [40 x i8] c"Cannot allocate memory of size %d bytes\00"
define i8* @dfu_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i32, i32* @EX_SOFTWARE
%10 = load i64, i64* %2
%11 = trunc i64 %10 to i32
%12 = call i32 @errx(i32 %9, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %8, %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@EX_SOFTWARE = global i32 0
@.str = [40 x i8] c"Cannot allocate memory of size %d bytes\00"
define noalias i8* @dfu_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @EX_SOFTWARE
%6 = trunc i64 %0 to i32
%7 = tail call i32 @errx(i32 %5, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void idt_int15(void) { print("!! Intel reserved int "); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"!! Intel reserved int \00"
define void @idt_int15() {
%1 = call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"!! Intel reserved int \00"
define void @idt_int15() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
int sigmund_ilog2(int n) {
  int ret = -1;
  while (n) {
    n >>= 1;
    ret++;
  }
  return (ret);
}


x86 assembly (clang, -O0):
<sigmund_ilog2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <sigmund_ilog2+0x2f>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <sigmund_ilog2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigmund_ilog2>:
mov    $0xffffffff,%eax
test   %edi,%edi
je     111c <sigmund_ilog2+0x1c>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
sar    %ecx
add    $0x1,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <sigmund_ilog2+0x10>
ret

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

LLVM IR (-O2):
define i32 @sigmund_ilog2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ -1, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i32 %5, 1
%7 = add nsw i32 %4, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ -1, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
double display_results(double BMI) {
  printf("Your Body Mass Index (BMI) = %lf\n", BMI);
  printf("< 18 = Underweight, >= 18 and < 25 = Healthy, >= 25 and < 30 = "
         "Overweight, > 30 = Obese\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<display_results>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xed7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_results>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xeec(%rip),%rdi
call   1030 <puts@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Your Body Mass Index (BMI) = %lf\0A\00"
@.str.1 = [90 x i8] c"< 18 = Underweight, >= 18 and < 25 = Healthy, >= 25 and < 30 = Overweight, > 30 = Obese\0A\0A\00"
define double @display_results(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), double %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.1, i64 0, i64 0))
ret double 0.000000e+00
}

LLVM IR (-O2):
@.str = [34 x i8] c"Your Body Mass Index (BMI) = %lf\0A\00"
@str = [89 x i8] c"< 18 = Underweight, >= 18 and < 25 = Healthy, >= 25 and < 30 = Overweight, > 30 = Obese\0A\00"
define double @display_results(double %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), double %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([89 x i8], [89 x i8]* @str, i64 0, i64 0))
ret double 0.000000e+00
}
int log2floor(const unsigned long long x) {
  return sizeof(unsigned long long) * 8 - __builtin_clzll(x) - 1;
}


x86 assembly (clang, -O0):
<log2floor>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
bsr    %rax,%rax
xor    $0x3f,%rax
movslq %eax,%rcx
mov    $0x40,%eax
sub    %rcx,%rax
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2floor>:
bsr    %rdi,%rax
ret

LLVM IR (-O0):
define i32 @log2floor(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @llvm.ctlz.i64(i64 %3, i1 true)
%5 = trunc i64 %4 to i32
%6 = sext i32 %5 to i64
%7 = sub i64 64, %6
%8 = sub i64 %7, 1
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @log2floor(i64 %0) {
%2 = tail call i64 @llvm.ctlz.i64(i64 %0, i1 true)
%3 = trunc i64 %2 to i32
%4 = xor i32 %3, 63
ret i32 %4
}
int ISALNUM(int ch) {
  return ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') ||
          (ch >= '0' && ch <= '0'));
}


x86 assembly (clang, -O0):
<ISALNUM>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1120 <ISALNUM+0x20>
mov    $0x1,%al
cmpl   $0x5a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1158 <ISALNUM+0x58>
cmpl   $0x61,-0x4(%rbp)
jl     1139 <ISALNUM+0x39>
mov    $0x1,%al
cmpl   $0x7a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1158 <ISALNUM+0x58>
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1152 <ISALNUM+0x52>
cmpl   $0x30,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ISALNUM>:
mov    %edi,%eax
and    $0xffffffdf,%eax
add    $0xffffffbf,%eax
cmp    $0x1a,%eax
setb   %al
cmp    $0x30,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @ISALNUM(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = icmp eq i32 %0, 48
%6 = or i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ test_decoding();
int /*<<< orphan*/ test_encoding();
int main(int argc, char *argv[]) {
  test_encoding();
  test_decoding();
  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 <test_encoding@plt>
mov    $0x0,%al
call   1040 <test_decoding@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_encoding@plt>
xor    %eax,%eax
call   1040 <test_decoding@plt>
mov    0x2eaa(%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 (...) @test_encoding()
%7 = call i32 (...) @test_decoding()
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_encoding()
%4 = tail call i32 (...) @test_decoding()
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
int j(int i) { return (i - (-2)) < i; }


x86 assembly (clang, -O0):
<j>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0xfffffffe,%eax
cmp    -0x4(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @j(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, -2
%5 = load i32, i32* %2
%6 = icmp slt i32 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @j(i32 %0) {
ret i32 0
}
unsigned long __maxindex(unsigned int height) {
  unsigned int tmp = height * 3;
  unsigned long index = ~0UL;
  if (tmp < (8 * sizeof(unsigned long)))
    index = (index >> ((8 * sizeof(unsigned long)) - tmp - 1)) >> 1;
  return index;
}


x86 assembly (clang, -O0):
<__maxindex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x3,-0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movq   $0xffffffffffffffff,-0x10(%rbp)
ff
mov    -0x8(%rbp),%eax
cmp    $0x40,%rax
jae    1143 <__maxindex+0x43>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
mov    %ecx,%edx
mov    $0x40,%ecx
sub    %rdx,%rcx
sub    $0x1,%rcx
shr    %cl,%rax
shr    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__maxindex>:
lea    (%rdi,%rdi,2),%edx
mov    $0x3f,%cl
sub    %dl,%cl
mov    $0xffffffffffffffff,%rsi
mov    $0xffffffffffffffff,%rax
shr    %cl,%rax
shr    %rax
cmp    $0x40,%edx
cmovae %rsi,%rax
ret

LLVM IR (-O0):
define i64 @__maxindex(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = mul i32 %5, 3
store i32 %6, i32* %3
store i64 -1, i64* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = icmp ult i64 %8, 64
br i1 %9, label %10, label %18
10: ; preds = %1
%11 = load i64, i64* %4
%12 = load i32, i32* %3
%13 = zext i32 %12 to i64
%14 = sub i64 64, %13
%15 = sub i64 %14, 1
%16 = lshr i64 %11, %15
%17 = lshr i64 %16, 1
store i64 %17, i64* %4
br label %18
18: ; preds = %10, %1
%19 = load i64, i64* %4
ret i64 %19
}

LLVM IR (-O2):
define i64 @__maxindex(i32 %0) {
%2 = mul i32 %0, 3
%3 = icmp ult i32 %2, 64
%4 = zext i32 %2 to i64
%5 = sub nsw i64 63, %4
%6 = lshr i64 -1, %5
%7 = lshr i64 %6, 1
%8 = select i1 %3, i64 %7, i64 -1
ret i64 %8
}
void gtk_tree_view_column_set_cell_data_func() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_set_cell_data_func() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sig_int(int sig) { printf("interrupt\n%% "); }


x86 assembly (clang, -O0):
<sig_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"interrupt\0A%% \00"
define void @sig_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"interrupt\0A%% \00"
define void @sig_int(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
int typed_oldstyle2(arg1, arg2)
int arg1;
char arg2;
{ ; }


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

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

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

LLVM IR (-O2):
define i32 @typed_oldstyle2(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int *malloc(int);
int /*<<< orphan*/ myfoo(int *);
void mallocBindFreeUse() {
  int *x = malloc(12);
  int *y = x;
  free(y);
  myfoo(x);
}


x86 assembly (clang, -O0):
<mallocBindFreeUse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
call   1040 <myfoo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mallocBindFreeUse>:
push   %rbx
mov    $0xc,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <myfoo@plt>

LLVM IR (-O0):
define void @mallocBindFreeUse() {
%1 = alloca i32*
%2 = alloca i32*
%3 = call i32* @malloc(i32 12)
store i32* %3, i32** %1
%4 = load i32*, i32** %1
store i32* %4, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @free(i32* %5)
%7 = load i32*, i32** %1
%8 = call i32 @myfoo(i32* %7)
ret void
}

LLVM IR (-O2):
define void @mallocBindFreeUse() {
%1 = tail call i32* @malloc(i32 12)
%2 = tail call i32 @free(i32* %1)
%3 = tail call i32 @myfoo(i32* %1)
ret void
}