xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ malloc(int);
unsigned char *CreateData(int len) {
  unsigned char *data = (unsigned char *)malloc(len);
  int counter = len;
  for (counter = 0; counter < len; counter++)
    data[counter] = 0;
  return data;
}


x86 assembly (clang, -O0):
<CreateData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115a <CreateData+0x4a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1134 <CreateData+0x24>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CreateData>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %ebp,%ebp
jle    113d <CreateData+0x1d>
mov    %ebp,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @CreateData(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = load i32, i32* %2
store i32 %8, i32* %4
store i32 0, i32* %4
br label %9
9: ; preds = %18, %1
%10 = load i32, i32* %4
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %21
13: ; preds = %9
%14 = load i8*, i8** %3
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 0, i8* %17
br label %18
18: ; preds = %13
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
br label %9
21: ; preds = %9
%22 = load i8*, i8** %3
ret i8* %22
}

LLVM IR (-O2):
define i8* @CreateData(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = inttoptr i64 %2 to i8*
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ SendAsync_Sample();
int main(void) {
  SendAsync_Sample();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <SendAsync_Sample@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @SendAsync_Sample()
ret i32 0
}
/* Type definitions */
struct TaskQueue {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ spinlock_destroy(struct TaskQueue *);
void taskqueue_exit(struct TaskQueue *tq) { spinlock_destroy(tq); }


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

x86 assembly (clang, -O2):
<taskqueue_exit>:
jmp    1030 <spinlock_destroy@plt>

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

LLVM IR (-O2):
%struct.TaskQueue = type { i32 }
define void @taskqueue_exit(%struct.TaskQueue* %0) {
%2 = tail call i32 @spinlock_destroy(%struct.TaskQueue* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Console_SetDevice(char *);
int Console_Init(void) { Console_SetDevice("serial_dbg_t32"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"serial_dbg_t32\00"
define i32 @Console_Init() {
%1 = alloca i32
%2 = call i32 @Console_SetDevice(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [15 x i8] c"serial_dbg_t32\00"
define i32 @Console_Init() {
%1 = tail call i32 @Console_SetDevice(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
int is_whitespace(char ch) {
  return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r';
}


x86 assembly (clang, -O0):
<is_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_whitespace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_whitespace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_whitespace+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0xd,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_whitespace>:
cmp    $0x20,%dil
ja     1120 <is_whitespace+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <is_whitespace+0x20>
ret
xor    %eax,%eax
cmp    $0xd,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_whitespace(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 32
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 9
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 10
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 13
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @is_whitespace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 10, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 13
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void destroy_string(char *s) { free(s); }


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

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

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

LLVM IR (-O2):
define void @destroy_string(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void fatal1(char *msg, char *arg) {
  printf(msg, arg);
  exit(-1);
}


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

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

LLVM IR (-O0):
define void @fatal1(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* %5, i8* %6)
%8 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define void @fatal1(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* %0, i8* %1)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
int is_vowel(ch)
int ch;
{
  return ((ch == 'a') || (ch == 'e') || (ch == 'i') || (ch == 'o') ||
          (ch == 'u'));
}


x86 assembly (clang, -O0):
<is_vowel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114d <is_vowel+0x4d>
mov    $0x1,%al
cmpl   $0x65,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114d <is_vowel+0x4d>
mov    $0x1,%al
cmpl   $0x69,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114d <is_vowel+0x4d>
mov    $0x1,%al
cmpl   $0x6f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114d <is_vowel+0x4d>
cmpl   $0x75,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_vowel>:
lea    -0x61(%rdi),%ecx
ror    %ecx
cmp    $0x8,%ecx
jae    1119 <is_vowel+0x19>
mov    $0x1,%eax
mov    $0x95,%edx
bt     %ecx,%edx
jb     1121 <is_vowel+0x21>
xor    %eax,%eax
cmp    $0x75,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_vowel(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 97
br i1 %4, label %17, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 101
br i1 %7, label %17, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 105
br i1 %10, label %17, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 111
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 117
br label %17
17: ; preds = %14, %11, %8, %5, %1
%18 = phi i1 [ true, %11 ], [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %16, %14 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @is_vowel(i32 %0) {
%2 = add i32 %0, -97
%3 = tail call i32 @llvm.fshl.i32(i32 %2, i32 %2, i32 31)
%4 = icmp ult i32 %3, 8
br i1 %4, label %8, label %5
5: ; preds = %8, %1
%6 = icmp eq i32 %0, 117
%7 = zext i1 %6 to i32
br label %13
8: ; preds = %1
%9 = trunc i32 %3 to i8
%10 = lshr i8 -107, %9
%11 = and i8 %10, 1
%12 = icmp eq i8 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %8, %5
%14 = phi i32 [ %7, %5 ], [ 1, %8 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void erroFatalMemoria() {
  printf("\nERRO FATAL: Sem memoria para alocar.\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<erroFatalMemoria>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<erroFatalMemoria>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"\0AERRO FATAL: Sem memoria para alocar.\0A\00"
define void @erroFatalMemoria() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [38 x i8] c"\0AERRO FATAL: Sem memoria para alocar.\00"
define void @erroFatalMemoria() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
void rop3_70_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = T & *D;
  stk2 = S | stk3;
  stk1 = *D ^ stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_70_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
and    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_70_0_0>:
mov    (%rdi),%al
and    %al,%dl
or     %sil,%dl
xor    %al,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_70_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = and i32 %11, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8*, i8** %4
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = load i8, i8* %8
%27 = zext i8 %26 to i32
%28 = xor i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = load i8*, i8** %4
store i8 %30, i8* %31
ret void
}

LLVM IR (-O2):
define void @rop3_70_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %2
%6 = or i8 %5, %1
%7 = xor i8 %6, %4
store i8 %7, i8* %0
ret void
}
/* Variables and functions */
int setpgid(int /*<<< orphan*/, int /*<<< orphan*/);
int setpgrp(void) { return setpgid(0, 0); }


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

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

LLVM IR (-O0):
define i32 @setpgrp() {
%1 = call i32 @setpgid(i32 0, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @setpgrp() {
%1 = tail call i32 @setpgid(i32 0, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ ruth_aaron(int, int);
int main(int argc, char *argv[]) {
  ruth_aaron(714, 715);
  ruth_aaron(77, 78);
  ruth_aaron(20, 21);
  ruth_aaron(5, 6);
  ruth_aaron(2107, 2108);
  ruth_aaron(492, 493);
  ruth_aaron(128, 129);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x2ca,%edi
mov    $0x2cb,%esi
call   1030 <ruth_aaron@plt>
mov    $0x4d,%edi
mov    $0x4e,%esi
call   1030 <ruth_aaron@plt>
mov    $0x14,%edi
mov    $0x15,%esi
call   1030 <ruth_aaron@plt>
mov    $0x5,%edi
mov    $0x6,%esi
call   1030 <ruth_aaron@plt>
mov    $0x83b,%edi
mov    $0x83c,%esi
call   1030 <ruth_aaron@plt>
mov    $0x1ec,%edi
mov    $0x1ed,%esi
call   1030 <ruth_aaron@plt>
mov    $0x80,%edi
mov    $0x81,%esi
call   1030 <ruth_aaron@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2ca,%edi
mov    $0x2cb,%esi
call   1030 <ruth_aaron@plt>
mov    $0x4d,%edi
mov    $0x4e,%esi
call   1030 <ruth_aaron@plt>
mov    $0x14,%edi
mov    $0x15,%esi
call   1030 <ruth_aaron@plt>
mov    $0x5,%edi
mov    $0x6,%esi
call   1030 <ruth_aaron@plt>
mov    $0x83b,%edi
mov    $0x83c,%esi
call   1030 <ruth_aaron@plt>
mov    $0x1ec,%edi
mov    $0x1ed,%esi
call   1030 <ruth_aaron@plt>
mov    $0x80,%edi
mov    $0x81,%esi
call   1030 <ruth_aaron@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @ruth_aaron(i32 714, i32 715)
%6 = call i32 @ruth_aaron(i32 77, i32 78)
%7 = call i32 @ruth_aaron(i32 20, i32 21)
%8 = call i32 @ruth_aaron(i32 5, i32 6)
%9 = call i32 @ruth_aaron(i32 2107, i32 2108)
%10 = call i32 @ruth_aaron(i32 492, i32 493)
%11 = call i32 @ruth_aaron(i32 128, i32 129)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @ruth_aaron(i32 714, i32 715)
%4 = tail call i32 @ruth_aaron(i32 77, i32 78)
%5 = tail call i32 @ruth_aaron(i32 20, i32 21)
%6 = tail call i32 @ruth_aaron(i32 5, i32 6)
%7 = tail call i32 @ruth_aaron(i32 2107, i32 2108)
%8 = tail call i32 @ruth_aaron(i32 492, i32 493)
%9 = tail call i32 @ruth_aaron(i32 128, i32 129)
ret i32 0
}
/* Type definitions */
struct dummy_tracepoint_args {
  int dummy;
};

/* Variables and functions */
int test_long_fname_1(struct dummy_tracepoint_args *);
__attribute__((section("dummy_tracepoint"), used)) int
_dummy_tracepoint(struct dummy_tracepoint_args *arg) {
  return test_long_fname_1(arg);
}


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

x86 assembly (clang, -O2):
<_dummy_tracepoint>:
jmp    1030 <test_long_fname_1@plt>

LLVM IR (-O0):
%struct.dummy_tracepoint_args = type { i32 }
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.dummy_tracepoint_args*)* @_dummy_tracepoint to i8*)], section "llvm.metadata"
define i32 @_dummy_tracepoint(%struct.dummy_tracepoint_args* %0) section "dummy_tracepoint" {
%2 = alloca %struct.dummy_tracepoint_args*
store %struct.dummy_tracepoint_args* %0, %struct.dummy_tracepoint_args** %2
%3 = load %struct.dummy_tracepoint_args*, %struct.dummy_tracepoint_args** %2
%4 = call i32 @test_long_fname_1(%struct.dummy_tracepoint_args* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.dummy_tracepoint_args = type { i32 }
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.dummy_tracepoint_args*)* @_dummy_tracepoint to i8*)], section "llvm.metadata"
define i32 @_dummy_tracepoint(%struct.dummy_tracepoint_args* %0) section "dummy_tracepoint" {
%2 = tail call i32 @test_long_fname_1(%struct.dummy_tracepoint_args* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int age = 10;
  int height = 72;
  printf("I am %d years old.\n", age);
  printf("I am, %d inches tall.\n", height);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x48,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xece(%rip),%rdi
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    $0xa,%esi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x48,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [23 x i8] c"I am, %d inches tall.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 72, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [23 x i8] c"I am, %d inches tall.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 72)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ alignbits();
int /*<<< orphan*/ putbits(int, int);
void putseqend(void) {
  alignbits();
  putbits((signed int)439l, 32);
}


x86 assembly (clang, -O0):
<putseqend>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <alignbits@plt>
mov    $0x1b7,%edi
mov    $0x20,%esi
call   1040 <putbits@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<putseqend>:
push   %rax
xor    %eax,%eax
call   1030 <alignbits@plt>
mov    $0x1b7,%edi
mov    $0x20,%esi
pop    %rax
jmp    1040 <putbits@plt>

LLVM IR (-O0):
define void @putseqend() {
%1 = call i32 (...) @alignbits()
%2 = call i32 @putbits(i32 439, i32 32)
ret void
}

LLVM IR (-O2):
define void @putseqend() {
%1 = tail call i32 (...) @alignbits()
%2 = tail call i32 @putbits(i32 439, i32 32)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UARTPuts(char *, int);
int CmdLineClear(void) {
  UARTPuts("\033[2J\033[1;1H", -1);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"\1B[2J\1B[1;1H\00"
define i32 @CmdLineClear() {
%1 = call i32 @UARTPuts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 -1)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[2J\1B[1;1H\00"
define i32 @CmdLineClear() {
%1 = tail call i32 @UARTPuts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 -1)
ret i32 0
}
int of_property_match_string(struct device_node *np, const char *propname,
                             const char *string) {
  return -38;
}


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

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

LLVM IR (-O0):
%struct.device_node = type opaque
define i32 @of_property_match_string(%struct.device_node* %0, i8* %1, i8* %2) {
%4 = alloca %struct.device_node*
%5 = alloca i8*
%6 = alloca i8*
store %struct.device_node* %0, %struct.device_node** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret i32 -38
}

LLVM IR (-O2):
%struct.device_node = type opaque
define i32 @of_property_match_string(%struct.device_node* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 -38
}
/* Variables and functions */
int /*<<< orphan*/ MySub();
void MyFunc() {
  int i;
  for (i = 0; i < 10; i++) {
    MySub();
  }
}


x86 assembly (clang, -O0):
<MyFunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    113e <MyFunc+0x2e>
mov    $0x0,%al
call   1030 <MySub@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <MyFunc+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MyFunc>:
push   %rax
xor    %eax,%eax
call   1030 <MySub@plt>
xor    %eax,%eax
call   1030 <MySub@plt>
xor    %eax,%eax
call   1030 <MySub@plt>
xor    %eax,%eax
call   1030 <MySub@plt>
xor    %eax,%eax
call   1030 <MySub@plt>
xor    %eax,%eax
call   1030 <MySub@plt>
xor    %eax,%eax
call   1030 <MySub@plt>
xor    %eax,%eax
call   1030 <MySub@plt>
xor    %eax,%eax
call   1030 <MySub@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <MySub@plt>

LLVM IR (-O0):
define void @MyFunc() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = call i32 (...) @MySub()
br label %7
7: ; preds = %5
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @MyFunc() {
%1 = tail call i32 (...) @MySub()
%2 = tail call i32 (...) @MySub()
%3 = tail call i32 (...) @MySub()
%4 = tail call i32 (...) @MySub()
%5 = tail call i32 (...) @MySub()
%6 = tail call i32 (...) @MySub()
%7 = tail call i32 (...) @MySub()
%8 = tail call i32 (...) @MySub()
%9 = tail call i32 (...) @MySub()
%10 = tail call i32 (...) @MySub()
ret void
}
struct Foo *function2(struct Foo *foo1,
                      struct Foo *foo2 __attribute__((unused))) {
  return foo1;
}


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

x86 assembly (clang, -O2):
<function2>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.Foo = type opaque
define %struct.Foo* @function2(%struct.Foo* %0, %struct.Foo* %1) {
%3 = alloca %struct.Foo*
%4 = alloca %struct.Foo*
store %struct.Foo* %0, %struct.Foo** %3
store %struct.Foo* %1, %struct.Foo** %4
%5 = load %struct.Foo*, %struct.Foo** %3
ret %struct.Foo* %5
}

LLVM IR (-O2):
%struct.Foo = type opaque
define %struct.Foo* @function2(%struct.Foo* readnone returned %0, %struct.Foo* nocapture readnone %1) {
ret %struct.Foo* %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ puts(char *);
void usage(void) {
  puts("Usage: 6c file.c");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [17 x i8] c"Usage: 6c file.c\00"
define void @usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [17 x i8] c"Usage: 6c file.c\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hw_display_off(void) { printf("hw_unknown: Display off requested.\n"); }


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"hw_unknown: Display off requested.\0A\00"
define void @hw_display_off() {
%1 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [35 x i8] c"hw_unknown: Display off requested.\00"
define void @hw_display_off() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timespec {
  double tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
double monotonic_seconds() {
  struct timespec ts;
  clock_gettime(CLOCK_MONOTONIC, &ts);
  return ts.tv_sec + ts.tv_nsec * 1e-9;
}


x86 assembly (clang, -O0):
<monotonic_seconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
movsd  -0x10(%rbp),%xmm1
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xec4(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<monotonic_seconds>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0xecb(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { double, i32 }
@CLOCK_MONOTONIC = global i32 0
define double @monotonic_seconds() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = call double @llvm.fmuladd.f64(double %8, double 1.000000e-09, double %5)
ret double %9
}

LLVM IR (-O2):
%struct.timespec = type { double, i32 }
@CLOCK_MONOTONIC = global i32 0
define double @monotonic_seconds() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = sitofp i32 %8 to double
%10 = call double @llvm.fmuladd.f64(double %9, double 1.000000e-09, double %6)
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ print();
int main(void) {
  print();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @print()
ret i32 0
}
int count_lines(const char *txt) {
  int num = 0;
  const char *src = txt;
  char c;
  while (c = *src++) {
    if (c == '\n')
      num++;
  }
  return num;
}


x86 assembly (clang, -O0):
<count_lines>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%al
mov    %al,-0x19(%rbp)
cmp    $0x0,%al
je     114e <count_lines+0x4e>
movsbl -0x19(%rbp),%eax
cmp    $0xa,%eax
jne    1149 <count_lines+0x49>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1117 <count_lines+0x17>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_lines>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi),%ecx
test   %cl,%cl
je     1125 <count_lines+0x25>
add    $0x1,%rdi
cmp    $0xa,%cl
jne    1110 <count_lines+0x10>
add    $0x1,%eax
jmp    1110 <count_lines+0x10>
ret

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

LLVM IR (-O2):
define i32 @count_lines(i8* nocapture %0) {
br label %2
2: ; preds = %9, %1
%3 = phi i8* [ %7, %9 ], [ %0, %1 ]
%4 = phi i32 [ %10, %9 ], [ 0, %1 ]
br label %5
5: ; preds = %2, %5
%6 = phi i8* [ %7, %5 ], [ %3, %2 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i8, i8* %6
switch i8 %8, label %5 [
i8 0, label %11
i8 10, label %9
]
9: ; preds = %5
%10 = add nuw nsw i32 %4, 1
br label %2
11: ; preds = %5
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void check_index(int arg_num, int argc, char *param) {
  if (arg_num >= argc) {
    printf("\nParamètre manquant pour \"%s\"\n", param);
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<check_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     115c <check_index+0x3c>
mov    -0x10(%rbp),%rsi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_index>:
cmp    %esi,%edi
jge    1125 <check_index+0x5>
ret
push   %rax
lea    0xed3(%rip),%rdi
mov    %rdx,%rsi
call   1030 <printf@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"\0AParam\C3\A8tre manquant pour \22%s\22\0A\00"
@EXIT_FAILURE = global i32 0
define void @check_index(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp sge i32 %7, %8
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i8*, i8** %6
%12 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"\0AParam\C3\A8tre manquant pour \22%s\22\0A\00"
@EXIT_FAILURE = global i32 0
define void @check_index(i32 %0, i32 %1, i8* %2) {
%4 = icmp slt i32 %0, %1
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %2)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srandom(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void randomize() { srandom(time(NULL)); }


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

x86 assembly (clang, -O2):
<randomize>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <srandom@plt>

LLVM IR (-O0):
define void @randomize() {
%1 = call i32 @time(i32* null)
%2 = call i32 @srandom(i32 %1)
ret void
}

LLVM IR (-O2):
define void @randomize() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srandom(i32 %1)
ret void
}
void lookup_one_len(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<lookup_one_len>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lookup_one_len>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.lookup_one_len = [15 x i8] c"lookup_one_len\00"
define void @lookup_one_len() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.lookup_one_len, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.lookup_one_len = [15 x i8] c"lookup_one_len\00"
define void @lookup_one_len() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.lookup_one_len, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ psync_send_status_update();
int /*<<< orphan*/ psync_status_recalc_to_upload();
void psync_status_recalc_to_upload_async_thread() {
  psync_status_recalc_to_upload();
  psync_send_status_update();
}


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

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

LLVM IR (-O0):
define void @psync_status_recalc_to_upload_async_thread() {
%1 = call i32 (...) @psync_status_recalc_to_upload()
%2 = call i32 (...) @psync_send_status_update()
ret void
}

LLVM IR (-O2):
define void @psync_status_recalc_to_upload_async_thread() {
%1 = tail call i32 (...) @psync_status_recalc_to_upload()
%2 = tail call i32 (...) @psync_send_status_update()
ret void
}
int main() {
  int a[1] = {42};
  return ((&a)[0])[0];
}


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

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

LLVM IR (-O0):
@__const.main.a = [1 x i32] [i32 42]
define i32 @main() {
%1 = alloca i32
%2 = alloca [1 x i32]
store i32 0, i32* %1
%3 = bitcast [1 x i32]* %2 to i8*
%4 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0
%5 = getelementptr inbounds [1 x i32], [1 x i32]* %4, i64 0, i64 0
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
ret i32 42
}
void freev(char **strv) {
  int i = 0;
  while (strv[i])
    free(strv[i++]);
  free(strv);
}


x86 assembly (clang, -O0):
<freev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1156 <freev+0x46>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    1123 <freev+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freev>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <freev+0x31>
lea    0x8(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <freev+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @freev(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
store i32 0, i32* %3
br label %4
4: ; preds = %11, %1
%5 = load i8**, i8*** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8*, i8** %5, i64 %7
%9 = load i8*, i8** %8
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %18
11: ; preds = %4
%12 = load i8**, i8*** %2
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
%15 = sext i32 %13 to i64
%16 = getelementptr inbounds i8*, i8** %12, i64 %15
%17 = load i8*, i8** %16
br label %4
18: ; preds = %4
%19 = load i8**, i8*** %2
%20 = bitcast i8** %19 to i8*
ret void
}

LLVM IR (-O2):
define void @freev(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8* [ %9, %4 ], [ %2, %1 ]
%7 = add nuw nsw i64 %5, 1
tail call void @free(i8* %6)
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = bitcast i8** %0 to i8*
tail call void @free(i8* %12)
ret void
}
double Pow(x, y)
double x, y;
{ return errcheck(pow(x, y), "exponentiation"); }


x86 assembly (clang, -O0):
<Pow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <pow@plt>
lea    0xeb8(%rip),%rdi
mov    $0x1,%al
call   1030 <errcheck@plt>
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Pow>:
push   %rax
call   1040 <pow@plt>
lea    0xed3(%rip),%rdi
mov    $0x1,%al
call   1030 <errcheck@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"exponentiation\00"
define double @Pow(double %0, double %1) {
%3 = tail call double @pow(double %0, double %1)
%4 = tail call i32 (double, i8*, ...) bitcast (i32 (...)* @errcheck to i32 (double, i8*, ...)*)(double %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%5 = sitofp i32 %4 to double
ret double %5
}
int get_letter(signed char *letters, int pick) {
  int letter = 0, letcount = 0;
  while (pick >= 0) {
    if (letcount >= letters[letter]) {
      letcount = 0;
      letter++;
    } else {
      letcount++;
      pick--;
    }
  }
  return letter;
}


x86 assembly (clang, -O0):
<get_letter>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1166 <get_letter+0x66>
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jl     114f <get_letter+0x4f>
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1161 <get_letter+0x61>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <get_letter+0x19>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_letter>:
xor    %eax,%eax
xor    %r9d,%r9d
movslq %eax,%rdx
lea    -0x1(%rdx),%ecx
add    %rdi,%rdx
xchg   %ax,%ax
test   %esi,%esi
js     1138 <get_letter+0x38>
mov    %r9d,%r8d
movsbl (%rdx),%r10d
add    $0x1,%ecx
add    $0x1,%rdx
xor    %r9d,%r9d
cmp    %r10d,%r8d
jge    1110 <get_letter+0x10>
add    $0xffffffff,%esi
add    $0x1,%r8d
mov    %ecx,%eax
mov    %r8d,%r9d
jmp    1105 <get_letter+0x5>
ret

LLVM IR (-O0):
define i32 @get_letter(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
br label %7
7: ; preds = %27, %2
%8 = load i32, i32* %4
%9 = icmp sge i32 %8, 0
br i1 %9, label %10, label %28
10: ; preds = %7
%11 = load i32, i32* %6
%12 = load i8*, i8** %3
%13 = load i32, i32* %5
%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 sge i32 %11, %17
br i1 %18, label %19, label %22
19: ; preds = %10
store i32 0, i32* %6
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %27
22: ; preds = %10
%23 = load i32, i32* %6
%24 = add nsw i32 %23, 1
store i32 %24, i32* %6
%25 = load i32, i32* %4
%26 = add nsw i32 %25, -1
store i32 %26, i32* %4
br label %27
27: ; preds = %22, %19
br label %7
28: ; preds = %7
%29 = load i32, i32* %5
ret i32 %29
}

LLVM IR (-O2):
define i32 @get_letter(i8* nocapture %0, i32 %1) {
br label %7
3: ; preds = %16
%4 = trunc i64 %14 to i32
%5 = add nsw i32 %8, -1
%6 = add nsw i32 %15, 1
br label %7
7: ; preds = %3, %2
%8 = phi i32 [ %5, %3 ], [ %1, %2 ]
%9 = phi i32 [ %4, %3 ], [ 0, %2 ]
%10 = phi i32 [ %6, %3 ], [ 0, %2 ]
%11 = icmp sgt i32 %8, -1
%12 = sext i32 %9 to i64
br label %13
13: ; preds = %7, %16
%14 = phi i64 [ %12, %7 ], [ %21, %16 ]
%15 = phi i32 [ %10, %7 ], [ 0, %16 ]
br i1 %11, label %16, label %22
16: ; preds = %13
%17 = getelementptr inbounds i8, i8* %0, i64 %14
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp slt i32 %15, %19
%21 = add i64 %14, 1
br i1 %20, label %3, label %13
22: ; preds = %13
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ u_char;

/* Variables and functions */
int dn_comp(const char *src, u_char *dst, int dstsiz, u_char **dnptrs,
            u_char **lastdnptr) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @dn_comp(i8* %0, i32* %1, i32 %2, i32** %3, i32** %4) {
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32**
%10 = alloca i32**
store i8* %0, i8** %6
store i32* %1, i32** %7
store i32 %2, i32* %8
store i32** %3, i32*** %9
store i32** %4, i32*** %10
ret i32 0
}

LLVM IR (-O2):
define i32 @dn_comp(i8* nocapture readnone %0, i32* nocapture readnone %1, i32 %2, i32** nocapture readnone %3, i32** nocapture readnone %4) {
ret i32 0
}
int delay(x)
int x;
{
  int y = 17;
  while (x-- != 0)
    y = y ^ 2;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x11,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1130 <delay+0x30>
mov    -0xc(%rbp),%eax
xor    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <delay+0xe>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @delay(i32 %0) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
int fgeti(FILE *f) {
  int res = 0, puis = 0;
  for (int i = 0; i < 3; i++) {
    res = res + (fgetc(f) << puis);
    puis += 8;
  }
  return res + fgetc(f);
}


x86 assembly (clang, -O0):
<fgeti>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    1172 <fgeti+0x62>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1131 <fgeti+0x21>
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgeti>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r15
call   1030 <fgetc@plt>
mov    %eax,%r14d
mov    %r15,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
add    %r14d,%ebp
mov    %r15,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebx
shl    $0x10,%ebx
add    %ebp,%ebx
mov    %r15,%rdi
call   1030 <fgetc@plt>
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fgeti(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = tail call i32 @fgetc(i32* %0)
%4 = shl i32 %3, 8
%5 = add nsw i32 %4, %2
%6 = tail call i32 @fgetc(i32* %0)
%7 = shl i32 %6, 16
%8 = add nsw i32 %7, %5
%9 = tail call i32 @fgetc(i32* %0)
%10 = add nsw i32 %9, %8
ret i32 %10
}