xunge/DecIR huggingface dataset:
void *test_anti_range_73(signed char n) {
  extern void *alloc_anti_range_73(signed char) __attribute__((alloc_size(1)));
  if (1 <= n && n <= 1)
    n = 1 - 1;
  return alloc_anti_range_73(n);
}


x86 assembly (clang, -O0):
<test_anti_range_73>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
jg     1140 <test_anti_range_73+0x30>
movsbl -0x1(%rbp),%eax
cmp    $0x1,%eax
jg     1140 <test_anti_range_73+0x30>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <alloc_anti_range_73@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_73>:
xor    %eax,%eax
cmp    $0x1,%dil
cmove  %eax,%edi
jmp    1030 <alloc_anti_range_73@plt>

LLVM IR (-O0):
define i8* @test_anti_range_73(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 1, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %6
store i8 0, i8* %2
br label %11
11: ; preds = %10, %6, %1
%12 = load i8, i8* %2
%13 = call i8* @alloc_anti_range_73(i8 signext %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @test_anti_range_73(i8 signext %0) {
%2 = icmp eq i8 %0, 1
%3 = select i1 %2, i8 0, i8 %0
%4 = tail call i8* @alloc_anti_range_73(i8 signext %3)
ret i8* %4
}
int fn4(int a, int b) {
  int tem1 = b & a;
  int tem2 = b ^ a;
  return tem1 + tem2;
}


x86 assembly (clang, -O0):
<fn4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fn4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = and i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = xor i32 %10, %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = add nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @fn4(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
struct access_frame *cosmos_exec(struct cosmos *cm,
                                 struct access_frame *mapfn_af,
                                 struct access_frame *targ) {
  struct access_frame *res;
  char *fnid;
  return res;
}


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

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

LLVM IR (-O0):
%struct.cosmos = type opaque
%struct.access_frame = type opaque
define %struct.access_frame* @cosmos_exec(%struct.cosmos* %0, %struct.access_frame* %1, %struct.access_frame* %2) {
%4 = alloca %struct.cosmos*
%5 = alloca %struct.access_frame*
%6 = alloca %struct.access_frame*
%7 = alloca %struct.access_frame*
%8 = alloca i8*
store %struct.cosmos* %0, %struct.cosmos** %4
store %struct.access_frame* %1, %struct.access_frame** %5
store %struct.access_frame* %2, %struct.access_frame** %6
%9 = load %struct.access_frame*, %struct.access_frame** %7
ret %struct.access_frame* %9
}

LLVM IR (-O2):
%struct.cosmos = type opaque
%struct.access_frame = type opaque
define noalias %struct.access_frame* @cosmos_exec(%struct.cosmos* nocapture readnone %0, %struct.access_frame* nocapture readnone %1, %struct.access_frame* nocapture readnone %2) {
ret %struct.access_frame* undef
}
void testClosureDBDrV(void (*closure)(double, char, double), double a1, char a2,
                      double a3) {
  (*closure)(a1, a2, a3);
}


x86 assembly (clang, -O0):
<testClosureDBDrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  -0x10(%rbp),%xmm0
mov    -0x11(%rbp),%cl
movsd  -0x20(%rbp),%xmm1
movsbl %cl,%edi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureDBDrV>:
mov    %rdi,%rax
mov    %esi,%edi
jmp    *%rax

LLVM IR (-O0):
define void @testClosureDBDrV(void (double, i8, double)* %0, double %1, i8 signext %2, double %3) {
%5 = alloca void (double, i8, double)*
%6 = alloca double
%7 = alloca i8
%8 = alloca double
store void (double, i8, double)* %0, void (double, i8, double)** %5
store double %1, double* %6
store i8 %2, i8* %7
store double %3, double* %8
%9 = load void (double, i8, double)*, void (double, i8, double)** %5
%10 = load double, double* %6
%11 = load i8, i8* %7
%12 = load double, double* %8
ret void
}

LLVM IR (-O2):
define void @testClosureDBDrV(void (double, i8, double)* nocapture %0, double %1, i8 signext %2, double %3) {
tail call void %0(double %1, i8 signext %2, double %3)
ret void
}
/* Variables and functions */
char *strrchr(char *, char const);
char *remove_after_char(char *string, const char c) {
  char *p;
  p = strrchr(string, c);
  if (p)
    p[1] = '\0';
  return string;
}


x86 assembly (clang, -O0):
<remove_after_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1146 <remove_after_char+0x36>
mov    -0x18(%rbp),%rax
movb   $0x0,0x1(%rax)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_after_char>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strrchr@plt>
test   %rax,%rax
je     1122 <remove_after_char+0x12>
movb   $0x0,0x1(%rax)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @remove_after_char(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i8*
store i8* %0, i8** %3
store i8 %1, i8* %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %4
%8 = call i8* @strrchr(i8* %6, i8 signext %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8 0, i8* %13
br label %14
14: ; preds = %11, %2
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @remove_after_char(i8* returned %0, i8 signext %1) {
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
store i8 0, i8* %6
br label %7
7: ; preds = %5, %2
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ byteorder_swap_pointer_32_copy(unsigned char *,
                                                  unsigned char *);
float byteorder_swap_pointer_32_to_float32(unsigned char *p) {
  float f;
  byteorder_swap_pointer_32_copy(p, (unsigned char *)&f);
  return f;
}


x86 assembly (clang, -O0):
<byteorder_swap_pointer_32_to_float32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <byteorder_swap_pointer_32_copy@plt>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<byteorder_swap_pointer_32_to_float32>:
push   %rax
lea    0x4(%rsp),%rsi
call   1030 <byteorder_swap_pointer_32_copy@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @byteorder_swap_pointer_32_to_float32(i8* %0) {
%2 = alloca i8*
%3 = alloca float
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast float* %3 to i8*
%6 = call i32 @byteorder_swap_pointer_32_copy(i8* %4, i8* %5)
%7 = load float, float* %3
ret float %7
}

LLVM IR (-O2):
define float @byteorder_swap_pointer_32_to_float32(i8* %0) {
%2 = alloca float
%3 = bitcast float* %2 to i8*
%4 = call i32 @byteorder_swap_pointer_32_copy(i8* %0, i8* %3)
%5 = load float, float* %2
ret float %5
}
/* Variables and functions */
int dbar(double, double);
int sb(double, double);
int ubar(double, double);
int uv(double, double);
double F3_cc_anu_p(double xx, double Q2) {
  return 2 * (uv(xx, Q2) + sb(xx, Q2) + ubar(xx, Q2) - dbar(xx, Q2)) / xx;
}


x86 assembly (clang, -O0):
<F3_cc_anu_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <uv@plt>
mov    %eax,-0x1c(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <sb@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1050 <ubar@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1060 <dbar@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
sub    %ecx,%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
divsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<F3_cc_anu_p>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1040 <uv@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1030 <sb@plt>
mov    %eax,%ebp
add    %ebx,%ebp
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1050 <ubar@plt>
mov    %eax,%ebx
add    %ebp,%ebx
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1060 <dbar@plt>
sub    %eax,%ebx
add    %ebx,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
divsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @F3_cc_anu_p(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call i32 @uv(double %5, double %6)
%8 = load double, double* %3
%9 = load double, double* %4
%10 = call i32 @sb(double %8, double %9)
%11 = add nsw i32 %7, %10
%12 = load double, double* %3
%13 = load double, double* %4
%14 = call i32 @ubar(double %12, double %13)
%15 = add nsw i32 %11, %14
%16 = load double, double* %3
%17 = load double, double* %4
%18 = call i32 @dbar(double %16, double %17)
%19 = sub nsw i32 %15, %18
%20 = mul nsw i32 2, %19
%21 = sitofp i32 %20 to double
%22 = load double, double* %3
%23 = fdiv double %21, %22
ret double %23
}

LLVM IR (-O2):
define double @F3_cc_anu_p(double %0, double %1) {
%3 = tail call i32 @uv(double %0, double %1)
%4 = tail call i32 @sb(double %0, double %1)
%5 = add nsw i32 %4, %3
%6 = tail call i32 @ubar(double %0, double %1)
%7 = add nsw i32 %5, %6
%8 = tail call i32 @dbar(double %0, double %1)
%9 = sub i32 %7, %8
%10 = shl nsw i32 %9, 1
%11 = sitofp i32 %10 to double
%12 = fdiv double %11, %0
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  return n % 3;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
movslq 0x4(%rsp),%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = srem i32 %4, 3
ret i32 %5
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = srem i32 %4, 3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int prv_pogolem_prost(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  int pogolem_prost = prv_pogolem_prost(n);
  printf("%d - %d = %d\n", pogolem_prost, n, pogolem_prost - n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <prv_pogolem_prost@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
sub    -0x8(%rbp),%ecx
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <prv_pogolem_prost@plt>
mov    0x4(%rsp),%edx
mov    %eax,%ecx
sub    %edx,%ecx
lea    0xea9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [14 x i8] c"%d - %d = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @prv_pogolem_prost(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = sub nsw i32 %9, %10
%12 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [14 x i8] c"%d - %d = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @prv_pogolem_prost(i32 %4)
%6 = load i32, i32* %1
%7 = sub nsw i32 %5, %6
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6, i32 %7)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(short *, int, int, int /*<<< orphan*/ *);
void wavfile_write(FILE *file, short data[], int length) {
  fwrite(data, sizeof(short), length, file);
}


x86 assembly (clang, -O0):
<wavfile_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rcx
mov    $0x2,%esi
call   1030 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wavfile_write>:
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x2,%esi
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
define void @wavfile_write(i32* %0, i16* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i16*
%6 = alloca i32
store i32* %0, i32** %4
store i16* %1, i16** %5
store i32 %2, i32* %6
%7 = load i16*, i16** %5
%8 = load i32, i32* %6
%9 = load i32*, i32** %4
%10 = call i32 @fwrite(i16* %7, i32 2, i32 %8, i32* %9)
ret void
}

LLVM IR (-O2):
define void @wavfile_write(i32* nocapture %0, i16* nocapture %1, i32 %2) {
%4 = tail call i32 @fwrite(i16* %1, i32 2, i32 %2, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test567(int, int /*<<< orphan*/);
void test5(void) {
  printf("Beginning malloc test 5\n");
  test567(5, 0);
}


x86 assembly (clang, -O0):
<test5>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x5,%edi
xor    %esi,%esi
call   1030 <test567@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test5>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <test567@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Beginning malloc test 5\0A\00"
define void @test5() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @test567(i32 5, i32 0)
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"Beginning malloc test 5\00"
define void @test5() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @test567(i32 5, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ df_free(char *);
void dfjson_free(char *string) { df_free(string); }


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

x86 assembly (clang, -O2):
<dfjson_free>:
jmp    1030 <df_free@plt>

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

LLVM IR (-O2):
define void @dfjson_free(i8* %0) {
%2 = tail call i32 @df_free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void op_jpo() { puts("JPO"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"JPO\00"
define void @op_jpo() {
%1 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"JPO\00"
define void @op_jpo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reverse(char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char **argv) {
  char str[] = "abba";
  reverse(str);
  strcpy(str, "madam");
  reverse(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec4(%rip),%eax
mov    %eax,-0x15(%rbp)
mov    0xebf(%rip),%al
mov    %al,-0x11(%rbp)
lea    -0x15(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0x15(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x15(%rbp),%rdi
call   1030 <reverse@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xc(%rsp)
movl   $0x61626261,0x8(%rsp)
61
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <reverse@plt>
lea    0xebf(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
call   1030 <reverse@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [5 x i8] c"abba\00"
@.str = [6 x i8] c"madam\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [5 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [5 x i8]* %6 to i8*
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%9 = call i32 @reverse(i8* %8)
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%11 = call i32 @strcpy(i8* %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%12 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%13 = call i32 @reverse(i8* %12)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [5 x i8] c"abba\00"
@.str = [6 x i8] c"madam\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i8]
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%5 = call i32 @reverse(i8* %4)
%6 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @reverse(i8* %4)
ret i32 0
}
/* Variables and functions */
unsigned int const pt_flags_to_bin_noC(unsigned int const);
unsigned pt_flags_to_bin(const unsigned flags) {
  const unsigned mask = 0u - (flags >> 6);
  return (mask & 27u) | (~mask & pt_flags_to_bin_noC(flags));
}


x86 assembly (clang, -O0):
<pt_flags_to_bin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shr    $0x6,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1b,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <pt_flags_to_bin_noC@plt>
mov    -0x10(%rbp),%ecx
mov    %eax,%edx
mov    -0xc(%rbp),%eax
and    %edx,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pt_flags_to_bin>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
shr    $0x6,%ebx
mov    %ebx,%ebp
neg    %ebp
and    $0x1b,%ebp
add    $0xffffffff,%ebx
call   1030 <pt_flags_to_bin_noC@plt>
and    %ebx,%eax
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @pt_flags_to_bin(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = lshr i32 %4, 6
%6 = sub i32 0, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = and i32 %7, 27
%9 = load i32, i32* %3
%10 = xor i32 %9, -1
%11 = load i32, i32* %2
%12 = call i32 @pt_flags_to_bin_noC(i32 %11)
%13 = and i32 %10, %12
%14 = or i32 %8, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @pt_flags_to_bin(i32 %0) {
%2 = lshr i32 %0, 6
%3 = sub nsw i32 0, %2
%4 = and i32 %3, 27
%5 = add nsw i32 %2, -1
%6 = tail call i32 @pt_flags_to_bin_noC(i32 %0)
%7 = and i32 %6, %5
%8 = or i32 %7, %4
ret i32 %8
}
void ScaleRowDown38_C() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown38_C() {
ret void
}
/* Type definitions */
struct node_operations {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *, int);
void example_exit(void *node, void *object, struct node_operations *ops) {
  int *ctx = (int *)object;
  *ctx = *ctx + 1;
  printf("example_exit %p %d\n", node, *ctx);
}


x86 assembly (clang, -O0):
<example_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rsi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<example_exit>:
mov    %rdi,%rax
mov    (%rsi),%edx
add    $0x1,%edx
mov    %edx,(%rsi)
lea    0xedf(%rip),%rdi
mov    %rax,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.node_operations = type { i32 }
@.str = [20 x i8] c"example_exit %p %d\0A\00"
define void @example_exit(i8* %0, i8* %1, %struct.node_operations* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.node_operations*
%7 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.node_operations* %2, %struct.node_operations** %6
%8 = load i8*, i8** %5
%9 = bitcast i8* %8 to i32*
store i32* %9, i32** %7
%10 = load i32*, i32** %7
%11 = load i32, i32* %10
%12 = add nsw i32 %11, 1
%13 = load i32*, i32** %7
store i32 %12, i32* %13
%14 = load i8*, i8** %4
%15 = load i32*, i32** %7
%16 = load i32, i32* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %14, i32 %16)
ret void
}

LLVM IR (-O2):
%struct.node_operations = type { i32 }
@.str = [20 x i8] c"example_exit %p %d\0A\00"
define void @example_exit(i8* %0, i8* nocapture %1, %struct.node_operations* nocapture readnone %2) {
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %4
%6 = add nsw i32 %5, 1
store i32 %6, i32* %4
%7 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ASL16(int /*<<< orphan*/, int);
int /*<<< orphan*/ DirectIndexedXE0(int);
void Op16E0M0(void) { ASL16(DirectIndexedXE0(3), 0xFFFF); }


x86 assembly (clang, -O0):
<Op16E0M0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <DirectIndexedXE0@plt>
mov    %eax,%edi
mov    $0xffff,%esi
call   1040 <ASL16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op16E0M0>:
push   %rax
mov    $0x3,%edi
call   1030 <DirectIndexedXE0@plt>
mov    %eax,%edi
mov    $0xffff,%esi
pop    %rax
jmp    1040 <ASL16@plt>

LLVM IR (-O0):
define void @Op16E0M0() {
%1 = call i32 @DirectIndexedXE0(i32 3)
%2 = call i32 @ASL16(i32 %1, i32 65535)
ret void
}

LLVM IR (-O2):
define void @Op16E0M0() {
%1 = tail call i32 @DirectIndexedXE0(i32 3)
%2 = tail call i32 @ASL16(i32 %1, i32 65535)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emit(char *);
int /*<<< orphan*/ sprintf(char *, char *);
void get_endif() {
  char line[140];
  sprintf(line, "command EndIf");
  emit(line);
}


x86 assembly (clang, -O0):
<get_endif>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
lea    -0x90(%rbp),%rdi
lea    0xec7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x90(%rbp),%rdi
call   1030 <emit@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_endif>:
sub    $0x98,%rsp
movabs $0x6649646e452064,%rax
mov    %rax,0x6(%rsp)
movabs $0x20646e616d6d6f63,%rax
6e 64 20
mov    %rax,(%rsp)
mov    %rsp,%rdi
call   1030 <emit@plt>
add    $0x98,%rsp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"command EndIf\00"
define void @get_endif() {
%1 = alloca [140 x i8]
%2 = getelementptr inbounds [140 x i8], [140 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [140 x i8], [140 x i8]* %1, i64 0, i64 0
%5 = call i32 @emit(i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"command EndIf\00"
define void @get_endif() {
%1 = alloca [140 x i8]
%2 = getelementptr inbounds [140 x i8], [140 x i8]* %1, i64 0, i64 0
%3 = call i32 @emit(i8* %2)
ret void
}
double g(const int r, double x) {
  x = x * x * x - r;
  return x;
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
cvtsi2sdl -0x4(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
cvtsi2sd %edi,%xmm2
mulsd  %xmm1,%xmm0
subsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @g(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
store i32 %0, i32* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %4
%7 = fmul double %5, %6
%8 = load double, double* %4
%9 = load i32, i32* %3
%10 = sitofp i32 %9 to double
%11 = fneg double %10
%12 = call double @llvm.fmuladd.f64(double %7, double %8, double %11)
store double %12, double* %4
%13 = load double, double* %4
ret double %13
}

LLVM IR (-O2):
define double @g(i32 %0, double %1) {
%3 = fmul double %1, %1
%4 = sitofp i32 %0 to double
%5 = fneg double %4
%6 = tail call double @llvm.fmuladd.f64(double %3, double %1, double %5)
ret double %6
}
void swap1(int *x, int *y) {
  int tmp = *x;
  *x = *y;
  *y = tmp;
}


x86 assembly (clang, -O0):
<swap1>:
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):
<swap1>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @swap1(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 @swap1(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
}
/* Variables and functions */
int INT_MIN;
int test1(int x) { return x ^ INT_MIN; }


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ed7(%rip),%rcx
xor    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
mov    %edi,%eax
mov    0x2edf(%rip),%rcx
xor    (%rcx),%eax
ret

LLVM IR (-O0):
@INT_MIN = global i32 0
define i32 @test1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @INT_MIN
%5 = xor i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
@INT_MIN = global i32 0
define i32 @test1(i32 %0) {
%2 = load i32, i32* @INT_MIN
%3 = xor i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void butler() { printf("You rang, sir?\n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"You rang, sir?\0A\00"
define void @butler() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"You rang, sir?\00"
define void @butler() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_09uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x09 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_09uint64_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, 9
%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_09uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 9
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
long cmp(long trg, int ignored) { return ~trg; }


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @cmp(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = xor i64 %5, -1
ret i64 %6
}

LLVM IR (-O2):
define i64 @cmp(i64 %0, i32 %1) {
%3 = xor i64 %0, -1
ret i64 %3
}
int is_valid_mbr_signature(const unsigned char *mbr) {
  return mbr[510] == 0x55 && mbr[511] == 0xaa ? 1 : 0;
}


x86 assembly (clang, -O0):
<is_valid_mbr_signature>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1fe(%rax),%ecx
xor    %eax,%eax
cmp    $0x55,%ecx
mov    %al,-0x9(%rbp)
jne    1137 <is_valid_mbr_signature+0x37>
mov    -0x8(%rbp),%rax
movzbl 0x1ff(%rax),%eax
cmp    $0xaa,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_mbr_signature>:
xor    %eax,%eax
cmpb   $0x55,0x1fe(%rdi)
jne    1117 <is_valid_mbr_signature+0x17>
xor    %eax,%eax
cmpb   $0xaa,0x1ff(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @is_valid_mbr_signature(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 510
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp eq i32 %6, 85
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 511
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = icmp eq i32 %12, 170
br label %14
14: ; preds = %8, %1
%15 = phi i1 [ false, %1 ], [ %13, %8 ]
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 1, i32 0
ret i32 %17
}

LLVM IR (-O2):
define i32 @is_valid_mbr_signature(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 510
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 85
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 511
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, -86
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %5, %1
%11 = phi i32 [ 0, %1 ], [ %9, %5 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ PutGeneric256Outline(int, int, unsigned char, unsigned char,
                                        unsigned char *, unsigned char);
void PutSpriteOutline(int x, int y, unsigned char *p, unsigned char shadow) {
  PutGeneric256Outline(x, y, *p, *(p + 1), p + 2, shadow);
}


x86 assembly (clang, -O0):
<PutSpriteOutline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%al
mov    -0x10(%rbp),%r8
add    $0x2,%r8
movzbl %cl,%edx
movzbl %al,%ecx
movzbl -0x11(%rbp),%r9d
call   1030 <PutGeneric256Outline@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PutSpriteOutline>:
mov    %ecx,%r9d
movzbl (%rdx),%eax
movzbl 0x1(%rdx),%ecx
lea    0x2(%rdx),%r8
mov    %eax,%edx
jmp    1030 <PutGeneric256Outline@plt>

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

LLVM IR (-O2):
define void @PutSpriteOutline(i32 %0, i32 %1, i8* %2, i8 zeroext %3) {
%5 = load i8, i8* %2
%6 = getelementptr inbounds i8, i8* %2, i64 1
%7 = load i8, i8* %6
%8 = getelementptr inbounds i8, i8* %2, i64 2
%9 = tail call i32 @PutGeneric256Outline(i32 %0, i32 %1, i8 zeroext %5, i8 zeroext %7, i8* %8, i8 zeroext %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_head_licence_lfmm();
int /*<<< orphan*/ printf(char *);
void print_head_lfmm() {
  print_head_licence_lfmm();
  printf("****                         LFMM Version 1.3                        "
         "           *****\n"
         "****           E. Frichot, S. Schoville, G. Bouchard, O. Francois    "
         "           *****\n"
         "****                         Please cite our paper !                 "
         "           *****\n"
         "****   Information at "
         "http://membres-timc.imag.fr/Olivier.Francois/lfmm/        *****\n\n");
}


x86 assembly (clang, -O0):
<print_head_lfmm>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <print_head_licence_lfmm@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_head_lfmm>:
push   %rax
xor    %eax,%eax
call   1040 <print_head_licence_lfmm@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [346 x i8] c"**** LFMM Version 1.3 *****\0A**** E. Frichot, S. Schoville, G. Bouchard, O. Francois *****\0A**** Please cite our paper ! *****\0A**** Information at http://membres-timc.imag.fr/Olivier.Francois/lfmm/ *****\0A\0A\00"
define void @print_head_lfmm() {
%1 = call i32 (...) @print_head_licence_lfmm()
%2 = call i32 @printf(i8* getelementptr inbounds ([346 x i8], [346 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [345 x i8] c"**** LFMM Version 1.3 *****\0A**** E. Frichot, S. Schoville, G. Bouchard, O. Francois *****\0A**** Please cite our paper ! *****\0A**** Information at http://membres-timc.imag.fr/Olivier.Francois/lfmm/ *****\0A\00"
define void @print_head_lfmm() {
%1 = tail call i32 (...) @print_head_licence_lfmm()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([345 x i8], [345 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xac() {
  Assert_real((isxdigit(172) == 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",
              865, ("isxdigit should be 0 for 0xac"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xac>:
push   %rax
mov    $0xac,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x361,%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 0xac\00"
define void @t_isxdigit_0xac() {
%1 = call i64 @isxdigit(i32 172)
%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 865, 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 0xac\00"
define void @t_isxdigit_0xac() {
%1 = tail call i64 @isxdigit(i32 172)
%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 865, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int,
                           char const *);
int /*<<< orphan*/ stderr;
void __dj_assert(const char *msg, const char *file, int line) {
  fprintf(stderr, "Assertion failed at %s line %d: %s\n", file, line, msg);
  abort();
}


x86 assembly (clang, -O0):
<__dj_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%r8
lea    0xeb2(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<__dj_assert>:
push   %rax
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%r8
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"Assertion failed at %s line %d: %s\0A\00"
define void @__dj_assert(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = load i8*, i8** %4
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9, i8* %10)
%12 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"Assertion failed at %s line %d: %s\0A\00"
define void @__dj_assert(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2, i8* %0)
%6 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef size_t uint64_t;

/* Variables and functions */
size_t lo(size_t, size_t);
uint64_t hi(uint64_t u, size_t nhi_bits, size_t ntotal_bits) {
  return lo(u, ntotal_bits) >> (ntotal_bits - nhi_bits);
}


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

x86 assembly (clang, -O2):
<hi>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdx,%rsi
call   1030 <lo@plt>
sub    %r14d,%ebx
mov    %ebx,%ecx
shr    %cl,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @hi(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = load i64, i64* %6
%9 = call i64 @lo(i64 %7, i64 %8)
%10 = load i64, i64* %6
%11 = load i64, i64* %5
%12 = sub i64 %10, %11
%13 = lshr i64 %9, %12
ret i64 %13
}

LLVM IR (-O2):
define i64 @hi(i64 %0, i64 %1, i64 %2) {
%4 = tail call i64 @lo(i64 %0, i64 %2)
%5 = sub i64 %2, %1
%6 = lshr i64 %4, %5
ret i64 %6
}
/* Type definitions */
typedef unsigned char uint32_t;

/* Variables and functions */
uint32_t get_uint32_be(unsigned char *buf) {
  return ((buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]);
}


x86 assembly (clang, -O0):
<get_uint32_be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_uint32_be>:
mov    0x3(%rdi),%al
ret

LLVM IR (-O0):
define zeroext i8 @get_uint32_be(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 24
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 16
%13 = or i32 %7, %12
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = or i32 %13, %18
%20 = load i8*, i8** %2
%21 = getelementptr inbounds i8, i8* %20, i64 3
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = or i32 %19, %23
%25 = trunc i32 %24 to i8
ret i8 %25
}

LLVM IR (-O2):
define zeroext i8 @get_uint32_be(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
ret i8 %3
}
/* Variables and functions */
int getint(char *, int);
int elegirNivel(int lvlMax) {
  int num;
  do {
    num = getint("~~~ Elegir nivel: ...(entre 1 y %d)... ", lvlMax);
  } while (num <= 0 || num > lvlMax);
  return num;
}


x86 assembly (clang, -O0):
<elegirNivel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <getint@plt>
mov    %eax,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jle    1148 <elegirNivel+0x38>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setg   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    111b <elegirNivel+0xb>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<elegirNivel>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <getint@plt>
test   %eax,%eax
jle    1120 <elegirNivel+0x10>
cmp    %ebx,%eax
jg     1120 <elegirNivel+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [40 x i8] c"~~~ Elegir nivel: ...(entre 1 y %d)... \00"
define i32 @elegirNivel(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %2
%6 = call i32 @getint(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %5)
store i32 %6, i32* %3
br label %7
7: ; preds = %4
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %7
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = icmp sgt i32 %11, %12
br label %14
14: ; preds = %10, %7
%15 = phi i1 [ true, %7 ], [ %13, %10 ]
br i1 %15, label %4, label %16
16: ; preds = %14
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@.str = [40 x i8] c"~~~ Elegir nivel: ...(entre 1 y %d)... \00"
define i32 @elegirNivel(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @getint(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = icmp slt i32 %3, 1
%5 = icmp sgt i32 %3, %0
%6 = or i1 %4, %5
br i1 %6, label %2, label %7
7: ; preds = %2
ret i32 %3
}
int test_imm_97uint16_mem(unsigned short *val) {
  return ((*val) & (0x97 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_97uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 151
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int cmock_expectcalls_never(int expectCalls, int called) { return (0x03); }


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

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

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

LLVM IR (-O2):
define i32 @cmock_expectcalls_never(i32 %0, i32 %1) {
ret i32 3
}