xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ I2C1_DriverIRQHandler();
__attribute__((weak)) void I2C1_IRQHandler(void) { I2C1_DriverIRQHandler(); }


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

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

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

LLVM IR (-O2):
define weak void @I2C1_IRQHandler() {
%1 = tail call i32 (...) @I2C1_DriverIRQHandler()
ret void
}
/* Variables and functions */
float cblas_sdsdot(int const, float const, float const *, int const,
                   float const *, int const);
void acc_sdsdot_(const int *N, const float *alpha, const float *X,
                 const int *incX, const float *Y, const int *incY,
                 float *result) {
  *result = cblas_sdsdot(*N, *alpha, X, *incX, Y, *incY);
}


x86 assembly (clang, -O0):
<acc_sdsdot_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%rax
mov    (%rax),%r8d
call   1030 <cblas_sdsdot@plt>
mov    0x10(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acc_sdsdot_>:
push   %rbx
mov    %r8,%r10
mov    0x10(%rsp),%rbx
mov    (%rdi),%edi
movss  (%rsi),%xmm0
mov    (%rcx),%eax
mov    (%r9),%r8d
mov    %rdx,%rsi
mov    %eax,%edx
mov    %r10,%rcx
call   1030 <cblas_sdsdot@plt>
movss  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @acc_sdsdot_(i32* %0, float* %1, float* %2, i32* %3, float* %4, i32* %5, float* %6) {
%8 = alloca i32*
%9 = alloca float*
%10 = alloca float*
%11 = alloca i32*
%12 = alloca float*
%13 = alloca i32*
%14 = alloca float*
store i32* %0, i32** %8
store float* %1, float** %9
store float* %2, float** %10
store i32* %3, i32** %11
store float* %4, float** %12
store i32* %5, i32** %13
store float* %6, float** %14
%15 = load i32*, i32** %8
%16 = load i32, i32* %15
%17 = load float*, float** %9
%18 = load float, float* %17
%19 = load float*, float** %10
%20 = load i32*, i32** %11
%21 = load i32, i32* %20
%22 = load float*, float** %12
%23 = load i32*, i32** %13
%24 = load i32, i32* %23
%25 = call float @cblas_sdsdot(i32 %16, float %18, float* %19, i32 %21, float* %22, i32 %24)
%26 = load float*, float** %14
store float %25, float* %26
ret void
}

LLVM IR (-O2):
define void @acc_sdsdot_(i32* nocapture %0, float* nocapture %1, float* %2, i32* nocapture %3, float* %4, i32* nocapture %5, float* nocapture writeonly %6) {
%8 = load i32, i32* %0
%9 = load float, float* %1
%10 = load i32, i32* %3
%11 = load i32, i32* %5
%12 = tail call float @cblas_sdsdot(i32 %8, float %9, float* %2, i32 %10, float* %4, i32 %11)
store float %12, float* %6
ret void
}
discard(x) int x;
{}


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

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

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

LLVM IR (-O2):
define i32 @discard(i32 %0) {
ret i32 undef
}
int fdc_tasks_create() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fdc_tasks_create() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fft(float *);
int /*<<< orphan*/ imprimeVetor(float *);
int /*<<< orphan*/ inicializaArray(float *);
int /*<<< orphan*/ ordenaBitReverso(float *);
int main(void) {
  float data[16 * 2];
  unsigned long count;
  for (count = 0; count < 1; count++) {
    inicializaArray(data);
    ordenaBitReverso(data - 1);
    fft(data - 1);
  }
  imprimeVetor(data);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x98(%rbp)
cmpq   $0x1,-0x98(%rbp)
01
jae    11ae <main+0x6e>
lea    -0x90(%rbp),%rdi
call   1040 <inicializaArray@plt>
lea    -0x90(%rbp),%rdi
add    $0xfffffffffffffffc,%rdi
call   1030 <ordenaBitReverso@plt>
lea    -0x90(%rbp),%rdi
add    $0xfffffffffffffffc,%rdi
call   1060 <fft@plt>
mov    -0x98(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x98(%rbp)
jmp    115d <main+0x1d>
lea    -0x90(%rbp),%rdi
call   1050 <imprimeVetor@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <inicializaArray@plt>
lea    -0x4(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <ordenaBitReverso@plt>
mov    %rbx,%rdi
call   1060 <fft@plt>
mov    %r14,%rdi
call   1050 <imprimeVetor@plt>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [32 x float]
%3 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %3
br label %4
4: ; preds = %16, %0
%5 = load i64, i64* %3
%6 = icmp ult i64 %5, 1
br i1 %6, label %7, label %19
7: ; preds = %4
%8 = getelementptr inbounds [32 x float], [32 x float]* %2, i64 0, i64 0
%9 = call i32 @inicializaArray(float* %8)
%10 = getelementptr inbounds [32 x float], [32 x float]* %2, i64 0, i64 0
%11 = getelementptr inbounds float, float* %10, i64 -1
%12 = call i32 @ordenaBitReverso(float* %11)
%13 = getelementptr inbounds [32 x float], [32 x float]* %2, i64 0, i64 0
%14 = getelementptr inbounds float, float* %13, i64 -1
%15 = call i32 @fft(float* %14)
br label %16
16: ; preds = %7
%17 = load i64, i64* %3
%18 = add i64 %17, 1
store i64 %18, i64* %3
br label %4
19: ; preds = %4
%20 = getelementptr inbounds [32 x float], [32 x float]* %2, i64 0, i64 0
%21 = call i32 @imprimeVetor(float* %20)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [32 x float]
%2 = bitcast [32 x float]* %1 to i8*
%3 = getelementptr inbounds [32 x float], [32 x float]* %1, i64 0, i64 0
%4 = call i32 @inicializaArray(float* %3)
%5 = getelementptr inbounds [32 x float], [32 x float]* %1, i64 0, i64 -1
%6 = call i32 @ordenaBitReverso(float* %5)
%7 = call i32 @fft(float* %5)
%8 = call i32 @imprimeVetor(float* %3)
ret i32 0
}
unsigned char f96(unsigned char x, long int y) {
  return (x << ((-y) & (8 * sizeof(unsigned char) - 1))) + (x >> y);
}


x86 assembly (clang, -O0):
<f96>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    $0x7,%rcx
shl    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    -0x10(%rbp),%rcx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f96>:
mov    %esi,%ecx
neg    %cl
and    $0x7,%cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f96(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i64, i64* %4
%8 = sub nsw i64 0, %7
%9 = and i64 %8, 7
%10 = trunc i64 %9 to i32
%11 = shl i32 %6, %10
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = load i64, i64* %4
%15 = trunc i64 %14 to i32
%16 = ashr i32 %13, %15
%17 = add nsw i32 %11, %16
%18 = trunc i32 %17 to i8
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @f96(i8 zeroext %0, i64 %1) {
%3 = zext i8 %0 to i32
%4 = trunc i64 %1 to i32
%5 = sub i32 0, %4
%6 = and i32 %5, 7
%7 = shl nuw nsw i32 %3, %6
%8 = lshr i32 %3, %4
%9 = add nuw nsw i32 %7, %8
%10 = trunc i32 %9 to i8
ret i8 %10
}
/* Variables and functions */
int /*<<< orphan*/ getVariableId(char *, int);
void addVariableIfNeeded(char *name) { getVariableId(name, 1); }


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

x86 assembly (clang, -O2):
<addVariableIfNeeded>:
mov    $0x1,%esi
jmp    1030 <getVariableId@plt>

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

LLVM IR (-O2):
define void @addVariableIfNeeded(i8* %0) {
%2 = tail call i32 @getVariableId(i8* %0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ yyparse();
int main() {
  yyparse();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @yyparse()
ret i32 0
}
void vhost_remove_xconnect(void) { return; }


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

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

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

LLVM IR (-O2):
define void @vhost_remove_xconnect() {
ret void
}
int tegra_auto_hotplug_init(struct mutex *cpu_lock) { return 0; }


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

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

LLVM IR (-O0):
%struct.mutex = type opaque
define i32 @tegra_auto_hotplug_init(%struct.mutex* %0) {
%2 = alloca %struct.mutex*
store %struct.mutex* %0, %struct.mutex** %2
ret i32 0
}

LLVM IR (-O2):
%struct.mutex = type opaque
define i32 @tegra_auto_hotplug_init(%struct.mutex* nocapture readnone %0) {
ret i32 0
}
void modif_rear_unit2MODIF_EXTENDED() {}


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

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

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

LLVM IR (-O2):
define void @modif_rear_unit2MODIF_EXTENDED() {
ret void
}
/* Variables and functions */
char *malloc(int);
char *memchr(char *, char, unsigned int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ sink(char *);
void warn_memchr_var_memset_cst(const void *s, unsigned n) {
  char *p = malloc(4);
  sink(p);
  p = memchr(p, '1', n);
  memset(p, 0, 5);
}


x86 assembly (clang, -O0):
<warn_memchr_var_memset_cst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x4,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <sink@plt>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0x31,%esi
call   1040 <memchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0x5,%edx
call   1030 <memset@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warn_memchr_var_memset_cst>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    $0x4,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <sink@plt>
mov    %rbx,%rdi
mov    $0x31,%esi
mov    %ebp,%edx
call   1040 <memchr@plt>
mov    %rax,%rdi
xor    %esi,%esi
mov    $0x5,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @warn_memchr_var_memset_cst(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = call i8* @malloc(i32 4)
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = call i32 @sink(i8* %7)
%9 = load i8*, i8** %5
%10 = load i32, i32* %4
%11 = call i8* @memchr(i8* %9, i8 signext 49, i32 %10)
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = call i32 @memset(i8* %12, i32 0, i32 5)
ret void
}

LLVM IR (-O2):
define void @warn_memchr_var_memset_cst(i8* nocapture readnone %0, i32 %1) {
%3 = tail call dereferenceable_or_null(4) i8* @malloc(i32 4)
%4 = tail call i32 @sink(i8* %3)
%5 = tail call i8* @memchr(i8* %3, i8 signext 49, i32 %1)
%6 = tail call i32 @memset(i8* %5, i32 0, i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
long long atoll(char *);
void test2(char *array) {
  array[9] = 'a';
  long long r = atoll(array + 9);
  assert(r == 0);
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x61,0x9(%rax)
mov    -0x8(%rbp),%rdi
add    $0x9,%rdi
call   1030 <atoll@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
push   %rax
movb   $0x61,0x9(%rdi)
add    $0x9,%rdi
call   1030 <atoll@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @test2(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 9
store i8 97, i8* %5
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 9
%8 = call i64 @atoll(i8* %7)
store i64 %8, i64* %3
%9 = load i64, i64* %3
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret void
}

LLVM IR (-O2):
define void @test2(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 9
store i8 97, i8* %2
%3 = tail call i64 @atoll(i8* %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret void
}
int cond(int x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @cond(i32 returned %0) {
ret i32 %0
}
char *gdb_step(int sig, long addr) {}


x86 assembly (clang, -O0):
<gdb_step>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8* @gdb_step(i32 %0, i64 %1) {
ret i8* undef
}
/* Variables and functions */
int bc_assert_status(char const *, int, char const *, long);
int bc_assert_cond(const char *msg, int cond, const char *file_path,
                   long line_no) {
  return bc_assert_status(msg, cond != 0 ? 0 : 1, file_path, line_no);
}


x86 assembly (clang, -O0):
<bc_assert_cond>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    $0x1,%esi
xor    %eax,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <bc_assert_status@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bc_assert_cond>:
xor    %eax,%eax
test   %esi,%esi
sete   %al
mov    %eax,%esi
jmp    1030 <bc_assert_status@plt>

LLVM IR (-O0):
define i32 @bc_assert_cond(i8* %0, i32 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 0, i32 1
%14 = load i8*, i8** %7
%15 = load i64, i64* %8
%16 = call i32 @bc_assert_status(i8* %9, i32 %13, i8* %14, i64 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @bc_assert_cond(i8* %0, i32 %1, i8* %2, i64 %3) {
%5 = icmp eq i32 %1, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 @bc_assert_status(i8* %0, i32 %6, i8* %2, i64 %3)
ret i32 %7
}
baz0(bar) int (*(*bar)(float))(int);
{}


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

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

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

LLVM IR (-O2):
define i32 @baz0(i32 (i32)* (float)* nocapture readnone %0) {
ret i32 undef
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int SPI_getMode(int);
int SPI_setMode(int, int);
int SPI_setClockMode(int spidev_fd, uint8_t clock_mode) {
  uint8_t mode;
  mode = SPI_getMode(spidev_fd);
  if (mode < 0)
    return mode;
  mode &= ~0x3;
  mode |= clock_mode & 0x3;
  return SPI_setMode(spidev_fd, mode);
}


x86 assembly (clang, -O0):
<SPI_setClockMode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <SPI_getMode@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    114e <SPI_setClockMode+0x2e>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1171 <SPI_setClockMode+0x51>
mov    -0x10(%rbp),%eax
and    $0xfffffffc,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x3,%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <SPI_setMode@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SPI_setClockMode>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <SPI_getMode@plt>
test   %eax,%eax
js     1147 <SPI_setClockMode+0x27>
and    $0xfffffffc,%eax
and    $0x3,%ebx
or     %eax,%ebx
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <SPI_setMode@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @SPI_setClockMode(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = call i32 @SPI_getMode(i32 %7)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i32, i32* %6
store i32 %12, i32* %3
br label %23
13: ; preds = %2
%14 = load i32, i32* %6
%15 = and i32 %14, -4
store i32 %15, i32* %6
%16 = load i32, i32* %5
%17 = and i32 %16, 3
%18 = load i32, i32* %6
%19 = or i32 %18, %17
store i32 %19, i32* %6
%20 = load i32, i32* %4
%21 = load i32, i32* %6
%22 = call i32 @SPI_setMode(i32 %20, i32 %21)
store i32 %22, i32* %3
br label %23
23: ; preds = %13, %11
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @SPI_setClockMode(i32 %0, i32 %1) {
%3 = tail call i32 @SPI_getMode(i32 %0)
%4 = icmp slt i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = and i32 %3, -4
%7 = and i32 %1, 3
%8 = or i32 %6, %7
%9 = tail call i32 @SPI_setMode(i32 %0, i32 %8)
br label %10
10: ; preds = %2, %5
%11 = phi i32 [ %9, %5 ], [ %3, %2 ]
ret i32 %11
}
void ARGB4444ToYRow_C() {}


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

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

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

LLVM IR (-O2):
define void @ARGB4444ToYRow_C() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ t1();
int main(int argc __attribute__((unused)),
         char **argv __attribute__((unused))) {
  t1();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @t1()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
char *BN_bn2hex(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *, char *);
void printBNX(char *name, BIGNUM *bn) {
  printf("%s = %s\n", name, BN_bn2hex(bn));
}


x86 assembly (clang, -O0):
<printBNX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <BN_bn2hex@plt>
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printBNX>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <BN_bn2hex@plt>
lea    0xecd(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"%s = %s\0A\00"
define void @printBNX(i8* %0, i32* %1) {
%3 = tail call i8* @BN_bn2hex(i32* %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %3)
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, long long, char const *);
int /*<<< orphan*/ stderr;
void parse_error(int64_t n_lines, const char *__restrict msg) {
  fprintf(stderr, "Parse error at line %lld: %s\n", (long long)n_lines, msg);
  abort();
}


x86 assembly (clang, -O0):
<parse_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<parse_error>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"Parse error at line %lld: %s\0A\00"
define void @parse_error(i64 %0, i8* noalias %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i64 %0, i8* %1)
%5 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char food[5];
  printf("Enter more than 4 symbols: ");
  scanf("%s", food);
  printf("Result: %s\n", food);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x5(%rbp),%rsi
lea    0xedb(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x5(%rbp),%rsi
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
lea    0xb(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xed1(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Enter more than 4 symbols: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [12 x i8] c"Result: %s\0A\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"Enter more than 4 symbols: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [12 x i8] c"Result: %s\0A\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f(char *);
int main(void) {
  char a[10];
  f(a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xa(%rbp),%rdi
call   1030 <f@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xe(%rsp),%rdi
call   1030 <f@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @f(i8* %2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @f(i8* %2)
ret i32 0
}
void gdk_rgb_dither_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_rgb_dither_get_type() {
ret void
}
int test4() {
  test4();
  return 0;
}


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

x86 assembly (clang, -O2):
<test4>:
jmp    1100 <test4>

LLVM IR (-O0):
define i32 @test4() {
%1 = call i32 @test4()
ret i32 0
}

LLVM IR (-O2):
define i32 @test4() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
double fabs(double);
char *gettext(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
double ValorAbsoluto(double a) {
  printf(gettext("Enter a number (positive or negative): "));
  scanf("%lf", &a);
  return (fabs(a));
}


x86 assembly (clang, -O0):
<ValorAbsoluto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    0xecc(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
lea    0xee0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
movaps 0xe93(%rip),%xmm1
pand   %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ValorAbsoluto>:
push   %rax
movsd  %xmm0,(%rsp)
lea    0xed3(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
lea    0xee7(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
andps  0xe9b(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Enter a number (positive or negative): \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @ValorAbsoluto(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i8* @gettext(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* %3)
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = call double @llvm.fabs.f64(double %6)
ret double %7
}

LLVM IR (-O2):
@.str = [40 x i8] c"Enter a number (positive or negative): \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @ValorAbsoluto(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = tail call i8* @gettext(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) %3)
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = call double @llvm.fabs.f64(double %6)
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ strlcpy(char *, char *, int);
int main(int argc, char **buffer) {
  char abuf[10];
  char bbuf[10];
  strlcpy(abuf, bbuf, 6);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1a(%rbp),%rdi
lea    -0x24(%rbp),%rsi
mov    $0x6,%edx
call   1030 <strlcpy@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xe(%rsp),%rdi
lea    0x4(%rsp),%rsi
mov    $0x6,%edx
call   1030 <strlcpy@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i8]
%7 = alloca [10 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %7, i64 0, i64 0
%10 = call i32 @strlcpy(i8* %8, i8* %9, i32 6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i8]
%4 = alloca [10 x i8]
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%7 = call i32 @strlcpy(i8* %5, i8* %6, i32 6)
ret i32 0
}
int turnOn(int state) { return state; }


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

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

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

LLVM IR (-O2):
define i32 @turnOn(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int q2();
int q1(void) { return q2() + 1; }


x86 assembly (clang, -O0):
<q1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <q2@plt>
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<q1>:
push   %rax
xor    %eax,%eax
call   1030 <q2@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @q1() {
%1 = call i32 (...) @q2()
%2 = add nsw i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @q1() {
%1 = tail call i32 (...) @q2()
%2 = add nsw i32 %1, 1
ret i32 %2
}
void autogen_line() {}


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

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

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

LLVM IR (-O2):
define void @autogen_line() {
ret void
}
void foo(float _Complex c) {}


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

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

LLVM IR (-O0):
define void @foo(<2 x float> %0) {
%2 = alloca { float, float }
%3 = bitcast { float, float }* %2 to <2 x float>*
store <2 x float> %0, <2 x float>* %3
ret void
}

LLVM IR (-O2):
define void @foo(<2 x float> %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
void print_name_and_ivalue(char *name, int value) {
  printf("# %-28s = %4d\n", name, value);
}


x86 assembly (clang, -O0):
<print_name_and_ivalue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_name_and_ivalue>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"# %-28s = %4d\0A\00"
define void @print_name_and_ivalue(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"# %-28s = %4d\0A\00"
define void @print_name_and_ivalue(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
int hashFunction(char *key) {
  int temp = 0;
  int i = 0;
  while (key[i] != '\0') {
    temp = ((temp << 4) + key[i]) % 211;
    ++i;
  }
  return temp;
}


x86 assembly (clang, -O0):
<hashFunction>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1158 <hashFunction+0x58>
mov    -0xc(%rbp),%eax
shl    $0x4,%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
mov    $0xd3,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <hashFunction+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashFunction>:
mov    (%rdi),%cl
test   %cl,%cl
je     1142 <hashFunction+0x42>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
shl    $0x4,%eax
add    %ecx,%eax
cltq
imul   $0x4da637d,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
imul   $0xd3,%ecx,%ecx
sub    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hashFunction+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hashFunction(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %12, %4 ], [ 0, %1 ]
%6 = phi i8 [ %14, %4 ], [ %2, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = sext i8 %6 to i32
%9 = shl nsw i32 %7, 4
%10 = add nsw i32 %9, %8
%11 = srem i32 %10, 211
%12 = add nuw nsw i64 %5, 1
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %4, %1
%17 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ puts(char const *);
void write_console_log_entry(const char *message) { puts(message); }


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

x86 assembly (clang, -O2):
<write_console_log_entry>:
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
define void @write_console_log_entry(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
ret void
}
/* Variables and functions */
float floorf(float);
float __ocl_floor_float(float src) { return floorf(src); }


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

x86 assembly (clang, -O2):
<__ocl_floor_float>:
jmp    1030 <floorf@plt>

LLVM IR (-O0):
define float @__ocl_floor_float(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.floor.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @__ocl_floor_float(float %0) {
%2 = tail call float @llvm.floor.f32(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_CLR_UART_RXD1_PIN() { clear_io_bit(0x43, 2); }


x86 assembly (clang, -O0):
<TOSH_CLR_UART_RXD1_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x43,%edi
mov    $0x2,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_CLR_UART_RXD1_PIN>:
mov    $0x43,%edi
mov    $0x2,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_CLR_UART_RXD1_PIN() {
%1 = call i32 @clear_io_bit(i32 67, i32 2)
ret void
}

LLVM IR (-O2):
define void @TOSH_CLR_UART_RXD1_PIN() {
%1 = tail call i32 @clear_io_bit(i32 67, i32 2)
ret void
}
/* Variables and functions */
char *Info_ValueForKey(char *, char *);
char *UI_GetBotInfoByNumber(int);
char *UI_GetBotNameByNumber(int num) {
  char *info = UI_GetBotInfoByNumber(num);
  if (info) {
    return Info_ValueForKey(info, "name");
  }
  return "Sarge";
}


x86 assembly (clang, -O0):
<UI_GetBotNameByNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <UI_GetBotInfoByNumber@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     115b <UI_GetBotNameByNumber+0x3b>
mov    -0x18(%rbp),%rdi
lea    0xeb3(%rip),%rsi
call   1030 <Info_ValueForKey@plt>
mov    %rax,-0x8(%rbp)
jmp    1166 <UI_GetBotNameByNumber+0x46>
lea    0xea3(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UI_GetBotNameByNumber>:
push   %rax
call   1040 <UI_GetBotInfoByNumber@plt>
test   %rax,%rax
je     113b <UI_GetBotNameByNumber+0x1b>
lea    0xece(%rip),%rsi
mov    %rax,%rdi
pop    %rax
jmp    1030 <Info_ValueForKey@plt>
lea    0xec3(%rip),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"name\00"
@.str.1 = [6 x i8] c"Sarge\00"
define i8* @UI_GetBotNameByNumber(i32 %0) {
%2 = tail call i8* @UI_GetBotInfoByNumber(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i8* @Info_ValueForKey(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = phi i8* [ %5, %4 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), %1 ]
ret i8* %7
}
/* Variables and functions */
float sqrtf(float);
float bar(float x) { return 1.0f / sqrtf(x); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  0xece(%rip),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     111f <bar+0xf>
sqrtss %xmm0,%xmm0
jmp    1124 <bar+0x14>
call   1030 <sqrtf@plt>
movss  0xed4(%rip),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @bar(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @sqrtf(float %3)
%5 = fdiv float 1.000000e+00, %4
ret float %5
}

LLVM IR (-O2):
define float @bar(float %0) {
%2 = tail call float @sqrtf(float %0)
%3 = fdiv float 1.000000e+00, %2
ret float %3
}
/* Variables and functions */
int merge_2_uncompressFst(void *, unsigned int, unsigned int, unsigned int *,
                          unsigned int **);
int merge2(void *ail, unsigned int id1, unsigned int id2, unsigned int *noccs,
           unsigned int **occs) {
  return merge_2_uncompressFst(ail, id1, id2, noccs, occs);
}


x86 assembly (clang, -O0):
<merge2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
call   1030 <merge_2_uncompressFst@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge2>:
jmp    1030 <merge_2_uncompressFst@plt>

LLVM IR (-O0):
define i32 @merge2(i8* %0, i32 %1, i32 %2, i32* %3, i32** %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32**
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store i32** %4, i32*** %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32*, i32** %9
%15 = load i32**, i32*** %10
%16 = call i32 @merge_2_uncompressFst(i8* %11, i32 %12, i32 %13, i32* %14, i32** %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @merge2(i8* %0, i32 %1, i32 %2, i32* %3, i32** %4) {
%6 = tail call i32 @merge_2_uncompressFst(i8* %0, i32 %1, i32 %2, i32* %3, i32** %4)
ret i32 %6
}
int test_imm_0Bint64_lowword_reg(long long val) {
  return ((val) & (0x0B << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_0Bint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 11
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ lmrgev_(double *, double *, int *);
void clmrgev(double *para, double *xmom, int nmom) {
  lmrgev_(para, xmom, &nmom);
}


x86 assembly (clang, -O0):
<clmrgev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <lmrgev_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clmrgev>:
push   %rax
mov    %edx,0x4(%rsp)
lea    0x4(%rsp),%rdx
call   1030 <lmrgev_@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @clmrgev(double* %0, double* %1, i32 %2) {
%4 = alloca i32
store i32 %2, i32* %4
%5 = call i32 @lmrgev_(double* %0, double* %1, i32* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(unsigned int *, int /*<<< orphan*/, int);
void nn_bitset_zero(unsigned numbits, unsigned *bits) {
  memset(bits, 0, 4 * ((numbits + 31) / 32));
}


x86 assembly (clang, -O0):
<nn_bitset_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
add    $0x1f,%edx
shr    $0x5,%edx
shl    $0x2,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nn_bitset_zero>:
lea    0x1f(%rdi),%edx
shr    $0x3,%edx
and    $0xfffffffc,%edx
mov    %rsi,%rdi
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @nn_bitset_zero(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32, i32* %3
%7 = add i32 %6, 31
%8 = udiv i32 %7, 32
%9 = mul i32 4, %8
%10 = call i32 @memset(i32* %5, i32 0, i32 %9)
ret void
}

LLVM IR (-O2):
define void @nn_bitset_zero(i32 %0, i32* %1) {
%3 = add i32 %0, 31
%4 = lshr i32 %3, 3
%5 = and i32 %4, 536870908
%6 = tail call i32 @memset(i32* %1, i32 0, i32 %5)
ret void
}
/* Variables and functions */
int foo();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", foo());
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("\33[2J");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}