xunge/DecIR huggingface dataset:
/* Type definitions */
struct ast {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ handle_output(struct ast *, char *, char *);
struct ast *handle_print_call(struct ast *param) {
  handle_output(param,
                "\x1b[35m"
                "%.4g\n"
                "\x1b[0m",
                "\x1b[35m"
                "%s\n"
                "\x1b[0m");
  return param;
}


x86 assembly (clang, -O0):
<handle_print_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    0xee1(%rip),%rdx
call   1030 <handle_output@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_print_call>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
lea    0xeed(%rip),%rdx
call   1030 <handle_output@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ast = type { i32 }
@.str = [15 x i8] c"\1B[35m%.4g\0A\1B[0m\00"
@.str.1 = [13 x i8] c"\1B[35m%s\0A\1B[0m\00"
define %struct.ast* @handle_print_call(%struct.ast* %0) {
%2 = alloca %struct.ast*
store %struct.ast* %0, %struct.ast** %2
%3 = load %struct.ast*, %struct.ast** %2
%4 = call i32 @handle_output(%struct.ast* %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%5 = load %struct.ast*, %struct.ast** %2
ret %struct.ast* %5
}

LLVM IR (-O2):
%struct.ast = type { i32 }
@.str = [15 x i8] c"\1B[35m%.4g\0A\1B[0m\00"
@.str.1 = [13 x i8] c"\1B[35m%s\0A\1B[0m\00"
define %struct.ast* @handle_print_call(%struct.ast* returned %0) {
%2 = tail call i32 @handle_output(%struct.ast* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret %struct.ast* %0
}
/* Type definitions */
struct ListNode {
  int dummy;
};

/* Variables and functions */
struct ListNode *list0();
struct ListNode *get_list(int number) {
  if (number == 0) {
    return list0();
  } else {
    return NULL;
  }
}


x86 assembly (clang, -O0):
<get_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1135 <get_list+0x25>
mov    $0x0,%al
call   1030 <list0@plt>
mov    %rax,-0x8(%rbp)
jmp    113d <get_list+0x2d>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_list>:
test   %edi,%edi
je     1117 <get_list+0x7>
xor    %eax,%eax
ret
xor    %eax,%eax
jmp    1030 <list0@plt>

LLVM IR (-O0):
%struct.ListNode = type { i32 }
define %struct.ListNode* @get_list(i32 %0) {
%2 = alloca %struct.ListNode*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call %struct.ListNode* (...) @list0()
store %struct.ListNode* %7, %struct.ListNode** %2
br label %9
8: ; preds = %1
store %struct.ListNode* null, %struct.ListNode** %2
br label %9
9: ; preds = %8, %6
%10 = load %struct.ListNode*, %struct.ListNode** %2
ret %struct.ListNode* %10
}

LLVM IR (-O2):
%struct.ListNode = type { i32 }
define %struct.ListNode* @get_list(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call %struct.ListNode* (...) @list0()
br label %5
5: ; preds = %1, %3
%6 = phi %struct.ListNode* [ %4, %3 ], [ null, %1 ]
ret %struct.ListNode* %6
}
/* Variables and functions */
int /*<<< orphan*/ cgincstat(char *, int, int);
void cgincsw(int a) { cgincstat("add", a, 1); }


x86 assembly (clang, -O0):
<cgincsw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
mov    $0x1,%edx
call   1030 <cgincstat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgincsw>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
mov    $0x1,%edx
jmp    1030 <cgincstat@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"add\00"
define void @cgincsw(i32 %0) {
%2 = tail call i32 @cgincstat(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0, i32 1)
ret void
}
void bpf__clear(void) {}


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

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

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

LLVM IR (-O2):
define void @bpf__clear() {
ret void
}
unsigned short vdp22_set_qos(unsigned short x) { return (x & 0xf) << 12; }


x86 assembly (clang, -O0):
<vdp22_set_qos>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xf,%eax
shl    $0xc,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vdp22_set_qos>:
mov    %edi,%eax
shl    $0xc,%eax
ret

LLVM IR (-O0):
define zeroext i16 @vdp22_set_qos(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 15
%6 = shl i32 %5, 12
%7 = trunc i32 %6 to i16
ret i16 %7
}

LLVM IR (-O2):
define zeroext i16 @vdp22_set_qos(i16 zeroext %0) {
%2 = shl i16 %0, 12
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ Rand(unsigned int *);
float log(int /*<<< orphan*/);
double Expent(unsigned *pseed, float ta) {
  double temp;
  unsigned temp1;
  temp1 = *pseed;
  temp = -ta * log(Rand(&temp1));
  *pseed = temp1;
  return (temp);
}


x86 assembly (clang, -O0):
<Expent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x20(%rbp)
lea    -0x1c(%rbp),%rdi
call   1040 <Rand@plt>
mov    %eax,%edi
call   1030 <log@plt>
movaps %xmm0,%xmm1
movss  -0x20(%rbp),%xmm0
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x1c(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Expent>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
mov    (%rdi),%eax
mov    %eax,0xc(%rsp)
xorps  0xecb(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xc(%rsp),%rdi
call   1040 <Rand@plt>
mov    %eax,%edi
call   1030 <log@plt>
mulss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0xc(%rsp),%eax
mov    %eax,(%rbx)
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @Expent(i32* %0, float %1) {
%3 = alloca i32*
%4 = alloca float
%5 = alloca double
%6 = alloca i32
store i32* %0, i32** %3
store float %1, float* %4
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
store i32 %8, i32* %6
%9 = load float, float* %4
%10 = fneg float %9
%11 = call i32 @Rand(i32* %6)
%12 = call float @log(i32 %11)
%13 = fmul float %10, %12
%14 = fpext float %13 to double
store double %14, double* %5
%15 = load i32, i32* %6
%16 = load i32*, i32** %3
store i32 %15, i32* %16
%17 = load double, double* %5
ret double %17
}

LLVM IR (-O2):
define double @Expent(i32* nocapture %0, float %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = load i32, i32* %0
store i32 %5, i32* %3
%6 = fneg float %1
%7 = call i32 @Rand(i32* %3)
%8 = call float @log(i32 %7)
%9 = fmul float %8, %6
%10 = fpext float %9 to double
%11 = load i32, i32* %3
store i32 %11, i32* %0
ret double %10
}
/* Variables and functions */
scalar_t__ ifchwrite(char *, int /*<<< orphan*/);
int /*<<< orphan*/ snprintf(char *, int, char *);
int /*<<< orphan*/ strlen(char *);
bool carrier_isup(void) {
  char buf[256];
  snprintf(buf, sizeof buf, "carrier:;");
  return ifchwrite(buf, strlen(buf)) == 0;
}


x86 assembly (clang, -O0):
<carrier_isup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
lea    -0x100(%rbp),%rdi
mov    $0x100,%esi
lea    0xeb2(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x100(%rbp),%rax
mov    %rax,-0x108(%rbp)
lea    -0x100(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x108(%rbp),%rdi
mov    %eax,%esi
call   1050 <ifchwrite@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<carrier_isup>:
push   %rbx
sub    $0x100,%rsp
lea    0xec1(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <ifchwrite@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"carrier:;\00"
define i32 @carrier_isup() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @snprintf(i8* %2, i32 256, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%6 = call i32 @strlen(i8* %5)
%7 = call i64 @ifchwrite(i8* %4, i32 %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@.str = [10 x i8] c"carrier:;\00"
define i32 @carrier_isup() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @snprintf(i8* %2, i32 256, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @strlen(i8* %2)
%5 = call i64 @ifchwrite(i8* %2, i32 %4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ _eprintf_exit(int, int, int, char *, char *);
int camio_options_tail(char *description) {
  _eprintf_exit(0x00, 0x0A, 63,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/mgrosvenor/camio1.0/refs/"
                "heads/master/options/camio_options.c",
                "");
  return 0;
}


x86 assembly (clang, -O0):
<camio_options_tail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
mov    $0xa,%esi
mov    $0x3f,%edx
lea    0xed1(%rip),%rcx
lea    0xf61(%rip),%r8
call   1030 <_eprintf_exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<camio_options_tail>:
push   %rax
lea    0xee8(%rip),%rcx
lea    0xf78(%rip),%r8
xor    %edi,%edi
mov    $0xa,%esi
mov    $0x3f,%edx
call   1030 <_eprintf_exit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/mgrosvenor/camio1.0/refs/heads/master/options/camio_options.c\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @camio_options_tail(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @_eprintf_exit(i32 0, i32 10, i32 63, i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/mgrosvenor/camio1.0/refs/heads/master/options/camio_options.c\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @camio_options_tail(i8* nocapture readnone %0) {
%2 = tail call i32 @_eprintf_exit(i32 0, i32 10, i32 63, i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int mkdir(char const *, int);
int _mkdir(const char *dirname) { return mkdir(dirname, 0755); }


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

x86 assembly (clang, -O2):
<_mkdir>:
mov    $0x1ed,%esi
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define i32 @_mkdir(i8* nocapture %0) {
%2 = tail call i32 @mkdir(i8* %0, i32 493)
ret i32 %2
}
/* Variables and functions */
char const *libhaiku_generic();
const char *libhaiku_strerror(int errnum, int *genericp) {
  if (genericp)
    *genericp = 0;
  switch (errnum) {
  default:
    if (genericp)
      *genericp = 1;
    return libhaiku_generic();
  }
}


x86 assembly (clang, -O0):
<libhaiku_strerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1134 <libhaiku_strerror+0x24>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     1149 <libhaiku_strerror+0x39>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    $0x0,%al
call   1030 <libhaiku_generic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libhaiku_strerror>:
test   %rsi,%rsi
je     111b <libhaiku_strerror+0xb>
movl   $0x1,(%rsi)
xor    %eax,%eax
jmp    1030 <libhaiku_generic@plt>

LLVM IR (-O0):
define i8* @libhaiku_strerror(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i32*, i32** %4
store i32 0, i32* %8
br label %9
9: ; preds = %7, %2
%10 = load i32, i32* %3
switch i32 %10, label %11 [
]
11: ; preds = %9
%12 = load i32*, i32** %4
%13 = icmp ne i32* %12, null
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = load i32*, i32** %4
store i32 1, i32* %15
br label %16
16: ; preds = %14, %11
%17 = call i8* (...) @libhaiku_generic()
ret i8* %17
}

LLVM IR (-O2):
define i8* @libhaiku_strerror(i32 %0, i32* writeonly %1) {
%3 = icmp eq i32* %1, null
br i1 %3, label %5, label %4
4: ; preds = %2
store i32 1, i32* %1
br label %5
5: ; preds = %2, %4
%6 = tail call i8* (...) @libhaiku_generic()
ret i8* %6
}
int elfstore_size() { return 0x800; }


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

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

LLVM IR (-O0):
define i32 @elfstore_size() {
ret i32 2048
}

LLVM IR (-O2):
define i32 @elfstore_size() {
ret i32 2048
}
int *fx(int *a, int sz) {
  int *b = a + sz;
  b = b - sz;
  return b;
}


x86 assembly (clang, -O0):
<fx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32* @fx(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32*
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %6, i64 %8
store i32* %9, i32** %5
%10 = load i32*, i32** %5
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = sub i64 0, %12
%14 = getelementptr inbounds i32, i32* %10, i64 %13
store i32* %14, i32** %5
%15 = load i32*, i32** %5
ret i32* %15
}

LLVM IR (-O2):
define i32* @fx(i32* readnone returned %0, i32 %1) {
ret i32* %0
}
void consume_separator(char **s) {
  while (**s == ',' || **s == ' ')
    (*s)++;
}


x86 assembly (clang, -O0):
<consume_separator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x2c,%ecx
mov    %al,-0x9(%rbp)
je     1133 <consume_separator+0x33>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1143 <consume_separator+0x43>
jmp    1156 <consume_separator+0x56>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1108 <consume_separator+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<consume_separator>:
mov    (%rdi),%rax
jmp    1113 <consume_separator+0x13>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rax,(%rdi)
add    $0x1,%rax
movzbl -0x1(%rax),%ecx
cmp    $0x2c,%cl
je     1110 <consume_separator+0x10>
cmp    $0x20,%cl
je     1110 <consume_separator+0x10>
ret

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

LLVM IR (-O2):
define void @consume_separator(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %6, %1
%4 = phi i8* [ %7, %6 ], [ %2, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %8 [
i8 44, label %6
i8 32, label %6
]
6: ; preds = %3, %3
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %7, i8** %0
br label %3
8: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ calcc(char *);
int main(void) {
  calcc("asdf");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = tail call i32 @calcc(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int reallySend(int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int sendString(int fd, char *msg) { return reallySend(fd, msg, strlen(msg)); }


x86 assembly (clang, -O0):
<sendString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <reallySend@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendString>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <reallySend@plt>

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

LLVM IR (-O2):
define i32 @sendString(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @reallySend(i32 %0, i8* %1, i32 %3)
ret i32 %4
}
unsigned int mpeg2_detect_accel(void) {
  unsigned int accel;
  accel = 0;
  return accel;
}


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

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

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

LLVM IR (-O2):
define i32 @mpeg2_detect_accel() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x4e() {
  Assert_real((iscntrl(78) == 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_iscntrl.c",
              395, ("iscntrl should be 0 for N"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x4e>:
push   %rax
mov    $0x4e,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x18b,%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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for N\00"
define void @t_iscntrl_0x4e() {
%1 = call i64 @iscntrl(i32 78)
%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 395, 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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for N\00"
define void @t_iscntrl_0x4e() {
%1 = tail call i64 @iscntrl(i32 78)
%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 395, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, char *);
void function_urole(char *urole) {
  write("json-task.json", "\"role\":\"%s\" ", urole);
}


x86 assembly (clang, -O0):
<function_urole>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xee1(%rip),%rsi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_urole>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"json-task.json\00"
@.str.1 = [13 x i8] c"\22role\22:\22%s\22 \00"
define void @function_urole(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @write(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"json-task.json\00"
@.str.1 = [13 x i8] c"\22role\22:\22%s\22 \00"
define void @function_urole(i8* %0) {
%2 = tail call i32 @write(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usbhid_remove_all_dquirks();
void usbhid_quirks_exit(void) { usbhid_remove_all_dquirks(); }


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

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

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

LLVM IR (-O2):
define void @usbhid_quirks_exit() {
%1 = tail call i32 (...) @usbhid_remove_all_dquirks()
ret void
}
const char *Creator_createGeneralStructs(struct Creator *self) {
  const char *structs = "struct Class\n"
                        "{\n"
                        "\tchar*	className;\n"
                        "\tvoid*	classId;\n"
                        "};\n"
                        "struct Instance\n"
                        "{\n"
                        "\tstruct Class*	_class;\n"
                        "\tvoid**	_components;\n"
                        "};\n";
  return structs;
}


x86 assembly (clang, -O0):
<Creator_createGeneralStructs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.Creator = type opaque
@.str = [118 x i8] c"struct Class\0A{\0A\09char*\09className;\0A\09void*\09classId;\0A};\0Astruct Instance\0A{\0A\09struct Class*\09_class;\0A\09void**\09_components;\0A};\0A\00"
define i8* @Creator_createGeneralStructs(%struct.Creator* %0) {
%2 = alloca %struct.Creator*
%3 = alloca i8*
store %struct.Creator* %0, %struct.Creator** %2
store i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %3
ret i8* %4
}

LLVM IR (-O2):
%struct.Creator = type opaque
@.str = [118 x i8] c"struct Class\0A{\0A\09char*\09className;\0A\09void*\09classId;\0A};\0Astruct Instance\0A{\0A\09struct Class*\09_class;\0A\09void**\09_components;\0A};\0A\00"
define i8* @Creator_createGeneralStructs(%struct.Creator* nocapture readnone %0) {
ret i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void print(const char *data, size_t data_length) {
  for (size_t i = 0; i < data_length; i++) {
    putchar((int)((const unsigned char *)data)[i]);
  }
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1158 <print+0x48>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movzbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <print+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     1143 <print+0x33>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%r14,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <print+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @print(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %5
4: ; preds = %5, %2
ret void
5: ; preds = %2, %5
%6 = phi i64 [ %11, %5 ], [ 0, %2 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = tail call i32 @putchar(i32 %9)
%11 = add nuw i64 %6, 1
%12 = icmp eq i64 %11, %1
br i1 %12, label %4, label %5
}
/* Variables and functions */
size_t grow_size(const size_t size, const size_t min) {
  size_t newsize = size;
  while (newsize < min) {
    newsize *= 2;
  }
  return newsize;
}


x86 assembly (clang, -O0):
<grow_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1133 <grow_size+0x33>
mov    -0x18(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <grow_size+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<grow_size>:
mov    %rdi,%rax
add    %rdi,%rdi
cmp    %rsi,%rax
jb     1100 <grow_size>
ret

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

LLVM IR (-O2):
define i64 @grow_size(i64 %0, i64 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %0, %2 ], [ %6, %3 ]
%5 = icmp ult i64 %4, %1
%6 = shl i64 %4, 1
br i1 %5, label %3, label %7
7: ; preds = %3
ret i64 %4
}
void ff_hevc_put_hevc_uni_qpel_h32_8_avx2() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ BUFSIZ;
int /*<<< orphan*/ _IOFBF;
int /*<<< orphan*/ _IONBF;
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/,
                           int /*<<< orphan*/);
void setbuf(FILE *f, char *buf) {
  setvbuf(f, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
}


x86 assembly (clang, -O0):
<setbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114c <setbuf+0x3c>
mov    0x2e8e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
jmp    1158 <setbuf+0x48>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%edx
mov    0x2e6e(%rip),%rax
mov    (%rax),%ecx
call   1030 <setvbuf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbuf>:
test   %rsi,%rsi
jne    111e <setbuf+0xe>
mov    0x2ecc(%rip),%rax
jmp    1125 <setbuf+0x15>
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
mov    0x2eaa(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <setvbuf@plt>

LLVM IR (-O0):
@_IOFBF = global i32 0
@_IONBF = global i32 0
@BUFSIZ = global i32 0
define void @setbuf(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 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* @_IOFBF
br label %13
11: ; preds = %2
%12 = load i32, i32* @_IONBF
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
%15 = load i32, i32* @BUFSIZ
%16 = call i32 @setvbuf(i32* %5, i8* %6, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
@_IOFBF = global i32 0
@_IONBF = global i32 0
@BUFSIZ = global i32 0
define void @setbuf(i32* nocapture %0, i8* %1) {
%3 = icmp eq i8* %1, null
%4 = load i32, i32* @_IOFBF
%5 = load i32, i32* @_IONBF
%6 = select i1 %3, i32 %5, i32 %4
%7 = load i32, i32* @BUFSIZ
%8 = tail call i32 @setvbuf(i32* %0, i8* %1, i32 %6, i32 %7)
ret void
}
float bytesToFloat(char *bytes) {
  float *aPointFloat;
  aPointFloat = (float *)bytes;
  return *aPointFloat;
}


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

x86 assembly (clang, -O2):
<bytesToFloat>:
movss  (%rdi),%xmm0
ret

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

LLVM IR (-O2):
define float @bytesToFloat(i8* nocapture %0) {
%2 = bitcast i8* %0 to float*
%3 = load float, float* %2
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_14403() {
  Assert_real((isqrt(14403) == 120),
              "/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",
              1585, ("Integer square root of 14403 should be 120"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_14403>:
push   %rax
mov    $0x3843,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x78,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x631,%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 = [43 x i8] c"Integer square root of 14403 should be 120\00"
define void @t_sqrt_14403() {
%1 = call i32 @isqrt(i32 14403)
%2 = icmp eq i32 %1, 120
%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 1585, i8* getelementptr inbounds ([43 x i8], [43 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 = [43 x i8] c"Integer square root of 14403 should be 120\00"
define void @t_sqrt_14403() {
%1 = tail call i32 @isqrt(i32 14403)
%2 = icmp eq i32 %1, 120
%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 1585, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct tm {
  int dummy;
};

/* Variables and functions */
size_t strlcpy(char *, char *, size_t);
size_t strftime(char *s, size_t max, const char *fmt, const struct tm *tm) {
  return strlcpy(s, "(stubbed)", max);
}


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

x86 assembly (clang, -O2):
<strftime>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <strlcpy@plt>

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [10 x i8] c"(stubbed)\00"
define i64 @strftime(i8* %0, i64 %1, i8* %2, %struct.tm* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca %struct.tm*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store %struct.tm* %3, %struct.tm** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i64 @strlcpy(i8* %9, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64 %10)
ret i64 %11
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [10 x i8] c"(stubbed)\00"
define i64 @strftime(i8* %0, i64 %1, i8* nocapture readnone %2, %struct.tm* nocapture readnone %3) {
%5 = tail call i64 @strlcpy(i8* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64 %1)
ret i64 %5
}
/* Type definitions */
struct linear_buffer {
  int dummy;
};

/* Variables and functions */
float *linear_buffer_alloc(struct linear_buffer *, int);
float *linear_buffer_alloc_float(struct linear_buffer *buf, int n) {
  return linear_buffer_alloc(buf, n * sizeof(float));
}


x86 assembly (clang, -O0):
<linear_buffer_alloc_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%esi
call   1030 <linear_buffer_alloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linear_buffer_alloc_float>:
shl    $0x2,%esi
jmp    1030 <linear_buffer_alloc@plt>

LLVM IR (-O0):
%struct.linear_buffer = type { i32 }
define float* @linear_buffer_alloc_float(%struct.linear_buffer* %0, i32 %1) {
%3 = alloca %struct.linear_buffer*
%4 = alloca i32
store %struct.linear_buffer* %0, %struct.linear_buffer** %3
store i32 %1, i32* %4
%5 = load %struct.linear_buffer*, %struct.linear_buffer** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 4
%9 = trunc i64 %8 to i32
%10 = call float* @linear_buffer_alloc(%struct.linear_buffer* %5, i32 %9)
ret float* %10
}

LLVM IR (-O2):
%struct.linear_buffer = type { i32 }
define float* @linear_buffer_alloc_float(%struct.linear_buffer* %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call float* @linear_buffer_alloc(%struct.linear_buffer* %0, i32 %3)
ret float* %4
}
int is_space(char c) {
  return (c == ' ' || c == '\t' || c == '\r' || c == '\n');
}


x86 assembly (clang, -O0):
<is_space>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_space+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_space+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_space+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_space>:
cmp    $0x20,%dil
ja     1120 <is_space+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100002200,%rdx
bt     %rcx,%rdx
jae    1120 <is_space+0x20>
ret
xor    %eax,%eax
cmp    $0xa,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_space(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 32
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 9
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 13
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 10
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @is_space(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 13, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 10
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ computed_jump(int /*<<< orphan*/, int);
void op_ongotop() { computed_jump(0, 1); }


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

x86 assembly (clang, -O2):
<op_ongotop>:
xor    %edi,%edi
mov    $0x1,%esi
jmp    1030 <computed_jump@plt>

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

LLVM IR (-O2):
define void @op_ongotop() {
%1 = tail call i32 @computed_jump(i32 0, i32 1)
ret void
}
void w5(void *x, double y) { *(double *)(x + 32763) = y; }


x86 assembly (clang, -O0):
<w5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x7ffb(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<w5>:
movsd  %xmm0,0x7ffb(%rdi)
ret

LLVM IR (-O0):
define void @w5(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 32763
%8 = bitcast i8* %7 to double*
store double %5, double* %8
ret void
}

LLVM IR (-O2):
define void @w5(i8* nocapture writeonly %0, double %1) {
%3 = getelementptr i8, i8* %0, i64 32763
%4 = bitcast i8* %3 to double*
store double %1, double* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ leaf();
void breakme(int line) {
  if (line > 1000)
    leaf();
}


x86 assembly (clang, -O0):
<breakme>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x3e8,-0x4(%rbp)
jle    112f <breakme+0x1f>
mov    $0x0,%al
call   1030 <leaf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<breakme>:
cmp    $0x3e9,%edi
jl     111f <breakme+0xf>
xor    %eax,%eax
jmp    1030 <leaf@plt>
ret

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

LLVM IR (-O2):
define void @breakme(i32 %0) {
%2 = icmp sgt i32 %0, 1000
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @leaf()
br label %5
5: ; preds = %3, %1
ret void
}
void hllc_flux(double primL[], double primR[], double F[], int nq, double x[2],
               int dir, struct parList *pars) {}


x86 assembly (clang, -O0):
<hllc_flux>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.parList = type opaque
define void @hllc_flux(double* %0, double* %1, double* %2, i32 %3, double* %4, i32 %5, %struct.parList* %6) {
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca i32
%12 = alloca double*
%13 = alloca i32
%14 = alloca %struct.parList*
store double* %0, double** %8
store double* %1, double** %9
store double* %2, double** %10
store i32 %3, i32* %11
store double* %4, double** %12
store i32 %5, i32* %13
store %struct.parList* %6, %struct.parList** %14
ret void
}

LLVM IR (-O2):
%struct.parList = type opaque
define void @hllc_flux(double* nocapture %0, double* nocapture %1, double* nocapture %2, i32 %3, double* nocapture %4, i32 %5, %struct.parList* nocapture %6) {
ret void
}
/* Variables and functions */
int getpid();
int app_getAppID() {
  int pid = getpid();
  return pid;
}


x86 assembly (clang, -O0):
<app_getAppID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @app_getAppID() {
%1 = alloca i32
%2 = call i32 (...) @getpid()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @app_getAppID() {
%1 = tail call i32 (...) @getpid()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ dnrm2sub(int const *, double const *, int const *, double *);
double c_dnrm2(const int N, const double *X, const int stride) {
  double nrm2;
  dnrm2sub(&N, X, &stride, &nrm2);
  return nrm2;
}


x86 assembly (clang, -O0):
<c_dnrm2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x4(%rbp),%rdi
lea    -0x14(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1030 <dnrm2sub@plt>
movsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_dnrm2>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
mov    %edx,0x8(%rsp)
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1030 <dnrm2sub@plt>
movsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @c_dnrm2(i32 %0, double* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store i32 %0, i32* %4
store i32 %2, i32* %5
%7 = bitcast double* %6 to i8*
%8 = call i32 @dnrm2sub(i32* %4, double* %1, i32* %5, double* %6)
%9 = load double, double* %6
ret double %9
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void ComparatorIntClear(uint32_t ui32Base, uint32_t ui32Comp) {
  ;
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000000))) = 1 << ui32Comp;
}


x86 assembly (clang, -O0):
<ComparatorIntClear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    -0x4(%rbp),%eax
add    $0x0,%eax
cltq
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ComparatorIntClear>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
movslq %edi,%rcx
mov    %rax,(%rcx)
ret

LLVM IR (-O0):
define void @ComparatorIntClear(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 1, %5
%7 = sext i32 %6 to i64
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 0
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i64*
store volatile i64 %7, i64* %11
ret void
}

LLVM IR (-O2):
define void @ComparatorIntClear(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = sext i32 %3 to i64
%5 = sext i32 %0 to i64
%6 = inttoptr i64 %5 to i64*
store volatile i64 %4, i64* %6
ret void
}
/* Variables and functions */
char *malloc(int);
int main() {
  char *x = malloc(10);
  x[10] = 'a';
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x61,0xa(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @malloc(i32 10)
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 10
store i8 97, i8* %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
unsigned long XCurses_get_key_modifiers();
unsigned long PDC_get_key_modifiers() { return (XCurses_get_key_modifiers()); }


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

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

LLVM IR (-O0):
define i64 @PDC_get_key_modifiers() {
%1 = call i64 (...) @XCurses_get_key_modifiers()
ret i64 %1
}

LLVM IR (-O2):
define i64 @PDC_get_key_modifiers() {
%1 = tail call i64 (...) @XCurses_get_key_modifiers()
ret i64 %1
}
/* Variables and functions */
int f404(int *);
int f405(int *p) { return f404(p); }


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

x86 assembly (clang, -O2):
<f405>:
jmp    1030 <f404@plt>

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

LLVM IR (-O2):
define i32 @f405(i32* %0) {
%2 = tail call i32 @f404(i32* %0)
ret i32 %2
}