xunge/DecIR huggingface dataset:
void free_formats(char **formats, int num_formats) {
  if (num_formats) {
    while (--num_formats >= 0)
      LispFree(formats[num_formats]);
    LispFree(formats);
  }
}


x86 assembly (clang, -O0):
<free_formats>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1163 <free_formats+0x53>
jmp    112e <free_formats+0x1e>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jl     1158 <free_formats+0x48>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1030 <LispFree@plt>
jmp    112e <free_formats+0x1e>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <LispFree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_formats>:
test   %esi,%esi
je     1159 <free_formats+0x49>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
jle    1148 <free_formats+0x38>
mov    %esi,%ebx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    -0x2(%rbx),%eax
mov    (%r14,%rax,8),%rdi
xor    %eax,%eax
call   1030 <LispFree@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1130 <free_formats+0x20>
mov    %r14,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <LispFree@plt>
ret

LLVM IR (-O0):
define void @free_formats(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 = icmp ne i32 %5, 0
br i1 %6, label %7, label %22
7: ; preds = %2
br label %8
8: ; preds = %12, %7
%9 = load i32, i32* %4
%10 = add nsw i32 %9, -1
store i32 %10, i32* %4
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = load i8**, i8*** %3
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 (i8*, ...) bitcast (i32 (...)* @LispFree to i32 (i8*, ...)*)(i8* %17)
br label %8
19: ; preds = %8
%20 = load i8**, i8*** %3
%21 = call i32 (i8**, ...) bitcast (i32 (...)* @LispFree to i32 (i8**, ...)*)(i8** %20)
br label %22
22: ; preds = %19, %2
ret void
}

LLVM IR (-O2):
define void @free_formats(i8** %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %18, label %4
4: ; preds = %2
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %16
6: ; preds = %4
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ %7, %6 ], [ %10, %8 ]
%10 = add nsw i64 %9, -1
%11 = and i64 %10, 4294967295
%12 = getelementptr inbounds i8*, i8** %0, i64 %11
%13 = load i8*, i8** %12
%14 = tail call i32 (i8*, ...) bitcast (i32 (...)* @LispFree to i32 (i8*, ...)*)(i8* %13)
%15 = icmp ugt i64 %9, 1
br i1 %15, label %8, label %16
16: ; preds = %8, %4
%17 = tail call i32 (i8**, ...) bitcast (i32 (...)* @LispFree to i32 (i8**, ...)*)(i8** %0)
br label %18
18: ; preds = %16, %2
ret void
}
void gtk_font_button_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_font_button_get_type() {
ret void
}
int func(void) { return 42; }


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

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

LLVM IR (-O0):
define i32 @func() {
ret i32 42
}

LLVM IR (-O2):
define i32 @func() {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ triangle();
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT);
  triangle();
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
mov    $0x0,%al
call   1040 <triangle@plt>
mov    $0x0,%al
call   1050 <glFlush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
xor    %eax,%eax
call   1040 <triangle@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glFlush@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = call i32 @glClear(i32 %1)
%3 = call i32 (...) @triangle()
%4 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = tail call i32 @glClear(i32 %1)
%3 = tail call i32 (...) @triangle()
%4 = tail call i32 (...) @glFlush()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ E();
int D() { E(); }


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

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

