xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ s_hook_memory_print(char *);
int /*<<< orphan*/ sprintf(char *, char *, char const *, int);
void s_hook_memory_print_freeD(const char *file, int line) {
  char buf[1024];
  sprintf(buf, "[MEMORY_FREE_DBL] %s:%d \n", file, line);
  s_hook_memory_print(buf);
}


x86 assembly (clang, -O0):
<s_hook_memory_print_freeD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xeb9(%rip),%rsi
call   1030 <sprintf@plt>
lea    -0x410(%rbp),%rdi
call   1040 <s_hook_memory_print@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_hook_memory_print_freeD>:
push   %rbx
sub    $0x400,%rsp
mov    %esi,%ecx
mov    %rdi,%rdx
lea    0xecc(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <s_hook_memory_print@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"[MEMORY_FREE_DBL] %s:%d \0A\00"
define void @s_hook_memory_print_freeD(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [1024 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8)
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%11 = call i32 @s_hook_memory_print(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"[MEMORY_FREE_DBL] %s:%d \0A\00"
define void @s_hook_memory_print_freeD(i8* %0, i32 %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%6 = call i32 @s_hook_memory_print(i8* %4)
ret void
}
int test_imm_85int8_reg(signed char val) {
  return ((val) & (-0x85 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_85int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff7b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_85int8_reg>:
test   $0xffffff7b,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_85int8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -133
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ rand32();
double randrange(double low, double high) {
  double range;
  range = high - low;
  if (range <= 0.)
    return 0.;
  return range * (double)rand32() / 4294967295. + low;
}


x86 assembly (clang, -O0):
<randrange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jb     114c <randrange+0x3c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1181 <randrange+0x71>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    $0x0,%al
call   1030 <rand32@plt>
movsd  -0x28(%rbp),%xmm0
cvtsi2sd %rax,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe8d(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randrange>:
movapd %xmm0,%xmm2
subsd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jae    1161 <randrange+0x51>
sub    $0x18,%rsp
xor    %eax,%eax
movsd  %xmm1,0x8(%rsp)
movsd  %xmm2,0x10(%rsp)
call   1030 <rand32@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
divsd  0xead(%rip),%xmm1
addsd  0x10(%rsp),%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @randrange(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
%7 = load double, double* %5
%8 = load double, double* %4
%9 = fsub double %7, %8
store double %9, double* %6
%10 = load double, double* %6
%11 = fcmp ole double %10, 0.000000e+00
br i1 %11, label %12, label %13
12: ; preds = %2
store double 0.000000e+00, double* %3
br label %21
13: ; preds = %2
%14 = load double, double* %6
%15 = call i64 (...) @rand32()
%16 = sitofp i64 %15 to double
%17 = fmul double %14, %16
%18 = fdiv double %17, 0x41EFFFFFFFE00000
%19 = load double, double* %4
%20 = fadd double %18, %19
store double %20, double* %3
br label %21
21: ; preds = %13, %12
%22 = load double, double* %3
ret double %22
}

LLVM IR (-O2):
define double @randrange(double %0, double %1) {
%3 = fsub double %1, %0
%4 = fcmp ugt double %3, 0.000000e+00
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = tail call i64 (...) @rand32()
%7 = sitofp i64 %6 to double
%8 = fmul double %3, %7
%9 = fdiv double %8, 0x41EFFFFFFFE00000
%10 = fadd double %9, %0
br label %11
11: ; preds = %2, %5
%12 = phi double [ %10, %5 ], [ 0.000000e+00, %2 ]
ret double %12
}
/* Variables and functions */
char *get_host_ip_str_bloq(char const *, int);
int /*<<< orphan*/ printf(char *);
char *get_host_ip_str_nonbloq(const char *hostname, int port) {
  printf("todo: s'arranger pour faire marcher le gethostbyname non bloquant "
         "sous win \n(il suffit de foutre tout ça dans un fichier séparé de "
         "http.c, pour ne pas\n batailler avec le #include \"windows.h\"\n");
  return get_host_ip_str_bloq(hostname, port);
}


x86 assembly (clang, -O0):
<get_host_ip_str_nonbloq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <get_host_ip_str_bloq@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_host_ip_str_nonbloq>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <get_host_ip_str_bloq@plt>

LLVM IR (-O0):
@.str = [195 x i8] c"todo: s'arranger pour faire marcher le gethostbyname non bloquant sous win \0A(il suffit de foutre tout \C3\A7a dans un fichier s\C3\A9par\C3\A9 de http.c, pour ne pas\0A batailler avec le #include \22windows.h\22\0A\00"
define i8* @get_host_ip_str_nonbloq(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([195 x i8], [195 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i8* @get_host_ip_str_bloq(i8* %6, i32 %7)
ret i8* %8
}

LLVM IR (-O2):
@str = [194 x i8] c"todo: s'arranger pour faire marcher le gethostbyname non bloquant sous win \0A(il suffit de foutre tout \C3\A7a dans un fichier s\C3\A9par\C3\A9 de http.c, pour ne pas\0A batailler avec le #include \22windows.h\22\00"
define i8* @get_host_ip_str_nonbloq(i8* %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([194 x i8], [194 x i8]* @str, i64 0, i64 0))
%4 = tail call i8* @get_host_ip_str_bloq(i8* %0, i32 %1)
ret i8* %4
}
/* Variables and functions */
int new_fun(int /*<<< orphan*/);
int old_fun(int /*<<< orphan*/);
foo(int k) {
  k = old_fun(0);
  k = new_fun(0);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
xor    %edi,%edi
call   1030 <old_fun@plt>
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
call   1040 <new_fun@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %edi,%edi
call   1030 <old_fun@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <new_fun@plt>

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @old_fun(i32 0)
store i32 %4, i32* %3
%5 = call i32 @new_fun(i32 0)
store i32 %5, i32* %3
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = tail call i32 @old_fun(i32 0)
%3 = tail call i32 @new_fun(i32 0)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ __m512i;

/* Variables and functions */
int /*<<< orphan*/ _mm512_xor_si512(int /*<<< orphan*/, int /*<<< orphan*/);
__attribute__((always_)) __m512i xor_512(__m512i a, __m512i b) {
  return _mm512_xor_si512(a, b);
}


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

x86 assembly (clang, -O2):
<xor_512>:
jmp    1030 <_mm512_xor_si512@plt>

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

LLVM IR (-O2):
define i32 @xor_512(i32 %0, i32 %1) {
%3 = tail call i32 @_mm512_xor_si512(i32 %0, i32 %1)
ret i32 %3
}
int cmpFloat(const void *a, const void *b) {
  if (*(float *)a < *(float *)b)
    return -1;
  if (*(float *)a > *(float *)b)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<cmpFloat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
jbe    1131 <cmpFloat+0x31>
movl   $0xffffffff,-0x4(%rbp)
jmp    1159 <cmpFloat+0x59>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomiss (%rax),%xmm0
jbe    1152 <cmpFloat+0x52>
movl   $0x1,-0x4(%rbp)
jmp    1159 <cmpFloat+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpFloat>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
xor    %ecx,%ecx
ucomiss %xmm1,%xmm0
seta   %cl
ucomiss %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cmpFloat(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to float*
%8 = load float, float* %7
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to float*
%11 = load float, float* %10
%12 = fcmp olt float %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %24
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = bitcast i8* %15 to float*
%17 = load float, float* %16
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to float*
%20 = load float, float* %19
%21 = fcmp ogt float %17, %20
br i1 %21, label %22, label %23
22: ; preds = %14
store i32 1, i32* %3
br label %24
23: ; preds = %14
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %13
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @cmpFloat(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fcmp olt float %4, %6
%8 = fcmp ogt float %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
bool nrf52_errata_197(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_197() {
ret i32 0
}
double b(double t, double y) { return (1 + t) / (1 + y); }


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xeea(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  0xedd(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<b>:
movsd  0xef8(%rip),%xmm2
addsd  %xmm2,%xmm0
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @b(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fadd double 1.000000e+00, %5
%7 = load double, double* %4
%8 = fadd double 1.000000e+00, %7
%9 = fdiv double %6, %8
ret double %9
}

LLVM IR (-O2):
define double @b(double %0, double %1) {
%3 = fadd double %0, 1.000000e+00
%4 = fadd double %1, 1.000000e+00
%5 = fdiv double %3, %4
ret double %5
}
void clear_keys(int keys[8]) {
  int i;
  for (i = 0; i < 8; i++) {
    keys[i] = 0;
  }
}


x86 assembly (clang, -O0):
<clear_keys>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    1136 <clear_keys+0x36>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <clear_keys+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_keys>:
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @clear_keys(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 8
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32*, i32** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
store i32 0, i32* %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @clear_keys(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to i8*
ret void
}
unsigned int SwapBBBB(unsigned int i) {
  unsigned int result = (i >> 24) & 0xff;
  result |= (i >> 8) & 0xff00;
  result |= (i << 8) & 0xff0000;
  result |= (i << 24) & 0xff00000;
  return (result);
}


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

x86 assembly (clang, -O2):
<SwapBBBB>:
mov    %edi,%eax
shr    $0x18,%eax
mov    %edi,%ecx
shr    $0x8,%ecx
and    $0xff00,%ecx
or     %eax,%ecx
mov    %edi,%eax
shl    $0x8,%eax
and    $0xff0000,%eax
or     %ecx,%eax
and    $0xf,%edi
shl    $0x18,%edi
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @SwapBBBB(i32 %0) {
%2 = lshr i32 %0, 24
%3 = lshr i32 %0, 8
%4 = and i32 %3, 65280
%5 = or i32 %4, %2
%6 = shl i32 %0, 8
%7 = and i32 %6, 16711680
%8 = or i32 %5, %7
%9 = shl i32 %0, 24
%10 = and i32 %9, 251658240
%11 = or i32 %8, %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ consume_char();
char peek_char();
int read_char_range(char start, char end) {
  if (peek_char() >= start && peek_char() <= end) {
    consume_char();
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<read_char_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    $0x0,%al
call   1040 <peek_char@plt>
movsbl %al,%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jl     1173 <read_char_range+0x53>
mov    $0x0,%al
call   1040 <peek_char@plt>
movsbl %al,%eax
movsbl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jg     1173 <read_char_range+0x53>
mov    $0x0,%al
call   1030 <consume_char@plt>
movl   $0x1,-0x4(%rbp)
jmp    117a <read_char_range+0x5a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_char_range>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <peek_char@plt>
cmp    %bpl,%al
jl     1151 <read_char_range+0x31>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <peek_char@plt>
cmp    %r14b,%al
jg     1151 <read_char_range+0x31>
xor    %eax,%eax
call   1030 <consume_char@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @read_char_range(i8 signext %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
%6 = call signext i8 (...) @peek_char()
%7 = sext i8 %6 to i32
%8 = load i8, i8* %4
%9 = sext i8 %8 to i32
%10 = icmp sge i32 %7, %9
br i1 %10, label %11, label %19
11: ; preds = %2
%12 = call signext i8 (...) @peek_char()
%13 = sext i8 %12 to i32
%14 = load i8, i8* %5
%15 = sext i8 %14 to i32
%16 = icmp sle i32 %13, %15
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = call i32 (...) @consume_char()
store i32 1, i32* %3
br label %20
19: ; preds = %11, %2
store i32 0, i32* %3
br label %20
20: ; preds = %19, %17
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @read_char_range(i8 signext %0, i8 signext %1) {
%3 = tail call signext i8 (...) @peek_char()
%4 = icmp slt i8 %3, %0
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call signext i8 (...) @peek_char()
%7 = icmp sgt i8 %6, %1
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @consume_char()
br label %10
10: ; preds = %2, %5, %8
%11 = phi i32 [ 1, %8 ], [ 0, %5 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int ints_extreme(int *, int, int);
int ints_min(int *ints, int size) { return (ints_extreme(ints, size, 1)); }


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

x86 assembly (clang, -O2):
<ints_min>:
mov    $0x1,%edx
jmp    1030 <ints_extreme@plt>

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

LLVM IR (-O2):
define i32 @ints_min(i32* %0, i32 %1) {
%3 = tail call i32 @ints_extreme(i32* %0, i32 %1, i32 1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_RESPDATA;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_RESPDATA_it;
int i2d_OCSP_RESPDATA(OCSP_RESPDATA *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_RESPDATA_it);
}


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

x86 assembly (clang, -O2):
<i2d_OCSP_RESPDATA>:
mov    0x2ec9(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

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

LLVM IR (-O2):
@OCSP_RESPDATA_it = global i32 0
define i32 @i2d_OCSP_RESPDATA(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @OCSP_RESPDATA_it)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ by_ptr(int /*<<< orphan*/);
void xor_by_ptr(uint32_t x) {
  by_ptr(x);
  xor();
}


x86 assembly (clang, -O0):
<xor_by_ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <by_ptr@plt>
mov    $0x0,%al
call   1040 <xor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xor_by_ptr>:
push   %rax
call   1030 <by_ptr@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <xor@plt>

LLVM IR (-O0):
define void @xor_by_ptr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @by_ptr(i32 %3)
%5 = call i32 (...) @xor()
ret void
}

LLVM IR (-O2):
define void @xor_by_ptr(i32 %0) {
%2 = tail call i32 @by_ptr(i32 %0)
%3 = tail call i32 (...) @xor()
ret void
}
void format_skeleton_rd_deinit(void) {}


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

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

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

LLVM IR (-O2):
define void @format_skeleton_rd_deinit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func_1();
int main(void) {
  func_1();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @func_1()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @func_1()
ret i32 0
}
void ff_hevc_put_hevc_uni_epel_v32_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_v32_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ itoa(int, char *, int);
int /*<<< orphan*/ printf(char *, ...);
main() {
  int n = -1000;
  char s[256];
  printf("%d\n", n);
  itoa(n, s, 10);
  printf("%s\n", s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0xfffffc18,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
lea    -0x110(%rbp),%rsi
mov    $0xa,%edx
call   1040 <itoa@plt>
lea    -0x110(%rbp),%rsi
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x100,%rsp
lea    0xec1(%rip),%rdi
mov    $0xfffffc18,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%rbx
mov    $0xfffffc18,%edi
mov    %rbx,%rsi
mov    $0xa,%edx
call   1050 <itoa@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -1000)
%4 = call i32 @itoa(i32 -1000, i8* %2, i32 10)
%5 = call i32 @puts(i8* %2)
ret i32 0
}
void I2CSlaveIntDisable(unsigned long ulBase) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x0000000C))) &= ~0x00000001;
}


x86 assembly (clang, -O0):
<I2CSlaveIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%rcx
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveIntDisable>:
andq   $0xfffffffffffffffe,0xc(%rdi)
ret

LLVM IR (-O0):
define void @I2CSlaveIntDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 12
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, -2
store volatile i64 %7, i64* %5
ret void
}

LLVM IR (-O2):
define void @I2CSlaveIntDisable(i64 %0) {
%2 = add i64 %0, 12
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, -2
store volatile i64 %5, i64* %3
ret void
}
/* Type definitions */
struct reconos_thread {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ reconos_thread_setinitdata(struct reconos_thread *, void *);
void __attribute__((deprecated))
reconos_hwt_setinitdata(struct reconos_thread *hwt, void *init_data) {
  reconos_thread_setinitdata(hwt, init_data);
}


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

x86 assembly (clang, -O2):
<reconos_hwt_setinitdata>:
jmp    1030 <reconos_thread_setinitdata@plt>

LLVM IR (-O0):
%struct.reconos_thread = type { i32 }
define void @reconos_hwt_setinitdata(%struct.reconos_thread* %0, i8* %1) {
%3 = alloca %struct.reconos_thread*
%4 = alloca i8*
store %struct.reconos_thread* %0, %struct.reconos_thread** %3
store i8* %1, i8** %4
%5 = load %struct.reconos_thread*, %struct.reconos_thread** %3
%6 = load i8*, i8** %4
%7 = call i32 @reconos_thread_setinitdata(%struct.reconos_thread* %5, i8* %6)
ret void
}

LLVM IR (-O2):
%struct.reconos_thread = type { i32 }
define void @reconos_hwt_setinitdata(%struct.reconos_thread* %0, i8* %1) {
%3 = tail call i32 @reconos_thread_setinitdata(%struct.reconos_thread* %0, i8* %1)
ret void
}
int do_875() { return 875; }


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

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

LLVM IR (-O0):
define i32 @do_875() {
ret i32 875
}

LLVM IR (-O2):
define i32 @do_875() {
ret i32 875
}
/* Variables and functions */
int /*<<< orphan*/ mlMatrixMultVectorTo(float const *, float *, float *);
int /*<<< orphan*/ mlVectorCopy(float *, float *);
void mlMatrixMultmlVector(const float *a, float *b) {
  float result[3];
  mlMatrixMultVectorTo(a, b, result);
  mlVectorCopy(result, b);
}


x86 assembly (clang, -O0):
<mlMatrixMultmlVector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1040 <mlMatrixMultVectorTo@plt>
lea    -0x1c(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <mlVectorCopy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlMatrixMultmlVector>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
lea    0xc(%rsp),%r14
mov    %r14,%rdx
call   1040 <mlMatrixMultVectorTo@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <mlVectorCopy@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @mlMatrixMultmlVector(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca [3 x float]
store float* %0, float** %3
store float* %1, float** %4
%6 = load float*, float** %3
%7 = load float*, float** %4
%8 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 0
%9 = call i32 @mlMatrixMultVectorTo(float* %6, float* %7, float* %8)
%10 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 0
%11 = load float*, float** %4
%12 = call i32 @mlVectorCopy(float* %10, float* %11)
ret void
}

LLVM IR (-O2):
define void @mlMatrixMultmlVector(float* %0, float* %1) {
%3 = alloca [3 x float]
%4 = bitcast [3 x float]* %3 to i8*
%5 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 0
%6 = call i32 @mlMatrixMultVectorTo(float* %0, float* %1, float* %5)
%7 = call i32 @mlVectorCopy(float* %5, float* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void op_NOP(uint8_t opcode __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @op_NOP(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hello_message(char *);
scalar_t__ init_library();
int /*<<< orphan*/ printf(char *);
int main() {
  if (init_library())
    hello_message("Vasya");
  else
    printf("Library was not loaded\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <init_library@plt>
cmp    $0x0,%rax
je     1161 <main+0x31>
lea    0xea9(%rip),%rdi
call   1040 <hello_message@plt>
jmp    116d <main+0x3d>
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <init_library@plt>
test   %rax,%rax
je     114b <main+0x1b>
lea    0xebc(%rip),%rdi
call   1040 <hello_message@plt>
jmp    1157 <main+0x27>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Vasya\00"
@.str.1 = [24 x i8] c"Library was not loaded\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @init_library()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @hello_message(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"Vasya\00"
@str = [23 x i8] c"Library was not loaded\00"
define i32 @main() {
%1 = tail call i64 (...) @init_library()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @hello_message(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret i32 0
}
void H420ToARGB() {}


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

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

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

LLVM IR (-O2):
define void @H420ToARGB() {
ret void
}
void iwl_dbgfs_unregister(struct iwl_priv *priv) {}


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

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

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

LLVM IR (-O2):
%struct.iwl_priv = type opaque
define void @iwl_dbgfs_unregister(%struct.iwl_priv* nocapture %0) {
ret void
}
void RTFileReadAllByHandleEx(void) {}


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

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

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

LLVM IR (-O2):
define void @RTFileReadAllByHandleEx() {
ret void
}
/* Variables and functions */
void add_history(const char *string) {}


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

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

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

LLVM IR (-O2):
define void @add_history(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x3a() {
  Assert_real((isalpha(58) == 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_isalpha.c",
              295, ("isalpha should be 0 for :"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x3a>:
push   %rax
mov    $0x3a,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x127,%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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for :\00"
define void @t_isalpha_0x3a() {
%1 = call i64 @isalpha(i32 58)
%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 295, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for :\00"
define void @t_isalpha_0x3a() {
%1 = tail call i64 @isalpha(i32 58)
%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 295, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct Process {
  int dummy;
};

/* Variables and functions */
struct Process *task_now();
int /*<<< orphan*/ task_sleep(struct Process *);
void end(void) {
  struct Process *proc = task_now();
  while (1) {
    task_sleep(proc);
  }
}


x86 assembly (clang, -O0):
<end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <task_now@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <task_sleep@plt>
jmp    1133 <end+0x13>

x86 assembly (clang, -O2):
<end>:
push   %rbx
xor    %eax,%eax
call   1030 <task_now@plt>
mov    %rax,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1040 <task_sleep@plt>
jmp    1130 <end+0x10>

LLVM IR (-O0):
%struct.Process = type { i32 }
define void @end() {
%1 = alloca %struct.Process*
%2 = call %struct.Process* (...) @task_now()
store %struct.Process* %2, %struct.Process** %1
br label %3
3: ; preds = %0, %3
%4 = load %struct.Process*, %struct.Process** %1
%5 = call i32 @task_sleep(%struct.Process* %4)
br label %3
}

LLVM IR (-O2):
%struct.Process = type { i32 }
define void @end() {
%1 = tail call %struct.Process* (...) @task_now()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 @task_sleep(%struct.Process* %1)
br label %2
}
g2(a) long a;
{
  if (a != 0xdeadbeefL)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<g2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xdeadbeef,%eax
cmp    %rax,-0x8(%rbp)
je     1140 <g2+0x20>
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<g2>:
push   %rax
mov    $0xdeadbeef,%eax
cmp    %rax,%rdi
jne    1132 <g2+0x12>
xor    %edi,%edi
call   1040 <exit@plt>
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @g2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 3735928559
br i1 %4, label %5, label %6
5: ; preds = %1
unreachable
6: ; preds = %1
unreachable
}

LLVM IR (-O2):
define i32 @g2(i64 %0) {
%2 = icmp eq i64 %0, 3735928559
br i1 %2, label %4, label %3
3: ; preds = %1
tail call void @abort()
unreachable
4: ; preds = %1
tail call void @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ flash_write(int, int);
void flash_read_mode(int offset) { flash_write(offset, 0xff); }


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

x86 assembly (clang, -O2):
<flash_read_mode>:
mov    $0xff,%esi
jmp    1030 <flash_write@plt>

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

LLVM IR (-O2):
define void @flash_read_mode(i32 %0) {
%2 = tail call i32 @flash_write(i32 %0, i32 255)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_hello2();
int /*<<< orphan*/ printf(char *);
int other_hello() {
  printf("Hello from otherdll\n");
  my_hello2();
}


x86 assembly (clang, -O0):
<other_hello>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <my_hello2@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<other_hello>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <my_hello2@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Hello from otherdll\0A\00"
define i32 @other_hello() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @my_hello2()
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@str = [20 x i8] c"Hello from otherdll\00"
define i32 @other_hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @my_hello2()
ret i32 undef
}
double ldexp(val, exp)
double val;
int exp;
{ return (0); }


x86 assembly (clang, -O0):
<ldexp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldexp>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @ldexp(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @ldexp(double %0, i32 %1) {
ret double 0.000000e+00
}
void foo(int i) {
  if (i > 1000) {
    return;
  }
  if (i < 50) {
    return;
  }
  if (i < 75) {
    return;
  }
  if (i < 90) {
    return;
  }
  if (i < 100) {
    return;
  }
  return;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x3e8,-0x4(%rbp)
jle    1119 <foo+0x19>
jmp    115a <foo+0x5a>
cmpl   $0x32,-0x4(%rbp)
jge    1128 <foo+0x28>
jmp    115a <foo+0x5a>
cmpl   $0x4b,-0x4(%rbp)
jge    1137 <foo+0x37>
jmp    115a <foo+0x5a>
cmpl   $0x5a,-0x4(%rbp)
jge    1146 <foo+0x46>
jmp    115a <foo+0x5a>
cmpl   $0x64,-0x4(%rbp)
jge    1155 <foo+0x55>
jmp    115a <foo+0x5a>
jmp    115a <foo+0x5a>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 1000
br i1 %4, label %5, label %6
5: ; preds = %1
br label %23
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 50
br i1 %8, label %9, label %10
9: ; preds = %6
br label %23
10: ; preds = %6
%11 = load i32, i32* %2
%12 = icmp slt i32 %11, 75
br i1 %12, label %13, label %14
13: ; preds = %10
br label %23
14: ; preds = %10
%15 = load i32, i32* %2
%16 = icmp slt i32 %15, 90
br i1 %16, label %17, label %18
17: ; preds = %14
br label %23
18: ; preds = %14
%19 = load i32, i32* %2
%20 = icmp slt i32 %19, 100
br i1 %20, label %21, label %22
21: ; preds = %18
br label %23
22: ; preds = %18
br label %23
23: ; preds = %22, %21, %17, %13, %9, %5
ret void
}

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

/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void write_header(FILE *out) {
  fputs("/*\n"
        " *  DO NOT EDIT THIS FILE!\n"
        " *\n"
        " *  It was automatically generated from image file\n"
        " *\n"
        " *  Static dietsplash image\n"
        " */\n\n"
        "#include \"pnmtologo.h\"\n\n"
        "#ifndef __DIETSPLASH_STATICLOGO_C\n"
        "#define __DIETSPLASH_STATICLOGO_C\n\n",
        out);
}


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

x86 assembly (clang, -O2):
<write_header>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0xd5,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [214 x i8] c"/*\0A * DO NOT EDIT THIS FILE!\0A *\0A * It was automatically generated from image file\0A *\0A * Static dietsplash image\0A */\0A\0A#include \22pnmtologo.h\22\0A\0A#ifndef __DIETSPLASH_STATICLOGO_C\0A#define __DIETSPLASH_STATICLOGO_C\0A\0A\00"
define void @write_header(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fputs(i8* getelementptr inbounds ([214 x i8], [214 x i8]* @.str, i64 0, i64 0), i32* %3)
ret void
}

LLVM IR (-O2):
@.str = [214 x i8] c"/*\0A * DO NOT EDIT THIS FILE!\0A *\0A * It was automatically generated from image file\0A *\0A * Static dietsplash image\0A */\0A\0A#include \22pnmtologo.h\22\0A\0A#ifndef __DIETSPLASH_STATICLOGO_C\0A#define __DIETSPLASH_STATICLOGO_C\0A\0A\00"
define void @write_header(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([214 x i8], [214 x i8]* @.str, i64 0, i64 0), i64 213, i64 1, i32* %0)
ret void
}
void I422ToRGBARow_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @I422ToRGBARow_AVX2() {
ret void
}
/* Variables and functions */
double ulaw_to_float(unsigned char);
void ulaw_to_float64_array(const void *__restrict in, double *__restrict out,
                           size_t len) {
  size_t i;
  for (i = 0; i < len; i++) {
    out[i] = ulaw_to_float(((unsigned char *)in)[i]);
  }
}


x86 assembly (clang, -O0):
<ulaw_to_float64_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1169 <ulaw_to_float64_array+0x59>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movzbl (%rax,%rcx,1),%edi
call   1030 <ulaw_to_float@plt>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <ulaw_to_float64_array+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ulaw_to_float64_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdx,%rdx
je     1149 <ulaw_to_float64_array+0x39>
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movzbl (%r15,%rbx,1),%edi
call   1030 <ulaw_to_float@plt>
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <ulaw_to_float64_array+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ulaw_to_float64_array(i8* noalias %0, double* noalias %1, i64 %2) {
%4 = alloca i8*
%5 = alloca double*
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %4
store double* %1, double** %5
store i64 %2, i64* %6
store i64 0, i64* %7
br label %8
8: ; preds = %21, %3
%9 = load i64, i64* %7
%10 = load i64, i64* %6
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %24
12: ; preds = %8
%13 = load i8*, i8** %4
%14 = load i64, i64* %7
%15 = getelementptr inbounds i8, i8* %13, i64 %14
%16 = load i8, i8* %15
%17 = call double @ulaw_to_float(i8 zeroext %16)
%18 = load double*, double** %5
%19 = load i64, i64* %7
%20 = getelementptr inbounds double, double* %18, i64 %19
store double %17, double* %20
br label %21
21: ; preds = %12
%22 = load i64, i64* %7
%23 = add i64 %22, 1
store i64 %23, i64* %7
br label %8
24: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @ulaw_to_float64_array(i8* noalias nocapture %0, double* noalias nocapture writeonly %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %13, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %11, %5 ], [ 0, %3 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = tail call double @ulaw_to_float(i8 zeroext %8)
%10 = getelementptr inbounds double, double* %1, i64 %6
store double %9, double* %10
%11 = add nuw i64 %6, 1
%12 = icmp eq i64 %11, %2
br i1 %12, label %13, label %5
13: ; preds = %5, %3
ret void
}
void RTLockValidatorRecSharedInit(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLockValidatorRecSharedInit() {
ret void
}
void Userdef_OSTM0_WaitInt(void) {}


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

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

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

LLVM IR (-O2):
define void @Userdef_OSTM0_WaitInt() {
ret void
}
int function7(int a, int b) {
  int c = a % b;
  b = -a * (b + c);
  return c - b / 2;
}


x86 assembly (clang, -O0):
<function7>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<function7>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
add    %edx,%esi
imul   %edi,%esi
mov    %esi,%ecx
neg    %ecx
shr    $0x1f,%ecx
sub    %esi,%ecx
sar    %ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @function7(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = srem i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = sub nsw i32 0, %9
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = add nsw i32 %11, %12
%14 = mul nsw i32 %10, %13
store i32 %14, i32* %4
%15 = load i32, i32* %5
%16 = load i32, i32* %4
%17 = sdiv i32 %16, 2
%18 = sub nsw i32 %15, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @function7(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = add nsw i32 %3, %1
%5 = mul i32 %4, %0
%6 = sub i32 0, %5
%7 = sdiv i32 %6, -2
%8 = add i32 %7, %3
ret i32 %8
}
void null_close(void) {}


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

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

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

LLVM IR (-O2):
define void @null_close() {
ret void
}