xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ raptor_unicode_is_basechar(long);
scalar_t__ raptor_unicode_is_ideographic(long);
int raptor_unicode_is_letter(long c) {
  return (raptor_unicode_is_basechar(c) || raptor_unicode_is_ideographic(c));
}


x86 assembly (clang, -O0):
<raptor_unicode_is_letter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <raptor_unicode_is_basechar@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    115a <raptor_unicode_is_letter+0x3a>
mov    -0x8(%rbp),%rdi
call   1030 <raptor_unicode_is_ideographic@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<raptor_unicode_is_letter>:
push   %rbx
mov    %rdi,%rbx
call   1040 <raptor_unicode_is_basechar@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1138 <raptor_unicode_is_letter+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <raptor_unicode_is_ideographic@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @raptor_unicode_is_letter(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @raptor_unicode_is_basechar(i64 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i64, i64* %2
%8 = call i64 @raptor_unicode_is_ideographic(i64 %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @raptor_unicode_is_letter(i64 %0) {
%2 = tail call i64 @raptor_unicode_is_basechar(i64 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @raptor_unicode_is_ideographic(i64 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
void im_hide() {}


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

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

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

LLVM IR (-O2):
define void @im_hide() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ SYS_lseek;
long syscall_3(int /*<<< orphan*/, long, int /*<<< orphan*/,
               int /*<<< orphan*/);
long ftell(FILE *fp) {
  long int ret = syscall_3(SYS_lseek, (long int)fp, 0, SEEK_CUR);
  return ret;
}


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

x86 assembly (clang, -O2):
<ftell>:
mov    %rdi,%rsi
mov    0x2ed6(%rip),%rax
mov    (%rax),%edi
mov    0x2ebd(%rip),%rax
mov    (%rax),%ecx
xor    %edx,%edx
jmp    1030 <syscall_3@plt>

LLVM IR (-O0):
@SYS_lseek = global i32 0
@SEEK_CUR = global i32 0
define i64 @ftell(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
%4 = load i32, i32* @SYS_lseek
%5 = load i32*, i32** %2
%6 = ptrtoint i32* %5 to i64
%7 = load i32, i32* @SEEK_CUR
%8 = call i64 @syscall_3(i32 %4, i64 %6, i32 0, i32 %7)
store i64 %8, i64* %3
%9 = load i64, i64* %3
ret i64 %9
}

LLVM IR (-O2):
@SYS_lseek = global i32 0
@SEEK_CUR = global i32 0
define i64 @ftell(i32* %0) {
%2 = load i32, i32* @SYS_lseek
%3 = ptrtoint i32* %0 to i64
%4 = load i32, i32* @SEEK_CUR
%5 = tail call i64 @syscall_3(i32 %2, i64 %3, i32 0, i32 %4)
ret i64 %5
}
/* Variables and functions */
scalar_t__ ceil(double);
int ceil_int(double x) { return (int)ceil(x); }


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

x86 assembly (clang, -O2):
<ceil_int>:
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define i32 @ceil_int(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i64 @ceil(double %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ceil_int(double %0) {
%2 = tail call i64 @ceil(double %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
const char *NoSoundDrv_ErrorString(int ErrorNumber) { return "No sound, Ok."; }


x86 assembly (clang, -O0):
<NoSoundDrv_ErrorString>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"No sound, Ok.\00"
define i8* @NoSoundDrv_ErrorString(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"No sound, Ok.\00"
define i8* @NoSoundDrv_ErrorString(i32 %0) {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
unsigned int I2CMasterIntStatus(unsigned int baseAdd) {
  return (((*((volatile unsigned int *)(baseAdd + (0x28))))));
}


x86 assembly (clang, -O0):
<I2CMasterIntStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x28,%eax
mov    %eax,%eax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CMasterIntStatus>:
add    $0x28,%edi
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @I2CMasterIntStatus(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 40
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @I2CMasterIntStatus(i32 %0) {
%2 = add i32 %0, 40
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_sub_pi8(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_sub_pi8(__m64 a, __m64 b) { return _mm_sub_pi8(a, b); }


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

x86 assembly (clang, -O2):
<test_mm_sub_pi8>:
jmp    1030 <_mm_sub_pi8@plt>

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

LLVM IR (-O2):
define i32 @test_mm_sub_pi8(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_sub_pi8(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
struct tm {
  int dummy;
};

/* Variables and functions */
char *strptime(char const *, char const *, struct tm *);
char *timestamp2tm(const char *s, const char *format, struct tm *tm) {
  return strptime(s, format, tm);
}


x86 assembly (clang, -O0):
<timestamp2tm>:
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 <strptime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timestamp2tm>:
jmp    1030 <strptime@plt>

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

LLVM IR (-O2):
%struct.tm = type { i32 }
define i8* @timestamp2tm(i8* %0, i8* %1, %struct.tm* %2) {
%4 = tail call i8* @strptime(i8* %0, i8* %1, %struct.tm* %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xcb() {
  Assert_real((islower(203) == 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_islower.c",
              1020, ("islower should be 0 for 0xcb"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xcb\00"
define void @t_islower_0xcb() {
%1 = call i64 @islower(i32 203)
%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 1020, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xcb\00"
define void @t_islower_0xcb() {
%1 = tail call i64 @islower(i32 203)
%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 1020, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void fun() { puts("real fun"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"real fun\00"
define void @fun() {
%1 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"real fun\00"
define void @fun() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
void Default_WDT_IRQHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Default_WDT_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Default_WDT_IRQHandler+0x9>
jmp    1109 <Default_WDT_IRQHandler+0x9>

x86 assembly (clang, -O2):
<Default_WDT_IRQHandler>:
jmp    1100 <Default_WDT_IRQHandler>

LLVM IR (-O0):
define void @Default_WDT_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Default_WDT_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ requestor;
};
typedef TYPE_1__ XSelectionEvent;

/* Variables and functions */
unsigned long get_XSelectionEvent_requestor(void *_p) {
  return (unsigned long)((XSelectionEvent *)_p)->requestor;
}


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

x86 assembly (clang, -O2):
<get_XSelectionEvent_requestor>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i64 @get_XSelectionEvent_requestor(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
int raw_can_seek(void *id) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @raw_can_seek(i8* nocapture readnone %0) {
ret i32 0
}
int qsort_cmp__short(const void *x, const void *y) {
  if (*((short *)x) > *((short *)y))
    return (-1);
  else
    return (*((short *)x) < *((short *)y));
}


x86 assembly (clang, -O0):
<qsort_cmp__short>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movswl (%rax),%eax
mov    -0x18(%rbp),%rcx
movswl (%rcx),%ecx
cmp    %ecx,%eax
jle    112e <qsort_cmp__short+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1149 <qsort_cmp__short+0x49>
mov    -0x10(%rbp),%rax
movswl (%rax),%eax
mov    -0x18(%rbp),%rcx
movswl (%rcx),%ecx
cmp    %ecx,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort_cmp__short>:
movzwl (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%ax
setl   %cl
mov    $0xffffffff,%eax
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @qsort_cmp__short(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i16*
%4 = load i16, i16* %3
%5 = bitcast i8* %1 to i16*
%6 = load i16, i16* %5
%7 = icmp sgt i16 %4, %6
%8 = icmp slt i16 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
unsigned long long f(unsigned long long a) { return a | 0x1000ull; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
or     $0x1000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %rdi,%rax
or     $0x1000,%rax
ret

LLVM IR (-O0):
define i64 @f(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = or i64 %3, 4096
ret i64 %4
}

LLVM IR (-O2):
define i64 @f(i64 %0) {
%2 = or i64 %0, 4096
ret i64 %2
}
/* Variables and functions */
scalar_t__ prj_get_prebuildcommands();
int prj_getlistsize(void **);
int prj_get_numprebuildcommands() {
  return prj_getlistsize((void **)prj_get_prebuildcommands());
}


x86 assembly (clang, -O0):
<prj_get_numprebuildcommands>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <prj_get_prebuildcommands@plt>
mov    %rax,%rdi
call   1030 <prj_getlistsize@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<prj_get_numprebuildcommands>:
push   %rax
xor    %eax,%eax
call   1040 <prj_get_prebuildcommands@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <prj_getlistsize@plt>

LLVM IR (-O0):
define i32 @prj_get_numprebuildcommands() {
%1 = call i64 (...) @prj_get_prebuildcommands()
%2 = inttoptr i64 %1 to i8**
%3 = call i32 @prj_getlistsize(i8** %2)
ret i32 %3
}

LLVM IR (-O2):
define i32 @prj_get_numprebuildcommands() {
%1 = tail call i64 (...) @prj_get_prebuildcommands()
%2 = inttoptr i64 %1 to i8**
%3 = tail call i32 @prj_getlistsize(i8** %2)
ret i32 %3
}
/* Variables and functions */
int sscanf(char *, char *, int *);
int scanint(char *str, int *val) {
  if (str && *str) {
    if (val != NULL) {
      return sscanf(str, "%d", val) == 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<scanint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1172 <scanint+0x62>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1172 <scanint+0x62>
cmpq   $0x0,-0x18(%rbp)
je     116d <scanint+0x5d>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xeab(%rip),%rsi
call   1030 <sscanf@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1179 <scanint+0x69>
jmp    1172 <scanint+0x62>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scanint>:
push   %rax
xor    %eax,%eax
test   %rdi,%rdi
je     113b <scanint+0x2b>
mov    %rsi,%rdx
test   %rsi,%rsi
je     113b <scanint+0x2b>
cmpb   $0x0,(%rdi)
je     113b <scanint+0x2b>
lea    0xed4(%rip),%rsi
call   1030 <sscanf@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
sete   %al
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @scanint(i8* %0, i32* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = icmp ne i8 %5, 0
%7 = icmp ne i32* %1, null
%8 = and i1 %7, %6
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%11 = icmp eq i32 %10, 1
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %2, %4, %9
%14 = phi i32 [ %12, %9 ], [ 0, %4 ], [ 0, %2 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ returns_one();
scalar_t__ returns_zero();
int main() {
  if (returns_one() == 0)
    goto fail;
  goto fail;
  if (returns_zero() == 0)
    printf("this will never happen\n");
  return 0;
fail:
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <returns_one@plt>
cmp    $0x0,%rax
jne    1135 <main+0x25>
jmp    113a <main+0x2a>
jmp    113a <main+0x2a>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <returns_one@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @returns_one()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
br label %6
5: ; preds = %0
br label %6
6: ; preds = %5, %4
ret i32 1
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @returns_one()
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ test_criacao_tabuleiro();
int main() {
  test_criacao_tabuleiro();
  test_criacao_tabuleiro();
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @test_criacao_tabuleiro()
%2 = call i32 (...) @test_criacao_tabuleiro()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_criacao_tabuleiro()
%2 = tail call i32 (...) @test_criacao_tabuleiro()
ret i32 0
}
int test_imm_AFuint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xAF << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_AFuint64_highword_reg>:
movabs $0xaf00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_AFuint64_highword_reg(i64 %0) {
%2 = and i64 %0, 751619276800
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ endian_write_float(void *, float, int);
void le_write_float(void *ptr, float f) { endian_write_float(ptr, f, 1); }


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

x86 assembly (clang, -O2):
<le_write_float>:
mov    $0x1,%esi
jmp    1030 <endian_write_float@plt>

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

LLVM IR (-O2):
define void @le_write_float(i8* %0, float %1) {
%3 = tail call i32 @endian_write_float(i8* %0, float %1, i32 1)
ret void
}
/* Variables and functions */
size_t nextrand(size_t);
size_t nextchunksiz(size_t size, size_t threshold) {
  if (size > threshold)
    return (nextrand(threshold));
  return (size);
}


x86 assembly (clang, -O0):
<nextchunksiz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    1140 <nextchunksiz+0x30>
mov    -0x18(%rbp),%rdi
call   1030 <nextrand@plt>
mov    %rax,-0x8(%rbp)
jmp    1148 <nextchunksiz+0x38>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextchunksiz>:
cmp    %rsi,%rdi
jbe    111d <nextchunksiz+0xd>
mov    %rsi,%rdi
jmp    1030 <nextrand@plt>
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @nextchunksiz(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i64 @nextrand(i64 %1)
br label %6
6: ; preds = %2, %4
%7 = phi i64 [ %5, %4 ], [ %0, %2 ]
ret i64 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
long long __sdivmod32(int /*<<< orphan*/, int /*<<< orphan*/,
                      int /*<<< orphan*/);
long long __lux_smod32(int32_t a, int32_t b) { return __sdivmod32(a, b, 0); }


x86 assembly (clang, -O0):
<__lux_smod32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1030 <__sdivmod32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__lux_smod32>:
xor    %edx,%edx
jmp    1030 <__sdivmod32@plt>

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

LLVM IR (-O2):
define i64 @__lux_smod32(i32 %0, i32 %1) {
%3 = tail call i64 @__sdivmod32(i32 %0, i32 %1, i32 0)
ret i64 %3
}
/* Variables and functions */
int B_precomp(int);
double sqrt(int);
double Bij_precomp(int spec_i, int spec_j) {
  return sqrt(B_precomp(spec_i) * B_precomp(spec_j));
}


x86 assembly (clang, -O0):
<Bij_precomp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <B_precomp@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <B_precomp@plt>
mov    -0xc(%rbp),%edi
imul   %eax,%edi
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bij_precomp>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1040 <B_precomp@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <B_precomp@plt>
imul   %eax,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @Bij_precomp(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 = call i32 @B_precomp(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @B_precomp(i32 %7)
%9 = mul nsw i32 %6, %8
%10 = call double @sqrt(i32 %9)
ret double %10
}

LLVM IR (-O2):
define double @Bij_precomp(i32 %0, i32 %1) {
%3 = tail call i32 @B_precomp(i32 %0)
%4 = tail call i32 @B_precomp(i32 %1)
%5 = mul nsw i32 %4, %3
%6 = tail call double @sqrt(i32 %5)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ imprimirInverso(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char numero[32];
  scanf("%s", numero);
  imprimirInverso(numero);
  printf("\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xec4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <imprimirInverso@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [32 x i8]
%2 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @imprimirInverso(i8* %2)
%5 = call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
void glmAnd3s(bool out[3], const bool x[3], bool y) {
  for (size_t i = 0; i < 3; ++i)
    out[i] = x[i] && y;
}


x86 assembly (clang, -O0):
<glmAnd3s>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x3,-0x20(%rbp)
jae    1167 <glmAnd3s+0x67>
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%rdx
xor    %eax,%eax
cmpl   $0x0,(%rcx,%rdx,4)
mov    %al,-0x21(%rbp)
je     1143 <glmAnd3s+0x43>
cmpl   $0x0,-0x14(%rbp)
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%edx
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1117 <glmAnd3s+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmAnd3s>:
test   %edx,%edx
setne  %al
cmpl   $0x0,(%rsi)
setne  %cl
and    %al,%cl
movzbl %cl,%ecx
mov    %ecx,(%rdi)
cmpl   $0x0,0x4(%rsi)
setne  %cl
and    %al,%cl
movzbl %cl,%ecx
mov    %ecx,0x4(%rdi)
cmpl   $0x0,0x8(%rsi)
setne  %cl
and    %al,%cl
movzbl %cl,%eax
mov    %eax,0x8(%rdi)
ret

LLVM IR (-O0):
define void @glmAnd3s(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i64
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
store i64 0, i64* %7
br label %8
8: ; preds = %26, %3
%9 = load i64, i64* %7
%10 = icmp ult i64 %9, 3
br i1 %10, label %11, label %29
11: ; preds = %8
%12 = load i32*, i32** %5
%13 = load i64, i64* %7
%14 = getelementptr inbounds i32, i32* %12, i64 %13
%15 = load i32, i32* %14
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %11
%18 = load i32, i32* %6
%19 = icmp ne i32 %18, 0
br label %20
20: ; preds = %17, %11
%21 = phi i1 [ false, %11 ], [ %19, %17 ]
%22 = zext i1 %21 to i32
%23 = load i32*, i32** %4
%24 = load i64, i64* %7
%25 = getelementptr inbounds i32, i32* %23, i64 %24
store i32 %22, i32* %25
br label %26
26: ; preds = %20
%27 = load i64, i64* %7
%28 = add i64 %27, 1
store i64 %28, i64* %7
br label %8
29: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @glmAnd3s(i32* nocapture writeonly %0, i32* nocapture %1, i32 %2) {
%4 = icmp ne i32 %2, 0
%5 = load i32, i32* %1
%6 = icmp ne i32 %5, 0
%7 = and i1 %4, %6
%8 = zext i1 %7 to i32
store i32 %8, i32* %0
%9 = getelementptr inbounds i32, i32* %1, i64 1
%10 = load i32, i32* %9
%11 = icmp ne i32 %10, 0
%12 = and i1 %4, %11
%13 = zext i1 %12 to i32
%14 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %13, i32* %14
%15 = getelementptr inbounds i32, i32* %1, i64 2
%16 = load i32, i32* %15
%17 = icmp ne i32 %16, 0
%18 = and i1 %4, %17
%19 = zext i1 %18 to i32
%20 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %19, i32* %20
ret void
}
/* Variables and functions */
int strcmp(char *const, char *const);
int _name_comp(const void *a, const void *b) {
  return strcmp(*(char *const *)a, *(char *const *)b);
}


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

x86 assembly (clang, -O2):
<_name_comp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @_name_comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ i430vx_write(int /*<<< orphan*/, int, int,
                                int /*<<< orphan*/ *);
void i430vx_pci_reset(void) {
  i430vx_write(0, 0x59, 0x00, NULL);
  i430vx_write(0, 0x72, 0x02, NULL);
}


x86 assembly (clang, -O0):
<i430vx_pci_reset>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    $0x59,%esi
xor    %eax,%eax
mov    %eax,%ecx
mov    %edx,%edi
call   1030 <i430vx_write@plt>
xor    %edi,%edi
mov    $0x72,%esi
mov    $0x2,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <i430vx_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i430vx_pci_reset>:
push   %rax
xor    %edi,%edi
mov    $0x59,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <i430vx_write@plt>
xor    %edi,%edi
mov    $0x72,%esi
mov    $0x2,%edx
xor    %ecx,%ecx
pop    %rax
jmp    1030 <i430vx_write@plt>

LLVM IR (-O0):
define void @i430vx_pci_reset() {
%1 = call i32 @i430vx_write(i32 0, i32 89, i32 0, i32* null)
%2 = call i32 @i430vx_write(i32 0, i32 114, i32 2, i32* null)
ret void
}

LLVM IR (-O2):
define void @i430vx_pci_reset() {
%1 = tail call i32 @i430vx_write(i32 0, i32 89, i32 0, i32* null)
%2 = tail call i32 @i430vx_write(i32 0, i32 114, i32 2, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/
CtpForwardingEngineP__0__UnicastNameFreeRouting__routeFound();
void CtpRoutingEngineP__0__Routing__routeFound(void) {
  CtpForwardingEngineP__0__UnicastNameFreeRouting__routeFound();
}


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

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

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

LLVM IR (-O2):
define void @CtpRoutingEngineP__0__Routing__routeFound() {
%1 = tail call i32 (...) @CtpForwardingEngineP__0__UnicastNameFreeRouting__routeFound()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ command_help(char *);
int /*<<< orphan*/ general_help();
int help(int argc, char **argv) {
  if (argc == 1)
    general_help();
  else
    command_help(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1145 <help+0x25>
mov    $0x0,%al
call   1040 <general_help@plt>
jmp    1152 <help+0x32>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <command_help@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
cmp    $0x1,%edi
jne    112f <help+0xf>
xor    %eax,%eax
call   1040 <general_help@plt>
jmp    1138 <help+0x18>
mov    0x8(%rsi),%rdi
call   1030 <command_help@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @help(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @general_help()
br label %10
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @command_help(i8* %8)
br label %10
10: ; preds = %6, %4
ret i32 0
}
/* Type definitions */
struct request {
  int dummy;
};

/* Variables and functions */
int blk_rq_bytes(struct request const *);
__attribute__((always_)) unsigned int blk_rq_sectors(const struct request *rq) {
  return blk_rq_bytes(rq) >> 9;
}


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

x86 assembly (clang, -O2):
<blk_rq_sectors>:
push   %rax
call   1030 <blk_rq_bytes@plt>
sar    $0x9,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.request = type { i32 }
define i32 @blk_rq_sectors(%struct.request* %0) {
%2 = alloca %struct.request*
store %struct.request* %0, %struct.request** %2
%3 = load %struct.request*, %struct.request** %2
%4 = call i32 @blk_rq_bytes(%struct.request* %3)
%5 = ashr i32 %4, 9
ret i32 %5
}

LLVM IR (-O2):
%struct.request = type { i32 }
define i32 @blk_rq_sectors(%struct.request* %0) {
%2 = tail call i32 @blk_rq_bytes(%struct.request* %0)
%3 = ashr i32 %2, 9
ret i32 %3
}
void foo708(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo708(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_3() {
  Assert_real((isqrt(3) == 1),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              20, ("Integer square root of 3 should be 1"));
}


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

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

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [37 x i8] c"Integer square root of 3 should be 1\00"
define void @t_sqrt_3() {
%1 = call i32 @isqrt(i32 3)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 20, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [37 x i8] c"Integer square root of 3 should be 1\00"
define void @t_sqrt_3() {
%1 = tail call i32 @isqrt(i32 3)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 20, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ core3_swap(char *, int);
void U_EMRSETROP2_swap(char *record, int torev) { core3_swap(record, torev); }


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

x86 assembly (clang, -O2):
<U_EMRSETROP2_swap>:
jmp    1030 <core3_swap@plt>

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

LLVM IR (-O2):
define void @U_EMRSETROP2_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core3_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num, res;
  printf("\nEnter a number : ");
  scanf("%d", &num);
  printf("\nfib(%d) = %d\n\n", num, res);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xecb(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"\0AEnter a number : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [16 x i8] c"\0Afib(%d) = %d\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 undef)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freeWrap(void *ptr, void *unused) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @freeWrap(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
int isblank(int c) { return (c == 9 || c == 32); }


x86 assembly (clang, -O0):
<isblank>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <isblank+0x20>
cmpl   $0x20,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isblank>:
cmp    $0x9,%edi
sete   %al
cmp    $0x20,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isblank(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 9
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 32
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isblank(i32 %0) {
%2 = icmp eq i32 %0, 9
%3 = icmp eq i32 %0, 32
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
void termop_leds(struct ansiseq *s) {
  tnc_log_log(
      7, 4, -1,
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/fstd/telnetcat/refs/heads/devel/src/xterm.c",
      229, __func__, "unhandled");
  ansiseq_dump(s);
}


x86 assembly (clang, -O0):
<termop_leds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x7,%edi
mov    $0x4,%esi
mov    $0xffffffff,%edx
lea    0xebe(%rip),%rcx
mov    $0xe5,%r8d
lea    0xf37(%rip),%r9
lea    0xf3c(%rip),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1030 <tnc_log_log@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <ansiseq_dump@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<termop_leds>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xf63(%rip),%rax
mov    %rax,(%rsp)
lea    0xec6(%rip),%rcx
lea    0xf45(%rip),%r9
mov    $0x7,%edi
mov    $0x4,%esi
mov    $0xffffffff,%edx
mov    $0xe5,%r8d
xor    %eax,%eax
call   1030 <tnc_log_log@plt>
mov    %rbx,%rdi
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <ansiseq_dump@plt>

LLVM IR (-O0):
%struct.ansiseq = type opaque
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fstd/telnetcat/refs/heads/devel/src/xterm.c\00"
@__func__.termop_leds = [12 x i8] c"termop_leds\00"
@.str.1 = [10 x i8] c"unhandled\00"
define void @termop_leds(%struct.ansiseq* %0) {
%2 = alloca %struct.ansiseq*
store %struct.ansiseq* %0, %struct.ansiseq** %2
%3 = call i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @tnc_log_log to i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...)*)(i32 7, i32 4, i32 -1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 229, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.termop_leds, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = load %struct.ansiseq*, %struct.ansiseq** %2
%5 = call i32 (%struct.ansiseq*, ...) bitcast (i32 (...)* @ansiseq_dump to i32 (%struct.ansiseq*, ...)*)(%struct.ansiseq* %4)
ret void
}

LLVM IR (-O2):
%struct.ansiseq = type opaque
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fstd/telnetcat/refs/heads/devel/src/xterm.c\00"
@__func__.termop_leds = [12 x i8] c"termop_leds\00"
@.str.1 = [10 x i8] c"unhandled\00"
define void @termop_leds(%struct.ansiseq* %0) {
%2 = tail call i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @tnc_log_log to i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...)*)(i32 7, i32 4, i32 -1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 229, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.termop_leds, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (%struct.ansiseq*, ...) bitcast (i32 (...)* @ansiseq_dump to i32 (%struct.ansiseq*, ...)*)(%struct.ansiseq* %0)
ret void
}
void access_counter(unsigned *hi, unsigned *lo) {
  __asm__("rdtsc; movl %%edx,%0; movl %%eax,%1"
          : "=r"(*hi), "=r"(*lo)
          :
          : "%edx", "%eax");
}


x86 assembly (clang, -O0):
<access_counter>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
rdtsc
mov    %edx,%esi
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rdx
mov    %esi,(%rdx)
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<access_counter>:
rdtsc
mov    %edx,%ecx
mov    %eax,%r8d
mov    %ecx,(%rdi)
mov    %r8d,(%rsi)
ret

LLVM IR (-O0):
define void @access_counter(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
%7 = call { i32, i32 } asm "rdtsc; movl %edx,$0; movl %eax,$1", "=r,=r,~{edx},~{eax},~{dirflag},~{fpsr},~{flags}"()
%8 = extractvalue { i32, i32 } %7, 0
%9 = extractvalue { i32, i32 } %7, 1
store i32 %8, i32* %5
store i32 %9, i32* %6
ret void
}

LLVM IR (-O2):
define void @access_counter(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
%3 = tail call { i32, i32 } asm "rdtsc; movl %edx,$0; movl %eax,$1", "=r,=r,~{edx},~{eax},~{dirflag},~{fpsr},~{flags}"()
%4 = extractvalue { i32, i32 } %3, 0
%5 = extractvalue { i32, i32 } %3, 1
store i32 %4, i32* %0
store i32 %5, i32* %1
ret void
}