LLVM IR (-O0):
define i32 @D() {
%1 = alloca i32
%2 = call i32 (...) @E()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @D() {
%1 = tail call i32 (...) @E()
ret i32 undef
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char *c = "111";
  printf("%d\n", atoi(c) + 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,%esi
add    $0x1,%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 112)
ret i32 0
}
void execCommand(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               68, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<execCommand>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x44,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<execCommand>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x44,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.execCommand = [12 x i8] c"execCommand\00"
define void @execCommand() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 68, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.execCommand, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.execCommand = [12 x i8] c"execCommand\00"
define void @execCommand() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 68, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.execCommand, i64 0, i64 0))
ret void
}
void kasan_poison_kfree_large(const void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @kasan_poison_kfree_large(i8* nocapture %0) {
ret void
}
int is_hex(char c) {
  return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') ||
         (c >= 'A' && c <= 'F');
}


x86 assembly (clang, -O0):
<is_hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1129 <is_hex+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    116d <is_hex+0x6d>
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1148 <is_hex+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x66,%ecx
mov    %al,-0x2(%rbp)
jle    116d <is_hex+0x6d>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x3(%rbp)
jl     1167 <is_hex+0x67>
movsbl -0x1(%rbp),%eax
cmp    $0x46,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_hex>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
and    $0xdf,%dil
add    $0xbf,%dil
cmp    $0x6,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_hex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br i1 %9, label %28, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 97
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 102
br i1 %17, label %28, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sge i32 %20, 65
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 70
br label %26
26: ; preds = %22, %18
%27 = phi i1 [ false, %18 ], [ %25, %22 ]
br label %28
28: ; preds = %26, %14, %6
%29 = phi i1 [ true, %14 ], [ true, %6 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @is_hex(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ mymemset(char *, char, int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char const *argv[]) {
  char data[50];
  strcpy(data, "Hello world");
  puts(data);
  mymemset(data, 'a', 1);
  puts(data);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x50(%rbp),%rdi
call   1040 <puts@plt>
lea    -0x50(%rbp),%rdi
mov    $0x61,%esi
mov    $0x1,%edx
call   1050 <mymemset@plt>
lea    -0x50(%rbp),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
lea    0xec4(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    $0x61,%esi
mov    $0x1,%edx
call   1050 <mymemset@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Hello world\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [50 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%8 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%9 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%10 = call i32 @puts(i8* %9)
%11 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%12 = call i32 @mymemset(i8* %11, i8 signext 97, i32 1)
%13 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%14 = call i32 @puts(i8* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [50 x i8]
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @puts(i8* %4)
%7 = call i32 @mymemset(i8* %4, i8 signext 97, i32 1)
%8 = call i32 @puts(i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ delay_ms(int);
void tempo() { delay_ms(1000); }


x86 assembly (clang, -O0):
<tempo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3e8,%edi
call   1030 <delay_ms@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tempo>:
mov    $0x3e8,%edi
jmp    1030 <delay_ms@plt>

LLVM IR (-O0):
define void @tempo() {
%1 = call i32 @delay_ms(i32 1000)
ret void
}

LLVM IR (-O2):
define void @tempo() {
%1 = tail call i32 @delay_ms(i32 1000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addBoardCoords(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ boardCoordsOperationResults(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ createBoardCoord(int, int);
void boardCoordAdditionWorksInRange(void) {
  boardCoordsOperationResults(
      addBoardCoords(createBoardCoord(5, 6), createBoardCoord(7, 9)), 5 + 7,
      6 + 9);
}


x86 assembly (clang, -O0):
<boardCoordAdditionWorksInRange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x5,%edi
mov    $0x6,%esi
call   1030 <createBoardCoord@plt>
mov    %eax,-0x4(%rbp)
mov    $0x7,%edi
mov    $0x9,%esi
call   1030 <createBoardCoord@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
call   1050 <addBoardCoords@plt>
mov    %eax,%edi
mov    $0xc,%esi
mov    $0xf,%edx
call   1040 <boardCoordsOperationResults@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<boardCoordAdditionWorksInRange>:
push   %rbx
mov    $0x5,%edi
mov    $0x6,%esi
call   1030 <createBoardCoord@plt>
mov    %eax,%ebx
mov    $0x7,%edi
mov    $0x9,%esi
call   1030 <createBoardCoord@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <addBoardCoords@plt>
mov    %eax,%edi
mov    $0xc,%esi
mov    $0xf,%edx
pop    %rbx
jmp    1040 <boardCoordsOperationResults@plt>

LLVM IR (-O0):
define void @boardCoordAdditionWorksInRange() {
%1 = call i32 @createBoardCoord(i32 5, i32 6)
%2 = call i32 @createBoardCoord(i32 7, i32 9)
%3 = call i32 @addBoardCoords(i32 %1, i32 %2)
%4 = call i32 @boardCoordsOperationResults(i32 %3, i32 12, i32 15)
ret void
}

LLVM IR (-O2):
define void @boardCoordAdditionWorksInRange() {
%1 = tail call i32 @createBoardCoord(i32 5, i32 6)
%2 = tail call i32 @createBoardCoord(i32 7, i32 9)
%3 = tail call i32 @addBoardCoords(i32 %1, i32 %2)
%4 = tail call i32 @boardCoordsOperationResults(i32 %3, i32 12, i32 15)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ jupiter_print(char const *, char *);
int main(int argc, char *argv[]) {
  const char *salutation = "Hello";
  jupiter_print(salutation, argv[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)
lea    0xed3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
call   1030 <jupiter_print@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    (%rsi),%rsi
lea    0xee5(%rip),%rdi
call   1030 <jupiter_print@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @jupiter_print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
double __nv_sin(double);
double sin(double __a) { return __nv_sin(__a); }


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

x86 assembly (clang, -O2):
<sin>:
jmp    1030 <__nv_sin@plt>

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

LLVM IR (-O2):
define double @sin(double %0) {
%2 = tail call double @__nv_sin(double %0)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_si64(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_add_si64(__m64 a, __m64 b) { return _mm_add_si64(a, b); }


x86 assembly (clang, -O0):
<test_mm_add_si64>:
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 <_mm_add_si64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_add_si64>:
jmp    1030 <_mm_add_si64@plt>

LLVM IR (-O0):
define i32 @test_mm_add_si64(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 @_mm_add_si64(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_add_si64(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_add_si64(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ IntEnable(int);
int /*<<< orphan*/ IntRegister(int, void (*)());
void WatchdogIntRegister(uint32_t ui32Base, void (*pfnHandler)(void)) {
  ;
  IntRegister(34, pfnHandler);
  IntEnable(34);
}


x86 assembly (clang, -O0):
<WatchdogIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x22,%edi
call   1040 <IntRegister@plt>
mov    $0x22,%edi
call   1030 <IntEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogIntRegister>:
push   %rax
mov    $0x22,%edi
call   1040 <IntRegister@plt>
mov    $0x22,%edi
pop    %rax
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @WatchdogIntRegister(i32 %0, void ()* %1) {
%3 = alloca i32
%4 = alloca void ()*
store i32 %0, i32* %3
store void ()* %1, void ()** %4
%5 = load void ()*, void ()** %4
%6 = bitcast void ()* %5 to void (...)*
%7 = call i32 @IntRegister(i32 34, void (...)* %6)
%8 = call i32 @IntEnable(i32 34)
ret void
}

LLVM IR (-O2):
define void @WatchdogIntRegister(i32 %0, void ()* %1) {
%3 = bitcast void ()* %1 to void (...)*
%4 = tail call i32 @IntRegister(i32 34, void (...)* %3)
%5 = tail call i32 @IntEnable(i32 34)
ret void
}
void wcn36xx_debugfs_init(struct wcn36xx *wcn) {}


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

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

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

LLVM IR (-O2):
%struct.wcn36xx = type opaque
define void @wcn36xx_debugfs_init(%struct.wcn36xx* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ n;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fwrite(int *, int, int, int /*<<< orphan*/ *);
int putw(int n, FILE *f) {
  if (fwrite(&n, sizeof(n), 1, f) != 1)
    return EOF;
  return 0;
}


x86 assembly (clang, -O0):
<putw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
cmp    $0x1,%eax
je     1150 <putw+0x40>
mov    0x2ea2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <putw+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putw>:
push   %rax
mov    %rsi,%rcx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
je     113e <putw+0x2e>
mov    0x2eac(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @putw(i32 %0, i32* nocapture %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @fwrite(i32* %3, i32 4, i32 1, i32* %1)
%5 = icmp eq i32 %4, 1
%6 = load i32, i32* @EOF
%7 = select i1 %5, i32 0, i32 %6
ret i32 %7
}
int do_285() { return 285; }


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

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

LLVM IR (-O0):
define i32 @do_285() {
ret i32 285
}

LLVM IR (-O2):
define i32 @do_285() {
ret i32 285
}
long monte_dlib_interface_type(void) { return (2); }


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

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

LLVM IR (-O0):
define i64 @monte_dlib_interface_type() {
ret i64 2
}

LLVM IR (-O2):
define i64 @monte_dlib_interface_type() {
ret i64 2
}
/* Variables and functions */
int /*<<< orphan*/ bd_unregister_fops();
void cleanup_module(void) { bd_unregister_fops(); }


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

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

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

LLVM IR (-O2):
define void @cleanup_module() {
%1 = tail call i32 (...) @bd_unregister_fops()
ret void
}
signed long signedlong_ignoring_unsignedlonglongint(signed long x,
                                                    unsigned long long int y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @signedlong_ignoring_unsignedlonglongint(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
ret i64 %5
}

LLVM IR (-O2):
define i64 @signedlong_ignoring_unsignedlonglongint(i64 returned %0, i64 %1) {
ret i64 %0
}
int lnp_set_range(struct lnptower *tower, int range) { return (1); }


x86 assembly (clang, -O0):
<lnp_set_range>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.lnptower = type opaque
define i32 @lnp_set_range(%struct.lnptower* %0, i32 %1) {
%3 = alloca %struct.lnptower*
%4 = alloca i32
store %struct.lnptower* %0, %struct.lnptower** %3
store i32 %1, i32* %4
ret i32 1
}

LLVM IR (-O2):
%struct.lnptower = type opaque
define i32 @lnp_set_range(%struct.lnptower* nocapture readnone %0, i32 %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void msg_end(void) { printf("\n"); }


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

x86 assembly (clang, -O2):
<msg_end>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @msg_end() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
int __attribute((fastcall)) check_fastcall_espdiff_1(int a) { return a; }


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

x86 assembly (clang, -O2):
<check_fastcall_espdiff_1>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @check_fastcall_espdiff_1(i32 returned %0) {
ret i32 %0
}
float foo(float parameter_1) {
  float a = parameter_1 * 0.001;
  return a;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @foo(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fmul double %5, 1.000000e-03
%7 = fptrunc double %6 to float
store float %7, float* %3
%8 = load float, float* %3
ret float %8
}

LLVM IR (-O2):
define float @foo(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 1.000000e-03
%4 = fptrunc double %3 to float
ret float %4
}
/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
__attribute__((visibility("hidden"))) char Int2Char(uint8_t parse) {
  if (0 <= parse <= 9)
    return parse + '0';
  else if (0x0A <= parse <= 0x0F)
    return parse + 'A' - 10;
  else
    return 0;
}


x86 assembly (clang, -O0):
<Int2Char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x9,%eax
jg     1132 <Int2Char+0x32>
movsbl -0x2(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1164 <Int2Char+0x64>
movsbl -0x2(%rbp),%ecx
mov    $0xa,%eax
cmp    %ecx,%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
cmp    $0xf,%eax
jg     1160 <Int2Char+0x60>
movsbl -0x2(%rbp),%eax
add    $0x41,%eax
sub    $0xa,%eax
mov    %al,-0x1(%rbp)
jmp    1164 <Int2Char+0x64>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Int2Char>:
lea    0x30(%rdi),%eax
ret

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

LLVM IR (-O2):
define hidden signext i8 @Int2Char(i8 signext %0) {
%2 = add i8 %0, 48
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int sum(int, int);
void main() {
  int a = 10;
  int b = 0;
  int result = sum(a, b);
  if (result != a + b) {
    __VERIFIER_error();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <sum@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
cmp    %ecx,%eax
je     115c <main+0x3c>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
xor    %esi,%esi
call   1030 <sum@plt>
cmp    $0xa,%eax
jne    1134 <main+0x14>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <__VERIFIER_error@plt>

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @sum(i32 10, i32 0)
%2 = icmp eq i32 %1, 10
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @__VERIFIER_error()
br label %5
5: ; preds = %3, %0
ret void
}
int max(int x, int y) {
  if (x > y)
    return x;
  else
    return y;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1121 <max+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <max+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ emitln(char *);
void clear() { emitln("mov\t$0,%%eax"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"mov\09$0,%%eax\00"
define void @clear() {
%1 = call i32 @emitln(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"mov\09$0,%%eax\00"
define void @clear() {
%1 = tail call i32 @emitln(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct battle_char {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_status(struct battle_char *, int);
scalar_t__ get_random(int /*<<< orphan*/, int);
scalar_t__ mod6(struct battle_char *, struct battle_char *, int);
void stop(struct battle_char *origin, struct battle_char *target) {
  if (get_random(0, 100) < mod6(origin, target, 110)) {
    add_status(target, 16);
  }
}


x86 assembly (clang, -O0):
<stop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x6e,%edx
call   1040 <mod6@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jge    1180 <stop+0x50>
mov    -0x10(%rbp),%rdi
mov    $0x10,%esi
call   1050 <add_status@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x6e,%edx
call   1040 <mod6@plt>
cmp    %rax,%rbx
jge    1171 <stop+0x41>
mov    %r14,%rdi
mov    $0x10,%esi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <add_status@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.battle_char = type { i32 }
define void @stop(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = alloca %struct.battle_char*
%4 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %3
store %struct.battle_char* %1, %struct.battle_char** %4
%5 = call i64 @get_random(i32 0, i32 100)
%6 = load %struct.battle_char*, %struct.battle_char** %3
%7 = load %struct.battle_char*, %struct.battle_char** %4
%8 = call i64 @mod6(%struct.battle_char* %6, %struct.battle_char* %7, i32 110)
%9 = icmp slt i64 %5, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load %struct.battle_char*, %struct.battle_char** %4
%12 = call i32 @add_status(%struct.battle_char* %11, i32 16)
br label %13
13: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
%struct.battle_char = type { i32 }
define void @stop(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = tail call i64 @get_random(i32 0, i32 100)
%4 = tail call i64 @mod6(%struct.battle_char* %0, %struct.battle_char* %1, i32 110)
%5 = icmp slt i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @add_status(%struct.battle_char* %1, i32 16)
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[], char *envp[]) { printf("%d ", 1); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xed6(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int atoi(char const *);
int string_parseInt(const char *str) { return atoi(str); }


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

x86 assembly (clang, -O2):
<string_parseInt>:
jmp    1030 <atoi@plt>

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

LLVM IR (-O2):
define i32 @string_parseInt(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
ret i32 %2
}
extern int __get_adc_mode() { return 33; }


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

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

LLVM IR (-O0):
define i32 @__get_adc_mode() {
ret i32 33
}

LLVM IR (-O2):
define i32 @__get_adc_mode() {
ret i32 33
}
int Net_Init() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @Net_Init() {
ret i32 0
}
/* Type definitions */
struct wl_registry_listener {
  int dummy;
};
struct wl_registry {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
int wl_proxy_add_listener(struct wl_proxy *, void (*)(), void *);
int wl_registry_add_listener(struct wl_registry *wl_registry,
                             const struct wl_registry_listener *listener,
                             void *data) {
  return wl_proxy_add_listener((struct wl_proxy *)wl_registry,
                               (void (**)(void))listener, data);
}


x86 assembly (clang, -O0):
<wl_registry_add_listener>:
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),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <wl_proxy_add_listener@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_registry_add_listener>:
jmp    1030 <wl_proxy_add_listener@plt>

LLVM IR (-O0):
%struct.wl_registry = type { i32 }
%struct.wl_registry_listener = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_registry_add_listener(%struct.wl_registry* %0, %struct.wl_registry_listener* %1, i8* %2) {
%4 = alloca %struct.wl_registry*
%5 = alloca %struct.wl_registry_listener*
%6 = alloca i8*
store %struct.wl_registry* %0, %struct.wl_registry** %4
store %struct.wl_registry_listener* %1, %struct.wl_registry_listener** %5
store i8* %2, i8** %6
%7 = load %struct.wl_registry*, %struct.wl_registry** %4
%8 = bitcast %struct.wl_registry* %7 to %struct.wl_proxy*
%9 = load %struct.wl_registry_listener*, %struct.wl_registry_listener** %5
%10 = bitcast %struct.wl_registry_listener* %9 to void ()**
%11 = bitcast void ()** %10 to void (...)*
%12 = load i8*, i8** %6
%13 = call i32 @wl_proxy_add_listener(%struct.wl_proxy* %8, void (...)* %11, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.wl_registry = type { i32 }
%struct.wl_registry_listener = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_registry_add_listener(%struct.wl_registry* %0, %struct.wl_registry_listener* %1, i8* %2) {
%4 = bitcast %struct.wl_registry* %0 to %struct.wl_proxy*
%5 = bitcast %struct.wl_registry_listener* %1 to void (...)*
%6 = tail call i32 @wl_proxy_add_listener(%struct.wl_proxy* %4, void (...)* %5, i8* %2)
ret i32 %6
}
void swap(int a[], int i, int j) {
  int aux = 0;
  aux = a[i];
  a[i] = a[j];
  a[j] = aux;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @swap(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 0, i32* %7
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
double M_PI;
double degreesToRadians(double degrees) { return degrees * M_PI / 180; }


x86 assembly (clang, -O0):
<degreesToRadians>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    0x2ed3(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xedf(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<degreesToRadians>:
mov    0x2ee1(%rip),%rax
mulsd  (%rax),%xmm0
divsd  0xeed(%rip),%xmm0
ret

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

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @degreesToRadians(double %0) {
%2 = load double, double* @M_PI
%3 = fmul double %2, %0
%4 = fdiv double %3, 1.800000e+02
ret double %4
}
/* Variables and functions */
int getppid();
int /*<<< orphan*/ printf(char *, int);
void sh_ppid() { printf("%d\n", getppid()); }


x86 assembly (clang, -O0):
<sh_ppid>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <getppid@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sh_ppid>:
push   %rax
xor    %eax,%eax
call   1040 <getppid@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @sh_ppid() {
%1 = call i32 (...) @getppid()
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @sh_ppid() {
%1 = tail call i32 (...) @getppid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int number_to_test;
  printf("Enter your number to be tested: ");
  scanf("%i", &number_to_test);
  if (number_to_test % 2) {
    printf("The number is odd.\n");
  } else {
    printf("The number is even.\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1170 <main+0x50>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
jmp    117c <main+0x5c>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xedd(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
testb  $0x1,0x4(%rsp)
lea    0xeca(%rip),%rax
lea    0xed7(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Enter your number to be tested: \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [20 x i8] c"The number is odd.\0A\00"
@.str.3 = [21 x i8] c"The number is even.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = srem i32 %5, 2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Enter your number to be tested: \00"
@.str.1 = [3 x i8] c"%i\00"
@str = [20 x i8] c"The number is even.\00"
@str.4 = [19 x i8] c"The number is odd.\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = and i32 %5, 1
%7 = icmp eq i32 %6, 0
%8 = select i1 %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str.4, i64 0, i64 0)
%9 = call i32 @puts(i8* dereferenceable(1) %8)
ret i32 0
}
/* Variables and functions */
unsigned long read_beword(unsigned char const *);
unsigned long read_belong(const unsigned char *p) {
  return ((unsigned long)read_beword(p) << 16) | read_beword(p + 2);
}


x86 assembly (clang, -O0):
<read_belong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <read_beword@plt>
shl    $0x10,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x2,%rdi
call   1030 <read_beword@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
or     %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_belong>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <read_beword@plt>
mov    %rax,%r14
shl    $0x10,%r14
add    $0x2,%rbx
mov    %rbx,%rdi
call   1030 <read_beword@plt>
or     %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @read_belong(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @read_beword(i8* %3)
%5 = shl i64 %4, 16
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 2
%8 = call i64 @read_beword(i8* %7)
%9 = or i64 %5, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @read_belong(i8* %0) {
%2 = tail call i64 @read_beword(i8* %0)
%3 = shl i64 %2, 16
%4 = getelementptr inbounds i8, i8* %0, i64 2
%5 = tail call i64 @read_beword(i8* %4)
%6 = or i64 %3, %5
ret i64 %6
}
/* Variables and functions */
int somedllfunc();
int main(void) { return somedllfunc() == 42 ? 0 : 1; }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <somedllfunc@plt>
xor    %ecx,%ecx
cmp    $0x2a,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @somedllfunc()
%3 = icmp eq i32 %2, 42
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 0, i32 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @somedllfunc()
%2 = icmp ne i32 %1, 42
%3 = zext i1 %2 to i32
ret i32 %3
}