xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint64_t bytes_to_uint64(const uint8_t in[8]) {
  uint64_t out = 0;
  unsigned int i;
  for (i = 0; i < 8; i++)
    out = (out << 8) | in[i];
  return out;
}


x86 assembly (clang, -O0):
<bytes_to_uint64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jae    1141 <bytes_to_uint64+0x41>
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%edx
or     (%rcx,%rdx,4),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <bytes_to_uint64+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytes_to_uint64>:
mov    0x10(%rdi),%ecx
mov    0x14(%rdi),%eax
shl    $0x10,%ecx
shl    $0x8,%eax
or     %ecx,%eax
or     0x18(%rdi),%eax
shl    $0x8,%eax
or     0x1c(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @bytes_to_uint64(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
%4 = getelementptr inbounds i32, i32* %0, i64 5
%5 = load i32, i32* %4
%6 = shl i32 %3, 16
%7 = shl i32 %5, 8
%8 = or i32 %6, %7
%9 = getelementptr inbounds i32, i32* %0, i64 6
%10 = load i32, i32* %9
%11 = or i32 %10, %8
%12 = shl i32 %11, 8
%13 = getelementptr inbounds i32, i32* %0, i64 7
%14 = load i32, i32* %13
%15 = or i32 %14, %12
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ fwrite(char const *, int, unsigned long, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void itex2MML_default_write(const char *buffer, unsigned long length) {
  if (buffer) {
    if (length)
      fwrite(buffer, 1, length, stdout);
    else
      fputs(buffer, stdout);
  }
}


x86 assembly (clang, -O0):
<itex2MML_default_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     117d <itex2MML_default_write+0x5d>
cmpq   $0x0,-0x10(%rbp)
je     1166 <itex2MML_default_write+0x46>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    0x2e8b(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
call   1040 <fwrite@plt>
jmp    1178 <itex2MML_default_write+0x58>
mov    -0x8(%rbp),%rdi
mov    0x2e6f(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
jmp    117d <itex2MML_default_write+0x5d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itex2MML_default_write>:
test   %rdi,%rdi
je     1140 <itex2MML_default_write+0x20>
mov    %rsi,%rdx
mov    0x2eb1(%rip),%rax
mov    (%rax),%ecx
test   %rsi,%rsi
je     1141 <itex2MML_default_write+0x21>
mov    $0x1,%esi
jmp    1040 <fwrite@plt>
ret
mov    %ecx,%esi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @itex2MML_default_write(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %20
7: ; preds = %2
%8 = load i64, i64* %4
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = load i8*, i8** %3
%12 = load i64, i64* %4
%13 = load i32, i32* @stdout
%14 = call i32 @fwrite(i8* %11, i32 1, i64 %12, i32 %13)
br label %19
15: ; preds = %7
%16 = load i8*, i8** %3
%17 = load i32, i32* @stdout
%18 = call i32 @fputs(i8* %16, i32 %17)
br label %19
19: ; preds = %15, %10
br label %20
20: ; preds = %19, %2
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @itex2MML_default_write(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = icmp eq i64 %1, 0
%6 = load i32, i32* @stdout
br i1 %5, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @fwrite(i8* %0, i32 1, i64 %1, i32 %6)
br label %11
9: ; preds = %4
%10 = tail call i32 @fputs(i8* %0, i32 %6)
br label %11
11: ; preds = %7, %9, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ getgid();
gid_t c_getgid_() { return getgid(); }


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

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

LLVM IR (-O0):
define i32 @c_getgid_() {
%1 = call i32 (...) @getgid()
ret i32 %1
}

LLVM IR (-O2):
define i32 @c_getgid_() {
%1 = tail call i32 (...) @getgid()
ret i32 %1
}
/* Variables and functions */
int fact(int);
int /*<<< orphan*/ printf(char *, int);
int main() { printf("%d\n", fact(10)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1040 <fact@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @fact(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void host_puts(const char *str) { fputs(str, stderr); }


x86 assembly (clang, -O0):
<host_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<host_puts>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @host_puts(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stderr
%5 = call i32 @fputs(i8* %3, i32 %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @host_puts(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* %0, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_key_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/);
int pthread_key_delete(pthread_key_t key) {
  free(key);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @pthread_key_delete(i32 %0) {
%2 = tail call i32 @free(i32 %0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ INT16_MAX;
int /*<<< orphan*/ INT16_MIN;
int16_t abs_i16(int16_t i) {
  if (i == INT16_MIN) {
    return INT16_MAX;
  } else {
    return i >= 0 ? i : -i;
  }
}


x86 assembly (clang, -O0):
<abs_i16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2ec7(%rip),%rcx
cmp    (%rcx),%eax
jne    112a <abs_i16+0x2a>
mov    0x2ec0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    114d <abs_i16+0x4d>
cmpl   $0x0,-0x8(%rbp)
jl     113f <abs_i16+0x3f>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1147 <abs_i16+0x47>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs_i16>:
mov    0x2ed1(%rip),%rcx
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
cmp    %edi,(%rcx)
jne    111b <abs_i16+0x1b>
mov    0x2ec7(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@INT16_MIN = global i32 0
@INT16_MAX = global i32 0
define i32 @abs_i16(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* @INT16_MIN
%6 = icmp eq i32 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32, i32* @INT16_MAX
store i32 %8, i32* %2
br label %19
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = load i32, i32* %3
br label %17
14: ; preds = %9
%15 = load i32, i32* %3
%16 = sub nsw i32 0, %15
br label %17
17: ; preds = %14, %12
%18 = phi i32 [ %13, %12 ], [ %16, %14 ]
store i32 %18, i32* %2
br label %19
19: ; preds = %17, %7
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@INT16_MIN = global i32 0
@INT16_MAX = global i32 0
define i32 @abs_i16(i32 %0) {
%2 = load i32, i32* @INT16_MIN
%3 = icmp eq i32 %2, %0
%4 = load i32, i32* @INT16_MAX
%5 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%6 = select i1 %3, i32 %4, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
extern int lua_free(void *p) {
  if (p) {
    free(p);
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<lua_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113c <lua_free+0x2c>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
jmp    1143 <lua_free+0x33>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lua_free>:
test   %rdi,%rdi
je     1122 <lua_free+0x12>
push   %rax
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @lua_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ 0, %3 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
bool gen_rand_data(void *dest, size_t len) {
  memset(dest, 0, len);
  return true;
}


x86 assembly (clang, -O0):
<gen_rand_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_rand_data>:
push   %rax
mov    %rsi,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @gen_rand_data(i8* %0, i64 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i64 %1)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ puts(char *);
void prtfVersion() {
  puts(
      "@"
      "(#)"
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/PawelNabe/EOS/refs/heads/master/SRC/prtframe.c"
      " "
      "Sat Jan 22 08:19:10 2022"
      " compiled: "
      "Mar 15 2022"
      " "
      "22:33:12");
  fflush(NULL);
}


x86 assembly (clang, -O0):
<prtfVersion>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<prtfVersion>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [197 x i8] c"@(#)/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/PawelNabe/EOS/refs/heads/master/SRC/prtframe.c Sat Jan 22 08:19:10 2022 compiled: Mar 15 2022 22:33:12\00"
define void @prtfVersion() {
%1 = call i32 @puts(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @fflush(i32* null)
ret void
}

LLVM IR (-O2):
@.str = [197 x i8] c"@(#)/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/PawelNabe/EOS/refs/heads/master/SRC/prtframe.c Sat Jan 22 08:19:10 2022 compiled: Mar 15 2022 22:33:12\00"
define void @prtfVersion() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @fflush(i32* null)
ret void
}
void b() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @XtAppAddWorkProc() {
ret void
}
int do_411() { return 411; }


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

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

LLVM IR (-O0):
define i32 @do_411() {
ret i32 411
}

LLVM IR (-O2):
define i32 @do_411() {
ret i32 411
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int pc_unit_destructor(void *a) {
  free(a);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @pc_unit_destructor(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 0
}
void udelay(unsigned long usec) {
  unsigned long count = 0;
  unsigned long utime = 300000000 / 1000000 * usec;
  while (++count < utime)
    ;
}


x86 assembly (clang, -O0):
<udelay>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
imul   $0x12c,-0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
cmp    -0x18(%rbp),%rax
jae    1137 <udelay+0x37>
jmp    111c <udelay+0x1c>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @udelay(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
%5 = load i64, i64* %2
%6 = mul i64 300, %5
store i64 %6, i64* %4
br label %7
7: ; preds = %12, %1
%8 = load i64, i64* %3
%9 = add i64 %8, 1
store i64 %9, i64* %3
%10 = load i64, i64* %4
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %7
br label %7
13: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @udelay(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void close_serial(int fd) { close(fd); }


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

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

LLVM IR (-O2):
define void @close_serial(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
__attribute__((always_)) void __disable_irq(void) {}


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

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

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

LLVM IR (-O2):
define void @__disable_irq() {
ret void
}
/* Type definitions */
struct content {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ initFiles(struct content *);
int /*<<< orphan*/ openFile(char *, struct content *);
void processFile(char *fileName, struct content *con) {
  initFiles(con);
  openFile(fileName, con);
}


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

x86 assembly (clang, -O2):
<processFile>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <initFiles@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <openFile@plt>

LLVM IR (-O0):
%struct.content = type { i32 }
define void @processFile(i8* %0, %struct.content* %1) {
%3 = alloca i8*
%4 = alloca %struct.content*
store i8* %0, i8** %3
store %struct.content* %1, %struct.content** %4
%5 = load %struct.content*, %struct.content** %4
%6 = call i32 @initFiles(%struct.content* %5)
%7 = load i8*, i8** %3
%8 = load %struct.content*, %struct.content** %4
%9 = call i32 @openFile(i8* %7, %struct.content* %8)
ret void
}

LLVM IR (-O2):
%struct.content = type { i32 }
define void @processFile(i8* %0, %struct.content* %1) {
%3 = tail call i32 @initFiles(%struct.content* %1)
%4 = tail call i32 @openFile(i8* %0, %struct.content* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wsio(int /*<<< orphan*/);
void SendString(const char *str) {
  while (*str)
    wsio(*str++);
}


x86 assembly (clang, -O0):
<SendString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <SendString+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <wsio@plt>
jmp    111c <SendString+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SendString>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <SendString+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <wsio@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <SendString+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @SendString(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %2
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
%12 = call i32 @wsio(i32 %11)
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @SendString(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @wsio(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGKILL;
scalar_t__ kill(int, int /*<<< orphan*/);
int main(void) { return kill(-1, SIGKILL) < 0; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%esi
mov    $0xffffffff,%edi
call   1030 <kill@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
mov    $0xffffffff,%edi
call   1030 <kill@plt>
shr    $0x3f,%rax
pop    %rcx
ret

LLVM IR (-O0):
@SIGKILL = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @SIGKILL
%3 = call i64 @kill(i32 -1, i32 %2)
%4 = icmp slt i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
@SIGKILL = global i32 0
define i32 @main() {
%1 = load i32, i32* @SIGKILL
%2 = tail call i64 @kill(i32 -1, i32 %1)
%3 = lshr i64 %2, 63
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stdout;
void printUse(char *exe_path) {
  fprintf(stdout, "Usage: %s [-s] KEY\n", exe_path);
  return;
}


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

x86 assembly (clang, -O2):
<printUse>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
@.str = [20 x i8] c"Usage: %s [-s] KEY\0A\00"
define void @printUse(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void av_realloc() {}


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

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

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

LLVM IR (-O2):
define void @av_realloc() {
ret void
}
/* Variables and functions */
double tanh(double const);
double tanh_activation(const double x) { return tanh(x); }


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

x86 assembly (clang, -O2):
<tanh_activation>:
jmp    1030 <tanh@plt>

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

LLVM IR (-O2):
define double @tanh_activation(double %0) {
%2 = tail call double @tanh(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void test_signal_handler(int sig) {
  extern int exit_success;
  exit_success = 1;
  printf("received signal: %d\n", sig);
}


x86 assembly (clang, -O0):
<test_signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
movl   $0x1,(%rax)
mov    -0x4(%rbp),%esi
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_signal_handler>:
mov    %edi,%esi
mov    0x2ec7(%rip),%rax
movl   $0x1,(%rax)
lea    0xeda(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@exit_success = external global i32
@.str = [21 x i8] c"received signal: %d\0A\00"
define void @test_signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* @exit_success
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@exit_success = external global i32
@.str = [21 x i8] c"received signal: %d\0A\00"
define void @test_signal_handler(i32 %0) {
store i32 1, i32* @exit_success
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void wifi_rsp_tcpip_udp_bind(const struct wifi_msg_tcpip_udp_bind_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_tcpip_udp_bind_rsp_t = type opaque
define void @wifi_rsp_tcpip_udp_bind(%struct.wifi_msg_tcpip_udp_bind_rsp_t* nocapture %0) {
ret void
}
void ff_hevc_put_hevc_bi_qpel_hv12_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_hv12_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XOpenIM() {
  printf("XOpenIM called\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<XOpenIM>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [15 x i8] c"XOpenIM called\00"
define i32 @XOpenIM() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ io_tell_gui(char const *);
void cmd_send_raw(const char *cmdstr) { io_tell_gui(cmdstr); }


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

x86 assembly (clang, -O2):
<cmd_send_raw>:
jmp    1030 <io_tell_gui@plt>

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

LLVM IR (-O2):
define void @cmd_send_raw(i8* %0) {
%2 = tail call i32 @io_tell_gui(i8* %0)
ret void
}
int __attribute((fastcall))
check_fastcall_espdiff_5(int a, int b, int c, int d, int e) {
  return a + b + c + d + e;
}


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

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

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

LLVM IR (-O2):
define i32 @check_fastcall_espdiff_5(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = add nsw i32 %1, %0
%7 = add nsw i32 %6, %2
%8 = add nsw i32 %7, %3
%9 = add nsw i32 %8, %4
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ FIONREAD;
int ioctl(int, int /*<<< orphan*/, int *);
int serialDataAvail(int fd) {
  int result;
  if (ioctl(fd, FIONREAD, &result) == -1)
    return -1;
  return result;
}


x86 assembly (clang, -O0):
<serialDataAvail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
jne    1145 <serialDataAvail+0x35>
movl   $0xffffffff,-0x4(%rbp)
jmp    114b <serialDataAvail+0x3b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialDataAvail>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
je     112d <serialDataAvail+0x1d>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@FIONREAD = global i32 0
define i32 @serialDataAvail(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @FIONREAD
%5 = call i32 @ioctl(i32 %0, i32 %4, i32* %2)
%6 = icmp eq i32 %5, -1
%7 = load i32, i32* %2
%8 = select i1 %6, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Welcome to FINKI!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"Welcome to FINKI!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [18 x i8] c"Welcome to FINKI!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void free2D(unsigned char **Data) {
  free(Data[0]);
  free(Data);
}


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

x86 assembly (clang, -O2):
<free2D>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free2D(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = load i8**, i8*** %2
%7 = bitcast i8** %6 to i8*
ret void
}

LLVM IR (-O2):
define void @free2D(i8** nocapture %0) {
%2 = load i8*, i8** %0
tail call void @free(i8* %2)
%3 = bitcast i8** %0 to i8*
tail call void @free(i8* %3)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int nchars;
};
typedef TYPE_1__ XTextItem;

/* Variables and functions */
void set_XTextItem_nchars(void *_p, int _v) {
  ((XTextItem *)_p)->nchars = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XTextItem_nchars>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XTextItem_nchars(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XTextItem_nchars(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
extern void android_compiler_barrier(void) {
  __asm__ __volatile__("" : : : "memory");
}


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

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

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

LLVM IR (-O2):
define void @android_compiler_barrier() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
void *dumpTTyStat(int fd) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @dumpTTyStat(i32 %0) {
ret i8* null
}
void pil_shutdown(struct pil_desc *desc) {}


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

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

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

LLVM IR (-O2):
%struct.pil_desc = type opaque
define void @pil_shutdown(%struct.pil_desc* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ crmode();
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ nonl();
int /*<<< orphan*/ raw();
void cont_curses(void) {
  crmode();
  raw();
  noecho();
  nonl();
}


x86 assembly (clang, -O0):
<cont_curses>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <crmode@plt>
mov    $0x0,%al
call   1030 <raw@plt>
mov    $0x0,%al
call   1050 <noecho@plt>
mov    $0x0,%al
call   1040 <nonl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cont_curses>:
push   %rax
xor    %eax,%eax
call   1060 <crmode@plt>
xor    %eax,%eax
call   1030 <raw@plt>
xor    %eax,%eax
call   1050 <noecho@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <nonl@plt>

LLVM IR (-O0):
define void @cont_curses() {
%1 = call i32 (...) @crmode()
%2 = call i32 (...) @raw()
%3 = call i32 (...) @noecho()
%4 = call i32 (...) @nonl()
ret void
}

LLVM IR (-O2):
define void @cont_curses() {
%1 = tail call i32 (...) @crmode()
%2 = tail call i32 (...) @raw()
%3 = tail call i32 (...) @noecho()
%4 = tail call i32 (...) @nonl()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x7b() {
  Assert_real((isbdigit(123) == 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_isbdigit.c",
              620, ("isbdigit should be 0 for {"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for {\00"
define void @t_isbdigit_0x7b() {
%1 = tail call i64 @isbdigit(i32 123)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 620, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getenv(char *);
int /*<<< orphan*/ omp_set_num_threads(int);
int /*<<< orphan*/ printf(char *, int, int);
int main(int argc, char *argv[]) {
  int iam = 0, np = 1;
  if (!getenv("OMP_NUM_THREADS"))
    omp_set_num_threads(4);
#pragma omp parallel default(shared) private(iam, np)
  { printf("Hello from thread %d out of %d\n", iam, np); }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
lea    0xea5(%rip),%rdi
call   1030 <getenv@plt>
cmp    $0x0,%eax
jne    1173 <main+0x43>
mov    $0x4,%edi
call   1050 <omp_set_num_threads@plt>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe90(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <getenv@plt>
test   %eax,%eax
jne    114b <main+0x1b>
mov    $0x4,%edi
call   1050 <omp_set_num_threads@plt>
lea    0xebe(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"OMP_NUM_THREADS\00"
@.str.1 = [32 x i8] c"Hello from thread %d out of %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 1, i32* %7
%8 = call i32 @getenv(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%9 = icmp ne i32 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = call i32 @omp_set_num_threads(i32 4)
br label %12
12: ; preds = %10, %2
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %13, i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"OMP_NUM_THREADS\00"
@.str.1 = [32 x i8] c"Hello from thread %d out of %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @getenv(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @omp_set_num_threads(i32 4)
br label %7
7: ; preds = %5, %2
%8 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 1)
ret i32 0
}
int do_163() { return 163; }


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

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

LLVM IR (-O0):
define i32 @do_163() {
ret i32 163
}

LLVM IR (-O2):
define i32 @do_163() {
ret i32 163
}
/* Variables and functions */
int /*<<< orphan*/ sim_write(int /*<<< orphan*/, int);
void test_write_whole_disk(void) {
  sim_write(0, (2 * ((1 << (9 + ((15 - 9) - (12 - 9)))) * (1 << 9))));
}


x86 assembly (clang, -O0):
<test_write_whole_disk>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x400000,%esi
call   1030 <sim_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_write_whole_disk>:
xor    %edi,%edi
mov    $0x400000,%esi
jmp    1030 <sim_write@plt>

LLVM IR (-O0):
define void @test_write_whole_disk() {
%1 = call i32 @sim_write(i32 0, i32 4194304)
ret void
}

LLVM IR (-O2):
define void @test_write_whole_disk() {
%1 = tail call i32 @sim_write(i32 0, i32 4194304)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int chown(const char *path, uid_t owner, gid_t group) {
  printf("TODO: chown() not yet implemented!\n");
  return 0;
}


x86 assembly (clang, -O0):
<chown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chown>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [35 x i8] c"TODO: chown() not yet implemented!\00"
define i32 @chown(i8* nocapture readnone %0, i32 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int foo(int, char **);
int main(int argc, char *argv[]) { return foo(argc, argv); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <foo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <foo@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @foo(i32 %0, i8** %1)
ret i32 %3
}
/* Type definitions */
typedef int u_int8_t;

/* Variables and functions */
int faifa_is_zero_ether_addr(const u_int8_t *addr) {
  return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]);
}


x86 assembly (clang, -O0):
<faifa_is_zero_ether_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
or     0x4(%rcx),%eax
mov    -0x8(%rbp),%rcx
or     0x8(%rcx),%eax
mov    -0x8(%rbp),%rcx
or     0xc(%rcx),%eax
mov    -0x8(%rbp),%rcx
or     0x10(%rcx),%eax
mov    -0x8(%rbp),%rcx
or     0x14(%rcx),%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<faifa_is_zero_ether_addr>:
movdqu (%rdi),%xmm0
pshufd $0xee,%xmm0,%xmm1
por    %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
por    %xmm1,%xmm0
movd   %xmm0,%ecx
or     0x10(%rdi),%ecx
xor    %eax,%eax
or     0x14(%rdi),%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @faifa_is_zero_ether_addr(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = or i32 %5, %8
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 2
%12 = load i32, i32* %11
%13 = or i32 %9, %12
%14 = load i32*, i32** %2
%15 = getelementptr inbounds i32, i32* %14, i64 3
%16 = load i32, i32* %15
%17 = or i32 %13, %16
%18 = load i32*, i32** %2
%19 = getelementptr inbounds i32, i32* %18, i64 4
%20 = load i32, i32* %19
%21 = or i32 %17, %20
%22 = load i32*, i32** %2
%23 = getelementptr inbounds i32, i32* %22, i64 5
%24 = load i32, i32* %23
%25 = or i32 %21, %24
%26 = icmp ne i32 %25, 0
%27 = xor i1 %26, true
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @faifa_is_zero_ether_addr(i32* nocapture %0) {
%2 = bitcast i32* %0 to <4 x i32>*
%3 = load <4 x i32>, <4 x i32>* %2
%4 = getelementptr inbounds i32, i32* %0, i64 4
%5 = load i32, i32* %4
%6 = getelementptr inbounds i32, i32* %0, i64 5
%7 = load i32, i32* %6
%8 = call i32 @llvm.vector.reduce.or.v4i32(<4 x i32> %3)
%9 = or i32 %8, %5
%10 = or i32 %9, %7
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void puts_default(const char *s) { printf("%s\n", s); }


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

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @puts_default(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 @puts_default(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 */
double pow(double, double);
double convert_it(double x) { return pow(x, 0.75); }


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

x86 assembly (clang, -O2):
<convert_it>:
movsd  0xee8(%rip),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @convert_it(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @pow(double %3, double 7.500000e-01)
ret double %4
}

LLVM IR (-O2):
define double @convert_it(double %0) {
%2 = tail call double @pow(double %0, double 7.500000e-01)
ret double %2
}
void XSetZoomHints() {}


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

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

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

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