xunge/DecIR huggingface dataset:
int strcmp(const char *s1, const char *s2) {
  while ((*s1 == *s2) && (*s1 != '\0')) {
    s1++;
    s2++;
  }
  return *s1 - *s2;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x11(%rbp)
jne    1137 <strcmp+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1147 <strcmp+0x47>
jmp    1164 <strcmp+0x64>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <strcmp+0xc>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
mov    (%rdi),%al
mov    (%rsi),%cl
test   %al,%al
je     1134 <strcmp+0x34>
cmp    %cl,%al
jne    1134 <strcmp+0x34>
mov    $0x1,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rdx,1),%eax
movzbl (%rsi,%rdx,1),%ecx
test   %al,%al
je     1134 <strcmp+0x34>
add    $0x1,%rdx
cmp    %cl,%al
je     1120 <strcmp+0x20>
movsbl %al,%eax
movsbl %cl,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp ne i8 %3, %4
%6 = icmp eq i8 %3, 0
%7 = or i1 %6, %5
br i1 %7, label %18, label %8
8: ; preds = %2, %8
%9 = phi i8* [ %12, %8 ], [ %1, %2 ]
%10 = phi i8* [ %11, %8 ], [ %0, %2 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = load i8, i8* %11
%14 = load i8, i8* %12
%15 = icmp ne i8 %13, %14
%16 = icmp eq i8 %13, 0
%17 = or i1 %16, %15
br i1 %17, label %18, label %8
18: ; preds = %8, %2
%19 = phi i8 [ %3, %2 ], [ %13, %8 ]
%20 = phi i8 [ %4, %2 ], [ %14, %8 ]
%21 = sext i8 %19 to i32
%22 = sext i8 %20 to i32
%23 = sub nsw i32 %21, %22
ret i32 %23
}
long int calculate_area(long int l, long int w) { return l * w; }


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

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

