xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ task_deassert_flag(int, int);
void task_deassert_thread(int id) { task_deassert_flag(id, (1 << 3)); }


x86 assembly (clang, -O0):
<task_deassert_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1030 <task_deassert_flag@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<task_deassert_thread>:
mov    $0x8,%esi
jmp    1030 <task_deassert_flag@plt>

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

LLVM IR (-O2):
define void @task_deassert_thread(i32 %0) {
%2 = tail call i32 @task_deassert_flag(i32 %0, i32 8)
ret void
}
/* Variables and functions */
size_t strnlen(const char *s, size_t maxlen) {
  const char *str = s;
  while (*str && maxlen) {
    ++str;
    maxlen--;
  }
  return str - s;
}


x86 assembly (clang, -O0):
<strnlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     1134 <strnlen+0x34>
cmpq   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1144 <strnlen+0x44>
jmp    1161 <strnlen+0x61>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1114 <strnlen+0x14>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnlen>:
cmpb   $0x0,(%rdi)
mov    %rdi,%rax
je     1135 <strnlen+0x35>
mov    %rdi,%rax
test   %rsi,%rsi
je     1135 <strnlen+0x35>
add    $0xffffffffffffffff,%rsi
mov    %rdi,%rax
nopw   0x0(%rax,%rax,1)
add    $0xffffffffffffffff,%rsi
setb   %cl
cmpb   $0x0,0x1(%rax)
lea    0x1(%rax),%rax
je     1135 <strnlen+0x35>
test   %cl,%cl
jne    1120 <strnlen+0x20>
sub    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @strnlen(i8* %0, i64 %1) {
%3 = load i8, i8* %0
%4 = icmp ne i8 %3, 0
%5 = icmp ne i64 %1, 0
%6 = and i1 %4, %5
br i1 %6, label %7, label %16
7: ; preds = %2, %7
%8 = phi i8* [ %10, %7 ], [ %0, %2 ]
%9 = phi i64 [ %11, %7 ], [ %1, %2 ]
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = add i64 %9, -1
%12 = load i8, i8* %10
%13 = icmp ne i8 %12, 0
%14 = icmp ne i64 %11, 0
%15 = select i1 %13, i1 %14, i1 false
br i1 %15, label %7, label %16
16: ; preds = %7, %2
%17 = phi i8* [ %0, %2 ], [ %10, %7 ]
%18 = ptrtoint i8* %17 to i64
%19 = ptrtoint i8* %0 to i64
%20 = sub i64 %18, %19
ret i64 %20
}
strcmp(s1, s2) register char *s1, *s2;
{
  while (*s1 == *s2++)
    if (*s1++ == '\0')
      return (0);
  return (*s1 - *--s2);
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1159 <strcmp+0x59>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1154 <strcmp+0x54>
movl   $0x0,-0x4(%rbp)
jmp    1178 <strcmp+0x78>
jmp    110c <strcmp+0xc>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x18(%rbp)
movsbl -0x1(%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi,%rcx,1),%eax
movsbl (%rsi,%rcx,1),%edx
cmp    %dl,%al
jne    1127 <strcmp+0x27>
add    $0x1,%rcx
test   %al,%al
jne    1110 <strcmp+0x10>
xor    %eax,%eax
ret
sub    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %11, %9 ]
%5 = phi i8* [ %1, %2 ], [ %10, %9 ]
%6 = load i8, i8* %4
%7 = load i8, i8* %5
%8 = icmp eq i8 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = getelementptr inbounds i8, i8* %4, i64 1
%12 = icmp eq i8 %6, 0
br i1 %12, label %17, label %3
13: ; preds = %3
%14 = sext i8 %6 to i32
%15 = sext i8 %7 to i32
%16 = sub nsw i32 %14, %15
br label %17
17: ; preds = %9, %13
%18 = phi i32 [ %16, %13 ], [ 0, %9 ]
ret i32 %18
}
/* Variables and functions */
scalar_t__ cd_data_track(int);
char *mbo_trackname(int i) {
  if (i == 0)
    return " ";
  if (cd_data_track(i))
    return "(Data)";
  return " ";
}


