xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xce() {
  Assert_real((isodigit(206) == 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_isodigit.c",
              1035, ("isodigit should be 0 for 0xce"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xce>:
push   %rax
mov    $0xce,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x40b,%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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xce\00"
define void @t_isodigit_0xce() {
%1 = call i64 @isodigit(i32 206)
%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 1035, 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xce\00"
define void @t_isodigit_0xce() {
%1 = tail call i64 @isodigit(i32 206)
%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 1035, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void main() {
  for (int i = 0; i < 10; i++) {
    continue;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1128 <main+0x28>
jmp    111a <main+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <main+0xb>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
void print_arr(int *arr, int size) {
  for (int i = 0; i < size; i++)
    printf("%d ", arr[i]);
  puts("");
}


x86 assembly (clang, -O0):
<print_arr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1167 <print_arr+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <print_arr+0x16>
lea    0xe95(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_arr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1155 <print_arr+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xec5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_arr+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [1 x i8] zeroinitializer
define void @print_arr(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_arr(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
void RTCrc64Finish(void) {}


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

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

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

LLVM IR (-O2):
define void @RTCrc64Finish() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ siphash24(char const *, scalar_t__,
                             int /*<<< orphan*/ const *);
scalar_t__ strlen(char const *);
uint64_t siphash24_string(const char *s, const uint8_t k[16]) {
  return siphash24(s, strlen(s) + 1, k);
}


x86 assembly (clang, -O0):
<siphash24_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %rax,%rsi
add    $0x1,%rsi
mov    -0x10(%rbp),%rdx
call   1030 <siphash24@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<siphash24_string>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <siphash24@plt>

LLVM IR (-O0):
define i32 @siphash24_string(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 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = add nsw i64 %7, 1
%9 = load i32*, i32** %4
%10 = call i32 @siphash24(i8* %5, i64 %8, i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @siphash24_string(i8* %0, i32* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = add nsw i64 %3, 1
%5 = tail call i32 @siphash24(i8* %0, i64 %4, i32* %1)
ret i32 %5
}
int SlopeDiv(unsigned num, unsigned den) {
  unsigned ans;
  if (den < 512)
    return 2048;
  ans = (num << 3) / (den >> 8);
  return ans <= 2048 ? ans : 2048;
}


x86 assembly (clang, -O0):
<SlopeDiv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x200,-0xc(%rbp)
jae    1123 <SlopeDiv+0x23>
movl   $0x800,-0x4(%rbp)
jmp    1161 <SlopeDiv+0x61>
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
mov    -0xc(%rbp),%ecx
shr    $0x8,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x10(%rbp)
cmpl   $0x800,-0x10(%rbp)
ja     114e <SlopeDiv+0x4e>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    115b <SlopeDiv+0x5b>
mov    $0x800,%eax
mov    %eax,-0x14(%rbp)
jmp    115b <SlopeDiv+0x5b>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SlopeDiv>:
mov    $0x800,%eax
cmp    $0x200,%esi
jb     1128 <SlopeDiv+0x28>
shl    $0x3,%edi
shr    $0x8,%esi
mov    %edi,%eax
xor    %edx,%edx
div    %esi
mov    %eax,%ecx
cmp    $0x800,%eax
mov    $0x800,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @SlopeDiv(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = icmp ult i32 %7, 512
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 2048, i32* %3
br label %23
10: ; preds = %2
%11 = load i32, i32* %4
%12 = shl i32 %11, 3
%13 = load i32, i32* %5
%14 = lshr i32 %13, 8
%15 = udiv i32 %12, %14
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = icmp ule i32 %16, 2048
br i1 %17, label %18, label %20
18: ; preds = %10
%19 = load i32, i32* %6
br label %21
20: ; preds = %10
br label %21
21: ; preds = %20, %18
%22 = phi i32 [ %19, %18 ], [ 2048, %20 ]
store i32 %22, i32* %3
br label %23
23: ; preds = %21, %9
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @SlopeDiv(i32 %0, i32 %1) {
%3 = icmp ult i32 %1, 512
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = shl i32 %0, 3
%6 = lshr i32 %1, 8
%7 = udiv i32 %5, %6
%8 = icmp ult i32 %7, 2048
%9 = select i1 %8, i32 %7, i32 2048
br label %10
10: ; preds = %2, %4
%11 = phi i32 [ %9, %4 ], [ 2048, %2 ]
ret i32 %11
}
/* Variables and functions */
int atof(char const *);
int string_arg(const char *str) { return atof(str); }


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

x86 assembly (clang, -O2):
<string_arg>:
jmp    1030 <atof@plt>

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

LLVM IR (-O2):
define i32 @string_arg(i8* nocapture %0) {
%2 = tail call i32 @atof(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printchar(char);
scalar_t__ strlen(char *);
void printstring(char *buf) {
  int i;
  for (i = 0; i < (int)strlen(buf); i++)
    printchar(buf[i]);
}


x86 assembly (clang, -O0):
<printstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    116f <printstring+0x4f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <printchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <printstring+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printstring>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
test   %eax,%eax
jle    115d <printstring+0x3d>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1030 <printchar@plt>
add    $0x1,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1140 <printstring+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @printstring(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %17, %1
%5 = load i32, i32* %3
%6 = load i8*, i8** %2
%7 = call i64 @strlen(i8* %6)
%8 = trunc i64 %7 to i32
%9 = icmp slt i32 %5, %8
br i1 %9, label %10, label %20
10: ; preds = %4
%11 = load i8*, i8** %2
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
%16 = call i32 @printchar(i8 signext %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %4
20: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @printstring(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %15
5: ; preds = %1, %5
%6 = phi i64 [ %10, %5 ], [ 0, %1 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = tail call i32 @printchar(i8 signext %8)
%10 = add nuw nsw i64 %6, 1
%11 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%12 = shl i64 %11, 32
%13 = ashr exact i64 %12, 32
%14 = icmp slt i64 %10, %13
br i1 %14, label %5, label %15
15: ; preds = %5, %1
ret void
}
void g_param_spec_char() {}


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

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

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

LLVM IR (-O2):
define void @g_param_spec_char() {
ret void
}
/* Variables and functions */
int cmp_states(short const, short const);
int qcmp_states(const void *x, const void *y) {
  return cmp_states(*(const short *)x, *(const short *)y);
}


x86 assembly (clang, -O0):
<qcmp_states>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cx
mov    -0x10(%rbp),%rax
movswl %cx,%edi
movswl (%rax),%esi
call   1030 <cmp_states@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qcmp_states>:
movswl (%rdi),%edi
movswl (%rsi),%esi
jmp    1030 <cmp_states@plt>

LLVM IR (-O0):
define i32 @qcmp_states(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i16*
%7 = load i16, i16* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i16*
%10 = load i16, i16* %9
%11 = call i32 @cmp_states(i16 signext %7, i16 signext %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @qcmp_states(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i16*
%4 = load i16, i16* %3
%5 = bitcast i8* %1 to i16*
%6 = load i16, i16* %5
%7 = tail call i32 @cmp_states(i16 signext %4, i16 signext %6)
ret i32 %7
}
/* Type definitions */
struct fuse_opt {
  int dummy;
};

/* Variables and functions */
scalar_t__ find_opt(struct fuse_opt const *, char const *, unsigned int *);
int fuse_opt_match(const struct fuse_opt *opts, const char *opt) {
  unsigned dummy;
  return find_opt(opts, opt, &dummy) ? 1 : 0;
}


x86 assembly (clang, -O0):
<fuse_opt_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <find_opt@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fuse_opt_match>:
push   %rax
lea    0x4(%rsp),%rdx
call   1030 <find_opt@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.fuse_opt = type { i32 }
define i32 @fuse_opt_match(%struct.fuse_opt* %0, i8* %1) {
%3 = alloca %struct.fuse_opt*
%4 = alloca i8*
%5 = alloca i32
store %struct.fuse_opt* %0, %struct.fuse_opt** %3
store i8* %1, i8** %4
%6 = load %struct.fuse_opt*, %struct.fuse_opt** %3
%7 = load i8*, i8** %4
%8 = call i64 @find_opt(%struct.fuse_opt* %6, i8* %7, i32* %5)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
%struct.fuse_opt = type { i32 }
define i32 @fuse_opt_match(%struct.fuse_opt* %0, i8* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i64 @find_opt(%struct.fuse_opt* %0, i8* %1, i32* %3)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
anios_menor(int f_anios[3]) {
  int menor, fam_i;
  for (fam_i = 0, menor = f_anios[0]; fam_i < 3; fam_i++) {
    if (f_anios[fam_i] < menor) {
      menor = f_anios[fam_i];
    }
  }
  return menor;
}


x86 assembly (clang, -O0):
<anios_menor>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x3,-0x10(%rbp)
jge    1157 <anios_menor+0x57>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0xc(%rbp),%eax
jge    1144 <anios_menor+0x44>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xc(%rbp)
jmp    1149 <anios_menor+0x49>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1118 <anios_menor+0x18>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<anios_menor>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
cmp    %eax,%ecx
cmovl  %ecx,%eax
mov    0x8(%rdi),%ecx
cmp    %eax,%ecx
cmovl  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @anios_menor(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, %2
%6 = select i1 %5, i32 %4, i32 %2
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = icmp slt i32 %8, %6
%10 = select i1 %9, i32 %8, i32 %6
ret i32 %10
}
void read_id(struct nandsim_private *ns) { (void)ns; }


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

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

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

LLVM IR (-O2):
%struct.nandsim_private = type opaque
define void @read_id(%struct.nandsim_private* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x20() {
  Assert_real((islower(32) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              165, ("islower should be 0 for  "));
}


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

x86 assembly (clang, -O2):
<t_islower_0x20>:
push   %rax
mov    $0x20,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xa5,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for \00"
define void @t_islower_0x20() {
%1 = call i64 @islower(i32 32)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 165, 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for \00"
define void @t_islower_0x20() {
%1 = tail call i64 @islower(i32 32)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 165, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello, world\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, world\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 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello, world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cow_ltrim_out(char const *, char *, char);
int /*<<< orphan*/ cow_rtrim_out(char *, char *, char);
void cow_trim_out(const char *str, char *str_out, char c) {
  cow_ltrim_out(str, str_out, c);
  cow_rtrim_out(str_out, str_out, c);
}


x86 assembly (clang, -O0):
<cow_trim_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsbl -0x11(%rbp),%edx
call   1040 <cow_ltrim_out@plt>
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsbl -0x11(%rbp),%edx
call   1030 <cow_rtrim_out@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cow_trim_out>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
call   1040 <cow_ltrim_out@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <cow_rtrim_out@plt>

LLVM IR (-O0):
define void @cow_trim_out(i8* %0, i8* %1, i8 signext %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8 %2, i8* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8, i8* %6
%10 = call i32 @cow_ltrim_out(i8* %7, i8* %8, i8 signext %9)
%11 = load i8*, i8** %5
%12 = load i8*, i8** %5
%13 = load i8, i8* %6
%14 = call i32 @cow_rtrim_out(i8* %11, i8* %12, i8 signext %13)
ret void
}

LLVM IR (-O2):
define void @cow_trim_out(i8* %0, i8* %1, i8 signext %2) {
%4 = tail call i32 @cow_ltrim_out(i8* %0, i8* %1, i8 signext %2)
%5 = tail call i32 @cow_rtrim_out(i8* %1, i8* %1, i8 signext %2)
ret void
}
/* Variables and functions */
scalar_t__ inc_addr(void *, int);
int shim_get_mempolicy(int *, unsigned long *, int, scalar_t__, unsigned long);
int bad_get_mempolicy(void *addr) {
  return shim_get_mempolicy((int *)addr, (unsigned long *)inc_addr(addr, 1), 1,
                            inc_addr(addr, 2), 0UL);
}


x86 assembly (clang, -O0):
<bad_get_mempolicy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <inc_addr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1030 <inc_addr@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    %rax,%rcx
mov    $0x1,%edx
xor    %eax,%eax
mov    %eax,%r8d
call   1040 <shim_get_mempolicy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bad_get_mempolicy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x1,%esi
call   1030 <inc_addr@plt>
mov    %rax,%r14
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <inc_addr@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
mov    %rax,%rcx
xor    %r8d,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <shim_get_mempolicy@plt>

LLVM IR (-O0):
define i32 @bad_get_mempolicy(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i8*, i8** %2
%6 = call i64 @inc_addr(i8* %5, i32 1)
%7 = inttoptr i64 %6 to i64*
%8 = load i8*, i8** %2
%9 = call i64 @inc_addr(i8* %8, i32 2)
%10 = call i32 @shim_get_mempolicy(i32* %4, i64* %7, i32 1, i64 %9, i64 0)
ret i32 %10
}

LLVM IR (-O2):
define i32 @bad_get_mempolicy(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i64 @inc_addr(i8* %0, i32 1)
%4 = inttoptr i64 %3 to i64*
%5 = tail call i64 @inc_addr(i8* %0, i32 2)
%6 = tail call i32 @shim_get_mempolicy(i32* %2, i64* %4, i32 1, i64 %5, i64 0)
ret i32 %6
}
void mdp4_dsi_cmd_wait4vsync(int cndx) {}


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

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

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

LLVM IR (-O2):
define void @mdp4_dsi_cmd_wait4vsync(i32 %0) {
ret void
}
/* Variables and functions */
size_t strnlen(const char *s, size_t maxlen) {
  int i;
  for (i = 0; i < maxlen; i++) {
    if (s[i] == '\0')
      return i + 1;
  }
  return maxlen;
}


x86 assembly (clang, -O0):
<strnlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    115a <strnlen+0x5a>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1147 <strnlen+0x47>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
cltq
mov    %rax,-0x8(%rbp)
jmp    1162 <strnlen+0x62>
jmp    114c <strnlen+0x4c>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1113 <strnlen+0x13>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnlen>:
test   %rsi,%rsi
je     113a <strnlen+0x3a>
mov    %rsi,%rax
mov    %rsi,%rdx
neg    %rdx
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmpb   $0x0,-0x1(%rdi,%rcx,1)
je     113d <strnlen+0x3d>
lea    (%rdx,%rcx,1),%rsi
add    $0x1,%rsi
add    $0x1,%rcx
cmp    $0x1,%rsi
jne    1120 <strnlen+0x20>
ret
xor    %eax,%eax
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i64 @strnlen(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2, %12
%5 = phi i64 [ %9, %12 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
%9 = add i64 %5, 1
br i1 %8, label %10, label %12
10: ; preds = %4
%11 = and i64 %9, 4294967295
br label %14
12: ; preds = %4
%13 = icmp eq i64 %9, %1
br i1 %13, label %14, label %4
14: ; preds = %12, %2, %10
%15 = phi i64 [ %11, %10 ], [ 0, %2 ], [ %1, %12 ]
ret i64 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int fio_write_16(int /*<<< orphan*/ *, int, int);
scalar_t__ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
int fio_abs_write_16(FILE *f, long offset, int is_big_endian, int val) {
  if (fseek(f, offset, SEEK_SET) != 0)
    return -1;
  return (fio_write_16(f, is_big_endian, val));
}


x86 assembly (clang, -O0):
<fio_abs_write_16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
cmp    $0x0,%rax
je     1162 <fio_abs_write_16+0x42>
movl   $0xffffffff,-0x4(%rbp)
jmp    1174 <fio_abs_write_16+0x54>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1030 <fio_write_16@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fio_abs_write_16>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %rdi,%rbx
mov    0x2ead(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
test   %rax,%rax
je     1149 <fio_abs_write_16+0x29>
mov    $0xffffffff,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fio_write_16@plt>

LLVM IR (-O0):
@SEEK_SET = global i32 0
define i32 @fio_abs_write_16(i32* %0, i64 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
store i32* %0, i32** %6
store i64 %1, i64* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32*, i32** %6
%11 = load i64, i64* %7
%12 = load i32, i32* @SEEK_SET
%13 = call i64 @fseek(i32* %10, i64 %11, i32 %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %4
store i32 -1, i32* %5
br label %21
16: ; preds = %4
%17 = load i32*, i32** %6
%18 = load i32, i32* %8
%19 = load i32, i32* %9
%20 = call i32 @fio_write_16(i32* %17, i32 %18, i32 %19)
store i32 %20, i32* %5
br label %21
21: ; preds = %16, %15
%22 = load i32, i32* %5
ret i32 %22
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define i32 @fio_abs_write_16(i32* %0, i64 %1, i32 %2, i32 %3) {
%5 = load i32, i32* @SEEK_SET
%6 = tail call i64 @fseek(i32* %0, i64 %1, i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @fio_write_16(i32* %0, i32 %2, i32 %3)
br label %10
10: ; preds = %4, %8
%11 = phi i32 [ %9, %8 ], [ -1, %4 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ lw_sock_send_str(int *, char *);
int lw_protocol_quit(int *sock) {
  int result = 0;
  lw_sock_send_str(sock, "QUIT");
  return result;
}


x86 assembly (clang, -O0):
<lw_protocol_quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed2(%rip),%rsi
call   1030 <lw_sock_send_str@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"QUIT\00"
define i32 @lw_protocol_quit(i32* %0) {
%2 = tail call i32 @lw_sock_send_str(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ unallocateBlock(void *);
void myfree(void *p) { unallocateBlock(p); }


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

x86 assembly (clang, -O2):
<myfree>:
jmp    1030 <unallocateBlock@plt>

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

LLVM IR (-O2):
define void @myfree(i8* %0) {
%2 = tail call i32 @unallocateBlock(i8* %0)
ret void
}
/* Variables and functions */
int time(int /*<<< orphan*/ *);
int rng(int seed) { return (((time(NULL) + seed) % 10) + 1); }


x86 assembly (clang, -O0):
<rng>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
add    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rng>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   1030 <time@plt>
add    %ebx,%eax
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
add    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rng(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @time(i32* null)
%4 = load i32, i32* %2
%5 = add nsw i32 %3, %4
%6 = srem i32 %5, 10
%7 = add nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @rng(i32 %0) {
%2 = tail call i32 @time(i32* null)
%3 = add nsw i32 %2, %0
%4 = srem i32 %3, 10
%5 = add nsw i32 %4, 1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_CLR_RADIO_SFD_PIN() { clear_io_bit(-1, 4); }


x86 assembly (clang, -O0):
<TOSH_CLR_RADIO_SFD_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
mov    $0x4,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_CLR_RADIO_SFD_PIN>:
mov    $0xffffffff,%edi
mov    $0x4,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_CLR_RADIO_SFD_PIN() {
%1 = call i32 @clear_io_bit(i32 -1, i32 4)
ret void
}

LLVM IR (-O2):
define void @TOSH_CLR_RADIO_SFD_PIN() {
%1 = tail call i32 @clear_io_bit(i32 -1, i32 4)
ret void
}
/* Type definitions */
struct RNAinverse_args_info {
  int dummy;
};

/* Variables and functions */
int EXIT_SUCCESS;
int RNAinverse_cmdline_parser_required(struct RNAinverse_args_info *args_info,
                                       const char *prog_name) {
  (void)(args_info);
  (void)(prog_name);
  return EXIT_SUCCESS;
}


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

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

LLVM IR (-O0):
%struct.RNAinverse_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @RNAinverse_cmdline_parser_required(%struct.RNAinverse_args_info* %0, i8* %1) {
%3 = alloca %struct.RNAinverse_args_info*
%4 = alloca i8*
store %struct.RNAinverse_args_info* %0, %struct.RNAinverse_args_info** %3
store i8* %1, i8** %4
%5 = load %struct.RNAinverse_args_info*, %struct.RNAinverse_args_info** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
%struct.RNAinverse_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @RNAinverse_cmdline_parser_required(%struct.RNAinverse_args_info* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Type definitions */
typedef int uint64_t;
typedef int int64_t;

/* Variables and functions */
scalar_t__ ntohl(int);
char *pack_s64(const int64_t *data, char *buffer) {
  *((int64_t *)buffer) =
      (((uint64_t)(ntohl((int)((*data << 32) >> 32))) << 32) |
       (unsigned int)ntohl(((int)(*data >> 32))));
  return buffer + sizeof(*data);
}


x86 assembly (clang, -O0):
<pack_s64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    $0x20,%ecx
shl    %cl,%edi
mov    $0x20,%ecx
sar    %cl,%edi
call   1030 <ntohl@plt>
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    $0x20,%ecx
sar    %cl,%edi
call   1030 <ntohl@plt>
mov    -0x14(%rbp),%ecx
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pack_s64>:
push   %rbx
mov    %rsi,%rbx
call   1030 <ntohl@plt>
call   1030 <ntohl@plt>
add    $0x4,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @pack_s64(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = shl i32 %6, 32
%8 = ashr i32 %7, 32
%9 = call i64 @ntohl(i32 %8)
%10 = trunc i64 %9 to i32
%11 = shl i32 %10, 32
%12 = load i32*, i32** %3
%13 = load i32, i32* %12
%14 = ashr i32 %13, 32
%15 = call i64 @ntohl(i32 %14)
%16 = trunc i64 %15 to i32
%17 = or i32 %11, %16
%18 = load i8*, i8** %4
%19 = bitcast i8* %18 to i32*
store i32 %17, i32* %19
%20 = load i8*, i8** %4
%21 = getelementptr inbounds i8, i8* %20, i64 4
ret i8* %21
}

LLVM IR (-O2):
define i8* @pack_s64(i32* nocapture readnone %0, i8* readnone %1) {
%3 = tail call i64 @ntohl(i32 poison)
%4 = tail call i64 @ntohl(i32 poison)
%5 = getelementptr inbounds i8, i8* %1, i64 4
ret i8* %5
}
/* Variables and functions */
double NAN;
int /*<<< orphan*/ error(char *);
double gammainv(double p, double shape, double rate) {
  if (shape <= 0 || rate <= 0)
    error("Both parameters must be larger than 0.");
  return NAN;
}


x86 assembly (clang, -O0):
<gammainv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jae    1143 <gammainv+0x33>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     114f <gammainv+0x3f>
lea    0xeb6(%rip),%rdi
call   1030 <error@plt>
mov    0x2ea2(%rip),%rax
movsd  (%rax),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gammainv>:
push   %rax
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jae    1121 <gammainv+0x11>
ucomisd %xmm2,%xmm0
jb     112d <gammainv+0x1d>
lea    0xed8(%rip),%rdi
call   1030 <error@plt>
mov    0x2ec4(%rip),%rax
movsd  (%rax),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Both parameters must be larger than 0.\00"
@NAN = global double 0.000000e+00
define double @gammainv(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = fcmp ole double %7, 0.000000e+00
br i1 %8, label %12, label %9
9: ; preds = %3
%10 = load double, double* %6
%11 = fcmp ole double %10, 0.000000e+00
br i1 %11, label %12, label %14
12: ; preds = %9, %3
%13 = call i32 @error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %9
%15 = load double, double* @NAN
ret double %15
}

LLVM IR (-O2):
@.str = [39 x i8] c"Both parameters must be larger than 0.\00"
@NAN = global double 0.000000e+00
define double @gammainv(double %0, double %1, double %2) {
%4 = fcmp ole double %1, 0.000000e+00
%5 = fcmp ole double %2, 0.000000e+00
%6 = or i1 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %3, %7
%10 = load double, double* @NAN
ret double %10
}
int compare_dbl(const void *xx, const void *yy) {
  double x = *((double *)xx);
  double y = *((double *)yy);
  if (x > y)
    return 1;
  else {
    if (x < y)
      return -1;
    else
      return 0;
  }
}


x86 assembly (clang, -O0):
<compare_dbl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1142 <compare_dbl+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1169 <compare_dbl+0x69>
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1162 <compare_dbl+0x62>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <compare_dbl+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_dbl>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomisd %xmm1,%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_dbl(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp ogt double %4, %6
%8 = fcmp olt double %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
void sql_result() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @g_option_context_get_ignore_unknown_options() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int sumOfDigits(int);
int main() {
  int num;
  printf("Enter number to be summed: ");
  scanf("%d", &num);
  printf("\nThe sum of digits is %d \n", sumOfDigits(num));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <sumOfDigits@plt>
mov    %eax,%esi
lea    0xeb1(%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
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <sumOfDigits@plt>
lea    0xebf(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Enter number to be summed: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [27 x i8] c"\0AThe sum of digits is %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @sumOfDigits(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"Enter number to be summed: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [27 x i8] c"\0AThe sum of digits is %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @sumOfDigits(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Type definitions */
struct NetMes {
  int dummy;
};
struct NetBucket {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ NetBucket_write(struct NetBucket *, struct NetMes *);
int /*<<< orphan*/ NetMes_set_flags(struct NetMes *, int);
void NetBucket_quick_send(struct NetBucket *nbucket, struct NetMes *nmes) {
  NetMes_set_flags(nmes, 0X0);
  NetBucket_write(nbucket, nmes);
}


x86 assembly (clang, -O0):
<NetBucket_quick_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1040 <NetMes_set_flags@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <NetBucket_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NetBucket_quick_send>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
xor    %esi,%esi
call   1040 <NetMes_set_flags@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <NetBucket_write@plt>

LLVM IR (-O0):
%struct.NetBucket = type { i32 }
%struct.NetMes = type { i32 }
define void @NetBucket_quick_send(%struct.NetBucket* %0, %struct.NetMes* %1) {
%3 = alloca %struct.NetBucket*
%4 = alloca %struct.NetMes*
store %struct.NetBucket* %0, %struct.NetBucket** %3
store %struct.NetMes* %1, %struct.NetMes** %4
%5 = load %struct.NetMes*, %struct.NetMes** %4
%6 = call i32 @NetMes_set_flags(%struct.NetMes* %5, i32 0)
%7 = load %struct.NetBucket*, %struct.NetBucket** %3
%8 = load %struct.NetMes*, %struct.NetMes** %4
%9 = call i32 @NetBucket_write(%struct.NetBucket* %7, %struct.NetMes* %8)
ret void
}

LLVM IR (-O2):
%struct.NetBucket = type { i32 }
%struct.NetMes = type { i32 }
define void @NetBucket_quick_send(%struct.NetBucket* %0, %struct.NetMes* %1) {
%3 = tail call i32 @NetMes_set_flags(%struct.NetMes* %1, i32 0)
%4 = tail call i32 @NetBucket_write(%struct.NetBucket* %0, %struct.NetMes* %1)
ret void
}
unsigned int maximum(unsigned int n, unsigned int bound) {
  if (n == bound - 1) {
    return n;
  } else {
    return n + 1;
  }
}


x86 assembly (clang, -O0):
<maximum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    1126 <maximum+0x26>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112f <maximum+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maximum>:
add    $0xffffffff,%esi
xor    %eax,%eax
cmp    %edi,%esi
setne  %al
add    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @maximum(i32 %0, i32 %1) {
%3 = add i32 %1, -1
%4 = icmp ne i32 %3, %0
%5 = zext i1 %4 to i32
%6 = add i32 %5, %0
ret i32 %6
}