xunge/DecIR huggingface dataset:
/* Type definitions */
struct Enemy {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ free(struct Enemy *);
void Enemy_destroy(struct Enemy *enemy) {
  assert(enemy != NULL);
  free(enemy);
}


x86 assembly (clang, -O0):
<Enemy_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Enemy_destroy>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.Enemy = type { i32 }
define void @Enemy_destroy(%struct.Enemy* %0) {
%2 = alloca %struct.Enemy*
store %struct.Enemy* %0, %struct.Enemy** %2
%3 = load %struct.Enemy*, %struct.Enemy** %2
%4 = icmp ne %struct.Enemy* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load %struct.Enemy*, %struct.Enemy** %2
%8 = call i32 @free(%struct.Enemy* %7)
ret void
}

LLVM IR (-O2):
%struct.Enemy = type { i32 }
define void @Enemy_destroy(%struct.Enemy* %0) {
%2 = icmp ne %struct.Enemy* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @free(%struct.Enemy* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mu_assert(char *, int);
int /*<<< orphan*/ split_n_sort(int *, int);
char *test_split_n_sort_one_elements() {
  int a[] = {1};
  split_n_sort(a, 1);
  mu_assert("sorted[0] != 1", a[0] == 1);
  return 0;
}


x86 assembly (clang, -O0):
<test_split_n_sort_one_elements>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
mov    $0x1,%esi
call   1030 <split_n_sort@plt>
cmpl   $0x1,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xeb2(%rip),%rdi
call   1040 <mu_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_split_n_sort_one_elements>:
push   %rax
movl   $0x1,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x1,%esi
call   1030 <split_n_sort@plt>
xor    %esi,%esi
cmpl   $0x1,0x4(%rsp)
sete   %sil
lea    0xeb6(%rip),%rdi
call   1040 <mu_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.test_split_n_sort_one_elements.a = [1 x i32] [i32 1]
@.str = [15 x i8] c"sorted[0] != 1\00"
define i8* @test_split_n_sort_one_elements() {
%1 = alloca [1 x i32]
%2 = bitcast [1 x i32]* %1 to i8*
%3 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
%4 = call i32 @split_n_sort(i32* %3, i32 1)
%5 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
%9 = call i32 @mu_assert(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i8* null
}

LLVM IR (-O2):
@.str = [15 x i8] c"sorted[0] != 1\00"
define noalias i8* @test_split_n_sort_one_elements() {
%1 = alloca [1 x i32]
%2 = bitcast [1 x i32]* %1 to i8*
%3 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
store i32 1, i32* %3
%4 = call i32 @split_n_sort(i32* %3, i32 1)
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = call i32 @mu_assert(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int main() {
  char str[128];
  printf("Enter a string\n");
  gets(str);
  puts(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
lea    -0x90(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x90(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Enter a string\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i8]
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%7 = call i32 @puts(i8* %6)
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"Enter a string\00"
define i32 @main() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call i32 @puts(i8* %2)
ret i32 0
}
/* Variables and functions */
int ebbrt_newlib_write(int, char *, int);
int write(int file, char *ptr, int len) {
  return ebbrt_newlib_write(file, ptr, len);
}


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <ebbrt_newlib_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write>:
jmp    1030 <ebbrt_newlib_write@plt>

LLVM IR (-O0):
define i32 @write(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
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @ebbrt_newlib_write(i32 %7, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @write(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @ebbrt_newlib_write(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int initialize_standard_solution(int k) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc4c(503, &k, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<initialize_standard_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1f7,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_standard_solution>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1f7,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @initialize_standard_solution(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %4
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 503, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @initialize_standard_solution(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 503, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
int ponechar(prompt)
char *prompt;
{
  printf("%s", prompt);
  return (onechar());
}


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

x86 assembly (clang, -O2):
<ponechar>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <onechar@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @ponechar(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @onechar()
ret i32 %3
}
int compare(const void *x, const void *y) { return *(int *)y - *(int *)x; }


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

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

LLVM IR (-O0):
define i32 @compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ enqueue(char);
void interpretor(char *str, int init) {
  if (str[init] != '\n' && str[init] != '\0') {
    enqueue(str[init]);
    interpretor(str, ++init);
  }
}


x86 assembly (clang, -O0):
<interpretor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
je     117c <interpretor+0x5c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     117c <interpretor+0x5c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <enqueue@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0xc(%rbp)
call   1030 <interpretor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpretor>:
push   %rbx
movslq %esi,%rbx
add    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
movzbl (%rbx),%eax
test   %al,%al
je     1139 <interpretor+0x29>
cmp    $0xa,%al
je     1139 <interpretor+0x29>
movsbl %al,%edi
call   1030 <enqueue@plt>
add    $0x1,%rbx
jmp    1120 <interpretor+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @interpretor(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %8, %2
%5 = phi i64 [ %10, %8 ], [ %3, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
switch i8 %7, label %8 [
i8 10, label %11
i8 0, label %11
]
8: ; preds = %4
%9 = tail call i32 @enqueue(i8 signext %7)
%10 = add i64 %5, 1
br label %4
11: ; preds = %4, %4
ret void
}
void set_trace_clock_is_sync(int state) {}


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

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

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

LLVM IR (-O2):
define void @set_trace_clock_is_sync(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ islower(int);
scalar_t__ isupper(int);
extern __attribute__((gnu_)) int isalpha(int __c) {
  return islower(__c) || isupper(__c);
}


x86 assembly (clang, -O0):
<isalpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <islower@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1157 <isalpha+0x37>
mov    -0x4(%rbp),%edi
call   1040 <isupper@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalpha>:
push   %rbx
mov    %edi,%ebx
call   1030 <islower@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <isalpha+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <isupper@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isalpha(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @islower(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @isupper(i32 %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isalpha(i32 %0) {
%2 = tail call i64 @islower(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @isupper(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ cha_perror(char *);
int /*<<< orphan*/ exit(int);
void cha_exit_perror(char *s) {
  cha_perror(s);
  exit(1);
}


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

x86 assembly (clang, -O2):
<cha_exit_perror>:
push   %rax
call   1030 <cha_perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @cha_exit_perror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @cha_perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @cha_exit_perror(i8* %0) {
%2 = tail call i32 @cha_perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int ispunct(int c __attribute__((__unused__))) { abort(); }


x86 assembly (clang, -O0):
<ispunct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

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

LLVM IR (-O0):
define i32 @ispunct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @ispunct(i32 %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
void lmb_set_nid(struct drmem_lmb *lmb) {}


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

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

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

LLVM IR (-O2):
%struct.drmem_lmb = type opaque
define void @lmb_set_nid(%struct.drmem_lmb* nocapture %0) {
ret void
}
void c_setlist() { ; }


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

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

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

LLVM IR (-O2):
define void @c_setlist() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
void print_l(long num) { printf("%ld\n", num); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define void @print_l(i64 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, char *, float);
char assemble(int empID, char name[21], float hours, char timeCard[51]) {
  sprintf(timeCard, " %d %s %4.2f hrs", empID, name, hours);
  return (timeCard[51]);
}


x86 assembly (clang, -O0):
<assemble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
movss  -0x14(%rbp),%xmm0
lea    0xec1(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x20(%rbp),%rax
movsbl 0x33(%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assemble>:
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%rcx
mov    %edi,%edx
lea    0xee0(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    0x33(%rbx),%al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c" %d %s %4.2f hrs\00"
define signext i8 @assemble(i32 %0, i8* %1, float %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca float
%8 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store float %2, float* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %8
%10 = load i32, i32* %5
%11 = load i8*, i8** %6
%12 = load float, float* %7
%13 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %11, float %12)
%14 = load i8*, i8** %8
%15 = getelementptr inbounds i8, i8* %14, i64 51
%16 = load i8, i8* %15
ret i8 %16
}

LLVM IR (-O2):
@.str = [17 x i8] c" %d %s %4.2f hrs\00"
define signext i8 @assemble(i32 %0, i8* %1, float %2, i8* nocapture %3) {
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1, float %2)
%6 = getelementptr inbounds i8, i8* %3, i64 51
%7 = load i8, i8* %6
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int i = 0;
  goto there;
here:
  printf("not here\n");
  i = 1;
there:
  printf("but here\n");
  if (i == 0)
    goto here;
done:
  return 0;
}


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)
movl   $0x0,-0x14(%rbp)
jmp    1145 <main+0x35>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x14(%rbp)
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x14(%rbp)
jne    1160 <main+0x50>
jmp    1132 <main+0x22>
jmp    1165 <main+0x55>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"not here\0A\00"
@.str.1 = [10 x i8] c"but here\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
store i32 0, i32* %6
br label %9
7: ; preds = %13
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %6
br label %9
9: ; preds = %7, %2
%10 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32, i32* %6
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %9
br label %7
14: ; preds = %9
br label %15
15: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
@str = [9 x i8] c"but here\00"
@str.2 = [9 x i8] c"not here\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.2, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct mspan {
  int dummy;
};
struct mheap {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __mheap_free(struct mheap *, struct mspan *);
int /*<<< orphan*/ spin_lock(struct mheap *);
int /*<<< orphan*/ spin_unlock(struct mheap *);
void mheap_free(struct mheap *heap, struct mspan *span) {
  spin_lock(heap);
  __mheap_free(heap, span);
  spin_unlock(heap);
}


x86 assembly (clang, -O0):
<mheap_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <spin_lock@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <__mheap_free@plt>
mov    -0x8(%rbp),%rdi
call   1040 <spin_unlock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mheap_free>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <spin_lock@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <__mheap_free@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <spin_unlock@plt>

LLVM IR (-O0):
%struct.mheap = type { i32 }
%struct.mspan = type { i32 }
define void @mheap_free(%struct.mheap* %0, %struct.mspan* %1) {
%3 = alloca %struct.mheap*
%4 = alloca %struct.mspan*
store %struct.mheap* %0, %struct.mheap** %3
store %struct.mspan* %1, %struct.mspan** %4
%5 = load %struct.mheap*, %struct.mheap** %3
%6 = call i32 @spin_lock(%struct.mheap* %5)
%7 = load %struct.mheap*, %struct.mheap** %3
%8 = load %struct.mspan*, %struct.mspan** %4
%9 = call i32 @__mheap_free(%struct.mheap* %7, %struct.mspan* %8)
%10 = load %struct.mheap*, %struct.mheap** %3
%11 = call i32 @spin_unlock(%struct.mheap* %10)
ret void
}

LLVM IR (-O2):
%struct.mheap = type { i32 }
%struct.mspan = type { i32 }
define void @mheap_free(%struct.mheap* %0, %struct.mspan* %1) {
%3 = tail call i32 @spin_lock(%struct.mheap* %0)
%4 = tail call i32 @__mheap_free(%struct.mheap* %0, %struct.mspan* %1)
%5 = tail call i32 @spin_unlock(%struct.mheap* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int ara[] = {1, 2, 3, 4, 1, 2, 3};
  int result, i, n = 7;
  result = ara[0];
  for (i = 1; i < n; i++) {
    result = result ^ ara[i];
  }
  printf("Result: %d\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed2(%rip),%eax
mov    %eax,-0x8(%rbp)
movl   $0x7,-0x2c(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1185 <main+0x75>
mov    -0x24(%rbp),%eax
movslq -0x28(%rbp),%rcx
xor    -0x20(%rbp,%rcx,4),%eax
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    115d <main+0x4d>
mov    -0x24(%rbp),%esi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"Result: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int T_f(char *s) {
  debug("T_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<T_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<T_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf03(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [44 x i8] c"T_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @T_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [44 x i8] c"T_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @T_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *name) { fprintf(stderr, "Usage: %s [dl file]\n", name); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"Usage: %s [dl file]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"Usage: %s [dl file]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
const char *pcre_version(void) {
  return "4"
         "."
         "2"
         " "
         "14-Apr-2003";
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"4.2 14-Apr-2003\00"
define i8* @pcre_version() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"4.2 14-Apr-2003\00"
define i8* @pcre_version() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
void *a6(int);
void *a5(int x) { return (((x >> 5) & 1) ? a6(x) : a6(x)); }


x86 assembly (clang, -O0):
<a5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x5,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     113e <a5+0x2e>
mov    -0x4(%rbp),%edi
call   1030 <a6@plt>
mov    %rax,-0x10(%rbp)
jmp    114a <a5+0x3a>
mov    -0x4(%rbp),%edi
call   1030 <a6@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a5>:
jmp    1030 <a6@plt>

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

LLVM IR (-O2):
define i8* @a5(i32 %0) {
%2 = tail call i8* @a6(i32 %0)
ret i8* %2
}
void foo604() {}


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

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

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

LLVM IR (-O2):
define void @foo604() {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_parse_request();
int /*<<< orphan*/ test_rbtree();
int main(int argc, char **argv) {
  test_parse_request();
  printf("\n");
  test_rbtree();
  printf("\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <test_parse_request@plt>
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <test_rbtree@plt>
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_parse_request@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <test_rbtree@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_parse_request()
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 (...) @test_rbtree()
%6 = tail call i32 @putchar(i32 10)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sequeeze(char *, char *);
main() {
  char s1[] = "Hello world!";
  char s2[] = "ol";
  sequeeze(s1, s2);
  printf("%s\n", s1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0xd(%rbp)
mov    0xecf(%rip),%eax
mov    %eax,-0x5(%rbp)
mov    0xeca(%rip),%al
mov    %al,-0x1(%rbp)
mov    0xec1(%rip),%ax
mov    %ax,-0x10(%rbp)
mov    0xeb9(%rip),%al
mov    %al,-0xe(%rbp)
lea    -0xd(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <sequeeze@plt>
lea    -0xd(%rbp),%rsi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movabs $0x21646c726f7720,%rax
mov    %rax,0x15(%rsp)
movabs $0x6f77206f6c6c6548,%rax
20 77 6f
mov    %rax,0x10(%rsp)
movb   $0x0,0xe(%rsp)
movw   $0x6c6f,0xc(%rsp)
lea    0x10(%rsp),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <sequeeze@plt>
lea    0xea8(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.s1 = [13 x i8] c"Hello world!\00"
@__const.main.s2 = [3 x i8] c"ol\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [13 x i8]
%2 = alloca [3 x i8]
%3 = bitcast [13 x i8]* %1 to i8*
%4 = bitcast [3 x i8]* %2 to i8*
%5 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%7 = call i32 @sequeeze(i8* %5, i8* %6)
%8 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s1 = [13 x i8] c"Hello world!\00"
@__const.main.s2 = [3 x i8] c"ol\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [13 x i8]
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%5 = call i32 @sequeeze(i8* %3, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
int main_interpr(int, char **);
int main(int argc, char *argv[]) { return main_interpr(argc, argv); }


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <main_interpr@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @main_interpr(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
double M_PI;
double sin(double);
double iterate(double x_n) { return (sin(M_PI * x_n)); }


x86 assembly (clang, -O0):
<iterate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    0x2ec4(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iterate>:
mov    0x2ed1(%rip),%rax
mulsd  (%rax),%xmm0
jmp    1030 <sin@plt>

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @iterate(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* @M_PI
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = call double @sin(double %5)
ret double %6
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @iterate(double %0) {
%2 = load double, double* @M_PI
%3 = fmul double %2, %0
%4 = tail call double @sin(double %3)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ lshifts(int /*<<< orphan*/, int);
int /*<<< orphan*/ lshiftu(unsigned int, unsigned int);
int rshifts(int, int /*<<< orphan*/);
int foo(unsigned int val) {
  return rshifts(1 + val, lshifts(lshiftu(val, val), 1));
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1040 <lshiftu@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <lshifts@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1050 <rshifts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
lea    0x1(%rdi),%ebx
mov    %edi,%esi
call   1040 <lshiftu@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <lshifts@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1050 <rshifts@plt>

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 1, %3
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @lshiftu(i32 %5, i32 %6)
%8 = call i32 @lshifts(i32 %7, i32 1)
%9 = call i32 @rshifts(i32 %4, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = add i32 %0, 1
%3 = tail call i32 @lshiftu(i32 %0, i32 %0)
%4 = tail call i32 @lshifts(i32 %3, i32 1)
%5 = tail call i32 @rshifts(i32 %2, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ strv_remove(char **, char *);
char **strv_uniq(char **l) {
  char **i;
  for ((i) = (l); (i) && *(i); (i)++) {
    strv_remove(i + 1, *i);
  }
  return l;
}


x86 assembly (clang, -O0):
<strv_uniq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     1142 <strv_uniq+0x32>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1152 <strv_uniq+0x42>
jmp    1177 <strv_uniq+0x67>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strv_remove@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <strv_uniq+0x14>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strv_uniq>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %rdi,%rdi
je     1144 <strv_uniq+0x34>
mov    (%r14),%rsi
test   %rsi,%rsi
je     1144 <strv_uniq+0x34>
lea    0x8(%r14),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <strv_remove@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1130 <strv_uniq+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8** @strv_uniq(i8** returned %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %11, %6 ], [ %4, %3 ]
%8 = phi i8** [ %9, %6 ], [ %0, %3 ]
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = tail call i32 @strv_remove(i8** %9, i8* %7)
%11 = load i8*, i8** %9
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
ret i8** %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void os_trace_api_ret_u32(unsigned id, uint32_t return_value) {}


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

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

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

LLVM IR (-O2):
define void @os_trace_api_ret_u32(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ invalid_parse();
int report(char *);
int /*<<< orphan*/ valid_parse();
int parse_tests() {
  valid_parse();
  invalid_parse();
  return report("Parse");
}


x86 assembly (clang, -O0):
<parse_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <valid_parse@plt>
mov    $0x0,%al
call   1040 <invalid_parse@plt>
lea    0xeb7(%rip),%rdi
call   1050 <report@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_tests>:
push   %rax
xor    %eax,%eax
call   1030 <valid_parse@plt>
xor    %eax,%eax
call   1040 <invalid_parse@plt>
lea    0xeba(%rip),%rdi
pop    %rax
jmp    1050 <report@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"Parse\00"
define i32 @parse_tests() {
%1 = call i32 (...) @valid_parse()
%2 = call i32 (...) @invalid_parse()
%3 = call i32 @report(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}

LLVM IR (-O2):
@.str = [6 x i8] c"Parse\00"
define i32 @parse_tests() {
%1 = tail call i32 (...) @valid_parse()
%2 = tail call i32 (...) @invalid_parse()
%3 = tail call i32 @report(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
int foo() { int a = 5; }


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

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

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

LLVM IR (-O2):
define i32 @foo() {
ret i32 undef
}
void configure_log(void) {}


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

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

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

LLVM IR (-O2):
define void @configure_log() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test29_AvrPin_clear__E();
void test29_Led_off__E() { test29_AvrPin_clear__E(); }


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

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

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

LLVM IR (-O2):
define void @test29_Led_off__E() {
%1 = tail call i32 (...) @test29_AvrPin_clear__E()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ newton(double);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void main() {
  double x = 1;
  printf("root = %lf\n", newton(x));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xed0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <newton@plt>
mov    %eax,%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1040 <newton@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"root = %lf\0A\00"
define void @main() {
%1 = alloca double
store double 1.000000e+00, double* %1
%2 = load double, double* %1
%3 = call i32 @newton(double %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"root = %lf\0A\00"
define void @main() {
%1 = tail call i32 @newton(double 1.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x25() {
  Assert_real((isdigit(37) == 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",
              190, ("isdigit should be 0 for %"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x25>:
push   %rax
mov    $0x25,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xbe,%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 = [26 x i8] c"isdigit should be 0 for %\00"
define void @t_isdigit_0x25() {
%1 = call i64 @isdigit(i32 37)
%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 190, i8* getelementptr inbounds ([26 x i8], [26 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 = [26 x i8] c"isdigit should be 0 for %\00"
define void @t_isdigit_0x25() {
%1 = tail call i64 @isdigit(i32 37)
%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 190, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}