xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xf0() {
  Assert_real((iscntrl(240) == 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_iscntrl.c",
              1205, ("iscntrl should be 0 for 0xf0"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xf0>:
push   %rax
mov    $0xf0,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4b5,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xf0\00"
define void @t_iscntrl_0xf0() {
%1 = tail call i64 @iscntrl(i32 240)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1205, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void osys_terminate(void) {
  static const char *msg =
      "The execution of this program has been terminated abnormally.\n";
  fputs(msg, stderr);
  exit(70);
}


x86 assembly (clang, -O0):
<osys_terminate>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f05(%rip),%rdi
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    $0x46,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<osys_terminate>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x46,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@osys_terminate.msg = internal global i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i32 0, i32 0)
@.str = [63 x i8] c"The execution of this program has been terminated abnormally.\0A\00"
@stderr = global i32 0
define void @osys_terminate() {
%1 = load i8*, i8** @osys_terminate.msg
%2 = load i32, i32* @stderr
%3 = call i32 @fputs(i8* %1, i32 %2)
%4 = call i32 @exit(i32 70)
unreachable
}

LLVM IR (-O2):
@.str = [63 x i8] c"The execution of this program has been terminated abnormally.\0A\00"
@stderr = global i32 0
define void @osys_terminate() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @exit(i32 70)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_3476() {
  Assert_real((isqrt(3476) == 58),
              "/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/stdlib/isqrt.c",
              1340, ("Integer square root of 3476 should be 58"));
}


x86 assembly (clang, -O0):
<t_sqrt_3476>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd94,%edi
call   1030 <isqrt@plt>
cmp    $0x3a,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x53c,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_3476>:
push   %rax
mov    $0xd94,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x3a,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x53c,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 3476 should be 58\00"
define void @t_sqrt_3476() {
%1 = call i32 @isqrt(i32 3476)
%2 = icmp eq i32 %1, 58
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1340, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 3476 should be 58\00"
define void @t_sqrt_3476() {
%1 = tail call i32 @isqrt(i32 3476)
%2 = icmp eq i32 %1, 58
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1340, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ malloc(int);
int /*<<< orphan*/ pause();
int main(void) {
  int *p;
  p = (int *)malloc(10 * sizeof(int));
  pause();
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x28,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <pause@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x28,%edi
call   1040 <malloc@plt>
xor    %eax,%eax
call   1030 <pause@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i64 @malloc(i32 40)
%4 = inttoptr i64 %3 to i32*
store i32* %4, i32** %2
%5 = call i32 (...) @pause()
%6 = load i32, i32* @EXIT_SUCCESS
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 @malloc(i32 40)
%2 = tail call i32 (...) @pause()
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
char *hash_plugin_detailed(void) {
  return ("oracle11g - Oracle 11g plugin\n"
          "-------------------------------\n"
          "Use this module to crack Oracle 11g password hashes\n"
          "Input should be in form: \'user:spare4\'\n"
          "spare4 can be taken via a query like:\n"
          "SELECT name,spare4 from sys.user$ WHERE name='user'\n"
          "Known software that uses this password hashing method:\n\n"
          "Oracle 11g \n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [357 x i8] c"oracle11g - Oracle 11g plugin\0A-------------------------------\0AUse this module to crack Oracle 11g password hashes\0AInput should be in form: 'user:spare4'\0Aspare4 can be taken via a query like:\0ASELECT name,spare4 from sys.user$ WHERE name='user'\0AKnown software that uses this password hashing method:\0A\0AOracle 11g \0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([357 x i8], [357 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [357 x i8] c"oracle11g - Oracle 11g plugin\0A-------------------------------\0AUse this module to crack Oracle 11g password hashes\0AInput should be in form: 'user:spare4'\0Aspare4 can be taken via a query like:\0ASELECT name,spare4 from sys.user$ WHERE name='user'\0AKnown software that uses this password hashing method:\0A\0AOracle 11g \0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([357 x i8], [357 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef size_t uint32_t;

/* Variables and functions */
bool bitvec_get(uint32_t *bitvec, size_t index) {
  size_t word = index / 32;
  size_t bit = 1 << (index & 31);
  return (bitvec[word] & bit) != 0;
}


x86 assembly (clang, -O0):
<bitvec_get>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x5,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
and    $0x1f,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
and    -0x20(%rbp),%rax
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitvec_get>:
mov    %rsi,%rcx
mov    %rsi,%rdx
shr    $0x5,%rdx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
xor    %eax,%eax
test   %rcx,(%rdi,%rdx,8)
setne  %al
ret

LLVM IR (-O0):
define i32 @bitvec_get(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%7 = load i64, i64* %4
%8 = udiv i64 %7, 32
store i64 %8, i64* %5
%9 = load i64, i64* %4
%10 = and i64 %9, 31
%11 = trunc i64 %10 to i32
%12 = shl i32 1, %11
%13 = sext i32 %12 to i64
store i64 %13, i64* %6
%14 = load i64*, i64** %3
%15 = load i64, i64* %5
%16 = getelementptr inbounds i64, i64* %14, i64 %15
%17 = load i64, i64* %16
%18 = load i64, i64* %6
%19 = and i64 %17, %18
%20 = icmp ne i64 %19, 0
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
define i32 @bitvec_get(i64* nocapture %0, i64 %1) {
%3 = lshr i64 %1, 5
%4 = trunc i64 %1 to i32
%5 = and i32 %4, 31
%6 = shl nuw i32 1, %5
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %0, i64 %3
%9 = load i64, i64* %8
%10 = and i64 %9, %7
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int target = 100;
  int count = 1;
  int sumSquares = 0;
  int sum = 0;
  int squareSums = 0;
  int difference = 0;
  while (count <= target) {
    sumSquares = sumSquares + count * count;
    sum = sum + count;
    count++;
  }
  squareSums = sum * sum;
  printf("The difference is %d\n", squareSums - sumSquares);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     117b <main+0x6b>
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1149 <main+0x39>
mov    -0x14(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
sub    -0x10(%rbp),%esi
lea    0xe6e(%rip),%rdi
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    $0x17ff976,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"The difference is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 100, i32* %2
store i32 1, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %12, %0
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = load i32, i32* %4
%14 = load i32, i32* %3
%15 = load i32, i32* %3
%16 = mul nsw i32 %14, %15
%17 = add nsw i32 %13, %16
store i32 %17, i32* %4
%18 = load i32, i32* %5
%19 = load i32, i32* %3
%20 = add nsw i32 %18, %19
store i32 %20, i32* %5
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %8
23: ; preds = %8
%24 = load i32, i32* %5
%25 = load i32, i32* %5
%26 = mul nsw i32 %24, %25
store i32 %26, i32* %6
%27 = load i32, i32* %6
%28 = load i32, i32* %4
%29 = sub nsw i32 %27, %28
%30 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %29)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"The difference is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 25164150)
ret i32 0
}
/* Variables and functions */
int close(int);
int ljoy_Close(int id) { return (close(id)); }


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

x86 assembly (clang, -O2):
<ljoy_Close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @ljoy_Close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
void writew(unsigned short b, volatile void *addr) {
  *(volatile unsigned short *)addr = b;
}


x86 assembly (clang, -O0):
<writew>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x2(%rbp),%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<writew>:
mov    %di,(%rsi)
ret

LLVM IR (-O0):
define void @writew(i16 zeroext %0, i8* %1) {
%3 = alloca i16
%4 = alloca i8*
store i16 %0, i16* %3
store i8* %1, i8** %4
%5 = load i16, i16* %3
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i16*
store volatile i16 %5, i16* %7
ret void
}

LLVM IR (-O2):
define void @writew(i16 zeroext %0, i8* %1) {
%3 = bitcast i8* %1 to i16*
store volatile i16 %0, i16* %3
ret void
}
int CompIntElem(const void *e1, const void *e2) {
  int *i1, *i2;
  i1 = (int *)e1;
  i2 = (int *)e2;
  if (*i1 < *i2)
    return (-1);
  else if (*i1 > *i2)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<CompIntElem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jge    113a <CompIntElem+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1164 <CompIntElem+0x64>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jle    1158 <CompIntElem+0x58>
movl   $0x1,-0x4(%rbp)
jmp    1164 <CompIntElem+0x64>
jmp    115d <CompIntElem+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @CompIntElem(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
%8 = icmp sgt i32 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
char *astrltrim(char const *);
char *astrrtrim(char *);
int /*<<< orphan*/ mu__free(char *, int, char *);
char *astrtrim(const char *s) {
  char *tmp1 = NULL;
  char *tmp2 = NULL;
  tmp1 = astrltrim(s);
  tmp2 = astrrtrim(tmp1);
  mu__free(
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/kaiaie/bile/refs/heads/master/src/astring.c",
      431, tmp1);
  return tmp2;
}


x86 assembly (clang, -O0):
<astrtrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <astrltrim@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <astrrtrim@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdx
lea    0xe8f(%rip),%rdi
mov    $0x1af,%esi
call   1040 <mu__free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<astrtrim>:
push   %r14
push   %rbx
push   %rax
call   1050 <astrltrim@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <astrrtrim@plt>
mov    %rax,%r14
lea    0xeb2(%rip),%rdi
mov    $0x1af,%esi
mov    %rbx,%rdx
call   1040 <mu__free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kaiaie/bile/refs/heads/master/src/astring.c\00"
define i8* @astrtrim(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
store i8* null, i8** %4
%5 = load i8*, i8** %2
%6 = call i8* @astrltrim(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i8* @astrrtrim(i8* %7)
store i8* %8, i8** %4
%9 = load i8*, i8** %3
%10 = call i32 @mu__free(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 431, i8* %9)
%11 = load i8*, i8** %4
ret i8* %11
}

LLVM IR (-O2):
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kaiaie/bile/refs/heads/master/src/astring.c\00"
define i8* @astrtrim(i8* %0) {
%2 = tail call i8* @astrltrim(i8* %0)
%3 = tail call i8* @astrrtrim(i8* %2)
%4 = tail call i32 @mu__free(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 431, i8* %2)
ret i8* %3
}
int openconnect_has_pkcs11_support(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @openconnect_has_pkcs11_support() {
ret i32 0
}
int maxj(int i, int n_ann) {
  if (i < n_ann)
    return n_ann + i;
  return 2 * n_ann;
}


x86 assembly (clang, -O0):
<maxj>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1124 <maxj+0x24>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112d <maxj+0x2d>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maxj>:
lea    (%rsi,%rdi,1),%ecx
lea    (%rsi,%rsi,1),%eax
cmp    %esi,%edi
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @maxj(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 slt i32 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* %5
%11 = load i32, i32* %4
%12 = add nsw i32 %10, %11
store i32 %12, i32* %3
br label %16
13: ; preds = %2
%14 = load i32, i32* %5
%15 = mul nsw i32 2, %14
store i32 %15, i32* %3
br label %16
16: ; preds = %13, %9
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @maxj(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = add nsw i32 %1, %0
%5 = shl nsw i32 %1, 1
%6 = select i1 %3, i32 %4, i32 %5
ret i32 %6
}
int f13(void) {
  int a = 1;
  int b, c = b = a + a;
  if (b > 0)
    return (0);
  return (a + b + c);
}


x86 assembly (clang, -O0):
<f13>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    112d <f13+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    1139 <f13+0x39>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f13() {
ret i32 0
}
void FreeArgTokens(char **ppch) {
  if (ppch) {
    free(ppch[1]);
    free(ppch);
  }
}


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

x86 assembly (clang, -O2):
<FreeArgTokens>:
test   %rdi,%rdi
je     112b <FreeArgTokens+0x1b>
push   %rbx
mov    %rdi,%rbx
mov    0x8(%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @FreeArgTokens(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = icmp ne i8** %3, null
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i8**, i8*** %2
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = load i8**, i8*** %2
%10 = bitcast i8** %9 to i8*
br label %11
11: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @FreeArgTokens(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = getelementptr inbounds i8*, i8** %0, i64 1
%5 = load i8*, i8** %4
tail call void @free(i8* %5)
%6 = bitcast i8** %0 to i8*
tail call void @free(i8* %6)
br label %7
7: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i;
  for (i = 0; i <= 255; i++) {
    printf("%d: %c \n", i, i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     1153 <main+0x43>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d: %c \0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 256
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void ErrorMessage(char *str) {
  printf("Can't open %s.\n", str);
  return;
}


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

x86 assembly (clang, -O2):
<ErrorMessage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Can't open %s.\0A\00"
define void @ErrorMessage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Can't open %s.\0A\00"
define void @ErrorMessage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
size_t writeFLVScriptDataVariableArrayEnd(FILE *fp) {
  size_t datasize = 0;
  unsigned char length[3];
  length[0] = 0;
  length[1] = 0;
  length[2] = 9;
  datasize += fwrite(length, 1, 3, fp);
  return datasize;
}


x86 assembly (clang, -O0):
<writeFLVScriptDataVariableArrayEnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movb   $0x0,-0x13(%rbp)
movb   $0x0,-0x12(%rbp)
movb   $0x9,-0x11(%rbp)
lea    -0x13(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
mov    $0x3,%edx
call   1030 <fwrite@plt>
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeFLVScriptDataVariableArrayEnd>:
push   %rax
mov    %rdi,%rcx
movw   $0x0,0x5(%rsp)
movb   $0x9,0x7(%rsp)
lea    0x5(%rsp),%rdi
mov    $0x1,%esi
mov    $0x3,%edx
call   1030 <fwrite@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i64 @writeFLVScriptDataVariableArrayEnd(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca [3 x i8]
store i32* %0, i32** %2
store i64 0, i64* %3
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
store i8 0, i8* %5
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 1
store i8 0, i8* %6
%7 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 2
store i8 9, i8* %7
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%9 = load i32*, i32** %2
%10 = call i64 @fwrite(i8* %8, i32 1, i32 3, i32* %9)
%11 = load i64, i64* %3
%12 = add i64 %11, %10
store i64 %12, i64* %3
%13 = load i64, i64* %3
ret i64 %13
}

LLVM IR (-O2):
define i64 @writeFLVScriptDataVariableArrayEnd(i32* nocapture %0) {
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
store i8 0, i8* %3
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 1
store i8 0, i8* %4
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 2
store i8 9, i8* %5
%6 = call i64 @fwrite(i8* %3, i32 1, i32 3, i32* %0)
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ vga_pushChar(char);
void terminal_init() { vga_pushChar('>'); }


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

x86 assembly (clang, -O2):
<terminal_init>:
mov    $0x3e,%edi
jmp    1030 <vga_pushChar@plt>

LLVM IR (-O0):
define void @terminal_init() {
%1 = call i32 @vga_pushChar(i8 signext 62)
ret void
}

LLVM IR (-O2):
define void @terminal_init() {
%1 = tail call i32 @vga_pushChar(i8 signext 62)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *stdin;
int main(void) {
  extern int yyparse(void);
  extern FILE *yyin;
  yyin = stdin;
  if (yyparse()) {
    fprintf(stderr, "ERROR!\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%rcx
mov    0x2e8b(%rip),%rax
mov    %rcx,(%rax)
call   1030 <yyparse@plt>
cmp    $0x0,%eax
je     1175 <main+0x45>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
lea    0xe9a(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%rax
mov    0x2e8e(%rip),%rcx
mov    %rax,(%rcx)
call   1030 <yyparse@plt>
test   %eax,%eax
jne    1152 <main+0x22>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stdin = global i32* null
@yyin = external global i32*
@stderr = global i32 0
@.str = [8 x i8] c"ERROR!\0A\00"
define i32 @main() {
%1 = load i32*, i32** @stdin
store i32* %1, i32** @yyin
%2 = call i32 @yyparse()
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32* null
@yyin = external global i32*
@stderr = global i32 0
@.str = [8 x i8] c"ERROR!\0A\00"
define i32 @main() {
%1 = load i32*, i32** @stdin
store i32* %1, i32** @yyin
%2 = tail call i32 @yyparse()
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %0
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %0
ret i32 0
}
void gtk_window_add_embedded_xid() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_add_embedded_xid() {
ret void
}
__attribute((always_)) void glm_make_deg(float *rad) {
  *rad = *rad * 180.0f / ((float)3.14159265358979323846264338327950288);
}


x86 assembly (clang, -O0):
<glm_make_deg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0xef0(%rip),%xmm0
mulss  (%rax),%xmm0
movss  0xee0(%rip),%xmm1
divss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glm_make_deg>:
movss  (%rdi),%xmm0
mulss  0xef4(%rip),%xmm0
divss  0xef0(%rip),%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @glm_make_deg(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float, float* %3
%5 = fmul float %4, 1.800000e+02
%6 = fdiv float %5, 0x400921FB60000000
%7 = load float*, float** %2
store float %6, float* %7
ret void
}

LLVM IR (-O2):
define void @glm_make_deg(float* nocapture %0) {
%2 = load float, float* %0
%3 = fmul float %2, 1.800000e+02
%4 = fdiv float %3, 0x400921FB60000000
store float %4, float* %0
ret void
}
/* Type definitions */
typedef unsigned long long uint64_t;
struct timeval {
  unsigned long long tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
uint64_t gettime_ns(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (uint64_t)tv.tv_sec * 1000000000ULL + tv.tv_usec * 1000ULL;
}


x86 assembly (clang, -O0):
<gettime_ns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3b9aca00,-0x8(%rbp),%rax
3b
imul   $0x3e8,-0x10(%rbp),%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettime_ns>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3b9aca00,0x10(%rsp),%rcx
9a 3b
imul   $0x3e8,0x8(%rsp),%rax
add    %rcx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @gettime_ns() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = mul i64 %4, 1000000000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = mul i64 %7, 1000
%9 = add i64 %5, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @gettime_ns() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = mul i64 %8, 1000
%10 = add i64 %9, %6
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i, t[5];
  t[0] = 0;
  for (i = 1; i < 5; i++)
    t[i] = t[i - 1] + i;
  printf("%d", t[4]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    115c <main+0x4c>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x20(%rbp,%rax,4),%ecx
add    -0x8(%rbp),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x20(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0x10(%rbp),%esi
lea    0xe9a(%rip),%rdi
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    $0xa,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void inicializacao() {
  printf("\nBem-vindo(a) ao programa informatica29PapaiNoel!!");
  printf("\nPrograma criado por: \n-Aron Sales de Melo de Medeiros Monteiro, e "
         "\n-Guido de Lyra Ferrario.");
  printf("\nO programa traz o tradicional Jogo da Velha!\n");
}


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

x86 assembly (clang, -O2):
<inicializacao>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xeff(%rip),%rdi
call   1040 <printf@plt>
lea    0xf50(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [51 x i8] c"\0ABem-vindo(a) ao programa informatica29PapaiNoel!!\00"
@.str.1 = [93 x i8] c"\0APrograma criado por: \0A-Aron Sales de Melo de Medeiros Monteiro, e \0A-Guido de Lyra Ferrario.\00"
@.str.2 = [47 x i8] c"\0AO programa traz o tradicional Jogo da Velha!\0A\00"
define void @inicializacao() {
%1 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [51 x i8] c"\0ABem-vindo(a) ao programa informatica29PapaiNoel!!\00"
@.str.1 = [93 x i8] c"\0APrograma criado por: \0A-Aron Sales de Melo de Medeiros Monteiro, e \0A-Guido de Lyra Ferrario.\00"
@str = [46 x i8] c"\0AO programa traz o tradicional Jogo da Velha!\00"
define void @inicializacao() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([93 x i8], [93 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
uint64_t min64(uint64_t a, uint64_t b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<min64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <min64+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <min64+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min64>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @min64(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void report(const char *problem, const char *message) {
  fprintf(stderr, "%s:\n", problem);
  fprintf(stderr, "   %s\n\n", message);
}


x86 assembly (clang, -O0):
<report>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<report>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%rdx
mov    0x2ebf(%rip),%r14
mov    (%r14),%edi
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xecb(%rip),%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [5 x i8] c"%s:\0A\00"
@.str.1 = [8 x i8] c" %s\0A\0A\00"
define void @report(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _cause(int);
void _cause_ri() { _cause(6); }


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

x86 assembly (clang, -O2):
<_cause_ri>:
mov    $0x6,%edi
jmp    1030 <_cause@plt>

LLVM IR (-O0):
define void @_cause_ri() {
%1 = call i32 @_cause(i32 6)
ret void
}

LLVM IR (-O2):
define void @_cause_ri() {
%1 = tail call i32 @_cause(i32 6)
ret void
}
void onint(i) {
  closeall();
  exit(0x80 | i);
}


x86 assembly (clang, -O0):
<onint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <closeall@plt>
mov    -0x4(%rbp),%edi
or     $0x80,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<onint>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <closeall@plt>
or     $0x80,%ebx
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @onint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @closeall()
%4 = load i32, i32* %2
%5 = or i32 128, %4
unreachable
}

LLVM IR (-O2):
define void @onint(i32 %0) {
%2 = tail call i32 (...) @closeall()
%3 = or i32 %0, 128
tail call void @exit(i32 %3)
unreachable
}
int test_imm_33int64_lowword_mem(long long *val) {
  return ((*val) & (0x33 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_33int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 51
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void check_read(double *rds, int nrds) {
  if (rds[0] < 0.0) {
    fprintf(stderr, "Error, read position must be nonnegative\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<check_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jbe    115f <check_read+0x3f>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_read>:
push   %rax
xorpd  %xmm0,%xmm0
ucomisd (%rdi),%xmm0
ja     112d <check_read+0xd>
pop    %rax
ret
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"Error, read position must be nonnegative\0A\00"
define void @check_read(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = fcmp olt double %7, 0.000000e+00
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"Error, read position must be nonnegative\0A\00"
define void @check_read(double* nocapture %0, i32 %1) {
%3 = load double, double* %0
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret void
}
/* Variables and functions */
char *strchr(char *, int);
char *nxtline(char *s) {
  s = strchr(s, (int)'\n');
  if (s)
    return (++s);
  else
    return (0);
}


x86 assembly (clang, -O0):
<nxtline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114e <nxtline+0x3e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    %rax,-0x8(%rbp)
jmp    1156 <nxtline+0x46>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nxtline>:
push   %rax
mov    $0xa,%esi
call   1030 <strchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmovne %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @nxtline(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i8* @strchr(i8* %4, i32 10)
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 = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %3
store i8* %10, i8** %2
br label %12
11: ; preds = %1
store i8* null, i8** %2
br label %12
12: ; preds = %11, %8
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
define i8* @nxtline(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 10)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* null, i8* %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ putstn(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void putst(char *l) { putstn(l, strlen(l)); }


x86 assembly (clang, -O0):
<putst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <putstn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putst>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <putstn@plt>

LLVM IR (-O0):
define void @putst(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @putstn(i8* %3, i32 %5)
ret void
}

LLVM IR (-O2):
define void @putst(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @putstn(i8* %0, i32 %2)
ret void
}
void XEmptyRegion() {}


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

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

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

LLVM IR (-O2):
define void @XEmptyRegion() {
ret void
}