x86 assembly (clang, -O0):
<mbo_trackname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1135 <mbo_trackname+0x25>
lea    0xed4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1162 <mbo_trackname+0x52>
mov    -0xc(%rbp),%edi
call   1030 <cd_data_track@plt>
cmp    $0x0,%rax
je     1157 <mbo_trackname+0x47>
lea    0xeb4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1162 <mbo_trackname+0x52>
lea    0xea2(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mbo_trackname>:
test   %edi,%edi
je     1134 <mbo_trackname+0x24>
push   %rax
call   1030 <cd_data_track@plt>
test   %rax,%rax
lea    0xedc(%rip),%rcx
lea    0xed7(%rip),%rax
cmove  %rcx,%rax
add    $0x8,%rsp
ret
lea    0xec5(%rip),%rax
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [7 x i8] c"(Data)\00"
define i8* @mbo_trackname(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @cd_data_track(i32 %0)
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0)
br label %7
7: ; preds = %3, %1
%8 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %1 ], [ %6, %3 ]
ret i8* %8
}
void gtk_frame_set_label() {}


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

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

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

LLVM IR (-O2):
define void @gtk_frame_set_label() {
ret void
}
void release_fiq(struct fiq_handler *f) {}


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

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

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

LLVM IR (-O2):
%struct.fiq_handler = type opaque
define void @release_fiq(%struct.fiq_handler* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t vga_get_entry(char c, uint8_t color) {
  uint16_t entry_color = color;
  uint16_t entry_char = c;
  return (entry_color << 8) | entry_char;
}


x86 assembly (clang, -O0):
<vga_get_entry>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
or     -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vga_get_entry>:
mov    %esi,%eax
shl    $0x8,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @vga_get_entry(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
store i32 %7, i32* %5
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
store i32 %9, i32* %6
%10 = load i32, i32* %5
%11 = shl i32 %10, 8
%12 = load i32, i32* %6
%13 = or i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @vga_get_entry(i8 signext %0, i32 %1) {
%3 = sext i8 %0 to i32
%4 = shl i32 %1, 8
%5 = or i32 %4, %3
ret i32 %5
}
/* Type definitions */
struct cpio_header {
  int dummy;
};

/* Variables and functions */
unsigned int cpio_filedata(struct cpio_header *);
unsigned int cpio_filesize(struct cpio_header *);
unsigned int cpio_next(struct cpio_header *header) {
  unsigned int size = cpio_filesize(header);
  return cpio_filedata(header) + size + (size & 1);
}


x86 assembly (clang, -O0):
<cpio_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <cpio_filesize@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <cpio_filedata@plt>
add    -0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
and    $0x1,%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpio_next>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <cpio_filesize@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <cpio_filedata@plt>
add    %ebp,%eax
and    $0x1,%ebp
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.cpio_header = type { i32 }
define i32 @cpio_next(%struct.cpio_header* %0) {
%2 = alloca %struct.cpio_header*
%3 = alloca i32
store %struct.cpio_header* %0, %struct.cpio_header** %2
%4 = load %struct.cpio_header*, %struct.cpio_header** %2
%5 = call i32 @cpio_filesize(%struct.cpio_header* %4)
store i32 %5, i32* %3
%6 = load %struct.cpio_header*, %struct.cpio_header** %2
%7 = call i32 @cpio_filedata(%struct.cpio_header* %6)
%8 = load i32, i32* %3
%9 = add i32 %7, %8
%10 = load i32, i32* %3
%11 = and i32 %10, 1
%12 = add i32 %9, %11
ret i32 %12
}

LLVM IR (-O2):
%struct.cpio_header = type { i32 }
define i32 @cpio_next(%struct.cpio_header* %0) {
%2 = tail call i32 @cpio_filesize(%struct.cpio_header* %0)
%3 = tail call i32 @cpio_filedata(%struct.cpio_header* %0)
%4 = add i32 %3, %2
%5 = and i32 %2, 1
%6 = add i32 %4, %5
ret i32 %6
}
int seq_utils_check_note_range(int note) {
  if (note < 0 || note > 127) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<seq_utils_check_note_range>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     111b <seq_utils_check_note_range+0x1b>
cmpl   $0x7f,-0x8(%rbp)
jle    1127 <seq_utils_check_note_range+0x27>
movl   $0x0,-0x4(%rbp)
jmp    112e <seq_utils_check_note_range+0x2e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_utils_check_note_range>:
xor    %eax,%eax
cmp    $0x80,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @seq_utils_check_note_range(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ simplerng_setstate(unsigned int, unsigned int);
void simplerng_srand(unsigned int seed) {
  simplerng_setstate(seed ^ 521288629, seed ^ 362436069);
}


x86 assembly (clang, -O0):
<simplerng_srand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    $0x1f123bb5,%edi
mov    -0x4(%rbp),%esi
xor    $0x159a55e5,%esi
call   1030 <simplerng_setstate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simplerng_srand>:
mov    %edi,%esi
xor    $0x1f123bb5,%edi
xor    $0x159a55e5,%esi
jmp    1030 <simplerng_setstate@plt>

LLVM IR (-O0):
define void @simplerng_srand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, 521288629
%5 = load i32, i32* %2
%6 = xor i32 %5, 362436069
%7 = call i32 @simplerng_setstate(i32 %4, i32 %6)
ret void
}

LLVM IR (-O2):
define void @simplerng_srand(i32 %0) {
%2 = xor i32 %0, 521288629
%3 = xor i32 %0, 362436069
%4 = tail call i32 @simplerng_setstate(i32 %2, i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ mmc3clock(int /*<<< orphan*/);
void mmc3chrSetClock(uint16_t addr, uint8_t val) {
  (void)val;
  mmc3clock(addr);
}


x86 assembly (clang, -O0):
<mmc3chrSetClock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <mmc3clock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmc3chrSetClock>:
jmp    1030 <mmc3clock@plt>

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

LLVM IR (-O2):
define void @mmc3chrSetClock(i32 %0, i32 %1) {
%3 = tail call i32 @mmc3clock(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ s2_symbolic_widened_Bad(int *);
void l1_call_to_s2_symbolic_widened_Bad() {
  int x = 1;
  s2_symbolic_widened_Bad(&x);
}


x86 assembly (clang, -O0):
<l1_call_to_s2_symbolic_widened_Bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <s2_symbolic_widened_Bad@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l1_call_to_s2_symbolic_widened_Bad>:
push   %rax
movl   $0x1,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <s2_symbolic_widened_Bad@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @l1_call_to_s2_symbolic_widened_Bad() {
%1 = alloca i32
store i32 1, i32* %1
%2 = call i32 @s2_symbolic_widened_Bad(i32* %1)
ret void
}

LLVM IR (-O2):
define void @l1_call_to_s2_symbolic_widened_Bad() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%3 = call i32 @s2_symbolic_widened_Bad(i32* %1)
ret void
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
ssize_t llistxattr(const char *__path, char *__list, size_t __size) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<llistxattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<llistxattr>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @llistxattr(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 i32, i32* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @llistxattr(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2) {
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret i32 -1
}
int f_bun_rr1(float a1, float a2) { return (__builtin_isunordered(a1, a2)); }


x86 assembly (clang, -O0):
<f_bun_rr1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
setp   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_bun_rr1>:
xor    %eax,%eax
ucomiss %xmm1,%xmm0
setp   %al
ret

LLVM IR (-O0):
define i32 @f_bun_rr1(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp uno float %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @f_bun_rr1(float %0, float %1) {
%3 = fcmp uno float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x17() {
  Assert_real((isspace(23) == 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_isspace.c",
              120, ("isspace should be 0 for 0x17"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x17>:
push   %rax
mov    $0x17,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x78,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x17\00"
define void @t_isspace_0x17() {
%1 = call i64 @isspace(i32 23)
%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 120, i8* getelementptr inbounds ([29 x i8], [29 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x17\00"
define void @t_isspace_0x17() {
%1 = tail call i64 @isspace(i32 23)
%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 120, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void set_bios_mode(void) {}


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

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

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

LLVM IR (-O2):
define void @set_bios_mode() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ quine(char *);
int main() {
  quine("#include <stdio.h>\n#include <string.h>\n\nstatic void quine(char *s) "
        "{\n    printf(\"%s(\\\"\\\\\\n\", s);\n    while (*s != '\\0') {\n    "
        "    switch (*s) {\n            case '\"':\n            case '\\\\':\n "
        "               printf(\"\\\\\");\n                break;\n            "
        "case '\\n':\n                printf(\"\\\\n\\\\\");\n                "
        "break;\n        }\n        printf(\"%c\", *s++);\n    }\n    "
        "printf(\"\\\"\\n    );\\n    return 0;\\n}\\n\");\n}\n\nint main() "
        "{\n    quine");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [437 x i8] c"#include <stdio.h>\0A#include <string.h>\0A\0Astatic void quine(char *s) {\0A printf(\22%s(\\\22\\\\\\n\22, s);\0A while (*s != '\\0') {\0A switch (*s) {\0A case '\22':\0A case '\\\\':\0A printf(\22\\\\\22);\0A break;\0A case '\\n':\0A printf(\22\\\\n\\\\\22);\0A break;\0A }\0A printf(\22%c\22, *s++);\0A }\0A printf(\22\\\22\\n );\\n return 0;\\n}\\n\22);\0A}\0A\0Aint main() {\0A quine\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @quine(i8* getelementptr inbounds ([437 x i8], [437 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [437 x i8] c"#include <stdio.h>\0A#include <string.h>\0A\0Astatic void quine(char *s) {\0A printf(\22%s(\\\22\\\\\\n\22, s);\0A while (*s != '\\0') {\0A switch (*s) {\0A case '\22':\0A case '\\\\':\0A printf(\22\\\\\22);\0A break;\0A case '\\n':\0A printf(\22\\\\n\\\\\22);\0A break;\0A }\0A printf(\22%c\22, *s++);\0A }\0A printf(\22\\\22\\n );\\n return 0;\\n}\\n\22);\0A}\0A\0Aint main() {\0A quine\00"
define i32 @main() {
%1 = tail call i32 @quine(i8* getelementptr inbounds ([437 x i8], [437 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ daxpy_(int *, double *, double const *, int *, double *,
                          int *);
int call_daxpy(int n, double alpha, const double *x, int incx, double *y,
               int incy) {
  daxpy_(&n, &alpha, x, &incx, y, &incy);
  return 0;
}


x86 assembly (clang, -O0):
<call_daxpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%r8
lea    -0x4(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x1c(%rbp),%rcx
lea    -0x2c(%rbp),%r9
call   1030 <daxpy_@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_daxpy>:
sub    $0x18,%rsp
mov    %rcx,%r10
mov    %rsi,%rax
mov    %edi,0xc(%rsp)
movsd  %xmm0,0x10(%rsp)
mov    %edx,0x8(%rsp)
mov    %r8d,0x4(%rsp)
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rcx
lea    0x4(%rsp),%r9
mov    %rax,%rdx
mov    %r10,%r8
call   1030 <daxpy_@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @call_daxpy(i32 %0, double %1, double* %2, i32 %3, double* %4, i32 %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double*
%10 = alloca i32
%11 = alloca double*
%12 = alloca i32
store i32 %0, i32* %7
store double %1, double* %8
store double* %2, double** %9
store i32 %3, i32* %10
store double* %4, double** %11
store i32 %5, i32* %12
%13 = load double*, double** %9
%14 = load double*, double** %11
%15 = call i32 @daxpy_(i32* %7, double* %8, double* %13, i32* %10, double* %14, i32* %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @call_daxpy(i32 %0, double %1, double* %2, i32 %3, double* %4, i32 %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %7
store double %1, double* %8
store i32 %3, i32* %9
store i32 %5, i32* %10
%11 = call i32 @daxpy_(i32* %7, double* %8, double* %2, i32* %9, double* %4, i32* %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f();
main() {
  f();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
ret i32 0
}
double simpson(double fa, double fb, double fmid, double a, double b) {
  double int_f;
  int_f = ((b - a) / 6.0) * (fa + 4.0 * fmid + fb);
  return int_f;
}


x86 assembly (clang, -O0):
<simpson>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  0xed9(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
movsd  0xebb(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
addsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @simpson(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%12 = load double, double* %10
%13 = load double, double* %9
%14 = fsub double %12, %13
%15 = fdiv double %14, 6.000000e+00
%16 = load double, double* %6
%17 = load double, double* %8
%18 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %17, double %16)
%19 = load double, double* %7
%20 = fadd double %18, %19
%21 = fmul double %15, %20
store double %21, double* %11
%22 = load double, double* %11
ret double %22
}

LLVM IR (-O2):
define double @simpson(double %0, double %1, double %2, double %3, double %4) {
%6 = fsub double %4, %3
%7 = fdiv double %6, 6.000000e+00
%8 = tail call double @llvm.fmuladd.f64(double %2, double 4.000000e+00, double %0)
%9 = fadd double %8, %1
%10 = fmul double %9, %7
ret double %10
}
/* Variables and functions */
int asprintf(char **, char *, int);
int /*<<< orphan*/ assert(int);
void msgpackclen_msg_buf_invalid_type(char **error, unsigned char type) {
  if (error == NULL) {
    return;
  }
  int len = asprintf(error, "invalid type: %x", (int)type);
  assert(len >= 0);
}


x86 assembly (clang, -O0):
<msgpackclen_msg_buf_invalid_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1142 <msgpackclen_msg_buf_invalid_type+0x22>
jmp    116a <msgpackclen_msg_buf_invalid_type+0x4a>
mov    -0x8(%rbp),%rdi
movzbl -0x9(%rbp),%edx
lea    0xeaf(%rip),%rsi
call   1040 <asprintf@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msgpackclen_msg_buf_invalid_type>:
test   %rdi,%rdi
je     1143 <msgpackclen_msg_buf_invalid_type+0x23>
push   %rax
movzbl %sil,%edx
lea    0xecf(%rip),%rsi
call   1040 <asprintf@plt>
not    %eax
shr    $0x1f,%eax
mov    %eax,%edi
pop    %rax
jmp    1030 <assert@plt>
ret

LLVM IR (-O0):
@.str = [17 x i8] c"invalid type: %x\00"
define void @msgpackclen_msg_buf_invalid_type(i8** %0, i8 zeroext %1) {
%3 = alloca i8**
%4 = alloca i8
%5 = alloca i32
store i8** %0, i8*** %3
store i8 %1, i8* %4
%6 = load i8**, i8*** %3
%7 = icmp eq i8** %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
br label %18
9: ; preds = %2
%10 = load i8**, i8*** %3
%11 = load i8, i8* %4
%12 = zext i8 %11 to i32
%13 = call i32 @asprintf(i8** %10, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %12)
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = icmp sge i32 %14, 0
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
br label %18
18: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"invalid type: %x\00"
define void @msgpackclen_msg_buf_invalid_type(i8** %0, i8 zeroext %1) {
%3 = icmp eq i8** %0, null
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = zext i8 %1 to i32
%6 = tail call i32 @asprintf(i8** %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = xor i32 %6, -1
%8 = lshr i32 %7, 31
%9 = tail call i32 @assert(i32 %8)
br label %10
10: ; preds = %2, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setOutputGain(void *, unsigned char);
void fsetOutputGain(void *d, float f) {
  setOutputGain(d, (unsigned char)(f * 127.0));
}


x86 assembly (clang, -O0):
<fsetOutputGain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeca(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
movzbl %al,%esi
call   1030 <setOutputGain@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsetOutputGain>:
cvtss2sd %xmm0,%xmm0
mulsd  0xee4(%rip),%xmm0
cvttsd2si %xmm0,%eax
movzbl %al,%esi
jmp    1030 <setOutputGain@plt>

LLVM IR (-O0):
define void @fsetOutputGain(i8* %0, float %1) {
%3 = alloca i8*
%4 = alloca float
store i8* %0, i8** %3
store float %1, float* %4
%5 = load i8*, i8** %3
%6 = load float, float* %4
%7 = fpext float %6 to double
%8 = fmul double %7, 1.270000e+02
%9 = fptoui double %8 to i8
%10 = call i32 @setOutputGain(i8* %5, i8 zeroext %9)
ret void
}

LLVM IR (-O2):
define void @fsetOutputGain(i8* %0, float %1) {
%3 = fpext float %1 to double
%4 = fmul double %3, 1.270000e+02
%5 = fptoui double %4 to i8
%6 = tail call i32 @setOutputGain(i8* %0, i8 zeroext %5)
ret void
}
/* Variables and functions */
int parse_action(char *, int);
int parse_action_verbose(char *s) { return parse_action(s, 1 | 2); }


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

x86 assembly (clang, -O2):
<parse_action_verbose>:
mov    $0x3,%esi
jmp    1030 <parse_action@plt>

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

LLVM IR (-O2):
define i32 @parse_action_verbose(i8* %0) {
%2 = tail call i32 @parse_action(i8* %0, i32 3)
ret i32 %2
}
double rtd(double x) {
  return x * (180.0 /
              (double)(3.1415926535897932384626433832795028841971693993751));
}


x86 assembly (clang, -O0):
<rtd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtd>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @rtd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x404CA5DC1A63C1F8
ret double %4
}

LLVM IR (-O2):
define double @rtd(double %0) {
%2 = fmul double %0, 0x404CA5DC1A63C1F8
ret double %2
}
int socket_sendto_list_remove(char *ip) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @socket_sendto_list_remove(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xd8() {
  Assert_real((isdigit(216) == 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_isdigit.c",
              1085, ("isdigit should be 0 for 0xd8"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0xd8>:
push   %rax
mov    $0xd8,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x43d,%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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xd8\00"
define void @t_isdigit_0xd8() {
%1 = call i64 @isdigit(i32 216)
%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 1085, i8* getelementptr inbounds ([29 x i8], [29 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xd8\00"
define void @t_isdigit_0xd8() {
%1 = tail call i64 @isdigit(i32 216)
%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 1085, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int I_NoAppServicesLobbyGetNumMembers(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @I_NoAppServicesLobbyGetNumMembers() {
ret i32 0
}
char *strchrnul(const char *s, int c) {
  for (; *s != c && *s != '\0'; ++s)
    ;
  return (char *)s;
}


x86 assembly (clang, -O0):
<strchrnul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0xd(%rbp)
je     1130 <strchrnul+0x30>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1140 <strchrnul+0x40>
jmp    1156 <strchrnul+0x56>
jmp    1145 <strchrnul+0x45>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110b <strchrnul+0xb>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchrnul>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movsbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %ecx,%ecx
je     1120 <strchrnul+0x20>
cmp    %esi,%ecx
jne    1110 <strchrnul+0x10>
ret

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

LLVM IR (-O2):
define i8* @strchrnul(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %10, %3 ]
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, %1
%8 = icmp eq i8 %5, 0
%9 = or i1 %8, %7
%10 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %9, label %11, label %3
11: ; preds = %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XGetMotionEvents() {
  printf("XGetMotionEvents called\n");
  return 0;
}


x86 assembly (clang, -O0):
<XGetMotionEvents>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [25 x i8] c"XGetMotionEvents called\0A\00"
define i32 @XGetMotionEvents() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [24 x i8] c"XGetMotionEvents called\00"
define i32 @XGetMotionEvents() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pause();
void csapp_pause() {
  (void)pause();
  return;
}


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

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

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

LLVM IR (-O2):
define void @csapp_pause() {
%1 = tail call i32 (...) @pause()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _test_arrays();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
int main() {
  printf("Testing Arrays... ");
  fflush(stdin);
  _test_arrays();
  printf(", OK!\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x0,%al
call   1050 <_test_arrays@plt>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
call   1060 <_test_arrays@plt>
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Testing Arrays... \00"
@stdin = global i32 0
@.str.1 = [7 x i8] c", OK!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdin
%3 = call i32 @fflush(i32 %2)
%4 = call i32 (...) @_test_arrays()
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Testing Arrays... \00"
@stdin = global i32 0
@str = [6 x i8] c", OK!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdin
%3 = tail call i32 @fflush(i32 %2)
%4 = tail call i32 (...) @_test_arrays()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void rte_mbuf_set_as_core_const(struct rte_mbuf *m) {}


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

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

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

LLVM IR (-O2):
%struct.rte_mbuf = type opaque
define void @rte_mbuf_set_as_core_const(%struct.rte_mbuf* nocapture %0) {
ret void
}
/* Variables and functions */
int match(char *, size_t, char *, size_t);
size_t strlen(char *);
int strStr(char *haystack, char *needle) {
  size_t lenH = strlen(haystack);
  size_t lenN = strlen(needle);
  return match(haystack, lenH, needle, lenN);
}


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

x86 assembly (clang, -O2):
<strStr>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %rax,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <match@plt>

LLVM IR (-O0):
define i32 @strStr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
store i64 %8, i64* %5
%9 = load i8*, i8** %4
%10 = call i64 @strlen(i8* %9)
store i64 %10, i64* %6
%11 = load i8*, i8** %3
%12 = load i64, i64* %5
%13 = load i8*, i8** %4
%14 = load i64, i64* %6
%15 = call i32 @match(i8* %11, i64 %12, i8* %13, i64 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @strStr(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = tail call i32 @match(i8* %0, i64 %3, i8* %1, i64 %4)
ret i32 %5
}
void exit(__attribute__((unused)) int status) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <exit+0x7>

x86 assembly (clang, -O2):
<exit>:
jmp    1100 <exit>

LLVM IR (-O0):
define void @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1, %3
br label %3
}

LLVM IR (-O2):
define void @exit(i32 %0) {
br label %2
2: ; preds = %1, %2
br label %2
}
void g_date_new_dmy() {}


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

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

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

LLVM IR (-O2):
define void @g_date_new_dmy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_current();
int /*<<< orphan*/ set_tsk_thread_flag(int /*<<< orphan*/, int);
__attribute__((always_)) int restart_syscall(void) {
  set_tsk_thread_flag(get_current(), 2);
  return -513;
}


x86 assembly (clang, -O0):
<restart_syscall>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <get_current@plt>
mov    %eax,%edi
mov    $0x2,%esi
call   1040 <set_tsk_thread_flag@plt>
mov    $0xfffffdff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<restart_syscall>:
push   %rax
xor    %eax,%eax
call   1030 <get_current@plt>
mov    %eax,%edi
mov    $0x2,%esi
call   1040 <set_tsk_thread_flag@plt>
mov    $0xfffffdff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @restart_syscall() {
%1 = call i32 (...) @get_current()
%2 = call i32 @set_tsk_thread_flag(i32 %1, i32 2)
ret i32 -513
}

LLVM IR (-O2):
define i32 @restart_syscall() {
%1 = tail call i32 (...) @get_current()
%2 = tail call i32 @set_tsk_thread_flag(i32 %1, i32 2)
ret i32 -513
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void cmd() { print("\nCommand> "); }


x86 assembly (clang, -O0):
<cmd>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <print@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd>:
lea    0xee9(%rip),%rdi
jmp    1030 <print@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"\0ACommand> \00"
define void @cmd() {
%1 = call i32 @print(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\0ACommand> \00"
define void @cmd() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
int TTWAIN_LoadSourceManagerPD(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @TTWAIN_LoadSourceManagerPD() {
ret i32 0
}
int at(char c) { return ((int)(c - '0')); }


x86 assembly (clang, -O0):
<at>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<at>:
lea    -0x30(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @at(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub nsw i32 %4, 48
ret i32 %5
}

LLVM IR (-O2):
define i32 @at(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -48
ret i32 %3
}
/* Variables and functions */
int EWOULDBLOCK;
int ws_EWOULDBLOCK() { return EWOULDBLOCK; }


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

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

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

LLVM IR (-O2):
@EWOULDBLOCK = global i32 0
define i32 @ws_EWOULDBLOCK() {
%1 = load i32, i32* @EWOULDBLOCK
ret i32 %1
}
/* Variables and functions */
unsigned long long _blsmsk_u64(unsigned long long);
unsigned long long test_blsmsk_u64(unsigned long long __X) {
  return _blsmsk_u64(__X);
}


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

x86 assembly (clang, -O2):
<test_blsmsk_u64>:
jmp    1030 <_blsmsk_u64@plt>

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

LLVM IR (-O2):
define i64 @test_blsmsk_u64(i64 %0) {
%2 = tail call i64 @_blsmsk_u64(i64 %0)
ret i64 %2
}