xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x59() {
  Assert_real((isodigit(89) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              450, ("isodigit should be 0 for Y"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x59>:
push   %rax
mov    $0x59,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x1c2,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for Y\00"
define void @t_isodigit_0x59() {
%1 = call i64 @isodigit(i32 89)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 450, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for Y\00"
define void @t_isodigit_0x59() {
%1 = tail call i64 @isodigit(i32 89)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 450, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _cmos_determine_time_format();
void cmos_init(void) { _cmos_determine_time_format(); }


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

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

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

LLVM IR (-O2):
define void @cmos_init() {
%1 = tail call i32 (...) @_cmos_determine_time_format()
ret void
}
void foo585(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo585(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ where();
void ferr(char *text) {
  fprintf(stderr, text);
  where();
  exit(1);
}


x86 assembly (clang, -O0):
<ferr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <where@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<ferr>:
push   %rax
mov    %rdi,%rsi
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <where@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @ferr(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* %4)
%6 = call i32 (...) @where()
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
define void @ferr(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* %0)
%4 = tail call i32 (...) @where()
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ CyEEPROM_Start();
int /*<<< orphan*/ CySetTemp();
void CFG_EEPROM_Enable(void) {
  (void)CySetTemp();
  CyEEPROM_Start();
}


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

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

LLVM IR (-O0):
define void @CFG_EEPROM_Enable() {
%1 = call i32 (...) @CySetTemp()
%2 = call i32 (...) @CyEEPROM_Start()
ret void
}

LLVM IR (-O2):
define void @CFG_EEPROM_Enable() {
%1 = tail call i32 (...) @CySetTemp()
%2 = tail call i32 (...) @CyEEPROM_Start()
ret void
}
const char *Push_Description(void) {
  return ""
         "The `Push` class provides an interface for the addition and removal "
         "of "
         "objects from another in a positional sense."
         "\n\n"
         "`push` can be used to add new objects to a collection and `pop` to "
         "remove "
         "them. Usage of `push` can require `assign` to be defined on the "
         "argument.";
}


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

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

LLVM IR (-O0):
@.str = [264 x i8] c"The `Push` class provides an interface for the addition and removal of objects from another in a positional sense.\0A\0A`push` can be used to add new objects to a collection and `pop` to remove them. Usage of `push` can require `assign` to be defined on the argument.\00"
define i8* @Push_Description() {
ret i8* getelementptr inbounds ([264 x i8], [264 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [264 x i8] c"The `Push` class provides an interface for the addition and removal of objects from another in a positional sense.\0A\0A`push` can be used to add new objects to a collection and `pop` to remove them. Usage of `push` can require `assign` to be defined on the argument.\00"
define i8* @Push_Description() {
ret i8* getelementptr inbounds ([264 x i8], [264 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
void f1(unsigned char s) {
  if ((unsigned char)s == 0)
    return;
  if (s == 0)
    link_error();
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jne    1130 <f1+0x20>
jmp    1144 <f1+0x34>
movzbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jne    1144 <f1+0x34>
mov    $0x0,%al
call   1030 <link_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f1(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %13
7: ; preds = %1
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = call i32 (...) @link_error()
br label %13
13: ; preds = %6, %11, %7
ret void
}

LLVM IR (-O2):
define void @f1(i8 zeroext %0) {
ret void
}
/* Variables and functions */
char *getcwd(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int pwds() {
  char buf[256];
  char *res;
  res = getcwd(buf, 256);
  if (res) {
    printf("%s\n", buf);
    return 0;
  } else
    return 1;
}


x86 assembly (clang, -O0):
<pwds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
lea    -0x110(%rbp),%rdi
mov    $0x100,%esi
call   1040 <getcwd@plt>
mov    %rax,-0x118(%rbp)
cmpq   $0x0,-0x118(%rbp)
je     1170 <pwds+0x50>
lea    -0x110(%rbp),%rsi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1177 <pwds+0x57>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwds>:
sub    $0x108,%rsp
mov    %rsp,%rdi
mov    $0x100,%esi
call   1040 <getcwd@plt>
test   %rax,%rax
je     1152 <pwds+0x32>
lea    0xec0(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x108,%rsp
ret
mov    $0x1,%eax
add    $0x108,%rsp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @pwds() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i8* @getcwd(i8* %2, i32 256)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %7
7: ; preds = %0, %5
%8 = phi i32 [ 0, %5 ], [ 1, %0 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int, unsigned int);
void MD5_memset(char *output, int value, unsigned int len) {
  memset(output, value, len);
}


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

x86 assembly (clang, -O2):
<MD5_memset>:
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @MD5_memset(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @memset(i8* %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @MD5_memset(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @memset(i8* %0, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_spaces(int spaces) {
  for (int i = 0; i < spaces; i++) {
    printf(" ");
  }
}


x86 assembly (clang, -O0):
<print_spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <print_spaces+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <print_spaces+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_spaces>:
push   %rbx
test   %edi,%edi
jle    112f <print_spaces+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <print_spaces+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @print_spaces(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %4, label %3
3: ; preds = %4, %1
ret void
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @putchar(i32 32)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %3, label %4
}
void gtk_accel_group_connect() {}


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

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

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

LLVM IR (-O2):
define void @gtk_accel_group_connect() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
void raint2048() {
  printf("\nChanging Read Ahead Cache size for Internal sdcard to 2048kb\n");
  char buf[256];
  sprintf(buf, "/system/bin/sh -c %s",
          "'echo 2048 > /sys/block/mmcblk0/queue/read_ahead_kb'");
  system(buf);
}


x86 assembly (clang, -O0):
<raint2048>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
lea    -0x100(%rbp),%rdi
lea    0xeea(%rip),%rsi
lea    0xef8(%rip),%rdx
call   1050 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<raint2048>:
push   %rbx
sub    $0x100,%rsp
lea    0xf0b(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb5(%rip),%rsi
lea    0xec3(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [63 x i8] c"\0AChanging Read Ahead Cache size for Internal sdcard to 2048kb\0A\00"
@.str.1 = [21 x i8] c"/system/bin/sh -c %s\00"
@.str.2 = [53 x i8] c"'echo 2048 > /sys/block/mmcblk0/queue/read_ahead_kb'\00"
define void @raint2048() {
%1 = alloca [256 x i8]
%2 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%6 = call i32 @system(i8* %5)
ret void
}

LLVM IR (-O2):
@.str.1 = [21 x i8] c"/system/bin/sh -c %s\00"
@.str.2 = [53 x i8] c"'echo 2048 > /sys/block/mmcblk0/queue/read_ahead_kb'\00"
@str = [62 x i8] c"\0AChanging Read Ahead Cache size for Internal sdcard to 2048kb\00"
define void @raint2048() {
%1 = alloca [256 x i8]
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @system(i8* %3)
ret void
}
void XContextualDrawing() {}


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

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

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

LLVM IR (-O2):
define void @XContextualDrawing() {
ret void
}
int fn3(int x) { return x + (1 & x); }


x86 assembly (clang, -O0):
<fn3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
and    $0x1,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn3>:
mov    %edi,%eax
and    $0x1,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @fn3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = and i32 1, %4
%6 = add nsw i32 %3, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @fn3(i32 %0) {
%2 = and i32 %0, 1
%3 = add nsw i32 %2, %0
ret i32 %3
}
int test_imm_FFuint8_mem(unsigned char *val) {
  return ((*val) & (-0xFF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FFuint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffff01,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_FFuint8_mem>:
testb  $0x1,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_FFuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 1
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ lua_beginblock();
int /*<<< orphan*/ lua_dofile(int /*<<< orphan*/ *);
int /*<<< orphan*/ lua_dostring(char *);
int /*<<< orphan*/ lua_endblock();
int /*<<< orphan*/ stdin;
void manual_input(void) {
  if ((0 == 0)) {
    char buffer[250];
    while (fgets(buffer, sizeof(buffer), stdin) != 0) {
      lua_beginblock();
      lua_dostring(buffer);
      lua_endblock();
    }
  } else
    lua_dofile(NULL);
}


x86 assembly (clang, -O0):
<manual_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
mov    0x2e8f(%rip),%rax
mov    (%rax),%edx
mov    $0xfa,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     118e <manual_input+0x4e>
mov    $0x0,%al
call   1030 <lua_beginblock@plt>
lea    -0x100(%rbp),%rdi
call   1040 <lua_dostring@plt>
mov    $0x0,%al
call   1060 <lua_endblock@plt>
jmp    114b <manual_input+0xb>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<manual_input>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    0x2e97(%rip),%r14
mov    (%r14),%edx
mov    %rsp,%rdi
mov    $0xfa,%esi
call   1050 <fgets@plt>
test   %rax,%rax
je     119b <manual_input+0x5b>
mov    %rsp,%rbx
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <lua_beginblock@plt>
mov    %rbx,%rdi
call   1040 <lua_dostring@plt>
xor    %eax,%eax
call   1060 <lua_endblock@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0xfa,%esi
call   1050 <fgets@plt>
test   %rax,%rax
jne    1170 <manual_input+0x30>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
define void @manual_input() {
%1 = alloca [250 x i8]
br label %2
2: ; preds = %7, %0
%3 = getelementptr inbounds [250 x i8], [250 x i8]* %1, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = call i64 @fgets(i8* %3, i32 250, i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = call i32 (...) @lua_beginblock()
%9 = getelementptr inbounds [250 x i8], [250 x i8]* %1, i64 0, i64 0
%10 = call i32 @lua_dostring(i8* %9)
%11 = call i32 (...) @lua_endblock()
br label %2
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
define void @manual_input() {
%1 = alloca [250 x i8]
%2 = getelementptr inbounds [250 x i8], [250 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i64 @fgets(i8* %2, i32 250, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %0, %6
%7 = call i32 (...) @lua_beginblock()
%8 = call i32 @lua_dostring(i8* %2)
%9 = call i32 (...) @lua_endblock()
%10 = load i32, i32* @stdin
%11 = call i64 @fgets(i8* %2, i32 250, i32 %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %0
ret void
}
/* Variables and functions */
int get_first_empty_block_from(int);
int get_first_empty_block() { return get_first_empty_block_from(1); }


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

x86 assembly (clang, -O2):
<get_first_empty_block>:
mov    $0x1,%edi
jmp    1030 <get_first_empty_block_from@plt>

LLVM IR (-O0):
define i32 @get_first_empty_block() {
%1 = call i32 @get_first_empty_block_from(i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @get_first_empty_block() {
%1 = tail call i32 @get_first_empty_block_from(i32 1)
ret i32 %1
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int log_compar(const void *_a, const void *_b) {
  const int64_t *a = _a, *b = _b;
  return *a < *b ? -1 : (*a > *b ? 1 : 0);
}


x86 assembly (clang, -O0):
<log_compar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%rax
jge    113d <log_compar+0x3d>
mov    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    115b <log_compar+0x5b>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmovg  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_compar>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @log_compar(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i64*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
store i64* %8, i64** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i64*
store i64* %10, i64** %6
%11 = load i64*, i64** %5
%12 = load i64, i64* %11
%13 = load i64*, i64** %6
%14 = load i64, i64* %13
%15 = icmp slt i64 %12, %14
br i1 %15, label %16, label %17
16: ; preds = %2
br label %25
17: ; preds = %2
%18 = load i64*, i64** %5
%19 = load i64, i64* %18
%20 = load i64*, i64** %6
%21 = load i64, i64* %20
%22 = icmp sgt i64 %19, %21
%23 = zext i1 %22 to i64
%24 = select i1 %22, i32 1, i32 0
br label %25
25: ; preds = %17, %16
%26 = phi i32 [ -1, %16 ], [ %24, %17 ]
ret i32 %26
}

LLVM IR (-O2):
define i32 @log_compar(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
%8 = icmp sgt i64 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
int sign(int n) {
  if (n < 0)
    return -1;
  else if (n > 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111d <sign+0x1d>
movl   $0xffffffff,-0x4(%rbp)
jmp    113a <sign+0x3a>
cmpl   $0x0,-0x8(%rbp)
jle    1133 <sign+0x33>
movl   $0x1,-0x4(%rbp)
jmp    113a <sign+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
xor    %ecx,%ecx
test   %edi,%edi
setne  %cl
mov    $0xffffffff,%eax
cmovns %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @sign(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
%4 = icmp sgt i32 %0, -1
%5 = select i1 %4, i32 %3, i32 -1
ret i32 %5
}
void ECAPIntStatusClear(unsigned int baseAdd, unsigned int flag) {
  (*((volatile unsigned short *)(baseAdd + (0x30)))) =
      (*((volatile unsigned short *)(baseAdd + (0x30)))) & flag;
}


x86 assembly (clang, -O0):
<ECAPIntStatusClear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %eax,%eax
mov    (%rax),%ax
movzwl %ax,%eax
and    -0x8(%rbp),%eax
mov    %ax,%cx
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %eax,%eax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ECAPIntStatusClear>:
add    $0x30,%edi
and    %si,(%rdi)
ret

LLVM IR (-O0):
define void @ECAPIntStatusClear(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 = add i32 %5, 48
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i16*
%9 = load volatile i16, i16* %8
%10 = zext i16 %9 to i32
%11 = load i32, i32* %4
%12 = and i32 %10, %11
%13 = trunc i32 %12 to i16
%14 = load i32, i32* %3
%15 = add i32 %14, 48
%16 = zext i32 %15 to i64
%17 = inttoptr i64 %16 to i16*
store volatile i16 %13, i16* %17
ret void
}

LLVM IR (-O2):
define void @ECAPIntStatusClear(i32 %0, i32 %1) {
%3 = add i32 %0, 48
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i16*
%6 = load volatile i16, i16* %5
%7 = trunc i32 %1 to i16
%8 = and i16 %6, %7
store volatile i16 %8, i16* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ supcon_putp(unsigned int, char);
void supcon_putX(unsigned int num) { supcon_putp(num, 'A'); }


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

x86 assembly (clang, -O2):
<supcon_putX>:
mov    $0x41,%esi
jmp    1030 <supcon_putp@plt>

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

LLVM IR (-O2):
define void @supcon_putX(i32 %0) {
%2 = tail call i32 @supcon_putp(i32 %0, i8 signext 65)
ret void
}
void glGetSynciv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glGetSynciv() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int substring(char *, char *);
int main() {
  char A[5] = "hello";
  char B[3] = "tlo";
  printf("%d", substring(A, B));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xec6(%rip),%al
mov    %al,-0x5(%rbp)
mov    0xebd(%rip),%ax
mov    %ax,-0xc(%rbp)
mov    0xeb5(%rip),%al
mov    %al,-0xa(%rbp)
lea    -0x9(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <substring@plt>
mov    %eax,%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movb   $0x6f,0x14(%rsp)
movl   $0x6c6c6568,0x10(%rsp)
6c
movb   $0x6f,0xe(%rsp)
movw   $0x6c74,0xc(%rsp)
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1040 <substring@plt>
lea    0xeb5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.A = [5 x i8] c"hello"
@__const.main.B = [3 x i8] c"tlo"
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca [3 x i8]
store i32 0, i32* %1
%4 = bitcast [5 x i8]* %2 to i8*
%5 = bitcast [3 x i8]* %3 to i8*
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%8 = call i32 @substring(i8* %6, i8* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.A = [5 x i8] c"hello"
@__const.main.B = [3 x i8] c"tlo"
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%5 = call i32 @substring(i8* %3, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void version(void) {
  fprintf(stderr,
          "fbtruetype v%s, Copyright (C) 2015, Michael Higham "
          "<mhigham1986@gmail.com>\n\n"
          "fbtruetype comes with ABSOLUTELY NO WARRANTY;\n"
          "This is free software, and you are welcome to redistribute it\n"
          "under certain conditions; Check the GPL for details.\n",
          "0.41");
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
lea    0xfc3(%rip),%rdx
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
lea    0xfc7(%rip),%rdx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [238 x i8] c"fbtruetype v%s, Copyright (C) 2015, Michael Higham <mhigham1986@gmail.com>\0A\0Afbtruetype comes with ABSOLUTELY NO WARRANTY;\0AThis is free software, and you are welcome to redistribute it\0Aunder certain conditions; Check the GPL for details.\0A\00"
@.str.1 = [5 x i8] c"0.41\00"
define void @version() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([238 x i8], [238 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [238 x i8] c"fbtruetype v%s, Copyright (C) 2015, Michael Higham <mhigham1986@gmail.com>\0A\0Afbtruetype comes with ABSOLUTELY NO WARRANTY;\0AThis is free software, and you are welcome to redistribute it\0Aunder certain conditions; Check the GPL for details.\0A\00"
@.str.1 = [5 x i8] c"0.41\00"
define void @version() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([238 x i8], [238 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}
OP(ed, da) {}


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

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

LLVM IR (-O0):
define i32 @OP(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* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ pludecomp(double *, int, int *);
void ludecomp(double *A, int N, int *ipiv) { pludecomp(A, N, ipiv); }


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

x86 assembly (clang, -O2):
<ludecomp>:
jmp    1030 <pludecomp@plt>

LLVM IR (-O0):
define void @ludecomp(double* %0, i32 %1, i32* %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32*
store double* %0, double** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load double*, double** %4
%8 = load i32, i32* %5
%9 = load i32*, i32** %6
%10 = call i32 @pludecomp(double* %7, i32 %8, i32* %9)
ret void
}

LLVM IR (-O2):
define void @ludecomp(double* %0, i32 %1, i32* %2) {
%4 = tail call i32 @pludecomp(double* %0, i32 %1, i32* %2)
ret void
}
closespaces(line, col, number, nl) int line, col, number, nl;
{ pcspaces(line, col, number, nl, 1); }


x86 assembly (clang, -O0):
<closespaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    $0x1,%r8d
mov    $0x0,%al
call   1030 <pcspaces@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closespaces>:
mov    $0x1,%r8d
xor    %eax,%eax
jmp    1030 <pcspaces@plt>

LLVM IR (-O0):
define i32 @closespaces(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = load i32, i32* %9
%14 = call i32 (i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @pcspaces to i32 (i32, i32, i32, i32, i32, ...)*)(i32 %10, i32 %11, i32 %12, i32 %13, i32 1)
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @closespaces(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 (i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @pcspaces to i32 (i32, i32, i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 %2, i32 %3, i32 1)
ret i32 undef
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void EPIAddressMapSet(uint32_t ui32Base, uint32_t ui32Map) {
  ;
  ;
  (*((volatile unsigned long *)(ui32Base + 0x0000001C))) = ui32Map;
}


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

x86 assembly (clang, -O2):
<EPIAddressMapSet>:
mov    %rsi,0x1c(%rdi)
ret

LLVM IR (-O0):
define void @EPIAddressMapSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 28
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @EPIAddressMapSet(i64 %0, i64 %1) {
%3 = add i64 %0, 28
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ matrix_mul(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                              int /*<<< orphan*/ *, int, int, int);
void encode_chunk(uint8_t *dataChunk, uint8_t *parityCoeff, uint8_t *codeChunk,
                  int nativeBlockNum, int parityBlockNum, int chunkSize) {
  matrix_mul(parityCoeff, dataChunk, codeChunk, parityBlockNum, nativeBlockNum,
             chunkSize);
}


x86 assembly (clang, -O0):
<encode_chunk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x24(%rbp),%r9d
call   1030 <matrix_mul@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_chunk>:
mov    %ecx,%eax
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    %rcx,%rsi
mov    %r8d,%ecx
mov    %eax,%r8d
jmp    1030 <matrix_mul@plt>

LLVM IR (-O0):
define void @encode_chunk(i32* %0, i32* %1, i32* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32* %0, i32** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32*, i32** %8
%14 = load i32*, i32** %7
%15 = load i32*, i32** %9
%16 = load i32, i32* %11
%17 = load i32, i32* %10
%18 = load i32, i32* %12
%19 = call i32 @matrix_mul(i32* %13, i32* %14, i32* %15, i32 %16, i32 %17, i32 %18)
ret void
}

LLVM IR (-O2):
define void @encode_chunk(i32* %0, i32* %1, i32* %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @matrix_mul(i32* %1, i32* %0, i32* %2, i32 %4, i32 %3, i32 %5)
ret void
}
/* Type definitions */
struct statistics {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct statistics *);
void free_statistics(struct statistics *s) { free(s); }


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

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

LLVM IR (-O2):
%struct.statistics = type { i32 }
define void @free_statistics(%struct.statistics* nocapture %0) {
%2 = tail call i32 @free(%struct.statistics* %0)
ret void
}
double cpu_util(cputime, walltime)
double cputime, walltime;
{
  double cpu;
  if (walltime <= (double)0.0) {
    cpu = (double)0.0;
    return cpu;
  }
  if (cputime <= (double)0.0)
    cputime = 0.0;
  if (walltime <= (double)0.0)
    cpu = (double)100.0;
  else {
    cpu = (((double)100.0 * cputime) / walltime);
  }
  return cpu;
}


x86 assembly (clang, -O0):
<cpu_util>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     1133 <cpu_util+0x33>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    118a <cpu_util+0x8a>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1149 <cpu_util+0x49>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     1169 <cpu_util+0x69>
movsd  0xea1(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1180 <cpu_util+0x80>
movsd  0xe8f(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_util>:
movapd %xmm0,%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jae    112b <cpu_util+0x2b>
xorpd  %xmm3,%xmm3
movapd %xmm2,%xmm0
cmplesd %xmm3,%xmm0
andnpd %xmm2,%xmm0
mulsd  0xed9(%rip),%xmm0
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @cpu_util(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
%7 = load double, double* %5
%8 = fcmp ole double %7, 0.000000e+00
br i1 %8, label %9, label %11
9: ; preds = %2
store double 0.000000e+00, double* %6
%10 = load double, double* %6
store double %10, double* %3
br label %26
11: ; preds = %2
%12 = load double, double* %4
%13 = fcmp ole double %12, 0.000000e+00
br i1 %13, label %14, label %15
14: ; preds = %11
store double 0.000000e+00, double* %4
br label %15
15: ; preds = %14, %11
%16 = load double, double* %5
%17 = fcmp ole double %16, 0.000000e+00
br i1 %17, label %18, label %19
18: ; preds = %15
store double 1.000000e+02, double* %6
br label %24
19: ; preds = %15
%20 = load double, double* %4
%21 = fmul double 1.000000e+02, %20
%22 = load double, double* %5
%23 = fdiv double %21, %22
store double %23, double* %6
br label %24
24: ; preds = %19, %18
%25 = load double, double* %6
store double %25, double* %3
br label %26
26: ; preds = %24, %9
%27 = load double, double* %3
ret double %27
}

LLVM IR (-O2):
define double @cpu_util(double %0, double %1) {
%3 = fcmp ugt double %1, 0.000000e+00
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = fcmp ole double %0, 0.000000e+00
%6 = select i1 %5, double 0.000000e+00, double %0
%7 = fmul double %6, 1.000000e+02
%8 = fdiv double %7, %1
br label %9
9: ; preds = %2, %4
%10 = phi double [ %8, %4 ], [ 0.000000e+00, %2 ]
ret double %10
}
/* Type definitions */
struct lexer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ backup(struct lexer *);
int next(struct lexer *);
int peek(struct lexer *lexer) {
  int chr = next(lexer);
  backup(lexer);
  return chr;
}


x86 assembly (clang, -O0):
<peek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <next@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <backup@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<peek>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <next@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <backup@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.lexer = type { i32 }
define i32 @peek(%struct.lexer* %0) {
%2 = alloca %struct.lexer*
%3 = alloca i32
store %struct.lexer* %0, %struct.lexer** %2
%4 = load %struct.lexer*, %struct.lexer** %2
%5 = call i32 @next(%struct.lexer* %4)
store i32 %5, i32* %3
%6 = load %struct.lexer*, %struct.lexer** %2
%7 = call i32 @backup(%struct.lexer* %6)
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
%struct.lexer = type { i32 }
define i32 @peek(%struct.lexer* %0) {
%2 = tail call i32 @next(%struct.lexer* %0)
%3 = tail call i32 @backup(%struct.lexer* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void _Q_qtos(void) {
  printf("Unimplemented %s called, exiting\n", "_Q_qtos");
  exit(-1);
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"Unimplemented %s called, exiting\0A\00"
@.str.1 = [8 x i8] c"_Q_qtos\00"
define void @_Q_qtos() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [34 x i8] c"Unimplemented %s called, exiting\0A\00"
@.str.1 = [8 x i8] c"_Q_qtos\00"
define void @_Q_qtos() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double tan(double);
int /*<<< orphan*/ vulnerable(char *);
int main(int argc, char **argv) {
  double x = tan(1.0);
  printf("%f\n", x);
  if (argc > 1)
    vulnerable(argv[1]);
}


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)
movsd  0xeb2(%rip),%xmm0
call   1040 <tan@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x1,-0x8(%rbp)
jle    1180 <main+0x50>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <vulnerable@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xed9(%rip),%rdi
movsd  0xec9(%rip),%xmm0
call   1030 <printf@plt>
cmp    $0x2,%ebp
jl     114a <main+0x2a>
mov    0x8(%rbx),%rdi
call   1040 <vulnerable@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call double @tan(double 1.000000e+00)
store double %7, double* %6
%8 = load double, double* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %8)
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 1
br i1 %11, label %12, label %17
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @vulnerable(i8* %15)
br label %17
17: ; preds = %12, %2
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 0x3FF8EB245CBEE3A6)
%4 = icmp sgt i32 %0, 1
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @vulnerable(i8* %7)
br label %9
9: ; preds = %5, %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int ASN1_item_i2d_fp(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                     int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_it;
int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7) {
  return ASN1_item_i2d_fp(&PKCS7_it, fp, p7);
}


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

x86 assembly (clang, -O2):
<i2d_PKCS7_fp>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec3(%rip),%rdi
jmp    1030 <ASN1_item_i2d_fp@plt>

LLVM IR (-O0):
@PKCS7_it = global i32 0
define i32 @i2d_PKCS7_fp(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 @ASN1_item_i2d_fp(i32* @PKCS7_it, i32* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
@PKCS7_it = global i32 0
define i32 @i2d_PKCS7_fp(i32* %0, i32* %1) {
%3 = tail call i32 @ASN1_item_i2d_fp(i32* @PKCS7_it, i32* %0, i32* %1)
ret i32 %3
}
char *deadspace(char *str) {
  char *out = str, *put = str;
  for (; *str != '\0'; ++str) {
    if (*str != ' ')
      *put++ = *str;
  }
  *put = '\0';
  return out;
}


x86 assembly (clang, -O0):
<deadspace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1165 <deadspace+0x65>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     114f <deadspace+0x4f>
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1154 <deadspace+0x54>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1118 <deadspace+0x18>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<deadspace>:
mov    %rdi,%rax
mov    %rdi,%rdx
mov    %rdi,%rsi
jmp    1114 <deadspace+0x14>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdx
movzbl (%rdx),%ecx
cmp    $0x20,%cl
je     1110 <deadspace+0x10>
test   %cl,%cl
je     1128 <deadspace+0x28>
mov    %cl,(%rsi)
add    $0x1,%rsi
jmp    1110 <deadspace+0x10>
movb   $0x0,(%rsi)
ret

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

LLVM IR (-O2):
define i8* @deadspace(i8* returned %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = phi i8* [ %0, %1 ], [ %9, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %6 [
i8 0, label %11
i8 32, label %8
]
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %5, i8* %4
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ %4, %2 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
store i8 0, i8* %4
ret i8* %0
}