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

/* Variables and functions */
int /*<<< orphan*/ free(struct vfs_file_handle_t *);
void vfs_df_close(struct vfs_file_handle_t *fh) { free(fh); }


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

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

LLVM IR (-O2):
%struct.vfs_file_handle_t = type { i32 }
define void @vfs_df_close(%struct.vfs_file_handle_t* nocapture %0) {
%2 = tail call i32 @free(%struct.vfs_file_handle_t* %0)
ret void
}
/* Variables and functions */
double sqrt(double);
double computeHypotenuse(double side1, double side2) {
  return sqrt(side1 * side1 + side2 * side2);
}


x86 assembly (clang, -O0):
<computeHypotenuse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<computeHypotenuse>:
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112b <computeHypotenuse+0x1b>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @computeHypotenuse(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* %3
%7 = load double, double* %4
%8 = load double, double* %4
%9 = fmul double %7, %8
%10 = call double @llvm.fmuladd.f64(double %5, double %6, double %9)
%11 = call double @sqrt(double %10)
ret double %11
}

LLVM IR (-O2):
define double @computeHypotenuse(double %0, double %1) {
%3 = fmul double %1, %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %3)
%5 = tail call double @sqrt(double %4)
ret double %5
}
char *skip_string(char *c) {
  while (*c && (*c != '"'))
    c++;
  return c;
}


x86 assembly (clang, -O0):
<skip_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     112d <skip_string+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <skip_string+0x3d>
jmp    114e <skip_string+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skip_string+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_string>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax),%ecx
test   %cl,%cl
je     1122 <skip_string+0x22>
cmp    $0x22,%cl
je     1122 <skip_string+0x22>
add    $0x1,%rax
jmp    1110 <skip_string+0x10>
ret

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

LLVM IR (-O2):
define i8* @skip_string(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 34, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
ret i8* %3
}
/* Variables and functions */
double round(double);
double _round(double in1) { return round(in1); }


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

x86 assembly (clang, -O2):
<_round>:
jmp    1030 <round@plt>

