xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char str[1024];
  memset(str, 66, 10);
  printf("%s", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rdi
mov    $0x42,%esi
mov    $0xa,%edx
call   1040 <memset@plt>
lea    -0x410(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x400,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x42,%esi
mov    $0xa,%edx
call   1040 <memset@plt>
lea    0xebc(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32 @memset(i8* %2, i32 66, i32 10)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
void kasan_poison_object_data(struct kmem_cache *cache, void *object) {}


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

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

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

LLVM IR (-O2):
%struct.kmem_cache = type opaque
define void @kasan_poison_object_data(%struct.kmem_cache* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int usage() {
  fprintf(stderr, "usage: insmod [-p <path>] <module>.ko\n");
  return 1;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"usage: insmod [-p <path>] <module>.ko\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"usage: insmod [-p <path>] <module>.ko\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
void *aligned_alloc(size_t, size_t);
void *aligned_alloc_and_null_check(size_t alignemnt, size_t size) {
  void *tmp = aligned_alloc(alignemnt, size);
  if (!tmp) {
    (0);
  }
  return tmp;
}


x86 assembly (clang, -O0):
<aligned_alloc_and_null_check>:
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 <aligned_alloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1141 <aligned_alloc_and_null_check+0x31>
jmp    1141 <aligned_alloc_and_null_check+0x31>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aligned_alloc_and_null_check>:
jmp    1030 <aligned_alloc@plt>

LLVM IR (-O0):
define i8* @aligned_alloc_and_null_check(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* @aligned_alloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %12, label %11
11: ; preds = %2
br label %12
12: ; preds = %11, %2
%13 = load i8*, i8** %5
ret i8* %13
}

LLVM IR (-O2):
define i8* @aligned_alloc_and_null_check(i64 %0, i64 %1) {
%3 = tail call i8* @aligned_alloc(i64 %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int fifo_write(char *);
int fifo_stop() { return fifo_write("stop\n"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"stop\0A\00"
define i32 @fifo_stop() {
%1 = call i32 @fifo_write(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [6 x i8] c"stop\0A\00"
define i32 @fifo_stop() {
%1 = tail call i32 @fifo_write(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
struct pkt_buff {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tprintf(char *);
void none_less(struct pkt_buff *pkt __attribute__((__unused__))) {
  tprintf("\n");
}


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

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

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

LLVM IR (-O2):
%struct.pkt_buff = type { i32 }
@.str = [2 x i8] c"\0A\00"
define void @none_less(%struct.pkt_buff* nocapture readnone %0) {
%2 = tail call i32 @tprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
long long __builtin_wasm_trunc_u_i64_f32(float);
long long trunc_u_i64_f32(float f) { return __builtin_wasm_trunc_u_i64_f32(f); }


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

x86 assembly (clang, -O2):
<trunc_u_i64_f32>:
jmp    1030 <__builtin_wasm_trunc_u_i64_f32@plt>

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

LLVM IR (-O2):
define i64 @trunc_u_i64_f32(float %0) {
%2 = tail call i64 @__builtin_wasm_trunc_u_i64_f32(float %0)
ret i64 %2
}
void mp_png_backend_free(void *mp) { return; }


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

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

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

LLVM IR (-O2):
define void @mp_png_backend_free(i8* nocapture %0) {
ret void
}
int __attribute__((target("arch=goldmont-plus"))) foo(void) { return 4; }


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

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

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

LLVM IR (-O2):
define i32 @foo() {
ret i32 4
}
/* Variables and functions */
scalar_t__ prj_get_defines();
int prj_getlistsize(void **);
int prj_get_numdefines() { return prj_getlistsize((void **)prj_get_defines()); }


x86 assembly (clang, -O0):
<prj_get_numdefines>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <prj_get_defines@plt>
mov    %rax,%rdi
call   1030 <prj_getlistsize@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<prj_get_numdefines>:
push   %rax
xor    %eax,%eax
call   1040 <prj_get_defines@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <prj_getlistsize@plt>

LLVM IR (-O0):
define i32 @prj_get_numdefines() {
%1 = call i64 (...) @prj_get_defines()
%2 = inttoptr i64 %1 to i8**
%3 = call i32 @prj_getlistsize(i8** %2)
ret i32 %3
}

LLVM IR (-O2):
define i32 @prj_get_numdefines() {
%1 = tail call i64 (...) @prj_get_defines()
%2 = inttoptr i64 %1 to i8**
%3 = tail call i32 @prj_getlistsize(i8** %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ reportAnswer(int /*<<< orphan*/, int /*<<< orphan*/);
void reverseAdd(int x) { reportAnswer(0, 0); }


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

x86 assembly (clang, -O2):
<reverseAdd>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <reportAnswer@plt>

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

LLVM IR (-O2):
define void @reverseAdd(i32 %0) {
%2 = tail call i32 @reportAnswer(i32 0, i32 0)
ret void
}
/* Type definitions */
typedef int time_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int time(int /*<<< orphan*/ *);
int main() {
  time_t now;
  char *ctime;
  now = time(NULL);
  printf("%ld\n", now / 3600);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
movslq %eax,%rsi
imul   $0xffffffff91a2b3c5,%rsi,%rax
shr    $0x20,%rax
add    %eax,%esi
mov    %esi,%eax
shr    $0x1f,%eax
sar    $0xb,%esi
add    %eax,%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = sdiv i32 %1, 3600
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
int check_dec_str(char *str, int len) {
  int i = 0;
  for (i = 0; i < len; i++) {
    if (('0' <= str[i]) && (str[i] <= '9')) {
      ;
    } else {
      return -1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<check_dec_str>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1177 <check_dec_str+0x77>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x30,%eax
cmp    %ecx,%eax
jg     1158 <check_dec_str+0x58>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x39,%eax
jg     1158 <check_dec_str+0x58>
jmp    1164 <check_dec_str+0x64>
movl   $0xffffffff,-0x4(%rbp)
jmp    117e <check_dec_str+0x7e>
jmp    1169 <check_dec_str+0x69>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1119 <check_dec_str+0x19>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_dec_str>:
test   %esi,%esi
jle    1125 <check_dec_str+0x25>
mov    %esi,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rcx,1),%edx
add    $0xd0,%dl
cmp    $0xa,%dl
jae    1128 <check_dec_str+0x28>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <check_dec_str+0x10>
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @check_dec_str(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %14, %5
br i1 %7, label %15, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 0, %4 ], [ %14, %6 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = add i8 %11, -48
%13 = icmp ult i8 %12, 10
%14 = add nuw nsw i64 %9, 1
br i1 %13, label %6, label %15
15: ; preds = %8, %6, %2
%16 = phi i32 [ 0, %2 ], [ 0, %6 ], [ -1, %8 ]
ret i32 %16
}
char test_char_9(char a, char b, char c, char d, char e, char f, char g, char h,
                 char i) {
  return 0xd0;
}


x86 assembly (clang, -O0):
<test_char_9>:
push   %rbp
mov    %rsp,%rbp
mov    %r8d,-0x18(%rbp)
mov    %ecx,%eax
mov    -0x18(%rbp),%ecx
mov    %eax,-0x14(%rbp)
mov    %edx,%eax
mov    -0x14(%rbp),%edx
mov    %eax,-0x10(%rbp)
mov    %esi,%eax
mov    -0x10(%rbp),%esi
mov    %eax,-0xc(%rbp)
mov    %edi,%r8d
mov    -0xc(%rbp),%edi
mov    %r9b,%al
mov    0x20(%rbp),%r9b
mov    0x18(%rbp),%r9b
mov    0x10(%rbp),%r9b
mov    %r8b,-0x1(%rbp)
mov    %dil,-0x2(%rbp)
mov    %sil,-0x3(%rbp)
mov    %dl,-0x4(%rbp)
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    $0xd0,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_char_9>:
mov    $0xd0,%al
ret

LLVM IR (-O0):
define signext i8 @test_char_9(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3, i8 signext %4, i8 signext %5, i8 signext %6, i8 signext %7, i8 signext %8) {
%10 = alloca i8
%11 = alloca i8
%12 = alloca i8
%13 = alloca i8
%14 = alloca i8
%15 = alloca i8
%16 = alloca i8
%17 = alloca i8
%18 = alloca i8
store i8 %0, i8* %10
store i8 %1, i8* %11
store i8 %2, i8* %12
store i8 %3, i8* %13
store i8 %4, i8* %14
store i8 %5, i8* %15
store i8 %6, i8* %16
store i8 %7, i8* %17
store i8 %8, i8* %18
ret i8 -48
}

LLVM IR (-O2):
define signext i8 @test_char_9(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3, i8 signext %4, i8 signext %5, i8 signext %6, i8 signext %7, i8 signext %8) {
ret i8 -48
}
/* Variables and functions */
int ardour_main(int, char **);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int result = ardour_main(argc, argv);
  printf("main returned %d\n", result);
  return result;
}


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

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

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

LLVM IR (-O2):
@.str = [18 x i8] c"main returned %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @ardour_main(i32 %0, i8** %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xa9() {
  Assert_real((isxdigit(169) == 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_isxdigit.c",
              850, ("isxdigit should be 0 for 0xa9"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xa9>:
push   %rax
mov    $0xa9,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x352,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xa9\00"
define void @t_isxdigit_0xa9() {
%1 = call i64 @isxdigit(i32 169)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 850, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xa9\00"
define void @t_isxdigit_0xa9() {
%1 = tail call i64 @isxdigit(i32 169)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 850, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int raw_clz64(scalar_t__);
int clz64(uint64_t n) { return n ? raw_clz64(n) : 64; }


x86 assembly (clang, -O0):
<clz64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <clz64+0x28>
mov    -0x8(%rbp),%rdi
call   1030 <raw_clz64@plt>
mov    %eax,-0xc(%rbp)
jmp    1145 <clz64+0x35>
mov    $0x40,%eax
mov    %eax,-0xc(%rbp)
jmp    1145 <clz64+0x35>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clz64>:
test   %rdi,%rdi
je     111a <clz64+0xa>
jmp    1030 <raw_clz64@plt>
mov    $0x40,%eax
ret

LLVM IR (-O0):
define i32 @clz64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = call i32 @raw_clz64(i64 %6)
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %5
%10 = phi i32 [ %7, %5 ], [ 64, %8 ]
ret i32 %10
}

LLVM IR (-O2):
define i32 @clz64(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @raw_clz64(i64 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 64, %1 ]
ret i32 %6
}
cbuf20(f, n) { return (cbuf(f, n, 20)); }


x86 assembly (clang, -O0):
<cbuf20>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x14,%edx
mov    $0x0,%al
call   1030 <cbuf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuf20>:
mov    $0x14,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf20(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 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %5, i32 %6, i32 20)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cbuf20(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 20)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int act_of_god(void) {
  printf("Our crops failed Sire, perhaps the Gods are angry with us\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [59 x i8] c"Our crops failed Sire, perhaps the Gods are angry with us\0A\00"
define i32 @act_of_god() {
%1 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [58 x i8] c"Our crops failed Sire, perhaps the Gods are angry with us\00"
define i32 @act_of_god() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void X509v3_get_ext_by_OBJ(void) {}


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

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

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

LLVM IR (-O2):
define void @X509v3_get_ext_by_OBJ() {
ret void
}
char *hash_plugin_detailed(void) {
  return ("msoffice - Microsoft Office 2007/2010/2013 plugin\n"
          "------------------------------------------------\n"
          "Use this module to crack password-protected MSOffice files\n"
          "Input should be a MS Office file specified with -f\n"
          "Known software that uses this password hashing method:\n"
          "Microsoft Office: 2007, 2010, 2013.\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


x86 assembly (clang, -O0):
<hash_plugin_detailed>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_plugin_detailed>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [346 x i8] c"msoffice - Microsoft Office 2007/2010/2013 plugin\0A------------------------------------------------\0AUse this module to crack password-protected MSOffice files\0AInput should be a MS Office file specified with -f\0AKnown software that uses this password hashing method:\0AMicrosoft Office: 2007, 2010, 2013.\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([346 x i8], [346 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [346 x i8] c"msoffice - Microsoft Office 2007/2010/2013 plugin\0A------------------------------------------------\0AUse this module to crack password-protected MSOffice files\0AInput should be a MS Office file specified with -f\0AKnown software that uses this password hashing method:\0AMicrosoft Office: 2007, 2010, 2013.\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([346 x i8], [346 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ DrawCities();
int /*<<< orphan*/ DrawCursor();
int /*<<< orphan*/ DrawMeteors();
int /*<<< orphan*/ DrawMissileCommand();
int /*<<< orphan*/ DrawMissiles();
int /*<<< orphan*/ lc4_blt_vmem();
int /*<<< orphan*/ lc4_reset_vmem();
void Redraw() {
  lc4_reset_vmem();
  DrawCursor();
  DrawMissileCommand();
  DrawCities();
  DrawMissiles();
  DrawMeteors();
  lc4_blt_vmem();
}


x86 assembly (clang, -O0):
<Redraw>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <lc4_reset_vmem@plt>
mov    $0x0,%al
call   1080 <DrawCursor@plt>
mov    $0x0,%al
call   1060 <DrawMissileCommand@plt>
mov    $0x0,%al
call   1090 <DrawCities@plt>
mov    $0x0,%al
call   1070 <DrawMissiles@plt>
mov    $0x0,%al
call   1050 <DrawMeteors@plt>
mov    $0x0,%al
call   1030 <lc4_blt_vmem@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Redraw>:
push   %rax
xor    %eax,%eax
call   1040 <lc4_reset_vmem@plt>
xor    %eax,%eax
call   1080 <DrawCursor@plt>
xor    %eax,%eax
call   1060 <DrawMissileCommand@plt>
xor    %eax,%eax
call   1090 <DrawCities@plt>
xor    %eax,%eax
call   1070 <DrawMissiles@plt>
xor    %eax,%eax
call   1050 <DrawMeteors@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <lc4_blt_vmem@plt>

LLVM IR (-O0):
define void @Redraw() {
%1 = call i32 (...) @lc4_reset_vmem()
%2 = call i32 (...) @DrawCursor()
%3 = call i32 (...) @DrawMissileCommand()
%4 = call i32 (...) @DrawCities()
%5 = call i32 (...) @DrawMissiles()
%6 = call i32 (...) @DrawMeteors()
%7 = call i32 (...) @lc4_blt_vmem()
ret void
}

LLVM IR (-O2):
define void @Redraw() {
%1 = tail call i32 (...) @lc4_reset_vmem()
%2 = tail call i32 (...) @DrawCursor()
%3 = tail call i32 (...) @DrawMissileCommand()
%4 = tail call i32 (...) @DrawCities()
%5 = tail call i32 (...) @DrawMissiles()
%6 = tail call i32 (...) @DrawMeteors()
%7 = tail call i32 (...) @lc4_blt_vmem()
ret void
}
/* Variables and functions */
double ceil(double);
double fabs(double);
double const pow(double, double);
int calculateM(double x) {
  const double p = 4.3;
  double ax = fabs(x);
  double M = ceil(ax + p * pow(ax, 1.0 / 3.0) + 1.0);
  return (int)M;
}


x86 assembly (clang, -O0):
<calculateM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xeda(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xeaa(%rip),%xmm1
call   1040 <pow@plt>
movsd  -0x28(%rbp),%xmm1
movsd  0xe90(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe78(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <ceil@plt>
movsd  %xmm0,-0x20(%rbp)
cvttsd2si -0x20(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateM>:
sub    $0x18,%rsp
andpd  0xed4(%rip),%xmm0
movapd %xmm0,(%rsp)
movsd  0xed7(%rip),%xmm1
call   1040 <pow@plt>
mulsd  0xed2(%rip),%xmm0
addsd  (%rsp),%xmm0
addsd  0xecd(%rip),%xmm0
call   1030 <ceil@plt>
cvttsd2si %xmm0,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @calculateM(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %2
store double 4.300000e+00, double* %3
%6 = load double, double* %2
%7 = call double @llvm.fabs.f64(double %6)
store double %7, double* %4
%8 = load double, double* %4
%9 = load double, double* %4
%10 = call double @pow(double %9, double 0x3FD5555555555555)
%11 = call double @llvm.fmuladd.f64(double 4.300000e+00, double %10, double %8)
%12 = fadd double %11, 1.000000e+00
%13 = call double @llvm.ceil.f64(double %12)
store double %13, double* %5
%14 = load double, double* %5
%15 = fptosi double %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @calculateM(double %0) {
%2 = tail call double @llvm.fabs.f64(double %0)
%3 = tail call double @pow(double %2, double 0x3FD5555555555555)
%4 = tail call double @llvm.fmuladd.f64(double %3, double 4.300000e+00, double %2)
%5 = fadd double %4, 1.000000e+00
%6 = tail call double @llvm.ceil.f64(double %5)
%7 = fptosi double %6 to i32
ret i32 %7
}
int rem_handler(char **save, int *repeats_left) {
  (void)save;
  (void)repeats_left;
  return 3;
}


x86 assembly (clang, -O0):
<rem_handler>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x3,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @rem_handler(i8** nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "Usage: gen [-s <student-id>] [-t <size-of-subset>] [-b] [-l]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [62 x i8] c"Usage: gen [-s <student-id>] [-t <size-of-subset>] [-b] [-l]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [62 x i8] c"Usage: gen [-s <student-id>] [-t <size-of-subset>] [-b] [-l]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int swapone(int *A, int left, int right) {
  int tmp;
  tmp = A[left];
  A[left] = A[right];
  A[right] = tmp;
  return 0;
}


x86 assembly (clang, -O0):
<swapone>:
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)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @swapone(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 i32 0
}

LLVM IR (-O2):
define i32 @swapone(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 i32 0
}
unsigned xrop3_228_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = T ^ S;
  stk2 = D & stk3;
  stk1 = S ^ stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_228_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_228_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
xor    %edi,%esi
not    %eax
and    %esi,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_228_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = load i32, i32* %6
%25 = xor i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %5
%27 = load i32, i32* %10
%28 = and i32 %26, %27
store i32 %28, i32* %9
%29 = load i32, i32* %6
%30 = load i32, i32* %9
%31 = xor i32 %29, %30
store i32 %31, i32* %8
%32 = load i32, i32* %8
%33 = load i32, i32* %6
%34 = xor i32 %33, -1
%35 = and i32 %32, %34
%36 = load i32, i32* %5
%37 = load i32, i32* %6
%38 = and i32 %36, %37
%39 = or i32 %35, %38
ret i32 %39
}

LLVM IR (-O2):
define i32 @xrop3_228_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = xor i8 %1, %0
%6 = zext i8 %5 to i32
%7 = xor i32 %4, -1
%8 = and i32 %6, %7
%9 = or i32 %8, %3
ret i32 %9
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long visualid;
};
typedef TYPE_1__ XStandardColormap;

/* Variables and functions */
void set_XStandardColormap_visualid(void *_p, unsigned long _v) {
  ((XStandardColormap *)_p)->visualid = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XStandardColormap_visualid(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XStandardColormap_visualid(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
double dot(double x0, double y0, double x1, double y1, double x2, double y2) {
  return (x1 - x0) * (x2 - x0) + (y1 - y0) * (y2 - y0);
}


x86 assembly (clang, -O0):
<dot>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
subsd  -0x8(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm3
subsd  -0x10(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot>:
subsd  %xmm0,%xmm2
subsd  %xmm0,%xmm4
mulsd  %xmm2,%xmm4
subsd  %xmm1,%xmm3
subsd  %xmm1,%xmm5
mulsd  %xmm3,%xmm5
addsd  %xmm4,%xmm5
movapd %xmm5,%xmm0
ret

LLVM IR (-O0):
define double @dot(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%13 = load double, double* %9
%14 = load double, double* %7
%15 = fsub double %13, %14
%16 = load double, double* %11
%17 = load double, double* %7
%18 = fsub double %16, %17
%19 = load double, double* %10
%20 = load double, double* %8
%21 = fsub double %19, %20
%22 = load double, double* %12
%23 = load double, double* %8
%24 = fsub double %22, %23
%25 = fmul double %21, %24
%26 = call double @llvm.fmuladd.f64(double %15, double %18, double %25)
ret double %26
}

LLVM IR (-O2):
define double @dot(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fsub double %2, %0
%8 = fsub double %4, %0
%9 = fsub double %3, %1
%10 = fsub double %5, %1
%11 = fmul double %9, %10
%12 = tail call double @llvm.fmuladd.f64(double %7, double %8, double %11)
ret double %12
}
char *mkdtemp(char *template) {
  anvil_syslog(0, "%s unimplemented\n", __FUNCTION__);
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<mkdtemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
lea    0xedb(%rip),%rsi
lea    0xee6(%rip),%rdx
mov    $0x0,%al
call   1030 <anvil_syslog@plt>
jmp    1133 <mkdtemp+0x23>

x86 assembly (clang, -O2):
<mkdtemp>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xef3(%rip),%rdx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <anvil_syslog@plt>
nopl   0x0(%rax,%rax,1)
jmp    1130 <mkdtemp+0x20>

LLVM IR (-O0):
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.mkdtemp = [8 x i8] c"mkdtemp\00"
define i8* @mkdtemp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__FUNCTION__.mkdtemp, i64 0, i64 0))
br label %4
4: ; preds = %1, %4
br label %4
}

LLVM IR (-O2):
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.mkdtemp = [8 x i8] c"mkdtemp\00"
define i8* @mkdtemp(i8* nocapture readnone %0) {
%2 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__FUNCTION__.mkdtemp, i64 0, i64 0))
br label %3
3: ; preds = %1, %3
br label %3
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ __builtin_wrctl(int /*<<< orphan*/, int);
void _Nios2_Set_ctlreg_status(uint32_t value) {
  __builtin_wrctl(0, (int)value);
}


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

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

LLVM IR (-O0):
define void @_Nios2_Set_ctlreg_status(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = call i32 @__builtin_wrctl(i32 0, i32 %4)
ret void
}

LLVM IR (-O2):
define void @_Nios2_Set_ctlreg_status(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call i32 @__builtin_wrctl(i32 0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char);
int main(void) {
  char ch = 'M';
  signed char ch2 = 'M';
  printf("character with modifier: %c and without modifier %c\n", ch2, ch);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x4d,-0x5(%rbp)
movb   $0x4d,-0x6(%rbp)
mov    -0x6(%rbp),%al
lea    0xecf(%rip),%rdi
movsbl %al,%esi
movsbl -0x5(%rbp),%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [53 x i8] c"character with modifier: %c and without modifier %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
store i8 77, i8* %2
store i8 77, i8* %3
%4 = load i8, i8* %3
%5 = load i8, i8* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8 signext %4, i8 signext %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [53 x i8] c"character with modifier: %c and without modifier %c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8 signext 77, i8 signext 77)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ begin_tests();
int /*<<< orphan*/ finish_tests();
void main() {
  begin_tests();
  finish_tests();
}


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

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

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @begin_tests()
%2 = call i32 (...) @finish_tests()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @begin_tests()
%2 = tail call i32 (...) @finish_tests()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add_a_n();
void opcode_c6() { add_a_n(); }


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

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

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

LLVM IR (-O2):
define void @opcode_c6() {
%1 = tail call i32 (...) @add_a_n()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ synbad();
scalar_t__ word();
int chkword() {
  if (word())
    synbad();
}


x86 assembly (clang, -O0):
<chkword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <word@plt>
cmp    $0x0,%rax
je     1140 <chkword+0x20>
mov    $0x0,%al
call   1030 <synbad@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chkword>:
push   %rax
xor    %eax,%eax
call   1040 <word@plt>
test   %rax,%rax
je     1134 <chkword+0x14>
xor    %eax,%eax
call   1030 <synbad@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @chkword() {
%1 = alloca i32
%2 = call i64 (...) @word()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @synbad()
br label %6
6: ; preds = %4, %0
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @chkword() {
%1 = tail call i64 (...) @word()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @synbad()
br label %5
5: ; preds = %3, %0
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ demo_error();
void main() { demo_error(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @demo_error()
ret void
}
void foo765(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo765(i32 %0) {
ret void
}
/* Variables and functions */
int ece391_lseek(int, int, int);
int lseek(int file, int ptr, int dir) { return ece391_lseek(file, ptr, dir); }


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

x86 assembly (clang, -O2):
<lseek>:
jmp    1030 <ece391_lseek@plt>

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

LLVM IR (-O2):
define i32 @lseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @ece391_lseek(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
scalar_t__ *strpbrk(char *, char *);
size_t strspn(char *, char *);
char *StrValid(char *str) {
  *(strpbrk(str, "\r\n\0")) = 0;
  return &str[strspn(str, "\t ")];
}


x86 assembly (clang, -O0):
<StrValid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <strpbrk@plt>
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeae(%rip),%rsi
call   1030 <strspn@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrValid>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
call   1040 <strpbrk@plt>
movq   $0x0,(%rax)
lea    0xec6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strspn@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"\0D\0A\00\00"
@.str.1 = [3 x i8] c"\09 \00"
define i8* @StrValid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64* @strpbrk(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i64 0, i64* %4
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = call i64 @strspn(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%8 = getelementptr inbounds i8, i8* %5, i64 %7
ret i8* %8
}

LLVM IR (-O2):
@.str = [4 x i8] c"\0D\0A\00\00"
@.str.1 = [3 x i8] c"\09 \00"
define i8* @StrValid(i8* %0) {
%2 = tail call i64* @strpbrk(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i64 0, i64* %2
%3 = tail call i64 @strspn(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = getelementptr inbounds i8, i8* %0, i64 %3
ret i8* %4
}