xunge/DecIR huggingface dataset:
/* Type definitions */
typedef unsigned long long uint64_t;

/* Variables and functions */
int get_exp(uint64_t n) {
  int shft;
  for (shft = 10; shft <= 60; shft += 10) {
    if (n < (1ULL << shft))
      break;
  }
  return shft - 10;
}


x86 assembly (clang, -O0):
<get_exp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
cmpl   $0x3c,-0xc(%rbp)
jg     114c <get_exp+0x4c>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
cmp    %rcx,%rax
jae    1139 <get_exp+0x39>
jmp    114c <get_exp+0x4c>
jmp    113e <get_exp+0x3e>
mov    -0xc(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <get_exp+0xf>
mov    -0xc(%rbp),%eax
sub    $0xa,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_exp>:
xor    %eax,%eax
cmp    $0x400,%rdi
jb     1154 <get_exp+0x54>
mov    $0xa,%eax
cmp    $0x100000,%rdi
jb     1154 <get_exp+0x54>
mov    $0x14,%eax
cmp    $0x40000000,%rdi
jb     1154 <get_exp+0x54>
mov    %rdi,%rax
shr    $0x28,%rax
mov    $0x1e,%eax
je     1154 <get_exp+0x54>
mov    %rdi,%rax
shr    $0x32,%rax
mov    $0x28,%eax
je     1154 <get_exp+0x54>
shr    $0x3c,%rdi
mov    $0x32,%ecx
mov    $0x3c,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @get_exp(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
store i32 10, i32* %3
br label %4
4: ; preds = %15, %1
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 60
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i64, i64* %2
%9 = load i32, i32* %3
%10 = zext i32 %9 to i64
%11 = shl i64 1, %10
%12 = icmp ult i64 %8, %11
br i1 %12, label %13, label %14
13: ; preds = %7
br label %18
14: ; preds = %7
br label %15
15: ; preds = %14
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 10
store i32 %17, i32* %3
br label %4
18: ; preds = %13, %4
%19 = load i32, i32* %3
%20 = sub nsw i32 %19, 10
ret i32 %20
}

LLVM IR (-O2):
define i32 @get_exp(i64 %0) {
%2 = icmp ult i64 %0, 1024
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = icmp ult i64 %0, 1048576
br i1 %4, label %14, label %5
5: ; preds = %3
%6 = icmp ult i64 %0, 1073741824
br i1 %6, label %14, label %7
7: ; preds = %5
%8 = icmp ult i64 %0, 1099511627776
br i1 %8, label %14, label %9
9: ; preds = %7
%10 = icmp ult i64 %0, 1125899906842624
br i1 %10, label %14, label %11
11: ; preds = %9
%12 = icmp ult i64 %0, 1152921504606846976
%13 = select i1 %12, i32 50, i32 60
br label %14
14: ; preds = %11, %9, %7, %5, %3, %1
%15 = phi i32 [ 0, %1 ], [ 10, %3 ], [ 20, %5 ], [ 30, %7 ], [ 40, %9 ], [ %13, %11 ]
ret i32 %15
}
unsigned char _is_comment_char(char c) { return (c == '\''); }


x86 assembly (clang, -O0):
<_is_comment_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x27,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_comment_char>:
cmp    $0x27,%dil
sete   %al
ret

LLVM IR (-O0):
define zeroext i8 @_is_comment_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 39
%6 = zext i1 %5 to i32
%7 = trunc i32 %6 to i8
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @_is_comment_char(i8 signext %0) {
%2 = icmp eq i8 %0, 39
%3 = zext i1 %2 to i8
ret i8 %3
}
/* Type definitions */
typedef int ptrdiff_t;

/* Variables and functions */
int hash_1d(int);
ptrdiff_t hash_2d(ptrdiff_t x, ptrdiff_t y) {
  return (y ^ hash_1d(x + (hash_1d(y) ^ x))) & 0xff;
}


x86 assembly (clang, -O0):
<hash_2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <hash_1d@plt>
mov    -0x10(%rbp),%edi
xor    -0x4(%rbp),%eax
add    %eax,%edi
call   1030 <hash_1d@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
xor    %ecx,%eax
and    $0xff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_2d>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
call   1030 <hash_1d@plt>
xor    %ebp,%eax
add    %eax,%ebp
mov    %ebp,%edi
call   1030 <hash_1d@plt>
xor    %ebx,%eax
movzbl %al,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @hash_2d(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @hash_1d(i32 %7)
%9 = load i32, i32* %3
%10 = xor i32 %8, %9
%11 = add nsw i32 %6, %10
%12 = call i32 @hash_1d(i32 %11)
%13 = xor i32 %5, %12
%14 = and i32 %13, 255
ret i32 %14
}

LLVM IR (-O2):
define i32 @hash_2d(i32 %0, i32 %1) {
%3 = tail call i32 @hash_1d(i32 %1)
%4 = xor i32 %3, %0
%5 = add nsw i32 %4, %0
%6 = tail call i32 @hash_1d(i32 %5)
%7 = xor i32 %6, %1
%8 = and i32 %7, 255
ret i32 %8
}
int bsrl(int x) {
  asm("bsrl %0,%0" : "=r"(x) : "r"(x));
  return x;
}


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

x86 assembly (clang, -O2):
<bsrl>:
bsr    %eax,%eax
ret

LLVM IR (-O0):
define i32 @bsrl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 asm "bsrl $0,$0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @bsrl(i32 %0) {
%2 = tail call i32 asm "bsrl $0,$0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret i32 %2
}
int main() {
  int color = 0;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
char index2ascii(int index) {
  if (index <= 25)
    return 'a' + (char)index;
  return index + '0' - 26;
}


x86 assembly (clang, -O0):
<index2ascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x19,-0x8(%rbp)
jg     1122 <index2ascii+0x22>
mov    -0x8(%rbp),%eax
movsbl %al,%eax
add    $0x61,%eax
mov    %al,-0x1(%rbp)
jmp    112e <index2ascii+0x2e>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
sub    $0x1a,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<index2ascii>:
cmp    $0x1a,%edi
mov    $0x61,%ecx
mov    $0x16,%eax
cmovl  %ecx,%eax
add    %dil,%al
ret

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

LLVM IR (-O2):
define signext i8 @index2ascii(i32 %0) {
%2 = icmp slt i32 %0, 26
%3 = trunc i32 %0 to i8
%4 = select i1 %2, i8 97, i8 22
%5 = add i8 %4, %3
ret i8 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int trio_vasprintf(char **, char const *, int /*<<< orphan*/);
int vasprintf(char **ret, const char *format, va_list args) {
  return trio_vasprintf(ret, format, args);
}


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

x86 assembly (clang, -O2):
<vasprintf>:
jmp    1030 <trio_vasprintf@plt>

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

LLVM IR (-O2):
define i32 @vasprintf(i8** %0, i8* %1, i32 %2) {
%4 = tail call i32 @trio_vasprintf(i8** %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
double log(double);
double log_base(double base, double val) { return log(val) / log(base); }


x86 assembly (clang, -O0):
<log_base>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <log@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_base>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
movaps %xmm1,%xmm0
call   1030 <log@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <log@plt>
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @log_base(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = call double @log(double %5)
%7 = load double, double* %3
%8 = call double @log(double %7)
%9 = fdiv double %6, %8
ret double %9
}

LLVM IR (-O2):
define double @log_base(double %0, double %1) {
%3 = tail call double @log(double %1)
%4 = tail call double @log(double %0)
%5 = fdiv double %3, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ usbcan_library_close();
void usbcandump_exit_handler(int signal) {
#pragma unused(signal)
  usbcan_library_close();
  exit(0);
}


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

x86 assembly (clang, -O2):
<usbcandump_exit_handler>:
push   %rax
xor    %eax,%eax
call   1030 <usbcan_library_close@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @usbcandump_exit_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @usbcan_library_close()
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @usbcandump_exit_handler(i32 %0) {
%2 = tail call i32 (...) @usbcan_library_close()
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct ss7 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mtp3_alarm(struct ss7 *, int);
void ss7_link_alarm(struct ss7 *ss7, int fd) { mtp3_alarm(ss7, fd); }


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

x86 assembly (clang, -O2):
<ss7_link_alarm>:
jmp    1030 <mtp3_alarm@plt>

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

LLVM IR (-O2):
%struct.ss7 = type { i32 }
define void @ss7_link_alarm(%struct.ss7* %0, i32 %1) {
%3 = tail call i32 @mtp3_alarm(%struct.ss7* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xfc() {
  Assert_real((ispunct(252) == 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_ispunct.c",
              1265, ("ispunct should be 0 for 0xfc"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xfc>:
push   %rax
mov    $0xfc,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4f1,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xfc\00"
define void @t_ispunct_0xfc() {
%1 = call i64 @ispunct(i32 252)
%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 1265, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xfc\00"
define void @t_ispunct_0xfc() {
%1 = tail call i64 @ispunct(i32 252)
%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 1265, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("usage: testec [-rate 8000|16000] [-lat audiolatencymsecs] [-chans "
         "inputchannels] infile outfile\n");
}


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

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

LLVM IR (-O0):
@.str = [97 x i8] c"usage: testec [-rate 8000|16000] [-lat audiolatencymsecs] [-chans inputchannels] infile outfile\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [96 x i8] c"usage: testec [-rate 8000|16000] [-lat audiolatencymsecs] [-chans inputchannels] infile outfile\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @str, i64 0, i64 0))
ret void
}
int foo(char *buf, char *end, int c) {
  while (buf < end) {
    if (*buf == c)
      return 1;
    buf++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    114a <foo+0x4a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x1c(%rbp),%eax
jne    1139 <foo+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1151 <foo+0x51>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110f <foo+0xf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %eax,%eax
cmp    %rsi,%rdi
jae    1129 <foo+0x29>
sub    %rdi,%rsi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl (%rdi,%rax,1),%ecx
cmp    %edx,%ecx
je     1124 <foo+0x24>
add    $0x1,%rax
cmp    %rax,%rsi
jne    1110 <foo+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i8* %0, i8* readnone %1, i32 %2) {
%4 = icmp ult i8* %0, %1
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = ptrtoint i8* %1 to i64
%7 = ptrtoint i8* %0 to i64
%8 = sub i64 %6, %7
%9 = getelementptr i8, i8* %0, i64 %8
br label %12
10: ; preds = %12
%11 = icmp eq i8* %17, %9
br i1 %11, label %18, label %12
12: ; preds = %5, %10
%13 = phi i8* [ %17, %10 ], [ %0, %5 ]
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, %2
%17 = getelementptr inbounds i8, i8* %13, i64 1
br i1 %16, label %18, label %10
18: ; preds = %12, %10, %3
%19 = phi i32 [ 0, %3 ], [ 0, %10 ], [ 1, %12 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printString(char *data) { printf("%s\n", data); }


x86 assembly (clang, -O0):
<printString>:
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):
<printString>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @printString(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int close_lowfd(void *lowfdp, int fd) {
  int lowfd = (int)lowfdp;
  if (fd >= lowfd)
    (void)close(fd);
  return 0;
}


x86 assembly (clang, -O0):
<close_lowfd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     113a <close_lowfd+0x2a>
mov    -0xc(%rbp),%edi
call   1030 <close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_lowfd>:
cmp    %esi,%edi
jg     1120 <close_lowfd+0x10>
push   %rax
mov    %esi,%edi
call   1030 <close@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @close_lowfd(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = icmp sgt i32 %4, %1
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @close(i32 %1)
br label %8
8: ; preds = %6, %2
ret i32 0
}
void test_33() {
  int x;
  (void)x;
}


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

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

LLVM IR (-O0):
define void @test_33() {
%1 = alloca i32
%2 = load i32, i32* %1
ret void
}

LLVM IR (-O2):
define void @test_33() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *strstr(char *, char *);
int hasProtocol(char *urlOrPath) { return strstr(urlOrPath, "://") != NULL; }


x86 assembly (clang, -O0):
<hasProtocol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hasProtocol>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strstr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"://\00"
define i32 @hasProtocol(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32* @strstr(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [4 x i8] c"://\00"
define i32 @hasProtocol(i8* %0) {
%2 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
void symtree_free(struct symtree *stree) {}


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

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

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

LLVM IR (-O2):
%struct.symtree = type opaque
define void @symtree_free(%struct.symtree* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xaa() {
  Assert_real((isprint(170) == 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_isprint.c",
              855, ("isprint should be 0 for 0xaa"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xaa>:
push   %rax
mov    $0xaa,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x357,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xaa\00"
define void @t_isprint_0xaa() {
%1 = call i64 @isprint(i32 170)
%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 855, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xaa\00"
define void @t_isprint_0xaa() {
%1 = tail call i64 @isprint(i32 170)
%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 855, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int lookup(char *word, char **definition, int dictionary) { return 0; }


x86 assembly (clang, -O0):
<lookup>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @lookup(i8* %0, i8** %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @lookup(i8* nocapture readnone %0, i8** nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *prog) { printf("Usage: %s <pathname> <xattr name>\n", prog); }


x86 assembly (clang, -O0):
<usage>:
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):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Usage: %s <pathname> <xattr name>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Usage: %s <pathname> <xattr name>\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ tag_readblock(int, char *);
scalar_t__ tag_write_sessionreg(int, int, int);
int /*<<< orphan*/ tag_writeblock(int, char *);
void tag_set_lastndef(int lastndef) {
  char buf[16];
  if (tag_write_sessionreg(1, 0xFF, lastndef)) {
    if (tag_readblock(0x7A, buf)) {
      buf[1] = lastndef;
      tag_writeblock(0x7A, buf);
    }
  }
}


x86 assembly (clang, -O0):
<tag_set_lastndef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x1,%edi
mov    $0xff,%esi
call   1040 <tag_write_sessionreg@plt>
cmp    $0x0,%rax
je     1188 <tag_set_lastndef+0x58>
lea    -0x20(%rbp),%rsi
mov    $0x7a,%edi
call   1030 <tag_readblock@plt>
cmp    $0x0,%rax
je     1183 <tag_set_lastndef+0x53>
mov    -0x4(%rbp),%eax
mov    %al,-0x1f(%rbp)
lea    -0x20(%rbp),%rsi
mov    $0x7a,%edi
call   1050 <tag_writeblock@plt>
jmp    1188 <tag_set_lastndef+0x58>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tag_set_lastndef>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    $0x1,%edi
mov    $0xff,%esi
mov    %ebx,%edx
call   1040 <tag_write_sessionreg@plt>
test   %rax,%rax
je     1170 <tag_set_lastndef+0x40>
mov    %rsp,%rsi
mov    $0x7a,%edi
call   1030 <tag_readblock@plt>
test   %rax,%rax
je     1170 <tag_set_lastndef+0x40>
mov    %bl,0x1(%rsp)
mov    %rsp,%rsi
mov    $0x7a,%edi
call   1050 <tag_writeblock@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @tag_set_lastndef(i32 %0) {
%2 = alloca i32
%3 = alloca [16 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @tag_write_sessionreg(i32 1, i32 255, i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %18
7: ; preds = %1
%8 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%9 = call i64 @tag_readblock(i32 122, i8* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i32, i32* %2
%13 = trunc i32 %12 to i8
%14 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 1
store i8 %13, i8* %14
%15 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%16 = call i32 @tag_writeblock(i32 122, i8* %15)
br label %17
17: ; preds = %11, %7
br label %18
18: ; preds = %17, %1
ret void
}

LLVM IR (-O2):
define void @tag_set_lastndef(i32 %0) {
%2 = alloca [16 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%4 = tail call i64 @tag_write_sessionreg(i32 1, i32 255, i32 %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %1
%7 = call i64 @tag_readblock(i32 122, i8* %3)
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %6
%10 = trunc i32 %0 to i8
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 1
store i8 %10, i8* %11
%12 = call i32 @tag_writeblock(i32 122, i8* %3)
br label %13
13: ; preds = %6, %9, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ removeDuplicate(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char *str;
  int x;
  scanf("%s", str);
  removeDuplicate(str);
  printf("%s", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <removeDuplicate@plt>
mov    -0x10(%rbp),%rsi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rbx
mov    %rbx,%rdi
call   1050 <scanf@plt>
call   1040 <removeDuplicate@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* undef)
%2 = tail call i32 @removeDuplicate(i8* undef)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* undef)
ret i32 0
}
void mat4_irotate(float m[4][4], float a, float x, float y, float z) {
  mat4_rotate(m, a, x, y, z, m);
}


x86 assembly (clang, -O0):
<mat4_irotate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  %xmm3,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x14(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x18(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
mov    -0x8(%rbp),%rsi
mov    $0x4,%al
call   1030 <mat4_rotate@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat4_irotate>:
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
cvtss2sd %xmm2,%xmm2
cvtss2sd %xmm3,%xmm3
mov    %rdi,%rsi
mov    $0x4,%al
jmp    1030 <mat4_rotate@plt>

LLVM IR (-O0):
define void @mat4_irotate([4 x float]* %0, float %1, float %2, float %3, float %4) {
%6 = alloca [4 x float]*
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store [4 x float]* %0, [4 x float]** %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%11 = load [4 x float]*, [4 x float]** %6
%12 = load float, float* %7
%13 = fpext float %12 to double
%14 = load float, float* %8
%15 = fpext float %14 to double
%16 = load float, float* %9
%17 = fpext float %16 to double
%18 = load float, float* %10
%19 = fpext float %18 to double
%20 = load [4 x float]*, [4 x float]** %6
%21 = call i32 ([4 x float]*, double, double, double, double, [4 x float]*, ...) bitcast (i32 (...)* @mat4_rotate to i32 ([4 x float]*, double, double, double, double, [4 x float]*, ...)*)([4 x float]* %11, double %13, double %15, double %17, double %19, [4 x float]* %20)
ret void
}

LLVM IR (-O2):
define void @mat4_irotate([4 x float]* %0, float %1, float %2, float %3, float %4) {
%6 = fpext float %1 to double
%7 = fpext float %2 to double
%8 = fpext float %3 to double
%9 = fpext float %4 to double
%10 = tail call i32 ([4 x float]*, double, double, double, double, [4 x float]*, ...) bitcast (i32 (...)* @mat4_rotate to i32 ([4 x float]*, double, double, double, double, [4 x float]*, ...)*)([4 x float]* %0, double %6, double %7, double %8, double %9, [4 x float]* %0)
ret void
}
int test_imm_24int8_mem(signed char *val) {
  return ((*val) & (-0x24 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_24int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -36
%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_24int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -36
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct obj {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ errl(char *, struct obj *);
void err_ctrl_c(void) { errl("control-c interrupt", ((struct obj *)0)); }


x86 assembly (clang, -O0):
<err_ctrl_c>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <errl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_ctrl_c>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
jmp    1030 <errl@plt>

LLVM IR (-O0):
%struct.obj = type { i32 }
@.str = [20 x i8] c"control-c interrupt\00"
define void @err_ctrl_c() {
%1 = call i32 @errl(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), %struct.obj* null)
ret void
}

LLVM IR (-O2):
%struct.obj = type { i32 }
@.str = [20 x i8] c"control-c interrupt\00"
define void @err_ctrl_c() {
%1 = tail call i32 @errl(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), %struct.obj* null)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ htons(int /*<<< orphan*/);
uint16_t netb_s(uint16_t value) { return htons(value); }


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

x86 assembly (clang, -O2):
<netb_s>:
jmp    1030 <htons@plt>

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

LLVM IR (-O2):
define i32 @netb_s(i32 %0) {
%2 = tail call i32 @htons(i32 %0)
ret i32 %2
}
void liberaMatriz(int **matriz, int linha) {
  int i;
  for (i = 0; i < linha; i++)
    free(matriz[linha]);
  free(matriz);
}


x86 assembly (clang, -O0):
<liberaMatriz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <liberaMatriz+0x41>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <liberaMatriz+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<liberaMatriz>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    112e <liberaMatriz+0x1e>
mov    %esi,%ebp
mov    %esi,%ebx
nop
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0xffffffff,%ebp
jne    1120 <liberaMatriz+0x10>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @liberaMatriz(i32** %0, i32 %1) {
%3 = alloca i32**
%4 = alloca i32
%5 = alloca i32
store i32** %0, i32*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32**, i32*** %3
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32*, i32** %11, i64 %13
%15 = load i32*, i32** %14
%16 = bitcast i32* %15 to i8*
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = load i32**, i32*** %3
%22 = bitcast i32** %21 to i8*
ret void
}

LLVM IR (-O2):
define void @liberaMatriz(i32** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
%6 = getelementptr inbounds i32*, i32** %0, i64 %5
%7 = bitcast i32** %6 to i8**
br label %8
8: ; preds = %4, %8
%9 = phi i32 [ 0, %4 ], [ %11, %8 ]
%10 = load i8*, i8** %7
tail call void @free(i8* %10)
%11 = add nuw nsw i32 %9, 1
%12 = icmp eq i32 %11, %1
br i1 %12, label %13, label %8
13: ; preds = %8, %2
%14 = bitcast i32** %0 to i8*
tail call void @free(i8* %14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ flashfsClearBuffer();
int /*<<< orphan*/ flashfsSetTailAddress(int /*<<< orphan*/);
int /*<<< orphan*/ m25p16_eraseCompletely();
void flashfsEraseCompletely(void) {
  m25p16_eraseCompletely();
  flashfsClearBuffer();
  flashfsSetTailAddress(0);
}


x86 assembly (clang, -O0):
<flashfsEraseCompletely>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <m25p16_eraseCompletely@plt>
mov    $0x0,%al
call   1030 <flashfsClearBuffer@plt>
xor    %edi,%edi
call   1040 <flashfsSetTailAddress@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<flashfsEraseCompletely>:
push   %rax
xor    %eax,%eax
call   1050 <m25p16_eraseCompletely@plt>
xor    %eax,%eax
call   1030 <flashfsClearBuffer@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <flashfsSetTailAddress@plt>

LLVM IR (-O0):
define void @flashfsEraseCompletely() {
%1 = call i32 (...) @m25p16_eraseCompletely()
%2 = call i32 (...) @flashfsClearBuffer()
%3 = call i32 @flashfsSetTailAddress(i32 0)
ret void
}

LLVM IR (-O2):
define void @flashfsEraseCompletely() {
%1 = tail call i32 (...) @m25p16_eraseCompletely()
%2 = tail call i32 (...) @flashfsClearBuffer()
%3 = tail call i32 @flashfsSetTailAddress(i32 0)
ret void
}
void ps_bead(int x, int y) {}


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

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

LLVM IR (-O0):
define void @ps_bead(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @ps_bead(i32 %0, i32 %1) {
ret void
}
char *convert(unsigned int num, int base) {
  static char buffer[33];
  char *pointer;
  pointer = &buffer[sizeof(buffer) - 1];
  *pointer = '\0';
  do {
    *--pointer = "0123456789abcdef"[num % base];
    num /= base;
  } while (num != 0);
  return (pointer);
}


x86 assembly (clang, -O0):
<convert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0x2f1f(%rip),%rax
add    $0x20,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %edx,%eax
mov    %eax,%ecx
lea    0xecd(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,-0x1(%rax)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
xor    %edx,%edx
div    %ecx
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1120 <convert+0x20>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert>:
movb   $0x0,0x2f49(%rip)
lea    0x2f42(%rip),%rcx
lea    0xeeb(%rip),%r8
cs nopw 0x0(%rax,%rax,1)
nop
mov    %edi,%eax
xor    %edx,%edx
div    %esi
movzbl (%rdx,%r8,1),%edx
mov    %dl,-0x1(%rcx)
add    $0xffffffffffffffff,%rcx
cmp    %esi,%edi
mov    %eax,%edi
jae    1120 <convert+0x20>
mov    %rcx,%rax
ret

LLVM IR (-O0):
@convert.buffer = internal global [33 x i8] zeroinitializer
@.str = [17 x i8] c"0123456789abcdef\00"
define i8* @convert(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @convert.buffer, i64 0, i64 32), i8** %5
%6 = load i8*, i8** %5
store i8 0, i8* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = urem i32 %8, %9
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = load i8*, i8** %5
%15 = getelementptr inbounds i8, i8* %14, i32 -1
store i8* %15, i8** %5
store i8 %13, i8* %15
%16 = load i32, i32* %4
%17 = load i32, i32* %3
%18 = udiv i32 %17, %16
store i32 %18, i32* %3
br label %19
19: ; preds = %7
%20 = load i32, i32* %3
%21 = icmp ne i32 %20, 0
br i1 %21, label %7, label %22
22: ; preds = %19
%23 = load i8*, i8** %5
ret i8* %23
}

LLVM IR (-O2):
@convert.buffer = internal global [33 x i8] zeroinitializer
@.str = [17 x i8] c"0123456789abcdef\00"
define i8* @convert(i32 %0, i32 %1) {
store i8 0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @convert.buffer, i64 0, i64 32)
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %11, %3 ]
%5 = phi i8* [ getelementptr inbounds ([33 x i8], [33 x i8]* @convert.buffer, i64 0, i64 32), %2 ], [ %10, %3 ]
%6 = urem i32 %4, %1
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = getelementptr inbounds i8, i8* %5, i64 -1
store i8 %9, i8* %10
%11 = udiv i32 %4, %1
%12 = icmp ult i32 %4, %1
br i1 %12, label %13, label %3
13: ; preds = %3
ret i8* %10
}
/* Variables and functions */
scalar_t__ strchr(char const *, char const);
char *strpbrk(const char *s1, const char *s2) {
  while (1) {
    if (*s1 == '\0') {
      break;
    }
    if (strchr(s2, *s1)) {
      return (char *)s1;
    }
    ++s1;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<strpbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1135 <strpbrk+0x25>
jmp    116d <strpbrk+0x5d>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
movsbl (%rax),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     115c <strpbrk+0x4c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1175 <strpbrk+0x65>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <strpbrk+0x10>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strpbrk>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     113c <strpbrk+0x2c>
mov    %rsi,%r14
mov    %rdi,%rbx
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <strchr@plt>
test   %rax,%rax
jne    113e <strpbrk+0x2e>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <strpbrk+0x10>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strpbrk(i8* %0, i8* %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %10
%6 = phi i8 [ %12, %10 ], [ %3, %2 ]
%7 = phi i8* [ %11, %10 ], [ %0, %2 ]
%8 = tail call i64 @strchr(i8* %1, i8 signext %6)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %10, %2
%15 = phi i8* [ null, %2 ], [ null, %10 ], [ %7, %5 ]
ret i8* %15
}
int j2() { return 256; }


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

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

LLVM IR (-O0):
define i32 @j2() {
ret i32 256
}

LLVM IR (-O2):
define i32 @j2() {
ret i32 256
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void gotoxy(int x, int y) {
  printf("\x1b[0m");
  printf("\x1b[%d;%dH", y, x);
}


x86 assembly (clang, -O0):
<gotoxy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gotoxy>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[0m\00"
@.str.1 = [9 x i8] c"\1B[%d;%dH\00"
define void @gotoxy(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[0m\00"
@.str.1 = [9 x i8] c"\1B[%d;%dH\00"
define void @gotoxy(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %1, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *get_822_token(char **, int *);
char *strndup(char *, int);
char *get_822_word(char *hdr) {
  static char *last = NULL;
  int len;
  char *h;
  free(last);
  last = NULL;
  h = get_822_token(&hdr, &len);
  if (!h)
    return h;
  last = strndup(h, len);
  return last;
}


x86 assembly (clang, -O0):
<get_822_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2efd(%rip),%rdi
call   1030 <free@plt>
movq   $0x0,0x2eed(%rip)
lea    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <get_822_token@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    117c <get_822_word+0x4c>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    119a <get_822_word+0x6a>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <strndup@plt>
mov    %rax,0x2eb1(%rip)
mov    0x2eaa(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_822_word>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
mov    0x2f00(%rip),%rdi
call   1030 <free@plt>
movq   $0x0,0x2ef0(%rip)
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1040 <get_822_token@plt>
test   %rax,%rax
je     117c <get_822_word+0x4c>
mov    0xc(%rsp),%esi
mov    %rax,%rdi
call   1050 <strndup@plt>
mov    %rax,0x2ec9(%rip)
add    $0x18,%rsp
ret
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@get_822_word.last = internal global i8* null
define i8* @get_822_word(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** @get_822_word.last
%7 = call i32 @free(i8* %6)
store i8* null, i8** @get_822_word.last
%8 = call i8* @get_822_token(i8** %3, i32* %4)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %1
%12 = load i8*, i8** %5
store i8* %12, i8** %2
br label %18
13: ; preds = %1
%14 = load i8*, i8** %5
%15 = load i32, i32* %4
%16 = call i8* @strndup(i8* %14, i32 %15)
store i8* %16, i8** @get_822_word.last
%17 = load i8*, i8** @get_822_word.last
store i8* %17, i8** %2
br label %18
18: ; preds = %13, %11
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
@get_822_word.last = internal unnamed_addr global i8* null
define i8* @get_822_word(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = bitcast i32* %3 to i8*
%5 = load i8*, i8** @get_822_word.last
%6 = tail call i32 @free(i8* %5)
store i8* null, i8** @get_822_word.last
%7 = call i8* @get_822_token(i8** %2, i32* %3)
%8 = icmp eq i8* %7, null
br i1 %8, label %12, label %9
9: ; preds = %1
%10 = load i32, i32* %3
%11 = call i8* @strndup(i8* %7, i32 %10)
store i8* %11, i8** @get_822_word.last
br label %12
12: ; preds = %1, %9
%13 = phi i8* [ %11, %9 ], [ null, %1 ]
ret i8* %13
}