xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void print_word_reversed(char *str, int min, int max) {
  int x;
  for (x = max; x >= min; x--) {
    printf("%c", str[x]);
  }
}


x86 assembly (clang, -O0):
<print_word_reversed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     115a <print_word_reversed+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
lea    0xebd(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1128 <print_word_reversed+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_word_reversed>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    %esi,%edx
jl     1147 <print_word_reversed+0x37>
mov    %rdi,%r15
movslq %edx,%rbx
movslq %esi,%r12
add    $0x1,%rbx
lea    0xed0(%rip),%r14
movsbl -0x1(%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffffffffffff,%rbx
cmp    %r12,%rbx
jg     1130 <print_word_reversed+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @print_word_reversed(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %2, %1
br i1 %4, label %15, label %5
5: ; preds = %3
%6 = sext i32 %2 to i64
%7 = sext i32 %1 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ %6, %5 ], [ %13, %8 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %11)
%13 = add nsw i64 %9, -1
%14 = icmp sgt i64 %9, %7
br i1 %14, label %8, label %15
15: ; preds = %8, %3
ret void
}
/* Variables and functions */
double __infer_nondet_double();
double cos(double x) { return __infer_nondet_double(); }


x86 assembly (clang, -O0):
<cos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_double@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define double @cos(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double (...) @__infer_nondet_double()
ret double %3
}

LLVM IR (-O2):
define double @cos(double %0) {
%2 = tail call double (...) @__infer_nondet_double()
ret double %2
}
int test_imm_B3int64_lowword_mem(long long *val) {
  return ((*val) & (0xB3 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_B3int64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 179
%6 = icmp ne i64 %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_B3int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 179
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int getmaxx(int /*<<< orphan*/);
int /*<<< orphan*/ stdscr;
int winx() {
  int max_col = getmaxx(stdscr);
  return (max_col - 39 * 2) / 2 - 1;
}


x86 assembly (clang, -O0):
<winx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
call   1030 <getmaxx@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x4e,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<winx>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <getmaxx@plt>
mov    %eax,%ecx
add    $0xffffffb2,%ecx
shr    $0x1f,%ecx
add    %ecx,%eax
add    $0xffffffb2,%eax
sar    %eax
add    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdscr = global i32 0
define i32 @winx() {
%1 = alloca i32
%2 = load i32, i32* @stdscr
%3 = call i32 @getmaxx(i32 %2)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = sub nsw i32 %4, 78
%6 = sdiv i32 %5, 2
%7 = sub nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
@stdscr = global i32 0
define i32 @winx() {
%1 = load i32, i32* @stdscr
%2 = tail call i32 @getmaxx(i32 %1)
%3 = add nsw i32 %2, -78
%4 = sdiv i32 %3, 2
%5 = add nsw i32 %4, -1
ret i32 %5
}
/* Variables and functions */
int possibly_duplicate_function() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @possibly_duplicate_function() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void help(char *name) {
  printf("\nUsage:\n\t%s <file1> <file2>\n\t\tprint lines of <file1>, that not "
         "present in <file2>\n",
         name);
  printf("\t%s -v <file1> < file2>\n\t\tshows lines of <file1>, that present "
         "in <file2>\n",
         name);
  exit(0);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf0c(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xf19(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [83 x i8] c"\0AUsage:\0A\09%s <file1> <file2>\0A\09\09print lines of <file1>, that not present in <file2>\0A\00"
@.str.1 = [75 x i8] c"\09%s -v <file1> < file2>\0A\09\09shows lines of <file1>, that present in <file2>\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [83 x i8] c"\0AUsage:\0A\09%s <file1> <file2>\0A\09\09print lines of <file1>, that not present in <file2>\0A\00"
@.str.1 = [75 x i8] c"\09%s -v <file1> < file2>\0A\09\09shows lines of <file1>, that present in <file2>\0A\00"
define void @help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n = 0;
  printf("Dime un nmero!\n");
  scanf("%d", &n);
  printf("Has dicho: %d\n", n);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xea2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Dime un nmero!\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [15 x i8] c"Has dicho: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 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 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [15 x i8] c"Has dicho: %d\0A\00"
@str = [15 x i8] c"Dime un nmero!\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 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 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutexattr_t;

/* Variables and functions */
int EINVAL;
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) {
  if (attr == NULL)
    return (EINVAL);
  return (0);
}


x86 assembly (clang, -O0):
<pthread_mutexattr_destroy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1124 <pthread_mutexattr_destroy+0x24>
mov    0x2ec6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    112b <pthread_mutexattr_destroy+0x2b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_mutexattr_destroy>:
xor    %eax,%eax
test   %rdi,%rdi
jne    1110 <pthread_mutexattr_destroy+0x10>
mov    0x2ed2(%rip),%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @pthread_mutexattr_destroy(i32* readnone %0) {
%2 = icmp eq i32* %0, null
%3 = load i32, i32* @EINVAL
%4 = select i1 %2, i32 %3, i32 0
ret i32 %4
}
int libirc_findcrlf_offset(const char *buf, int offset, const int length) {
  for (; offset < length; offset++) {
    if (buf[offset] != 0x0D && buf[offset] != 0x0A) {
      break;
    }
  }
  return offset;
}


x86 assembly (clang, -O0):
<libirc_findcrlf_offset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    115c <libirc_findcrlf_offset+0x5c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xd,%eax
je     1149 <libirc_findcrlf_offset+0x49>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
je     1149 <libirc_findcrlf_offset+0x49>
jmp    115c <libirc_findcrlf_offset+0x5c>
jmp    114e <libirc_findcrlf_offset+0x4e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <libirc_findcrlf_offset+0xe>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<libirc_findcrlf_offset>:
mov    %esi,%eax
cmp    %edx,%esi
jge    1128 <libirc_findcrlf_offset+0x28>
movslq %eax,%rcx
add    %rcx,%rdi
jmp    111b <libirc_findcrlf_offset+0x1b>
xchg   %ax,%ax
add    $0x1,%eax
add    $0x1,%rdi
cmp    %eax,%edx
je     1129 <libirc_findcrlf_offset+0x29>
movzbl (%rdi),%ecx
cmp    $0xd,%cl
je     1110 <libirc_findcrlf_offset+0x10>
cmp    $0xa,%cl
je     1110 <libirc_findcrlf_offset+0x10>
ret
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @libirc_findcrlf_offset(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = sext i32 %1 to i64
br label %7
7: ; preds = %5, %11
%8 = phi i64 [ %6, %5 ], [ %12, %11 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
switch i8 %10, label %15 [
i8 13, label %11
i8 10, label %11
]
11: ; preds = %7, %7
%12 = add nsw i64 %8, 1
%13 = trunc i64 %12 to i32
%14 = icmp eq i32 %13, %2
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %11, %15, %3
%18 = phi i32 [ %1, %3 ], [ %16, %15 ], [ %2, %11 ]
ret i32 %18
}
int lex_char_is_ws(char c) {
  if (c == '\t' || c == '\n' || c == ' ') {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<lex_char_is_ws>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
je     1131 <lex_char_is_ws+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     1131 <lex_char_is_ws+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jne    113d <lex_char_is_ws+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <lex_char_is_ws+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lex_char_is_ws>:
cmp    $0x20,%dil
ja     1120 <lex_char_is_ws+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <lex_char_is_ws+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @lex_char_is_ws(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 10, label %3
i8 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int output_array(int array[], int length) {
  for (int i = 0; i < length; i++) {
    printf("array[%d]:%d\n", i, array[i]);
  }
}


x86 assembly (clang, -O0):
<output_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115a <output_array+0x4a>
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1126 <output_array+0x16>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1147 <output_array+0x37>
mov    %rdi,%r14
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <output_array+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [14 x i8] c"array[%d]:%d\0A\00"
define i32 @output_array(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
store i32 0, i32* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i32, i32* %6
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %7
22: ; preds = %7
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
@.str = [14 x i8] c"array[%d]:%d\0A\00"
define i32 @output_array(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 %7
6: ; preds = %7, %2
ret i32 undef
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %13, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = trunc i64 %8 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %10)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %7
}
int wordlength() {
  int i;
  unsigned v = (unsigned)~0;
  for (i = 1; (v >>= 1) > 0; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<wordlength>:
push   %rbp
mov    %rsp,%rbp
movl   $0xffffffff,-0x8(%rbp)
movl   $0x1,-0x4(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jbe    1137 <wordlength+0x37>
jmp    1129 <wordlength+0x29>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <wordlength+0x12>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @wordlength() {
ret i32 32
}
double hex(double v) {
  return (cub(v)) * (cub(v));
  __builtin_unreachable();
}


x86 assembly (clang, -O0):
<hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1030 <cub@plt>
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1030 <cub@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%al
call   1030 <cub@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1030 <cub@plt>
imul   %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @hex(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 (double, ...) bitcast (i32 (...)* @cub to i32 (double, ...)*)(double %3)
%5 = load double, double* %2
%6 = call i32 (double, ...) bitcast (i32 (...)* @cub to i32 (double, ...)*)(double %5)
%7 = mul nsw i32 %4, %6
%8 = sitofp i32 %7 to double
ret double %8
}

LLVM IR (-O2):
define double @hex(double %0) {
%2 = tail call i32 (double, ...) bitcast (i32 (...)* @cub to i32 (double, ...)*)(double %0)
%3 = tail call i32 (double, ...) bitcast (i32 (...)* @cub to i32 (double, ...)*)(double %0)
%4 = mul nsw i32 %3, %2
%5 = sitofp i32 %4 to double
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ keystatus;
typedef int /*<<< orphan*/ enum_t;
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ xdr_enum(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
bool_t xdr_keystatus(register XDR *xdrs, keystatus *objp) {
  if (!xdr_enum(xdrs, (enum_t *)objp))
    return (FALSE);
  return (TRUE);
}


x86 assembly (clang, -O0):
<xdr_keystatus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <xdr_enum@plt>
cmp    $0x0,%eax
jne    1147 <xdr_keystatus+0x37>
mov    0x2e9b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <xdr_keystatus+0x43>
mov    0x2e9a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_keystatus>:
push   %rax
call   1030 <xdr_enum@plt>
test   %eax,%eax
jne    1123 <xdr_keystatus+0x13>
mov    0x2eb7(%rip),%rax
jmp    112a <xdr_keystatus+0x1a>
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@FALSE = global i32 0
@TRUE = global i32 0
define i32 @xdr_keystatus(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 = call i32 @xdr_enum(i32* %6, i32* %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = load i32, i32* @FALSE
store i32 %11, i32* %3
br label %14
12: ; preds = %2
%13 = load i32, i32* @TRUE
store i32 %13, i32* %3
br label %14
14: ; preds = %12, %10
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@FALSE = global i32 0
@TRUE = global i32 0
define i32 @xdr_keystatus(i32* %0, i32* %1) {
%3 = tail call i32 @xdr_enum(i32* %0, i32* %1)
%4 = icmp eq i32 %3, 0
%5 = load i32, i32* @FALSE
%6 = load i32, i32* @TRUE
%7 = select i1 %4, i32 %5, i32 %6
ret i32 %7
}
main() {
  switch (0)
  case 2:
  default:
    if (5)
      ;
  ;
  ;
  ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
void print_parsed(void) {
  static int parsed = 0;
  parsed++;
  printf("Parsed %05i files.", parsed);
  printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<print_parsed>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f0a(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f01(%rip)
mov    0x2efb(%rip),%esi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_parsed>:
push   %rax
mov    0x2f0d(%rip),%esi
add    $0x1,%esi
mov    %esi,0x2f04(%rip)
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@print_parsed.parsed = internal global i32 0
@.str = [19 x i8] c"Parsed %05i files.\00"
@.str.1 = [20 x i8] c"\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\00"
@stdout = global i32 0
define void @print_parsed() {
%1 = load i32, i32* @print_parsed.parsed
%2 = add nsw i32 %1, 1
store i32 %2, i32* @print_parsed.parsed
%3 = load i32, i32* @print_parsed.parsed
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stdout
%7 = call i32 @fflush(i32 %6)
ret void
}

LLVM IR (-O2):
@print_parsed.parsed = internal unnamed_addr global i32 0
@.str = [19 x i8] c"Parsed %05i files.\00"
@.str.1 = [20 x i8] c"\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\00"
@stdout = global i32 0
define void @print_parsed() {
%1 = load i32, i32* @print_parsed.parsed
%2 = add nsw i32 %1, 1
store i32 %2, i32* @print_parsed.parsed
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
pthread_t __VERIFIER_nondet_pthread_t() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__VERIFIER_nondet_pthread_t() {
ret i32 0
}
/* Variables and functions */
char *getenv(char const *);
char *xstrdup(char const *);
char *get_non_empty_env(const char *name) {
  const char *val;
  val = getenv(name);
  if (val == NULL || val[0] == 0)
    return NULL;
  return xstrdup(val);
}


x86 assembly (clang, -O0):
<get_non_empty_env>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1154 <get_non_empty_env+0x34>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1161 <get_non_empty_env+0x41>
movq   $0x0,-0x8(%rbp)
jmp    116e <get_non_empty_env+0x4e>
mov    -0x18(%rbp),%rdi
call   1040 <xstrdup@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_non_empty_env>:
push   %rax
call   1030 <getenv@plt>
test   %rax,%rax
je     1139 <get_non_empty_env+0x19>
cmpb   $0x0,(%rax)
je     1139 <get_non_empty_env+0x19>
mov    %rax,%rdi
pop    %rax
jmp    1040 <xstrdup@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @get_non_empty_env(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @getenv(i8* %5)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %15, label %9
9: ; preds = %1
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %9, %1
store i8* null, i8** %2
br label %19
16: ; preds = %9
%17 = load i8*, i8** %4
%18 = call i8* @xstrdup(i8* %17)
store i8* %18, i8** %2
br label %19
19: ; preds = %16, %15
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @get_non_empty_env(i8* nocapture %0) {
%2 = tail call i8* @getenv(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = load i8, i8* %2
%6 = icmp eq i8 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i8* @xstrdup(i8* %2)
br label %9
9: ; preds = %1, %4, %7
%10 = phi i8* [ %8, %7 ], [ null, %4 ], [ null, %1 ]
ret i8* %10
}
/* Variables and functions */
int abrirSocketRaw();
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
int main(void) {
  int ds;
  ds = abrirSocketRaw();
  if (ds < 0) {
    perror("No pude abrir el socket");
    exit(1);
  } else
    printf("Socket abierto correctamente\n");
  close(ds);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <abrirSocketRaw@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1189 <main+0x39>
lea    0xe86(%rip),%rdi
call   1060 <perror@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
lea    0xe88(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1050 <close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <abrirSocketRaw@plt>
test   %eax,%eax
js     1175 <main+0x25>
mov    %eax,%ebx
lea    0xeb3(%rip),%rdi
call   1040 <puts@plt>
mov    %ebx,%edi
call   1050 <close@plt>
xor    %eax,%eax
pop    %rbx
ret
lea    0xe84(%rip),%rdi
call   1060 <perror@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"No pude abrir el socket\00"
@.str.1 = [30 x i8] c"Socket abierto correctamente\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @abrirSocketRaw()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9
%12 = load i32, i32* %2
%13 = call i32 @close(i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"No pude abrir el socket\00"
@str = [29 x i8] c"Socket abierto correctamente\00"
define i32 @main() {
%1 = tail call i32 (...) @abrirSocketRaw()
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @close(i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
char get_char(int /*<<< orphan*/ *);
void skip_until_eol(FILE *fp) {
  while (get_char(fp) != '\n' && !feof(fp))
    ;
}


x86 assembly (clang, -O0):
<skip_until_eol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <get_char@plt>
movsbl %al,%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x9(%rbp)
je     115a <skip_until_eol+0x3a>
mov    -0x8(%rbp),%rdi
call   1030 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    116a <skip_until_eol+0x4a>
jmp    116f <skip_until_eol+0x4f>
jmp    112c <skip_until_eol+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_until_eol>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1040 <get_char@plt>
cmp    $0xa,%al
je     1148 <skip_until_eol+0x28>
mov    %rbx,%rdi
call   1030 <feof@plt>
test   %eax,%eax
je     1130 <skip_until_eol+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @skip_until_eol(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
br label %3
3: ; preds = %15, %1
%4 = load i32*, i32** %2
%5 = call signext i8 @get_char(i32* %4)
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 10
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i32*, i32** %2
%10 = call i32 @feof(i32* %9)
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %16
15: ; preds = %13
br label %3
16: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @skip_until_eol(i32* %0) {
br label %2
2: ; preds = %5, %1
%3 = tail call signext i8 @get_char(i32* %0)
%4 = icmp eq i8 %3, 10
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @feof(i32* %0)
%7 = icmp eq i32 %6, 0
br i1 %7, label %2, label %8
8: ; preds = %2, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x68() {
  Assert_real((ispunct(104) == 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_ispunct.c",
              525, ("ispunct should be 0 for h"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x68>:
push   %rax
mov    $0x68,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x20d,%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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for h\00"
define void @t_ispunct_0x68() {
%1 = call i64 @ispunct(i32 104)
%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 525, 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for h\00"
define void @t_ispunct_0x68() {
%1 = tail call i64 @ispunct(i32 104)
%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 525, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int __crc32b(unsigned int, unsigned char);
unsigned int test__crc32b(unsigned int CRC, unsigned char V) {
  return __crc32b(CRC, V);
}


x86 assembly (clang, -O0):
<test__crc32b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
movzbl -0x5(%rbp),%esi
call   1030 <__crc32b@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test__crc32b>:
jmp    1030 <__crc32b@plt>

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

LLVM IR (-O2):
define i32 @test__crc32b(i32 %0, i8 zeroext %1) {
%3 = tail call i32 @__crc32b(i32 %0, i8 zeroext %1)
ret i32 %3
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_08(uint64_t x) {
  __asm__("rolq $8, %0" : "=r"(x) : "0"(x));
  return x;
}


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

x86 assembly (clang, -O2):
<ROL64_08>:
mov    %rdi,%rax
rol    $0x8,%rax
ret

LLVM IR (-O0):
define i8* @ROL64_08(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$8, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_08(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$8, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
double LSKeyframeAnimationFunctionEaseOutQuart(double t, double b, double c,
                                               double d) {
  return -c * ((t = t / d - 1) * t * t * t - 1) + b;
}


x86 assembly (clang, -O0):
<LSKeyframeAnimationFunctionEaseOutQuart>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x8(%rbp),%xmm2
divsd  -0x20(%rbp),%xmm2
movsd  0xec2(%rip),%xmm1
subsd  %xmm1,%xmm2
movsd  %xmm2,-0x8(%rbp)
mulsd  -0x8(%rbp),%xmm2
mulsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm2
movsd  0xe96(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<LSKeyframeAnimationFunctionEaseOutQuart>:
divsd  %xmm3,%xmm0
movsd  0xef4(%rip),%xmm3
addsd  %xmm3,%xmm0
movapd %xmm0,%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
mulsd  %xmm2,%xmm4
subsd  %xmm4,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @LSKeyframeAnimationFunctionEaseOutQuart(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
%9 = load double, double* %7
%10 = fneg double %9
%11 = load double, double* %5
%12 = load double, double* %8
%13 = fdiv double %11, %12
%14 = fsub double %13, 1.000000e+00
store double %14, double* %5
%15 = load double, double* %5
%16 = fmul double %14, %15
%17 = load double, double* %5
%18 = fmul double %16, %17
%19 = load double, double* %5
%20 = call double @llvm.fmuladd.f64(double %18, double %19, double -1.000000e+00)
%21 = load double, double* %6
%22 = call double @llvm.fmuladd.f64(double %10, double %20, double %21)
ret double %22
}

LLVM IR (-O2):
define double @LSKeyframeAnimationFunctionEaseOutQuart(double %0, double %1, double %2, double %3) {
%5 = fneg double %2
%6 = fdiv double %0, %3
%7 = fadd double %6, -1.000000e+00
%8 = fmul double %7, %7
%9 = fmul double %7, %8
%10 = tail call double @llvm.fmuladd.f64(double %9, double %7, double -1.000000e+00)
%11 = tail call double @llvm.fmuladd.f64(double %5, double %10, double %1)
ret double %11
}
void sme_external_auth_trigger(struct wpa_supplicant *wpa_s,
                               union wpa_event_data *data) {}


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

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

LLVM IR (-O0):
%struct.wpa_supplicant = type opaque
%union.wpa_event_data = type opaque
define void @sme_external_auth_trigger(%struct.wpa_supplicant* %0, %union.wpa_event_data* %1) {
%3 = alloca %struct.wpa_supplicant*
%4 = alloca %union.wpa_event_data*
store %struct.wpa_supplicant* %0, %struct.wpa_supplicant** %3
store %union.wpa_event_data* %1, %union.wpa_event_data** %4
ret void
}

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
%union.wpa_event_data = type opaque
define void @sme_external_auth_trigger(%struct.wpa_supplicant* nocapture %0, %union.wpa_event_data* nocapture %1) {
ret void
}
int Section3Hours(int *seconds) { return *seconds / 3600; }


x86 assembly (clang, -O0):
<Section3Hours>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<Section3Hours>:
movslq (%rdi),%rcx
imul   $0xffffffff91a2b3c5,%rcx,%rax
shr    $0x20,%rax
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0xb,%eax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @Section3Hours(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = sdiv i32 %2, 3600
ret i32 %3
}
OP(dd, da) {
  illegal_1();
  op_da();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_da@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_da()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_da()
ret i32 undef
}
/* Variables and functions */
int listlen(void **list) {
  if (list == NULL) {
    return 0;
  }
  int res = 0;
  while (*list != NULL) {
    res++;
    list++;
  }
  return res;
}


x86 assembly (clang, -O0):
<listlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <listlen+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1154 <listlen+0x54>
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     114e <listlen+0x4e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1126 <listlen+0x26>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<listlen>:
xor    %eax,%eax
test   %rdi,%rdi
je     111c <listlen+0x1c>
cmpq   $0x0,(%rdi)
je     111c <listlen+0x1c>
xor    %eax,%eax
nop
cmpq   $0x0,0x8(%rdi,%rax,8)
lea    0x1(%rax),%rax
jne    1110 <listlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @listlen(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i32 [ %9, %6 ], [ 0, %3 ]
%8 = phi i8** [ %10, %6 ], [ %0, %3 ]
%9 = add nuw nsw i32 %7, 1
%10 = getelementptr inbounds i8*, i8** %8, i64 1
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
%14 = phi i32 [ 0, %1 ], [ 0, %3 ], [ %9, %6 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ ObjValidate();
void ov() { ObjValidate(); }


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

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

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

LLVM IR (-O2):
define void @ov() {
%1 = tail call i32 (...) @ObjValidate()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ test_swap();
int main() {
  int counter = 0;
  if (!test_swap()) {
    counter++;
    printf("Swap test failed.\n");
  }
  printf("%d tests failed.\n", counter);
}


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   1030 <test_swap@plt>
cmp    $0x0,%eax
jne    115d <main+0x3d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <test_swap@plt>
test   %eax,%eax
jne    114f <main+0x1f>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%ebx
lea    0xeaa(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Swap test failed.\0A\00"
@.str.1 = [18 x i8] c"%d tests failed.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (...) @test_swap()
%4 = icmp ne i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %0
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %5, %0
%10 = load i32, i32* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str.1 = [18 x i8] c"%d tests failed.\0A\00"
@str = [18 x i8] c"Swap test failed.\00"
define i32 @main() {
%1 = tail call i32 (...) @test_swap()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ 0, %0 ], [ 1, %3 ]
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void signal_handler(int signal) { printf("Received signal %d\n", signal); }


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

x86 assembly (clang, -O2):
<signal_handler>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [20 x i8] c"Received signal %d\0A\00"
define void @signal_handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}