LLVM IR (-O0):
define double @_round(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.round.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @_round(double %0) {
%2 = tail call double @llvm.round.f64(double %0)
ret double %2
}
void die(char *why) {}


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

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

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

LLVM IR (-O2):
define void @die(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, char *, int);
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
char *readInt(char *buf, uint32_t *val) {
  memcpy(val, buf, sizeof(uint32_t));
  *val = ntohl(*val);
  return buf + sizeof(uint32_t);
}


x86 assembly (clang, -O0):
<readInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <ntohl@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readInt>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    (%r14),%edi
call   1040 <ntohl@plt>
mov    %eax,(%r14)
add    $0x4,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @readInt(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i8*, i8** %3
%7 = call i32 @memcpy(i32* %5, i8* %6, i32 4)
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = call i32 @ntohl(i32 %9)
%11 = load i32*, i32** %4
store i32 %10, i32* %11
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 4
ret i8* %13
}

LLVM IR (-O2):
define i8* @readInt(i8* %0, i32* %1) {
%3 = tail call i32 @memcpy(i32* %1, i8* %0, i32 4)
%4 = load i32, i32* %1
%5 = tail call i32 @ntohl(i32 %4)
store i32 %5, i32* %1
%6 = getelementptr inbounds i8, i8* %0, i64 4
ret i8* %6
}
char ascii2hexNybble(char ch) {
  return ('9' < ch ? ('a' > ch ? ch - 'A' : ch - 'a') + 10 : ch - '0');
}


x86 assembly (clang, -O0):
<ascii2hexNybble>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x39,%eax
cmp    %ecx,%eax
jge    1153 <ascii2hexNybble+0x53>
movsbl -0x1(%rbp),%ecx
mov    $0x61,%eax
cmp    %ecx,%eax
jle    113b <ascii2hexNybble+0x3b>
movsbl -0x1(%rbp),%eax
sub    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    1145 <ascii2hexNybble+0x45>
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0xc(%rbp)
jmp    115d <ascii2hexNybble+0x5d>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascii2hexNybble>:
cmp    $0x3a,%dil
jl     1116 <ascii2hexNybble+0x16>
cmp    $0x61,%dil
setb   %al
shl    $0x5,%al
add    %dil,%al
add    $0xa9,%al
ret
add    $0xd0,%dil
mov    %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @ascii2hexNybble(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp slt i32 57, %4
br i1 %5, label %6, label %21
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sgt i32 97, %8
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 65
br label %18
14: ; preds = %6
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = sub nsw i32 %16, 97
br label %18
18: ; preds = %14, %10
%19 = phi i32 [ %13, %10 ], [ %17, %14 ]
%20 = add nsw i32 %19, 10
br label %25
21: ; preds = %1
%22 = load i8, i8* %2
%23 = sext i8 %22 to i32
%24 = sub nsw i32 %23, 48
br label %25
25: ; preds = %21, %18
%26 = phi i32 [ %20, %18 ], [ %24, %21 ]
%27 = trunc i32 %26 to i8
ret i8 %27
}

LLVM IR (-O2):
define signext i8 @ascii2hexNybble(i8 signext %0) {
%2 = icmp sgt i8 %0, 57
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = icmp ult i8 %0, 97
%5 = select i1 %4, i8 -65, i8 -97
%6 = add nuw i8 %0, 10
%7 = add i8 %6, %5
br label %10
8: ; preds = %1
%9 = add i8 %0, -48
br label %10
10: ; preds = %8, %3
%11 = phi i8 [ %7, %3 ], [ %9, %8 ]
ret i8 %11
}
void mdebug(int module, int level, const char *fmt, ...) {}


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

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

LLVM IR (-O0):
define void @mdebug(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
ret void
}

LLVM IR (-O2):
define void @mdebug(i32 %0, i32 %1, i8* nocapture %2, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_e();
int /*<<< orphan*/ get_i();
int /*<<< orphan*/ get_s();
int /*<<< orphan*/ get_s3();
void f2(void) {
  get_s();
  get_s3();
  get_i();
  get_e();
  (void)get_s();
  (void)get_s3();
  (void)get_i();
  (void)get_e();
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <get_s@plt>
mov    $0x0,%al
call   1040 <get_s3@plt>
mov    $0x0,%al
call   1050 <get_i@plt>
mov    $0x0,%al
call   1060 <get_e@plt>
mov    $0x0,%al
call   1030 <get_s@plt>
mov    $0x0,%al
call   1040 <get_s3@plt>
mov    $0x0,%al
call   1050 <get_i@plt>
mov    $0x0,%al
call   1060 <get_e@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %rax
xor    %eax,%eax
call   1030 <get_s@plt>
xor    %eax,%eax
call   1040 <get_s3@plt>
xor    %eax,%eax
call   1050 <get_i@plt>
xor    %eax,%eax
call   1060 <get_e@plt>
xor    %eax,%eax
call   1030 <get_s@plt>
xor    %eax,%eax
call   1040 <get_s3@plt>
xor    %eax,%eax
call   1050 <get_i@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <get_e@plt>

LLVM IR (-O0):
define void @f2() {
%1 = call i32 (...) @get_s()
%2 = call i32 (...) @get_s3()
%3 = call i32 (...) @get_i()
%4 = call i32 (...) @get_e()
%5 = call i32 (...) @get_s()
%6 = call i32 (...) @get_s3()
%7 = call i32 (...) @get_i()
%8 = call i32 (...) @get_e()
ret void
}

LLVM IR (-O2):
define void @f2() {
%1 = tail call i32 (...) @get_s()
%2 = tail call i32 (...) @get_s3()
%3 = tail call i32 (...) @get_i()
%4 = tail call i32 (...) @get_e()
%5 = tail call i32 (...) @get_s()
%6 = tail call i32 (...) @get_s3()
%7 = tail call i32 (...) @get_i()
%8 = tail call i32 (...) @get_e()
ret void
}
double rndom(z)
double z;
{ return (z * ndrand48()); }


x86 assembly (clang, -O0):
<rndom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <ndrand48@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rndom>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <ndrand48@plt>
cvtsi2sd %eax,%xmm1
movsd  (%rsp),%xmm0
mulsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rndom(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 (...) @ndrand48()
%5 = sitofp i32 %4 to double
%6 = fmul double %3, %5
ret double %6
}

LLVM IR (-O2):
define double @rndom(double %0) {
%2 = tail call i32 (...) @ndrand48()
%3 = sitofp i32 %2 to double
%4 = fmul double %3, %0
ret double %4
}
/* Variables and functions */
int EOF;
int kgetchar_null(void) { return EOF; }


x86 assembly (clang, -O0):
<kgetchar_null>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kgetchar_null>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @kgetchar_null() {
%1 = load i32, i32* @EOF
ret i32 %1
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @kgetchar_null() {
%1 = load i32, i32* @EOF
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ demanderMetierNouveauPersonnage();
int /*<<< orphan*/ demanderNomNouveauPersonnage();
int /*<<< orphan*/ demanderRaceNouveauPersonnage();
int /*<<< orphan*/ initialiserNouveauPersonnage();
void creerNouveauPersonnage(void) {
  demanderNomNouveauPersonnage();
  demanderRaceNouveauPersonnage();
  demanderMetierNouveauPersonnage();
  initialiserNouveauPersonnage();
}


x86 assembly (clang, -O0):
<creerNouveauPersonnage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <demanderNomNouveauPersonnage@plt>
mov    $0x0,%al
call   1060 <demanderRaceNouveauPersonnage@plt>
mov    $0x0,%al
call   1050 <demanderMetierNouveauPersonnage@plt>
mov    $0x0,%al
call   1030 <initialiserNouveauPersonnage@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<creerNouveauPersonnage>:
push   %rax
xor    %eax,%eax
call   1040 <demanderNomNouveauPersonnage@plt>
xor    %eax,%eax
call   1060 <demanderRaceNouveauPersonnage@plt>
xor    %eax,%eax
call   1050 <demanderMetierNouveauPersonnage@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <initialiserNouveauPersonnage@plt>

LLVM IR (-O0):
define void @creerNouveauPersonnage() {
%1 = call i32 (...) @demanderNomNouveauPersonnage()
%2 = call i32 (...) @demanderRaceNouveauPersonnage()
%3 = call i32 (...) @demanderMetierNouveauPersonnage()
%4 = call i32 (...) @initialiserNouveauPersonnage()
ret void
}

LLVM IR (-O2):
define void @creerNouveauPersonnage() {
%1 = tail call i32 (...) @demanderNomNouveauPersonnage()
%2 = tail call i32 (...) @demanderRaceNouveauPersonnage()
%3 = tail call i32 (...) @demanderMetierNouveauPersonnage()
%4 = tail call i32 (...) @initialiserNouveauPersonnage()
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
char *getTempFilePath() {
  char *env = (char *)malloc(256 * sizeof(char));
  strcpy(env, "/tmp/temp.ama");
  return env;
}


x86 assembly (clang, -O0):
<getTempFilePath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x100,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xebf(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTempFilePath>:
push   %rbx
mov    $0x100,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/tmp/temp.ama\00"
define i8* @getTempFilePath() {
%1 = alloca i8*
%2 = call i64 @malloc(i32 256)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %1
ret i8* %6
}

LLVM IR (-O2):
@.str = [14 x i8] c"/tmp/temp.ama\00"
define i8* @getTempFilePath() {
%1 = tail call i64 @malloc(i32 256)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
/* Type definitions */
struct udpBuffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ buffWrite(int *, int, struct udpBuffer *);
void writeInt(int value, struct udpBuffer *buff) { buffWrite(&value, 4, buff); }


x86 assembly (clang, -O0):
<writeInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
lea    -0x4(%rbp),%rdi
mov    $0x4,%esi
call   1030 <buffWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeInt>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <buffWrite@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.udpBuffer = type { i32 }
define void @writeInt(i32 %0, %struct.udpBuffer* %1) {
%3 = alloca i32
%4 = alloca %struct.udpBuffer*
store i32 %0, i32* %3
store %struct.udpBuffer* %1, %struct.udpBuffer** %4
%5 = load %struct.udpBuffer*, %struct.udpBuffer** %4
%6 = call i32 @buffWrite(i32* %3, i32 4, %struct.udpBuffer* %5)
ret void
}

LLVM IR (-O2):
%struct.udpBuffer = type { i32 }
define void @writeInt(i32 %0, %struct.udpBuffer* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @buffWrite(i32* %3, i32 4, %struct.udpBuffer* %1)
ret void
}
char *test_foo() {
  char *foo = "foo";
  return foo;
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"foo\00"
define i8* @test_foo() {
%1 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
@.str = [4 x i8] c"foo\00"
define i8* @test_foo() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void fatal_error(char *message) {
  printf("\n*** Configurator failed: %s.\n\n"
         "Please fix your configuration and try again.\n\n",
         message);
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [78 x i8] c"\0A*** Configurator failed: %s.\0A\0APlease fix your configuration and try again.\0A\0A\00"
define void @fatal_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [78 x i8] c"\0A*** Configurator failed: %s.\0A\0APlease fix your configuration and try again.\0A\0A\00"
define void @fatal_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
void monte_nums_of_vars(char *param, long *ilen, long *olen, long *ffunc) {
  *ilen = 3;
  *olen = 2;
  *ffunc = 1;
  return;
}


x86 assembly (clang, -O0):
<monte_nums_of_vars>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x3,(%rax)
mov    -0x18(%rbp),%rax
movq   $0x2,(%rax)
mov    -0x20(%rbp),%rax
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<monte_nums_of_vars>:
movq   $0x3,(%rsi)
movq   $0x2,(%rdx)
movq   $0x1,(%rcx)
ret

LLVM IR (-O0):
define void @monte_nums_of_vars(i8* %0, i64* %1, i64* %2, i64* %3) {
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i64*
%8 = alloca i64*
store i8* %0, i8** %5
store i64* %1, i64** %6
store i64* %2, i64** %7
store i64* %3, i64** %8
%9 = load i64*, i64** %6
store i64 3, i64* %9
%10 = load i64*, i64** %7
store i64 2, i64* %10
%11 = load i64*, i64** %8
store i64 1, i64* %11
ret void
}

LLVM IR (-O2):
define void @monte_nums_of_vars(i8* nocapture readnone %0, i64* nocapture writeonly %1, i64* nocapture writeonly %2, i64* nocapture writeonly %3) {
store i64 3, i64* %1
store i64 2, i64* %2
store i64 1, i64* %3
ret void
}
/* Type definitions */
struct shared_state {
  int dummy;
};

/* Variables and functions */
struct shared_state *_create_shm(char *, int, struct shared_state *, int *);
struct shared_state *create_shm(char *id, struct shared_state *content,
                                int *cores) {
  return _create_shm(id, 1, content, cores);
}


x86 assembly (clang, -O0):
<create_shm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   1030 <_create_shm@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_shm>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    $0x1,%esi
jmp    1030 <_create_shm@plt>

LLVM IR (-O0):
%struct.shared_state = type { i32 }
define %struct.shared_state* @create_shm(i8* %0, %struct.shared_state* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca %struct.shared_state*
%6 = alloca i32*
store i8* %0, i8** %4
store %struct.shared_state* %1, %struct.shared_state** %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load %struct.shared_state*, %struct.shared_state** %5
%9 = load i32*, i32** %6
%10 = call %struct.shared_state* @_create_shm(i8* %7, i32 1, %struct.shared_state* %8, i32* %9)
ret %struct.shared_state* %10
}

LLVM IR (-O2):
%struct.shared_state = type { i32 }
define %struct.shared_state* @create_shm(i8* %0, %struct.shared_state* %1, i32* %2) {
%4 = tail call %struct.shared_state* @_create_shm(i8* %0, i32 1, %struct.shared_state* %1, i32* %2)
ret %struct.shared_state* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int horas;
  scanf("%i", &horas);
  int periodosInteiros = horas / 3;
  int periodosQuebrados = horas % 3;
  double valor = periodosInteiros * 10 + periodosQuebrados * 5;
  printf("O VALOR A PAGAR E = %0.2f\n", valor);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
imul   $0xa,-0xc(%rbp),%eax
imul   $0x5,-0x10(%rbp),%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%edx
sub    %edx,%eax
lea    (%rcx,%rcx,4),%ecx
lea    (%rax,%rax,4),%eax
lea    (%rax,%rcx,2),%eax
cvtsi2sd %eax,%xmm0
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
@.str.1 = [27 x i8] c"O VALOR A PAGAR E = %0.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 3
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = srem i32 %9, 3
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = mul nsw i32 %11, 10
%13 = load i32, i32* %4
%14 = mul nsw i32 %13, 5
%15 = add nsw i32 %12, %14
%16 = sitofp i32 %15 to double
store double %16, double* %5
%17 = load double, double* %5
%18 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), double %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [27 x i8] c"O VALOR A PAGAR E = %0.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = sdiv i32 %4, 3
%6 = srem i32 %4, 3
%7 = mul nsw i32 %5, 10
%8 = mul nsw i32 %6, 5
%9 = add nsw i32 %7, %8
%10 = sitofp i32 %9 to double
%11 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), double %10)
ret i32 0
}
void func2() {
  int count = 0;
  for (count = 0; count < 0XFFFFF; count++) {
  };
  return;
}


x86 assembly (clang, -O0):
<func2>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0xfffff,-0x4(%rbp)
jge    1132 <func2+0x32>
jmp    1124 <func2+0x24>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <func2+0x12>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @func2() {
ret void
}
int do_438() { return 438; }


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

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

LLVM IR (-O0):
define i32 @do_438() {
ret i32 438
}

LLVM IR (-O2):
define i32 @do_438() {
ret i32 438
}
long main() {
  long g;
  for (g = 0; g < 5; g = g + 1) {
    long f;
    f = 0;
    for (f = 0; f < 5; f = f + 1) {
      if (f == g) {
        break;
      } else {
        continue;
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x10(%rbp)
cmpq   $0x5,-0x10(%rbp)
jge    1171 <main+0x71>
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x5,-0x18(%rbp)
jge    115b <main+0x5b>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1145 <main+0x45>
jmp    115b <main+0x5b>
jmp    114a <main+0x4a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1127 <main+0x27>
jmp    1160 <main+0x60>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <main+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @main() {
ret i64 undef
}
void test___atomic_fetch_xor_2(int *mem) { __atomic_fetch_xor(mem, 1, 4); }


x86 assembly (clang, -O0):
<test___atomic_fetch_xor_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    %ecx,-0x18(%rbp)
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%esi
mov    %eax,%edx
xor    %esi,%edx
lock cmpxchg %edx,(%rcx)
sete   %cl
mov    %eax,-0x24(%rbp)
test   $0x1,%cl
mov    %eax,-0x14(%rbp)
jne    114b <test___atomic_fetch_xor_2+0x4b>
jmp    1122 <test___atomic_fetch_xor_2+0x22>
mov    -0x24(%rbp),%eax
mov    %eax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test___atomic_fetch_xor_2>:
lock xorl $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @test___atomic_fetch_xor_2(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
store i32 1, i32* %3
%6 = load i32, i32* %3
%7 = atomicrmw xor i32* %5, i32 %6 acq_rel
store i32 %7, i32* %4
%8 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @test___atomic_fetch_xor_2(i32* nocapture %0) {
%2 = atomicrmw xor i32* %0, i32 1 acq_rel
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x19() {
  Assert_real((isalpha(25) == 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_isalpha.c",
              130, ("isalpha should be 0 for 0x19"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x19>:
push   %rax
mov    $0x19,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x82,%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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x19\00"
define void @t_isalpha_0x19() {
%1 = call i64 @isalpha(i32 25)
%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 130, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x19\00"
define void @t_isalpha_0x19() {
%1 = tail call i64 @isalpha(i32 25)
%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 130, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vAssertCalled(char *, int);
void IntDefaultHandler(void) {
  while (1) {
    vAssertCalled(
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/unpsjb-rtsg/slack-freertos/refs/heads/"
        "master/examples/lm3s6965evb/example1/startup.c",
        239);
  }
}


x86 assembly (clang, -O0):
<IntDefaultHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <IntDefaultHandler+0x9>
lea    0xee0(%rip),%rdi
mov    $0xef,%esi
call   1030 <vAssertCalled@plt>
jmp    1119 <IntDefaultHandler+0x9>

x86 assembly (clang, -O2):
<IntDefaultHandler>:
push   %rbx
lea    0xee8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0xef,%esi
call   1030 <vAssertCalled@plt>
jmp    1120 <IntDefaultHandler+0x10>

LLVM IR (-O0):
@.str = [175 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/unpsjb-rtsg/slack-freertos/refs/heads/master/examples/lm3s6965evb/example1/startup.c\00"
define void @IntDefaultHandler() {
br label %1
1: ; preds = %0, %1
%2 = call i32 @vAssertCalled(i8* getelementptr inbounds ([175 x i8], [175 x i8]* @.str, i64 0, i64 0), i32 239)
br label %1
}

LLVM IR (-O2):
@.str = [175 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/unpsjb-rtsg/slack-freertos/refs/heads/master/examples/lm3s6965evb/example1/startup.c\00"
define void @IntDefaultHandler() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @vAssertCalled(i8* getelementptr inbounds ([175 x i8], [175 x i8]* @.str, i64 0, i64 0), i32 239)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ trap_R_RegisterShaderNoMip(char *);
void Controls_Cache(void) {
  trap_R_RegisterShaderNoMip("menu/art/back_0");
  trap_R_RegisterShaderNoMip("menu/art/back_1");
  trap_R_RegisterShaderNoMip("menu/art/frame2_l");
  trap_R_RegisterShaderNoMip("menu/art/frame1_r");
}


x86 assembly (clang, -O0):
<Controls_Cache>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <trap_R_RegisterShaderNoMip@plt>
lea    0xee9(%rip),%rdi
call   1030 <trap_R_RegisterShaderNoMip@plt>
lea    0xeed(%rip),%rdi
call   1030 <trap_R_RegisterShaderNoMip@plt>
lea    0xef3(%rip),%rdi
call   1030 <trap_R_RegisterShaderNoMip@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Controls_Cache>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <trap_R_RegisterShaderNoMip@plt>
lea    0xeec(%rip),%rdi
call   1030 <trap_R_RegisterShaderNoMip@plt>
lea    0xef0(%rip),%rdi
call   1030 <trap_R_RegisterShaderNoMip@plt>
lea    0xef6(%rip),%rdi
pop    %rax
jmp    1030 <trap_R_RegisterShaderNoMip@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"menu/art/back_0\00"
@.str.1 = [16 x i8] c"menu/art/back_1\00"
@.str.2 = [18 x i8] c"menu/art/frame2_l\00"
@.str.3 = [18 x i8] c"menu/art/frame1_r\00"
define void @Controls_Cache() {
%1 = call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"menu/art/back_0\00"
@.str.1 = [16 x i8] c"menu/art/back_1\00"
@.str.2 = [18 x i8] c"menu/art/frame2_l\00"
@.str.3 = [18 x i8] c"menu/art/frame1_r\00"
define void @Controls_Cache() {
%1 = tail call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Type definitions */
struct event {
  int dummy;
};
struct editor {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ editor_save(struct editor *);
void command_save(struct editor *e, struct event *evt) { editor_save(e); }


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

x86 assembly (clang, -O2):
<command_save>:
jmp    1030 <editor_save@plt>

LLVM IR (-O0):
%struct.editor = type { i32 }
%struct.event = type { i32 }
define void @command_save(%struct.editor* %0, %struct.event* %1) {
%3 = alloca %struct.editor*
%4 = alloca %struct.event*
store %struct.editor* %0, %struct.editor** %3
store %struct.event* %1, %struct.event** %4
%5 = load %struct.editor*, %struct.editor** %3
%6 = call i32 @editor_save(%struct.editor* %5)
ret void
}

LLVM IR (-O2):
%struct.editor = type { i32 }
%struct.event = type { i32 }
define void @command_save(%struct.editor* %0, %struct.event* nocapture readnone %1) {
%3 = tail call i32 @editor_save(%struct.editor* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ doupdate();
void reg_update_all(void) { (void)doupdate(); }


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

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

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

LLVM IR (-O2):
define void @reg_update_all() {
%1 = tail call i32 (...) @doupdate()
ret void
}
/* Variables and functions */
double DBL_MAX;
extern double cmax_double() { return DBL_MAX; }


x86 assembly (clang, -O0):
<cmax_double>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
movsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmax_double>:
mov    0x2ed9(%rip),%rax
movsd  (%rax),%xmm0
ret

LLVM IR (-O0):
@DBL_MAX = global double 0.000000e+00
define double @cmax_double() {
%1 = load double, double* @DBL_MAX
ret double %1
}

LLVM IR (-O2):
@DBL_MAX = global double 0.000000e+00
define double @cmax_double() {
%1 = load double, double* @DBL_MAX
ret double %1
}
int main() {
  int N, d, a, b, c, i, j, k;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int SIGABRT;
int scalanative_libc_sigabrt() { return SIGABRT; }


x86 assembly (clang, -O0):
<scalanative_libc_sigabrt>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalanative_libc_sigabrt>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@SIGABRT = global i32 0
define i32 @scalanative_libc_sigabrt() {
%1 = load i32, i32* @SIGABRT
ret i32 %1
}

LLVM IR (-O2):
@SIGABRT = global i32 0
define i32 @scalanative_libc_sigabrt() {
%1 = load i32, i32* @SIGABRT
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fexists(char archivo[]) {
  FILE *f = fopen(archivo, "r");
  if (f != NULL) {
    fclose(f);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<fexists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1160 <fexists+0x40>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    1167 <fexists+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fexists>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <fexists+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @fexists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
int d16_to_d6(int x) { return (x + 512) >> 10; }


x86 assembly (clang, -O0):
<d16_to_d6>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x200,%eax
sar    $0xa,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d16_to_d6>:
lea    0x200(%rdi),%eax
sar    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @d16_to_d6(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 512
%5 = ashr i32 %4, 10
ret i32 %5
}

LLVM IR (-O2):
define i32 @d16_to_d6(i32 %0) {
%2 = add nsw i32 %0, 512
%3 = ashr i32 %2, 10
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _fail_eno(int);
int errno;
void _fail_err(int line, int err) {
  errno = err;
  _fail_eno(line);
}


x86 assembly (clang, -O0):
<_fail_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    0x2eb8(%rip),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%edi
call   1030 <_fail_eno@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fail_err>:
mov    0x2ec9(%rip),%rax
mov    %esi,(%rax)
jmp    1030 <_fail_eno@plt>

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

LLVM IR (-O2):
@errno = global i32 0
define void @_fail_err(i32 %0, i32 %1) {
store i32 %1, i32* @errno
%3 = tail call i32 @_fail_eno(i32 %0)
ret void
}
/* Type definitions */
struct s_map {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mapGetKeySize(struct s_map *);
int mapGetPrefixID(struct s_map *, void const *, int /*<<< orphan*/);
int mapGetKeyID(struct s_map *map, const void *key) {
  return mapGetPrefixID(map, key, mapGetKeySize(map));
}


x86 assembly (clang, -O0):
<mapGetKeyID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <mapGetKeySize@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <mapGetPrefixID@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapGetKeyID>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <mapGetKeySize@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <mapGetPrefixID@plt>

LLVM IR (-O0):
%struct.s_map = type { i32 }
define i32 @mapGetKeyID(%struct.s_map* %0, i8* %1) {
%3 = alloca %struct.s_map*
%4 = alloca i8*
store %struct.s_map* %0, %struct.s_map** %3
store i8* %1, i8** %4
%5 = load %struct.s_map*, %struct.s_map** %3
%6 = load i8*, i8** %4
%7 = load %struct.s_map*, %struct.s_map** %3
%8 = call i32 @mapGetKeySize(%struct.s_map* %7)
%9 = call i32 @mapGetPrefixID(%struct.s_map* %5, i8* %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.s_map = type { i32 }
define i32 @mapGetKeyID(%struct.s_map* %0, i8* %1) {
%3 = tail call i32 @mapGetKeySize(%struct.s_map* %0)
%4 = tail call i32 @mapGetPrefixID(%struct.s_map* %0, i8* %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int noscramble(int);
int equaltest(int a, int b) {
  int retval;
  if (a == b)
    retval = noscramble(1);
  else
    retval = noscramble(0);
  return retval;
}


x86 assembly (clang, -O0):
<equaltest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    113c <equaltest+0x2c>
mov    $0x1,%edi
call   1030 <noscramble@plt>
mov    %eax,-0xc(%rbp)
jmp    1146 <equaltest+0x36>
xor    %edi,%edi
call   1030 <noscramble@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equaltest>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
mov    %eax,%edi
jmp    1030 <noscramble@plt>

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

LLVM IR (-O2):
define i32 @equaltest(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
%5 = tail call i32 @noscramble(i32 %4)
ret i32 %5
}
void cdrjob() {}


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

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

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

LLVM IR (-O2):
define void @cdrjob() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t write_FP_BE(int /*<<< orphan*/ *, int /*<<< orphan*/ const *, int);
size_t uint16WriteToFP(FILE *fp, const uint16_t *data) {
  return write_FP_BE(fp, data, sizeof(uint16_t));
}


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

x86 assembly (clang, -O2):
<uint16WriteToFP>:
mov    $0x4,%edx
jmp    1030 <write_FP_BE@plt>

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

LLVM IR (-O2):
define i64 @uint16WriteToFP(i32* %0, i32* %1) {
%3 = tail call i64 @write_FP_BE(i32* %0, i32* %1, i32 4)
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int16_t btoh_16(int16_t bigval) {
  union {
    int16_t s;
    uint8_t b[2];
  } u1, u2;
  u1.s = bigval;
  u2.b[0] = u1.b[1];
  u2.b[1] = u1.b[0];
  return u2.s;
}


x86 assembly (clang, -O0):
<btoh_16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { [2 x i32] }
define i32 @btoh_16(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
%4 = alloca %union.anon
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = bitcast %union.anon* %3 to i32*
store i32 %5, i32* %6
%7 = bitcast %union.anon* %3 to [2 x i32]*
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%9 = load i32, i32* %8
%10 = bitcast %union.anon* %4 to [2 x i32]*
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
store i32 %9, i32* %11
%12 = bitcast %union.anon* %3 to [2 x i32]*
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 0
%14 = load i32, i32* %13
%15 = bitcast %union.anon* %4 to [2 x i32]*
%16 = getelementptr inbounds [2 x i32], [2 x i32]* %15, i64 0, i64 1
store i32 %14, i32* %16
%17 = bitcast %union.anon* %4 to i32*
%18 = load i32, i32* %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @btoh_16(i32 %0) {
ret i32 undef
}
void gtk_signal_run_type_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_signal_run_type_get_type() {
ret void
}
int serial_is_tx_ongoing(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @serial_is_tx_ongoing() {
ret i32 0
}

LLVM IR (-O2):
define i32 @serial_is_tx_ongoing() {
ret i32 0
}
void CloseCOM(int portnum) {}


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

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

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

LLVM IR (-O2):
define void @CloseCOM(i32 %0) {
ret void
}