LLVM IR (-O0):
define i64 @calculate_area(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = mul nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @calculate_area(i64 %0, i64 %1) {
%3 = mul nsw i64 %1, %0
ret i64 %3
}
int sum(int n1, int n2, int n3) { return n1 + n2 + n3; }


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @sum(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
ret i32 %5
}
int tapcfg_get_version() { return ((1 << 16) | 1); }


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

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

LLVM IR (-O0):
define i32 @tapcfg_get_version() {
ret i32 65537
}

LLVM IR (-O2):
define i32 @tapcfg_get_version() {
ret i32 65537
}
/* Variables and functions */
int TMP_MAX;
int /*<<< orphan*/ printf(char *, int, char *);
char *tmpnam(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  int i = 0;
  for (; i < TMP_MAX + 10; ++i)
    printf("%6d: %s\n", i + 1, tmpnam(0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2e99(%rip),%rcx
mov    (%rcx),%ecx
add    $0xa,%ecx
cmp    %ecx,%eax
jge    1184 <main+0x64>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
xor    %edi,%edi
call   1040 <tmpnam@plt>
mov    -0x18(%rbp),%esi
mov    %rax,%rdx
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    0x2eb2(%rip),%r14
cmpl   $0xfffffff7,(%r14)
jl     1164 <main+0x44>
mov    $0xffffffff,%ebx
lea    0xec0(%rip),%r15
lea    0x2(%rbx),%ebp
xor    %edi,%edi
call   1040 <tmpnam@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %rax,%rdx
call   1030 <printf@plt>
mov    (%r14),%eax
add    $0x9,%eax
add    $0x1,%ebx
cmp    %eax,%ebx
jl     1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@TMP_MAX = global i32 0
@.str = [9 x i8] c"%6d: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @TMP_MAX
%4 = icmp sgt i32 %3, -10
br i1 %4, label %5, label %13
5: ; preds = %2, %5
%6 = phi i32 [ %7, %5 ], [ 0, %2 ]
%7 = add nuw nsw i32 %6, 1
%8 = tail call i8* @tmpnam(i32 0)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %8)
%10 = load i32, i32* @TMP_MAX
%11 = add nsw i32 %10, 9
%12 = icmp slt i32 %6, %11
br i1 %12, label %5, label %13
13: ; preds = %5, %2
ret i32 0
}
/* Variables and functions */
int dwarf_get_LNE_name(unsigned int, char const **);
char const *ellipname(int, unsigned int, char const *, char *, int);
const char *get_LNE_name(unsigned int val_in, int printonerr) {
  const char *v = 0;
  int res = dwarf_get_LNE_name(val_in, &v);
  return ellipname(res, val_in, v, "LNE", printonerr);
}


x86 assembly (clang, -O0):
<get_LNE_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1040 <dwarf_get_LNE_name@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%r8d
lea    0xea6(%rip),%rcx
call   1030 <ellipname@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_LNE_name>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
movq   $0x0,(%rsp)
mov    %rsp,%rsi
call   1040 <dwarf_get_LNE_name@plt>
mov    (%rsp),%rdx
lea    0xebe(%rip),%rcx
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%r8d
call   1030 <ellipname@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"LNE\00"
define i8* @get_LNE_name(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* null, i8** %5
%7 = load i32, i32* %3
%8 = call i32 @dwarf_get_LNE_name(i32 %7, i8** %5)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %3
%11 = load i8*, i8** %5
%12 = load i32, i32* %4
%13 = call i8* @ellipname(i32 %9, i32 %10, i8* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i8* %13
}

LLVM IR (-O2):
@.str = [4 x i8] c"LNE\00"
define i8* @get_LNE_name(i32 %0, i32 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @dwarf_get_LNE_name(i32 %0, i8** %3)
%6 = load i8*, i8** %3
%7 = call i8* @ellipname(i32 %5, i32 %0, i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void delete_symbol_name(char *symbol_name) { free(symbol_name); }


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

LLVM IR (-O0):
define void @delete_symbol_name(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 @delete_symbol_name(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  char buf[1024];
  printf("Enter your name, please: ");
  fgets(buf, 1024, stdin);
  printf("Your name is: %s\n", buf);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x410(%rbp),%rdi
mov    0x2e93(%rip),%rax
mov    (%rax),%edx
mov    $0x400,%esi
call   1040 <fgets@plt>
lea    -0x410(%rbp),%rsi
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x400,%rsp
lea    0xed1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1040 <fgets@plt>
lea    0xec4(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Enter your name, please: \00"
@stdin = global i32 0
@.str.1 = [18 x i8] c"Your name is: %s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1024 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %8, i32 1024, i32 %9)
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}

LLVM IR (-O2):
@.str = [26 x i8] c"Enter your name, please: \00"
@stdin = global i32 0
@.str.1 = [18 x i8] c"Your name is: %s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %4, i32 1024, i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ GLdouble;

/* Variables and functions */
int /*<<< orphan*/ glTexCoord2d(int /*<<< orphan*/, int /*<<< orphan*/);
void TexCoord2d(GLdouble s, GLdouble t) { glTexCoord2d(s, t); }


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

x86 assembly (clang, -O2):
<TexCoord2d>:
jmp    1030 <glTexCoord2d@plt>

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

LLVM IR (-O2):
define void @TexCoord2d(i32 %0, i32 %1) {
%3 = tail call i32 @glTexCoord2d(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int getline(char **, size_t *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
int main() {
  char *line = NULL;
  size_t len = 0;
  int length = getline(&line, &len, stdin);
  printf("%s", line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edx
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <getline@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1040 <getline@plt>
mov    0x8(%rsp),%rsi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@stdin = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i8*
%2 = alloca i64
%3 = bitcast i8** %1 to i8*
store i8* null, i8** %1
%4 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%5 = load i32, i32* @stdin
%6 = call i32 @getline(i8** %1, i64* %2, i32 %5)
%7 = load i8*, i8** %1
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_matrix(double **m, long nrl, long nrh, long ncl, long nch) {
  free((char *)(m[nrl] + ncl - 1));
  free((char *)(m + nrl - 1));
}


x86 assembly (clang, -O0):
<free_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x20(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_matrix>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi,%rsi,8),%rax
lea    (%rax,%rcx,8),%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
lea    (%rbx,%r14,8),%rdi
add    $0xfffffffffffffff8,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_matrix(double** nocapture %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = getelementptr inbounds double*, double** %0, i64 %1
%7 = load double*, double** %6
%8 = getelementptr inbounds double, double* %7, i64 %3
%9 = getelementptr inbounds double, double* %8, i64 -1
%10 = bitcast double* %9 to i8*
%11 = tail call i32 @free(i8* %10)
%12 = getelementptr inbounds double*, double** %6, i64 -1
%13 = bitcast double** %12 to i8*
%14 = tail call i32 @free(i8* %13)
ret void
}
const char *get_idstring(void) {
  return "dSFMT-19937:36-29-1-7-16:57fbfffdffff575f-ffff6febffffffee";
}


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

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

LLVM IR (-O0):
@.str = [59 x i8] c"dSFMT-19937:36-29-1-7-16:57fbfffdffff575f-ffff6febffffffee\00"
define i8* @get_idstring() {
ret i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [59 x i8] c"dSFMT-19937:36-29-1-7-16:57fbfffdffff575f-ffff6febffffffee\00"
define i8* @get_idstring() {
ret i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
uint32_t USBFrameNumberGet(uint32_t ui32Base) {
  ;
  return ((*((volatile uint16_t *)(ui32Base + 0x0000000C))));
}


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

x86 assembly (clang, -O2):
<USBFrameNumberGet>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    0xc(%rax),%rax
ret

LLVM IR (-O0):
define i64 @USBFrameNumberGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 12
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @USBFrameNumberGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 12
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
void glSceneDrawText(int x, int y, char *str, int R, int G, int B) {}


x86 assembly (clang, -O0):
<glSceneDrawText>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @glSceneDrawText(i32 %0, i32 %1, i8* nocapture %2, i32 %3, i32 %4, i32 %5) {
ret void
}
int test_imm_3Bint8_reg(signed char val) {
  return ((val) & (-0x3B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Bint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffc5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_3Bint8_reg>:
test   $0xc5,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_3Bint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -59
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_3Bint8_reg(i8 signext %0) {
%2 = and i8 %0, -59
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assume(int);
int main() {
  int x;
  __VERIFIER_assume(x == 1);
  if (x != 1) {
  ERROR:
    goto ERROR;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x1,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assume@plt>
cmpl   $0x1,-0x4(%rbp)
je     113d <main+0x2d>
jmp    1138 <main+0x28>
jmp    1138 <main+0x28>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
%5 = call i32 @__VERIFIER_assume(i32 %4)
%6 = load i32, i32* %1
%7 = icmp ne i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %0
br label %9
9: ; preds = %9, %8
br label %9
10: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assume(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fibonacci(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int ultimoTermo = 100;
  printf("Sequencia de Fibonacci ate o termo %d:\n", ultimoTermo);
  fibonacci(ultimoTermo);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"Sequencia de Fibonacci ate o termo %d:\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 100, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @fibonacci(i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [40 x i8] c"Sequencia de Fibonacci ate o termo %d:\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 100)
%2 = tail call i32 @fibonacci(i32 100)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, char const *);
void send_status(FILE *client, int code, const char *reason_phrase) {
  fprintf(client, "HTTP/1.1 %d %s \r\n", code, reason_phrase);
}


x86 assembly (clang, -O0):
<send_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xecb(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_status>:
mov    %rdx,%rcx
mov    %esi,%edx
lea    0xee4(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"HTTP/1.1 %d %s \0D\0A\00"
define void @send_status(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 = load i8*, i8** %6
%10 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"HTTP/1.1 %d %s \0D\0A\00"
define void @send_status(i32* nocapture %0, i32 %1, i8* %2) {
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get(char *, char *);
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char **argv) {
  if (argc < 3) {
    write(2, "usage:\n\tget host /path/file\n", 28);
    return 1;
  }
  get(argv[1], argv[2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1162 <main+0x42>
mov    $0x2,%edi
lea    0xeb4(%rip),%rsi
mov    $0x1c,%edx
call   1030 <write@plt>
movl   $0x1,-0x4(%rbp)
jmp    117e <main+0x5e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <get@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jg     1143 <main+0x23>
lea    0xed3(%rip),%rsi
mov    $0x2,%edi
mov    $0x1c,%edx
call   1030 <write@plt>
mov    $0x1,%eax
pop    %rcx
ret
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1040 <get@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"usage:\0A\09get host /path/file\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @write(i32 2, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 28)
store i32 1, i32* %3
br label %18
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 2
%16 = load i8*, i8** %15
%17 = call i32 @get(i8* %13, i8* %16)
store i32 0, i32* %3
br label %18
18: ; preds = %10, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [29 x i8] c"usage:\0A\09get host /path/file\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 28)
br label %12
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8*, i8** %1, i64 2
%10 = load i8*, i8** %9
%11 = tail call i32 @get(i8* %8, i8* %10)
br label %12
12: ; preds = %6, %4
%13 = phi i32 [ 1, %4 ], [ 0, %6 ]
ret i32 %13
}
/* Type definitions */
struct user_ptr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct user_ptr *);
void dealloc_user_ptr(struct user_ptr *ptr) {
  if (ptr) {
    free(ptr);
  }
}


x86 assembly (clang, -O0):
<dealloc_user_ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <dealloc_user_ptr+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dealloc_user_ptr>:
test   %rdi,%rdi
je     111a <dealloc_user_ptr+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.user_ptr = type { i32 }
define void @dealloc_user_ptr(%struct.user_ptr* %0) {
%2 = alloca %struct.user_ptr*
store %struct.user_ptr* %0, %struct.user_ptr** %2
%3 = load %struct.user_ptr*, %struct.user_ptr** %2
%4 = icmp ne %struct.user_ptr* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.user_ptr*, %struct.user_ptr** %2
%7 = call i32 @free(%struct.user_ptr* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.user_ptr = type { i32 }
define void @dealloc_user_ptr(%struct.user_ptr* %0) {
%2 = icmp eq %struct.user_ptr* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.user_ptr* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ link_dir();
int /*<<< orphan*/ link_empty1();
int /*<<< orphan*/ link_empty2();
int /*<<< orphan*/ test_link_paths();
void test_link(void) {
  test_link_paths();
  link_dir();
  link_empty1();
  link_empty2();
}


x86 assembly (clang, -O0):
<test_link>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <test_link_paths@plt>
mov    $0x0,%al
call   1040 <link_dir@plt>
mov    $0x0,%al
call   1030 <link_empty1@plt>
mov    $0x0,%al
call   1050 <link_empty2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_link>:
push   %rax
xor    %eax,%eax
call   1060 <test_link_paths@plt>
xor    %eax,%eax
call   1040 <link_dir@plt>
xor    %eax,%eax
call   1030 <link_empty1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <link_empty2@plt>

LLVM IR (-O0):
define void @test_link() {
%1 = call i32 (...) @test_link_paths()
%2 = call i32 (...) @link_dir()
%3 = call i32 (...) @link_empty1()
%4 = call i32 (...) @link_empty2()
ret void
}

LLVM IR (-O2):
define void @test_link() {
%1 = tail call i32 (...) @test_link_paths()
%2 = tail call i32 (...) @link_dir()
%3 = tail call i32 (...) @link_empty1()
%4 = tail call i32 (...) @link_empty2()
ret void
}
int curs_hidemouse(void) { return (-1); }


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

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

LLVM IR (-O0):
define i32 @curs_hidemouse() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @curs_hidemouse() {
ret i32 -1
}
/* Variables and functions */
int __ctype_isascii(int);
int isascii(int c) { return __ctype_isascii(c); }


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

x86 assembly (clang, -O2):
<isascii>:
jmp    1030 <__ctype_isascii@plt>

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

LLVM IR (-O2):
define i32 @isascii(i32 %0) {
%2 = tail call i32 @__ctype_isascii(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t endswap64(uint64_t x) {
  uint64_t ret = (((x & 0xFF) << 56) | ((x & 0xFF00) << 40) |
                  ((x & 0xFF0000) << 24) | ((x & 0xFF000000) << 8) |
                  ((x & 0xFF00000000) >> 8) | ((x & 0xFF0000000000) >> 24) |
                  ((x & 0xFF000000000000) >> 40) | ((x >> 56) & 0xFF));
  return ret;
}


x86 assembly (clang, -O0):
<endswap64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    $0x38,%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
and    $0xff00,%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,%eax
movslq -0x4(%rbp),%rcx
movabs $0xff00000000,%rdx
and    %rdx,%rcx
sar    $0x8,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff0000000000,%rdx
and    %rdx,%rcx
sar    $0x18,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff000000000000,%rdx
and    %rdx,%rcx
sar    $0x28,%rcx
or     %rcx,%rax
mov    -0x4(%rbp),%edx
mov    $0x38,%ecx
sar    %cl,%edx
mov    %edx,%ecx
and    $0xff,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @endswap64(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 255
%6 = shl i32 %5, 56
%7 = load i32, i32* %2
%8 = and i32 %7, 65280
%9 = shl i32 %8, 40
%10 = or i32 %6, %9
%11 = load i32, i32* %2
%12 = and i32 %11, 16711680
%13 = shl i32 %12, 24
%14 = or i32 %10, %13
%15 = load i32, i32* %2
%16 = and i32 %15, -16777216
%17 = shl i32 %16, 8
%18 = or i32 %14, %17
%19 = zext i32 %18 to i64
%20 = load i32, i32* %2
%21 = sext i32 %20 to i64
%22 = and i64 %21, 1095216660480
%23 = ashr i64 %22, 8
%24 = or i64 %19, %23
%25 = load i32, i32* %2
%26 = sext i32 %25 to i64
%27 = and i64 %26, 280375465082880
%28 = ashr i64 %27, 24
%29 = or i64 %24, %28
%30 = load i32, i32* %2
%31 = sext i32 %30 to i64
%32 = and i64 %31, 71776119061217280
%33 = ashr i64 %32, 40
%34 = or i64 %29, %33
%35 = load i32, i32* %2
%36 = ashr i32 %35, 56
%37 = and i32 %36, 255
%38 = sext i32 %37 to i64
%39 = or i64 %34, %38
%40 = trunc i64 %39 to i32
store i32 %40, i32* %3
%41 = load i32, i32* %3
ret i32 %41
}

LLVM IR (-O2):
define i32 @endswap64(i32 %0) {
ret i32 poison
}
/* Variables and functions */
int O_CREAT;
int O_RDWR;
int open(char *, int);
int /*<<< orphan*/ strcat(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char const *);
int _msg_open(const char *msgfile, const char *extension) {
  char tmp[32];
  strcpy(tmp, msgfile);
  strcat(tmp, extension);
  return open(tmp, O_CREAT | O_RDWR);
}


x86 assembly (clang, -O0):
<_msg_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0x30(%rbp),%rdi
mov    0x2e93(%rip),%rax
mov    (%rax),%esi
mov    0x2e72(%rip),%rax
or     (%rax),%esi
call   1040 <open@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_msg_open>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <strcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <strcat@plt>
mov    0x2e9e(%rip),%rax
mov    0x2e7f(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    %r14,%rdi
call   1040 <open@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@O_CREAT = global i32 0
@O_RDWR = global i32 0
define i32 @_msg_open(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [32 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = call i32 @strcpy(i8* %6, i8* %7)
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%10 = load i8*, i8** %4
%11 = call i32 @strcat(i8* %9, i8* %10)
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%13 = load i32, i32* @O_CREAT
%14 = load i32, i32* @O_RDWR
%15 = or i32 %13, %14
%16 = call i32 @open(i8* %12, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
@O_CREAT = global i32 0
@O_RDWR = global i32 0
define i32 @_msg_open(i8* %0, i8* %1) {
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* %0)
%6 = call i32 @strcat(i8* %4, i8* %1)
%7 = load i32, i32* @O_CREAT
%8 = load i32, i32* @O_RDWR
%9 = or i32 %8, %7
%10 = call i32 @open(i8* %4, i32 %9)
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ __NR_read;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int, void *, size_t);
__attribute__((always_)) ssize_t _syscall_read(int fildes, void *buf,
                                               size_t nbyte) {
  return syscall(__NR_read, fildes, buf, nbyte);
}


x86 assembly (clang, -O0):
<_syscall_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall_read>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_read = global i32 0
define i32 @_syscall_read(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* @__NR_read
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @syscall(i32 %7, i32 %8, i8* %9, i64 %10)
ret i32 %11
}

LLVM IR (-O2):
@__NR_read = global i32 0
define i32 @_syscall_read(i32 %0, i8* %1, i64 %2) {
%4 = load i32, i32* @__NR_read
%5 = tail call i32 @syscall(i32 %4, i32 %0, i8* %1, i64 %2)
ret i32 %5
}
/* Variables and functions */
float GetFloat();
int /*<<< orphan*/ printf(char *);
scalar_t__ roundf(float);
int getPositiveFloat(void) {
  float n;
  printf("O hai! ");
  do {
    printf("How much change is owed?\n");
    n = GetFloat();
  } while (n < 0);
  n = n * 100;
  int posInt = (int)roundf(n);
  return posInt;
}


x86 assembly (clang, -O0):
<getPositiveFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <GetFloat@plt>
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
ja     1144 <getPositiveFloat+0x14>
movss  0xe8f(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <roundf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPositiveFloat>:
push   %rbx
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
lea    0xebc(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <GetFloat@plt>
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
ja     1160 <getPositiveFloat+0x20>
mulss  0xe81(%rip),%xmm0
pop    %rbx
jmp    1050 <roundf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"O hai! \00"
@.str.1 = [26 x i8] c"How much change is owed?\0A\00"
define i32 @getPositiveFloat() {
%1 = alloca float
%2 = alloca i32
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %7, %0
%5 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%6 = call float (...) @GetFloat()
store float %6, float* %1
br label %7
7: ; preds = %4
%8 = load float, float* %1
%9 = fcmp olt float %8, 0.000000e+00
br i1 %9, label %4, label %10
10: ; preds = %7
%11 = load float, float* %1
%12 = fmul float %11, 1.000000e+02
store float %12, float* %1
%13 = load float, float* %1
%14 = call i64 @roundf(float %13)
%15 = trunc i64 %14 to i32
store i32 %15, i32* %2
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@.str = [8 x i8] c"O hai! \00"
@str = [25 x i8] c"How much change is owed?\00"
define i32 @getPositiveFloat() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%4 = tail call float (...) @GetFloat()
%5 = fcmp olt float %4, 0.000000e+00
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = fmul float %4, 1.000000e+02
%8 = tail call i64 @roundf(float %7)
%9 = trunc i64 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ fg_color(int);
int /*<<< orphan*/ go_to_xy(int, int);
int /*<<< orphan*/ spacer(int, int);
void gfx_draw_bar(int x, int y, int color) {
  go_to_xy(x, y);
  fg_color(color + 1);
  spacer(10, 178);
  go_to_xy(x, y + 1);
  spacer(10, 178);
  fg_color(15);
}


x86 assembly (clang, -O0):
<gfx_draw_bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <go_to_xy@plt>
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1050 <fg_color@plt>
mov    $0xa,%edi
mov    $0xb2,%esi
call   1040 <spacer@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0x1,%esi
call   1030 <go_to_xy@plt>
mov    $0xa,%edi
mov    $0xb2,%esi
call   1040 <spacer@plt>
mov    $0xf,%edi
call   1050 <fg_color@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gfx_draw_bar>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r14d
call   1030 <go_to_xy@plt>
add    $0x1,%ebx
mov    %ebx,%edi
call   1050 <fg_color@plt>
mov    $0xa,%edi
mov    $0xb2,%esi
call   1040 <spacer@plt>
add    $0x1,%ebp
mov    %r14d,%edi
mov    %ebp,%esi
call   1030 <go_to_xy@plt>
mov    $0xa,%edi
mov    $0xb2,%esi
call   1040 <spacer@plt>
mov    $0xf,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <fg_color@plt>

LLVM IR (-O0):
define void @gfx_draw_bar(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i32 @go_to_xy(i32 %7, i32 %8)
%10 = load i32, i32* %6
%11 = add nsw i32 %10, 1
%12 = call i32 @fg_color(i32 %11)
%13 = call i32 @spacer(i32 10, i32 178)
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = add nsw i32 %15, 1
%17 = call i32 @go_to_xy(i32 %14, i32 %16)
%18 = call i32 @spacer(i32 10, i32 178)
%19 = call i32 @fg_color(i32 15)
ret void
}

LLVM IR (-O2):
define void @gfx_draw_bar(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @go_to_xy(i32 %0, i32 %1)
%5 = add nsw i32 %2, 1
%6 = tail call i32 @fg_color(i32 %5)
%7 = tail call i32 @spacer(i32 10, i32 178)
%8 = add nsw i32 %1, 1
%9 = tail call i32 @go_to_xy(i32 %0, i32 %8)
%10 = tail call i32 @spacer(i32 10, i32 178)
%11 = tail call i32 @fg_color(i32 15)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int usage(const char *progname) {
  fprintf(stderr,
          "%s"
          " wrong args\n",
          progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"%s wrong args\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"%s wrong args\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int verifica_lados(int x, int y, int z) {
  int flg = 1;
  if (x > (y + z)) {
    flg = 0;
  } else if (y > (x + z)) {
    flg = 0;
  } else if (z > (x + y)) {
    flg = 0;
  }
  return flg;
}


x86 assembly (clang, -O0):
<verifica_lados>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jle    1131 <verifica_lados+0x31>
movl   $0x0,-0x10(%rbp)
jmp    1170 <verifica_lados+0x70>
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jle    114e <verifica_lados+0x4e>
movl   $0x0,-0x10(%rbp)
jmp    116b <verifica_lados+0x6b>
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jle    1166 <verifica_lados+0x66>
movl   $0x0,-0x10(%rbp)
jmp    116b <verifica_lados+0x6b>
jmp    1170 <verifica_lados+0x70>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<verifica_lados>:
lea    (%rdx,%rsi,1),%eax
cmp    %edi,%eax
setge  %al
lea    (%rdx,%rdi,1),%ecx
cmp    %esi,%ecx
setge  %cl
and    %al,%cl
add    %edi,%esi
cmp    %edx,%esi
setge  %al
and    %cl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @verifica_lados(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, %1
%5 = icmp sge i32 %4, %0
%6 = add nsw i32 %2, %0
%7 = icmp sge i32 %6, %1
%8 = select i1 %5, i1 %7, i1 false
%9 = add nsw i32 %1, %0
%10 = icmp sge i32 %9, %2
%11 = select i1 %8, i1 %10, i1 false
%12 = zext i1 %11 to i32
ret i32 %12
}