xunge/DecIR huggingface dataset:
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int celcon_permute_standard_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(105, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_permute_standard_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x69,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_permute_standard_system>:
mov    $0x69,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @celcon_permute_standard_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 105, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @celcon_permute_standard_system() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 105, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_mutex_init(int /*<<< orphan*/ *,
                                      int /*<<< orphan*/ *);
void ShreyasInit(pthread_mutex_t m) { pthread_mutex_init(&m, NULL); }


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

x86 assembly (clang, -O2):
<ShreyasInit>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
xor    %esi,%esi
call   1030 <pthread_mutex_init@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @ShreyasInit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @pthread_mutex_init(i32* %2, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ count_down_from_n(int);
int /*<<< orphan*/ count_up_to_n(int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int n = 10;
  printf("Let's go up to %d...\n", n);
  count_up_to_n(n);
  printf("and back down again...\n");
  count_down_from_n(n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <count_up_to_n@plt>
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1050 <count_down_from_n@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1050 <count_up_to_n@plt>
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
mov    $0xa,%edi
call   1060 <count_down_from_n@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Let's go up to %d...\0A\00"
@.str.1 = [24 x i8] c"and back down again...\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @count_up_to_n(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = call i32 @count_down_from_n(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Let's go up to %d...\0A\00"
@str = [23 x i8] c"and back down again...\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 10)
%2 = tail call i32 @count_up_to_n(i32 10)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @count_down_from_n(i32 10)
ret i32 0
}
/* Variables and functions */
int strcmp(char const *, char const *);
int sort_compare_strings_asc(const void *a, const void *b) {
  return strcmp(*(const char **)a, *(const char **)b);
}


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

x86 assembly (clang, -O2):
<sort_compare_strings_asc>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @sort_compare_strings_asc(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 i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @sort_compare_strings_asc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ testequal(int, int);
int main() {
  {
    testequal(24723578342962, -1);
    testequal(135440716410000, 4824);
    testequal(26825883955641, 3218);
    testequal(441, 6);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x681ace32,%edi
mov    $0xffffffff,%esi
call   1030 <testequal@plt>
mov    $0xbfca2c90,%edi
mov    $0x12d8,%esi
call   1030 <testequal@plt>
mov    $0xe348b1b9,%edi
mov    $0xc92,%esi
call   1030 <testequal@plt>
mov    $0x1b9,%edi
mov    $0x6,%esi
call   1030 <testequal@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x681ace32,%edi
mov    $0xffffffff,%esi
call   1030 <testequal@plt>
mov    $0xbfca2c90,%edi
mov    $0x12d8,%esi
call   1030 <testequal@plt>
mov    $0xe348b1b9,%edi
mov    $0xc92,%esi
call   1030 <testequal@plt>
mov    $0x1b9,%edi
mov    $0x6,%esi
call   1030 <testequal@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @testequal(i32 1746587186, i32 -1)
%2 = call i32 @testequal(i32 -1077269360, i32 4824)
%3 = call i32 @testequal(i32 -481775175, i32 3218)
%4 = call i32 @testequal(i32 441, i32 6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @testequal(i32 1746587186, i32 -1)
%2 = tail call i32 @testequal(i32 -1077269360, i32 4824)
%3 = tail call i32 @testequal(i32 -481775175, i32 3218)
%4 = tail call i32 @testequal(i32 441, i32 6)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool WatchdogRunning(uint32_t ui32Base) {
  ;
  return ((*((volatile uint32_t *)(ui32Base + 0x00000008))) & 0x00000001);
}


x86 assembly (clang, -O0):
<WatchdogRunning>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x8,%eax
cltq
mov    (%rax),%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogRunning>:
movslq %edi,%rax
mov    0x8(%rax),%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @WatchdogRunning(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 8
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @WatchdogRunning(i32 %0) {
%2 = add nsw i32 %0, 8
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, 1
ret i32 %6
}
void voice_chat_stop_threads(void) {}


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

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

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

LLVM IR (-O2):
define void @voice_chat_stop_threads() {
ret void
}
int gpio_sysfs_set_active_low(unsigned gpio, int value) { return -38; }


x86 assembly (clang, -O0):
<gpio_sysfs_set_active_low>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0xffffffda,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @gpio_sysfs_set_active_low(i32 %0, i32 %1) {
ret i32 -38
}
void init_disassembler(void) {}


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

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

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

LLVM IR (-O2):
define void @init_disassembler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, ...);
void fd_setblock(int fd) {
  int flags;
  flags = fcntl(fd, F_GETFL);
  flags &= ~O_NONBLOCK;
  fcntl(fd, F_SETFL, flags);
}


x86 assembly (clang, -O0):
<fd_setblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,-0x8(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e8b(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
mov    $0x0,%al
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_setblock>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
call   1030 <fcntl@plt>
mov    0x2ebe(%rip),%rcx
mov    (%rcx),%edx
not    %edx
and    %eax,%edx
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
@F_SETFL = global i32 0
define void @fd_setblock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @F_GETFL
%6 = call i32 (i32, i32, ...) @fcntl(i32 %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* @O_NONBLOCK
%8 = xor i32 %7, -1
%9 = load i32, i32* %3
%10 = and i32 %9, %8
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = load i32, i32* @F_SETFL
%13 = load i32, i32* %3
%14 = call i32 (i32, i32, ...) @fcntl(i32 %11, i32 %12, i32 %13)
ret void
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
@F_SETFL = global i32 0
define void @fd_setblock(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %2)
%4 = load i32, i32* @O_NONBLOCK
%5 = xor i32 %4, -1
%6 = and i32 %3, %5
%7 = load i32, i32* @F_SETFL
%8 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %7, i32 %6)
ret void
}
const char *get_mclock_name(void) { return ("CLOCK_MONOTONIC"); }


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"CLOCK_MONOTONIC\00"
define i8* @get_mclock_name() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
void free_int_RT(int nrow, int **RT) {
  int i;
  for (i = 0; i < nrow; i++) {
    free(RT[i]);
  }
  free(RT);
}


x86 assembly (clang, -O0):
<free_int_RT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1151 <free_int_RT+0x41>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <free_int_RT+0x16>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_int_RT>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
test   %edi,%edi
jle    1142 <free_int_RT+0x32>
mov    %edi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_int_RT+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_int_RT(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* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32**, i32*** %4
%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 = bitcast i32* %15 to i8*
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 = load i32**, i32*** %4
%22 = bitcast i32** %21 to i8*
ret void
}

LLVM IR (-O2):
define void @free_int_RT(i32 %0, i32** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32*, i32** %1, i64 %7
%9 = bitcast i32** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast i32** %1 to i8*
tail call void @free(i8* %14)
ret void
}
char *skip_line(char *pin) {
  while (*pin != '\n' && *pin != '\0')
    pin++;
  if (*pin == '\0')
    return (pin);
  else
    return (++pin);
}


x86 assembly (clang, -O0):
<skip_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x11(%rbp)
je     112d <skip_line+0x2d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    113d <skip_line+0x3d>
jmp    114e <skip_line+0x4e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <skip_line+0x8>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    116b <skip_line+0x6b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    117b <skip_line+0x7b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_line>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax),%ecx
test   %cl,%cl
je     1122 <skip_line+0x22>
cmp    $0xa,%cl
je     1122 <skip_line+0x22>
add    $0x1,%rax
jmp    1110 <skip_line+0x10>
cmp    $0x1,%cl
sbb    $0xffffffffffffffff,%rax
ret

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

LLVM IR (-O2):
define i8* @skip_line(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 10, label %7
i8 0, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
%8 = icmp ne i8 %4, 0
%9 = zext i1 %8 to i64
%10 = getelementptr i8, i8* %3, i64 %9
ret i8* %10
}
double invSqrt(double x) {
  double halfx = 0.5 * x;
  double y = x;
  long i = (*(long *)&y);
  i = 0x5f3759df - (i >> 1);
  y = (*(double *)&i);
  y = y * (1.5 - (halfx * y * y));
  return y;
}


x86 assembly (clang, -O0):
<invSqrt>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
sar    $0x1,%rcx
mov    $0x5f3759df,%eax
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe7e(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<invSqrt>:
movq   %xmm0,%rax
sar    %rax
mov    $0x5f3759df,%ecx
sub    %rax,%rcx
movq   %rcx,%xmm1
mulsd  0xee3(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
addsd  0xedb(%rip),%xmm0
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @invSqrt(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca i64
store double %0, double* %2
%6 = load double, double* %2
%7 = fmul double 5.000000e-01, %6
store double %7, double* %3
%8 = load double, double* %2
store double %8, double* %4
%9 = bitcast double* %4 to i64*
%10 = load i64, i64* %9
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = ashr i64 %11, 1
%13 = sub nsw i64 1597463007, %12
store i64 %13, i64* %5
%14 = bitcast i64* %5 to double*
%15 = load double, double* %14
store double %15, double* %4
%16 = load double, double* %4
%17 = load double, double* %3
%18 = load double, double* %4
%19 = fmul double %17, %18
%20 = load double, double* %4
%21 = fneg double %19
%22 = call double @llvm.fmuladd.f64(double %21, double %20, double 1.500000e+00)
%23 = fmul double %16, %22
store double %23, double* %4
%24 = load double, double* %4
ret double %24
}

LLVM IR (-O2):
define double @invSqrt(double %0) {
%2 = bitcast double %0 to i64
%3 = ashr i64 %2, 1
%4 = sub nsw i64 1597463007, %3
%5 = bitcast i64 %4 to double
%6 = fmul double %0, -5.000000e-01
%7 = fmul double %6, %5
%8 = tail call double @llvm.fmuladd.f64(double %7, double %5, double 1.500000e+00)
%9 = fmul double %8, %5
ret double %9
}
void mcu_atmel_atmega328p_Atmega328p_reset__E() {}


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

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

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

LLVM IR (-O2):
define void @mcu_atmel_atmega328p_Atmega328p_reset__E() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ close(int /*<<< orphan*/);
void pipe_cleanup(void) { close(STDOUT_FILENO); }


x86 assembly (clang, -O0):
<pipe_cleanup>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
call   1030 <close@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pipe_cleanup>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <close@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define void @pipe_cleanup() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = call i32 @close(i32 %1)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define void @pipe_cleanup() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = tail call i32 @close(i32 %1)
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int volatile int32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int32_t ADCSequenceUnderflow(uint32_t ui32Base, uint32_t ui32SequenceNum) {
  ASSERT((ui32Base == 0x40038000) || (ui32Base == 0x40039000));
  ASSERT(ui32SequenceNum < 4);
  return ((*((volatile uint32_t *)(ui32Base + 0x00000018))) &
          (1 << ui32SequenceNum));
}


x86 assembly (clang, -O0):
<ADCSequenceUnderflow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x40038000,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     113d <ADCSequenceUnderflow+0x2d>
cmpl   $0x40039000,-0x4(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x4,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x18,%eax
cltq
mov    (%rax),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCSequenceUnderflow>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x40038000,%eax
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x4,%ebx
setl   %dil
call   1030 <ASSERT@plt>
mov    $0x1,%eax
mov    %ebx,%ecx
shl    %cl,%eax
movslq %ebp,%rcx
and    0x18(%rcx),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ADCSequenceUnderflow(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1073971200
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1073975296
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @ASSERT(i32 %12)
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 4
%16 = zext i1 %15 to i32
%17 = call i32 @ASSERT(i32 %16)
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 24
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
%22 = load volatile i32, i32* %21
%23 = load i32, i32* %4
%24 = shl i32 1, %23
%25 = and i32 %22, %24
ret i32 %25
}

LLVM IR (-O2):
define i32 @ADCSequenceUnderflow(i32 %0, i32 %1) {
%3 = and i32 %0, -4097
%4 = icmp eq i32 %3, 1073971200
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = icmp slt i32 %1, 4
%8 = zext i1 %7 to i32
%9 = tail call i32 @ASSERT(i32 %8)
%10 = add nsw i32 %0, 24
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
%13 = load volatile i32, i32* %12
%14 = shl nuw i32 1, %1
%15 = and i32 %13, %14
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char **);
char *strdup(char *);
main(int argc, char *argv[]) {
  char *str;
  str = strdup(argv[0]);
  printf("the duplicate %p, the original %p\n", str, argv);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    (%rsi),%rdi
call   1040 <strdup@plt>
lea    0xecd(%rip),%rdi
mov    %rax,%rsi
mov    %rbx,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"the duplicate %p, the original %p\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
%10 = call i8* @strdup(i8* %9)
store i8* %10, i8** %6
%11 = load i8*, i8** %6
%12 = load i8**, i8*** %5
%13 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %11, i8** %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"the duplicate %p, the original %p\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = load i8*, i8** %1
%4 = tail call i8* @strdup(i8* %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %4, i8** %1)
ret i32 0
}
/* Variables and functions */
int havege_random(void *, char *, size_t);
int attacker_key_item_havege_random_stub(void *havege_state, char *output,
                                         size_t len) {
  return havege_random(havege_state, output, len);
}


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

x86 assembly (clang, -O2):
<attacker_key_item_havege_random_stub>:
jmp    1030 <havege_random@plt>

LLVM IR (-O0):
define i32 @attacker_key_item_havege_random_stub(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @havege_random(i8* %7, i8* %8, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @attacker_key_item_havege_random_stub(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @havege_random(i8* %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
void FuzzerCleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @FuzzerCleanup() {
ret void
}
void ii(int a) {}


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

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

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

LLVM IR (-O2):
define void @ii(i32 %0) {
ret void
}
/* Type definitions */
struct dt_array {
  int dummy;
};

/* Variables and functions */
scalar_t__ dt_array_find(struct dt_array *, void *, size_t *);
int dt_array_remove_at(struct dt_array *, size_t, void *);
int dt_array_remove(struct dt_array *a, void *data, void *ret) {
  size_t index;
  if (dt_array_find(a, data, &index) < 0) {
    return -1;
  }
  return dt_array_remove_at(a, index, ret);
}


x86 assembly (clang, -O0):
<dt_array_remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x28(%rbp),%rdx
call   1040 <dt_array_find@plt>
cmp    $0x0,%rax
jge    115b <dt_array_remove+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    116f <dt_array_remove+0x4f>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dt_array_remove_at@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dt_array_remove>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %rsp,%rdx
call   1040 <dt_array_find@plt>
test   %rax,%rax
js     1148 <dt_array_remove+0x28>
mov    (%rsp),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <dt_array_remove_at@plt>
jmp    114d <dt_array_remove+0x2d>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.dt_array = type { i32 }
define i32 @dt_array_remove(%struct.dt_array* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.dt_array*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
store %struct.dt_array* %0, %struct.dt_array** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%9 = load %struct.dt_array*, %struct.dt_array** %5
%10 = load i8*, i8** %6
%11 = call i64 @dt_array_find(%struct.dt_array* %9, i8* %10, i64* %8)
%12 = icmp slt i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %3
store i32 -1, i32* %4
br label %19
14: ; preds = %3
%15 = load %struct.dt_array*, %struct.dt_array** %5
%16 = load i64, i64* %8
%17 = load i8*, i8** %7
%18 = call i32 @dt_array_remove_at(%struct.dt_array* %15, i64 %16, i8* %17)
store i32 %18, i32* %4
br label %19
19: ; preds = %14, %13
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
%struct.dt_array = type { i32 }
define i32 @dt_array_remove(%struct.dt_array* %0, i8* %1, i8* %2) {
%4 = alloca i64
%5 = bitcast i64* %4 to i8*
%6 = call i64 @dt_array_find(%struct.dt_array* %0, i8* %1, i64* %4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %3
%9 = load i64, i64* %4
%10 = call i32 @dt_array_remove_at(%struct.dt_array* %0, i64 %9, i8* %2)
br label %11
11: ; preds = %3, %8
%12 = phi i32 [ %10, %8 ], [ -1, %3 ]
ret i32 %12
}
/* Variables and functions */
char entab();
main() {
  char i;
  i = entab();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <entab@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call signext i8 (...) @entab()
ret i32 0
}
int test_imm_A7int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xA7 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_A7int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 10944512
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void _kill(int pid, int sig) {}


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

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

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

LLVM IR (-O2):
define void @_kill(i32 %0, i32 %1) {
ret void
}
__attribute__((const)) float av_clipf(float a, float amin, float amax) {
  if (a < amin)
    return amin;
  else if (a > amax)
    return amax;
  else
    return a;
}


x86 assembly (clang, -O0):
<av_clipf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1135 <av_clipf+0x35>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <av_clipf+0x5d>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1153 <av_clipf+0x53>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <av_clipf+0x5d>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_clipf>:
minss  %xmm0,%xmm2
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm3
andnps %xmm2,%xmm3
andps  %xmm1,%xmm0
orps   %xmm3,%xmm0
ret

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

LLVM IR (-O2):
define float @av_clipf(float %0, float %1, float %2) {
%4 = fcmp olt float %0, %1
%5 = fcmp ogt float %0, %2
%6 = select i1 %5, float %2, float %0
%7 = select i1 %4, float %1, float %6
ret float %7
}
long __attribute__((warn_unused_result)) IS_ERR(const void *ptr) {
  return (((unsigned long)ptr) >= (unsigned long)-4095);
}


x86 assembly (clang, -O0):
<IS_ERR>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0xfffffffffffff001,%rax
setae  %al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<IS_ERR>:
xor    %eax,%eax
cmp    $0xfffffffffffff001,%rdi
setae  %al
ret

LLVM IR (-O0):
define i64 @IS_ERR(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = icmp uge i64 %4, -4095
%6 = zext i1 %5 to i32
%7 = sext i32 %6 to i64
ret i64 %7
}

LLVM IR (-O2):
define i64 @IS_ERR(i8* readnone %0) {
%2 = icmp ugt i8* %0, inttoptr (i64 -4096 to i8*)
%3 = zext i1 %2 to i64
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ eFree(char *);
char *popString();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
int /*<<< orphan*/ val(char *);
void basVal() {
  char *string;
  string = popString();
  pushNumber(val(string));
  eFree(string);
}


x86 assembly (clang, -O0):
<basVal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popString@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <val@plt>
mov    %eax,%edi
call   1060 <pushNumber@plt>
mov    -0x8(%rbp),%rdi
call   1030 <eFree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basVal>:
push   %rbx
xor    %eax,%eax
call   1050 <popString@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <val@plt>
mov    %eax,%edi
call   1060 <pushNumber@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <eFree@plt>

LLVM IR (-O0):
define void @basVal() {
%1 = alloca i8*
%2 = call i8* (...) @popString()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @val(i8* %3)
%5 = call i32 @pushNumber(i32 %4)
%6 = load i8*, i8** %1
%7 = call i32 @eFree(i8* %6)
ret void
}

LLVM IR (-O2):
define void @basVal() {
%1 = tail call i8* (...) @popString()
%2 = tail call i32 @val(i8* %1)
%3 = tail call i32 @pushNumber(i32 %2)
%4 = tail call i32 @eFree(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xe8() {
  Assert_real((isodigit(232) == 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",
              1165, ("isodigit should be 0 for 0xe8"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xe8>:
push   %rax
mov    $0xe8,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x48d,%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 0xe8\00"
define void @t_isodigit_0xe8() {
%1 = call i64 @isodigit(i32 232)
%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 1165, 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 0xe8\00"
define void @t_isodigit_0xe8() {
%1 = tail call i64 @isodigit(i32 232)
%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 1165, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct VAL_cell {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ VAL_cell_recursive_print(struct VAL_cell *);
int /*<<< orphan*/ printf(char *);
void VAL_cell_print(struct VAL_cell *self) {
  if (!self)
    return;
  VAL_cell_recursive_print(self);
  printf("\n");
}


x86 assembly (clang, -O0):
<VAL_cell_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <VAL_cell_print+0x1c>
jmp    1151 <VAL_cell_print+0x31>
mov    -0x8(%rbp),%rdi
call   1040 <VAL_cell_recursive_print@plt>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VAL_cell_print>:
test   %rdi,%rdi
je     1136 <VAL_cell_print+0x16>
push   %rax
call   1040 <VAL_cell_recursive_print@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>
ret

LLVM IR (-O0):
%struct.VAL_cell = type { i32 }
@.str = [2 x i8] c"\0A\00"
define void @VAL_cell_print(%struct.VAL_cell* %0) {
%2 = alloca %struct.VAL_cell*
store %struct.VAL_cell* %0, %struct.VAL_cell** %2
%3 = load %struct.VAL_cell*, %struct.VAL_cell** %2
%4 = icmp ne %struct.VAL_cell* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %10
6: ; preds = %1
%7 = load %struct.VAL_cell*, %struct.VAL_cell** %2
%8 = call i32 @VAL_cell_recursive_print(%struct.VAL_cell* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.VAL_cell = type { i32 }
define void @VAL_cell_print(%struct.VAL_cell* %0) {
%2 = icmp eq %struct.VAL_cell* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @VAL_cell_recursive_print(%struct.VAL_cell* %0)
%5 = tail call i32 @putchar(i32 10)
br label %6
6: ; preds = %1, %3
ret void
}
unsigned short int f21(unsigned short int x, unsigned int y) {
  return (x >> (8 * 2 - y)) ^ (x << y);
}


x86 assembly (clang, -O0):
<f21>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
mov    $0x10,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f21>:
mov    $0x10,%cl
sub    %sil,%cl
mov    %edi,%eax
shr    %cl,%eax
mov    %esi,%ecx
shl    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f21(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i32, i32* %4
%8 = sub i32 16, %7
%9 = ashr i32 %6, %8
%10 = load i16, i16* %3
%11 = zext i16 %10 to i32
%12 = load i32, i32* %4
%13 = shl i32 %11, %12
%14 = xor i32 %9, %13
%15 = trunc i32 %14 to i16
ret i16 %15
}

LLVM IR (-O2):
define zeroext i16 @f21(i16 zeroext %0, i32 %1) {
%3 = zext i16 %0 to i32
%4 = sub i32 16, %1
%5 = lshr i32 %3, %4
%6 = shl i32 %3, %1
%7 = xor i32 %5, %6
%8 = trunc i32 %7 to i16
ret i16 %8
}
void f6(void) {}


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

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

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

LLVM IR (-O2):
define void @f6() {
ret void
}
hboxfi_(l, h, nchars) float *l, *h;
int *nchars;
{ hboxfit(*l, *h, *nchars); }


x86 assembly (clang, -O0):
<hboxfi_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x20(%rbp),%rax
mov    (%rax),%edi
mov    $0x2,%al
call   1030 <hboxfit@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hboxfi_>:
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rsi),%xmm1
cvtss2sd %xmm1,%xmm1
mov    (%rdx),%edi
mov    $0x2,%al
jmp    1030 <hboxfit@plt>

LLVM IR (-O0):
define i32 @hboxfi_(float* %0, float* %1, i32* %2) {
%4 = alloca i32
%5 = alloca float*
%6 = alloca float*
%7 = alloca i32*
store float* %0, float** %5
store float* %1, float** %6
store i32* %2, i32** %7
%8 = load float*, float** %5
%9 = load float, float* %8
%10 = fpext float %9 to double
%11 = load float*, float** %6
%12 = load float, float* %11
%13 = fpext float %12 to double
%14 = load i32*, i32** %7
%15 = load i32, i32* %14
%16 = call i32 (double, double, i32, ...) bitcast (i32 (...)* @hboxfit to i32 (double, double, i32, ...)*)(double %10, double %13, i32 %15)
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
define i32 @hboxfi_(float* nocapture %0, float* nocapture %1, i32* nocapture %2) {
%4 = load float, float* %0
%5 = fpext float %4 to double
%6 = load float, float* %1
%7 = fpext float %6 to double
%8 = load i32, i32* %2
%9 = tail call i32 (double, double, i32, ...) bitcast (i32 (...)* @hboxfit to i32 (double, double, i32, ...)*)(double %5, double %7, i32 %8)
ret i32 undef
}
f(int s, char *p) {
  int i;
  for (i = s; &p[i] < &p[40] && i >= 0; i++) {
    p[i] = -2;
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rax
add    %rax,%rcx
mov    -0x10(%rbp),%rdx
add    $0x28,%rdx
xor    %eax,%eax
cmp    %rdx,%rcx
mov    %al,-0x15(%rbp)
jae    113c <f+0x3c>
cmpl   $0x0,-0x14(%rbp)
setge  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    114c <f+0x4c>
jmp    1166 <f+0x66>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0xfe,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1111 <f+0x11>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
cmp    $0x27,%edi
ja     1137 <f+0x27>
push   %rax
mov    %edi,%eax
add    %rax,%rsi
mov    $0x27,%edx
sub    %edi,%edx
add    $0x1,%rdx
mov    %rsi,%rdi
mov    $0xfe,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0, i8* nocapture writeonly %1) {
%3 = icmp ult i32 %0, 40
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = zext i32 %0 to i64
%6 = getelementptr i8, i8* %1, i64 %5
%7 = sub nuw nsw i32 39, %0
%8 = zext i32 %7 to i64
%9 = add nuw nsw i64 %8, 1
br label %10
10: ; preds = %4, %2
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ puts(char const *);
void bg_err(const char *s) { puts(s); }


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

x86 assembly (clang, -O2):
<bg_err>:
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
define void @bg_err(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_message_exit_container(void *m) {
  return -EINVAL;
}


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

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

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_message_exit_container(i8* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ glClearColor(float, float, float, float);
int /*<<< orphan*/ glutPostRedisplay();
int /*<<< orphan*/ glutSwapBuffers();
void display(void) {
  glClearColor(1.0f, 1.0f, 1.0f, 0.0f);
  glutSwapBuffers();
  glutPostRedisplay();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
movss  0xec4(%rip),%xmm2
xorps  %xmm3,%xmm3
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1040 <glClearColor@plt>
mov    $0x0,%al
call   1030 <glutSwapBuffers@plt>
mov    $0x0,%al
call   1050 <glutPostRedisplay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
movss  0xec7(%rip),%xmm0
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1040 <glClearColor@plt>
xor    %eax,%eax
call   1030 <glutSwapBuffers@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glutPostRedisplay@plt>

LLVM IR (-O0):
define void @display() {
%1 = call i32 @glClearColor(float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00)
%2 = call i32 (...) @glutSwapBuffers()
%3 = call i32 (...) @glutPostRedisplay()
ret void
}

LLVM IR (-O2):
define void @display() {
%1 = tail call i32 @glClearColor(float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00)
%2 = tail call i32 (...) @glutSwapBuffers()
%3 = tail call i32 (...) @glutPostRedisplay()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ InitCheck();
double GetWindowHeight(void) {
  InitCheck();
  return (11.0);
}


x86 assembly (clang, -O0):
<GetWindowHeight>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <InitCheck@plt>
movsd  0xedd(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetWindowHeight>:
push   %rax
xor    %eax,%eax
call   1030 <InitCheck@plt>
movsd  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @GetWindowHeight() {
%1 = call i32 (...) @InitCheck()
ret double 1.100000e+01
}

LLVM IR (-O2):
define double @GetWindowHeight() {
%1 = tail call i32 (...) @InitCheck()
ret double 1.100000e+01
}