xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void ft_putchar_fd(char c, int fd) {
  if (fd > 0 && fd <= 2)
    write(fd, &c, 1);
}


x86 assembly (clang, -O0):
<ft_putchar_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1146 <ft_putchar_fd+0x36>
cmpl   $0x2,-0x8(%rbp)
jg     1146 <ft_putchar_fd+0x36>
mov    -0x8(%rbp),%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putchar_fd>:
push   %rax
mov    %dil,0x7(%rsp)
lea    -0x1(%rsi),%eax
cmp    $0x1,%eax
ja     1132 <ft_putchar_fd+0x22>
lea    0x7(%rsp),%rax
mov    %esi,%edi
mov    %rax,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @ft_putchar_fd(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp sle i32 %8, 2
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %4
%12 = call i32 @write(i32 %11, i8* %3, i32 1)
br label %13
13: ; preds = %10, %7, %2
ret void
}

LLVM IR (-O2):
define void @ft_putchar_fd(i8 signext %0, i32 %1) {
%3 = alloca i8
store i8 %0, i8* %3
%4 = add i32 %1, -1
%5 = icmp ult i32 %4, 2
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = call i32 @write(i32 %1, i8* %3, i32 1)
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int doCreate(int /*<<< orphan*/);
int /*<<< orphan*/ selfie_ID();
int hypster_create() { return doCreate(selfie_ID()); }


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

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

LLVM IR (-O0):
define i32 @hypster_create() {
%1 = call i32 (...) @selfie_ID()
%2 = call i32 @doCreate(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @hypster_create() {
%1 = tail call i32 (...) @selfie_ID()
%2 = tail call i32 @doCreate(i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ CallBack2(int, void *, void *);
int /*<<< orphan*/ CheckRunningInMainThread(char *);
void IgorError(const char *title, int errCode) {
  if (!CheckRunningInMainThread("IgorError"))
    return;
  CallBack2(46, (void *)title, (void *)errCode);
}


x86 assembly (clang, -O0):
<IgorError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <CheckRunningInMainThread@plt>
cmp    $0x0,%eax
jne    1149 <IgorError+0x29>
jmp    115b <IgorError+0x3b>
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x2e,%edi
call   1040 <CallBack2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IgorError>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xed1(%rip),%rdi
call   1030 <CheckRunningInMainThread@plt>
test   %eax,%eax
je     114e <IgorError+0x2e>
movslq %ebp,%rdx
mov    $0x2e,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <CallBack2@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"IgorError\00"
define void @IgorError(i8* %0, i32 %1) {
%3 = tail call i32 @CheckRunningInMainThread(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = sext i32 %1 to i64
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @CallBack2(i32 46, i8* %0, i8* %7)
br label %9
9: ; preds = %2, %5
ret void
}
/* Variables and functions */
int i386_init_timers();
int init_timers(void) { return i386_init_timers(); }


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

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

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

LLVM IR (-O2):
define i32 @init_timers() {
%1 = tail call i32 (...) @i386_init_timers()
ret i32 %1
}
float vec2_dot(const float a[2], const float b[2]) {
  return a[0] * b[0] + a[1] * b[1];
}


x86 assembly (clang, -O0):
<vec2_dot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulss  0x4(%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec2_dot>:
movss  0x4(%rdi),%xmm1
mulss  0x4(%rsi),%xmm1
movss  (%rdi),%xmm0
mulss  (%rsi),%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @vec2_dot(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = fmul float %13, %16
%18 = call float @llvm.fmuladd.f32(float %7, float %10, float %17)
ret float %18
}

LLVM IR (-O2):
define float @vec2_dot(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = fmul float %6, %8
%10 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %9)
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main(int argc, char *argv[]) {
  char *nombres[] = {"abcdefg", "hijklm", "nopqrst"};
  printf("m? %c\n", *(*(nombres + 1) + 5));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2cd3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cd0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2ccd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rax
lea    0xec5(%rip),%rdi
movsbl 0x5(%rax),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"abcdefg\00"
@.str.1 = [7 x i8] c"hijklm\00"
@.str.2 = [8 x i8] c"nopqrst\00"
@__const.main.nombres = [3 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0)]
@.str.3 = [7 x i8] c"m? %c\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x i8*]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [3 x i8*]* %6 to i8*
%8 = getelementptr inbounds [3 x i8*], [3 x i8*]* %6, i64 0, i64 0
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8, i8* %10, i64 5
%12 = load i8, i8* %11
%13 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8 signext %12)
ret i32 0
}

LLVM IR (-O2):
@.str.3 = [7 x i8] c"m? %c\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8 signext 109)
ret i32 0
}
/* Variables and functions */
unsigned int bar();
void foo0x3(void) {
  unsigned int a = bar();
  if (a <= 0x3)
    bar();
}


x86 assembly (clang, -O0):
<foo0x3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <bar@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
ja     1133 <foo0x3+0x23>
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo0x3>:
push   %rax
xor    %eax,%eax
call   1030 <bar@plt>
cmp    $0x3,%eax
ja     1125 <foo0x3+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <bar@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @foo0x3() {
%1 = alloca i32
%2 = call i32 (...) @bar()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ule i32 %3, 3
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @bar()
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
define void @foo0x3() {
%1 = tail call i32 (...) @bar()
%2 = icmp ult i32 %1, 4
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @bar()
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void gdbsx_usage_exit(void) {
  printf("Usage 1: gdbsx -a domid <32|64> PORT [-d]\n"
         "         PORT to listen for a TCP connection.\n"
         "         Eg. gdbsx -a 3 32 9999\n\n");
  printf("Usage 2: gdbsx -c domid <32|64> [vcpu#] [-d]\n");
  printf("         to dump vcpu context(s) for given domid\n\n");
  exit(1);
}


x86 assembly (clang, -O0):
<gdbsx_usage_exit>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf43(%rip),%rdi
call   1030 <printf@plt>
lea    0xf65(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<gdbsx_usage_exit>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf45(%rip),%rdi
call   1030 <puts@plt>
lea    0xf66(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [122 x i8] c"Usage 1: gdbsx -a domid <32|64> PORT [-d]\0A PORT to listen for a TCP connection.\0A Eg. gdbsx -a 3 32 9999\0A\0A\00"
@.str.1 = [46 x i8] c"Usage 2: gdbsx -c domid <32|64> [vcpu#] [-d]\0A\00"
@.str.2 = [51 x i8] c" to dump vcpu context(s) for given domid\0A\0A\00"
define void @gdbsx_usage_exit() {
%1 = call i32 @printf(i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [121 x i8] c"Usage 1: gdbsx -a domid <32|64> PORT [-d]\0A PORT to listen for a TCP connection.\0A Eg. gdbsx -a 3 32 9999\0A\00"
@str.3 = [45 x i8] c"Usage 2: gdbsx -c domid <32|64> [vcpu#] [-d]\00"
@str.4 = [50 x i8] c" to dump vcpu context(s) for given domid\0A\00"
define void @gdbsx_usage_exit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([121 x i8], [121 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void t6() { free((void *)1000); }


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

x86 assembly (clang, -O2):
<t6>:
mov    $0x3e8,%edi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @t6() {
%1 = call i32 @free(i8* inttoptr (i64 1000 to i8*))
ret void
}

LLVM IR (-O2):
define void @t6() {
%1 = tail call i32 @free(i8* inttoptr (i64 1000 to i8*))
ret void
}
void CreateEDistList2(Schema, A) struct univStruct *Schema;
struct Student **A;
{
  AssignStudentEDistList2First(A, 0);
}


x86 assembly (clang, -O0):
<CreateEDistList2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <AssignStudentEDistList2First@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CreateEDistList2>:
mov    %rsi,%rdi
xor    %esi,%esi
xor    %eax,%eax
jmp    1030 <AssignStudentEDistList2First@plt>

LLVM IR (-O0):
%struct.univStruct = type opaque
%struct.Student = type opaque
define void @CreateEDistList2(%struct.univStruct* %0, %struct.Student** %1) {
%3 = alloca %struct.univStruct*
%4 = alloca %struct.Student**
store %struct.univStruct* %0, %struct.univStruct** %3
store %struct.Student** %1, %struct.Student*** %4
%5 = load %struct.Student**, %struct.Student*** %4
%6 = call i32 (%struct.Student**, i32, ...) bitcast (i32 (...)* @AssignStudentEDistList2First to i32 (%struct.Student**, i32, ...)*)(%struct.Student** %5, i32 0)
ret void
}

LLVM IR (-O2):
%struct.univStruct = type opaque
%struct.Student = type opaque
define void @CreateEDistList2(%struct.univStruct* nocapture readnone %0, %struct.Student** %1) {
%3 = tail call i32 (%struct.Student**, i32, ...) bitcast (i32 (...)* @AssignStudentEDistList2First to i32 (%struct.Student**, i32, ...)*)(%struct.Student** %1, i32 0)
ret void
}
int get_cc_mode_state(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @get_cc_mode_state() {
ret i32 0
}
/* Variables and functions */
int hwfind(int);
int /*<<< orphan*/ hwreset();
int /*<<< orphan*/ printf(char *, int, char *);
int findprop(char *port) {
  int version = 0;
  hwreset();
  version = hwfind(1);
  if (version) {
    printf("Propeller Version %d on %s\n", version, port);
  }
  return version != 0 ? 0 : 1;
}


x86 assembly (clang, -O0):
<findprop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1050 <hwreset@plt>
mov    $0x1,%edi
call   1040 <hwfind@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1174 <findprop+0x44>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findprop>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <hwreset@plt>
mov    $0x1,%edi
call   1040 <hwfind@plt>
mov    %eax,%ebp
test   %eax,%eax
je     115e <findprop+0x2e>
lea    0xeac(%rip),%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
test   %ebp,%ebp
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Propeller Version %d on %s\0A\00"
define i32 @findprop(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = call i32 (...) @hwreset()
%5 = call i32 @hwfind(i32 1)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* %3
%10 = load i8*, i8** %2
%11 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %9, i8* %10)
br label %12
12: ; preds = %8, %1
%13 = load i32, i32* %3
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 0, i32 1
ret i32 %16
}

LLVM IR (-O2):
@.str = [28 x i8] c"Propeller Version %d on %s\0A\00"
define i32 @findprop(i8* %0) {
%2 = tail call i32 (...) @hwreset()
%3 = tail call i32 @hwfind(i32 1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %3, i8* %0)
br label %7
7: ; preds = %5, %1
%8 = zext i1 %4 to i32
ret i32 %8
}
__typeof__(aligned_alloc(1, "")) test_aligned_alloc_91(void) {
  return aligned_alloc(1, "");
}


x86 assembly (clang, -O0):
<test_aligned_alloc_91>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
call   1030 <aligned_alloc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_aligned_alloc_91>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <aligned_alloc@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @test_aligned_alloc_91() {
%1 = call i8* @aligned_alloc(i64 1, i64 ptrtoint ([1 x i8]* @.str to i64))
ret i8* %1
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define noalias i8* @test_aligned_alloc_91() {
%1 = tail call align 1 i8* @aligned_alloc(i64 1, i64 ptrtoint ([1 x i8]* @.str to i64))
ret i8* %1
}
void __prussintc_set_hmr(unsigned int *pruintc_io, unsigned short channel,
                         unsigned short host) {
  pruintc_io[(0x800 + (channel & ~(0x3))) >> 2] =
      pruintc_io[(0x800 + (channel & ~(0x3))) >> 2] |
      (((host)&0xF) << (((channel)&0x3) << 3));
}


x86 assembly (clang, -O0):
<__prussintc_set_hmr>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %si,%cx
mov    %rdi,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
mov    %ax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzwl -0xa(%rbp),%ecx
and    $0xfffffffc,%ecx
add    $0x800,%ecx
sar    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
movzwl -0xc(%rbp),%eax
and    $0xf,%eax
movzwl -0xa(%rbp),%ecx
and    $0x3,%ecx
shl    $0x3,%ecx
shl    %cl,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
movzwl -0xa(%rbp),%ecx
and    $0xfffffffc,%ecx
add    $0x800,%ecx
sar    $0x2,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__prussintc_set_hmr>:
lea    0x0(,%rsi,8),%ecx
and    $0xf,%edx
shl    %cl,%edx
and    $0xfffffffc,%esi
or     %edx,0x800(%rsi,%rdi,1)
ret

LLVM IR (-O0):
define void @__prussintc_set_hmr(i32* %0, i16 zeroext %1, i16 zeroext %2) {
%4 = alloca i32*
%5 = alloca i16
%6 = alloca i16
store i32* %0, i32** %4
store i16 %1, i16* %5
store i16 %2, i16* %6
%7 = load i32*, i32** %4
%8 = load i16, i16* %5
%9 = zext i16 %8 to i32
%10 = and i32 %9, -4
%11 = add nsw i32 2048, %10
%12 = ashr i32 %11, 2
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %7, i64 %13
%15 = load i32, i32* %14
%16 = load i16, i16* %6
%17 = zext i16 %16 to i32
%18 = and i32 %17, 15
%19 = load i16, i16* %5
%20 = zext i16 %19 to i32
%21 = and i32 %20, 3
%22 = shl i32 %21, 3
%23 = shl i32 %18, %22
%24 = or i32 %15, %23
%25 = load i32*, i32** %4
%26 = load i16, i16* %5
%27 = zext i16 %26 to i32
%28 = and i32 %27, -4
%29 = add nsw i32 2048, %28
%30 = ashr i32 %29, 2
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i32, i32* %25, i64 %31
store i32 %24, i32* %32
ret void
}

LLVM IR (-O2):
define void @__prussintc_set_hmr(i32* nocapture %0, i16 zeroext %1, i16 zeroext %2) {
%4 = zext i16 %1 to i32
%5 = and i32 %4, 65532
%6 = add nuw nsw i32 %5, 2048
%7 = lshr exact i32 %6, 2
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = and i16 %2, 15
%12 = zext i16 %11 to i32
%13 = shl nuw nsw i32 %4, 3
%14 = and i32 %13, 24
%15 = shl nuw nsw i32 %12, %14
%16 = or i32 %10, %15
store i32 %16, i32* %9
ret void
}
/* Variables and functions */
int sendData(int, char *);
int sendSync(int sock) { return sendData(sock, "SYN 13 0\r\n"); }


x86 assembly (clang, -O0):
<sendSync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
call   1030 <sendData@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendSync>:
lea    0xee9(%rip),%rsi
jmp    1030 <sendData@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"SYN 13 0\0D\0A\00"
define i32 @sendSync(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sendData(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [11 x i8] c"SYN 13 0\0D\0A\00"
define i32 @sendSync(i32 %0) {
%2 = tail call i32 @sendData(i32 %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
void prune_alias_eq_Ok(int x) {
  int a[1];
  if (x == x) {
    a[0] = 0;
  } else {
    a[1] = 0;
  }
}


x86 assembly (clang, -O0):
<prune_alias_eq_Ok>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jne    111f <prune_alias_eq_Ok+0x1f>
movl   $0x0,-0x8(%rbp)
jmp    1126 <prune_alias_eq_Ok+0x26>
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @prune_alias_eq_Ok(i32 %0) {
%2 = alloca i32
%3 = alloca [1 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
store i32 0, i32* %8
br label %11
9: ; preds = %1
%10 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 1
store i32 0, i32* %10
br label %11
11: ; preds = %9, %7
ret void
}

LLVM IR (-O2):
define void @prune_alias_eq_Ok(i32 %0) {
ret void
}
void malloc_trace_bin(n) int n;
{}


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

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

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

LLVM IR (-O2):
define void @malloc_trace_bin(i32 %0) {
ret void
}
/* Variables and functions */
int hol_entry_cmp(void const *, void const *);
int hol_entry_qcmp(const void *entry1_v, const void *entry2_v) {
  return hol_entry_cmp(entry1_v, entry2_v);
}


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

x86 assembly (clang, -O2):
<hol_entry_qcmp>:
jmp    1030 <hol_entry_cmp@plt>

LLVM IR (-O0):
define i32 @hol_entry_qcmp(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 = load i8*, i8** %4
%7 = call i32 @hol_entry_cmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @hol_entry_qcmp(i8* %0, i8* %1) {
%3 = tail call i32 @hol_entry_cmp(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int my_value;
  char my_string[] = "-23.5";
  my_value = atoi(my_string);
  printf("%d\n", my_value);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0xe(%rbp)
mov    0xec5(%rip),%ax
mov    %ax,-0xa(%rbp)
lea    -0xe(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.my_string = [6 x i8] c"-23.5\00"
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [6 x i8]
store i32 0, i32* %1
%4 = bitcast [6 x i8]* %3 to i8*
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%6 = call i32 @atoi(i8* %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.my_string = [6 x i8] c"-23.5\00"
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @atoi(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__const.main.my_string, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_version();
int /*<<< orphan*/ printf(char *);
void print_usage() {
  print_version();
  printf("usage: nine PROGRAM [ARGUMENTS...]  run the specified program\n");
  printf("       nine -h, --help              print this message then exit\n");
  printf("       nine -v, --version           print version information then "
         "exit\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <print_version@plt>
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
lea    0xf01(%rip),%rdi
call   1040 <printf@plt>
lea    0xf37(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
xor    %eax,%eax
call   1040 <print_version@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xf03(%rip),%rdi
call   1030 <puts@plt>
lea    0xf38(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [63 x i8] c"usage: nine PROGRAM [ARGUMENTS...] run the specified program\0A\00"
@.str.1 = [66 x i8] c" nine -h, --help print this message then exit\0A\00"
@.str.2 = [73 x i8] c" nine -v, --version print version information then exit\0A\00"
define void @print_usage() {
%1 = call i32 (...) @print_version()
%2 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [62 x i8] c"usage: nine PROGRAM [ARGUMENTS...] run the specified program\00"
@str.3 = [65 x i8] c" nine -h, --help print this message then exit\00"
@str.4 = [72 x i8] c" nine -v, --version print version information then exit\00"
define void @print_usage() {
%1 = tail call i32 (...) @print_version()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_packus_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i test_mm_packus_epi16(__m128i A, __m128i B) {
  return _mm_packus_epi16(A, B);
}


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

x86 assembly (clang, -O2):
<test_mm_packus_epi16>:
jmp    1030 <_mm_packus_epi16@plt>

LLVM IR (-O0):
define i32 @test_mm_packus_epi16(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_packus_epi16(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_packus_epi16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_packus_epi16(i32 %0, i32 %1)
ret i32 %3
}
void fils_hlp_deinit(struct hostapd_data *hapd) {}


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

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

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

LLVM IR (-O2):
%struct.hostapd_data = type opaque
define void @fils_hlp_deinit(%struct.hostapd_data* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
char *strcpy(char *, char *);
void test4(char *ptr) {
  if (strcpy(ptr, ptr) != ptr)
    abort();
}


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
cmp    -0x8(%rbp),%rax
je     114a <test4+0x2a>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test4(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct cfg_override {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct cfg_override *);
void cfg_override_free(struct cfg_override *o) { free(o); }


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

LLVM IR (-O0):
%struct.cfg_override = type { i32 }
define void @cfg_override_free(%struct.cfg_override* %0) {
%2 = alloca %struct.cfg_override*
store %struct.cfg_override* %0, %struct.cfg_override** %2
%3 = load %struct.cfg_override*, %struct.cfg_override** %2
%4 = call i32 @free(%struct.cfg_override* %3)
ret void
}

LLVM IR (-O2):
%struct.cfg_override = type { i32 }
define void @cfg_override_free(%struct.cfg_override* nocapture %0) {
%2 = tail call i32 @free(%struct.cfg_override* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned int);
void crMsleep(unsigned int msec) { usleep(msec * 1000); }


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

x86 assembly (clang, -O2):
<crMsleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @crMsleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @crMsleep(i32 %0) {
%2 = mul i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
const char *skip_prefix_2(const char *prefix, const char *input) {
  while (*prefix != '\0') {
    if (*prefix++ != *input++)
      return 0;
  }
  return input;
}


x86 assembly (clang, -O0):
<skip_prefix_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115a <skip_prefix_2+0x5a>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1155 <skip_prefix_2+0x55>
movq   $0x0,-0x8(%rbp)
jmp    1162 <skip_prefix_2+0x62>
jmp    110c <skip_prefix_2+0xc>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_prefix_2>:
mov    %rsi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rdi),%ecx
test   %cl,%cl
je     1128 <skip_prefix_2+0x28>
add    $0x1,%rdi
lea    0x1(%rax),%rdx
cmp    (%rax),%cl
mov    %rdx,%rax
je     1110 <skip_prefix_2+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @skip_prefix_2(i8* nocapture %0, i8* %1) {
br label %3
3: ; preds = %8, %2
%4 = phi i8* [ %0, %2 ], [ %9, %8 ]
%5 = phi i8* [ %1, %2 ], [ %10, %8 ]
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = load i8, i8* %5
%12 = icmp eq i8 %6, %11
br i1 %12, label %3, label %13
13: ; preds = %3, %8
%14 = phi i8* [ null, %8 ], [ %5, %3 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x7b() {
  Assert_real((isdigit(123) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              620, ("isdigit should be 0 for {"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x7b>:
push   %rax
mov    $0x7b,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x26c,%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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for {\00"
define void @t_isdigit_0x7b() {
%1 = call i64 @isdigit(i32 123)
%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 620, i8* getelementptr inbounds ([26 x i8], [26 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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for {\00"
define void @t_isdigit_0x7b() {
%1 = tail call i64 @isdigit(i32 123)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 620, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ top();
void middle() { top(); }


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

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

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

LLVM IR (-O2):
define void @middle() {
%1 = tail call i32 (...) @top()
ret void
}
int ieee802_1x_alloc_kay_sm(struct wpa_supplicant *wpa_s,
                            struct wpa_ssid *ssid) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.wpa_supplicant = type opaque
%struct.wpa_ssid = type opaque
define i32 @ieee802_1x_alloc_kay_sm(%struct.wpa_supplicant* %0, %struct.wpa_ssid* %1) {
%3 = alloca %struct.wpa_supplicant*
%4 = alloca %struct.wpa_ssid*
store %struct.wpa_supplicant* %0, %struct.wpa_supplicant** %3
store %struct.wpa_ssid* %1, %struct.wpa_ssid** %4
ret i32 0
}

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
%struct.wpa_ssid = type opaque
define i32 @ieee802_1x_alloc_kay_sm(%struct.wpa_supplicant* nocapture readnone %0, %struct.wpa_ssid* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef char *int64_t;

/* Variables and functions */
int64_t rdtscp() {
  int64_t ret;
  __asm__ volatile("rdtscp" : "=A"(ret) : : "ecx");
  return ret;
}


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

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

LLVM IR (-O0):
define i8* @rdtscp() {
%1 = alloca i8*
%2 = call i8* asm sideeffect "rdtscp", "=A,~{ecx},~{dirflag},~{fpsr},~{flags}"()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
ret i8* %3
}

LLVM IR (-O2):
define i8* @rdtscp() {
%1 = tail call i8* asm sideeffect "rdtscp", "=A,~{ecx},~{dirflag},~{fpsr},~{flags}"()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  union numbers {
    int i;
    float f;
  };
  union numbers foo = {4};
  union numbers *number_ptr = &foo;
  number_ptr->i = 450;
  number_ptr->f = 6.66;
  printf("Q=%f\n", foo.f);
  printf("ololo\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee6(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1c2,(%rax)
mov    -0x10(%rbp),%rax
movss  0xec1(%rip),%xmm0
movss  %xmm0,(%rax)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xead(%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    0xee0(%rip),%rdi
movsd  0xed0(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%union.numbers = type { i32 }
@__const.main.foo = %union.numbers { i32 4 }
@.str = [6 x i8] c"Q=%f\0A\00"
@.str.1 = [7 x i8] c"ololo\0A\00"
define i32 @main() {
%1 = alloca %union.numbers
%2 = alloca %union.numbers*
%3 = bitcast %union.numbers* %1 to i8*
store %union.numbers* %1, %union.numbers** %2
%4 = load %union.numbers*, %union.numbers** %2
%5 = bitcast %union.numbers* %4 to i32*
store i32 450, i32* %5
%6 = load %union.numbers*, %union.numbers** %2
%7 = bitcast %union.numbers* %6 to float*
store float 0x401AA3D700000000, float* %7
%8 = bitcast %union.numbers* %1 to float*
%9 = load float, float* %8
%10 = fpext float %9 to double
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%union.numbers = type { i32 }
@.str = [6 x i8] c"Q=%f\0A\00"
@str = [6 x i8] c"ololo\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double 0x401AA3D700000000)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sig_int(int signo) { printf("interrupt\n%%"); }


x86 assembly (clang, -O0):
<sig_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"interrupt\0A%%\00"
define void @sig_int(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
int bar(int y) { return y + 7; }


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

x86 assembly (clang, -O2):
<bar>:
lea    0x7(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @bar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 7
ret i32 %4
}

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = add nsw i32 %0, 7
ret i32 %2
}
/* Variables and functions */
scalar_t__ strchr(char *, char);
bool isnum(char c) {
  if (strchr("1234567890.", c))
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<isnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
lea    0xedb(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1144 <isnum+0x34>
movl   $0x1,-0x4(%rbp)
jmp    114b <isnum+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnum>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"1234567890.\00"
define i32 @isnum(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @strchr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [12 x i8] c"1234567890.\00"
define i32 @isnum(i8 signext %0) {
%2 = tail call i64 @strchr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ VA_DelayMS(int);
scalar_t__ receive_byte_via_SPI(int);
int /*<<< orphan*/ transmit_byte_via_SPI(int, int);
void V3A_ValidateFWRingBuf(void) {
  transmit_byte_via_SPI(((0x65E0) + 0x15), 1);
  VA_DelayMS(10);
  while (receive_byte_via_SPI(((0x65E0) + 0x15)))
    ;
}


x86 assembly (clang, -O0):
<V3A_ValidateFWRingBuf>:
push   %rbp
mov    %rsp,%rbp
mov    $0x65f5,%edi
mov    $0x1,%esi
call   1040 <transmit_byte_via_SPI@plt>
mov    $0xa,%edi
call   1050 <VA_DelayMS@plt>
mov    $0x65f5,%edi
call   1030 <receive_byte_via_SPI@plt>
cmp    $0x0,%rax
je     1166 <V3A_ValidateFWRingBuf+0x36>
jmp    114d <V3A_ValidateFWRingBuf+0x1d>
pop    %rbp
ret

x86 assembly (clang, -O2):
<V3A_ValidateFWRingBuf>:
push   %rax
mov    $0x65f5,%edi
mov    $0x1,%esi
call   1040 <transmit_byte_via_SPI@plt>
mov    $0xa,%edi
call   1050 <VA_DelayMS@plt>
nopw   0x0(%rax,%rax,1)
mov    $0x65f5,%edi
call   1030 <receive_byte_via_SPI@plt>
test   %rax,%rax
jne    1150 <V3A_ValidateFWRingBuf+0x20>
pop    %rax
ret

LLVM IR (-O0):
define void @V3A_ValidateFWRingBuf() {
%1 = call i32 @transmit_byte_via_SPI(i32 26101, i32 1)
%2 = call i32 @VA_DelayMS(i32 10)
br label %3
3: ; preds = %6, %0
%4 = call i64 @receive_byte_via_SPI(i32 26101)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %3
br label %3
7: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @V3A_ValidateFWRingBuf() {
%1 = tail call i32 @transmit_byte_via_SPI(i32 26101, i32 1)
%2 = tail call i32 @VA_DelayMS(i32 10)
br label %3
3: ; preds = %3, %0
%4 = tail call i64 @receive_byte_via_SPI(i32 26101)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void *malloc(size_t);
int /*<<< orphan*/ perror(char *);
void *xmalloc(size_t s) {
  void *r = malloc(s);
  if (!r)
    do {
      perror("ERROR: "
             "malloc");
      exit(1);
    } while (0);
  return r;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116f <xmalloc+0x3f>
jmp    1159 <xmalloc+0x29>
lea    0xea0(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1030 <malloc@plt>
test   %rax,%rax
je     113d <xmalloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"ERROR: malloc\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %1
br label %9
9: ; preds = %8
%10 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; No predecessors!
br label %13
13: ; preds = %12, %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [14 x i8] c"ERROR: malloc\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i8* %2
}
void DBGCCreate(void) {}


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

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

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

LLVM IR (-O2):
define void @DBGCCreate() {
ret void
}
/* Variables and functions */
scalar_t__ malloc_or_die(int);
double *double_malloc_or_die(int num_doubles) {
  return (double *)malloc_or_die(num_doubles * sizeof(double));
}


x86 assembly (clang, -O0):
<double_malloc_or_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <malloc_or_die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_malloc_or_die>:
shl    $0x3,%edi
jmp    1030 <malloc_or_die@plt>

LLVM IR (-O0):
define double* @double_malloc_or_die(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = mul i64 %4, 8
%6 = trunc i64 %5 to i32
%7 = call i64 @malloc_or_die(i32 %6)
%8 = inttoptr i64 %7 to double*
ret double* %8
}

LLVM IR (-O2):
define double* @double_malloc_or_die(i32 %0) {
%2 = shl i32 %0, 3
%3 = tail call i64 @malloc_or_die(i32 %2)
%4 = inttoptr i64 %3 to double*
ret double* %4
}
/* Variables and functions */
int /*<<< orphan*/ pause();
void g() {
  *(int *)1 = 0;
  pause();
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
movl   $0x0,(%rax)
mov    $0x0,%al
call   1030 <pause@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
movl   $0x0,0x1
xor    %eax,%eax
jmp    1030 <pause@plt>

LLVM IR (-O0):
define void @g() {
store i32 0, i32* inttoptr (i64 1 to i32*)
%1 = call i32 (...) @pause()
ret void
}

LLVM IR (-O2):
define void @g() {
store i32 0, i32* inttoptr (i64 1 to i32*)
%1 = tail call i32 (...) @pause()
ret void
}