xunge/DecIR huggingface dataset:
char *BcdToStr0(bcdc)
char bcdc;
{
  static char r[4];
  r[0] = '0' + ((bcdc >> 4) & 0x0F);
  r[1] = '0' + (bcdc & 0x0F);
  r[2] = r[3] = '\0';
  return (r);
}


x86 assembly (clang, -O0):
<BcdToStr0>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sar    $0x4,%eax
and    $0xf,%eax
add    $0x30,%eax
mov    %al,0x2f04(%rip)
movsbl -0x1(%rbp),%eax
and    $0xf,%eax
add    $0x30,%eax
mov    %al,0x2ef5(%rip)
movb   $0x0,0x2ef0(%rip)
movb   $0x0,0x2ee8(%rip)
lea    0x2edf(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BcdToStr0>:
mov    %edi,%eax
shr    $0x4,%al
or     $0x30,%al
mov    %al,0x2f14(%rip)
lea    0x2f0d(%rip),%rax
and    $0xf,%dil
or     $0x30,%dil
mov    %dil,0x2eff(%rip)
movw   $0x0,0x2ef7(%rip)
ret

LLVM IR (-O0):
@BcdToStr0.r = internal global [4 x i8] zeroinitializer
define i8* @BcdToStr0(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = ashr i32 %5, 4
%7 = and i32 %6, 15
%8 = add nsw i32 48, %7
%9 = trunc i32 %8 to i8
store i8 %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @BcdToStr0.r, i64 0, i64 0)
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = and i32 %11, 15
%13 = add nsw i32 48, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @BcdToStr0.r, i64 0, i64 1)
store i8 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @BcdToStr0.r, i64 0, i64 3)
store i8 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @BcdToStr0.r, i64 0, i64 2)
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @BcdToStr0.r, i64 0, i64 0)
}

LLVM IR (-O2):
@BcdToStr0.r = internal global [4 x i8] zeroinitializer
define i8* @BcdToStr0(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = lshr i8 %2, 4
%4 = or i8 %3, 48
store i8 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @BcdToStr0.r, i64 0, i64 0)
%5 = and i8 %2, 15
%6 = or i8 %5, 48
store i8 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @BcdToStr0.r, i64 0, i64 1)
store i8 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @BcdToStr0.r, i64 0, i64 3)
store i8 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @BcdToStr0.r, i64 0, i64 2)
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @BcdToStr0.r, i64 0, i64 0)
}
int do_373() { return 373; }


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

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

LLVM IR (-O0):
define i32 @do_373() {
ret i32 373
}

LLVM IR (-O2):
define i32 @do_373() {
ret i32 373
}
char *gu_getvowel(char *t) {
  if (t[0] == 'c') {
    return (++t);
  } else {
    return (t);
  }
}


x86 assembly (clang, -O0):
<gu_getvowel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x63,%eax
jne    112d <gu_getvowel+0x2d>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    %rax,-0x8(%rbp)
jmp    1135 <gu_getvowel+0x35>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gu_getvowel>:
xor    %eax,%eax
cmpb   $0x63,(%rdi)
sete   %al
add    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @gu_getvowel(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 99
%4 = zext i1 %3 to i64
%5 = getelementptr i8, i8* %0, i64 %4
ret i8* %5
}
/* Variables and functions */
void *av_malloc(unsigned int);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, unsigned int);
void *av_mallocz(unsigned int size) {
  void *ptr = av_malloc(size);
  if (ptr)
    memset(ptr, 0, size);
  return ptr;
}


