xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
char *strdup(char *);
char *latex_invoice_header_education_text_line(char *first_column_label,
                                               char *last_column_label) {
  char text_line[1024];
  sprintf(text_line, "\\bf %s & \\bf %s \\\\[0.5ex]\n", first_column_label,
          last_column_label);
  return strdup(text_line);
}


x86 assembly (clang, -O0):
<latex_invoice_header_education_text_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb7(%rip),%rsi
call   1030 <sprintf@plt>
lea    -0x410(%rbp),%rdi
call   1040 <strdup@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<latex_invoice_header_education_text_line>:
push   %rbx
sub    $0x400,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xecb(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strdup@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"\\bf %s & \\bf %s \\\\[0.5ex]\0A\00"
define i8* @latex_invoice_header_education_text_line(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1024 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%11 = call i8* @strdup(i8* %10)
ret i8* %11
}

LLVM IR (-O2):
@.str = [27 x i8] c"\\bf %s & \\bf %s \\\\[0.5ex]\0A\00"
define noalias i8* @latex_invoice_header_education_text_line(i8* %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%6 = call i8* @strdup(i8* %4)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int dpfbpoolcmp(const void *a, const void *b) {
  assert(a && b);
  return *(int *)a - *(int *)b;
}


x86 assembly (clang, -O0):
<dpfbpoolcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     113b <dpfbpoolcmp+0x2b>
cmpq   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dpfbpoolcmp>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
test   %rdi,%rdi
setne  %al
test   %rsi,%rsi
setne  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
mov    (%rbx),%eax
sub    (%r14),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @dpfbpoolcmp(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i8*, i8** %3
%15 = bitcast i8* %14 to i32*
%16 = load i32, i32* %15
%17 = load i8*, i8** %4
%18 = bitcast i8* %17 to i32*
%19 = load i32, i32* %18
%20 = sub nsw i32 %16, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @dpfbpoolcmp(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = bitcast i8* %0 to i32*
%9 = load i32, i32* %8
%10 = bitcast i8* %1 to i32*
%11 = load i32, i32* %10
%12 = sub nsw i32 %9, %11
ret i32 %12
}
char code2hc(unsigned char code) {
  char *hcode = "MECKOGAINFDLPHBJ";
  return hcode[code & 0x0fu];
}


x86 assembly (clang, -O0):
<code2hc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xeef(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl -0x1(%rbp),%ecx
and    $0xf,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<code2hc>:
and    $0xf,%edi
lea    0xef6(%rip),%rax
mov    (%rdi,%rax,1),%al
ret

LLVM IR (-O0):
@.str = [17 x i8] c"MECKOGAINFDLPHBJ\00"
define signext i8 @code2hc(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8*
store i8 %0, i8* %2
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = and i32 %6, 15
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %4, i64 %8
%10 = load i8, i8* %9
ret i8 %10
}

LLVM IR (-O2):
@.str = [17 x i8] c"MECKOGAINFDLPHBJ\00"
define signext i8 @code2hc(i8 zeroext %0) {
%2 = and i8 %0, 15
%3 = zext i8 %2 to i64
%4 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %3
%5 = load i8, i8* %4
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ gpioSet(int, int /*<<< orphan*/);
int /*<<< orphan*/ output(int, char *);
void shutdownChip() {
  output(1, "Shutting down chip.\n");
  gpioSet(81, 0);
  gpioSet(3, 0);
  gpioSet(53, 0);
  gpioSet(71, 0);
  gpioSet(124, 0);
  gpioSet(114, 0);
}


x86 assembly (clang, -O0):
<shutdownChip>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xed0(%rip),%rsi
call   1030 <output@plt>
mov    $0x51,%edi
xor    %esi,%esi
call   1040 <gpioSet@plt>
mov    $0x3,%edi
xor    %esi,%esi
call   1040 <gpioSet@plt>
mov    $0x35,%edi
xor    %esi,%esi
call   1040 <gpioSet@plt>
mov    $0x47,%edi
xor    %esi,%esi
call   1040 <gpioSet@plt>
mov    $0x7c,%edi
xor    %esi,%esi
call   1040 <gpioSet@plt>
mov    $0x72,%edi
xor    %esi,%esi
call   1040 <gpioSet@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<shutdownChip>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edi
call   1030 <output@plt>
mov    $0x51,%edi
xor    %esi,%esi
call   1040 <gpioSet@plt>
mov    $0x3,%edi
xor    %esi,%esi
call   1040 <gpioSet@plt>
mov    $0x35,%edi
xor    %esi,%esi
call   1040 <gpioSet@plt>
mov    $0x47,%edi
xor    %esi,%esi
call   1040 <gpioSet@plt>
mov    $0x7c,%edi
xor    %esi,%esi
call   1040 <gpioSet@plt>
mov    $0x72,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <gpioSet@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Shutting down chip.\0A\00"
define void @shutdownChip() {
%1 = call i32 @output(i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @gpioSet(i32 81, i32 0)
%3 = call i32 @gpioSet(i32 3, i32 0)
%4 = call i32 @gpioSet(i32 53, i32 0)
%5 = call i32 @gpioSet(i32 71, i32 0)
%6 = call i32 @gpioSet(i32 124, i32 0)
%7 = call i32 @gpioSet(i32 114, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Shutting down chip.\0A\00"
define void @shutdownChip() {
%1 = tail call i32 @output(i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @gpioSet(i32 81, i32 0)
%3 = tail call i32 @gpioSet(i32 3, i32 0)
%4 = tail call i32 @gpioSet(i32 53, i32 0)
%5 = tail call i32 @gpioSet(i32 71, i32 0)
%6 = tail call i32 @gpioSet(i32 124, i32 0)
%7 = tail call i32 @gpioSet(i32 114, i32 0)
ret void
}
int bitcnt_8(int c) {
  return c = (c & 0x55) + ((c >> 1) & 0x55), c = (c & 0x33) + ((c >> 2) & 0x33),
         (c & 15) + (c >> 4);
}


x86 assembly (clang, -O0):
<bitcnt_8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x55,%eax
mov    -0x4(%rbp),%ecx
sar    $0x1,%ecx
and    $0x55,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x33,%eax
mov    -0x4(%rbp),%ecx
sar    $0x2,%ecx
and    $0x33,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    -0x4(%rbp),%ecx
sar    $0x4,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitcnt_8>:
mov    %edi,%eax
and    $0x55,%eax
shr    %edi
and    $0x55,%edi
add    %edi,%eax
mov    %eax,%ecx
and    $0x33,%ecx
shr    $0x2,%eax
and    $0xfffffff3,%eax
add    %ecx,%eax
mov    %eax,%ecx
and    $0x7,%ecx
shr    $0x4,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @bitcnt_8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 85
%5 = load i32, i32* %2
%6 = ashr i32 %5, 1
%7 = and i32 %6, 85
%8 = add nsw i32 %4, %7
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = and i32 %9, 51
%11 = load i32, i32* %2
%12 = ashr i32 %11, 2
%13 = and i32 %12, 51
%14 = add nsw i32 %10, %13
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = and i32 %15, 15
%17 = load i32, i32* %2
%18 = ashr i32 %17, 4
%19 = add nsw i32 %16, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @bitcnt_8(i32 %0) {
%2 = and i32 %0, 85
%3 = lshr i32 %0, 1
%4 = and i32 %3, 85
%5 = add nuw nsw i32 %4, %2
%6 = and i32 %5, 51
%7 = lshr i32 %5, 2
%8 = and i32 %7, 51
%9 = add nuw nsw i32 %8, %6
%10 = and i32 %9, 7
%11 = lshr i32 %9, 4
%12 = add nuw nsw i32 %10, %11
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void print_usage(int returncode) {
  printf("decode, the interpreter disassembler\nVersion %s\n\nUsage: decode "
         "<obj_file>\n",
         "0.1");
  exit(returncode);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    0xf12(%rip),%rsi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
lea    0xf1a(%rip),%rsi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [75 x i8] c"decode, the interpreter disassembler\0AVersion %s\0A\0AUsage: decode <obj_file>\0A\00"
@.str.1 = [4 x i8] c"0.1\00"
define void @print_usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@.str = [75 x i8] c"decode, the interpreter disassembler\0AVersion %s\0A\0AUsage: decode <obj_file>\0A\00"
@.str.1 = [4 x i8] c"0.1\00"
define void @print_usage(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int f() {
  const int *x;
  double *y;
  x = y;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32*
%2 = alloca double*
%3 = load double*, double** %2
%4 = bitcast double* %3 to i32*
store i32* %4, i32** %1
ret i32 0
}

LLVM IR (-O2):
define i32 @f() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ USB0_NEEDCLK_DriverIRQHandler();
__attribute__((weak)) void USB0_NEEDCLK_IRQHandler(void) {
  USB0_NEEDCLK_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @USB0_NEEDCLK_IRQHandler() {
%1 = call i32 (...) @USB0_NEEDCLK_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @USB0_NEEDCLK_IRQHandler() {
%1 = tail call i32 (...) @USB0_NEEDCLK_DriverIRQHandler()
ret void
}
void adis16260_uninitialize_ring(struct iio_ring_buffer *ring) {}


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

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

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

LLVM IR (-O2):
%struct.iio_ring_buffer = type opaque
define void @adis16260_uninitialize_ring(%struct.iio_ring_buffer* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void f_4(char *a) { printf("f_4\n"); }


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"f_4\00"
define void @f_4(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
int ft_isprint(int c) {
  if (c > 31 && c < 127)
    return (1);
  else
    return (0);
}


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

x86 assembly (clang, -O2):
<ft_isprint>:
add    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x5f,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @ft_isprint(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xff() {
  Assert_real((ispunct(255) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              1280, ("ispunct should be 0 for 0xff"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xff\00"
define void @t_ispunct_0xff() {
%1 = call i64 @ispunct(i32 255)
%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 1280, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xff\00"
define void @t_ispunct_0xff() {
%1 = tail call i64 @ispunct(i32 255)
%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 1280, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(int);
extern double myrand(int iflag) {
  if (iflag != 0)
    srand(iflag);
  return (rand() % 32768) / 32767.0;
}


x86 assembly (clang, -O0):
<myrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113d <myrand+0x1d>
mov    -0x4(%rbp),%edi
call   1030 <srand@plt>
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x8000,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm0
movsd  0xea8(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myrand>:
push   %rax
test   %edi,%edi
je     112a <myrand+0xa>
call   1030 <srand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
lea    0x7fff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffff8000,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
divsd  0xeb0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @myrand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @srand(i32 %6)
br label %8
8: ; preds = %5, %1
%9 = call i32 (...) @rand()
%10 = srem i32 %9, 32768
%11 = sitofp i32 %10 to double
%12 = fdiv double %11, 3.276700e+04
ret double %12
}

LLVM IR (-O2):
define double @myrand(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @srand(i32 %0)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 (...) @rand()
%7 = srem i32 %6, 32768
%8 = sitofp i32 %7 to double
%9 = fdiv double %8, 3.276700e+04
ret double %9
}
long int cast_ulong_long(unsigned long int x) { return (long int)x; }


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

x86 assembly (clang, -O2):
<cast_ulong_long>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @cast_ulong_long(i64 returned %0) {
ret i64 %0
}
four1(a, b, c, d) { nop(); }


x86 assembly (clang, -O0):
<four1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    $0x0,%al
call   1030 <nop@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @four1(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = call i32 (...) @nop()
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @four1(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 (...) @nop()
ret i32 undef
}
/* Variables and functions */
double strtod(char const *, int /*<<< orphan*/ *);
double atof(const char *string) { return strtod(string, NULL); }


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

x86 assembly (clang, -O2):
<atof>:
xor    %esi,%esi
jmp    1030 <strtod@plt>

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

LLVM IR (-O2):
define double @atof(i8* nocapture %0) {
%2 = tail call double @strtod(i8* nocapture %0, i32* null)
ret double %2
}
int stack_top(int *stack, int *ret) {
  if (stack[0] == 0)
    return 0;
  *ret = stack[stack[0]];
  return 1;
}


x86 assembly (clang, -O0):
<stack_top>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jne    1125 <stack_top+0x25>
movl   $0x0,-0x4(%rbp)
jmp    1140 <stack_top+0x40>
mov    -0x10(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stack_top>:
movslq (%rdi),%rax
test   %rax,%rax
je     1113 <stack_top+0x13>
mov    (%rdi,%rax,4),%eax
mov    %eax,(%rsi)
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @stack_top(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
store i32 %8, i32* %1
br label %9
9: ; preds = %2, %5
%10 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %10
}
/* Variables and functions */
double gammq(int, double);
double qchisq(double z, int df) { return gammq(df / 2.0, z / 2.0); }


x86 assembly (clang, -O0):
<qchisq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xed3(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  -0x8(%rbp),%xmm0
movsd  0xebe(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <gammq@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qchisq>:
cvtsi2sd %edi,%xmm1
movsd  0xee4(%rip),%xmm2
mulsd  %xmm2,%xmm1
cvttsd2si %xmm1,%edi
mulsd  %xmm2,%xmm0
jmp    1030 <gammq@plt>

LLVM IR (-O0):
define double @qchisq(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sitofp i32 %5 to double
%7 = fdiv double %6, 2.000000e+00
%8 = fptosi double %7 to i32
%9 = load double, double* %3
%10 = fdiv double %9, 2.000000e+00
%11 = call double @gammq(i32 %8, double %10)
ret double %11
}

LLVM IR (-O2):
define double @qchisq(double %0, i32 %1) {
%3 = sitofp i32 %1 to double
%4 = fmul double %3, 5.000000e-01
%5 = fptosi double %4 to i32
%6 = fmul double %0, 5.000000e-01
%7 = tail call double @gammq(i32 %5, double %6)
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ stop_search();
void start_protected_command() { stop_search(); }


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

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

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

LLVM IR (-O2):
define void @start_protected_command() {
%1 = tail call i32 (...) @stop_search()
ret void
}
/* Variables and functions */
bool nrf52_errata_147(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_147() {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int read_byte_data(int, int);
int /*<<< orphan*/ write_byte_data(int, int, int);
void disable_allcall_address(uint8_t address) {
  uint8_t oldmode = read_byte_data(address, 0x00);
  uint8_t newmode = oldmode & ~(1 << 0);
  write_byte_data(address, 0x00, newmode);
}


x86 assembly (clang, -O0):
<disable_allcall_address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <read_byte_data@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xfffffffe,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1040 <write_byte_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable_allcall_address>:
push   %rbx
mov    %edi,%ebx
xor    %esi,%esi
call   1030 <read_byte_data@plt>
and    $0xfffffffe,%eax
mov    %ebx,%edi
xor    %esi,%esi
mov    %eax,%edx
pop    %rbx
jmp    1040 <write_byte_data@plt>

LLVM IR (-O0):
define void @disable_allcall_address(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @read_byte_data(i32 %5, i32 0)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = and i32 %7, -2
store i32 %8, i32* %4
%9 = load i32, i32* %2
%10 = load i32, i32* %4
%11 = call i32 @write_byte_data(i32 %9, i32 0, i32 %10)
ret void
}

LLVM IR (-O2):
define void @disable_allcall_address(i32 %0) {
%2 = tail call i32 @read_byte_data(i32 %0, i32 0)
%3 = and i32 %2, -2
%4 = tail call i32 @write_byte_data(i32 %0, i32 0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print(int *p, int size) {
  int i;
  for (i = 0; i <= size; ++i)
    printf("%d ", p[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1159 <print+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
js     1157 <print+0x37>
mov    %esi,%r12d
mov    %rdi,%r14
add    $0x1,%r12d
lea    0xec3(%rip),%r15
xor    %ebx,%ebx
nop
mov    (%r14,%rbx,4),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

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


x86 assembly (clang, -O0):
<HEAPparent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<HEAPparent>:
mov    %edi,%eax
add    $0xffffffff,%eax
shr    $0x1f,%eax
add    %edi,%eax
add    $0xffffffff,%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @HEAPparent(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = sdiv i32 %2, 2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x72() {
  Assert_real((ispunct(114) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              575, ("ispunct should be 0 for r"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for r\00"
define void @t_ispunct_0x72() {
%1 = call i64 @ispunct(i32 114)
%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 575, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for r\00"
define void @t_ispunct_0x72() {
%1 = tail call i64 @ispunct(i32 114)
%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 575, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char *getEndpoint() { return "distant"; }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"distant\00"
define i8* @getEndpoint() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
int null_code_encode(void *code_desc, char **data, char **parity,
                     int blocksize) {
  return 0;
}


x86 assembly (clang, -O0):
<null_code_encode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @null_code_encode(i8* nocapture readnone %0, i8** nocapture readnone %1, i8** nocapture readnone %2, i32 %3) {
ret i32 0
}
/* Variables and functions */
float __infer_nondet_float();
float scalblnf(float x, long int n) { return __infer_nondet_float(); }


x86 assembly (clang, -O0):
<scalblnf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_float@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @scalblnf(float %0, i64 %1) {
%3 = alloca float
%4 = alloca i64
store float %0, float* %3
store i64 %1, i64* %4
%5 = call float (...) @__infer_nondet_float()
ret float %5
}

LLVM IR (-O2):
define float @scalblnf(float %0, i64 %1) {
%3 = tail call float (...) @__infer_nondet_float()
ret float %3
}
int namematch(const char *end, const char *start, const char *match, int len) {
  return ((end - len >= start) && (strncmp(end - len, match, len) == 0));
}


x86 assembly (clang, -O0):
<namematch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
xor    %eax,%eax
sub    %rdx,%rax
add    %rax,%rcx
xor    %eax,%eax
cmp    -0x10(%rbp),%rcx
mov    %al,-0x1d(%rbp)
jb     116c <namematch+0x5c>
mov    -0x8(%rbp),%rdi
movslq -0x1c(%rbp),%rcx
xor    %eax,%eax
sub    %rcx,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
movslq -0x1c(%rbp),%rdx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
sete   %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<namematch>:
movslq %ecx,%rcx
sub    %rcx,%rdi
xor    %eax,%eax
cmp    %rsi,%rdi
jb     1136 <namematch+0x26>
push   %rax
mov    %rdx,%rsi
mov    %rcx,%rdx
call   1030 <strncmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @namematch(i8* %0, i8* readnone %1, i8* nocapture %2, i32 %3) {
%5 = sext i32 %3 to i64
%6 = sub nsw i64 0, %5
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = icmp ult i8* %7, %1
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = tail call i32 @strncmp(i8* %7, i8* %2, i64 %5)
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %9, %4
%14 = phi i32 [ 0, %4 ], [ %12, %9 ]
ret i32 %14
}
/* Variables and functions */
unsigned char msg_send(unsigned char, unsigned char *, int);
unsigned char msg_send3(unsigned char mesg, unsigned char data1,
                        unsigned char data2, unsigned char data3) {
  unsigned char buf[3];
  buf[0] = data1;
  buf[1] = data2;
  buf[2] = data3;
  return msg_send(mesg, buf, 3);
}


x86 assembly (clang, -O0):
<msg_send3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x7(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x1(%rbp),%al
lea    -0x7(%rbp),%rsi
mov    $0x3,%edx
movzbl %al,%edi
call   1030 <msg_send@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_send3>:
push   %rax
mov    %sil,0x5(%rsp)
mov    %dl,0x6(%rsp)
mov    %cl,0x7(%rsp)
lea    0x5(%rsp),%rsi
mov    $0x3,%edx
call   1030 <msg_send@plt>
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @msg_send3(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca [3 x i8]
store i8 %0, i8* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%10 = load i8, i8* %6
%11 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 0
store i8 %10, i8* %11
%12 = load i8, i8* %7
%13 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 1
store i8 %12, i8* %13
%14 = load i8, i8* %8
%15 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 2
store i8 %14, i8* %15
%16 = load i8, i8* %5
%17 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 0
%18 = call zeroext i8 @msg_send(i8 zeroext %16, i8* %17, i32 3)
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @msg_send3(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca [3 x i8]
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
store i8 %1, i8* %6
%7 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 1
store i8 %2, i8* %7
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 2
store i8 %3, i8* %8
%9 = call zeroext i8 @msg_send(i8 zeroext %0, i8* %6, i32 3)
ret i8 %9
}
int phred64ToPhred(char p) { return ((int)p) - 64; }


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

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

LLVM IR (-O0):
define i32 @phred64ToPhred(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, 64
ret i32 %5
}

LLVM IR (-O2):
define i32 @phred64ToPhred(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -64
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ dd_drawline(unsigned char, unsigned char, unsigned char,
                               unsigned char);
void dd_vline(unsigned char x, unsigned char y, unsigned char h) {
  dd_drawline(x, y, x, y + h);
}


x86 assembly (clang, -O0):
<dd_vline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x1(%rbp),%sil
mov    -0x2(%rbp),%dl
mov    -0x1(%rbp),%cl
movzbl -0x2(%rbp),%eax
movzbl -0x3(%rbp),%edi
add    %edi,%eax
movzbl %sil,%edi
movzbl %dl,%esi
movzbl %cl,%edx
movzbl %al,%ecx
call   1030 <dd_drawline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dd_vline>:
add    %sil,%dl
movzbl %dl,%ecx
mov    %edi,%edx
jmp    1030 <dd_drawline@plt>

LLVM IR (-O0):
define void @dd_vline(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load i8, i8* %4
%8 = load i8, i8* %5
%9 = load i8, i8* %4
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = add nsw i32 %11, %13
%15 = trunc i32 %14 to i8
%16 = call i32 @dd_drawline(i8 zeroext %7, i8 zeroext %8, i8 zeroext %9, i8 zeroext %15)
ret void
}

LLVM IR (-O2):
define void @dd_vline(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = add i8 %2, %1
%5 = tail call i32 @dd_drawline(i8 zeroext %0, i8 zeroext %1, i8 zeroext %0, i8 zeroext %4)
ret void
}
/* Variables and functions */
bool nrf91_errata_30(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf91_errata_30() {
ret i32 0
}
void lookupCommand(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               85, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<lookupCommand>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x55,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lookupCommand>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x55,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.lookupCommand = [14 x i8] c"lookupCommand\00"
define void @lookupCommand() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 85, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.lookupCommand, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.lookupCommand = [14 x i8] c"lookupCommand\00"
define void @lookupCommand() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 85, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.lookupCommand, i64 0, i64 0))
ret void
}
/* Variables and functions */
int syscall(int, char *, int /*<<< orphan*/);
int touch(char *filename) { return syscall(39, filename, 0); }


x86 assembly (clang, -O0):
<touch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x27,%edi
xor    %edx,%edx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<touch>:
mov    %rdi,%rsi
mov    $0x27,%edi
xor    %edx,%edx
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @touch(i8* %0) {
%2 = tail call i32 @syscall(i32 39, i8* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
float __ocml_erf_f32(float);
float erff(float x) { return __ocml_erf_f32(x); }


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

x86 assembly (clang, -O2):
<erff>:
jmp    1030 <__ocml_erf_f32@plt>

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

LLVM IR (-O2):
define float @erff(float %0) {
%2 = tail call float @__ocml_erf_f32(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ cpc_key_press(int);
int /*<<< orphan*/ cpc_key_unpress(int);
void Joy_Omega_Fire1(int value) {
  if (value) {
    cpc_key_press(0x54);
  } else {
    cpc_key_unpress(0x54);
  };
}


x86 assembly (clang, -O0):
<Joy_Omega_Fire1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1144 <Joy_Omega_Fire1+0x24>
mov    $0x54,%edi
call   1030 <cpc_key_press@plt>
jmp    114e <Joy_Omega_Fire1+0x2e>
mov    $0x54,%edi
call   1040 <cpc_key_unpress@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Joy_Omega_Fire1>:
test   %edi,%edi
je     112e <Joy_Omega_Fire1+0xe>
mov    $0x54,%edi
jmp    1030 <cpc_key_press@plt>
mov    $0x54,%edi
jmp    1040 <cpc_key_unpress@plt>

LLVM IR (-O0):
define void @Joy_Omega_Fire1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @cpc_key_press(i32 84)
br label %9
7: ; preds = %1
%8 = call i32 @cpc_key_unpress(i32 84)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @Joy_Omega_Fire1(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @cpc_key_press(i32 84)
br label %7
5: ; preds = %1
%6 = tail call i32 @cpc_key_unpress(i32 84)
br label %7
7: ; preds = %5, %3
ret void
}
int test_imm_4Cuint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x4C << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_4Cuint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 76
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}