xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int FuzzerTestOneInput(int /*<<< orphan*/ const *, size_t);
int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) {
  return FuzzerTestOneInput(buf, len);
}


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

x86 assembly (clang, -O2):
<LLVMFuzzerTestOneInput>:
jmp    1030 <FuzzerTestOneInput@plt>

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

LLVM IR (-O2):
define i32 @LLVMFuzzerTestOneInput(i32* %0, i64 %1) {
%3 = tail call i32 @FuzzerTestOneInput(i32* %0, i64 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
void myskip(FILE *fp) {
  int c;
  while (1) {
    c = fgetc(fp);
    if (c == EOF || c == '\n' || c == '\r')
      return;
  }
  return;
}


x86 assembly (clang, -O0):
<myskip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2eb6(%rip),%rcx
cmp    (%rcx),%eax
je     114e <myskip+0x3e>
cmpl   $0xa,-0xc(%rbp)
je     114e <myskip+0x3e>
cmpl   $0xd,-0xc(%rbp)
jne    1154 <myskip+0x44>
add    $0x10,%rsp
pop    %rbp
ret
jmp    111c <myskip+0xc>

x86 assembly (clang, -O2):
<myskip>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eca(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <fgetc@plt>
cmp    (%r14),%eax
je     1137 <myskip+0x27>
cmp    $0xd,%eax
je     1137 <myskip+0x27>
cmp    $0xa,%eax
jne    1120 <myskip+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @myskip(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
br label %4
4: ; preds = %1, %17
%5 = load i32*, i32** %2
%6 = call i32 @fgetc(i32* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = load i32, i32* @EOF
%9 = icmp eq i32 %7, %8
br i1 %9, label %16, label %10
10: ; preds = %4
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 10
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 13
br i1 %15, label %16, label %17
16: ; preds = %13, %10, %4
ret void
17: ; preds = %13
br label %4
}

LLVM IR (-O2):
@EOF = global i32 0
define void @myskip(i32* nocapture %0) {
br label %2
2: ; preds = %7, %1
%3 = tail call i32 @fgetc(i32* %0)
%4 = load i32, i32* @EOF
%5 = freeze i32 %4
%6 = icmp eq i32 %3, %5
br i1 %6, label %8, label %7
7: ; preds = %2
switch i32 %3, label %2 [
i32 13, label %8
i32 10, label %8
]
8: ; preds = %7, %7, %2
ret void
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
float randomFloat() { return (float)rand() / (float)RAND_MAX; }


x86 assembly (clang, -O0):
<randomFloat>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec1(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomFloat>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec4(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @randomFloat() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to float
%5 = fdiv float %2, %4
ret float %5
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @randomFloat() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to float
%5 = fdiv float %2, %4
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *hoedown_malloc(size_t size) {
  void *ret = malloc(size);
  if (!ret) {
    fprintf(stderr, "Allocation failed.\n");
    abort();
  }
  return ret;
}


x86 assembly (clang, -O0):
<hoedown_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1170 <hoedown_malloc+0x40>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hoedown_malloc>:
push   %rax
call   1050 <malloc@plt>
test   %rax,%rax
je     113d <hoedown_malloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"Allocation failed.\0A\00"
define i8* @hoedown_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"Allocation failed.\0A\00"
define noalias i8* @hoedown_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void dcFreeWX(void *p, size_t size) { free(p); }


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

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

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

LLVM IR (-O2):
define void @dcFreeWX(i8* nocapture %0, i64 %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int tuner_i2c_read(void *, unsigned short, unsigned char, int, unsigned char *,
                   int);
int fc8300_read(void *handle, unsigned short devid, unsigned char addr,
                unsigned char *data) {
  int res;
  res = tuner_i2c_read(handle, devid, addr, 1, data, 1);
  return res;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %si,%dx
mov    %rdi,-0x8(%rbp)
mov    %dx,-0xa(%rbp)
mov    %al,-0xb(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%cx
mov    -0xb(%rbp),%al
mov    -0x18(%rbp),%r8
mov    $0x1,%r9d
movzwl %cx,%esi
movzbl %al,%edx
mov    %r9d,%ecx
call   1030 <tuner_i2c_read@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    %rcx,%r8
mov    $0x1,%ecx
mov    $0x1,%r9d
jmp    1030 <tuner_i2c_read@plt>

LLVM IR (-O0):
define i32 @fc8300_read(i8* %0, i16 zeroext %1, i8 zeroext %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i16
%7 = alloca i8
%8 = alloca i8*
%9 = alloca i32
store i8* %0, i8** %5
store i16 %1, i16* %6
store i8 %2, i8* %7
store i8* %3, i8** %8
%10 = load i8*, i8** %5
%11 = load i16, i16* %6
%12 = load i8, i8* %7
%13 = load i8*, i8** %8
%14 = call i32 @tuner_i2c_read(i8* %10, i16 zeroext %11, i8 zeroext %12, i32 1, i8* %13, i32 1)
store i32 %14, i32* %9
%15 = load i32, i32* %9
ret i32 %15
}

LLVM IR (-O2):
define i32 @fc8300_read(i8* %0, i16 zeroext %1, i8 zeroext %2, i8* %3) {
%5 = tail call i32 @tuner_i2c_read(i8* %0, i16 zeroext %1, i8 zeroext %2, i32 1, i8* %3, i32 1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void do_self_tests(void) {
  if ((((1) & (((0 + 1 >= sizeof(long) * 8 ? ~0 : (1UL << (0 + 1)) - 1) &
                ~(0 >= sizeof(long) * 8 ? ~0 : (1UL << (0)) - 1)))) >>
       (0)) != 1)
    exit(1);
  if ((((0x80000000) &
        (((31 + 1 >= sizeof(long) * 8 ? ~0 : (1UL << (31 + 1)) - 1) &
          ~(31 >= sizeof(long) * 8 ? ~0 : (1UL << (31)) - 1)))) >>
       (31)) != 1)
    exit(2);
  if ((((0xc0000000) &
        (((31 + 1 >= sizeof(long) * 8 ? ~0 : (1UL << (31 + 1)) - 1) &
          ~(30 >= sizeof(long) * 8 ? ~0 : (1UL << (30)) - 1)))) >>
       (30)) != 3)
    exit(3);
}


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

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

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

LLVM IR (-O2):
define void @do_self_tests() {
ret void
}
char test1(void) { return '\\'; }


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5c,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
mov    $0x5c,%al
ret

LLVM IR (-O0):
define signext i8 @test1() {
ret i8 92
}

LLVM IR (-O2):
define signext i8 @test1() {
ret i8 92
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void platform_delay(uint32_t ms) {
  int usleep(unsigned int);
  usleep(ms * 1000);
}


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

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

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

LLVM IR (-O2):
define void @platform_delay(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
int g(int x) {
  if (x == 0)
    return 1;
  else
    return g(g(x - 1) + 1);
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <g+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1149 <g+0x39>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <g@plt>
mov    %eax,%edi
add    $0x1,%edi
call   1030 <g@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
push   %rax
test   %edi,%edi
je     112c <g+0x1c>
add    $0xffffffff,%edi
nopl   0x0(%rax,%rax,1)
call   1030 <g@plt>
mov    $0x1,%edi
jmp    1120 <g+0x10>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @g(i32 %0) {
%2 = alloca i32
%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 %7
6: ; preds = %1
store i32 1, i32* %2
br label %13
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = call i32 @g(i32 %9)
%11 = add nsw i32 %10, 1
%12 = call i32 @g(i32 %11)
store i32 %12, i32* %2
br label %13
13: ; preds = %7, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @g(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = add i32 %0, -1
br label %5
5: ; preds = %3, %5
%6 = phi i32 [ 1, %5 ], [ %4, %3 ]
%7 = tail call i32 @g(i32 %6)
br label %5
8: ; preds = %1
ret i32 1
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void set_message_length_tcp(uint8_t *msg, int msg_length) {
  int mbap_length = msg_length - 6;
  msg[4] = mbap_length >> 8;
  msg[5] = mbap_length & 0x00FF;
}


x86 assembly (clang, -O0):
<set_message_length_tcp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x6,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x10(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x14(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_message_length_tcp>:
add    $0xfffffffa,%esi
movzbl %sil,%eax
sar    $0x8,%esi
mov    %esi,0x10(%rdi)
mov    %eax,0x14(%rdi)
ret

LLVM IR (-O0):
define void @set_message_length_tcp(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* %4
%7 = sub nsw i32 %6, 6
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = ashr i32 %8, 8
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 4
store i32 %9, i32* %11
%12 = load i32, i32* %5
%13 = and i32 %12, 255
%14 = load i32*, i32** %3
%15 = getelementptr inbounds i32, i32* %14, i64 5
store i32 %13, i32* %15
ret void
}

LLVM IR (-O2):
define void @set_message_length_tcp(i32* nocapture writeonly %0, i32 %1) {
%3 = add nsw i32 %1, -6
%4 = ashr i32 %3, 8
%5 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %4, i32* %5
%6 = and i32 %3, 255
%7 = getelementptr inbounds i32, i32* %0, i64 5
store i32 %6, i32* %7
ret void
}
/* Variables and functions */
int HplAtm128Timer0AsyncP__TimerAsync__compareBusy();
int Atm128AlarmAsyncP__0__TimerAsync__compareBusy(void) {
  int __nesc_result;
  __nesc_result = HplAtm128Timer0AsyncP__TimerAsync__compareBusy();
  return __nesc_result;
}


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

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

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

LLVM IR (-O2):
define i32 @Atm128AlarmAsyncP__0__TimerAsync__compareBusy() {
%1 = tail call i32 (...) @HplAtm128Timer0AsyncP__TimerAsync__compareBusy()
ret i32 %1
}
double qdc_conv_dt_ns(int tdc) { return tdc * 7.8125e-3; }


x86 assembly (clang, -O0):
<qdc_conv_dt_ns>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeec(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<qdc_conv_dt_ns>:
cvtsi2sd %edi,%xmm0
mulsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @qdc_conv_dt_ns(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fmul double %4, 7.812500e-03
ret double %5
}

LLVM IR (-O2):
define double @qdc_conv_dt_ns(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fmul double %2, 7.812500e-03
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x05() {
  Assert_real((isupper(5) == 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_isupper.c",
              30, ("isupper should be 0 for 0x05"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x05>:
push   %rax
mov    $0x5,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1e,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x05\00"
define void @t_isupper_0x05() {
%1 = call i64 @isupper(i32 5)
%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 30, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x05\00"
define void @t_isupper_0x05() {
%1 = tail call i64 @isupper(i32 5)
%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 30, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned long __ffs(unsigned long word) {
  asm("bsf %1,%0" : "=r"(word) : "rm"(word));
  return word;
}


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

x86 assembly (clang, -O2):
<__ffs>:
mov    %rdi,-0x8(%rsp)
bsf    -0x8(%rsp),%rax
ret

LLVM IR (-O0):
define i64 @__ffs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 asm "bsf $1,$0", "=r,rm,~{dirflag},~{fpsr},~{flags}"(i64 %3)
store i64 %4, i64* %2
%5 = load i64, i64* %2
ret i64 %5
}

LLVM IR (-O2):
define i64 @__ffs(i64 %0) {
%2 = tail call i64 asm "bsf $1,$0", "=r,rm,~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret i64 %2
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int decode_unsigned16(uint8_t *apdu, uint16_t *value) {
  if (value) {
    *value = (uint16_t)((((uint16_t)apdu[0]) << 8) & 0xff00);
    *value |= ((uint16_t)(((uint16_t)apdu[1]) & 0x00ff));
  }
  return 2;
}


x86 assembly (clang, -O0):
<decode_unsigned16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1147 <decode_unsigned16+0x47>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %eax,%ecx
shl    $0x8,%ecx
and    $0xff00,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    %eax,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
mov    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_unsigned16>:
test   %rsi,%rsi
je     1115 <decode_unsigned16+0x15>
mov    (%rdi),%eax
shl    $0x8,%eax
movzwl %ax,%eax
movzbl 0x8(%rdi),%ecx
or     %eax,%ecx
mov    %ecx,(%rsi)
mov    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @decode_unsigned16(i64* %0, i32* %1) {
%3 = alloca i64*
%4 = alloca i32*
store i64* %0, i64** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %23
7: ; preds = %2
%8 = load i64*, i64** %3
%9 = getelementptr inbounds i64, i64* %8, i64 0
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = shl i32 %11, 8
%13 = and i32 %12, 65280
%14 = load i32*, i32** %4
store i32 %13, i32* %14
%15 = load i64*, i64** %3
%16 = getelementptr inbounds i64, i64* %15, i64 1
%17 = load i64, i64* %16
%18 = trunc i64 %17 to i32
%19 = and i32 %18, 255
%20 = load i32*, i32** %4
%21 = load i32, i32* %20
%22 = or i32 %21, %19
store i32 %22, i32* %20
br label %23
23: ; preds = %7, %2
ret i32 2
}

LLVM IR (-O2):
define i32 @decode_unsigned16(i64* nocapture %0, i32* writeonly %1) {
%3 = icmp eq i32* %1, null
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = load i64, i64* %0
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = and i32 %7, 65280
%9 = getelementptr inbounds i64, i64* %0, i64 1
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = and i32 %11, 255
%13 = or i32 %12, %8
store i32 %13, i32* %1
br label %14
14: ; preds = %4, %2
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void gcX_defaultFreeFunc(void *in_ptr) { free(in_ptr); }


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

LLVM IR (-O0):
define void @gcX_defaultFreeFunc(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 @gcX_defaultFreeFunc(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
char *make_return_packet(int /*<<< orphan*/);
char *gdb_write_reg(int reg, long val) { return (make_return_packet(0)); }


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

x86 assembly (clang, -O2):
<gdb_write_reg>:
xor    %edi,%edi
jmp    1030 <make_return_packet@plt>

LLVM IR (-O0):
define i8* @gdb_write_reg(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = call i8* @make_return_packet(i32 0)
ret i8* %5
}

LLVM IR (-O2):
define i8* @gdb_write_reg(i32 %0, i64 %1) {
%3 = tail call i8* @make_return_packet(i32 0)
ret i8* %3
}
extern void cpuid(unsigned *a, unsigned *b, unsigned *c, unsigned *d,
                  unsigned in) {
  asm("cpuid" : "=a"(*a), "=b"(*b), "=c"(*c), "=d"(*d) : "a"(in));
}


x86 assembly (clang, -O0):
<cpuid>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x2c(%rbp),%eax
cpuid
mov    %eax,%r9d
mov    -0x40(%rbp),%rax
mov    %ecx,%esi
mov    -0x38(%rbp),%rcx
mov    %r9d,(%r8)
mov    %ebx,(%rdi)
mov    %esi,(%rcx)
mov    %edx,(%rax)
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid>:
push   %rbx
mov    %r8d,%eax
mov    %rcx,%r8
mov    %rdx,%r9
cpuid
mov    %eax,(%rdi)
mov    %ebx,(%rsi)
mov    %ecx,(%r9)
mov    %edx,(%r8)
pop    %rbx
ret

LLVM IR (-O0):
define void @cpuid(i32* %0, i32* %1, i32* %2, i32* %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32 %4, i32* %10
%11 = load i32*, i32** %6
%12 = load i32*, i32** %7
%13 = load i32*, i32** %8
%14 = load i32*, i32** %9
%15 = load i32, i32* %10
%16 = call { i32, i32, i32, i32 } asm "cpuid", "={ax},={bx},={cx},={dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %15)
%17 = extractvalue { i32, i32, i32, i32 } %16, 0
%18 = extractvalue { i32, i32, i32, i32 } %16, 1
%19 = extractvalue { i32, i32, i32, i32 } %16, 2
%20 = extractvalue { i32, i32, i32, i32 } %16, 3
store i32 %17, i32* %11
store i32 %18, i32* %12
store i32 %19, i32* %13
store i32 %20, i32* %14
ret void
}

LLVM IR (-O2):
define void @cpuid(i32* nocapture writeonly %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, i32 %4) {
%6 = tail call { i32, i32, i32, i32 } asm "cpuid", "={ax},={bx},={cx},={dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %4)
%7 = extractvalue { i32, i32, i32, i32 } %6, 0
%8 = extractvalue { i32, i32, i32, i32 } %6, 1
%9 = extractvalue { i32, i32, i32, i32 } %6, 2
%10 = extractvalue { i32, i32, i32, i32 } %6, 3
store i32 %7, i32* %0
store i32 %8, i32* %1
store i32 %9, i32* %2
store i32 %10, i32* %3
ret void
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, long);
char *ltoa(long l) {
  char *tmp = malloc(20 * sizeof(char));
  sprintf(tmp, "%ld", l);
  return tmp;
}


x86 assembly (clang, -O0):
<ltoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x14,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeb7(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltoa>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x14,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xec5(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
define i8* @ltoa(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = call i8* @malloc(i32 20)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = load i64, i64* %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define noalias i8* @ltoa(i64 %0) {
%2 = tail call dereferenceable_or_null(20) i8* @malloc(i32 20)
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
long getdtablesize();
void closefrom_fallback(int lowfd) {
  long fd, maxfd;
  maxfd = getdtablesize();
  if (maxfd < 0)
    maxfd = 256;
  for (fd = lowfd; fd < maxfd; fd++)
    (void)close((int)fd);
}


x86 assembly (clang, -O0):
<closefrom_fallback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getdtablesize@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jge    1149 <closefrom_fallback+0x29>
movq   $0x100,-0x18(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    117b <closefrom_fallback+0x5b>
mov    -0x10(%rbp),%rax
mov    %eax,%edi
call   1030 <close@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1151 <closefrom_fallback+0x31>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closefrom_fallback>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <getdtablesize@plt>
test   %rax,%rax
mov    $0x100,%ebx
cmovns %rax,%rbx
movslq %ebp,%rax
sub    %rax,%rbx
jle    1150 <closefrom_fallback+0x30>
mov    %ebp,%edi
call   1030 <close@plt>
add    $0x1,%ebp
add    $0xffffffffffffffff,%rbx
jne    1140 <closefrom_fallback+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @closefrom_fallback(i32 %0) {
%2 = tail call i64 (...) @getdtablesize()
%3 = icmp slt i64 %2, 0
%4 = select i1 %3, i64 256, i64 %2
%5 = sext i32 %0 to i64
%6 = icmp sgt i64 %4, %5
br i1 %6, label %7, label %13
7: ; preds = %1, %7
%8 = phi i64 [ %11, %7 ], [ %5, %1 ]
%9 = trunc i64 %8 to i32
%10 = tail call i32 @close(i32 %9)
%11 = add i64 %8, 1
%12 = icmp eq i64 %11, %4
br i1 %12, label %13, label %7
13: ; preds = %7, %1
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t rgb_to_v(int r, int g, int b) {
  int v = ((16351 * r + -13697 * g + -2664 * b) >> 15) + 128;
  return v > 255 ? 255 : v < 0 ? 0 : v;
}


x86 assembly (clang, -O0):
<rgb_to_v>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
imul   $0x3fdf,-0x4(%rbp),%eax
imul   $0xffffca7f,-0x8(%rbp),%ecx
add    %ecx,%eax
imul   $0xfffff598,-0xc(%rbp),%ecx
add    %ecx,%eax
sar    $0xf,%eax
add    $0x80,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0xff,-0x10(%rbp)
jle    114b <rgb_to_v+0x4b>
mov    $0xff,%eax
mov    %eax,-0x14(%rbp)
jmp    116b <rgb_to_v+0x6b>
cmpl   $0x0,-0x10(%rbp)
jge    115f <rgb_to_v+0x5f>
xor    %eax,%eax
mov    %eax,-0x18(%rbp)
jmp    1165 <rgb_to_v+0x65>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgb_to_v>:
imul   $0x3fdf,%edi,%eax
imul   $0xffffca7f,%esi,%ecx
add    %eax,%ecx
imul   $0xfffff598,%edx,%eax
add    %ecx,%eax
sar    $0xf,%eax
cmp    $0xffffff81,%eax
mov    $0xffffff80,%ecx
cmovge %eax,%ecx
cmp    $0x7f,%ecx
mov    $0x7f,%eax
cmovl  %ecx,%eax
sub    $0xffffff80,%eax
ret

LLVM IR (-O0):
define i32 @rgb_to_v(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = mul nsw i32 16351, %8
%10 = load i32, i32* %5
%11 = mul nsw i32 -13697, %10
%12 = add nsw i32 %9, %11
%13 = load i32, i32* %6
%14 = mul nsw i32 -2664, %13
%15 = add nsw i32 %12, %14
%16 = ashr i32 %15, 15
%17 = add nsw i32 %16, 128
store i32 %17, i32* %7
%18 = load i32, i32* %7
%19 = icmp sgt i32 %18, 255
br i1 %19, label %20, label %21
20: ; preds = %3
br label %29
21: ; preds = %3
%22 = load i32, i32* %7
%23 = icmp slt i32 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %21
br label %27
25: ; preds = %21
%26 = load i32, i32* %7
br label %27
27: ; preds = %25, %24
%28 = phi i32 [ 0, %24 ], [ %26, %25 ]
br label %29
29: ; preds = %27, %20
%30 = phi i32 [ 255, %20 ], [ %28, %27 ]
ret i32 %30
}

LLVM IR (-O2):
define i32 @rgb_to_v(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %0, 16351
%5 = mul nsw i32 %1, -13697
%6 = add nsw i32 %5, %4
%7 = mul nsw i32 %2, -2664
%8 = add nsw i32 %6, %7
%9 = ashr i32 %8, 15
%10 = icmp sgt i32 %9, -128
%11 = select i1 %10, i32 %9, i32 -128
%12 = icmp slt i32 %11, 127
%13 = select i1 %12, i32 %11, i32 127
%14 = add nsw i32 %13, 128
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_LengthSquaredVec4_init(void) {
  _hmt_register_covercase("HMM_LengthSquaredVec4", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_LengthSquaredVec4_init>:
lea    0xee9(%rip),%rdi
lea    0xef8(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"HMM_LengthSquaredVec4\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_LengthSquaredVec4_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"HMM_LengthSquaredVec4\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_LengthSquaredVec4_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ calloc(int, int);
char *create_storage(int len) { return (char *)calloc(len, sizeof(char)); }


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

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

LLVM IR (-O0):
define i8* @create_storage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @calloc(i32 %3, i32 1)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @create_storage(i32 %0) {
%2 = tail call i64 @calloc(i32 %0, i32 1)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ strstr2(char *, char *);
int main(int argc, char *argv[]) {
  strstr2("stupid_spring_string", "string");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [21 x i8] c"stupid_spring_string\00"
@.str.1 = [7 x i8] c"string\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @strstr2(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ arf(char *);
void foo2() {
  char x[10];
  arf(x);
}


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

x86 assembly (clang, -O2):
<foo2>:
sub    $0x18,%rsp
lea    0xe(%rsp),%rdi
call   1030 <arf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @foo2() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @arf(i8* %2)
ret void
}

LLVM IR (-O2):
define void @foo2() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @arf(i8* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ timer_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int timer_delete(timer_t timerid) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<timer_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_delete>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @timer_delete(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOSYS
%4 = call i32 @__set_errno(i32 %3)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @timer_delete(i32 %0) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret i32 -1
}
/* Variables and functions */
scalar_t__ calloc(int, long);
char *NewPtrClear(long size) { return (char *)calloc(1, size); }


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

x86 assembly (clang, -O2):
<NewPtrClear>:
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @NewPtrClear(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @calloc(i32 1, i64 %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @NewPtrClear(i64 %0) {
%2 = tail call i64 @calloc(i32 1, i64 %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
double tan(double);
void tang(void) {
  double value;
  printf("Введите число: ");
  scanf("%lf", &value);
  printf("tan(%f) = %f\n", value, tan(value));
}


x86 assembly (clang, -O0):
<tang>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <tan@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
lea    0xea7(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tang>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1050 <scanf@plt>
movsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1040 <tan@plt>
movaps %xmm0,%xmm1
lea    0xeb2(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
call   1030 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [28 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D1\87\D0\B8\D1\81\D0\BB\D0\BE: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [14 x i8] c"tan(%f) = %f\0A\00"
define void @tang() {
%1 = alloca double
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = load double, double* %1
%6 = call double @tan(double %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %4, double %6)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D1\87\D0\B8\D1\81\D0\BB\D0\BE: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [14 x i8] c"tan(%f) = %f\0A\00"
define void @tang() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = call double @tan(double %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %5, double %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ r_cons_printf(char *, char const *);
scalar_t__ strlen(char *);
int /*<<< orphan*/ strncmp(char const *, char *, scalar_t__);
int stdprintifstruct(void *p, const char *k, const char *v) {
  if (!strncmp(v, "struct", strlen("struct") + 1))
    r_cons_printf("%s\n", k);
  return 1;
}


x86 assembly (clang, -O0):
<stdprintifstruct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    0xead(%rip),%rdi
call   1050 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    %rax,%rdx
add    $0x1,%rdx
lea    0xe96(%rip),%rsi
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    1188 <stdprintifstruct+0x58>
mov    -0x10(%rbp),%rsi
lea    0xe84(%rip),%rdi
call   1030 <r_cons_printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdprintifstruct>:
push   %rbx
mov    %rdx,%rdi
mov    %rsi,%rbx
lea    0xed2(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
jne    114b <stdprintifstruct+0x2b>
lea    0xec4(%rip),%rdi
mov    %rbx,%rsi
call   1030 <r_cons_printf@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"struct\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @stdprintifstruct(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = call i64 @strlen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%9 = add nsw i64 %8, 1
%10 = call i32 @strncmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %3
%13 = load i8*, i8** %5
%14 = call i32 @r_cons_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %13)
br label %15
15: ; preds = %12, %3
ret i32 1
}

LLVM IR (-O2):
@.str = [7 x i8] c"struct\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @stdprintifstruct(i8* nocapture readnone %0, i8* %1, i8* nocapture %2) {
%4 = tail call i32 @strncmp(i8* dereferenceable(1) %2, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 7)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @r_cons_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %8
8: ; preds = %6, %3
ret i32 1
}
int VP8LHistogramNumCodes(int palette_code_bits) {
  return 256 + 24 + ((palette_code_bits > 0) ? (1 << palette_code_bits) : 0);
}


x86 assembly (clang, -O0):
<VP8LHistogramNumCodes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1123 <VP8LHistogramNumCodes+0x23>
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <VP8LHistogramNumCodes+0x2d>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <VP8LHistogramNumCodes+0x2d>
mov    -0x8(%rbp),%eax
add    $0x118,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<VP8LHistogramNumCodes>:
mov    %edi,%ecx
mov    $0x1,%edx
shl    %cl,%edx
add    $0x118,%edx
test   %edi,%edi
mov    $0x118,%eax
cmovg  %edx,%eax
ret

LLVM IR (-O0):
define i32 @VP8LHistogramNumCodes(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = shl i32 1, %6
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %5
%10 = phi i32 [ %7, %5 ], [ 0, %8 ]
%11 = add nsw i32 280, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @VP8LHistogramNumCodes(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = shl nuw i32 1, %0
%4 = add nuw nsw i32 %3, 280
%5 = select i1 %2, i32 %4, i32 280
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ f();
main() {
  if (f() != 0)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <f@plt>
cmp    $0x0,%rax
je     1157 <main+0x27>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <f@plt>
test   %rax,%rax
jne    1144 <main+0x14>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @f()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @f()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
void initializeIO() {}


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

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

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

LLVM IR (-O2):
define void @initializeIO() {
ret void
}
unsigned char core___core__Float___Numeric__to_b(double self) {
  unsigned char var;
  unsigned char var1;
  var1 = (unsigned char)self;
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<core___core__Float___Numeric__to_b>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<core___core__Float___Numeric__to_b>:
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define zeroext i8 @core___core__Float___Numeric__to_b(double %0) {
%2 = alloca double
%3 = alloca i8
%4 = alloca i8
store double %0, double* %2
%5 = load double, double* %2
%6 = fptoui double %5 to i8
store i8 %6, i8* %4
%7 = load i8, i8* %4
store i8 %7, i8* %3
br label %8
8: ; preds = %1
%9 = load i8, i8* %3
ret i8 %9
}

LLVM IR (-O2):
define zeroext i8 @core___core__Float___Numeric__to_b(double %0) {
%2 = fptoui double %0 to i8
ret i8 %2
}
struct provider_store_st *f() {}


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

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

LLVM IR (-O0):
%struct.provider_store_st = type opaque
define %struct.provider_store_st* @f() {
%1 = alloca %struct.provider_store_st*
%2 = load %struct.provider_store_st*, %struct.provider_store_st** %1
ret %struct.provider_store_st* %2
}

LLVM IR (-O2):
%struct.provider_store_st = type opaque
define noalias %struct.provider_store_st* @f() {
ret %struct.provider_store_st* undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xca() {
  Assert_real((isspace(202) == 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_isspace.c",
              1015, ("isspace should be 0 for 0xca"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xca>:
push   %rax
mov    $0xca,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3f7,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xca\00"
define void @t_isspace_0xca() {
%1 = call i64 @isspace(i32 202)
%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 1015, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xca\00"
define void @t_isspace_0xca() {
%1 = tail call i64 @isspace(i32 202)
%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 1015, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cffgiou(int *, int *);
extern void ftgiou_(int *A1, int *A2) {
  ;
  Cffgiou(A1, A2);
  return;
}


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

x86 assembly (clang, -O2):
<ftgiou_>:
jmp    1030 <Cffgiou@plt>

LLVM IR (-O0):
define void @ftgiou_(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 @Cffgiou(i32* %5, i32* %6)
ret void
}

LLVM IR (-O2):
define void @ftgiou_(i32* %0, i32* %1) {
%3 = tail call i32 @Cffgiou(i32* %0, i32* %1)
ret void
}