xunge/DecIR huggingface dataset:
int sw32(int v) {
  return ((v & 0xFF) << 24) | ((v & 0xFF00) << 8) | ((v & 0xFF0000) >> 8) |
         ((v & 0xFF000000) >> 24);
}


x86 assembly (clang, -O0):
<sw32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sw32>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @sw32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 24
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 16711680
%12 = ashr i32 %11, 8
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = and i32 %14, -16777216
%16 = lshr i32 %15, 24
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @sw32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ baz();
int /*<<< orphan*/ foo();
int main(int argc, char **argv) {
  foo();
  bar();
  baz();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @foo()
%4 = tail call i32 (...) @bar()
%5 = tail call i32 (...) @baz()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
void printChildId(char *s, int id) { fprintf(stderr, "%s \t$$ %d\n", s, id); }


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

x86 assembly (clang, -O2):
<printChildId>:
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"%s \09$$ %d\0A\00"
define void @printChildId(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"%s \09$$ %d\0A\00"
define void @printChildId(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  char dashes;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
void set_XGCValues_dashes(void *_p, char _v) {
  ((XGCValues *)_p)->dashes = (char)_v;
}


x86 assembly (clang, -O0):
<set_XGCValues_dashes>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XGCValues_dashes>:
mov    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XGCValues_dashes(i8* nocapture writeonly %0, i8 signext %1) {
store i8 %1, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setNoiseSeed(unsigned long, unsigned long);
void fgeneric_noiseseed(unsigned long seed) {
  seed = seed % 1000000000;
  setNoiseSeed(seed, seed);
}


x86 assembly (clang, -O0):
<fgeneric_noiseseed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3b9aca00,%ecx
xor    %edx,%edx
div    %rcx
mov    %rdx,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <setNoiseSeed@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgeneric_noiseseed>:
mov    %rdi,%rax
shr    $0x9,%rax
movabs $0x44b82fa09b5a53,%rcx
mul    %rcx
shr    $0xb,%rdx
imul   $0x3b9aca00,%rdx,%rax
sub    %rax,%rdi
mov    %rdi,%rsi
jmp    1030 <setNoiseSeed@plt>

LLVM IR (-O0):
define void @fgeneric_noiseseed(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = urem i64 %3, 1000000000
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = load i64, i64* %2
%7 = call i32 @setNoiseSeed(i64 %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @fgeneric_noiseseed(i64 %0) {
%2 = urem i64 %0, 1000000000
%3 = tail call i32 @setNoiseSeed(i64 %2, i64 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void set_layer_addr(uint32_t addr[8], uint32_t layer) { addr[0] = layer; }


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

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

LLVM IR (-O0):
define void @set_layer_addr(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 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @set_layer_addr(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
float sqrtf(float x) {
  __asm__("sqrtss %1, %0" : "=x"(x) : "x"(x));
  return x;
}


x86 assembly (clang, -O0):
<sqrtf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
sqrtss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrtf>:
sqrtss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @sqrtf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float asm "sqrtss $1, $0", "=x,x,~{dirflag},~{fpsr},~{flags}"(float %3)
store float %4, float* %2
%5 = load float, float* %2
ret float %5
}

LLVM IR (-O2):
define float @sqrtf(float %0) {
%2 = tail call float asm "sqrtss $1, $0", "=x,x,~{dirflag},~{fpsr},~{flags}"(float %0)
ret float %2
}
void f5(char ***bar) {
  volatile const char ***p9 = (volatile const char ***)bar;
  volatile char *const **p11 = (volatile char *const **)bar;
  volatile char **const *p13 = (volatile char **const *)bar;
  volatile const char *const **p15 = (volatile const char *const **)bar;
  volatile const char **const *p17 = (volatile const char **const *)bar;
  volatile char *const *const *p19 = (volatile char *const *const *)bar;
  volatile const char *const *const *p21 =
      (volatile const char *const *const *)bar;
}


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f5(i8*** %0) {
%2 = alloca i8***
%3 = alloca i8***
%4 = alloca i8***
%5 = alloca i8***
%6 = alloca i8***
%7 = alloca i8***
%8 = alloca i8***
%9 = alloca i8***
store i8*** %0, i8**** %2
%10 = load i8***, i8**** %2
store i8*** %10, i8**** %3
%11 = load i8***, i8**** %2
store i8*** %11, i8**** %4
%12 = load i8***, i8**** %2
store i8*** %12, i8**** %5
%13 = load i8***, i8**** %2
store i8*** %13, i8**** %6
%14 = load i8***, i8**** %2
store i8*** %14, i8**** %7
%15 = load i8***, i8**** %2
store i8*** %15, i8**** %8
%16 = load i8***, i8**** %2
store i8*** %16, i8**** %9
ret void
}

LLVM IR (-O2):
define void @f5(i8*** nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ insort_long(long *, int);
int /*<<< orphan*/ partial_quickersort_long(long *, int /*<<< orphan*/, int);
void _sedgesort_long(long *array, int len) {
  partial_quickersort_long(array, 0, len - 1);
  insort_long(array, len);
}


x86 assembly (clang, -O0):
<_sedgesort_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1040 <partial_quickersort_long@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <insort_long@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sedgesort_long>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %rdi,%rbx
lea    -0x1(%r14),%edx
xor    %esi,%esi
call   1040 <partial_quickersort_long@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <insort_long@plt>

LLVM IR (-O0):
define void @_sedgesort_long(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i64*, i64** %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 1
%8 = call i32 @partial_quickersort_long(i64* %5, i32 0, i32 %7)
%9 = load i64*, i64** %3
%10 = load i32, i32* %4
%11 = call i32 @insort_long(i64* %9, i32 %10)
ret void
}

LLVM IR (-O2):
define void @_sedgesort_long(i64* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @partial_quickersort_long(i64* %0, i32 0, i32 %3)
%5 = tail call i32 @insort_long(i64* %0, i32 %1)
ret void
}
void XSyncCreateAlarm() {}


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

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

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

LLVM IR (-O2):
define void @XSyncCreateAlarm() {
ret void
}
unsigned long int cast_int_ulong_fast(int x) { return (unsigned long int)x; }


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

x86 assembly (clang, -O2):
<cast_int_ulong_fast>:
movslq %edi,%rax
ret

LLVM IR (-O0):
define i64 @cast_int_ulong_fast(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
ret i64 %4
}

LLVM IR (-O2):
define i64 @cast_int_ulong_fast(i32 %0) {
%2 = sext i32 %0 to i64
ret i64 %2
}
void addReplyError(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               24, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<addReplyError>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x18,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<addReplyError>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x18,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.addReplyError = [14 x i8] c"addReplyError\00"
define void @addReplyError() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 24, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.addReplyError, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.addReplyError = [14 x i8] c"addReplyError\00"
define void @addReplyError() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 24, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.addReplyError, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t tms_rcv_msg(int fd, uint8_t *msg, int32_t n) { return 0; }


x86 assembly (clang, -O0):
<tms_rcv_msg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @tms_rcv_msg(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @tms_rcv_msg(i32 %0, i32* nocapture readnone %1, i32 %2) {
ret i32 0
}
void g_hook_find() {}


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

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

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

LLVM IR (-O2):
define void @g_hook_find() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void myPrintHelloMake(void) {
  printf("Hello makefiles!\n");
  printf("This is my first git prgm");
  return;
}


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

x86 assembly (clang, -O2):
<myPrintHelloMake>:
push   %rax
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Hello makefiles!\0A\00"
@.str.1 = [26 x i8] c"This is my first git prgm\00"
define void @myPrintHelloMake() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [26 x i8] c"This is my first git prgm\00"
@str = [17 x i8] c"Hello makefiles!\00"
define void @myPrintHelloMake() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t getpagesize(void) { return 1024 * sizeof(long); }


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

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

LLVM IR (-O0):
define i64 @getpagesize() {
ret i64 8192
}

LLVM IR (-O2):
define i64 @getpagesize() {
ret i64 8192
}
/* Variables and functions */
int close(int);
int ffmemless_evdev_file_close(int file) { return close(file); }


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

x86 assembly (clang, -O2):
<ffmemless_evdev_file_close>:
jmp    1030 <close@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void yuv2rgb(uint8_t *image, uint8_t *py, uint8_t *pu, uint8_t *pv,
             unsigned h_size, unsigned v_size, int rgb_stride, int y_stride,
             int uv_stride) {
  printf("broken, this should use the swscaler\n");
}


x86 assembly (clang, -O0):
<yuv2rgb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [38 x i8] c"broken, this should use the swscaler\0A\00"
define void @yuv2rgb(i32* %0, i32* %1, i32* %2, i32* %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32* %0, i32** %10
store i32* %1, i32** %11
store i32* %2, i32** %12
store i32* %3, i32** %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%19 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [37 x i8] c"broken, this should use the swscaler\00"
define void @yuv2rgb(i32* nocapture readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2, i32* nocapture readnone %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret void
}
void align_except() {}


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

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

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

LLVM IR (-O2):
define void @align_except() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mkdir(char *, int);
void init_userData() { mkdir("./plugins", 0755); }


x86 assembly (clang, -O0):
<init_userData>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1ed,%esi
call   1030 <mkdir@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_userData>:
lea    0xee9(%rip),%rdi
mov    $0x1ed,%esi
jmp    1030 <mkdir@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"./plugins\00"
define void @init_userData() {
%1 = call i32 @mkdir(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 493)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"./plugins\00"
define void @init_userData() {
%1 = tail call i32 @mkdir(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 493)
ret void
}
void str11() {
  const char str[3] = "abc";
  const char *x[10];
  x[3] = "def";
}


x86 assembly (clang, -O0):
<str11>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%ax
mov    %ax,-0x3(%rbp)
mov    0xeed(%rip),%al
mov    %al,-0x1(%rbp)
lea    0xee4(%rip),%rax
mov    %rax,-0x48(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.str11.str = [3 x i8] c"abc"
@.str = [4 x i8] c"def\00"
define void @str11() {
%1 = alloca [3 x i8]
%2 = alloca [10 x i8*]
%3 = bitcast [3 x i8]* %1 to i8*
%4 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 3
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %4
ret void
}

LLVM IR (-O2):
define void @str11() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WRITE_REG8(unsigned long, unsigned char);
void gfx_write_reg8(unsigned long offset, unsigned char value) {
  WRITE_REG8(offset, value);
}


x86 assembly (clang, -O0):
<gfx_write_reg8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
movzbl -0x9(%rbp),%esi
call   1030 <WRITE_REG8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gfx_write_reg8>:
jmp    1030 <WRITE_REG8@plt>

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

LLVM IR (-O2):
define void @gfx_write_reg8(i64 %0, i8 zeroext %1) {
%3 = tail call i32 @WRITE_REG8(i64 %0, i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void kfree(void *p) { free(p); }


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

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

LLVM IR (-O2):
define void @kfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void main() {
  double fenzi = 2;
  double fenmu = 1;
  double sum = 0;
  double temp = 0;
  for (int i = 1; i <= 20; i++) {
    sum = sum + fenzi / fenmu;
    temp = fenzi;
    fenzi = fenzi + fenmu;
    fenmu = temp;
  }
  printf("%f\n", sum);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x1,-0x24(%rbp)
cmpl   $0x14,-0x24(%rbp)
jg     119c <main+0x8c>
movsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
divsd  -0x10(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1149 <main+0x39>
movsd  -0x18(%rbp),%xmm0
lea    0xe68(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xef1(%rip),%rdi
movsd  0xee1(%rip),%xmm0
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define void @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca i32
store double 2.000000e+00, double* %1
store double 1.000000e+00, double* %2
store double 0.000000e+00, double* %3
store double 0.000000e+00, double* %4
store i32 1, i32* %5
br label %6
6: ; preds = %20, %0
%7 = load i32, i32* %5
%8 = icmp sle i32 %7, 20
br i1 %8, label %9, label %23
9: ; preds = %6
%10 = load double, double* %3
%11 = load double, double* %1
%12 = load double, double* %2
%13 = fdiv double %11, %12
%14 = fadd double %10, %13
store double %14, double* %3
%15 = load double, double* %1
store double %15, double* %4
%16 = load double, double* %1
%17 = load double, double* %2
%18 = fadd double %16, %17
store double %18, double* %1
%19 = load double, double* %4
store double %19, double* %2
br label %20
20: ; preds = %9
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %6
23: ; preds = %6
%24 = load double, double* %3
%25 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %24)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 0x404054836D047F93)
ret void
}
/* Variables and functions */
size_t msgpackclen_msg_buf_read_elem(void *, int /*<<< orphan*/, size_t,
                                     char **);
size_t msgpackclen_buf_read(void *buf, size_t size, char **error) {
  size_t r;
  r = msgpackclen_msg_buf_read_elem(buf, 0, size, error);
  if (r > size)
    return 0;
  return r;
}


x86 assembly (clang, -O0):
<msgpackclen_buf_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %esi,%esi
call   1030 <msgpackclen_msg_buf_read_elem@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    1156 <msgpackclen_buf_read+0x46>
movq   $0x0,-0x8(%rbp)
jmp    115e <msgpackclen_buf_read+0x4e>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msgpackclen_buf_read>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rbx
xor    %r14d,%r14d
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <msgpackclen_msg_buf_read_elem@plt>
cmp    %rbx,%rax
cmova  %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @msgpackclen_buf_read(i8* %0, i64 %1, i8** %2) {
%4 = tail call i64 @msgpackclen_msg_buf_read_elem(i8* %0, i32 0, i64 %1, i8** %2)
%5 = icmp ugt i64 %4, %1
%6 = select i1 %5, i64 0, i64 %4
ret i64 %6
}
void lite_spot(y, x) register int y, x;
{
  if (panel_contains(y, x))
    print(loc_symbol(y, x), y, x);
}


x86 assembly (clang, -O0):
<lite_spot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1030 <panel_contains@plt>
cmp    $0x0,%eax
je     1170 <lite_spot+0x40>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1050 <loc_symbol@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    $0x0,%al
call   1040 <print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lite_spot>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <panel_contains@plt>
test   %eax,%eax
je     1160 <lite_spot+0x30>
mov    %ebp,%edi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <loc_symbol@plt>
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <print@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @lite_spot(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 (i32, i32, ...) bitcast (i32 (...)* @panel_contains to i32 (i32, i32, ...)*)(i32 %5, i32 %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call i32 (i32, i32, ...) bitcast (i32 (...)* @loc_symbol to i32 (i32, i32, ...)*)(i32 %10, i32 %11)
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @print to i32 (i32, i32, i32, ...)*)(i32 %12, i32 %13, i32 %14)
br label %16
16: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
define void @lite_spot(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @panel_contains to i32 (i32, i32, ...)*)(i32 %0, i32 %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @loc_symbol to i32 (i32, i32, ...)*)(i32 %0, i32 %1)
%7 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @print to i32 (i32, i32, i32, ...)*)(i32 %6, i32 %0, i32 %1)
br label %8
8: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_234() {
  Assert_real((isqrt(234) == 15),
              "/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",
              1175, ("Integer square root of 234 should be 15"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_234>:
push   %rax
mov    $0xea,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xf,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x497,%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 = [40 x i8] c"Integer square root of 234 should be 15\00"
define void @t_sqrt_234() {
%1 = call i32 @isqrt(i32 234)
%2 = icmp eq i32 %1, 15
%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 1175, i8* getelementptr inbounds ([40 x i8], [40 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 = [40 x i8] c"Integer square root of 234 should be 15\00"
define void @t_sqrt_234() {
%1 = tail call i32 @isqrt(i32 234)
%2 = icmp eq i32 %1, 15
%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 1175, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void del_node_only(void *the_node_ptr) { the_node_ptr = the_node_ptr; }


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

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

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

LLVM IR (-O2):
define void @del_node_only(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int raid_cpu_match_avx(int, int, int);
int raid_cpu_has_avx2(void) {
  return raid_cpu_match_avx((1 << 27) | (1 << 28), 1 << 5, 3 << 1);
}


x86 assembly (clang, -O0):
<raid_cpu_has_avx2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x18000000,%edi
mov    $0x20,%esi
mov    $0x6,%edx
call   1030 <raid_cpu_match_avx@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<raid_cpu_has_avx2>:
mov    $0x18000000,%edi
mov    $0x20,%esi
mov    $0x6,%edx
jmp    1030 <raid_cpu_match_avx@plt>

LLVM IR (-O0):
define i32 @raid_cpu_has_avx2() {
%1 = call i32 @raid_cpu_match_avx(i32 402653184, i32 32, i32 6)
ret i32 %1
}

LLVM IR (-O2):
define i32 @raid_cpu_has_avx2() {
%1 = tail call i32 @raid_cpu_match_avx(i32 402653184, i32 32, i32 6)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ mtrace();
__attribute__((constructor())) void mtrace_hook() { mtrace(); }


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

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @mtrace_hook, i8* null }]
define void @mtrace_hook() {
%1 = call i32 (...) @mtrace()
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @mtrace_hook, i8* null }]
define void @mtrace_hook() {
%1 = tail call i32 (...) @mtrace()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void obj_A_euFunc(void) {
  printf("This is the euFunc inside %s\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/ceccopierangiolieugenio/"
         "test_attribute.contructor/refs/heads/master/src/obj1.c");
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"This is the euFunc inside %s\0A\00"
@.str.1 = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ceccopierangiolieugenio/test_attribute.contructor/refs/heads/master/src/obj1.c\00"
define void @obj_A_euFunc() {
%1 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"This is the euFunc inside %s\0A\00"
@.str.1 = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ceccopierangiolieugenio/test_attribute.contructor/refs/heads/master/src/obj1.c\00"
define void @obj_A_euFunc() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned int ft_strlen(char *str) {
  unsigned int i;
  i = 0;
  while (str && str[i])
    i++;
  return (i);
}


x86 assembly (clang, -O0):
<ft_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
je     1133 <ft_strlen+0x33>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1143 <ft_strlen+0x43>
jmp    1151 <ft_strlen+0x51>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <ft_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strlen>:
test   %rdi,%rdi
je     111a <ft_strlen+0x1a>
mov    $0xffffffff,%eax
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
cmpb   $0x0,(%rdi,%rax,1)
jne    1110 <ft_strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %9, %3 ], [ 0, %1 ]
%5 = zext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
%9 = add i32 %4, 1
br i1 %8, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %4, %3 ]
ret i32 %11
}
int main(int argc, char **args) {
  (void)argc;
  (void)args;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
scalar_t__ value_as_float(unsigned int);
unsigned int ftoi_func(unsigned int param1, unsigned int param2) {
  (void)param2;
  return (unsigned int)(int)value_as_float(param1);
}


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

x86 assembly (clang, -O2):
<ftoi_func>:
jmp    1030 <value_as_float@plt>

LLVM IR (-O0):
define i32 @ftoi_func(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 = load i32, i32* %3
%7 = call i64 @value_as_float(i32 %6)
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ftoi_func(i32 %0, i32 %1) {
%3 = tail call i64 @value_as_float(i32 %0)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int _binary_search(int *, int /*<<< orphan*/, int, int);
int binary_search(int nums[], int n, int x) {
  return _binary_search(nums, 0, n - 1, x);
}


x86 assembly (clang, -O0):
<binary_search>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
mov    -0x10(%rbp),%ecx
xor    %esi,%esi
call   1030 <_binary_search@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binary_search>:
mov    %edx,%ecx
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <_binary_search@plt>

LLVM IR (-O0):
define i32 @binary_search(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = sub nsw i32 %8, 1
%10 = load i32, i32* %6
%11 = call i32 @_binary_search(i32* %7, i32 0, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @binary_search(i32* %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, -1
%5 = tail call i32 @_binary_search(i32* %0, i32 0, i32 %4, i32 %2)
ret i32 %5
}
/* Type definitions */
struct gengetopt_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ imagetag_cmdline_release(struct gengetopt_args_info *);
void imagetag_cmdline_free(struct gengetopt_args_info *args_info) {
  imagetag_cmdline_release(args_info);
}


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

x86 assembly (clang, -O2):
<imagetag_cmdline_free>:
jmp    1030 <imagetag_cmdline_release@plt>

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

LLVM IR (-O2):
%struct.gengetopt_args_info = type { i32 }
define void @imagetag_cmdline_free(%struct.gengetopt_args_info* %0) {
%2 = tail call i32 @imagetag_cmdline_release(%struct.gengetopt_args_info* %0)
ret void
}
void m_putchar(char c) {}


x86 assembly (clang, -O0):
<m_putchar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @m_putchar(i8 signext %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i = -1;
  int i2 = -2;
  printf("%d", i2 - i2);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void mime_header(char *mime) { printf("Content-type: %s\n\n", mime); }


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

x86 assembly (clang, -O2):
<mime_header>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Content-type: %s\0A\0A\00"
define void @mime_header(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Content-type: %s\0A\0A\00"
define void @mime_header(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
unsigned char getchar();
unsigned char inbyte() { return getchar(); }


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

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

LLVM IR (-O0):
define zeroext i8 @inbyte() {
%1 = call zeroext i8 (...) @getchar()
ret i8 %1
}

LLVM IR (-O2):
define zeroext i8 @inbyte() {
%1 = tail call zeroext i8 (...) @getchar()
ret i8 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void printData(double area) {
  printf("\nEstimated area: %f sq. units\n\n", area);
  return;
}


x86 assembly (clang, -O0):
<printData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [32 x i8] c"\0AEstimated area: %f sq. units\0A\0A\00"
define void @printData(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), double %3)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"\0AEstimated area: %f sq. units\0A\0A\00"
define void @printData(double %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), double %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, int /*<<< orphan*/, int /*<<< orphan*/);
void exit(int process_id) { syscall(2, process_id, 0, 0); }


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x2,%edi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <syscall@plt>

x86 assembly (clang, -O2):
<exit>:
push   %rax
mov    %edi,%esi
mov    $0x2,%edi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <syscall@plt>

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

LLVM IR (-O2):
define void @exit(i32 %0) {
%2 = tail call i32 @syscall(i32 2, i32 %0, i32 0, i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  printf("Dame un número\n");
  scanf("%d", &a);
  printf("Valor: %d \n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
lea    0xebd(%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    0xed7(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xeaa(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Dame un n\C3\BAmero\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [12 x i8] c"Valor: %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [12 x i8] c"Valor: %d \0A\00"
@str = [16 x i8] c"Dame un n\C3\BAmero\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}