xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ ne_strcasecmp(char const *, char *);
unsigned int ne_uri_defaultport(const char *scheme) {
  if (ne_strcasecmp(scheme, "http") == 0)
    return 80;
  else if (ne_strcasecmp(scheme, "https") == 0)
    return 443;
  else
    return 0;
}


x86 assembly (clang, -O0):
<ne_uri_defaultport>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <ne_strcasecmp@plt>
cmp    $0x0,%rax
jne    1142 <ne_uri_defaultport+0x32>
movl   $0x50,-0x4(%rbp)
jmp    116f <ne_uri_defaultport+0x5f>
mov    -0x10(%rbp),%rdi
lea    0xeb8(%rip),%rsi
call   1030 <ne_strcasecmp@plt>
cmp    $0x0,%rax
jne    1168 <ne_uri_defaultport+0x58>
movl   $0x1bb,-0x4(%rbp)
jmp    116f <ne_uri_defaultport+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ne_uri_defaultport>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <ne_strcasecmp@plt>
test   %rax,%rax
je     1143 <ne_uri_defaultport+0x33>
lea    0xed9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <ne_strcasecmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
mov    $0x1bb,%eax
cmovne %ecx,%eax
pop    %rbx
ret
mov    $0x50,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"http\00"
@.str.1 = [6 x i8] c"https\00"
define i32 @ne_uri_defaultport(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @ne_strcasecmp(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 80, i32* %2
br label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @ne_strcasecmp(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 443, i32* %2
br label %14
13: ; preds = %8
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@.str = [5 x i8] c"http\00"
@.str.1 = [6 x i8] c"https\00"
define i32 @ne_uri_defaultport(i8* %0) {
%2 = tail call i64 @ne_strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @ne_strcasecmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i32 443, i32 0
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 80, %1 ], [ %7, %4 ]
ret i32 %9
}
int value_range(int min, int max) {
  extern int value(void);
  int val = value();
  return val < min || max < val ? min : val;
}


x86 assembly (clang, -O0):
<value_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
call   1030 <value@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     113e <value_range+0x2e>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1149 <value_range+0x39>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114f <value_range+0x3f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<value_range>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <value@plt>
cmp    %ebx,%eax
mov    %eax,%ecx
cmovg  %ebp,%ecx
cmp    %ebp,%eax
cmovl  %ebp,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @value_range(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 @value()
store i32 %6, i32* %5
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %14, label %10
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %10, %2
%15 = load i32, i32* %3
br label %18
16: ; preds = %10
%17 = load i32, i32* %5
br label %18
18: ; preds = %16, %14
%19 = phi i32 [ %15, %14 ], [ %17, %16 ]
ret i32 %19
}

LLVM IR (-O2):
define i32 @value_range(i32 %0, i32 %1) {
%3 = tail call i32 @value()
%4 = icmp slt i32 %3, %0
%5 = icmp sgt i32 %3, %1
%6 = or i1 %4, %5
%7 = select i1 %6, i32 %0, i32 %3
ret i32 %7
}
/* Variables and functions */
scalar_t__ test_ebadf();
scalar_t__ test_einval();
int main(void) {
  int result = 0;
  result += test_ebadf();
  result += test_einval();
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <test_ebadf@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <test_einval@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <test_ebadf@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <test_einval@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i64 (...) @test_ebadf()
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = add nsw i64 %5, %3
%7 = trunc i64 %6 to i32
store i32 %7, i32* %2
%8 = call i64 (...) @test_einval()
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = add nsw i64 %10, %8
%12 = trunc i64 %11 to i32
store i32 %12, i32* %2
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @test_ebadf()
%2 = tail call i64 (...) @test_einval()
%3 = add i64 %2, %1
%4 = trunc i64 %3 to i32
ret i32 %4
}
const char *return_true() { return "true"; }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"true\00"
define i8* @return_true() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"true\00"
define i8* @return_true() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ e_absx();
int /*<<< orphan*/ e_ror();
int /*<<< orphan*/ e_writeback();
void e_ror_absx() {
  e_absx();
  e_ror();
  e_writeback();
}


x86 assembly (clang, -O0):
<e_ror_absx>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <e_absx@plt>
mov    $0x0,%al
call   1030 <e_ror@plt>
mov    $0x0,%al
call   1040 <e_writeback@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_ror_absx>:
push   %rax
xor    %eax,%eax
call   1050 <e_absx@plt>
xor    %eax,%eax
call   1030 <e_ror@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <e_writeback@plt>

LLVM IR (-O0):
define void @e_ror_absx() {
%1 = call i32 (...) @e_absx()
%2 = call i32 (...) @e_ror()
%3 = call i32 (...) @e_writeback()
ret void
}

LLVM IR (-O2):
define void @e_ror_absx() {
%1 = tail call i32 (...) @e_absx()
%2 = tail call i32 (...) @e_ror()
%3 = tail call i32 (...) @e_writeback()
ret void
}
int BTSHASP_SetLinenum(char *cfn, char *cbuf, int cln) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @BTSHASP_SetLinenum(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int SOUND_MIXER_NRDEVICES;
int mixer_getnrdevices(void) { return SOUND_MIXER_NRDEVICES; }


x86 assembly (clang, -O0):
<mixer_getnrdevices>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixer_getnrdevices>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@SOUND_MIXER_NRDEVICES = global i32 0
define i32 @mixer_getnrdevices() {
%1 = load i32, i32* @SOUND_MIXER_NRDEVICES
ret i32 %1
}

LLVM IR (-O2):
@SOUND_MIXER_NRDEVICES = global i32 0
define i32 @mixer_getnrdevices() {
%1 = load i32, i32* @SOUND_MIXER_NRDEVICES
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ op_write1(int);
void op_enc_ldd_hlp_a(void) { op_write1(0x32); }


x86 assembly (clang, -O0):
<op_enc_ldd_hlp_a>:
push   %rbp
mov    %rsp,%rbp
mov    $0x32,%edi
call   1030 <op_write1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_enc_ldd_hlp_a>:
mov    $0x32,%edi
jmp    1030 <op_write1@plt>

LLVM IR (-O0):
define void @op_enc_ldd_hlp_a() {
%1 = call i32 @op_write1(i32 50)
ret void
}

LLVM IR (-O2):
define void @op_enc_ldd_hlp_a() {
%1 = tail call i32 @op_write1(i32 50)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ bowler();
extern void keeper(int sig) {
  static int recurse = 0;
  if (++recurse < 3)
    bowler();
  _exit(0);
}


x86 assembly (clang, -O0):
<keeper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2f03(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2efa(%rip)
cmp    $0x3,%eax
jge    114a <keeper+0x2a>
mov    $0x0,%al
call   1040 <bowler@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<keeper>:
push   %rax
mov    0x2f0d(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f04(%rip)
cmp    $0x1,%eax
jg     113c <keeper+0x1c>
xor    %eax,%eax
call   1040 <bowler@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@keeper.recurse = internal global i32 0
define void @keeper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @keeper.recurse
%4 = add nsw i32 %3, 1
store i32 %4, i32* @keeper.recurse
%5 = icmp slt i32 %4, 3
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @bowler()
br label %8
8: ; preds = %6, %1
%9 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
@keeper.recurse = internal unnamed_addr global i32 0
define void @keeper(i32 %0) {
%2 = load i32, i32* @keeper.recurse
%3 = add nsw i32 %2, 1
store i32 %3, i32* @keeper.recurse
%4 = icmp slt i32 %2, 2
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @bowler()
br label %7
7: ; preds = %5, %1
%8 = tail call i32 @_exit(i32 0)
unreachable
}
/* Variables and functions */
int addition(int, int);
int main() { return addition(5, 3); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
mov    $0x3,%esi
call   1030 <addition@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x5,%edi
mov    $0x3,%esi
jmp    1030 <addition@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @addition(i32 5, i32 3)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void log_state(int i, int n) {
  if (n && i % n == n - 1) {
    printf(".");
    fflush(stdout);
  }
}


x86 assembly (clang, -O0):
<log_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1167 <log_state+0x47>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cmp    %eax,%edx
jne    1167 <log_state+0x47>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_state>:
test   %esi,%esi
je     114a <log_state+0x2a>
mov    %edi,%eax
cltd
idiv   %esi
add    $0xffffffff,%esi
cmp    %esi,%edx
jne    114a <log_state+0x2a>
push   %rax
mov    $0x2e,%edi
call   1030 <putchar@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>
ret

LLVM IR (-O0):
@.str = [2 x i8] c".\00"
@stdout = global i32 0
define void @log_state(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 ne i32 %5, 0
br i1 %6, label %7, label %18
7: ; preds = %2
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
%11 = load i32, i32* %4
%12 = sub nsw i32 %11, 1
%13 = icmp eq i32 %10, %12
br i1 %13, label %14, label %18
14: ; preds = %7
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* @stdout
%17 = call i32 @fflush(i32 %16)
br label %18
18: ; preds = %14, %7, %2
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @log_state(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = srem i32 %0, %1
%6 = add nsw i32 %1, -1
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = tail call i32 @putchar(i32 46)
%10 = load i32, i32* @stdout
%11 = tail call i32 @fflush(i32 %10)
br label %12
12: ; preds = %8, %4, %2
ret void
}
int has7(int num) {
  if (num == 7 || num / 10 == 7 || num % 10 == 7)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<has7>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x7,-0x8(%rbp)
je     1139 <has7+0x39>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x7,%eax
je     1139 <has7+0x39>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x7,%edx
jne    1145 <has7+0x45>
movl   $0x1,-0x4(%rbp)
jmp    114c <has7+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<has7>:
cmp    $0x7,%edi
sete   %al
lea    -0x46(%rdi),%ecx
cmp    $0xa,%ecx
setb   %cl
or     %al,%cl
movslq %edi,%rax
imul   $0x66666667,%rax,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x22,%rdx
add    %esi,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%eax
cmp    $0x7,%eax
sete   %al
or     %cl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @has7(i32 %0) {
%2 = icmp eq i32 %0, 7
%3 = add i32 %0, -70
%4 = icmp ult i32 %3, 10
%5 = or i1 %2, %4
%6 = srem i32 %0, 10
%7 = icmp eq i32 %6, 7
%8 = or i1 %7, %5
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const, ...);
void bmp_test_print_summary(const int points, const int points_max) {
  printf("\n\nPoints\t%i/%i\n", points, points_max);
  printf("Failed\t%i\n", points_max - points);
}


x86 assembly (clang, -O0):
<bmp_test_print_summary>:
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
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
sub    -0x4(%rbp),%esi
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bmp_test_print_summary>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee2(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
sub    %ebp,%ebx
lea    0xede(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"\0A\0APoints\09%i/%i\0A\00"
@.str.1 = [11 x i8] c"Failed\09%i\0A\00"
define void @bmp_test_print_summary(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 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = sub nsw i32 %8, %9
%11 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"\0A\0APoints\09%i/%i\0A\00"
@.str.1 = [11 x i8] c"Failed\09%i\0A\00"
define void @bmp_test_print_summary(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = sub nsw i32 %1, %0
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret void
}
int aa_pro_ctr_a08(int chan, unsigned char *buf, int len) {
  hu_log(6, "hu_aap", __func__, "!!!!!!!!");
  return (-1);
}


x86 assembly (clang, -O0):
<aa_pro_ctr_a08>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x6,%edi
lea    0xed2(%rip),%rsi
lea    0xed2(%rip),%rdx
lea    0xeda(%rip),%rcx
mov    $0x0,%al
call   1030 <hu_log@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_pro_ctr_a08>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xee8(%rip),%rdx
lea    0xef0(%rip),%rcx
mov    $0x6,%edi
xor    %eax,%eax
call   1030 <hu_log@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"hu_aap\00"
@__func__.aa_pro_ctr_a08 = [15 x i8] c"aa_pro_ctr_a08\00"
@.str.1 = [9 x i8] c"!!!!!!!!\00"
define i32 @aa_pro_ctr_a08(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = call i32 (i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @hu_log to i32 (i32, i8*, i8*, i8*, ...)*)(i32 6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.aa_pro_ctr_a08, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [7 x i8] c"hu_aap\00"
@__func__.aa_pro_ctr_a08 = [15 x i8] c"aa_pro_ctr_a08\00"
@.str.1 = [9 x i8] c"!!!!!!!!\00"
define i32 @aa_pro_ctr_a08(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 (i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @hu_log to i32 (i32, i8*, i8*, i8*, ...)*)(i32 6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.aa_pro_ctr_a08, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_creds_has_inheritable_cap(void *c, int capability) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_creds_has_inheritable_cap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_creds_has_inheritable_cap>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_creds_has_inheritable_cap(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_creds_has_inheritable_cap(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int omap_rev();
int is_omap3525(void) {
  return (((omap_rev() >> 16) & 0xffff) == (0x3525)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<is_omap3525>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <omap_rev@plt>
mov    %eax,%edx
sar    $0x10,%edx
and    $0xffff,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x3525,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_omap3525>:
push   %rax
xor    %eax,%eax
call   1030 <omap_rev@plt>
and    $0xffff0000,%eax
xor    %ecx,%ecx
cmp    $0x35250000,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_omap3525() {
%1 = call i32 (...) @omap_rev()
%2 = ashr i32 %1, 16
%3 = and i32 %2, 65535
%4 = icmp eq i32 %3, 13605
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_omap3525() {
%1 = tail call i32 (...) @omap_rev()
%2 = and i32 %1, -65536
%3 = icmp eq i32 %2, 891617280
%4 = zext i1 %3 to i32
ret i32 %4
}
void parseBody(int fd) { return; }


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

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

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

LLVM IR (-O2):
define void @parseBody(i32 %0) {
ret void
}
void mod_udp_is_dlclose_safe() {}


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

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

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

LLVM IR (-O2):
define void @mod_udp_is_dlclose_safe() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ b_pawns_able_to_double_push(int, int);
void b_pawns_able_to_double_push_test(void **state) {
  assert_int_equal(0, b_pawns_able_to_double_push(0x00E3140800000000ul,
                                                  0x000000E300000000ul));
  assert_int_equal(
      0x00A3000000000000ul,
      b_pawns_able_to_double_push(0x00E3140800000000ul, 0x0000E3A300000000ul));
}


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

x86 assembly (clang, -O2):
<b_pawns_able_to_double_push_test>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1040 <b_pawns_able_to_double_push@plt>
xor    %edi,%edi
mov    %eax,%esi
call   1030 <assert_int_equal@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <b_pawns_able_to_double_push@plt>
xor    %edi,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @b_pawns_able_to_double_push_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @b_pawns_able_to_double_push(i32 0, i32 0)
%4 = call i32 @assert_int_equal(i32 0, i32 %3)
%5 = call i32 @b_pawns_able_to_double_push(i32 0, i32 0)
%6 = call i32 @assert_int_equal(i32 0, i32 %5)
ret void
}

LLVM IR (-O2):
define void @b_pawns_able_to_double_push_test(i8** nocapture readnone %0) {
%2 = tail call i32 @b_pawns_able_to_double_push(i32 0, i32 0)
%3 = tail call i32 @assert_int_equal(i32 0, i32 %2)
%4 = tail call i32 @b_pawns_able_to_double_push(i32 0, i32 0)
%5 = tail call i32 @assert_int_equal(i32 0, i32 %4)
ret void
}
int find_sln(int fd) {
  int p = sln_lookup_fd(fd);
  if (p < 0)
    deb_err(274,
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/xtforever/xtcw/refs/heads/master/"
            "network-engine/slopnet.c",
            __FUNCTION__, "unknown fd");
  return p;
}


x86 assembly (clang, -O0):
<find_sln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <sln_lookup_fd@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1163 <find_sln+0x43>
mov    $0x112,%edi
lea    0xeb2(%rip),%rsi
lea    0xf3f(%rip),%rdx
lea    0xf41(%rip),%rcx
mov    $0x0,%al
call   1030 <deb_err@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_sln>:
push   %rbx
xor    %eax,%eax
call   1040 <sln_lookup_fd@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    114f <find_sln+0x2f>
lea    0xecb(%rip),%rsi
lea    0xf58(%rip),%rdx
lea    0xf5a(%rip),%rcx
mov    $0x112,%edi
xor    %eax,%eax
call   1030 <deb_err@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/xtforever/xtcw/refs/heads/master/network-engine/slopnet.c\00"
@__FUNCTION__.find_sln = [9 x i8] c"find_sln\00"
@.str.1 = [11 x i8] c"unknown fd\00"
define i32 @find_sln(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 (i32, ...) bitcast (i32 (...)* @sln_lookup_fd to i32 (i32, ...)*)(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @deb_err to i32 (i32, i8*, i8*, i8*, ...)*)(i32 274, i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.find_sln, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@.str = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/xtforever/xtcw/refs/heads/master/network-engine/slopnet.c\00"
@__FUNCTION__.find_sln = [9 x i8] c"find_sln\00"
@.str.1 = [11 x i8] c"unknown fd\00"
define i32 @find_sln(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @sln_lookup_fd to i32 (i32, ...)*)(i32 %0)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @deb_err to i32 (i32, i8*, i8*, i8*, ...)*)(i32 274, i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.find_sln, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i32 %2
}
/* Variables and functions */
int _strspn(char *, char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char *s1 = "apple";
  char *s2 = "applx";
  int n = _strspn(s1, s2);
  printf("%d\n", n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec5(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <_strspn@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1040 <_strspn@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"apple\00"
@.str.1 = [6 x i8] c"applx\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @_strspn(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *asctime(int /*<<< orphan*/);
int /*<<< orphan*/ localtime(int /*<<< orphan*/ const *);
char *ctime(const time_t *t) { return asctime(localtime(t)); }


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

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

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

LLVM IR (-O2):
define i8* @ctime(i32* %0) {
%2 = tail call i32 @localtime(i32* %0)
%3 = tail call i8* @asctime(i32 %2)
ret i8* %3
}
void BN_BLINDING_create_param(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @unconditional_hide_mouse() {
ret void
}
/* Variables and functions */
bool self_target(char c) { return c == '5'; }


x86 assembly (clang, -O0):
<self_target>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x35,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<self_target>:
xor    %eax,%eax
cmp    $0x35,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @self_target(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 53
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @self_target(i8 signext %0) {
%2 = icmp eq i8 %0, 53
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ log(double);
float logf(float s) { return (float)log((double)s); }


x86 assembly (clang, -O0):
<logf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <log@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logf>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @logf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @log(double %4)
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @logf(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @log(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
void ble_rsp_hardware_io_port_irq_direction(
    const struct ble_msg_hardware_io_port_irq_direction_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_hardware_io_port_irq_direction_rsp_t = type opaque
define void @ble_rsp_hardware_io_port_irq_direction(%struct.ble_msg_hardware_io_port_irq_direction_rsp_t* nocapture %0) {
ret void
}
int test_imm_10int8_reg(signed char val) {
  return ((val) & (0x10 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_10int8_reg>:
test   $0x10,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_10int8_reg(i8 signext %0) {
%2 = and i8 %0, 16
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void net_dmaengine_put(void) {}


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

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

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

LLVM IR (-O2):
define void @net_dmaengine_put() {
ret void
}
/* Variables and functions */
int ft_strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int);
void ft_putendl_fd(char const *s, int fd) {
  if (!s)
    return;
  write(fd, s, ft_strlen(s));
  write(fd, "\n", 1);
}


x86 assembly (clang, -O0):
<ft_putendl_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113f <ft_putendl_fd+0x1f>
jmp    1178 <ft_putendl_fd+0x58>
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    -0xc(%rbp),%edi
lea    0xe92(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putendl_fd>:
test   %rdi,%rdi
je     1157 <ft_putendl_fd+0x37>
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <ft_strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
lea    0xebb(%rip),%rsi
mov    %ebp,%edi
mov    $0x1,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @ft_putendl_fd(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i32 @ft_strlen(i8* %0)
%6 = tail call i32 @write(i32 %1, i8* %0, i32 %5)
%7 = tail call i32 @write(i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
br label %8
8: ; preds = %2, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PlantSeeds(long);
void initialize_generators(long seed) { PlantSeeds(seed); }


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

x86 assembly (clang, -O2):
<initialize_generators>:
jmp    1030 <PlantSeeds@plt>

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

LLVM IR (-O2):
define void @initialize_generators(i64 %0) {
%2 = tail call i32 @PlantSeeds(i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ inorderTraversal(int /*<<< orphan*/ *, int *);
int main() {
  int count = 0;
  inorderTraversal(NULL, &count);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
xor    %edi,%edi
call   1030 <inorderTraversal@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @inorderTraversal(i32* null, i32* %1)
ret i32 0
}
double getReynolds(const double *prim, double w, const double *x, double dx) {
  return 0.0;
}


x86 assembly (clang, -O0):
<getReynolds>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @getReynolds(double* %0, double %1, double* %2, double %3) {
%5 = alloca double*
%6 = alloca double
%7 = alloca double*
%8 = alloca double
store double* %0, double** %5
store double %1, double* %6
store double* %2, double** %7
store double %3, double* %8
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @getReynolds(double* nocapture readnone %0, double %1, double* nocapture readnone %2, double %3) {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int f1(int d) {
  printf("%d\n", d + 1);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @f1(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
char *procprt_SWAPSZ_e(struct tstat *curstat, int avgval, int nsecs) {
  return "    0K";
}


x86 assembly (clang, -O0):
<procprt_SWAPSZ_e>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xeeb(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.tstat = type opaque
@.str = [7 x i8] c" 0K\00"
define i8* @procprt_SWAPSZ_e(%struct.tstat* %0, i32 %1, i32 %2) {
%4 = alloca %struct.tstat*
%5 = alloca i32
%6 = alloca i32
store %struct.tstat* %0, %struct.tstat** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tstat = type opaque
@.str = [7 x i8] c" 0K\00"
define i8* @procprt_SWAPSZ_e(%struct.tstat* nocapture readnone %0, i32 %1, i32 %2) {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int ENOTSUP;
int errno;
int execve(const char *path, char *const argv[], char *const envp[]) {
  return errno = ENOTSUP, -1;
  (void)path, (void)argv, (void)envp;
}


x86 assembly (clang, -O0):
<execve>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ed1(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<execve>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOTSUP = global i32 0
@errno = global i32 0
define i32 @execve(i8* %0, i8** %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%7 = load i32, i32* @ENOTSUP
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOTSUP = global i32 0
@errno = global i32 0
define i32 @execve(i8* nocapture readnone %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = load i32, i32* @ENOTSUP
store i32 %4, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x01() {
  Assert_real((isbdigit(1) == 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_isbdigit.c",
              10, ("isbdigit should be 0 for 0x01"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x01>:
push   %rax
mov    $0x1,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xa,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x01\00"
define void @t_isbdigit_0x01() {
%1 = call i64 @isbdigit(i32 1)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 10, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x01\00"
define void @t_isbdigit_0x01() {
%1 = tail call i64 @isbdigit(i32 1)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 10, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ copyright();
int /*<<< orphan*/ printf(char *);
void usage() {
  copyright();
  printf("This program converts standard TRS-80/System-80 disk\n");
  printf("(CMD) files to tape (CAS) images.\n");
  printf("Syntax: cmd2cas <Input CMD file> <Output CAS file>\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <copyright@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
call   1030 <printf@plt>
lea    0xf0f(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
xor    %eax,%eax
call   1040 <copyright@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xefa(%rip),%rdi
call   1030 <puts@plt>
lea    0xf10(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"This program converts standard TRS-80/System-80 disk\0A\00"
@.str.1 = [35 x i8] c"(CMD) files to tape (CAS) images.\0A\00"
@.str.2 = [52 x i8] c"Syntax: cmd2cas <Input CMD file> <Output CAS file>\0A\00"
define void @usage() {
%1 = call i32 (...) @copyright()
%2 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [53 x i8] c"This program converts standard TRS-80/System-80 disk\00"
@str.3 = [34 x i8] c"(CMD) files to tape (CAS) images.\00"
@str.4 = [51 x i8] c"Syntax: cmd2cas <Input CMD file> <Output CAS file>\00"
define void @usage() {
%1 = tail call i32 (...) @copyright()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.4, i64 0, i64 0))
ret void
}
void lgtd_jsonrpc_end_send_response(struct lgtd_client *client) {
  (void)client;
}


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

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

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

LLVM IR (-O2):
%struct.lgtd_client = type opaque
define void @lgtd_jsonrpc_end_send_response(%struct.lgtd_client* nocapture %0) {
ret void
}
/* Variables and functions */
char *getpwd(char *, int);
char *__get_curdir(void) {
  static char __cwd[512];
  return getpwd(__cwd, 512);
}


x86 assembly (clang, -O0):
<__get_curdir>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rdi
mov    $0x200,%esi
call   1030 <getpwd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_curdir>:
lea    0x2f29(%rip),%rdi
mov    $0x200,%esi
jmp    1030 <getpwd@plt>

LLVM IR (-O0):
@__get_curdir.__cwd = internal global [512 x i8] zeroinitializer
define i8* @__get_curdir() {
%1 = call i8* @getpwd(i8* getelementptr inbounds ([512 x i8], [512 x i8]* @__get_curdir.__cwd, i64 0, i64 0), i32 512)
ret i8* %1
}

LLVM IR (-O2):
@__get_curdir.__cwd = internal global [512 x i8] zeroinitializer
define i8* @__get_curdir() {
%1 = tail call i8* @getpwd(i8* getelementptr inbounds ([512 x i8], [512 x i8]* @__get_curdir.__cwd, i64 0, i64 0), i32 512)
ret i8* %1
}