xunge/DecIR huggingface dataset:
/* Variables and functions */
size_t vertex_size(size_t n) { return n * sizeof(float) * 5; }


x86 assembly (clang, -O0):
<vertex_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x2,%rax
imul   $0x5,%rax,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vertex_size>:
shl    $0x2,%rdi
lea    (%rdi,%rdi,4),%rax
ret

LLVM IR (-O0):
define i64 @vertex_size(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 %3, 4
%5 = mul i64 %4, 5
ret i64 %5
}

LLVM IR (-O2):
define i64 @vertex_size(i64 %0) {
%2 = mul i64 %0, 20
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ verify_divu1(int, int, int, int);
int main() {
  verify_divu1(0, 1, 0, 0);
  verify_divu1(1, 1, 1, 0);
  verify_divu1(1, 2, 0, 1);
  verify_divu1(17, 19, 0, 17);
  verify_divu1(19, 17, 1, 2);
  verify_divu1(77773, 101, 770, 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %ecx,%ecx
mov    $0x1,%esi
mov    %ecx,%edi
mov    %ecx,%edx
call   1030 <verify_divu1@plt>
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %edx,%edi
mov    %edx,%esi
call   1030 <verify_divu1@plt>
mov    $0x1,%ecx
mov    $0x2,%esi
xor    %edx,%edx
mov    %ecx,%edi
call   1030 <verify_divu1@plt>
mov    $0x11,%ecx
mov    $0x13,%esi
xor    %edx,%edx
mov    %ecx,%edi
call   1030 <verify_divu1@plt>
mov    $0x13,%edi
mov    $0x11,%esi
mov    $0x1,%edx
mov    $0x2,%ecx
call   1030 <verify_divu1@plt>
mov    $0x12fcd,%edi
mov    $0x65,%esi
mov    $0x302,%edx
mov    $0x3,%ecx
call   1030 <verify_divu1@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <verify_divu1@plt>
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <verify_divu1@plt>
mov    $0x1,%edi
mov    $0x2,%esi
xor    %edx,%edx
mov    $0x1,%ecx
call   1030 <verify_divu1@plt>
mov    $0x11,%edi
mov    $0x13,%esi
xor    %edx,%edx
mov    $0x11,%ecx
call   1030 <verify_divu1@plt>
mov    $0x13,%edi
mov    $0x11,%esi
mov    $0x1,%edx
mov    $0x2,%ecx
call   1030 <verify_divu1@plt>
mov    $0x12fcd,%edi
mov    $0x65,%esi
mov    $0x302,%edx
mov    $0x3,%ecx
call   1030 <verify_divu1@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @verify_divu1(i32 0, i32 1, i32 0, i32 0)
%3 = call i32 @verify_divu1(i32 1, i32 1, i32 1, i32 0)
%4 = call i32 @verify_divu1(i32 1, i32 2, i32 0, i32 1)
%5 = call i32 @verify_divu1(i32 17, i32 19, i32 0, i32 17)
%6 = call i32 @verify_divu1(i32 19, i32 17, i32 1, i32 2)
%7 = call i32 @verify_divu1(i32 77773, i32 101, i32 770, i32 3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @verify_divu1(i32 0, i32 1, i32 0, i32 0)
%2 = tail call i32 @verify_divu1(i32 1, i32 1, i32 1, i32 0)
%3 = tail call i32 @verify_divu1(i32 1, i32 2, i32 0, i32 1)
%4 = tail call i32 @verify_divu1(i32 17, i32 19, i32 0, i32 17)
%5 = tail call i32 @verify_divu1(i32 19, i32 17, i32 1, i32 2)
%6 = tail call i32 @verify_divu1(i32 77773, i32 101, i32 770, i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ drv_generic_serial_write(char *, int);
int drv_LT_send(const char request, const char value) {
  char buf[2];
  buf[0] = request;
  buf[1] = value;
  drv_generic_serial_write(buf, 2);
  return 0;
}


x86 assembly (clang, -O0):
<drv_LT_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x4(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x3(%rbp)
lea    -0x4(%rbp),%rdi
mov    $0x2,%esi
call   1030 <drv_generic_serial_write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drv_LT_send>:
push   %rax
mov    %dil,0x6(%rsp)
mov    %sil,0x7(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
call   1030 <drv_generic_serial_write@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @drv_LT_send(i8 signext %0, i8 signext %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 %0, i8* %4
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %1, i8* %5
%6 = call i32 @drv_generic_serial_write(i8* %4, i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i = 1, j = -2, k;
  k = (i >= 0) || (j >= 00) && (i <= 0) || (j <= 0);
  printf("%d", k);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0xfffffffe,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jge    115f <main+0x4f>
cmpl   $0x0,-0xc(%rbp)
jl     1155 <main+0x45>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jle    115f <main+0x4f>
cmpl   $0x0,-0xc(%rbp)
setle  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("hello VCS world"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"hello VCS world\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"hello VCS world\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void fix_directory(void) {}


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

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

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

LLVM IR (-O2):
define void @fix_directory() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void resetEventCallback(void) {
  printf("\r\nReset");
  return;
}


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"\0D\0AReset\00"
define void @resetEventCallback() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\0D\0AReset\00"
define void @resetEventCallback() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
void swap(int *A, int i, int j) {
  int temp = A[i];
  A[i] = A[j];
  A[j] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @swap(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foobar(char *);
void func(void) { foobar("Hello world\n"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello world\0A\00"
define void @func() {
%1 = call i32 @foobar(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello world\0A\00"
define void @func() {
%1 = tail call i32 @foobar(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GINT0_DriverIRQHandler();
__attribute__((weak)) void GINT0_IRQHandler(void) { GINT0_DriverIRQHandler(); }


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

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

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

LLVM IR (-O2):
define weak void @GINT0_IRQHandler() {
%1 = tail call i32 (...) @GINT0_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ calloc(int, int);
char *memcpy(int /*<<< orphan*/, char *, int);
char *copy_block(char *start, char *end) {
  int len = end - start;
  return memcpy(calloc(len + 1, 1), start, len);
}


x86 assembly (clang, -O0):
<copy_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_block>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
sub    %r14d,%ebx
lea    0x1(%rbx),%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memcpy@plt>

LLVM IR (-O0):
define i8* @copy_block(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = ptrtoint i8* %6 to i64
%9 = ptrtoint i8* %7 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
store i32 %11, i32* %5
%12 = load i32, i32* %5
%13 = add nsw i32 %12, 1
%14 = call i32 @calloc(i32 %13, i32 1)
%15 = load i8*, i8** %3
%16 = load i32, i32* %5
%17 = call i8* @memcpy(i32 %14, i8* %15, i32 %16)
ret i8* %17
}

LLVM IR (-O2):
define i8* @copy_block(i8* %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = ptrtoint i8* %0 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
%7 = add nsw i32 %6, 1
%8 = tail call i32 @calloc(i32 %7, i32 1)
%9 = tail call i8* @memcpy(i32 %8, i8* %0, i32 %6)
ret i8* %9
}
void trifree(memptr) void *memptr;
{ free(memptr); }


x86 assembly (clang, -O0):
<trifree>:
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):
<trifree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @trifree(i8* nocapture %0) {
tail call void @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F();
int Rp(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int P() {
  printf("P->FRp\n");
  return Rp(F());
}


x86 assembly (clang, -O0):
<P>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <F@plt>
mov    %eax,%edi
call   1050 <Rp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<P>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <F@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <Rp@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"P->FRp\0A\00"
define i32 @P() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @F()
%3 = call i32 @Rp(i32 %2)
ret i32 %3
}

LLVM IR (-O2):
@str = [7 x i8] c"P->FRp\00"
define i32 @P() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @F()
%3 = tail call i32 @Rp(i32 %2)
ret i32 %3
}
OP(dd, cf) {
  illegal_1();
  op_cf();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_cf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_cf()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_suspend_sink_by_name() {
  printf("NOT IMPLEMENTED:"
         "pa_context_suspend_sink_by_name"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [49 x i8] c"NOT IMPLEMENTED:pa_context_suspend_sink_by_name\0A\00"
define i32 @pa_context_suspend_sink_by_name() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [48 x i8] c"NOT IMPLEMENTED:pa_context_suspend_sink_by_name\00"
define i32 @pa_context_suspend_sink_by_name() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int glutExtensionSupported(const char *name) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @glutExtensionSupported(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap_int(int *, int *);
int main(void) {
  int a;
  int b;
  a = 98;
  b = 402;
  printf("a=%d, b=%d\n", a, b);
  swap_int(&a, &b);
  printf("a=%d, b=%d\n", a, b);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x62,-0x8(%rbp)
movl   $0x192,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <swap_int@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x62,0xc(%rsp)
movl   $0x192,0x8(%rsp)
lea    0xec4(%rip),%rbx
mov    %rbx,%rdi
mov    $0x62,%esi
mov    $0x192,%edx
call   1030 <printf@plt>
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <swap_int@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"a=%d, b=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
store i32 98, i32* %1
store i32 402, i32* %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 98, i32 402)
%6 = call i32 @swap_int(i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bcm2835_spi_end();
void ope_spi_end(void) { bcm2835_spi_end(); }


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

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

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

LLVM IR (-O2):
define void @ope_spi_end() {
%1 = tail call i32 (...) @bcm2835_spi_end()
ret void
}
int test_imm_21uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x21 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_21uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 2162688
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct membuf {
  int dummy;
};

/* Variables and functions */
char *membuf_get(struct membuf *);
char *get(struct membuf *buf) { return membuf_get(buf); }


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

x86 assembly (clang, -O2):
<get>:
jmp    1030 <membuf_get@plt>

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

LLVM IR (-O2):
%struct.membuf = type { i32 }
define i8* @get(%struct.membuf* %0) {
%2 = tail call i8* @membuf_get(%struct.membuf* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ mexErrMsgTxt(char *);
int /*<<< orphan*/ printf(char *, ...);
void merror(char error_text[]) {
  printf("--- Runtime error in matrix library:\n");
  printf("--- ");
  printf("%s\n\n", error_text);
  mexErrMsgTxt("AN ERROR OCCURED IN A CMEX-PROGRAM");
}


x86 assembly (clang, -O0):
<merror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
call   1040 <mexErrMsgTxt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merror>:
push   %rbx
mov    %rdi,%rbx
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea4(%rip),%rdi
pop    %rbx
jmp    1050 <mexErrMsgTxt@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"--- Runtime error in matrix library:\0A\00"
@.str.1 = [5 x i8] c"--- \00"
@.str.2 = [5 x i8] c"%s\0A\0A\00"
@.str.3 = [35 x i8] c"AN ERROR OCCURED IN A CMEX-PROGRAM\00"
define void @merror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%7 = call i32 @mexErrMsgTxt(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"--- \00"
@.str.2 = [5 x i8] c"%s\0A\0A\00"
@.str.3 = [35 x i8] c"AN ERROR OCCURED IN A CMEX-PROGRAM\00"
@str = [37 x i8] c"--- Runtime error in matrix library:\00"
define void @merror(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%5 = tail call i32 @mexErrMsgTxt(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
ret void
}
void pcan_device_node_create(struct pcandev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.pcandev = type opaque
define void @pcan_device_node_create(%struct.pcandev* nocapture %0) {
ret void
}
int get_value_from_b(void) { return 10; }


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

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

LLVM IR (-O0):
define i32 @get_value_from_b() {
ret i32 10
}

LLVM IR (-O2):
define i32 @get_value_from_b() {
ret i32 10
}
/* Type definitions */
typedef scalar_t__ uint64_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ alignsize(scalar_t__, scalar_t__);
uint64_t alignup(uint64_t sz, uint32_t align) {
  uint64_t s = alignsize(sz, align);
  if (s == sz)
    return s + align;
  else
    return s;
}


x86 assembly (clang, -O0):
<alignup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <alignsize@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1150 <alignup+0x40>
mov    -0x20(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1158 <alignup+0x48>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alignup>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <alignsize@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
cmove  %r14,%rcx
add    %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @alignup(i64 %0, i64 %1) {
%3 = tail call i64 @alignsize(i64 %0, i64 %1)
%4 = icmp eq i64 %3, %0
%5 = select i1 %4, i64 %1, i64 0
%6 = add nsw i64 %5, %3
ret i64 %6
}
/* Variables and functions */
scalar_t__ pnmwriter_height(void *, unsigned int);
scalar_t__ pnmwriter_width(void *, unsigned int);
bool got_geometry(unsigned int width, unsigned int height, void *userdata) {
  return pnmwriter_width(userdata, width) && pnmwriter_height(userdata, height);
}


x86 assembly (clang, -O0):
<got_geometry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <pnmwriter_width@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     1166 <got_geometry+0x46>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <pnmwriter_height@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):
<got_geometry>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %edi,%esi
mov    %rdx,%rdi
call   1030 <pnmwriter_width@plt>
test   %rax,%rax
je     114e <got_geometry+0x2e>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <pnmwriter_height@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
jmp    1150 <got_geometry+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @got_geometry(i32 %0, i32 %1, i8* %2) {
%4 = tail call i64 @pnmwriter_width(i8* %2, i32 %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i64 @pnmwriter_height(i8* %2, i32 %1)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3
%11 = phi i32 [ 0, %3 ], [ %9, %6 ]
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int null_read(BIO *b, char *out, int outl) { return (0); }


x86 assembly (clang, -O0):
<null_read>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @null_read(i32* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
void X509_PURPOSE_set(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_PURPOSE_set() {
ret void
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void *xcalloc(size_t nmemb, size_t size) {
  void *ret = calloc(nmemb, size);
  if (ret)
    return ret;
  perror("Error: calloc");
  exit(errno);
}


x86 assembly (clang, -O0):
<xcalloc>:
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 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1166 <xcalloc+0x36>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret
lea    0xe93(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<xcalloc>:
push   %rax
call   1030 <calloc@plt>
test   %rax,%rax
je     113d <xcalloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"Error: calloc\00"
@errno = global i32 0
define noalias i8* @xcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %2
ret i8* %3
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @errno
%9 = tail call i32 @exit(i32 %8)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ LedsP__Leds__led0On();
void TelosbSensorReadingC__Leds__led0On(void) { LedsP__Leds__led0On(); }


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

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

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

LLVM IR (-O2):
define void @TelosbSensorReadingC__Leds__led0On() {
%1 = tail call i32 (...) @LedsP__Leds__led0On()
ret void
}
void foo379() {}


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

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

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

LLVM IR (-O2):
define void @foo379() {
ret void
}
int fib(int x) {
  if (x > 1)
    return (fib(x - 1) + fib(x - 2));
  else
    return (x);
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    114d <fib+0x3d>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <fib+0x43>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jl     1136 <fib+0x26>
xor    %ebp,%ebp
xchg   %ax,%ax
lea    -0x1(%rbx),%edi
call   1030 <fib@plt>
lea    -0x2(%rbx),%ecx
add    %eax,%ebp
cmp    $0x3,%ebx
mov    %ecx,%ebx
ja     1120 <fib+0x10>
jmp    1138 <fib+0x28>
mov    %ebx,%ecx
add    %ecx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fib(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 1
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sub nsw i32 %7, 1
%9 = call i32 @fib(i32 %8)
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 2
%12 = call i32 @fib(i32 %11)
%13 = add nsw i32 %9, %12
store i32 %13, i32* %2
br label %16
14: ; preds = %1
%15 = load i32, i32* %3
store i32 %15, i32* %2
br label %16
16: ; preds = %14, %6
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fib(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ugt i32 %4, 3
br i1 %10, label %3, label %11
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ %8, %3 ]
%14 = add nsw i32 %13, %12
ret i32 %14
}
void swap(int *p, int *q) {
  int tmp = *p;
  *p = *q;
  *q = tmp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned int *, unsigned char *, int);
unsigned int h2nl(unsigned int h) {
  unsigned char c[4];
  unsigned int rv;
  c[0] = (h >> 24) & 0xff;
  c[1] = (h >> 16) & 0xff;
  c[2] = (h >> 8) & 0xff;
  c[3] = (h >> 0) & 0xff;
  memcpy(&rv, c, sizeof rv);
  return (rv);
}


x86 assembly (clang, -O0):
<h2nl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,-0x7(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x0,%eax
and    $0xff,%eax
mov    %al,-0x5(%rbp)
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2nl>:
push   %rax
bswap  %edi
mov    %edi,0x4(%rsp)
mov    %rsp,%rdi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @h2nl(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x i8]
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = lshr i32 %5, 24
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
store i8 %8, i8* %9
%10 = load i32, i32* %2
%11 = lshr i32 %10, 16
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
%14 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 1
store i8 %13, i8* %14
%15 = load i32, i32* %2
%16 = lshr i32 %15, 8
%17 = and i32 %16, 255
%18 = trunc i32 %17 to i8
%19 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 2
store i8 %18, i8* %19
%20 = load i32, i32* %2
%21 = lshr i32 %20, 0
%22 = and i32 %21, 255
%23 = trunc i32 %22 to i8
%24 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 3
store i8 %23, i8* %24
%25 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%26 = call i32 @memcpy(i32* %4, i8* %25, i32 4)
%27 = load i32, i32* %4
ret i32 %27
}

LLVM IR (-O2):
define i32 @h2nl(i32 %0) {
%2 = alloca [4 x i8]
%3 = alloca i32
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%5 = bitcast i32* %3 to i8*
%6 = lshr i32 %0, 24
%7 = trunc i32 %6 to i8
store i8 %7, i8* %4
%8 = lshr i32 %0, 16
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
store i8 %9, i8* %10
%11 = lshr i32 %0, 8
%12 = trunc i32 %11 to i8
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
store i8 %12, i8* %13
%14 = trunc i32 %0 to i8
%15 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 3
store i8 %14, i8* %15
%16 = call i32 @memcpy(i32* %3, i8* %4, i32 4)
%17 = load i32, i32* %3
ret i32 %17
}
void lcm_setpwm(unsigned int divider) {}


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

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

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

LLVM IR (-O2):
define void @lcm_setpwm(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void EXIT(char *a) {
  printf("\n%s", a);
  exit(1);
}


x86 assembly (clang, -O0):
<EXIT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<EXIT>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"\0A%s\00"
define void @EXIT(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int jsY_isdec(int c) { return (c >= '0' && c <= '9'); }


x86 assembly (clang, -O0):
<jsY_isdec>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <jsY_isdec+0x20>
cmpl   $0x39,-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):
<jsY_isdec>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @jsY_isdec(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
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 @jsY_isdec(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
void cf_outb(unsigned char val, volatile unsigned char *addr) { *(addr) = val; }


x86 assembly (clang, -O0):
<cf_outb>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cf_outb>:
mov    %dil,(%rsi)
ret

LLVM IR (-O0):
define void @cf_outb(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* %3
%6 = load i8*, i8** %4
store volatile i8 %5, i8* %6
ret void
}

LLVM IR (-O2):
define void @cf_outb(i8 zeroext %0, i8* %1) {
store volatile i8 %0, i8* %1
ret void
}
/* Variables and functions */
int fork();
int g_fork(void) { return fork(); }


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

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

LLVM IR (-O0):
define i32 @g_fork() {
%1 = call i32 (...) @fork()
ret i32 %1
}

LLVM IR (-O2):
define i32 @g_fork() {
%1 = tail call i32 (...) @fork()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x1d() {
  Assert_real((isdigit(29) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              150, ("isdigit should be 0 for 0x1d"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x1d\00"
define void @t_isdigit_0x1d() {
%1 = tail call i64 @isdigit(i32 29)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct PostProcessor {
  int dummy;
};
struct Image {
  int dummy;
};

/* Variables and functions */
int postprocessor_run(struct PostProcessor *, struct Image *, int, int, int);
int postprocessor_scale_and_change_colorspace(struct PostProcessor *pp,
                                              struct Image *image, int width,
                                              int height, int colorspace) {
  return postprocessor_run(pp, image, width, height, colorspace);
}


x86 assembly (clang, -O0):
<postprocessor_scale_and_change_colorspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
call   1030 <postprocessor_run@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<postprocessor_scale_and_change_colorspace>:
jmp    1030 <postprocessor_run@plt>

LLVM IR (-O0):
%struct.PostProcessor = type { i32 }
%struct.Image = type { i32 }
define i32 @postprocessor_scale_and_change_colorspace(%struct.PostProcessor* %0, %struct.Image* %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.PostProcessor*
%7 = alloca %struct.Image*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.PostProcessor* %0, %struct.PostProcessor** %6
store %struct.Image* %1, %struct.Image** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load %struct.PostProcessor*, %struct.PostProcessor** %6
%12 = load %struct.Image*, %struct.Image** %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @postprocessor_run(%struct.PostProcessor* %11, %struct.Image* %12, i32 %13, i32 %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.PostProcessor = type { i32 }
%struct.Image = type { i32 }
define i32 @postprocessor_scale_and_change_colorspace(%struct.PostProcessor* %0, %struct.Image* %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @postprocessor_run(%struct.PostProcessor* %0, %struct.Image* %1, i32 %2, i32 %3, i32 %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_process(void *num1) {
  printf("%4d\n", *(int *)num1);
  return;
}


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

x86 assembly (clang, -O2):
<print_process>:
mov    (%rdi),%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%4d\0A\00"
define void @print_process(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}