xunge/DecIR huggingface dataset:
/* Variables and functions */
void Default_PendSV_Handler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Default_PendSV_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Default_PendSV_Handler+0x9>
jmp    1109 <Default_PendSV_Handler+0x9>

x86 assembly (clang, -O2):
<Default_PendSV_Handler>:
jmp    1100 <Default_PendSV_Handler>

LLVM IR (-O0):
define void @Default_PendSV_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Default_PendSV_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ msg_cond_signal();
void thread_signal() { msg_cond_signal(); }


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

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

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

LLVM IR (-O2):
define void @thread_signal() {
%1 = tail call i32 (...) @msg_cond_signal()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ output(char *);
void printPageOutInfo(const char *cmd) {
  (void)cmd;
  output("Paged out Pages\t0\t0\t1/s\n");
}


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Paged out Pages\090\090\091/s\0A\00"
define void @printPageOutInfo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @output(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Paged out Pages\090\090\091/s\0A\00"
define void @printPageOutInfo(i8* nocapture readnone %0) {
%2 = tail call i32 @output(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}
void cse_close_all() {}


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

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

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

LLVM IR (-O2):
define void @cse_close_all() {
ret void
}
/* Type definitions */
struct sockaddr_in {
  int /*<<< orphan*/ sin_addr;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int inet_pton(int /*<<< orphan*/, char const *, int /*<<< orphan*/ *);
int is_valid_ip(const char *ip) {
  struct sockaddr_in sa;
  int result = inet_pton(AF_INET, ip, &(sa.sin_addr));
  return result != 0;
}


x86 assembly (clang, -O0):
<is_valid_ip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <inet_pton@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_ip>:
push   %rax
mov    %rdi,%rsi
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rdx
call   1030 <inet_pton@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
@AF_INET = global i32 0
define i32 @is_valid_ip(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.sockaddr_in
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i32, i32* @AF_INET
%6 = load i8*, i8** %2
%7 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i32 0, i32 0
%8 = call i32 @inet_pton(i32 %5, i8* %6, i32* %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
@AF_INET = global i32 0
define i32 @is_valid_ip(i8* %0) {
%2 = alloca %struct.sockaddr_in
%3 = bitcast %struct.sockaddr_in* %2 to i8*
%4 = load i32, i32* @AF_INET
%5 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 0
%6 = call i32 @inet_pton(i32 %4, i8* %0, i32* %5)
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xb5() {
  Assert_real((islower(181) == 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_islower.c",
              910, ("islower should be 0 for 0xb5"));
}


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

x86 assembly (clang, -O2):
<t_islower_0xb5>:
push   %rax
mov    $0xb5,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x38e,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xb5\00"
define void @t_islower_0xb5() {
%1 = call i64 @islower(i32 181)
%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 910, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xb5\00"
define void @t_islower_0xb5() {
%1 = tail call i64 @islower(i32 181)
%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 910, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
float __glsl_step(float edge, float x) { return x < edge ? 0.0 : 1.0; }


x86 assembly (clang, -O0):
<__glsl_step>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm2
movss  -0x4(%rbp),%xmm1
xorps  %xmm0,%xmm0
movsd  0xedd(%rip),%xmm3
movsd  %xmm3,-0x18(%rbp)
ucomiss %xmm2,%xmm1
movsd  %xmm0,-0x10(%rbp)
ja     1140 <__glsl_step+0x40>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__glsl_step>:
cmpltss %xmm0,%xmm1
movss  0xef3(%rip),%xmm0
andnps %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @__glsl_step(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = load float, float* %3
%7 = fcmp olt float %5, %6
%8 = zext i1 %7 to i64
%9 = select i1 %7, double 0.000000e+00, double 1.000000e+00
%10 = fptrunc double %9 to float
ret float %10
}

LLVM IR (-O2):
define float @__glsl_step(float %0, float %1) {
%3 = fcmp olt float %1, %0
%4 = select i1 %3, float 0.000000e+00, float 1.000000e+00
ret float %4
}
/* Variables and functions */
int u8isbasespacei(int /*<<< orphan*/);
int /*<<< orphan*/ u8tointc(char *);
int u8isbasespacec(char *c) { return u8isbasespacei(u8tointc(c)); }


x86 assembly (clang, -O0):
<u8isbasespacec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <u8tointc@plt>
mov    %eax,%edi
call   1040 <u8isbasespacei@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8isbasespacec>:
push   %rax
call   1030 <u8tointc@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <u8isbasespacei@plt>

LLVM IR (-O0):
define i32 @u8isbasespacec(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @u8tointc(i8* %3)
%5 = call i32 @u8isbasespacei(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @u8isbasespacec(i8* %0) {
%2 = tail call i32 @u8tointc(i8* %0)
%3 = tail call i32 @u8isbasespacei(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ subExpr();
int /*<<< orphan*/ term();
void expr() {
  term();
  subExpr();
}


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

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

LLVM IR (-O0):
define void @expr() {
%1 = call i32 (...) @term()
%2 = call i32 (...) @subExpr()
ret void
}

LLVM IR (-O2):
define void @expr() {
%1 = tail call i32 (...) @term()
%2 = tail call i32 (...) @subExpr()
ret void
}
/* Variables and functions */
scalar_t__ calloc(long, int);
scalar_t__ malloc(long);
int /*<<< orphan*/ perror(char const *);
long *svd_longArray(long size, char empty, const char *name) {
  long *a;
  if (empty)
    a = (long *)calloc(size, sizeof(long));
  else
    a = (long *)malloc(size * sizeof(long));
  if (!a) {
    perror(name);
  }
  return a;
}


x86 assembly (clang, -O0):
<svd_longArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
cmpb   $0x0,-0x9(%rbp)
je     1167 <svd_longArray+0x37>
mov    -0x8(%rbp),%rdi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x20(%rbp)
jmp    1178 <svd_longArray+0x48>
mov    -0x8(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    118c <svd_longArray+0x5c>
mov    -0x18(%rbp),%rdi
call   1050 <perror@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svd_longArray>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
test   %sil,%sil
je     1148 <svd_longArray+0x18>
mov    $0x8,%esi
call   1030 <calloc@plt>
jmp    1151 <svd_longArray+0x21>
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1164 <svd_longArray+0x34>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %r14,%rdi
call   1050 <perror@plt>
jmp    1159 <svd_longArray+0x29>

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

LLVM IR (-O2):
define i64* @svd_longArray(i64 %0, i8 signext %1, i8* nocapture %2) {
%4 = icmp eq i8 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i64 @calloc(i64 %0, i32 8)
br label %10
7: ; preds = %3
%8 = shl i64 %0, 3
%9 = tail call i64 @malloc(i64 %8)
br label %10
10: ; preds = %7, %5
%11 = phi i64 [ %6, %5 ], [ %9, %7 ]
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = tail call i32 @perror(i8* %2)
br label %15
15: ; preds = %13, %10
%16 = inttoptr i64 %11 to i64*
ret i64* %16
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ random();
uint16_t get_random_id(void) { return random(); }


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

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

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

LLVM IR (-O2):
define i32 @get_random_id() {
%1 = tail call i32 (...) @random()
ret i32 %1
}
/* Variables and functions */
char *basm_ralloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *basm_rstrdup(char *str) {
  char *t;
  t = basm_ralloc(strlen(str) + 1);
  strcpy(t, str);
  return (t);
}


x86 assembly (clang, -O0):
<basm_rstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <basm_ralloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basm_rstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <basm_ralloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @basm_rstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @basm_ralloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @basm_rstrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @basm_ralloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Type definitions */
struct timeval {
  double tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double timer_get_time_in_ms() {
  struct timeval result;
  gettimeofday(&result, NULL);
  return (result.tv_sec) * 1000.0 + ((double)(result.tv_usec)) / 1000.0;
}


x86 assembly (clang, -O0):
<timer_get_time_in_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sdq -0x8(%rbp),%xmm1
movsd  0xec8(%rip),%xmm2
divsd  %xmm2,%xmm1
movsd  0xebc(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_get_time_in_ms>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
movsd  0xed1(%rip),%xmm0
divsd  %xmm0,%xmm1
mulsd  0x8(%rsp),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i64 }
define double @timer_get_time_in_ms() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to double
%8 = fdiv double %7, 1.000000e+03
%9 = call double @llvm.fmuladd.f64(double %4, double 1.000000e+03, double %8)
ret double %9
}

LLVM IR (-O2):
%struct.timeval = type { double, i64 }
define double @timer_get_time_in_ms() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = fdiv double %8, 1.000000e+03
%10 = tail call double @llvm.fmuladd.f64(double %5, double 1.000000e+03, double %9)
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xee() {
  Assert_real((isspace(238) == 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",
              1195, ("isspace should be 0 for 0xee"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xee>:
push   %rax
mov    $0xee,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4ab,%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 0xee\00"
define void @t_isspace_0xee() {
%1 = call i64 @isspace(i32 238)
%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 1195, 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 0xee\00"
define void @t_isspace_0xee() {
%1 = tail call i64 @isspace(i32 238)
%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 1195, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned xrop3_11_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = S & stk3;
  stk1 = T | stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_11_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_11_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %ecx,%eax
not    %eax
or     %edi,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_11_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %5
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %6
%26 = load i32, i32* %10
%27 = and i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %7
%29 = load i32, i32* %9
%30 = or i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = xor i32 %31, -1
store i32 %32, i32* %8
%33 = load i32, i32* %8
%34 = load i32, i32* %6
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = load i32, i32* %7
%38 = xor i32 %37, -1
%39 = and i32 %36, %38
%40 = load i32, i32* %5
%41 = load i32, i32* %6
%42 = and i32 %40, %41
%43 = or i32 %39, %42
%44 = load i32, i32* %5
%45 = load i32, i32* %7
%46 = and i32 %44, %45
%47 = or i32 %43, %46
ret i32 %47
}

LLVM IR (-O2):
define i32 @xrop3_11_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ usage();
char const *string_arg(int *argc, char ***argv) {
  if (*argc < 2) {
    usage();
    return (char const *)0;
  }
  *argc -= 1;
  *argv += 1;
  return (*argv)[0];
}


x86 assembly (clang, -O0):
<string_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x2,(%rax)
jge    1141 <string_arg+0x31>
mov    $0x0,%al
call   1030 <usage@plt>
movq   $0x0,-0x8(%rbp)
jmp    1168 <string_arg+0x58>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
sub    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
add    $0x8,%rcx
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_arg>:
push   %rbx
mov    (%rdi),%eax
cmp    $0x1,%eax
jg     1123 <string_arg+0x13>
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <usage@plt>
jmp    1136 <string_arg+0x26>
add    $0xffffffff,%eax
mov    %eax,(%rdi)
mov    (%rsi),%rax
lea    0x8(%rax),%rcx
mov    %rcx,(%rsi)
mov    0x8(%rax),%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @string_arg(i32* %0, i8*** %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i8***
store i32* %0, i32** %4
store i8*** %1, i8**** %5
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (...) @usage()
store i8* null, i8** %3
br label %22
11: ; preds = %2
%12 = load i32*, i32** %4
%13 = load i32, i32* %12
%14 = sub nsw i32 %13, 1
store i32 %14, i32* %12
%15 = load i8***, i8**** %5
%16 = load i8**, i8*** %15
%17 = getelementptr inbounds i8*, i8** %16, i64 1
store i8** %17, i8*** %15
%18 = load i8***, i8**** %5
%19 = load i8**, i8*** %18
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
store i8* %21, i8** %3
br label %22
22: ; preds = %11, %9
%23 = load i8*, i8** %3
ret i8* %23
}

LLVM IR (-O2):
define i8* @string_arg(i32* nocapture %0, i8*** nocapture %1) {
%3 = load i32, i32* %0
%4 = icmp slt i32 %3, 2
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @usage()
br label %12
7: ; preds = %2
%8 = add nsw i32 %3, -1
store i32 %8, i32* %0
%9 = load i8**, i8*** %1
%10 = getelementptr inbounds i8*, i8** %9, i64 1
store i8** %10, i8*** %1
%11 = load i8*, i8** %10
br label %12
12: ; preds = %7, %5
%13 = phi i8* [ null, %5 ], [ %11, %7 ]
ret i8* %13
}
/* Variables and functions */
int /*<<< orphan*/ print_header();
int /*<<< orphan*/ print_help();
int /*<<< orphan*/ printf(char *);
void print_unknown_arg(void) {
  print_header();
  printf("invalid or unknown argument\n");
  print_help();
}


x86 assembly (clang, -O0):
<print_unknown_arg>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <print_header@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <print_help@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_unknown_arg>:
push   %rax
xor    %eax,%eax
call   1040 <print_header@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <print_help@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"invalid or unknown argument\0A\00"
define void @print_unknown_arg() {
%1 = call i32 (...) @print_header()
%2 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @print_help()
ret void
}

LLVM IR (-O2):
@str = [28 x i8] c"invalid or unknown argument\00"
define void @print_unknown_arg() {
%1 = tail call i32 (...) @print_header()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @print_help()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addFoncT(char *, void (*)(), int, int);
void addInst(char *l, void (*f)(void)) { addFoncT(l, f, 1, 4); }


x86 assembly (clang, -O0):
<addInst>:
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    $0x1,%edx
mov    $0x4,%ecx
call   1030 <addFoncT@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addInst>:
mov    $0x1,%edx
mov    $0x4,%ecx
jmp    1030 <addFoncT@plt>

LLVM IR (-O0):
define void @addInst(i8* %0, void ()* %1) {
%3 = alloca i8*
%4 = alloca void ()*
store i8* %0, i8** %3
store void ()* %1, void ()** %4
%5 = load i8*, i8** %3
%6 = load void ()*, void ()** %4
%7 = bitcast void ()* %6 to void (...)*
%8 = call i32 @addFoncT(i8* %5, void (...)* %7, i32 1, i32 4)
ret void
}

LLVM IR (-O2):
define void @addInst(i8* %0, void ()* %1) {
%3 = bitcast void ()* %1 to void (...)*
%4 = tail call i32 @addFoncT(i8* %0, void (...)* %3, i32 1, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mymemdump(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stdout;
int fact(int n) {
  int val;
  printf("fact(%d)\n", n);
  if (n == 1) {
    val = 1;
  } else {
    val = n * fact(n - 1);
  }
  mymemdump(stdout, (char *)&val, 128);
  return val;
}


x86 assembly (clang, -O0):
<fact>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x1,-0x4(%rbp)
jne    1160 <fact+0x30>
movl   $0x1,-0x8(%rbp)
jmp    117c <fact+0x4c>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1040 <fact@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    0x2e5d(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
mov    $0x80,%edx
call   1050 <mymemdump@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fact>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0xec2(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    $0x1,%eax
cmp    $0x1,%ebx
je     115a <fact+0x2a>
lea    -0x1(%rbx),%edi
call   1040 <fact@plt>
imul   %ebx,%eax
mov    %eax,0xc(%rsp)
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
lea    0xc(%rsp),%rsi
mov    $0x80,%edx
call   1050 <mymemdump@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"fact(%d)\0A\00"
@stdout = global i32 0
define i32 @fact(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %3
br label %15
9: ; preds = %1
%10 = load i32, i32* %2
%11 = load i32, i32* %2
%12 = sub nsw i32 %11, 1
%13 = call i32 @fact(i32 %12)
%14 = mul nsw i32 %10, %13
store i32 %14, i32* %3
br label %15
15: ; preds = %9, %8
%16 = load i32, i32* @stdout
%17 = bitcast i32* %3 to i8*
%18 = call i32 @mymemdump(i32 %16, i8* %17, i32 128)
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [10 x i8] c"fact(%d)\0A\00"
@stdout = global i32 0
define i32 @fact(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = icmp eq i32 %0, 1
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = add nsw i32 %0, -1
%8 = tail call i32 @fact(i32 %7)
%9 = mul nsw i32 %8, %0
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ 1, %1 ]
store i32 %11, i32* %2
%12 = load i32, i32* @stdout
%13 = call i32 @mymemdump(i32 %12, i8* %3, i32 128)
%14 = load i32, i32* %2
ret i32 %14
}
/* Type definitions */
struct cpu {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cpu_set_r8(struct cpu *, int, unsigned char);
void cpu_set_b(struct cpu *cpu, unsigned char b) { cpu_set_r8(cpu, (3), b); }


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

x86 assembly (clang, -O2):
<cpu_set_b>:
mov    %esi,%edx
mov    $0x3,%esi
jmp    1030 <cpu_set_r8@plt>

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

LLVM IR (-O2):
%struct.cpu = type { i32 }
define void @cpu_set_b(%struct.cpu* %0, i8 zeroext %1) {
%3 = tail call i32 @cpu_set_r8(%struct.cpu* %0, i32 3, i8 zeroext %1)
ret void
}
/* Variables and functions */
double exp(double);
int /*<<< orphan*/ file_write(double, char *);
void test_exp() {
  double x, step;
  for (x = -10.0; x <= 10.0; x += 0.1) {
    file_write(x, "x_6");
    file_write(exp(x), "exp_x");
  }
}


x86 assembly (clang, -O0):
<test_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xed0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xecb(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     1186 <test_exp+0x66>
movsd  -0x8(%rbp),%xmm0
lea    0xec4(%rip),%rdi
call   1040 <file_write@plt>
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
lea    0xeb2(%rip),%rdi
call   1040 <file_write@plt>
movsd  0xe99(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1135 <test_exp+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_exp>:
push   %r14
push   %rbx
push   %rax
movsd  0xed4(%rip),%xmm0
lea    0xee5(%rip),%r14
lea    0xee2(%rip),%rbx
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,(%rsp)
movsd  (%rsp),%xmm0
mov    %r14,%rdi
call   1040 <file_write@plt>
movsd  (%rsp),%xmm0
call   1030 <exp@plt>
mov    %rbx,%rdi
call   1040 <file_write@plt>
movsd  (%rsp),%xmm0
addsd  0xe97(%rip),%xmm0
movsd  0xe97(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1140 <test_exp+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"x_6\00"
@.str.1 = [6 x i8] c"exp_x\00"
define void @test_exp() {
%1 = alloca double
%2 = alloca double
store double -1.000000e+01, double* %1
br label %3
3: ; preds = %12, %0
%4 = load double, double* %1
%5 = fcmp ole double %4, 1.000000e+01
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = load double, double* %1
%8 = call i32 @file_write(double %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%9 = load double, double* %1
%10 = call double @exp(double %9)
%11 = call i32 @file_write(double %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %6
%13 = load double, double* %1
%14 = fadd double %13, 1.000000e-01
store double %14, double* %1
br label %3
15: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"x_6\00"
@.str.1 = [6 x i8] c"exp_x\00"
define void @test_exp() {
br label %1
1: ; preds = %0, %1
%2 = phi double [ -1.000000e+01, %0 ], [ %6, %1 ]
%3 = tail call i32 @file_write(double %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = tail call double @exp(double %2)
%5 = tail call i32 @file_write(double %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = fadd double %2, 1.000000e-01
%7 = fcmp ugt double %6, 1.000000e+01
br i1 %7, label %8, label %1
8: ; preds = %1
ret void
}
/* Variables and functions */
int *malloc(size_t);
int rand();
int *rand_array(size_t nmemb) {
  int *base = malloc(nmemb * sizeof(int));
  for (size_t i = 0; i < nmemb; ++i)
    base[i] = rand() % (1 << nmemb);
  return base;
}


x86 assembly (clang, -O0):
<rand_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
shl    $0x2,%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1186 <rand_array+0x66>
mov    $0x0,%al
call   1040 <rand@plt>
mov    -0x8(%rbp),%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1145 <rand_array+0x25>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_array>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0x0(,%rdi,4),%rdi
call   1030 <malloc@plt>
mov    %rax,%r15
test   %r14,%r14
je     1167 <rand_array+0x47>
mov    $0x1,%ebp
mov    %r14d,%ecx
shl    %cl,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <rand@plt>
cltd
idiv   %ebp
mov    %edx,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1150 <rand_array+0x30>
mov    %r15,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32* @rand_array(i64 %0) {
%2 = alloca i64
%3 = alloca i32*
%4 = alloca i64
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = mul i64 %5, 4
%7 = call i32* @malloc(i64 %6)
store i32* %7, i32** %3
store i64 0, i64* %4
br label %8
8: ; preds = %21, %1
%9 = load i64, i64* %4
%10 = load i64, i64* %2
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %24
12: ; preds = %8
%13 = call i32 (...) @rand()
%14 = load i64, i64* %2
%15 = trunc i64 %14 to i32
%16 = shl i32 1, %15
%17 = srem i32 %13, %16
%18 = load i32*, i32** %3
%19 = load i64, i64* %4
%20 = getelementptr inbounds i32, i32* %18, i64 %19
store i32 %17, i32* %20
br label %21
21: ; preds = %12
%22 = load i64, i64* %4
%23 = add i64 %22, 1
store i64 %23, i64* %4
br label %8
24: ; preds = %8
%25 = load i32*, i32** %3
ret i32* %25
}

LLVM IR (-O2):
define noalias i32* @rand_array(i64 %0) {
%2 = shl i64 %0, 2
%3 = tail call i32* @malloc(i64 %2)
%4 = icmp eq i64 %0, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = trunc i64 %0 to i32
%7 = shl nuw i32 1, %6
br label %9
8: ; preds = %9, %1
ret i32* %3
9: ; preds = %5, %9
%10 = phi i64 [ 0, %5 ], [ %14, %9 ]
%11 = tail call i32 (...) @rand()
%12 = srem i32 %11, %7
%13 = getelementptr inbounds i32, i32* %3, i64 %10
store i32 %12, i32* %13
%14 = add nuw i64 %10, 1
%15 = icmp eq i64 %14, %0
br i1 %15, label %8, label %9
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int proc_2(int /*<<< orphan*/, int, int, int);
int proc_1(jmp_buf env, int i, int j, int k, int l) {
  return proc_2(env, i, j, k + 1);
}


x86 assembly (clang, -O0):
<proc_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
call   1030 <proc_2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc_1>:
add    $0x1,%ecx
jmp    1030 <proc_2@plt>

LLVM IR (-O0):
define i32 @proc_1(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 = add nsw i32 %14, 1
%16 = call i32 @proc_2(i32 %11, i32 %12, i32 %13, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @proc_1(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = add nsw i32 %3, 1
%7 = tail call i32 @proc_2(i32 %0, i32 %1, i32 %2, i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_set_source_volume_by_name() {
  printf("NOT IMPLEMENTED:"
         "pa_context_set_source_volume_by_name"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [54 x i8] c"NOT IMPLEMENTED:pa_context_set_source_volume_by_name\0A\00"
define i32 @pa_context_set_source_volume_by_name() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [53 x i8] c"NOT IMPLEMENTED:pa_context_set_source_volume_by_name\00"
define i32 @pa_context_set_source_volume_by_name() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR72_get(void) { return U_WMRCORENONE_get("U_WMR72"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR72\00"
define i32 @U_WMR72_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR72\00"
define i32 @U_WMR72_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int open(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, int, int);
int SPI_open(uint8_t bus, uint8_t cs) {
  char device[20];
  sprintf(device, "/dev/spidev%d.%d", bus, cs);
  return open(device, O_RDWR, 0);
}


x86 assembly (clang, -O0):
<SPI_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xec1(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x20(%rbp),%rdi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <open@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SPI_open>:
push   %rbx
sub    $0x20,%rsp
mov    %esi,%ecx
mov    %edi,%edx
lea    0xed0(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
xor    %edx,%edx
call   1030 <open@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"/dev/spidev%d.%d\00"
@O_RDWR = global i32 0
define i32 @SPI_open(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [20 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%11 = load i32, i32* @O_RDWR
%12 = call i32 @open(i8* %10, i32 %11, i32 0)
ret i32 %12
}

LLVM IR (-O2):
@.str = [17 x i8] c"/dev/spidev%d.%d\00"
@O_RDWR = global i32 0
define i32 @SPI_open(i32 %0, i32 %1) {
%3 = alloca [20 x i8]
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%6 = load i32, i32* @O_RDWR
%7 = call i32 @open(i8* %4, i32 %6, i32 0)
ret i32 %7
}
void foo_1_1_1_2_1_1_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_1_2_1_1_1_1_2() {
ret void
}
/* Variables and functions */
int test_and_set_bit(int, void volatile *);
int sync_test_and_set_bit(int nr, volatile void *addr) {
  return test_and_set_bit(nr, addr);
}


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

x86 assembly (clang, -O2):
<sync_test_and_set_bit>:
jmp    1030 <test_and_set_bit@plt>

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

LLVM IR (-O2):
define i32 @sync_test_and_set_bit(i32 %0, i8* %1) {
%3 = tail call i32 @test_and_set_bit(i32 %0, i8* %1)
ret i32 %3
}
int equal_string(void *s1, void *s2) { return (char *)s1 == (char *)s2; }


x86 assembly (clang, -O0):
<equal_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal_string>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @equal_string(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = icmp eq i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @equal_string(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
const char *__malidrv_build_info(void) {
  return "malidrv:  API_VERSION=800 REPO_URL=heads/portland_m "
         "REVISION=r6p0-01rel0 CHANGED_REVISION=a22b7e2 CHANGE_DATE=2015-11-02 "
         "16:02:44 +0800 BUILD_DATE=Wed Nov  4 15:28:57 CST 2015 BUILD=debug "
         "TARGET_PLATFORM=default_8a MALI_PLATFORM= KDIR= "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING= "
         "USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 USING_DVFS=n "
         "MALI_UPPER_HALF_SCHEDULING=1";
}


x86 assembly (clang, -O0):
<__malidrv_build_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [383 x i8] c"malidrv: API_VERSION=800 REPO_URL=heads/portland_m REVISION=r6p0-01rel0 CHANGED_REVISION=a22b7e2 CHANGE_DATE=2015-11-02 16:02:44 +0800 BUILD_DATE=Wed Nov 4 15:28:57 CST 2015 BUILD=debug TARGET_PLATFORM=default_8a MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING= USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 USING_DVFS=n MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([383 x i8], [383 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [383 x i8] c"malidrv: API_VERSION=800 REPO_URL=heads/portland_m REVISION=r6p0-01rel0 CHANGED_REVISION=a22b7e2 CHANGE_DATE=2015-11-02 16:02:44 +0800 BUILD_DATE=Wed Nov 4 15:28:57 CST 2015 BUILD=debug TARGET_PLATFORM=default_8a MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING= USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 USING_DVFS=n MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([383 x i8], [383 x i8]* @.str, i64 0, i64 0)
}
int show_my(char *text) {}


x86 assembly (clang, -O0):
<show_my>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @show_my(i8* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x13() {
  Assert_real((islower(19) == 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_islower.c",
              100, ("islower should be 0 for 0x13"));
}


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

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