xunge/DecIR huggingface dataset:
/* Variables and functions */
char *base64_encode(char *, size_t, size_t *);
size_t strlen(char *);
char *b64c(char *str) {
  size_t rawtext_size = strlen(str);
  size_t output_length = 0;
  return base64_encode(str, rawtext_size, &output_length);
}


x86 assembly (clang, -O0):
<b64c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <base64_encode@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b64c>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1030 <strlen@plt>
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <base64_encode@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @b64c(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
store i64 %6, i64* %3
store i64 0, i64* %4
%7 = load i8*, i8** %2
%8 = load i64, i64* %3
%9 = call i8* @base64_encode(i8* %7, i64 %8, i64* %4)
ret i8* %9
}

LLVM IR (-O2):
define i8* @b64c(i8* %0) {
%2 = alloca i64
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%5 = call i8* @base64_encode(i8* %0, i64 %3, i64* %2)
ret i8* %5
}
/* Variables and functions */
unsigned long parse_num_blocks2(char const *, int);
unsigned long parse_num_blocks(const char *arg, int log_block_size) {
  return parse_num_blocks2(arg, log_block_size);
}


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

x86 assembly (clang, -O2):
<parse_num_blocks>:
jmp    1030 <parse_num_blocks2@plt>

LLVM IR (-O0):
define i64 @parse_num_blocks(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 i64 @parse_num_blocks2(i8* %5, i32 %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @parse_num_blocks(i8* %0, i32 %1) {
%3 = tail call i64 @parse_num_blocks2(i8* %0, i32 %1)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
unsigned int sleep(unsigned int secs) {
  int i;
  for (i = 0; i < secs; i++)
    usleep(1000000);
  return 0;
}


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1146 <sleep+0x36>
mov    $0xf4240,%edi
call   1030 <usleep@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <sleep+0x12>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
push   %rbx
test   %edi,%edi
je     112f <sleep+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0xf4240,%edi
call   1030 <usleep@plt>
add    $0xffffffff,%ebx
jne    1120 <sleep+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @sleep(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @usleep(i32 1000000)
%6 = add nuw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ getch();
int end_game() {
  getch();
  exit(endwin());
}


x86 assembly (clang, -O0):
<end_game>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getch@plt>
mov    $0x0,%al
call   1040 <endwin@plt>
mov    %eax,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<end_game>:
push   %rax
xor    %eax,%eax
call   1030 <getch@plt>
xor    %eax,%eax
call   1040 <endwin@plt>
mov    %eax,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @end_game() {
%1 = call i32 (...) @getch()
%2 = call i32 (...) @endwin()
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
define i32 @end_game() {
%1 = tail call i32 (...) @getch()
%2 = tail call i32 (...) @endwin()
%3 = tail call i32 @exit(i32 %2)
unreachable
}
void paging_init(void) {}


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

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

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

LLVM IR (-O2):
define void @paging_init() {
ret void
}
int successful_rtld_next_test(void) { return 42; }


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

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

LLVM IR (-O0):
define i32 @successful_rtld_next_test() {
ret i32 42
}

LLVM IR (-O2):
define i32 @successful_rtld_next_test() {
ret i32 42
}
void ScaleRowDown4Box_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown4Box_AVX2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ list_devices();
int main(int argc, char *argv[]) {
  list_devices();
  exit(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 <list_devices@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <list_devices@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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 (...) @list_devices()
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @list_devices()
%4 = tail call i32 @exit(i32 0)
unreachable
}
int main(void) {
  char *a = "hi";
  return (a[1] == 'i') ? 0 : 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    0xeee(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x69,%edx
cmove  %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"hi\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 105
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 0, i32 1
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int rd_uart_lsr();
int rd_uart_rbr();
int inbyte(void) {
  int lsr;
  do {
    lsr = rd_uart_lsr();
  } while ((lsr & (1 << 0)) == 0);
  return rd_uart_rbr();
}


x86 assembly (clang, -O0):
<inbyte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rd_uart_lsr@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1128 <inbyte+0x8>
mov    $0x0,%al
call   1040 <rd_uart_rbr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inbyte>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rd_uart_lsr@plt>
test   $0x1,%al
je     1130 <inbyte+0x10>
xor    %eax,%eax
pop    %rcx
jmp    1040 <rd_uart_rbr@plt>

LLVM IR (-O0):
define i32 @inbyte() {
%1 = alloca i32
br label %2
2: ; preds = %4, %0
%3 = call i32 (...) @rd_uart_lsr()
store i32 %3, i32* %1
br label %4
4: ; preds = %2
%5 = load i32, i32* %1
%6 = and i32 %5, 1
%7 = icmp eq i32 %6, 0
br i1 %7, label %2, label %8
8: ; preds = %4
%9 = call i32 (...) @rd_uart_rbr()
ret i32 %9
}

LLVM IR (-O2):
define i32 @inbyte() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @rd_uart_lsr()
%3 = and i32 %2, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
%6 = tail call i32 (...) @rd_uart_rbr()
ret i32 %6
}
/* Type definitions */
struct quat {
  int dummy;
};

/* Variables and functions */
float quat_dot(struct quat const *, struct quat const *);
float sqrtf(float);
float quat_len(const struct quat *q) {
  float dot_val = quat_dot(q, q);
  return (dot_val > 0.0f) ? sqrtf(dot_val) : 0.0f;
}


x86 assembly (clang, -O0):
<quat_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <quat_dot@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1163 <quat_len+0x43>
movss  -0xc(%rbp),%xmm0
call   1040 <sqrtf@plt>
movss  %xmm0,-0x10(%rbp)
jmp    1170 <quat_len+0x50>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1170 <quat_len+0x50>
movss  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quat_len>:
push   %rax
mov    %rdi,%rsi
call   1030 <quat_dot@plt>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1140 <quat_len+0x20>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1145 <quat_len+0x25>
xorps  %xmm1,%xmm1
sqrtss %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret
pop    %rax
jmp    1040 <sqrtf@plt>

LLVM IR (-O0):
%struct.quat = type { i32 }
define float @quat_len(%struct.quat* %0) {
%2 = alloca %struct.quat*
%3 = alloca float
store %struct.quat* %0, %struct.quat** %2
%4 = load %struct.quat*, %struct.quat** %2
%5 = load %struct.quat*, %struct.quat** %2
%6 = call float @quat_dot(%struct.quat* %4, %struct.quat* %5)
store float %6, float* %3
%7 = load float, float* %3
%8 = fcmp ogt float %7, 0.000000e+00
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load float, float* %3
%11 = call float @sqrtf(float %10)
br label %13
12: ; preds = %1
br label %13
13: ; preds = %12, %9
%14 = phi float [ %11, %9 ], [ 0.000000e+00, %12 ]
ret float %14
}

LLVM IR (-O2):
%struct.quat = type { i32 }
define float @quat_len(%struct.quat* %0) {
%2 = tail call float @quat_dot(%struct.quat* %0, %struct.quat* %0)
%3 = fcmp ogt float %2, 0.000000e+00
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call float @sqrtf(float %2)
br label %6
6: ; preds = %1, %4
%7 = phi float [ %5, %4 ], [ 0.000000e+00, %1 ]
ret float %7
}
int magnitude_of(v, answer)
float v[], *answer;
{
  double d, n;
  n = v[0] * v[0] + v[1] * v[1] + v[2] * v[2];
  d = sqrt(n);
  *answer = d;
  return (1);
}


x86 assembly (clang, -O0):
<magnitude_of>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<magnitude_of>:
push   %rbx
mov    %rsi,%rbx
movss  (%rdi),%xmm1
movss  0x4(%rdi),%xmm0
mulss  %xmm0,%xmm0
mulss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm0
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1144 <magnitude_of+0x34>
sqrtss %xmm0,%xmm0
jmp    1149 <magnitude_of+0x39>
call   1030 <sqrtf@plt>
movss  %xmm0,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @magnitude_of(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca double
%6 = alloca double
store float* %0, float** %3
store float* %1, float** %4
%7 = load float*, float** %3
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %3
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = load float*, float** %3
%14 = getelementptr inbounds float, float* %13, i64 1
%15 = load float, float* %14
%16 = load float*, float** %3
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = fmul float %15, %18
%20 = call float @llvm.fmuladd.f32(float %9, float %12, float %19)
%21 = load float*, float** %3
%22 = getelementptr inbounds float, float* %21, i64 2
%23 = load float, float* %22
%24 = load float*, float** %3
%25 = getelementptr inbounds float, float* %24, i64 2
%26 = load float, float* %25
%27 = call float @llvm.fmuladd.f32(float %23, float %26, float %20)
%28 = fpext float %27 to double
store double %28, double* %6
%29 = load double, double* %6
%30 = call double @sqrt(double %29)
store double %30, double* %5
%31 = load double, double* %5
%32 = fptrunc double %31 to float
%33 = load float*, float** %4
store float %32, float* %33
ret i32 1
}

LLVM IR (-O2):
define i32 @magnitude_of(float* nocapture %0, float* nocapture writeonly %1) {
%3 = load float, float* %0
%4 = getelementptr inbounds float, float* %0, i64 1
%5 = load float, float* %4
%6 = fmul float %5, %5
%7 = tail call float @llvm.fmuladd.f32(float %3, float %3, float %6)
%8 = getelementptr inbounds float, float* %0, i64 2
%9 = load float, float* %8
%10 = tail call float @llvm.fmuladd.f32(float %9, float %9, float %7)
%11 = tail call float @sqrtf(float %10)
store float %11, float* %1
ret i32 1
}
/* Variables and functions */
void *i(size_t);
void *j2(size_t n) { return i(n); }


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

x86 assembly (clang, -O2):
<j2>:
jmp    1030 <i@plt>

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

LLVM IR (-O2):
define i8* @j2(i64 %0) {
%2 = tail call i8* @i(i64 %0)
ret i8* %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ drawM(int, int);
int /*<<< orphan*/ drawT(int, int);
void drawMark(uint32_t row, uint32_t column, uint32_t player) {
  if (player == 1) {
    drawM(row, column);
  } else if (player == 2) {
    drawT(row, column);
  }
}


x86 assembly (clang, -O0):
<drawMark>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    114b <drawMark+0x2b>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <drawM@plt>
jmp    1165 <drawMark+0x45>
cmpl   $0x2,-0xc(%rbp)
jne    1160 <drawMark+0x40>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <drawT@plt>
jmp    1165 <drawMark+0x45>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawMark>:
cmp    $0x2,%edx
je     112f <drawMark+0xf>
cmp    $0x1,%edx
jne    1134 <drawMark+0x14>
jmp    1030 <drawM@plt>
jmp    1040 <drawT@plt>
ret

LLVM IR (-O0):
define void @drawMark(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = call i32 @drawM(i32 %10, i32 %11)
br label %21
13: ; preds = %3
%14 = load i32, i32* %6
%15 = icmp eq i32 %14, 2
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = call i32 @drawT(i32 %17, i32 %18)
br label %20
20: ; preds = %16, %13
br label %21
21: ; preds = %20, %9
ret void
}

LLVM IR (-O2):
define void @drawMark(i32 %0, i32 %1, i32 %2) {
switch i32 %2, label %8 [
i32 1, label %4
i32 2, label %6
]
4: ; preds = %3
%5 = tail call i32 @drawM(i32 %0, i32 %1)
br label %8
6: ; preds = %3
%7 = tail call i32 @drawT(i32 %0, i32 %1)
br label %8
8: ; preds = %3, %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_exit();
int main(int argc, char **argv) {
  do_exit();
  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 <do_exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <do_exit@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 (...) @do_exit()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @do_exit()
ret i32 0
}
/* Type definitions */
struct sty {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ foo(struct sty *);
int bar(struct sty *u) {
  foo((u));
  return 0;
}


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

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

LLVM IR (-O0):
%struct.sty = type { i32 }
define i32 @bar(%struct.sty* %0) {
%2 = alloca %struct.sty*
store %struct.sty* %0, %struct.sty** %2
%3 = load %struct.sty*, %struct.sty** %2
%4 = call i32 @foo(%struct.sty* %3)
ret i32 0
}

LLVM IR (-O2):
%struct.sty = type { i32 }
define i32 @bar(%struct.sty* %0) {
%2 = tail call i32 @foo(%struct.sty* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int print_two(char *s) {
  printf(s);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @print_two(i8* nocapture %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ PRINT_LOG_FREE(char *, char *);
void PRINT_ERR_FREE(char *y) { PRINT_LOG_FREE("ERR ", y); }


x86 assembly (clang, -O0):
<PRINT_ERR_FREE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <PRINT_LOG_FREE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PRINT_ERR_FREE>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <PRINT_LOG_FREE@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"ERR \00"
define void @PRINT_ERR_FREE(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @PRINT_LOG_FREE(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"ERR \00"
define void @PRINT_ERR_FREE(i8* %0) {
%2 = tail call i32 @PRINT_LOG_FREE(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int ft_isgraph(int c) { return (' ' < c && c <= '~'); }


x86 assembly (clang, -O0):
<ft_isgraph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x20,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jge    1124 <ft_isgraph+0x24>
cmpl   $0x7e,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isgraph>:
add    $0xffffffdf,%edi
xor    %eax,%eax
cmp    $0x5e,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @ft_isgraph(i32 %0) {
%2 = add i32 %0, -33
%3 = icmp ult i32 %2, 94
%4 = zext i1 %3 to i32
ret i32 %4
}
struct typeEnv *NewEnv(void) {
  return (0);
}


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

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

LLVM IR (-O0):
%struct.typeEnv = type opaque
define %struct.typeEnv* @NewEnv() {
ret %struct.typeEnv* null
}

LLVM IR (-O2):
%struct.typeEnv = type opaque
define noalias %struct.typeEnv* @NewEnv() {
ret %struct.typeEnv* null
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ z_ms_day_sprint(struct timeval *, char *);
void z_now_ms_day_sprint(char *buf) {
  struct timeval t;
  gettimeofday(&t, NULL);
  z_ms_day_sprint(&t, buf);
}


x86 assembly (clang, -O0):
<z_now_ms_day_sprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdi
call   1040 <z_ms_day_sprint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<z_now_ms_day_sprint>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <z_ms_day_sprint@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define void @z_now_ms_day_sprint(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.timeval
store i8* %0, i8** %2
%4 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
%5 = load i8*, i8** %2
%6 = call i32 @z_ms_day_sprint(%struct.timeval* %3, i8* %5)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define void @z_now_ms_day_sprint(i8* %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%5 = call i32 @z_ms_day_sprint(%struct.timeval* %2, i8* %0)
ret void
}
int do_117() { return 117; }


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

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

LLVM IR (-O0):
define i32 @do_117() {
ret i32 117
}

LLVM IR (-O2):
define i32 @do_117() {
ret i32 117
}
_Noreturn int main() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int modifica(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char frase[101] = "A casa esta cheia.";
  int cont = modifica(frase);
  printf("Foram modificados %d caracteres 'a' por 'b'. ", cont);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xeb3(%rip),%rsi
mov    $0x65,%edx
call   1050 <memcpy@plt>
lea    -0x70(%rbp),%rdi
call   1030 <modifica@plt>
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%esi
lea    0xef8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
movaps 0xf25(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xf09(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeed(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeb5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe99(%rip),%xmm0
movaps %xmm0,(%rsp)
movq   $0x0,0x5d(%rsp)
mov    %rsp,%rdi
call   1030 <modifica@plt>
lea    0xee2(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
ret

LLVM IR (-O0):
@__const.main.frase = [101 x i8] c"A casa esta cheia.\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [46 x i8] c"Foram modificados %d caracteres 'a' por 'b'. \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [101 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [101 x i8]* %2 to i8*
%5 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%6 = call i32 @modifica(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.frase = [101 x i8] c"A casa esta cheia.\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [46 x i8] c"Foram modificados %d caracteres 'a' por 'b'. \00"
define i32 @main() {
%1 = alloca [101 x i8]
%2 = getelementptr inbounds [101 x i8], [101 x i8]* %1, i64 0, i64 0
%3 = call i32 @modifica(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_bswap32(int);
int /*<<< orphan*/ test_bswap64(int);
int main() {
  test_bswap32(0x01020304);
  test_bswap64(0x0102030405060708ULL);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1020304,%edi
call   1030 <test_bswap32@plt>
mov    $0x5060708,%edi
call   1040 <test_bswap64@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @test_bswap32(i32 16909060)
%2 = call i32 @test_bswap64(i32 84281096)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test_bswap32(i32 16909060)
%2 = tail call i32 @test_bswap64(i32 84281096)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ chk_err(char *);
void chkparam() {
  if ((4 != 2) && (4 != 4))
    chk_err("chkparam: Width parameter is illegal.");
  if ((4 == 2) && (0x04C11DB7L & 0xFFFF0000L))
    chk_err("chkparam: Poly parameter is too wide.");
  if ((1 != 0) && (1 != 1))
    chk_err("chkparam: Reverse parameter is not boolean.");
}


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

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

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

LLVM IR (-O2):
define void @chkparam() {
ret void
}
int smallest(int num1, int num2, int num3, int num4, int num5) {
  int smallest = num1;
  if (num2 < smallest)
    smallest = num2;
  if (num3 < smallest)
    smallest = num3;
  if (num4 < smallest)
    smallest = num4;
  if (num5 < smallest)
    smallest = num5;
  return smallest;
}


x86 assembly (clang, -O0):
<smallest>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    112c <smallest+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    113e <smallest+0x3e>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1150 <smallest+0x50>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1162 <smallest+0x62>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<smallest>:
mov    %edi,%eax
cmp    %edi,%esi
cmovl  %esi,%eax
cmp    %edx,%eax
cmovg  %edx,%eax
cmp    %ecx,%eax
cmovg  %ecx,%eax
cmp    %r8d,%eax
cmovg  %r8d,%eax
ret

LLVM IR (-O0):
define i32 @smallest(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i32, i32* %6
store i32 %12, i32* %11
%13 = load i32, i32* %7
%14 = load i32, i32* %11
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %5
%17 = load i32, i32* %7
store i32 %17, i32* %11
br label %18
18: ; preds = %16, %5
%19 = load i32, i32* %8
%20 = load i32, i32* %11
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = load i32, i32* %8
store i32 %23, i32* %11
br label %24
24: ; preds = %22, %18
%25 = load i32, i32* %9
%26 = load i32, i32* %11
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = load i32, i32* %9
store i32 %29, i32* %11
br label %30
30: ; preds = %28, %24
%31 = load i32, i32* %10
%32 = load i32, i32* %11
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %36
34: ; preds = %30
%35 = load i32, i32* %10
store i32 %35, i32* %11
br label %36
36: ; preds = %34, %30
%37 = load i32, i32* %11
ret i32 %37
}

LLVM IR (-O2):
define i32 @smallest(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = icmp slt i32 %1, %0
%7 = select i1 %6, i32 %1, i32 %0
%8 = icmp sgt i32 %7, %2
%9 = select i1 %8, i32 %2, i32 %7
%10 = icmp sgt i32 %9, %3
%11 = select i1 %10, i32 %3, i32 %9
%12 = icmp sgt i32 %11, %4
%13 = select i1 %12, i32 %4, i32 %11
ret i32 %13
}
int test_imm_F3uint32_mem(unsigned int *val) {
  return ((*val) & (0xF3 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_F3uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 243
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ ft_bzero(void *, size_t);
void *malloc(size_t);
void *ft_memalloc(size_t size) {
  void *mem;
  if (!(mem = malloc(size)))
    return (NULL);
  ft_bzero(mem, size);
  return (mem);
}


x86 assembly (clang, -O0):
<ft_memalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1150 <ft_memalloc+0x30>
movq   $0x0,-0x8(%rbp)
jmp    1165 <ft_memalloc+0x45>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ft_bzero@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     113f <ft_memalloc+0x1f>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <ft_bzero@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @ft_memalloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %9, label %8
8: ; preds = %1
store i8* null, i8** %2
br label %14
9: ; preds = %1
%10 = load i8*, i8** %4
%11 = load i64, i64* %3
%12 = call i32 @ft_bzero(i8* %10, i64 %11)
%13 = load i8*, i8** %4
store i8* %13, i8** %2
br label %14
14: ; preds = %9, %8
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
define i8* @ft_memalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @ft_bzero(i8* %2, i64 %0)
br label %6
6: ; preds = %1, %4
ret i8* %2
}
/* Variables and functions */
char *libgamma_behex_edid_lowercase(unsigned char const *, size_t);
__attribute__((__warn_unused_result__, __access__(__read_only__, 1, 2))) char *
libgamma_behex_edid(const unsigned char *restrict edid__, size_t length__) {
  return libgamma_behex_edid_lowercase(edid__, length__);
}


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

x86 assembly (clang, -O2):
<libgamma_behex_edid>:
jmp    1030 <libgamma_behex_edid_lowercase@plt>

LLVM IR (-O0):
define i8* @libgamma_behex_edid(i8* noalias %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 = load i64, i64* %4
%7 = call i8* @libgamma_behex_edid_lowercase(i8* %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @libgamma_behex_edid(i8* noalias %0, i64 %1) {
%3 = tail call i8* @libgamma_behex_edid_lowercase(i8* %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print(float X) {
  printf("%f\n", X * 2147483647);
  printf("%x\n", (int)(unsigned long long)(X * 2147483647));
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xed6(%rip),%xmm1
movss  %xmm1,-0x8(%rbp)
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
mulss  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttss2si %xmm1,%rax
mov    %rax,%rdx
sar    $0x3f,%rdx
movss  0xe9c(%rip),%xmm1
subss  %xmm1,%xmm0
cvttss2si %xmm0,%rcx
and    %rdx,%rcx
or     %rcx,%rax
mov    %eax,%esi
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
sub    $0x18,%rsp
mulss  0xee4(%rip),%xmm0
movaps %xmm0,(%rsp)
cvttss2si %xmm0,%esi
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
movaps (%rsp),%xmm0
cvttss2si %xmm0,%rsi
mov    %rsi,%rax
subss  0xec0(%rip),%xmm0
cvttss2si %xmm0,%rcx
sar    $0x3f,%rax
and    %eax,%ecx
or     %ecx,%esi
lea    0xeb4(%rip),%rdi
add    $0x18,%rsp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
@.str.1 = [4 x i8] c"%x\0A\00"
define void @print(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x41E0000000000000
%5 = fptosi float %4 to i32
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load float, float* %2
%8 = fmul float %7, 0x41E0000000000000
%9 = fptoui float %8 to i64
%10 = trunc i64 %9 to i32
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
@.str.1 = [4 x i8] c"%x\0A\00"
define void @print(float %0) {
%2 = fmul float %0, 0x41E0000000000000
%3 = fptosi float %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = fptoui float %2 to i64
%6 = trunc i64 %5 to i32
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ float_to_bits(float);
int /*<<< orphan*/ fputc(int /*<<< orphan*/, unsigned int);
void fput_float(float d, unsigned handle) { fputc(float_to_bits(d), handle); }


x86 assembly (clang, -O0):
<fput_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <float_to_bits@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%esi
call   1030 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fput_float>:
push   %rbx
mov    %edi,%ebx
call   1040 <float_to_bits@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define void @fput_float(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
store float %0, float* %3
store i32 %1, i32* %4
%5 = load float, float* %3
%6 = call i32 @float_to_bits(float %5)
%7 = load i32, i32* %4
%8 = call i32 @fputc(i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
define void @fput_float(float %0, i32 %1) {
%3 = tail call i32 @float_to_bits(float %0)
%4 = tail call i32 @fputc(i32 %3, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_array(int a[], int cnt) {
  int i;
  for (i = 0; i < cnt; i++)
    printf(" %d", a[i]);
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <print_array+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <print_array+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_array+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c" %d\00"
define void @print_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
void SPI1_EnableTxInt(void) {}


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

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

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

LLVM IR (-O2):
define void @SPI1_EnableTxInt() {
ret void
}
int a() { return 4; }


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

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

LLVM IR (-O0):
define i32 @a() {
ret i32 4
}

LLVM IR (-O2):
define i32 @a() {
ret i32 4
}
void gensra() {}


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

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

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

LLVM IR (-O2):
define void @gensra() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void prints(char *s) {
  char c;
  while ((c = *s)) {
    putchar(c);
    s++;
  }
}


x86 assembly (clang, -O0):
<prints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
cmp    $0x0,%al
je     1147 <prints+0x37>
movsbl -0x9(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <prints+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prints>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <prints+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <prints+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @prints(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
br label %4
4: ; preds = %8, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
store i8 %6, i8* %3
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = load i8, i8* %3
%10 = call i32 @putchar(i8 signext %9)
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @prints(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @putchar(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double time_double(void) {
  double result;
  struct timeval tv;
  gettimeofday(&tv, NULL);
  result = tv.tv_sec;
  result += (double)tv.tv_usec / 1000000;
  return result;
}


x86 assembly (clang, -O0):
<time_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  0xec3(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_double>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm0
divsd  0xed1(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i64 }
define double @time_double() {
%1 = alloca double
%2 = alloca %struct.timeval
%3 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%5 = load double, double* %4
store double %5, double* %1
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = fdiv double %8, 1.000000e+06
%10 = load double, double* %1
%11 = fadd double %10, %9
store double %11, double* %1
%12 = load double, double* %1
ret double %12
}

LLVM IR (-O2):
%struct.timeval = type { double, i64 }
define double @time_double() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = fdiv double %8, 1.000000e+06
%10 = fadd double %5, %9
ret double %10
}
/* Variables and functions */
size_t mi(size_t row, size_t column, size_t row_length) {
  return row * row_length + column;
}


x86 assembly (clang, -O0):
<mi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x18(%rbp),%rax
add    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mi>:
imul   %rdx,%rdi
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i64 @mi(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = load i64, i64* %6
%9 = mul i64 %7, %8
%10 = load i64, i64* %5
%11 = add i64 %9, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @mi(i64 %0, i64 %1, i64 %2) {
%4 = mul i64 %2, %0
%5 = add i64 %4, %1
ret i64 %5
}
/* Variables and functions */
float acos(int /*<<< orphan*/);
int /*<<< orphan*/ glmDotProduct4f(float const *, float const *);
float glmComputeNormalizedVectorAngle4fRad(const float v1[4],
                                           const float v2[4]) {
  return acos(glmDotProduct4f(v1, v2));
}


x86 assembly (clang, -O0):
<glmComputeNormalizedVectorAngle4fRad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <glmDotProduct4f@plt>
mov    %eax,%edi
call   1040 <acos@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @glmComputeNormalizedVectorAngle4fRad(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float*, float** %4
%7 = call i32 @glmDotProduct4f(float* %5, float* %6)
%8 = call float @acos(i32 %7)
ret float %8
}

LLVM IR (-O2):
define float @glmComputeNormalizedVectorAngle4fRad(float* %0, float* %1) {
%3 = tail call i32 @glmDotProduct4f(float* %0, float* %1)
%4 = tail call float @acos(i32 %3)
ret float %4
}
void caller_1_1_2_1_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @caller_1_1_2_1_1_2_2() {
ret void
}
/* Variables and functions */
scalar_t__ time(int /*<<< orphan*/ *);
int get_time_s() { return (int)time(NULL); }


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

x86 assembly (clang, -O2):
<get_time_s>:
xor    %edi,%edi
jmp    1030 <time@plt>

LLVM IR (-O0):
define i32 @get_time_s() {
%1 = call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @get_time_s() {
%1 = tail call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
ret i32 %2
}