xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free_diag_hash();
void free_seed_hit_search(void) { free_diag_hash(); }


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

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

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

LLVM IR (-O2):
define void @free_seed_hit_search() {
%1 = tail call i32 (...) @free_diag_hash()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CL_ClearMemory();
int /*<<< orphan*/ CL_ShutdownAll();
int /*<<< orphan*/ CL_StartHunkUsers();
void CL_FlushMemory(void) {
  CL_ShutdownAll();
  CL_ClearMemory();
  CL_StartHunkUsers();
}


x86 assembly (clang, -O0):
<CL_FlushMemory>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <CL_ShutdownAll@plt>
mov    $0x0,%al
call   1050 <CL_ClearMemory@plt>
mov    $0x0,%al
call   1040 <CL_StartHunkUsers@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CL_FlushMemory>:
push   %rax
xor    %eax,%eax
call   1030 <CL_ShutdownAll@plt>
xor    %eax,%eax
call   1050 <CL_ClearMemory@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <CL_StartHunkUsers@plt>

LLVM IR (-O0):
define void @CL_FlushMemory() {
%1 = call i32 (...) @CL_ShutdownAll()
%2 = call i32 (...) @CL_ClearMemory()
%3 = call i32 (...) @CL_StartHunkUsers()
ret void
}

LLVM IR (-O2):
define void @CL_FlushMemory() {
%1 = tail call i32 (...) @CL_ShutdownAll()
%2 = tail call i32 (...) @CL_ClearMemory()
%3 = tail call i32 (...) @CL_StartHunkUsers()
ret void
}
float new_float(void) { return 0.; }


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

x86 assembly (clang, -O2):
<new_float>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @new_float() {
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @new_float() {
ret float 0.000000e+00
}
int and (int a, int b) {
  if (a && b) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<and>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112a <and+0x2a>
cmpl   $0x0,-0xc(%rbp)
je     112a <and+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <and+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<and>:
test   %edi,%edi
setne  %al
test   %esi,%esi
setne  %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @and(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp ne i32 %1, 0
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
char *_xtoa(unsigned long, char *, int, int);
char *stdimpl_lltoa(long long v, char *string, int r) {
  if ((r == 10) && (v < 0)) {
    return _xtoa((unsigned long)(-v), string, r, 1);
  }
  return _xtoa((unsigned long)(v), string, r, 0);
}


x86 assembly (clang, -O0):
<stdimpl_lltoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0xa,-0x1c(%rbp)
jne    115a <stdimpl_lltoa+0x4a>
cmpq   $0x0,-0x10(%rbp)
jge    115a <stdimpl_lltoa+0x4a>
xor    %eax,%eax
mov    %eax,%edi
sub    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    $0x1,%ecx
call   1030 <_xtoa@plt>
mov    %rax,-0x8(%rbp)
jmp    1170 <stdimpl_lltoa+0x60>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
xor    %ecx,%ecx
call   1030 <_xtoa@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdimpl_lltoa>:
test   %rdi,%rdi
jns    112c <stdimpl_lltoa+0x1c>
cmp    $0xa,%edx
jne    112c <stdimpl_lltoa+0x1c>
neg    %rdi
mov    $0xa,%edx
mov    $0x1,%ecx
jmp    1030 <_xtoa@plt>
xor    %ecx,%ecx
jmp    1030 <_xtoa@plt>

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

LLVM IR (-O2):
define i8* @stdimpl_lltoa(i64 %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %2, 10
%5 = icmp slt i64 %0, 0
%6 = and i1 %5, %4
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = sub nsw i64 0, %0
%9 = tail call i8* @_xtoa(i64 %8, i8* %1, i32 10, i32 1)
br label %12
10: ; preds = %3
%11 = tail call i8* @_xtoa(i64 %0, i8* %1, i32 %2, i32 0)
br label %12
12: ; preds = %10, %7
%13 = phi i8* [ %9, %7 ], [ %11, %10 ]
ret i8* %13
}
/* Variables and functions */
bool bool_return_true() { return true; }


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

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

LLVM IR (-O0):
define i32 @bool_return_true() {
ret i32 1
}

LLVM IR (-O2):
define i32 @bool_return_true() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void panning_free(void *data) { free(data); }


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

x86 assembly (clang, -O2):
<panning_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @panning_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
scalar_t__ __mm_addr_mod(int /*<<< orphan*/ *, int);
uint8_t mm_is_pgaligned(uint8_t *addr) {
  return (uint8_t)(__mm_addr_mod(addr, 4096) == 0);
}


x86 assembly (clang, -O0):
<mm_is_pgaligned>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1000,%esi
call   1030 <__mm_addr_mod@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mm_is_pgaligned>:
push   %rax
mov    $0x1000,%esi
call   1030 <__mm_addr_mod@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mm_is_pgaligned(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @__mm_addr_mod(i32* %3, i32 4096)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @mm_is_pgaligned(i32* %0) {
%2 = tail call i64 @__mm_addr_mod(i32* %0, i32 4096)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int main(int argc, char **argv) {
  ((__attribute__((unit(foo))) float)1.0f) + 1.0f;
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
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
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ msgqueue_sendstring(char *);
int /*<<< orphan*/ sprintf(char *, char *, int, int, int, int);
void ResizeGraphic(int x, int y, int width, int height) {
  static char buffer[56];
  sprintf(buffer, "7 %d %d %d %d", x, y, width, height);
  msgqueue_sendstring(buffer);
  return;
}


x86 assembly (clang, -O0):
<ResizeGraphic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    -0x10(%rbp),%r9d
lea    0x2ef7(%rip),%rdi
lea    0xeb0(%rip),%rsi
call   1040 <sprintf@plt>
lea    0x2ee4(%rip),%rdi
call   1030 <msgqueue_sendstring@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ResizeGraphic>:
push   %rbx
mov    %ecx,%r9d
mov    %edx,%r8d
mov    %esi,%ecx
mov    %edi,%edx
lea    0x2f0e(%rip),%rbx
lea    0xec7(%rip),%rsi
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <msgqueue_sendstring@plt>

LLVM IR (-O0):
@ResizeGraphic.buffer = internal global [56 x i8] zeroinitializer
@.str = [14 x i8] c"7 %d %d %d %d\00"
define void @ResizeGraphic(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @sprintf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @ResizeGraphic.buffer, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11, i32 %12)
%14 = call i32 @msgqueue_sendstring(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @ResizeGraphic.buffer, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@ResizeGraphic.buffer = internal global [56 x i8] zeroinitializer
@.str = [14 x i8] c"7 %d %d %d %d\00"
define void @ResizeGraphic(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @ResizeGraphic.buffer, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3)
%6 = tail call i32 @msgqueue_sendstring(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @ResizeGraphic.buffer, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef char *uint32_t;

/* Variables and functions */
uint32_t cpuid(uint32_t level) {
  uint32_t eax, ebx, ecx, edx;
  asm("cpuid" : "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx) : "a"(level));
  return (ecx);
}


x86 assembly (clang, -O0):
<cpuid>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cpuid
mov    %rax,-0x18(%rbp)
mov    %rbx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid>:
push   %rbx
mov    %rdi,%rax
cpuid
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @cpuid(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %2
%7 = load i8*, i8** %2
%8 = call { i8*, i8*, i8*, i8* } asm "cpuid", "={ax},={bx},={cx},={dx},{ax},~{dirflag},~{fpsr},~{flags}"(i8* %7)
%9 = extractvalue { i8*, i8*, i8*, i8* } %8, 0
%10 = extractvalue { i8*, i8*, i8*, i8* } %8, 1
%11 = extractvalue { i8*, i8*, i8*, i8* } %8, 2
%12 = extractvalue { i8*, i8*, i8*, i8* } %8, 3
store i8* %9, i8** %3
store i8* %10, i8** %4
store i8* %11, i8** %5
store i8* %12, i8** %6
%13 = load i8*, i8** %5
ret i8* %13
}

LLVM IR (-O2):
define i8* @cpuid(i8* %0) {
%2 = tail call { i8*, i8*, i8*, i8* } asm "cpuid", "={ax},={bx},={cx},={dx},{ax},~{dirflag},~{fpsr},~{flags}"(i8* %0)
%3 = extractvalue { i8*, i8*, i8*, i8* } %2, 2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ acos(int);
int glmComputeVectorLength3f(float const *);
float glmDegf(int /*<<< orphan*/);
int glmDotProduct3f(float const *, float const *);
float glmComputeVectorAngle3fDeg(const float v1[3], const float v2[3]) {
  return glmDegf(
      acos(glmDotProduct3f(v1, v2) /
           (glmComputeVectorLength3f(v1) * glmComputeVectorLength3f(v2))));
}


x86 assembly (clang, -O0):
<glmComputeVectorAngle3fDeg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <glmDotProduct3f@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <glmComputeVectorLength3f@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <glmComputeVectorLength3f@plt>
mov    -0x18(%rbp),%ecx
mov    %eax,%edx
mov    -0x14(%rbp),%eax
imul   %edx,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <acos@plt>
mov    %eax,%edi
call   1060 <glmDegf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmComputeVectorAngle3fDeg>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <glmDotProduct3f@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <glmComputeVectorLength3f@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   1030 <glmComputeVectorLength3f@plt>
mov    %eax,%ecx
imul   %ebx,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <acos@plt>
mov    %eax,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1060 <glmDegf@plt>

LLVM IR (-O0):
define float @glmComputeVectorAngle3fDeg(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 @glmDotProduct3f(float* %5, float* %6)
%8 = load float*, float** %3
%9 = call i32 @glmComputeVectorLength3f(float* %8)
%10 = load float*, float** %4
%11 = call i32 @glmComputeVectorLength3f(float* %10)
%12 = mul nsw i32 %9, %11
%13 = sdiv i32 %7, %12
%14 = call i32 @acos(i32 %13)
%15 = call float @glmDegf(i32 %14)
ret float %15
}

LLVM IR (-O2):
define float @glmComputeVectorAngle3fDeg(float* %0, float* %1) {
%3 = tail call i32 @glmDotProduct3f(float* %0, float* %1)
%4 = tail call i32 @glmComputeVectorLength3f(float* %0)
%5 = tail call i32 @glmComputeVectorLength3f(float* %1)
%6 = mul nsw i32 %5, %4
%7 = sdiv i32 %3, %6
%8 = tail call i32 @acos(i32 %7)
%9 = tail call float @glmDegf(i32 %8)
ret float %9
}
void foo556(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo556(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ println(int, int, char *);
int printSp(int start, int line, int num, char *str) {
  int i;
  for (i = line; i < line + num; i++) {
    println(start, i, str);
  }
  return num;
}


x86 assembly (clang, -O0):
<printSp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    1159 <printSp+0x49>
mov    -0x4(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <println@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112b <printSp+0x1b>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printSp>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%r14d
test   %edx,%edx
jle    1144 <printSp+0x34>
mov    %rcx,%r15
mov    %esi,%ebx
mov    %edi,%r12d
lea    (%r14,%rbx,1),%ebp
nopl   0x0(%rax,%rax,1)
mov    %r12d,%edi
mov    %ebx,%esi
mov    %r15,%rdx
call   1030 <println@plt>
add    $0x1,%ebx
cmp    %ebp,%ebx
jl     1130 <printSp+0x20>
mov    %r14d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @printSp(i32 %0, i32 %1, i32 returned %2, i8* %3) {
%5 = add nsw i32 %2, %1
%6 = icmp sgt i32 %2, 0
br i1 %6, label %7, label %12
7: ; preds = %4, %7
%8 = phi i32 [ %10, %7 ], [ %1, %4 ]
%9 = tail call i32 @println(i32 %0, i32 %8, i8* %3)
%10 = add nsw i32 %8, 1
%11 = icmp slt i32 %10, %5
br i1 %11, label %7, label %12
12: ; preds = %7, %4
ret i32 %2
}
/* Variables and functions */
char *ft_strcpy(char *dest, const char *src) {
  size_t index;
  index = 0;
  while (src[index]) {
    dest[index] = src[index];
    index++;
  }
  dest[index] = '\0';
  return (dest);
}


x86 assembly (clang, -O0):
<ft_strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     114d <ft_strcpy+0x4d>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <ft_strcpy+0x14>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strcpy>:
mov    %rdi,%rax
mov    (%rsi),%dl
xor    %ecx,%ecx
test   %dl,%dl
je     1120 <ft_strcpy+0x20>
nopl   0x0(%rax,%rax,1)
mov    %dl,(%rax,%rcx,1)
movzbl 0x1(%rsi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <ft_strcpy+0x10>
movb   $0x0,(%rax,%rcx,1)
ret

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

LLVM IR (-O2):
define i8* @ft_strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i64 [ %9, %5 ], [ 0, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 %6, i8* %8
%9 = add i64 %7, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i64 [ 0, %2 ], [ %9, %5 ]
%15 = getelementptr inbounds i8, i8* %0, i64 %14
store i8 0, i8* %15
ret i8* %0
}
void rfs_ungetc(unsigned char c __attribute__((unused)), unsigned char **p) {
  *p = *p - 1;
}


x86 assembly (clang, -O0):
<rfs_ungetc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0xffffffffffffffff,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rfs_ungetc>:
addq   $0xffffffffffffffff,(%rsi)
ret

LLVM IR (-O0):
define void @rfs_ungetc(i8 zeroext %0, i8** %1) {
%3 = alloca i8
%4 = alloca i8**
store i8 %0, i8* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8, i8* %6, i64 -1
%8 = load i8**, i8*** %4
store i8* %7, i8** %8
ret void
}

LLVM IR (-O2):
define void @rfs_ungetc(i8 zeroext %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = getelementptr inbounds i8, i8* %3, i64 -1
store i8* %4, i8** %1
ret void
}
/* Type definitions */
struct _Unwind_Exception {
  int dummy;
};
struct _Unwind_Context {
  int dummy;
};
typedef int /*<<< orphan*/ _Unwind_Reason_Code;
typedef int /*<<< orphan*/ _Unwind_Exception_Class;
typedef int /*<<< orphan*/ _Unwind_Action;

/* Variables and functions */
int /*<<< orphan*/ abort();
_Unwind_Reason_Code __gcc_personality_v0(
    int version __attribute__((unused)),
    _Unwind_Action actions __attribute__((unused)),
    _Unwind_Exception_Class exception_class __attribute__((unused)),
    struct _Unwind_Exception *ue_header __attribute__((unused)),
    struct _Unwind_Context *context __attribute__((unused))) {
  abort();
}


x86 assembly (clang, -O0):
<__gcc_personality_v0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<__gcc_personality_v0>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%struct._Unwind_Exception = type { i32 }
%struct._Unwind_Context = type { i32 }
define i32 @__gcc_personality_v0(i32 %0, i32 %1, i32 %2, %struct._Unwind_Exception* %3, %struct._Unwind_Context* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca %struct._Unwind_Exception*
%10 = alloca %struct._Unwind_Context*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store %struct._Unwind_Exception* %3, %struct._Unwind_Exception** %9
store %struct._Unwind_Context* %4, %struct._Unwind_Context** %10
%11 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
%struct._Unwind_Exception = type { i32 }
%struct._Unwind_Context = type { i32 }
define i32 @__gcc_personality_v0(i32 %0, i32 %1, i32 %2, %struct._Unwind_Exception* nocapture readnone %3, %struct._Unwind_Context* nocapture readnone %4) {
%6 = tail call i32 (...) @abort()
unreachable
}
char ______dummy1_() {
  extern int ______setjmp();
  extern int _______setjmp();
  extern int ______sigsetjmp();
}


x86 assembly (clang, -O0):
<______dummy1_>:
push   %rbp
mov    %rsp,%rbp
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @______dummy1_() {
%1 = alloca i8
%2 = load i8, i8* %1
ret i8 %2
}

LLVM IR (-O2):
define signext i8 @______dummy1_() {
ret i8 undef
}
int pico_is_hex(char c) {
  if (c >= '0' && c <= '9')
    return 1;
  if (c >= 'a' && c <= 'f')
    return 1;
  if (c >= 'A' && c <= 'F')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<pico_is_hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1130 <pico_is_hex+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1130 <pico_is_hex+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1183 <pico_is_hex+0x83>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1156 <pico_is_hex+0x56>
movsbl -0x5(%rbp),%eax
cmp    $0x66,%eax
jg     1156 <pico_is_hex+0x56>
movl   $0x1,-0x4(%rbp)
jmp    1183 <pico_is_hex+0x83>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     117c <pico_is_hex+0x7c>
movsbl -0x5(%rbp),%eax
cmp    $0x46,%eax
jg     117c <pico_is_hex+0x7c>
movl   $0x1,-0x4(%rbp)
jmp    1183 <pico_is_hex+0x83>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pico_is_hex>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
and    $0xdf,%dil
add    $0xbf,%dil
cmp    $0x6,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @pico_is_hex(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %31
12: ; preds = %7, %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp sge i32 %14, 97
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sle i32 %18, 102
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 1, i32* %2
br label %31
21: ; preds = %16, %12
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = icmp sge i32 %23, 65
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = load i8, i8* %3
%27 = sext i8 %26 to i32
%28 = icmp sle i32 %27, 70
br i1 %28, label %29, label %30
29: ; preds = %25
store i32 1, i32* %2
br label %31
30: ; preds = %25, %21
store i32 0, i32* %2
br label %31
31: ; preds = %30, %29, %20, %11
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @pico_is_hex(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ ft_memdel(void **);
void ft_strdel(char **as) {
  if (as && *as) {
    ft_memdel((void **)as);
  }
}


x86 assembly (clang, -O0):
<ft_strdel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113e <ft_strdel+0x2e>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     113e <ft_strdel+0x2e>
mov    -0x8(%rbp),%rdi
call   1030 <ft_memdel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strdel>:
test   %rdi,%rdi
je     1120 <ft_strdel+0x10>
cmpq   $0x0,(%rdi)
je     1120 <ft_strdel+0x10>
jmp    1030 <ft_memdel@plt>
ret

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

LLVM IR (-O2):
define void @ft_strdel(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @ft_memdel(i8** %0)
br label %8
8: ; preds = %6, %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
int /*<<< orphan*/ halt(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char const *);
void expected(const char *exp) {
  assert(exp);
  char expected_str[32];
  snprintf(expected_str, 32, "%s expected", exp);
  halt(expected_str);
}


x86 assembly (clang, -O0):
<expected>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x20,%esi
lea    0xea7(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x30(%rbp),%rdi
call   1050 <halt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expected>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%rbx
call   1040 <assert@plt>
lea    0xeba(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x20,%esi
mov    %rbx,%rcx
call   1030 <snprintf@plt>
mov    %r14,%rdi
call   1050 <halt@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%s expected\00"
define void @expected(i8* %0) {
%2 = alloca i8*
%3 = alloca [32 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @assert(i8* %4)
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%7 = load i8*, i8** %2
%8 = call i32 @snprintf(i8* %6, i32 32, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%10 = call i32 @halt(i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s expected\00"
define void @expected(i8* %0) {
%2 = alloca [32 x i8]
%3 = tail call i32 @assert(i8* %0)
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 32, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = call i32 @halt(i8* %4)
ret void
}
/* Type definitions */
typedef int time_t;
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
time_t diff_ms(struct timeval t1, struct timeval t2) {
  return (t1.tv_sec - t2.tv_sec) * 1000 + (t1.tv_usec - t2.tv_usec) / 1000;
}


x86 assembly (clang, -O0):
<diff_ms>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
imul   $0x3e8,%eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<diff_ms>:
mov    %rdi,%rax
shr    $0x20,%rax
sub    %esi,%edi
shr    $0x20,%rsi
imul   $0x3e8,%edi,%ecx
sub    %esi,%eax
cltq
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @diff_ms(i64 %0, i64 %1) {
%3 = alloca %struct.timeval
%4 = alloca %struct.timeval
%5 = bitcast %struct.timeval* %3 to i64*
store i64 %0, i64* %5
%6 = bitcast %struct.timeval* %4 to i64*
store i64 %1, i64* %6
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%8 = load i32, i32* %7
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
%10 = load i32, i32* %9
%11 = sub nsw i32 %8, %10
%12 = mul nsw i32 %11, 1000
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
%14 = load i32, i32* %13
%15 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 1
%16 = load i32, i32* %15
%17 = sub nsw i32 %14, %16
%18 = sdiv i32 %17, 1000
%19 = add nsw i32 %12, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @diff_ms(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = lshr i64 %0, 32
%5 = trunc i64 %4 to i32
%6 = trunc i64 %1 to i32
%7 = lshr i64 %1, 32
%8 = trunc i64 %7 to i32
%9 = sub nsw i32 %3, %6
%10 = mul nsw i32 %9, 1000
%11 = sub nsw i32 %5, %8
%12 = sdiv i32 %11, 1000
%13 = add nsw i32 %12, %10
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int dinheiro, troco;
  scanf("%d", &dinheiro);
  troco = dinheiro % 7;
  printf("%d\n", troco);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rax
imul   $0xffffffff92492493,%rax,%rsi
shr    $0x20,%rsi
add    %eax,%esi
mov    %esi,%ecx
shr    $0x1f,%ecx
sar    $0x2,%esi
add    %ecx,%esi
lea    0x0(,%rsi,8),%ecx
sub    %ecx,%esi
add    %eax,%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = srem i32 %4, 7
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SerialWriteString(char *);
void iRobot_RawMotors(unsigned short main_brush_pwm,
                      unsigned short side_brush_pwm,
                      unsigned short vacuum_pwm) {
  char data[] = {144, main_brush_pwm, side_brush_pwm, vacuum_pwm};
  SerialWriteString(data);
}


x86 assembly (clang, -O0):
<iRobot_RawMotors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %si,%cx
mov    %di,%dx
mov    %dx,-0x2(%rbp)
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
movb   $0x90,-0xa(%rbp)
mov    -0x2(%rbp),%ax
mov    %al,-0x9(%rbp)
mov    -0x4(%rbp),%ax
mov    %al,-0x8(%rbp)
mov    -0x6(%rbp),%ax
mov    %al,-0x7(%rbp)
lea    -0xa(%rbp),%rdi
call   1030 <SerialWriteString@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iRobot_RawMotors>:
push   %rax
movb   $0x90,0x4(%rsp)
mov    %dil,0x5(%rsp)
mov    %sil,0x6(%rsp)
mov    %dl,0x7(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <SerialWriteString@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @iRobot_RawMotors(i16 zeroext %0, i16 zeroext %1, i16 zeroext %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16
%7 = alloca [4 x i8]
store i16 %0, i16* %4
store i16 %1, i16* %5
store i16 %2, i16* %6
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %7, i64 0, i64 0
store i8 -112, i8* %8
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i16, i16* %4
%11 = trunc i16 %10 to i8
store i8 %11, i8* %9
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = load i16, i16* %5
%14 = trunc i16 %13 to i8
store i8 %14, i8* %12
%15 = getelementptr inbounds i8, i8* %12, i64 1
%16 = load i16, i16* %6
%17 = trunc i16 %16 to i8
store i8 %17, i8* %15
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %7, i64 0, i64 0
%19 = call i32 @SerialWriteString(i8* %18)
ret void
}

LLVM IR (-O2):
define void @iRobot_RawMotors(i16 zeroext %0, i16 zeroext %1, i16 zeroext %2) {
%4 = alloca [4 x i8]
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
store i8 -112, i8* %5
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 1
%7 = trunc i16 %0 to i8
store i8 %7, i8* %6
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 2
%9 = trunc i16 %1 to i8
store i8 %9, i8* %8
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 3
%11 = trunc i16 %2 to i8
store i8 %11, i8* %10
%12 = call i32 @SerialWriteString(i8* %5)
ret void
}
void DGSSetupUIKitMainThreadGuard(void) {}


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

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

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

LLVM IR (-O2):
define void @DGSSetupUIKitMainThreadGuard() {
ret void
}
/* Variables and functions */
int pointer_hash(const void *key, int size) {
  intptr_t v = (intptr_t)(key);
  return (v % size);
}


x86 assembly (clang, -O0):
<pointer_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
cqto
idiv   %rcx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointer_hash>:
mov    %rdi,%rax
movslq %esi,%rcx
mov    %rdi,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     111b <pointer_hash+0x1b>
cqto
idiv   %rcx
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @pointer_hash(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = ptrtoint i8* %6 to i64
store i64 %7, i64* %5
%8 = load i64, i64* %5
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = srem i64 %8, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @pointer_hash(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = sext i32 %1 to i64
%5 = srem i64 %3, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ *hash(int /*<<< orphan*/ *);
void lamport_key_gen(uint8_t **public_keys, uint8_t **secret_keys) {
  public_keys[0] = hash(secret_keys[0]);
  public_keys[1] = hash(secret_keys[1]);
  return;
}


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

x86 assembly (clang, -O2):
<lamport_key_gen>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rsi),%rdi
call   1030 <hash@plt>
mov    %rax,(%r14)
mov    0x8(%rbx),%rdi
call   1030 <hash@plt>
mov    %rax,0x8(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @lamport_key_gen(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 = getelementptr inbounds i32*, i32** %5, i64 0
%7 = load i32*, i32** %6
%8 = call i32* @hash(i32* %7)
%9 = load i32**, i32*** %3
%10 = getelementptr inbounds i32*, i32** %9, i64 0
store i32* %8, i32** %10
%11 = load i32**, i32*** %4
%12 = getelementptr inbounds i32*, i32** %11, i64 1
%13 = load i32*, i32** %12
%14 = call i32* @hash(i32* %13)
%15 = load i32**, i32*** %3
%16 = getelementptr inbounds i32*, i32** %15, i64 1
store i32* %14, i32** %16
ret void
}

LLVM IR (-O2):
define void @lamport_key_gen(i32** nocapture writeonly %0, i32** nocapture %1) {
%3 = load i32*, i32** %1
%4 = tail call i32* @hash(i32* %3)
store i32* %4, i32** %0
%5 = getelementptr inbounds i32*, i32** %1, i64 1
%6 = load i32*, i32** %5
%7 = tail call i32* @hash(i32* %6)
%8 = getelementptr inbounds i32*, i32** %0, i64 1
store i32* %7, i32** %8
ret void
}
tftpsetascii(argc, argv) char *argv[];
{ tftpsetmode("netascii"); }


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

x86 assembly (clang, -O2):
<tftpsetascii>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <tftpsetmode@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"netascii\00"
define i32 @tftpsetascii(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @tftpsetmode to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
@.str = [9 x i8] c"netascii\00"
define i32 @tftpsetascii(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @tftpsetmode to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
void work(ip, jp) int *ip, *jp;
{
  *ip = 1;
  *jp = -1;
}


x86 assembly (clang, -O0):
<work>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
movl   $0xffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<work>:
movl   $0x1,(%rdi)
movl   $0xffffffff,(%rsi)
ret

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

LLVM IR (-O2):
define void @work(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
store i32 1, i32* %0
store i32 -1, i32* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int bn_rand_range(int /*<<< orphan*/, int /*<<< orphan*/ *,
                  int /*<<< orphan*/ *);
int BN_rand_range(BIGNUM *r, BIGNUM *range) {
  return bn_rand_range(0, r, range);
}


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

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

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

LLVM IR (-O2):
define i32 @BN_rand_range(i32* %0, i32* %1) {
%3 = tail call i32 @bn_rand_range(i32 0, i32* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
float __infer_nondet_float();
float tgammaf(float x) { return __infer_nondet_float(); }


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

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

LLVM IR (-O0):
define float @tgammaf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call float (...) @__infer_nondet_float()
ret float %3
}

LLVM IR (-O2):
define float @tgammaf(float %0) {
%2 = tail call float (...) @__infer_nondet_float()
ret float %2
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ srand(int);
void ga_algorithm_srand_init() {
  struct timeval t;
  gettimeofday(&t, NULL);
  srand((t.tv_sec * 1000 + t.tv_usec / 1000));
}


x86 assembly (clang, -O0):
<ga_algorithm_srand_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x8(%rbp),%edi
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
add    %eax,%edi
call   1040 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ga_algorithm_srand_init>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,(%rsp),%eax
movslq 0x4(%rsp),%rcx
imul   $0x10624dd3,%rcx,%rdi
mov    %rdi,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rdi
add    %ecx,%edi
add    %eax,%edi
pop    %rax
jmp    1040 <srand@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define void @ga_algorithm_srand_init() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i32, i32* %6
%8 = sdiv i32 %7, 1000
%9 = add nsw i32 %5, %8
%10 = call i32 @srand(i32 %9)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define void @ga_algorithm_srand_init() {
%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 i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000
%10 = add nsw i32 %9, %6
%11 = tail call i32 @srand(i32 %10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
scalar_t__ cmp1(void const *, void const *);
scalar_t__ cmp2(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
bool cmp3(const void *a, const void *b) {
  return cmp1(a, b) && cmp2((uint8_t *)a + 1, (uint8_t *)b + 1);
}


x86 assembly (clang, -O0):
<cmp3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <cmp1@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     116e <cmp3+0x4e>
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0x10(%rbp),%rsi
add    $0x4,%rsi
call   1040 <cmp2@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp3>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <cmp1@plt>
test   %rax,%rax
je     1154 <cmp3+0x34>
add    $0x4,%rbx
add    $0x4,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <cmp2@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
jmp    1156 <cmp3+0x36>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @cmp3(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @cmp1(i8* %5, i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %18
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = bitcast i8* %10 to i32*
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = load i8*, i8** %4
%14 = bitcast i8* %13 to i32*
%15 = getelementptr inbounds i32, i32* %14, i64 1
%16 = call i64 @cmp2(i32* %12, i32* %15)
%17 = icmp ne i64 %16, 0
br label %18
18: ; preds = %9, %2
%19 = phi i1 [ false, %2 ], [ %17, %9 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @cmp3(i8* %0, i8* %1) {
%3 = tail call i64 @cmp1(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %0, i64 4
%7 = bitcast i8* %6 to i32*
%8 = getelementptr inbounds i8, i8* %1, i64 4
%9 = bitcast i8* %8 to i32*
%10 = tail call i64 @cmp2(i32* %7, i32* %9)
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %5, %2
%14 = phi i32 [ 0, %2 ], [ %12, %5 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void cmd_quit(char *dummy) { exit(0); }


x86 assembly (clang, -O0):
<cmd_quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
define void @cmd_quit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @cmd_quit(i8* nocapture readnone %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fileRead();
int main(int argc, char **argv) {
  fileRead();
  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 <fileRead@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @fileRead()
ret i32 0
}