x86 assembly (clang, -O0):
<av_mallocz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <av_malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1150 <av_mallocz+0x30>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_mallocz>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1030 <av_malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     113e <av_mallocz+0x1e>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1040 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @av_mallocz(i32 %0) {
%2 = tail call i8* @av_malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @memset(i8* %2, i32 0, i32 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int memcmp(void *, void *, size_t);
int _ht_default_compare(void *first_key, void *second_key, size_t key_size) {
  return memcmp(first_key, second_key, key_size);
}


x86 assembly (clang, -O0):
<_ht_default_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ht_default_compare>:
jmp    1030 <memcmp@plt>

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

LLVM IR (-O2):
define i32 @_ht_default_compare(i8* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @memcmp(i8* %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gmove_bca_3a3t_c_b2();
int /*<<< orphan*/ gmove_bca_3a3t_c_gb();
int /*<<< orphan*/ gmove_bca_3a3t_c_gb_s();
int main() {
  gmove_bca_3a3t_c_b2();
  gmove_bca_3a3t_c_gb();
  gmove_bca_3a3t_c_gb_s();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <gmove_bca_3a3t_c_b2@plt>
mov    $0x0,%al
call   1040 <gmove_bca_3a3t_c_gb@plt>
mov    $0x0,%al
call   1030 <gmove_bca_3a3t_c_gb_s@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <gmove_bca_3a3t_c_b2@plt>
xor    %eax,%eax
call   1040 <gmove_bca_3a3t_c_gb@plt>
xor    %eax,%eax
call   1030 <gmove_bca_3a3t_c_gb_s@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @gmove_bca_3a3t_c_b2()
%3 = call i32 (...) @gmove_bca_3a3t_c_gb()
%4 = call i32 (...) @gmove_bca_3a3t_c_gb_s()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @gmove_bca_3a3t_c_b2()
%2 = tail call i32 (...) @gmove_bca_3a3t_c_gb()
%3 = tail call i32 (...) @gmove_bca_3a3t_c_gb_s()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void some_dummy_func(void) {
  static int i;
  printf("some_dummy_func: Counter = %d\n", i++);
  i++;
}


x86 assembly (clang, -O0):
<some_dummy_func>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f12(%rip),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,0x2f07(%rip)
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ef5(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2eec(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<some_dummy_func>:
push   %rax
mov    0x2f15(%rip),%esi
lea    0x1(%rsi),%eax
mov    %eax,0x2f0c(%rip)
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
addl   $0x1,0x2ef9(%rip)
pop    %rax
ret

LLVM IR (-O0):
@some_dummy_func.i = internal global i32 0
@.str = [31 x i8] c"some_dummy_func: Counter = %d\0A\00"
define void @some_dummy_func() {
%1 = load i32, i32* @some_dummy_func.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @some_dummy_func.i
%3 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = load i32, i32* @some_dummy_func.i
%5 = add nsw i32 %4, 1
store i32 %5, i32* @some_dummy_func.i
ret void
}

LLVM IR (-O2):
@some_dummy_func.i = internal unnamed_addr global i32 0
@.str = [31 x i8] c"some_dummy_func: Counter = %d\0A\00"
define void @some_dummy_func() {
%1 = load i32, i32* @some_dummy_func.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @some_dummy_func.i
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = load i32, i32* @some_dummy_func.i
%5 = add nsw i32 %4, 1
store i32 %5, i32* @some_dummy_func.i
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cl_mem;
typedef int /*<<< orphan*/ cl_kernel;

/* Variables and functions */
int SetKernelArg(cl_kernel kernel, cl_mem c_dev, cl_mem a_dev, cl_mem b_dev,
                 int num_elem) {
  return 0;
}


x86 assembly (clang, -O0):
<SetKernelArg>:
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)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @SetKernelArg(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
ret i32 0
}

LLVM IR (-O2):
define i32 @SetKernelArg(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int rename(char *, char *);
void cmd_rename(int argc, char *argv[]) {
  if (rename(argv[1], argv[2]) == -1)
    perror("rename");
}


x86 assembly (clang, -O0):
<cmd_rename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <rename@plt>
cmp    $0xffffffff,%eax
jne    1159 <cmd_rename+0x39>
lea    0xeac(%rip),%rdi
call   1030 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_rename>:
push   %rax
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1040 <rename@plt>
cmp    $0xffffffff,%eax
je     1135 <cmd_rename+0x15>
pop    %rax
ret
lea    0xec4(%rip),%rdi
pop    %rax
jmp    1030 <perror@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"rename\00"
define void @cmd_rename(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i32 @rename(i8* %4, i8* %6)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x1b() {
  Assert_real((isgraph(27) == 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_isgraph.c",
              140, ("isgraph should be 0 for 0x1b"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x1b>:
push   %rax
mov    $0x1b,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x8c,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x1b\00"
define void @t_isgraph_0x1b() {
%1 = call i64 @isgraph(i32 27)
%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 140, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x1b\00"
define void @t_isgraph_0x1b() {
%1 = tail call i64 @isgraph(i32 27)
%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 140, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned int ToUint16(unsigned char *value) {
  return (value[0] | (value[1] << 8));
}


x86 assembly (clang, -O0):
<ToUint16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ToUint16>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ToUint16(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 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = or i32 %6, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @ToUint16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
ret i32 %8
}
/* Variables and functions */
double yn(int, double);
double bessel_y(double x, double y) {
  int n = (int)x;
  return (yn(n, y));
}


x86 assembly (clang, -O0):
<bessel_y>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
cvttsd2si -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
call   1030 <yn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bessel_y>:
cvttsd2si %xmm0,%edi
movaps %xmm1,%xmm0
jmp    1030 <yn@plt>

LLVM IR (-O0):
define double @bessel_y(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = fptosi double %6 to i32
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load double, double* %4
%10 = call double @yn(i32 %8, double %9)
ret double %10
}

LLVM IR (-O2):
define double @bessel_y(double %0, double %1) {
%3 = fptosi double %0 to i32
%4 = tail call double @yn(i32 %3, double %1)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ test15();
int main(int argc, char **argv) {
  if (!test15())
    abort();
  return 0;
}


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    $0x0,%al
call   1040 <test15@plt>
cmp    $0x0,%eax
jne    114d <main+0x2d>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test15@plt>
test   %eax,%eax
je     1130 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@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 = call i32 (...) @test15()
%7 = icmp ne i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test15()
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x6d() {
  Assert_real((isxdigit(109) == 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_isxdigit.c",
              550, ("isxdigit should be 0 for m"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x6d>:
push   %rax
mov    $0x6d,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x226,%edx
pop    %rax
jmp    1040 <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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for m\00"
define void @t_isxdigit_0x6d() {
%1 = call i64 @isxdigit(i32 109)
%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 550, 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for m\00"
define void @t_isxdigit_0x6d() {
%1 = tail call i64 @isxdigit(i32 109)
%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 550, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_vargs(char *);
int main(int argc, char *argv[]) {
  test_vargs("nfkeanfkleanklfnewakl");
  return 0;
}


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)
lea    0xed3(%rip),%rdi
call   1030 <test_vargs@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [22 x i8] c"nfkeanfkleanklfnewakl\00"
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 = call i32 @test_vargs(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"nfkeanfkleanklfnewakl\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @test_vargs(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
const unsigned long long int clock_tic__() {
  unsigned long long int x;
  __asm__ volatile("rdtsc\n" : "=A"(x));
  return x;
}


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

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

LLVM IR (-O0):
define i64 @clock_tic__() {
%1 = alloca i64
%2 = call i64 asm sideeffect "rdtsc\0A", "=A,~{dirflag},~{fpsr},~{flags}"()
store i64 %2, i64* %1
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @clock_tic__() {
%1 = tail call i64 asm sideeffect "rdtsc\0A", "=A,~{dirflag},~{fpsr},~{flags}"()
ret i64 %1
}
int __attribute__((const)) lw6mat_mat3_v_index(int i_column, int j_row) {
  return i_column * 3 + j_row;
}


x86 assembly (clang, -O0):
<lw6mat_mat3_v_index>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x3,-0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lw6mat_mat3_v_index>:
lea    (%rdi,%rdi,2),%eax
add    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @lw6mat_mat3_v_index(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 3
%4 = add nsw i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __assert_int_equals(char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ parse_long(char *);
void test_parse_megabytes(void) {
  __assert_int_equals("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                      "outputs/2022-01-22/02-19-57/repos/headius/jato/refs/"
                      "heads/master/test/unit/vm/parse-test.c",
                      23, (512 * 1024 * 1024), (parse_long("512m")));
}


x86 assembly (clang, -O0):
<test_parse_megabytes>:
push   %rbp
mov    %rsp,%rbp
lea    0xf68(%rip),%rdi
call   1030 <parse_long@plt>
mov    %eax,%ecx
lea    0xec7(%rip),%rdi
mov    $0x17,%esi
mov    $0x20000000,%edx
call   1040 <__assert_int_equals@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_parse_megabytes>:
push   %rax
lea    0xf6b(%rip),%rdi
call   1030 <parse_long@plt>
lea    0xecc(%rip),%rdi
mov    $0x17,%esi
mov    $0x20000000,%edx
mov    %eax,%ecx
pop    %rax
jmp    1040 <__assert_int_equals@plt>

LLVM IR (-O0):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/headius/jato/refs/heads/master/test/unit/vm/parse-test.c\00"
@.str.1 = [5 x i8] c"512m\00"
define void @test_parse_megabytes() {
%1 = call i32 @parse_long(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @__assert_int_equals(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 23, i32 536870912, i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/headius/jato/refs/heads/master/test/unit/vm/parse-test.c\00"
@.str.1 = [5 x i8] c"512m\00"
define void @test_parse_megabytes() {
%1 = tail call i32 @parse_long(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @__assert_int_equals(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 23, i32 536870912, i32 %1)
ret void
}
/* Variables and functions */
int GLUT_VISIBLE;
int glutGetWindow();
int /*<<< orphan*/ printf(char *, int);
void vis(int state) {
  if (state == GLUT_VISIBLE)
    printf("visible %d\n", glutGetWindow());
  else
    printf("NOT visible %d\n", glutGetWindow());
}


x86 assembly (clang, -O0):
<vis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eb3(%rip),%rcx
cmp    (%rcx),%eax
jne    1157 <vis+0x37>
mov    $0x0,%al
call   1030 <glutGetWindow@plt>
mov    %eax,%esi
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
jmp    116c <vis+0x4c>
mov    $0x0,%al
call   1030 <glutGetWindow@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vis>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2ebc(%rip),%rax
mov    (%rax),%ebp
xor    %eax,%eax
call   1030 <glutGetWindow@plt>
cmp    %ebx,%ebp
lea    0xec6(%rip),%rcx
lea    0xebb(%rip),%rdi
cmove  %rcx,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@GLUT_VISIBLE = global i32 0
@.str = [12 x i8] c"visible %d\0A\00"
@.str.1 = [16 x i8] c"NOT visible %d\0A\00"
define void @vis(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @GLUT_VISIBLE
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 (...) @glutGetWindow()
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %12
9: ; preds = %1
%10 = call i32 (...) @glutGetWindow()
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
@GLUT_VISIBLE = global i32 0
@.str = [12 x i8] c"visible %d\0A\00"
@.str.1 = [16 x i8] c"NOT visible %d\0A\00"
define void @vis(i32 %0) {
%2 = load i32, i32* @GLUT_VISIBLE
%3 = icmp eq i32 %2, %0
%4 = tail call i32 (...) @glutGetWindow()
%5 = select i1 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0)
%6 = tail call i32 @printf(i8* %5, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int faccessat(int /*<<< orphan*/, char const *, int, int /*<<< orphan*/);
int access(const char *path, int mode) {
  return faccessat(AT_FDCWD, path, mode, 0);
}


x86 assembly (clang, -O0):
<access>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
xor    %ecx,%ecx
call   1030 <faccessat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<access>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
xor    %ecx,%ecx
jmp    1030 <faccessat@plt>

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

LLVM IR (-O2):
@AT_FDCWD = global i32 0
define i32 @access(i8* %0, i32 %1) {
%3 = load i32, i32* @AT_FDCWD
%4 = tail call i32 @faccessat(i32 %3, i8* %0, i32 %1, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ c_nnpntinitd(int, double *, double *, double *);
void nnpntinitd_(int *n, double *x, double *y, double *z) {
  c_nnpntinitd(*n, x, y, z);
}


x86 assembly (clang, -O0):
<nnpntinitd_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <c_nnpntinitd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nnpntinitd_>:
mov    (%rdi),%edi
jmp    1030 <c_nnpntinitd@plt>

LLVM IR (-O0):
define void @nnpntinitd_(i32* %0, double* %1, double* %2, double* %3) {
%5 = alloca i32*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
store i32* %0, i32** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = load double*, double** %6
%12 = load double*, double** %7
%13 = load double*, double** %8
%14 = call i32 @c_nnpntinitd(i32 %10, double* %11, double* %12, double* %13)
ret void
}

LLVM IR (-O2):
define void @nnpntinitd_(i32* nocapture %0, double* %1, double* %2, double* %3) {
%5 = load i32, i32* %0
%6 = tail call i32 @c_nnpntinitd(i32 %5, double* %1, double* %2, double* %3)
ret void
}
long gcd(long x, long y) {
  long t = 0;
  while (y != 0) {
    t = y;
    y = x % y;
    x = t;
  }
  return x;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1142 <gcd+0x42>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <gcd+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %rdi,%rax
test   %rsi,%rsi
je     1135 <gcd+0x35>
mov    %rsi,%rdx
jmp    111d <gcd+0x1d>
nopl   (%rax)
cqto
idiv   %rcx
mov    %rcx,%rax
test   %rdx,%rdx
je     1132 <gcd+0x32>
mov    %rdx,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1110 <gcd+0x10>
xor    %edx,%edx
div    %ecx
jmp    1115 <gcd+0x15>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @gcd(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %7, %4 ], [ %1, %2 ]
%6 = phi i64 [ %5, %4 ], [ %0, %2 ]
%7 = srem i64 %6, %5
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i64 [ %0, %2 ], [ %5, %4 ]
ret i64 %10
}
/* Variables and functions */
int qkey2pcmp(void const *, void const *);
int qkey2ppcmp(const void *p_qkey, const void *pp_elem) {
  const void *p_elem = *(const void **)pp_elem;
  return qkey2pcmp(p_qkey, p_elem);
}


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

x86 assembly (clang, -O2):
<qkey2ppcmp>:
mov    (%rsi),%rsi
jmp    1030 <qkey2pcmp@plt>

LLVM IR (-O0):
define i32 @qkey2ppcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i8**
%8 = load i8*, i8** %7
store i8* %8, i8** %5
%9 = load i8*, i8** %3
%10 = load i8*, i8** %5
%11 = call i32 @qkey2pcmp(i8* %9, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @qkey2ppcmp(i8* %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i8**
%4 = load i8*, i8** %3
%5 = tail call i32 @qkey2pcmp(i8* %0, i8* %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ portctl(char, int, char *);
int key() {
  int pin = 1;
  char mask = 0x04;
  portctl(mask, pin, "key");
  return 1;
}


x86 assembly (clang, -O0):
<key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movb   $0x4,-0x5(%rbp)
mov    -0x5(%rbp),%al
mov    -0x4(%rbp),%esi
lea    0xed0(%rip),%rdx
movsbl %al,%edi
call   1030 <portctl@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<key>:
push   %rax
lea    0xee8(%rip),%rdx
mov    $0x4,%edi
mov    $0x1,%esi
call   1030 <portctl@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"key\00"
define i32 @key() {
%1 = alloca i32
%2 = alloca i8
store i32 1, i32* %1
store i8 4, i8* %2
%3 = load i8, i8* %2
%4 = load i32, i32* %1
%5 = call i32 @portctl(i8 signext %3, i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [4 x i8] c"key\00"
define i32 @key() {
%1 = tail call i32 @portctl(i8 signext 4, i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ flipTile(unsigned int *, unsigned int *, int, int);
int /*<<< orphan*/ memcmp(unsigned int *, unsigned int *, int);
int isSameTile1(unsigned int *t1, unsigned int *t2, int hflip, int vflip) {
  unsigned int tile[8];
  flipTile(t1, tile, hflip, vflip);
  if (!memcmp(tile, t2, 8 * 4))
    return true;
  return false;
}


x86 assembly (clang, -O0):
<isSameTile1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
call   1040 <flipTile@plt>
lea    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x20,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%eax
jne    1170 <isSameTile1+0x50>
movl   $0x1,-0x4(%rbp)
jmp    1177 <isSameTile1+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSameTile1>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
mov    %rsp,%r14
mov    %r14,%rsi
call   1040 <flipTile@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x20,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @isSameTile1(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca [8 x i32]
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%11 = load i32*, i32** %6
%12 = getelementptr inbounds [8 x i32], [8 x i32]* %10, i64 0, i64 0
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = call i32 @flipTile(i32* %11, i32* %12, i32 %13, i32 %14)
%16 = getelementptr inbounds [8 x i32], [8 x i32]* %10, i64 0, i64 0
%17 = load i32*, i32** %7
%18 = call i32 @memcmp(i32* %16, i32* %17, i32 32)
%19 = icmp ne i32 %18, 0
br i1 %19, label %21, label %20
20: ; preds = %4
store i32 1, i32* %5
br label %22
21: ; preds = %4
store i32 0, i32* %5
br label %22
22: ; preds = %21, %20
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
define i32 @isSameTile1(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca [8 x i32]
%6 = bitcast [8 x i32]* %5 to i8*
%7 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 0
%8 = call i32 @flipTile(i32* %0, i32* %7, i32 %2, i32 %3)
%9 = call i32 @memcmp(i32* %7, i32* %1, i32 32)
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
double geom_dot3d(const double a[3], const double b[3]) {
  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
}


x86 assembly (clang, -O0):
<geom_dot3d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_dot3d>:
movsd  0x8(%rdi),%xmm0
mulsd  0x8(%rsi),%xmm0
movsd  (%rdi),%xmm1
mulsd  (%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @geom_dot3d(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = fmul double %13, %16
%18 = call double @llvm.fmuladd.f64(double %7, double %10, double %17)
%19 = load double*, double** %3
%20 = getelementptr inbounds double, double* %19, i64 2
%21 = load double, double* %20
%22 = load double*, double** %4
%23 = getelementptr inbounds double, double* %22, i64 2
%24 = load double, double* %23
%25 = call double @llvm.fmuladd.f64(double %21, double %24, double %18)
ret double %25
}

LLVM IR (-O2):
define double @geom_dot3d(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = fmul double %6, %8
%10 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %9)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}
/* Variables and functions */
long parse_long(char const *, int);
int parse_int(const char *value, int default_value) {
  long long_value = parse_long(value, default_value);
  if ((long)(int)long_value != long_value)
    return default_value;
  return (int)long_value;
}


x86 assembly (clang, -O0):
<parse_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <parse_long@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cltq
cmp    -0x20(%rbp),%rax
je     114a <parse_int+0x3a>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1151 <parse_int+0x41>
mov    -0x20(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_int>:
push   %rbx
mov    %esi,%ebx
call   1030 <parse_long@plt>
movslq %eax,%rcx
cmp    %rax,%rcx
cmovne %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @parse_int(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64
store i8* %0, i8** %4
store i32 %1, i32* %5
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = call i64 @parse_long(i8* %7, i32 %8)
store i64 %9, i64* %6
%10 = load i64, i64* %6
%11 = trunc i64 %10 to i32
%12 = sext i32 %11 to i64
%13 = load i64, i64* %6
%14 = icmp ne i64 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = load i32, i32* %5
store i32 %16, i32* %3
br label %20
17: ; preds = %2
%18 = load i64, i64* %6
%19 = trunc i64 %18 to i32
store i32 %19, i32* %3
br label %20
20: ; preds = %17, %15
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @parse_int(i8* %0, i32 %1) {
%3 = tail call i64 @parse_long(i8* %0, i32 %1)
%4 = add i64 %3, 2147483648
%5 = icmp ult i64 %4, 4294967296
%6 = trunc i64 %3 to i32
%7 = select i1 %5, i32 %6, i32 %1
ret i32 %7
}
/* Type definitions */
struct uv__mmsghdr {
  int dummy;
};

/* Variables and functions */
int syscall(int, int, struct uv__mmsghdr *, unsigned int, int /*<<< orphan*/,
            int /*<<< orphan*/);
int uv__recvmmsg(int fd, struct uv__mmsghdr *mmsg, unsigned int vlen) {
  return syscall(299, fd, mmsg, vlen, 0, 0);
}


x86 assembly (clang, -O0):
<uv__recvmmsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x12b,%edi
xor    %r9d,%r9d
mov    %r9d,%r8d
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uv__recvmmsg>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x12b,%edi
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.uv__mmsghdr = type { i32 }
define i32 @uv__recvmmsg(i32 %0, %struct.uv__mmsghdr* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.uv__mmsghdr*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.uv__mmsghdr* %1, %struct.uv__mmsghdr** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load %struct.uv__mmsghdr*, %struct.uv__mmsghdr** %5
%9 = load i32, i32* %6
%10 = call i32 @syscall(i32 299, i32 %7, %struct.uv__mmsghdr* %8, i32 %9, i32 0, i32 0)
ret i32 %10
}

LLVM IR (-O2):
%struct.uv__mmsghdr = type { i32 }
define i32 @uv__recvmmsg(i32 %0, %struct.uv__mmsghdr* %1, i32 %2) {
%4 = tail call i32 @syscall(i32 299, i32 %0, %struct.uv__mmsghdr* %1, i32 %2, i32 0, i32 0)
ret i32 %4
}
void foo184() {}


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

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

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

LLVM IR (-O2):
define void @foo184() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_vector(void *vector) { free(vector); }


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

x86 assembly (clang, -O2):
<free_vector>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_vector(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void gdk_screen_get_setting() {}


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

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

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

LLVM IR (-O2):
define void @gdk_screen_get_setting() {
ret void
}
/* Variables and functions */
char *impl__xmalloc(size_t);
char *strcpy(char *, char const *);
size_t strlen(char const *);
char *impl__xstrdup(const char *str) {
  size_t strl = strlen(str);
  char *ret = impl__xmalloc(strl + 1);
  return strcpy(ret, str);
}


x86 assembly (clang, -O0):
<impl__xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1050 <impl__xmalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<impl__xstrdup>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <impl__xmalloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @impl__xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = add i64 %7, 1
%9 = call i8* @impl__xmalloc(i64 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i8*, i8** %2
%12 = call i8* @strcpy(i8* %10, i8* %11)
ret i8* %12
}

LLVM IR (-O2):
define i8* @impl__xstrdup(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i8* @impl__xmalloc(i64 %3)
%5 = tail call i8* @strcpy(i8* dereferenceable(1) %4, i8* dereferenceable(1) %0)
ret i8* %4
}
void strength_test8(int *data) {
  int i = 0;
  do {
    int j = i + 1;
    data[data[2]] = j;
    i = j + 1;
  } while (21 * i < data[3]);
}


x86 assembly (clang, -O0):
<strength_test8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq 0x8(%rcx),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
imul   $0x15,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    0xc(%rcx),%eax
jl     110f <strength_test8+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strength_test8>:
mov    $0x1,%eax
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
movslq 0x8(%rdi),%rdx
mov    %eax,(%rdi,%rdx,4)
add    $0x2,%eax
add    $0x2a,%ecx
cmp    0xc(%rdi),%ecx
jl     1110 <strength_test8+0x10>
ret

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

LLVM IR (-O2):
define void @strength_test8(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = getelementptr inbounds i32, i32* %0, i64 3
br label %4
4: ; preds = %4, %1
%5 = phi i32 [ 0, %1 ], [ %10, %4 ]
%6 = or i32 %5, 1
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
store i32 %6, i32* %9
%10 = add nuw nsw i32 %5, 2
%11 = mul nsw i32 %10, 21
%12 = load i32, i32* %3
%13 = icmp slt i32 %11, %12
br i1 %13, label %4, label %14
14: ; preds = %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void brain_free_(void *in_mem) { free(in_mem); }


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

x86 assembly (clang, -O2):
<brain_free_>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @brain_free_(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AirspeedSettingsHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void AirspeedSettingsUpdated() { UAVObjUpdated(AirspeedSettingsHandle()); }


x86 assembly (clang, -O0):
<AirspeedSettingsUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <AirspeedSettingsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<AirspeedSettingsUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <AirspeedSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @AirspeedSettingsUpdated() {
%1 = call i32 (...) @AirspeedSettingsHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @AirspeedSettingsUpdated() {
%1 = tail call i32 (...) @AirspeedSettingsHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}