xunge/DecIR huggingface dataset:
void motion_test4(int *data) {
  int i = 0;
  int j = data[2];
  do {
    data[i] = 2 / j + i - 1;
    i++;
  } while (i < data[2]);
}


x86 assembly (clang, -O0):
<motion_test4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    $0x2,%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,%edx
add    -0xc(%rbp),%edx
sub    $0x1,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    0x8(%rcx),%eax
jl     1119 <motion_test4+0x19>
pop    %rbp
ret

x86 assembly (clang, -O2):
<motion_test4>:
xor    %ecx,%ecx
mov    $0x2,%eax
xor    %edx,%edx
idivl  0x8(%rdi)
add    $0xffffffff,%eax
nop
lea    (%rax,%rcx,1),%edx
mov    %edx,(%rdi,%rcx,4)
add    $0x1,%rcx
movslq 0x8(%rdi),%rdx
cmp    %rdx,%rcx
jl     1110 <motion_test4+0x10>
ret

LLVM IR (-O0):
define void @motion_test4(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 2
%7 = load i32, i32* %6
store i32 %7, i32* %4
br label %8
8: ; preds = %20, %1
%9 = load i32, i32* %4
%10 = sdiv i32 2, %9
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
%13 = sub nsw i32 %12, 1
%14 = load i32*, i32** %2
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
store i32 %13, i32* %17
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %20
20: ; preds = %8
%21 = load i32, i32* %3
%22 = load i32*, i32** %2
%23 = getelementptr inbounds i32, i32* %22, i64 2
%24 = load i32, i32* %23
%25 = icmp slt i32 %21, %24
br i1 %25, label %8, label %26
26: ; preds = %20
ret void
}

