xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_channel_map_can_fade() {
  printf("NOT IMPLEMENTED:"
         "pa_channel_map_can_fade"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [41 x i8] c"NOT IMPLEMENTED:pa_channel_map_can_fade\0A\00"
define i32 @pa_channel_map_can_fade() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [40 x i8] c"NOT IMPLEMENTED:pa_channel_map_can_fade\00"
define i32 @pa_channel_map_can_fade() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
unsigned get_le16(void const *p) {
  return ((unsigned char const *)p)[1] * 0x100u + ((unsigned char const *)p)[0];
}


x86 assembly (clang, -O0):
<get_le16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_le16>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @get_le16(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = mul i32 %6, 256
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = add i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @get_le16(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = shl nuw nsw i32 %4, 8
%6 = load i8, i8* %0
%7 = zext i8 %6 to i32
%8 = or i32 %5, %7
ret i32 %8
}
/* Type definitions */
struct netpbm_image {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dilate(struct netpbm_image *, struct netpbm_image *,
                          struct netpbm_image *);
int /*<<< orphan*/ erode(struct netpbm_image *, struct netpbm_image *,
                         struct netpbm_image *);
void morph_open(struct netpbm_image *img_in, struct netpbm_image *img_scratch,
                struct netpbm_image *img_scratch2,
                struct netpbm_image *img_out) {
  erode(img_in, img_scratch, img_scratch2);
  dilate(img_scratch2, img_scratch, img_out);
}


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

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

LLVM IR (-O0):
%struct.netpbm_image = type { i32 }
define void @morph_open(%struct.netpbm_image* %0, %struct.netpbm_image* %1, %struct.netpbm_image* %2, %struct.netpbm_image* %3) {
%5 = alloca %struct.netpbm_image*
%6 = alloca %struct.netpbm_image*
%7 = alloca %struct.netpbm_image*
%8 = alloca %struct.netpbm_image*
store %struct.netpbm_image* %0, %struct.netpbm_image** %5
store %struct.netpbm_image* %1, %struct.netpbm_image** %6
store %struct.netpbm_image* %2, %struct.netpbm_image** %7
store %struct.netpbm_image* %3, %struct.netpbm_image** %8
%9 = load %struct.netpbm_image*, %struct.netpbm_image** %5
%10 = load %struct.netpbm_image*, %struct.netpbm_image** %6
%11 = load %struct.netpbm_image*, %struct.netpbm_image** %7
%12 = call i32 @erode(%struct.netpbm_image* %9, %struct.netpbm_image* %10, %struct.netpbm_image* %11)
%13 = load %struct.netpbm_image*, %struct.netpbm_image** %7
%14 = load %struct.netpbm_image*, %struct.netpbm_image** %6
%15 = load %struct.netpbm_image*, %struct.netpbm_image** %8
%16 = call i32 @dilate(%struct.netpbm_image* %13, %struct.netpbm_image* %14, %struct.netpbm_image* %15)
ret void
}

LLVM IR (-O2):
%struct.netpbm_image = type { i32 }
define void @morph_open(%struct.netpbm_image* %0, %struct.netpbm_image* %1, %struct.netpbm_image* %2, %struct.netpbm_image* %3) {
%5 = tail call i32 @erode(%struct.netpbm_image* %0, %struct.netpbm_image* %1, %struct.netpbm_image* %2)
%6 = tail call i32 @dilate(%struct.netpbm_image* %2, %struct.netpbm_image* %1, %struct.netpbm_image* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ count_sort(char **, int, int);
void radix_sort(char **A, int n, int width) {
  for (int i = width - 1; i >= 0; --i) {
    count_sort(A, n, i);
  }
}


x86 assembly (clang, -O0):
<radix_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1152 <radix_sort+0x42>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <count_sort@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <radix_sort+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radix_sort>:
push   %rbp
push   %r14
push   %rbx
test   %edx,%edx
jle    1146 <radix_sort+0x36>
mov    %edx,%ebx
mov    %esi,%r14d
mov    %rdi,%rbp
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    -0x2(%rbx),%edx
mov    %rbp,%rdi
mov    %r14d,%esi
call   1030 <count_sort@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1130 <radix_sort+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @radix_sort(i8** %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %6, label %5
5: ; preds = %6, %3
ret void
6: ; preds = %3, %6
%7 = phi i32 [ %8, %6 ], [ %2, %3 ]
%8 = add nsw i32 %7, -1
%9 = tail call i32 @count_sort(i8** %0, i32 %1, i32 %8)
%10 = icmp ugt i32 %7, 1
br i1 %10, label %6, label %5
}
/* Variables and functions */
int /*<<< orphan*/ screen_monitor_put_char(char);
void screen_monitor_char_write(char c) { screen_monitor_put_char(c); }


x86 assembly (clang, -O0):
<screen_monitor_char_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <screen_monitor_put_char@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<screen_monitor_char_write>:
jmp    1030 <screen_monitor_put_char@plt>

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

LLVM IR (-O2):
define void @screen_monitor_char_write(i8 signext %0) {
%2 = tail call i32 @screen_monitor_put_char(i8 signext %0)
ret void
}
int has_local_var(int x) {
  int local_var = x + 1;
  return local_var;
}


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

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

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

LLVM IR (-O2):
define i32 @has_local_var(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
unsigned int f89(unsigned int x, int y) {
  return (x << ((-y) & (8 * sizeof(unsigned int) - 1))) + (x >> y);
}


x86 assembly (clang, -O0):
<f89>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
movslq %ecx,%rcx
and    $0x1f,%rcx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f89>:
mov    %esi,%ecx
neg    %cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f89(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 0, %6
%8 = sext i32 %7 to i64
%9 = and i64 %8, 31
%10 = trunc i64 %9 to i32
%11 = shl i32 %5, %10
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = lshr i32 %12, %13
%15 = add i32 %11, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @f89(i32 %0, i32 %1) {
%3 = sub nsw i32 0, %1
%4 = and i32 %3, 31
%5 = shl i32 %0, %4
%6 = lshr i32 %0, %1
%7 = add i32 %5, %6
ret i32 %7
}
void CRYPTO_is_mem_check_on(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_is_mem_check_on() {
ret void
}
void *test_anti_range_79(long n) {
  extern void *alloc_anti_range_79(long) __attribute__((alloc_size(1)));
  if (1 <= n && n <= 1)
    n = 1 - 1;
  return alloc_anti_range_79(n);
}


x86 assembly (clang, -O0):
<test_anti_range_79>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%eax
cmp    -0x8(%rbp),%rax
jg     113e <test_anti_range_79+0x2e>
cmpq   $0x1,-0x8(%rbp)
jg     113e <test_anti_range_79+0x2e>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <alloc_anti_range_79@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_79>:
xor    %eax,%eax
cmp    $0x1,%rdi
cmove  %rax,%rdi
jmp    1030 <alloc_anti_range_79@plt>

LLVM IR (-O0):
define i8* @test_anti_range_79(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp sle i64 1, %3
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp sle i64 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %5
store i64 0, i64* %2
br label %9
9: ; preds = %8, %5, %1
%10 = load i64, i64* %2
%11 = call i8* @alloc_anti_range_79(i64 %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @test_anti_range_79(i64 %0) {
%2 = icmp eq i64 %0, 1
%3 = select i1 %2, i64 0, i64 %0
%4 = tail call i8* @alloc_anti_range_79(i64 %3)
ret i8* %4
}
double fabs(double x) {
  double t;
  __asm__ __volatile__("pcmpeqd %0, %0" : "=x"(t));
  __asm__ __volatile__("psrlq   $1, %0" : "+x"(t));
  __asm__ __volatile__("andps   %1, %0" : "+x"(x) : "x"(t));
  return x;
}


x86 assembly (clang, -O0):
<fabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
pcmpeqd %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
psrlq  $0x1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
andps  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabs>:
pcmpeqd %xmm1,%xmm1
psrlq  $0x1,%xmm1
andps  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @fabs(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = call double asm sideeffect "pcmpeqd $0, $0", "=x,~{dirflag},~{fpsr},~{flags}"()
store double %4, double* %3
%5 = load double, double* %3
%6 = call double asm sideeffect "psrlq $$1, $0", "=x,0,~{dirflag},~{fpsr},~{flags}"(double %5)
store double %6, double* %3
%7 = load double, double* %2
%8 = load double, double* %3
%9 = call double asm sideeffect "andps $1, $0", "=x,x,0,~{dirflag},~{fpsr},~{flags}"(double %8, double %7)
store double %9, double* %2
%10 = load double, double* %2
ret double %10
}

LLVM IR (-O2):
define double @fabs(double %0) {
%2 = tail call double asm sideeffect "pcmpeqd $0, $0", "=x,~{dirflag},~{fpsr},~{flags}"()
%3 = tail call double asm sideeffect "psrlq $$1, $0", "=x,0,~{dirflag},~{fpsr},~{flags}"(double %2)
%4 = tail call double asm sideeffect "andps $1, $0", "=x,x,0,~{dirflag},~{fpsr},~{flags}"(double %3, double %0)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ kotlinclib_print_string(char *);
int /*<<< orphan*/ kotlinclib_println();
void kotlinclib_println_string(char *message) {
  kotlinclib_print_string(message);
  kotlinclib_println();
}


x86 assembly (clang, -O0):
<kotlinclib_println_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <kotlinclib_print_string@plt>
mov    $0x0,%al
call   1040 <kotlinclib_println@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @kotlinclib_println_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @kotlinclib_print_string(i8* %3)
%5 = call i32 (...) @kotlinclib_println()
ret void
}

LLVM IR (-O2):
define void @kotlinclib_println_string(i8* %0) {
%2 = tail call i32 @kotlinclib_print_string(i8* %0)
%3 = tail call i32 (...) @kotlinclib_println()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wrap_array_export(int **, int **, int **, int **, int **,
                                     int **, char **);
void export_cofold_arrays(int **f5_p, int **c_p, int **fML_p, int **fM1_p,
                          int **fc_p, int **indx_p, char **ptype_p) {
  wrap_array_export(f5_p, c_p, fML_p, fM1_p, fc_p, indx_p, ptype_p);
}


x86 assembly (clang, -O0):
<export_cofold_arrays>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <wrap_array_export@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<export_cofold_arrays>:
jmp    1030 <wrap_array_export@plt>

LLVM IR (-O0):
define void @export_cofold_arrays(i32** %0, i32** %1, i32** %2, i32** %3, i32** %4, i32** %5, i8** %6) {
%8 = alloca i32**
%9 = alloca i32**
%10 = alloca i32**
%11 = alloca i32**
%12 = alloca i32**
%13 = alloca i32**
%14 = alloca i8**
store i32** %0, i32*** %8
store i32** %1, i32*** %9
store i32** %2, i32*** %10
store i32** %3, i32*** %11
store i32** %4, i32*** %12
store i32** %5, i32*** %13
store i8** %6, i8*** %14
%15 = load i32**, i32*** %8
%16 = load i32**, i32*** %9
%17 = load i32**, i32*** %10
%18 = load i32**, i32*** %11
%19 = load i32**, i32*** %12
%20 = load i32**, i32*** %13
%21 = load i8**, i8*** %14
%22 = call i32 @wrap_array_export(i32** %15, i32** %16, i32** %17, i32** %18, i32** %19, i32** %20, i8** %21)
ret void
}

LLVM IR (-O2):
define void @export_cofold_arrays(i32** %0, i32** %1, i32** %2, i32** %3, i32** %4, i32** %5, i8** %6) {
%8 = tail call i32 @wrap_array_export(i32** %0, i32** %1, i32** %2, i32** %3, i32** %4, i32** %5, i8** %6)
ret void
}
int ptp_atoi(const char *s) {
  int k = 0;
  k = 0;
  while (*s != '\0' && *s >= '0' && *s <= '9') {
    k = 10 * k + (*s - '0');
    s++;
  }
  return k;
}


x86 assembly (clang, -O0):
<ptp_atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
je     1150 <ptp_atoi+0x50>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0xd(%rbp)
jl     1150 <ptp_atoi+0x50>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1160 <ptp_atoi+0x60>
jmp    1184 <ptp_atoi+0x84>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1116 <ptp_atoi+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptp_atoi>:
mov    (%rdi),%cl
lea    -0x30(%rcx),%edx
xor    %eax,%eax
cmp    $0x9,%dl
ja     113b <ptp_atoi+0x3b>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%edx
add    $0x1,%rdi
cmp    $0xa,%dl
jb     1120 <ptp_atoi+0x20>
ret

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

LLVM IR (-O2):
define i32 @ptp_atoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
br i1 %4, label %5, label %17
5: ; preds = %1, %5
%6 = phi i8 [ %14, %5 ], [ %2, %1 ]
%7 = phi i32 [ %12, %5 ], [ 0, %1 ]
%8 = phi i8* [ %13, %5 ], [ %0, %1 ]
%9 = zext i8 %6 to i32
%10 = mul nsw i32 %7, 10
%11 = add i32 %10, -48
%12 = add i32 %11, %9
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %13
%15 = add i8 %14, -48
%16 = icmp ult i8 %15, 10
br i1 %16, label %5, label %17
17: ; preds = %5, %1
%18 = phi i32 [ 0, %1 ], [ %12, %5 ]
ret i32 %18
}
int test_imm_8Bint64_lowword_reg(long long val) {
  return ((val) & (0x8B << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_8Bint64_lowword_reg>:
test   $0x8b,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_8Bint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 139
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void RTCrcAdler32Start(void) {}


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

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

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

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

/* Variables and functions */
uint32_t new_uint32_t(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @new_uint32_t() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int /*<<< orphan*/ printArray(int *, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ quickSort(int *, int /*<<< orphan*/, int);
int main() {
  int arr[] = {10, 7, 8, 9, 1, 5};
  int n = sizeof(arr) / sizeof(arr[0]);
  quickSort(arr, 0, n - 1);
  printf("Sorted array: n");
  printArray(arr, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb4(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x6,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1040 <quickSort@plt>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1050 <printArray@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0xed4(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xeb8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x5,%edx
call   1040 <quickSort@plt>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1050 <printArray@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arr = [6 x i32] [i32 10, i32 7, i32 8, i32 9, i32 1, i32 5]
@.str = [16 x i8] c"Sorted array: n\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [6 x i32]* %2 to i8*
store i32 6, i32* %3
%5 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %3
%7 = sub nsw i32 %6, 1
%8 = call i32 @quickSort(i32* %5, i32 0, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%10 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%11 = load i32, i32* %3
%12 = call i32 @printArray(i32* %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [6 x i32] [i32 10, i32 7, i32 8, i32 9, i32 1, i32 5]
@.str = [16 x i8] c"Sorted array: n\00"
define i32 @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @quickSort(i32* %3, i32 0, i32 5)
%5 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printArray(i32* %3, i32 6)
ret i32 0
}
void s3c_i2c3_setname(char *name) {}


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

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

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

LLVM IR (-O2):
define void @s3c_i2c3_setname(i8* nocapture %0) {
ret void
}
unsigned int calc_slider_offset(unsigned int real_size, unsigned int slid_pos,
                                unsigned int slid_bg_size) {
  if (slid_bg_size == 0)
    return 0;
  return (slid_pos * real_size) / slid_bg_size;
}


x86 assembly (clang, -O0):
<calc_slider_offset>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1123 <calc_slider_offset+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1132 <calc_slider_offset+0x32>
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
xor    %edx,%edx
divl   -0x10(%rbp)
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_slider_offset>:
test   %edx,%edx
je     1110 <calc_slider_offset+0x10>
mov    %edx,%ecx
imul   %edi,%esi
mov    %esi,%eax
xor    %edx,%edx
div    %ecx
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @calc_slider_offset(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = mul i32 %1, %0
%7 = udiv i32 %6, %2
br label %8
8: ; preds = %3, %5
%9 = phi i32 [ %7, %5 ], [ 0, %3 ]
ret i32 %9
}
/* Variables and functions */
bool nrf53_errata_121(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_121() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x81() {
  Assert_real((isxdigit(129) == 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_isxdigit.c",
              650, ("isxdigit should be 0 for 0x81"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x81>:
push   %rax
mov    $0x81,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x28a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x81\00"
define void @t_isxdigit_0x81() {
%1 = call i64 @isxdigit(i32 129)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 650, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x81\00"
define void @t_isxdigit_0x81() {
%1 = tail call i64 @isxdigit(i32 129)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 650, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int bitcnt(uint32_t x) {
  uint32_t n;
  n = (x >> 1) & 0x77777777;
  x = x - n;
  n = (n >> 1) & 0x77777777;
  x = x - n;
  n = (n >> 1) & 0x77777777;
  x = x - n;
  x = (x + (x >> 4)) & 0x0F0F0F0F;
  x = x * 0x01010101;
  return x >> 24;
}


x86 assembly (clang, -O0):
<bitcnt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
and    $0x77777777,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
and    $0x77777777,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
and    $0x77777777,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x4,%ecx
add    %ecx,%eax
and    $0xf0f0f0f,%eax
mov    %eax,-0x4(%rbp)
imul   $0x1010101,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitcnt>:
mov    %edi,%eax
shr    %eax
and    $0x77777777,%eax
mov    %edi,%ecx
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %eax,%ecx
mov    %edi,%eax
shr    $0x3,%eax
and    $0x11111111,%eax
add    %ecx,%eax
sub    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
ret

LLVM IR (-O0):
define i32 @bitcnt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 1
%6 = and i32 %5, 2004318071
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = sub nsw i32 %7, %8
store i32 %9, i32* %2
%10 = load i32, i32* %3
%11 = ashr i32 %10, 1
%12 = and i32 %11, 2004318071
store i32 %12, i32* %3
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = sub nsw i32 %13, %14
store i32 %15, i32* %2
%16 = load i32, i32* %3
%17 = ashr i32 %16, 1
%18 = and i32 %17, 2004318071
store i32 %18, i32* %3
%19 = load i32, i32* %2
%20 = load i32, i32* %3
%21 = sub nsw i32 %19, %20
store i32 %21, i32* %2
%22 = load i32, i32* %2
%23 = load i32, i32* %2
%24 = ashr i32 %23, 4
%25 = add nsw i32 %22, %24
%26 = and i32 %25, 252645135
store i32 %26, i32* %2
%27 = load i32, i32* %2
%28 = mul nsw i32 %27, 16843009
store i32 %28, i32* %2
%29 = load i32, i32* %2
%30 = ashr i32 %29, 24
ret i32 %30
}

LLVM IR (-O2):
define i32 @bitcnt(i32 %0) {
%2 = lshr i32 %0, 1
%3 = and i32 %2, 2004318071
%4 = lshr i32 %0, 2
%5 = and i32 %4, 858993459
%6 = lshr i32 %0, 3
%7 = and i32 %6, 286331153
%8 = add nuw i32 %5, %3
%9 = add nuw i32 %8, %7
%10 = sub i32 %0, %9
%11 = lshr i32 %10, 4
%12 = add i32 %11, %10
%13 = and i32 %12, 252645135
%14 = mul nsw i32 %13, 16843009
%15 = lshr i32 %14, 24
ret i32 %15
}
void swap_ints(int *a, int *b) {
  int t;
  t = *a;
  *a = *b;
  *b = t;
}


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

x86 assembly (clang, -O2):
<swap_ints>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @swap_ints(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap_ints(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
int main() {
  int arg1 = 33;
  int sal = 0;
  __asm__("sall $4, %%eax;" : "=a"(sal) : "a"(arg1));
  if (sal != 528) {
    abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x21,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x210,-0xc(%rbp)
je     1148 <main+0x38>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x21,%eax
shl    $0x4,%eax
cmp    $0x210,%eax
jne    1122 <main+0x12>
xor    %eax,%eax
ret
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 33, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i32 asm "sall $$4, %eax;", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 528
br i1 %7, label %8, label %9
8: ; preds = %0
unreachable
9: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 asm "sall $$4, %eax;", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 33)
%2 = icmp eq i32 %1, 528
br i1 %2, label %4, label %3
3: ; preds = %0
tail call void @abort()
unreachable
4: ; preds = %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x0b() {
  Assert_real((isbdigit(11) == 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_isbdigit.c",
              60, ("isbdigit should be 0 for 0x0b"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x0b>:
push   %rax
mov    $0xb,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3c,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x0b\00"
define void @t_isbdigit_0x0b() {
%1 = call i64 @isbdigit(i32 11)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 60, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x0b\00"
define void @t_isbdigit_0x0b() {
%1 = tail call i64 @isbdigit(i32 11)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 60, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ input(int *);
int /*<<< orphan*/ max_min(int *);
int /*<<< orphan*/ output(int *);
int main() {
  int number[10];
  input(number);
  max_min(number);
  output(number);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
call   1030 <input@plt>
lea    -0x30(%rbp),%rdi
call   1040 <max_min@plt>
lea    -0x30(%rbp),%rdi
call   1050 <output@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <input@plt>
mov    %rbx,%rdi
call   1040 <max_min@plt>
mov    %rbx,%rdi
call   1050 <output@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%4 = call i32 @input(i32* %3)
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%6 = call i32 @max_min(i32* %5)
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%8 = call i32 @output(i32* %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @input(i32* %3)
%5 = call i32 @max_min(i32* %3)
%6 = call i32 @output(i32* %3)
ret i32 0
}
int test7(int m, int n) { return m & (m | n); }


x86 assembly (clang, -O0):
<test7>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
or     -0x8(%rbp),%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test7>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @test7(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = or i32 %6, %7
%9 = and i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @test7(i32 returned %0, i32 %1) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int fn2(void) {

#pragma ASPIRE begin protection(code_mobility, status(mobile))

  int x = 2;
  printf("Major Tom to Ground Control (fn%d)\n", x);
  return x;

#pragma ASPIRE end
  ;
}


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

x86 assembly (clang, -O2):
<fn2>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Major Tom to Ground Control (fn%d)\0A\00"
define i32 @fn2() {
%1 = alloca i32
store i32 2, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [36 x i8] c"Major Tom to Ground Control (fn%d)\0A\00"
define i32 @fn2() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 2
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
int measure_bytes(const char *bytes __attribute__((unused)), size_t len,
                  void *data) {
  ssize_t *total = data;
  *total += (ssize_t)len;
  return 0;
}


x86 assembly (clang, -O0):
<measure_bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%rax
add    (%rax),%rcx
mov    %rcx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<measure_bytes>:
add    %rsi,(%rdx)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @measure_bytes(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i64*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to i64*
store i64* %9, i64** %7
%10 = load i64, i64* %5
%11 = load i64*, i64** %7
%12 = load i64, i64* %11
%13 = add nsw i64 %12, %10
store i64 %13, i64* %11
ret i32 0
}

LLVM IR (-O2):
define i32 @measure_bytes(i8* nocapture readnone %0, i64 %1, i8* nocapture %2) {
%4 = bitcast i8* %2 to i64*
%5 = load i64, i64* %4
%6 = add nsw i64 %5, %1
store i64 %6, i64* %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, long);
int /*<<< orphan*/ stdout;
void dump_long(long l) { fprintf(stdout, ">>%ld<<\n", l); }


x86 assembly (clang, -O0):
<dump_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_long>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [9 x i8] c">>%ld<<\0A\00"
define void @dump_long(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i32, i32* @stdout
%4 = load i64, i64* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [9 x i8] c">>%ld<<\0A\00"
define void @dump_long(i64 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abortexecution_();
int /*<<< orphan*/ printf(char *, char *, char *);
void execerror(char *message, char *op) {
  printf("run time error: %s needed for %s\n", message, op);
  abortexecution_();
  return;
}


x86 assembly (clang, -O0):
<execerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <abortexecution_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execerror>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <abortexecution_@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"run time error: %s needed for %s\0A\00"
define void @execerror(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 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
%8 = call i32 (...) @abortexecution_()
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"run time error: %s needed for %s\0A\00"
define void @execerror(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%4 = tail call i32 (...) @abortexecution_()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ EOF;
int EXIT_SUCCESS;
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ lower(int /*<<< orphan*/);
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
int main(void) {
  int16_t character;
  while ((character = getchar()) != EOF) {
    putchar(lower(character));
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e98(%rip),%rcx
cmp    (%rcx),%eax
je     116c <main+0x3c>
mov    -0x8(%rbp),%edi
call   1050 <lower@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
jmp    113f <main+0xf>
mov    0x2e65(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2ea9(%rip),%rbx
cmp    (%rbx),%eax
je     1169 <main+0x39>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1050 <lower@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1150 <main+0x20>
mov    0x2e68(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = load i32, i32* %2
%9 = call i32 @lower(i32 %8)
%10 = call i32 @putchar(i32 %9)
br label %3
11: ; preds = %3
%12 = load i32, i32* @EXIT_SUCCESS
ret i32 %12
}

LLVM IR (-O2):
@EOF = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %11, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %8, %4 ], [ %1, %0 ]
%6 = tail call i32 @lower(i32 %5)
%7 = tail call i32 @putchar(i32 %6)
%8 = tail call i32 (...) @getchar()
%9 = load i32, i32* @EOF
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %4
11: ; preds = %4, %0
%12 = load i32, i32* @EXIT_SUCCESS
ret i32 %12
}
int foo(int x) { return (x / 2) / ((-0x7fffffff - 1) / -2); }


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

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%ecx
shr    $0x1f,%ecx
add    %edi,%ecx
sar    %ecx
lea    0x3fffffff(%rcx),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0x1e,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = sdiv i32 %0, 2
%3 = sdiv i32 %2, 1073741824
ret i32 %3
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int get_password(char *, int, char);
int /*<<< orphan*/ printf(char *, char *, int);
int /*<<< orphan*/ stdout;
int main(void) {
  char pass[51];
  int size;
  fputs("Please type your password: ", stdout);
  size = get_password(pass, 51, '*');
  printf("\n'%s'(%d byte)\n", pass, size);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%esi
lea    0xeb1(%rip),%rdi
call   1040 <fputs@plt>
lea    -0x40(%rbp),%rdi
mov    $0x33,%esi
mov    $0x2a,%edx
call   1050 <get_password@plt>
mov    %eax,-0x44(%rbp)
lea    -0x40(%rbp),%rsi
mov    -0x44(%rbp),%edx
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e54(%rip),%rax
mov    (%rax),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
mov    0x2ea4(%rip),%rax
mov    (%rax),%esi
lea    0xebb(%rip),%rdi
call   1040 <fputs@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x33,%esi
mov    $0x2a,%edx
call   1050 <get_password@plt>
lea    0xeb6(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Please type your password: \00"
@stdout = global i32 0
@.str.1 = [16 x i8] c"\0A'%s'(%d byte)\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [51 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* @stdout
%5 = call i32 @fputs(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = getelementptr inbounds [51 x i8], [51 x i8]* %2, i64 0, i64 0
%7 = call i32 @get_password(i8* %6, i32 51, i8 signext 42)
store i32 %7, i32* %3
%8 = getelementptr inbounds [51 x i8], [51 x i8]* %2, i64 0, i64 0
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %8, i32 %9)
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}

LLVM IR (-O2):
@.str = [28 x i8] c"Please type your password: \00"
@stdout = global i32 0
@.str.1 = [16 x i8] c"\0A'%s'(%d byte)\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [51 x i8]
%2 = getelementptr inbounds [51 x i8], [51 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @get_password(i8* %2, i32 51, i8 signext 42)
%6 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %2, i32 %5)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}