LLVM IR (-O2):
define void @motion_test4(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = sdiv i32 2, %3
br label %5
5: ; preds = %5, %1
%6 = phi i64 [ %11, %5 ], [ 0, %1 ]
%7 = trunc i64 %6 to i32
%8 = add i32 %7, -1
%9 = add i32 %8, %4
%10 = getelementptr inbounds i32, i32* %0, i64 %6
store i32 %9, i32* %10
%11 = add nuw nsw i64 %6, 1
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = icmp slt i64 %11, %13
br i1 %14, label %5, label %15
15: ; preds = %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emit_andimm(int, int, int);
int /*<<< orphan*/ emit_cmpimm(int, int);
int /*<<< orphan*/ emit_orreq_imm(int, int, int);
void emit_cmpeqimm(int s, int imm, int sr, int temp) {
  emit_andimm(sr, ~1, sr);
  emit_cmpimm(s, imm);
  emit_orreq_imm(sr, 1, sr);
}


x86 assembly (clang, -O0):
<emit_cmpeqimm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%edx
mov    $0xfffffffe,%esi
call   1050 <emit_andimm@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <emit_cmpimm@plt>
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%edx
mov    $0x1,%esi
call   1040 <emit_orreq_imm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_cmpeqimm>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
mov    %edx,%edi
mov    $0xfffffffe,%esi
call   1050 <emit_andimm@plt>
mov    %ebp,%edi
mov    %r14d,%esi
call   1030 <emit_cmpimm@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    %ebx,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <emit_orreq_imm@plt>

LLVM IR (-O0):
define void @emit_cmpeqimm(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = load i32, i32* %7
%11 = call i32 @emit_andimm(i32 %9, i32 -2, i32 %10)
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = call i32 @emit_cmpimm(i32 %12, i32 %13)
%15 = load i32, i32* %7
%16 = load i32, i32* %7
%17 = call i32 @emit_orreq_imm(i32 %15, i32 1, i32 %16)
ret void
}

LLVM IR (-O2):
define void @emit_cmpeqimm(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @emit_andimm(i32 %2, i32 -2, i32 %2)
%6 = tail call i32 @emit_cmpimm(i32 %0, i32 %1)
%7 = tail call i32 @emit_orreq_imm(i32 %2, i32 1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
char *dlerror(void) { abort(); }


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

x86 assembly (clang, -O2):
<dlerror>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @dlerror() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define noalias i8* @dlerror() {
%1 = tail call i32 (...) @abort()
unreachable
}
void html_disp_sum(struct list *lst, double stot, double utot, double ftot,
                   double ifitot, double ifatot) {}


x86 assembly (clang, -O0):
<html_disp_sum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.list = type opaque
define void @html_disp_sum(%struct.list* %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca %struct.list*
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store %struct.list* %0, %struct.list** %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
ret void
}

LLVM IR (-O2):
%struct.list = type opaque
define void @html_disp_sum(%struct.list* nocapture %0, double %1, double %2, double %3, double %4, double %5) {
ret void
}
double jac_chain_nm6_sign(double x) { return x < 0 ? -1 : x > 0 ? 1 : x; }


x86 assembly (clang, -O0):
<jac_chain_nm6_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <jac_chain_nm6_sign+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <jac_chain_nm6_sign+0x61>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <jac_chain_nm6_sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <jac_chain_nm6_sign+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_chain_nm6_sign>:
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm1
andnpd %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
andpd  %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @jac_chain_nm6_sign(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load double, double* %2
br label %12
12: ; preds = %10, %9
%13 = phi double [ 1.000000e+00, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi double [ -1.000000e+00, %5 ], [ %13, %12 ]
ret double %15
}

LLVM IR (-O2):
define double @jac_chain_nm6_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
void rcu_init_bp(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @sws_scale() {
ret void
}
int Max3(int a, int b, int c) {
  int tmp;
  if (a > b)
    tmp = a;
  else
    tmp = b;
  if (tmp > c)
    return tmp;
  else
    return c;
}


x86 assembly (clang, -O0):
<Max3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1124 <Max3+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    112a <Max3+0x2a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1141 <Max3+0x41>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1147 <Max3+0x47>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Max3>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
cmp    %edx,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @Max3(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %1
%5 = select i1 %4, i32 %0, i32 %1
%6 = icmp sgt i32 %5, %2
%7 = select i1 %6, i32 %5, i32 %2
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ con_printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ print_rtab();
int /*<<< orphan*/ sys_getMilli();
void my_print_rtab(void) {
  con_printf("[DEBUG] current routing table (timestamp = %d):\n",
             sys_getMilli());
  print_rtab();
}


x86 assembly (clang, -O0):
<my_print_rtab>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <sys_getMilli@plt>
mov    %eax,%esi
lea    0xebc(%rip),%rdi
call   1030 <con_printf@plt>
mov    $0x0,%al
call   1050 <print_rtab@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_print_rtab>:
push   %rax
xor    %eax,%eax
call   1040 <sys_getMilli@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1030 <con_printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <print_rtab@plt>

LLVM IR (-O0):
@.str = [49 x i8] c"[DEBUG] current routing table (timestamp = %d):\0A\00"
define void @my_print_rtab() {
%1 = call i32 (...) @sys_getMilli()
%2 = call i32 @con_printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @print_rtab()
ret void
}

LLVM IR (-O2):
@.str = [49 x i8] c"[DEBUG] current routing table (timestamp = %d):\0A\00"
define void @my_print_rtab() {
%1 = tail call i32 (...) @sys_getMilli()
%2 = tail call i32 @con_printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @print_rtab()
ret void
}
/* Type definitions */
struct response {
  int dummy;
};

/* Variables and functions */
char *xml_read_chars(char *, struct response *);
char *parse_challenge_res(struct response *res) {
  return xml_read_chars("/SessionInfo/Challenge", res);
}


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

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

LLVM IR (-O0):
%struct.response = type { i32 }
@.str = [23 x i8] c"/SessionInfo/Challenge\00"
define i8* @parse_challenge_res(%struct.response* %0) {
%2 = alloca %struct.response*
store %struct.response* %0, %struct.response** %2
%3 = load %struct.response*, %struct.response** %2
%4 = call i8* @xml_read_chars(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), %struct.response* %3)
ret i8* %4
}

LLVM IR (-O2):
%struct.response = type { i32 }
@.str = [23 x i8] c"/SessionInfo/Challenge\00"
define i8* @parse_challenge_res(%struct.response* %0) {
%2 = tail call i8* @xml_read_chars(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), %struct.response* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ Send_MPlayer_Command(int, int /*<<< orphan*/);
void MPlayer_Start() { Send_MPlayer_Command(0x0E, 0); }


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

x86 assembly (clang, -O2):
<MPlayer_Start>:
mov    $0xe,%edi
xor    %esi,%esi
jmp    1030 <Send_MPlayer_Command@plt>

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

LLVM IR (-O2):
define void @MPlayer_Start() {
%1 = tail call i32 @Send_MPlayer_Command(i32 14, i32 0)
ret void
}
void test_dispose() {}


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

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

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

LLVM IR (-O2):
define void @test_dispose() {
ret void
}
const char *IDENTIFIER_POINTER(union tree_node *t) {}


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

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

LLVM IR (-O0):
%union.tree_node = type opaque
define i8* @IDENTIFIER_POINTER(%union.tree_node* %0) {
%2 = alloca i8*
%3 = alloca %union.tree_node*
store %union.tree_node* %0, %union.tree_node** %3
%4 = load i8*, i8** %2
ret i8* %4
}

LLVM IR (-O2):
%union.tree_node = type opaque
define noalias i8* @IDENTIFIER_POINTER(%union.tree_node* nocapture readnone %0) {
ret i8* undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void nocrash_fprintf() {
  FILE *f;
  f = fopen("this_file_doesnt_exist", "r");
  if (f) {
    fprintf(f, "blablabla\n");
    fclose(f);
  }
}


x86 assembly (clang, -O0):
<nocrash_fprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1173 <nocrash_fprintf+0x43>
mov    -0x8(%rbp),%rdi
lea    0xeb4(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nocrash_fprintf>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     116e <nocrash_fprintf+0x3e>
mov    %rax,%rbx
lea    0xec6(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"this_file_doesnt_exist\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [11 x i8] c"blablabla\0A\00"
define void @nocrash_fprintf() {
%1 = alloca i32*
%2 = call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %10
5: ; preds = %0
%6 = load i32*, i32** %1
%7 = call i32 @fprintf(i32* %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%8 = load i32*, i32** %1
%9 = call i32 @fclose(i32* %8)
br label %10
10: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"this_file_doesnt_exist\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [11 x i8] c"blablabla\0A\00"
define void @nocrash_fprintf() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i64 10, i64 1, i32* %1)
%5 = tail call i32 @fclose(i32* %1)
br label %6
6: ; preds = %3, %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ doupdate();
int /*<<< orphan*/ fill_line_blank(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ update_panels();
int /*<<< orphan*/ wscrl(int /*<<< orphan*/ *, int);
void scrollstatuswin(WINDOW *statuswin, int direction) {
  if (direction == 0) {
    wscrl(statuswin, 1);
    fill_line_blank(statuswin, 12);
  } else {
    wscrl(statuswin, -1);
    fill_line_blank(statuswin, 0);
  }
  update_panels();
  doupdate();
}


x86 assembly (clang, -O0):
<scrollstatuswin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    117a <scrollstatuswin+0x3a>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1060 <wscrl@plt>
mov    -0x8(%rbp),%rdi
mov    $0xc,%esi
call   1040 <fill_line_blank@plt>
jmp    1193 <scrollstatuswin+0x53>
mov    -0x8(%rbp),%rdi
mov    $0xffffffff,%esi
call   1060 <wscrl@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <fill_line_blank@plt>
mov    $0x0,%al
call   1030 <update_panels@plt>
mov    $0x0,%al
call   1050 <doupdate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scrollstatuswin>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %esi,%eax
neg    %eax
sbb    %eax,%eax
or     $0x1,%eax
xor    %ecx,%ecx
test   %esi,%esi
mov    $0xc,%ebp
cmovne %ecx,%ebp
mov    %eax,%esi
call   1060 <wscrl@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <fill_line_blank@plt>
xor    %eax,%eax
call   1030 <update_panels@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <doupdate@plt>

LLVM IR (-O0):
define void @scrollstatuswin(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i32*, i32** %3
%9 = call i32 @wscrl(i32* %8, i32 1)
%10 = load i32*, i32** %3
%11 = call i32 @fill_line_blank(i32* %10, i32 12)
br label %17
12: ; preds = %2
%13 = load i32*, i32** %3
%14 = call i32 @wscrl(i32* %13, i32 -1)
%15 = load i32*, i32** %3
%16 = call i32 @fill_line_blank(i32* %15, i32 0)
br label %17
17: ; preds = %12, %7
%18 = call i32 (...) @update_panels()
%19 = call i32 (...) @doupdate()
ret void
}

LLVM IR (-O2):
define void @scrollstatuswin(i32* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i32 1, i32 -1
%5 = select i1 %3, i32 12, i32 0
%6 = tail call i32 @wscrl(i32* %0, i32 %4)
%7 = tail call i32 @fill_line_blank(i32* %0, i32 %5)
%8 = tail call i32 (...) @update_panels()
%9 = tail call i32 (...) @doupdate()
ret void
}
void SSMR3SetCfgError(void) {}


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

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

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

LLVM IR (-O2):
define void @SSMR3SetCfgError() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ C67_asm(char *, int, int, int /*<<< orphan*/);
void C67_LDH_PTR(int r, int r2) { C67_asm("LDH.D *", r, r2, 0); }


x86 assembly (clang, -O0):
<C67_LDH_PTR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
xor    %ecx,%ecx
call   1030 <C67_asm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C67_LDH_PTR>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
xor    %ecx,%ecx
jmp    1030 <C67_asm@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"LDH.D *\00"
define void @C67_LDH_PTR(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 @C67_asm(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"LDH.D *\00"
define void @C67_LDH_PTR(i32 %0, i32 %1) {
%3 = tail call i32 @C67_asm(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 0)
ret void
}
double inscreen(int from, int to, int i, double fromr, double tor) {
  double idiff = (i - from);
  double ddiff = (to - from);
  return fromr + (tor - fromr) * idiff / ddiff;
}


x86 assembly (clang, -O0):
<inscreen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x4(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
divsd  -0x30(%rbp),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<inscreen>:
sub    %edi,%edx
cvtsi2sd %edx,%xmm2
sub    %edi,%esi
cvtsi2sd %esi,%xmm3
subsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm2
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @inscreen(i32 %0, i32 %1, i32 %2, double %3, double %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store double %3, double* %9
store double %4, double* %10
%13 = load i32, i32* %8
%14 = load i32, i32* %6
%15 = sub nsw i32 %13, %14
%16 = sitofp i32 %15 to double
store double %16, double* %11
%17 = load i32, i32* %7
%18 = load i32, i32* %6
%19 = sub nsw i32 %17, %18
%20 = sitofp i32 %19 to double
store double %20, double* %12
%21 = load double, double* %9
%22 = load double, double* %10
%23 = load double, double* %9
%24 = fsub double %22, %23
%25 = load double, double* %11
%26 = fmul double %24, %25
%27 = load double, double* %12
%28 = fdiv double %26, %27
%29 = fadd double %21, %28
ret double %29
}

LLVM IR (-O2):
define double @inscreen(i32 %0, i32 %1, i32 %2, double %3, double %4) {
%6 = sub nsw i32 %2, %0
%7 = sitofp i32 %6 to double
%8 = sub nsw i32 %1, %0
%9 = sitofp i32 %8 to double
%10 = fsub double %4, %3
%11 = fmul double %10, %7
%12 = fdiv double %11, %9
%13 = fadd double %12, %3
ret double %13
}
/* Variables and functions */
int /*<<< orphan*/ pffft_destroy_setup(void *);
void delete_setup(void *setup) { pffft_destroy_setup(setup); }


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

x86 assembly (clang, -O2):
<delete_setup>:
jmp    1030 <pffft_destroy_setup@plt>

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

LLVM IR (-O2):
define void @delete_setup(i8* %0) {
%2 = tail call i32 @pffft_destroy_setup(i8* %0)
ret void
}
int test_imm_28uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x28 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_28uint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0x28,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_28uint64_highword_mem>:
testb  $0x28,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_28uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 171798691840
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int _findkey(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *, int);
int /*<<< orphan*/ strlen(char const *);
void test(const char *s) {
  int kl = _findkey(s, strlen(s));
  printf("%s\t%d\n", s, kl);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1050 <_findkey@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <_findkey@plt>
lea    0xeb6(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"%s\09%d\0A\00"
define void @test(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @_findkey(i8* %0, i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void Emit(char *s) { printf("\t%s", s); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"\09%s\00"
define void @Emit(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int PR8962(int *t) {
  if (__extension__(t))
    return 0;
  return *t;
}


x86 assembly (clang, -O0):
<PR8962>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     111f <PR8962+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1128 <PR8962+0x28>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @PR8962(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = icmp ne i32* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %10
7: ; preds = %1
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
store i32 %9, i32* %2
br label %10
10: ; preds = %7, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @PR8962(i32* nocapture readnone %0) {
ret i32 0
}
int main() {
  char *p = fun();
  printf("%c\n", p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <fun@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @fun()
%2 = sext i32 %1 to i64
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ F_SETFL;
int /*<<< orphan*/ O_NONBLOCK;
int errno;
int fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int socket_set_nonblocking(int fd) {
  int err = fcntl(fd, F_SETFL, O_NONBLOCK);
  if (err == -1)
    return errno;
  return 0;
}


x86 assembly (clang, -O0):
<socket_set_nonblocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
mov    0x2eba(%rip),%rax
mov    (%rax),%edx
call   1030 <fcntl@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1153 <socket_set_nonblocking+0x43>
mov    0x2e87(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    115a <socket_set_nonblocking+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_set_nonblocking>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    0x2ec7(%rip),%rax
mov    (%rax),%edx
call   1030 <fcntl@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
jne    113a <socket_set_nonblocking+0x2a>
mov    0x2e98(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
@errno = global i32 0
define i32 @socket_set_nonblocking(i32 %0) {
%2 = load i32, i32* @F_SETFL
%3 = load i32, i32* @O_NONBLOCK
%4 = tail call i32 @fcntl(i32 %0, i32 %2, i32 %3)
%5 = icmp eq i32 %4, -1
%6 = load i32, i32* @errno
%7 = select i1 %5, i32 %6, i32 0
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ *get_rfc3526_prime_8192(int /*<<< orphan*/ *);
BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn) {
  return get_rfc3526_prime_8192(bn);
}


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

x86 assembly (clang, -O2):
<BN_get_rfc3526_prime_8192>:
jmp    1030 <get_rfc3526_prime_8192@plt>

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

LLVM IR (-O2):
define i32* @BN_get_rfc3526_prime_8192(i32* %0) {
%2 = tail call i32* @get_rfc3526_prime_8192(i32* %0)
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x43() {
  Assert_real((isgraph(67)),
              "/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_isgraph.c",
              340, ("isgraph should be 1 for C"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x43>:
push   %rbp
mov    %rsp,%rbp
mov    $0x43,%edi
call   1040 <isgraph@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x154,%edx
lea    0xf65(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x43>:
push   %rax
mov    $0x43,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x154,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for C\00"
define void @t_isgraph_0x43() {
%1 = call i32 @isgraph(i32 67)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 340, 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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for C\00"
define void @t_isgraph_0x43() {
%1 = tail call i32 @isgraph(i32 67)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 340, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int exe$nxtvol(struct _fab *fab, void *err, void *suc) {
  printk("not implemented\n");
}


x86 assembly (clang, -O0):
<exe$nxtvol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printk@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exe$nxtvol>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printk@plt>

LLVM IR (-O0):
%struct._fab = type opaque
@.str = [17 x i8] c"not implemented\0A\00"
define i32 @"exe$nxtvol"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct._fab*
%6 = alloca i8*
%7 = alloca i8*
store %struct._fab* %0, %struct._fab** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @printk to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
%struct._fab = type opaque
@.str = [17 x i8] c"not implemented\0A\00"
define i32 @"exe$nxtvol"(%struct._fab* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @printk to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
struct phntri {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free_object(int, short *);
void free_phntri(struct phntri *tri) { free_object(26, (short *)tri); }


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

x86 assembly (clang, -O2):
<free_phntri>:
mov    %rdi,%rsi
mov    $0x1a,%edi
jmp    1030 <free_object@plt>

LLVM IR (-O0):
%struct.phntri = type { i32 }
define void @free_phntri(%struct.phntri* %0) {
%2 = alloca %struct.phntri*
store %struct.phntri* %0, %struct.phntri** %2
%3 = load %struct.phntri*, %struct.phntri** %2
%4 = bitcast %struct.phntri* %3 to i16*
%5 = call i32 @free_object(i32 26, i16* %4)
ret void
}

LLVM IR (-O2):
%struct.phntri = type { i32 }
define void @free_phntri(%struct.phntri* %0) {
%2 = bitcast %struct.phntri* %0 to i16*
%3 = tail call i32 @free_object(i32 26, i16* %2)
ret void
}
/* Type definitions */
struct user_regs_struct {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ PTRACE_GETREGS;
int ptrace(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/ *,
           struct user_regs_struct *);
int ptrace_getregs(pid_t pid, struct user_regs_struct *regs) {
  return ptrace(PTRACE_GETREGS, pid, NULL, regs);
}


x86 assembly (clang, -O0):
<ptrace_getregs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%edx
call   1030 <ptrace@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptrace_getregs>:
mov    %rsi,%rcx
mov    %edi,%esi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
jmp    1030 <ptrace@plt>

LLVM IR (-O0):
%struct.user_regs_struct = type { i32 }
@PTRACE_GETREGS = global i32 0
define i32 @ptrace_getregs(i32 %0, %struct.user_regs_struct* %1) {
%3 = alloca i32
%4 = alloca %struct.user_regs_struct*
store i32 %0, i32* %3
store %struct.user_regs_struct* %1, %struct.user_regs_struct** %4
%5 = load i32, i32* @PTRACE_GETREGS
%6 = load i32, i32* %3
%7 = load %struct.user_regs_struct*, %struct.user_regs_struct** %4
%8 = call i32 @ptrace(i32 %5, i32 %6, i32* null, %struct.user_regs_struct* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.user_regs_struct = type { i32 }
@PTRACE_GETREGS = global i32 0
define i32 @ptrace_getregs(i32 %0, %struct.user_regs_struct* %1) {
%3 = load i32, i32* @PTRACE_GETREGS
%4 = tail call i32 @ptrace(i32 %3, i32 %0, i32* null, %struct.user_regs_struct* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int *newint(int /*<<< orphan*/);
int *newintstr(char *val) { return (newint(atoi(val))); }


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

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

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

LLVM IR (-O2):
define i32* @newintstr(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
%3 = tail call i32* @newint(i32 %2)
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stdout;
void _move_north_n(int n) { fprintf(stdout, "\x1B[%dA", n); }


x86 assembly (clang, -O0):
<_move_north_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xed2(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_move_north_n>:
mov    %edi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [6 x i8] c"\1B[%dA\00"
define void @_move_north_n(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [6 x i8] c"\1B[%dA\00"
define void @_move_north_n(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void check(float pH) {
  if (pH > 7) {
    printf("Basica");
  } else if (pH < 7) {
    printf("Acida");
  } else {
    printf("Neutra");
  }
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xed6(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1144 <check+0x34>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
jmp    1178 <check+0x68>
movss  0xeb4(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1167 <check+0x57>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
jmp    1173 <check+0x63>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    1178 <check+0x68>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
movss  0xee8(%rip),%xmm1
ucomiss %xmm0,%xmm1
lea    0xee9(%rip),%rax
lea    0xee8(%rip),%rcx
cmova  %rax,%rcx
ucomiss %xmm1,%xmm0
lea    0xecd(%rip),%rdi
cmovbe %rcx,%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Basica\00"
@.str.1 = [6 x i8] c"Acida\00"
@.str.2 = [7 x i8] c"Neutra\00"
define void @check(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float %3, 7.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %15
7: ; preds = %1
%8 = load float, float* %2
%9 = fcmp olt float %8, 7.000000e+00
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %14
12: ; preds = %7
%13 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %12, %10
br label %15
15: ; preds = %14, %5
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"Basica\00"
@.str.1 = [6 x i8] c"Acida\00"
@.str.2 = [7 x i8] c"Neutra\00"
define void @check(float %0) {
%2 = fcmp ogt float %0, 7.000000e+00
%3 = fcmp olt float %0, 7.000000e+00
%4 = select i1 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0)
%5 = select i1 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4
%6 = tail call i32 @printf(i8* dereferenceable(1) %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M36_f(char *s) {
  debug("M36_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M36_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M36_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"M36_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M36_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"M36_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M36_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int sum(int, int);
int main(int argc, char **argv) {
  printf("This is a simple test.\n");
  printf("%d+%d=%d\n", 2, 3, sum(2, 3));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1040 <sum@plt>
mov    %eax,%ecx
lea    0xebc(%rip),%rdi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1050 <sum@plt>
lea    0xead(%rip),%rdi
mov    $0x2,%esi
mov    $0x3,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"This is a simple test.\0A\00"
@.str.1 = [10 x i8] c"%d+%d=%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @sum(i32 2, i32 3)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 3, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"%d+%d=%d\0A\00"
@str = [23 x i8] c"This is a simple test.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @sum(i32 2, i32 3)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 3, i32 %4)
ret i32 0
}
void XkbNoteNameChanges() {}


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

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

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

LLVM IR (-O2):
define void @XkbNoteNameChanges() {
ret void
}
void *ieee802_1x_create_preshared_mka(struct wpa_supplicant *wpa_s,
                                      struct wpa_ssid *ssid) {
  return 0;
}


x86 assembly (clang, -O0):
<ieee802_1x_create_preshared_mka>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.wpa_supplicant = type opaque
%struct.wpa_ssid = type opaque
define i8* @ieee802_1x_create_preshared_mka(%struct.wpa_supplicant* %0, %struct.wpa_ssid* %1) {
%3 = alloca %struct.wpa_supplicant*
%4 = alloca %struct.wpa_ssid*
store %struct.wpa_supplicant* %0, %struct.wpa_supplicant** %3
store %struct.wpa_ssid* %1, %struct.wpa_ssid** %4
ret i8* null
}

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
%struct.wpa_ssid = type opaque
define noalias i8* @ieee802_1x_create_preshared_mka(%struct.wpa_supplicant* nocapture readnone %0, %struct.wpa_ssid* nocapture readnone %1) {
ret i8* null
}
int test_imm_14int16_mem(short *val) {
  return ((*val) & (-0x14 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_14int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffffec,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_14int16_mem>:
movzwl (%rdi),%eax
test   $0xffec,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_14int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -20
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}