xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fmopl_Init();
scalar_t__ fmopl_core_control();
void Main940(void) {
  fmopl_Init();
  while (fmopl_core_control()) {
  };
}


x86 assembly (clang, -O0):
<Main940>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <fmopl_Init@plt>
mov    $0x0,%al
call   1030 <fmopl_core_control@plt>
cmp    $0x0,%rax
je     1141 <Main940+0x21>
jmp    112b <Main940+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Main940>:
push   %rax
xor    %eax,%eax
call   1040 <fmopl_Init@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <fmopl_core_control@plt>
test   %rax,%rax
jne    1130 <Main940+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @Main940() {
%1 = call i32 (...) @fmopl_Init()
br label %2
2: ; preds = %5, %0
%3 = call i64 (...) @fmopl_core_control()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
br label %2
6: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @Main940() {
%1 = tail call i32 (...) @fmopl_Init()
br label %2
2: ; preds = %2, %0
%3 = tail call i64 (...) @fmopl_core_control()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %2
5: ; preds = %2
ret void
}
int equal_int(void *ip, void *jp) { return (*(int *)ip) == (*(int *)jp); }


x86 assembly (clang, -O0):
<equal_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal_int>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @equal_int(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = icmp eq i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @equal_int(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void btree_print_node(int key) { printf("%d ", key); }


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

x86 assembly (clang, -O2):
<btree_print_node>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @btree_print_node(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void *f4(void *a, int b) { return a - b; }


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
mov    %rdi,%rax
movslq %esi,%rcx
sub    %rcx,%rax
ret

LLVM IR (-O0):
define i8* @f4(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = sub i64 0, %7
%9 = getelementptr i8, i8* %5, i64 %8
ret i8* %9
}

LLVM IR (-O2):
define i8* @f4(i8* readnone %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = sub nsw i64 0, %3
%5 = getelementptr i8, i8* %0, i64 %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, float const *, int);
void mlMatrixCopy(const float *a, float *result) {
  memcpy(result, a, 16 * sizeof(float));
}


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

x86 assembly (clang, -O2):
<mlMatrixCopy>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0x40,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @mlMatrixCopy(float* %0, float* %1) {
%3 = tail call i32 @memcpy(float* %1, float* %0, i32 64)
ret void
}
void RTMemEfTmpAllocZNP(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemEfTmpAllocZNP() {
ret void
}
/* Variables and functions */
int unsetenv(char const *);
__attribute__((__weak__, __always___)) int
softboundcets_unsetenv(const char *name) {
  return unsetenv(name);
}


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

x86 assembly (clang, -O2):
<softboundcets_unsetenv>:
jmp    1030 <unsetenv@plt>

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

LLVM IR (-O2):
define weak i32 @softboundcets_unsetenv(i8* %0) {
%2 = tail call i32 @unsetenv(i8* %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ pow(float const, int);
float sqrt(scalar_t__);
float math_distance_2d(const float x0, const float y0, const float x1,
                       const float y1) {
  return sqrt(pow(x0 - x1, 2) + pow(y0 - y1, 2));
}


x86 assembly (clang, -O0):
<math_distance_2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %rax,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
call   1040 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_distance_2d>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm3,0xc(%rsp)
movss  %xmm1,0x8(%rsp)
subss  %xmm2,%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %rax,%rbx
movss  0x8(%rsp),%xmm0
subss  0xc(%rsp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define float @math_distance_2d(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %7
%11 = fsub float %9, %10
%12 = call i64 @pow(float %11, i32 2)
%13 = load float, float* %6
%14 = load float, float* %8
%15 = fsub float %13, %14
%16 = call i64 @pow(float %15, i32 2)
%17 = add nsw i64 %12, %16
%18 = call float @sqrt(i64 %17)
ret float %18
}

LLVM IR (-O2):
define float @math_distance_2d(float %0, float %1, float %2, float %3) {
%5 = fsub float %0, %2
%6 = tail call i64 @pow(float %5, i32 2)
%7 = fsub float %1, %3
%8 = tail call i64 @pow(float %7, i32 2)
%9 = add nsw i64 %8, %6
%10 = tail call float @sqrt(i64 %9)
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ RotShift_instr(int /*<<< orphan*/);
void RLC(void) { RotShift_instr(0); }


x86 assembly (clang, -O0):
<RLC>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <RotShift_instr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RLC>:
xor    %edi,%edi
jmp    1030 <RotShift_instr@plt>

LLVM IR (-O0):
define void @RLC() {
%1 = call i32 @RotShift_instr(i32 0)
ret void
}

LLVM IR (-O2):
define void @RLC() {
%1 = tail call i32 @RotShift_instr(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ KeyExpansionStdcall(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/ *,
                                       int /*<<< orphan*/ *);
void Vale_AES_keyExpansion(uint8_t *k, uint8_t *w, uint8_t *sb) {
  KeyExpansionStdcall(k, w, sb);
}


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

x86 assembly (clang, -O2):
<Vale_AES_keyExpansion>:
jmp    1030 <KeyExpansionStdcall@plt>

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

LLVM IR (-O2):
define void @Vale_AES_keyExpansion(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @KeyExpansionStdcall(i32* %0, i32* %1, i32* %2)
ret void
}
int main() {
  int __BLAST_NONDET;
  int s;
  int a;
  int b;
  s = __BLAST_NONDET;
  a = __BLAST_NONDET;
  b = __BLAST_NONDET;
  if (s == a) {
    if (b == 1) {
      b = 0;
    } else {
      goto _L;
    }
  } else {
  _L:;
    a--;
  }
ERROR:
  return (-1073741823);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1149 <main+0x49>
cmpl   $0x1,-0x14(%rbp)
jne    113f <main+0x3f>
movl   $0x0,-0x14(%rbp)
jmp    1144 <main+0x44>
jmp    114e <main+0x4e>
jmp    1157 <main+0x57>
jmp    114e <main+0x4e>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    115c <main+0x5c>
mov    $0xc0000001,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 -1073741823
}
void log_exit_platform(void) {}


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

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

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

LLVM IR (-O2):
define void @log_exit_platform() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gmx_sham(int, char **);
int main(int argc, char *argv[]) {
  gmx_sham(argc, argv);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_sham(i32 %0, i8** %1)
ret i32 0
}
int test_imm_5Buint16_mem(unsigned short *val) {
  return ((*val) & (-0x5B << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_5Buint16_mem>:
movzwl (%rdi),%eax
test   $0xffa5,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_5Buint16_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, -91
%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_5Buint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -91
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int ft_recursive_factorial(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int result;
  result = ft_recursive_factorial(5);
  printf("The factorial is %d\n", result);
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <ft_recursive_factorial@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [21 x i8] c"The factorial is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @ft_recursive_factorial(i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int foo1_LTX_hello() {
  printf("** This is foolib 1 **\n");
  return 0xe110;
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"** This is foolib 1 **\0A\00"
define i32 @foo1_LTX_hello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 57616
}

LLVM IR (-O2):
@str = [23 x i8] c"** This is foolib 1 **\00"
define i32 @foo1_LTX_hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 57616
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int, int);
void exitfunc10(int status, void *arg) {
  printf("Executing exitfunc10 (status=%d, arg=%d)\n", status, (int)arg);
  exit((int)arg);
}


x86 assembly (clang, -O0):
<exitfunc10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    %eax,%edx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [42 x i8] c"Executing exitfunc10 (status=%d, arg=%d)\0A\00"
define void @exitfunc10(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = ptrtoint i8* %6 to i32
%8 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
%9 = load i8*, i8** %4
%10 = ptrtoint i8* %9 to i32
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@.str = [42 x i8] c"Executing exitfunc10 (status=%d, arg=%d)\0A\00"
define void @exitfunc10(i32 %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %4)
%6 = tail call i32 @exit(i32 %4)
unreachable
}
void XcmsClientWhitePointOfCCC() {}


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

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

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

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

/* Variables and functions */
struct lobject *lobject_set_attr(struct lemon *, struct lobject *,
                                 struct lobject *, struct lobject *);
struct lobject *lobject_get_default_set_attr(struct lemon *lemon,
                                             struct lobject *self, int argc,
                                             struct lobject *argv[]) {
  return lobject_set_attr(lemon, self, argv[0], argv[1]);
}


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

x86 assembly (clang, -O2):
<lobject_get_default_set_attr>:
mov    (%rcx),%rdx
mov    0x8(%rcx),%rcx
jmp    1030 <lobject_set_attr@plt>

LLVM IR (-O0):
%struct.lemon = type { i32 }
%struct.lobject = type { i32 }
define %struct.lobject* @lobject_get_default_set_attr(%struct.lemon* %0, %struct.lobject* %1, i32 %2, %struct.lobject** %3) {
%5 = alloca %struct.lemon*
%6 = alloca %struct.lobject*
%7 = alloca i32
%8 = alloca %struct.lobject**
store %struct.lemon* %0, %struct.lemon** %5
store %struct.lobject* %1, %struct.lobject** %6
store i32 %2, i32* %7
store %struct.lobject** %3, %struct.lobject*** %8
%9 = load %struct.lemon*, %struct.lemon** %5
%10 = load %struct.lobject*, %struct.lobject** %6
%11 = load %struct.lobject**, %struct.lobject*** %8
%12 = getelementptr inbounds %struct.lobject*, %struct.lobject** %11, i64 0
%13 = load %struct.lobject*, %struct.lobject** %12
%14 = load %struct.lobject**, %struct.lobject*** %8
%15 = getelementptr inbounds %struct.lobject*, %struct.lobject** %14, i64 1
%16 = load %struct.lobject*, %struct.lobject** %15
%17 = call %struct.lobject* @lobject_set_attr(%struct.lemon* %9, %struct.lobject* %10, %struct.lobject* %13, %struct.lobject* %16)
ret %struct.lobject* %17
}

LLVM IR (-O2):
%struct.lemon = type { i32 }
%struct.lobject = type { i32 }
define %struct.lobject* @lobject_get_default_set_attr(%struct.lemon* %0, %struct.lobject* %1, i32 %2, %struct.lobject** nocapture %3) {
%5 = load %struct.lobject*, %struct.lobject** %3
%6 = getelementptr inbounds %struct.lobject*, %struct.lobject** %3, i64 1
%7 = load %struct.lobject*, %struct.lobject** %6
%8 = tail call %struct.lobject* @lobject_set_attr(%struct.lemon* %0, %struct.lobject* %1, %struct.lobject* %5, %struct.lobject* %7)
ret %struct.lobject* %8
}
/* Variables and functions */
int /*<<< orphan*/ failure(char *, int);
void postf(char *uri, int socketfd) {
  failure("405 POST not implemented", socketfd);
}


x86 assembly (clang, -O0):
<postf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <failure@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [25 x i8] c"405 POST not implemented\00"
define void @postf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @failure(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"405 POST not implemented\00"
define void @postf(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @failure(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void usage(FILE *stream, int exit_code) {
  fprintf(stream, "Usage: easter [general options] [-hjy] [year] ...\n"
                  "General options: [-31] [-A years] [-B years]\n");
  exit(exit_code);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rcx
lea    0xed3(%rip),%rdi
mov    $0x5f,%esi
mov    $0x1,%edx
call   1040 <fwrite@plt>
mov    %ebx,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@.str = [96 x i8] c"Usage: easter [general options] [-hjy] [year] ...\0AGeneral options: [-31] [-A years] [-B years]\0A\00"
define void @usage(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 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %4
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@.str = [96 x i8] c"Usage: easter [general options] [-hjy] [year] ...\0AGeneral options: [-31] [-A years] [-B years]\0A\00"
define void @usage(i32* nocapture %0, i32 %1) {
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0), i64 95, i64 1, i32* %0)
%4 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
unsigned int NSIG;
scalar_t__ *sys_siglist;
char *strsignal(int sig) {
  if ((unsigned)sig < NSIG)
    return (char *)sys_siglist[sig];
  else
    return "Invalid signal number";
}


x86 assembly (clang, -O0):
<strsignal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2ec7(%rip),%rcx
cmp    (%rcx),%eax
jae    1134 <strsignal+0x34>
mov    0x2ec8(%rip),%rax
mov    (%rax),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x8(%rbp)
jmp    113f <strsignal+0x3f>
lea    0xec5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsignal>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jbe    111d <strsignal+0x1d>
mov    0x2ed6(%rip),%rax
mov    (%rax),%rax
movslq %edi,%rcx
mov    (%rax,%rcx,8),%rax
ret
lea    0xedc(%rip),%rax
ret

LLVM IR (-O0):
@NSIG = global i32 0
@sys_siglist = global i64* null
@.str = [22 x i8] c"Invalid signal number\00"
define i8* @strsignal(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* @NSIG
%6 = icmp ult i32 %4, %5
br i1 %6, label %7, label %14
7: ; preds = %1
%8 = load i64*, i64** @sys_siglist
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i64, i64* %8, i64 %10
%12 = load i64, i64* %11
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %2
br label %15
14: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8** %2
br label %15
15: ; preds = %14, %7
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
@NSIG = global i32 0
@sys_siglist = global i64* null
@.str = [22 x i8] c"Invalid signal number\00"
define i8* @strsignal(i32 %0) {
%2 = load i32, i32* @NSIG
%3 = icmp ugt i32 %2, %0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = load i64*, i64** @sys_siglist
%6 = sext i32 %0 to i64
%7 = getelementptr inbounds i64, i64* %5, i64 %6
%8 = load i64, i64* %7
%9 = inttoptr i64 %8 to i8*
br label %10
10: ; preds = %1, %4
%11 = phi i8* [ %9, %4 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ add_c_string_escaped_char(char, char **, char *);
void c_escape_char_for_string_literal(char ch, char buffer[5]) {
  char *buffer_end = buffer + sizeof(char[5]) - sizeof(char);
  add_c_string_escaped_char(ch, &buffer, buffer_end);
  *buffer = '\0';
}


x86 assembly (clang, -O0):
<c_escape_char_for_string_literal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x5,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x1(%rbp),%al
mov    -0x18(%rbp),%rdx
lea    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1030 <add_c_string_escaped_char@plt>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_escape_char_for_string_literal>:
push   %rax
mov    %rsi,(%rsp)
lea    0x4(%rsi),%rdx
mov    %rsp,%rsi
call   1030 <add_c_string_escaped_char@plt>
mov    (%rsp),%rax
movb   $0x0,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @c_escape_char_for_string_literal(i8 signext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = getelementptr inbounds i8, i8* %6, i64 5
%8 = getelementptr inbounds i8, i8* %7, i64 -1
store i8* %8, i8** %5
%9 = load i8, i8* %3
%10 = load i8*, i8** %5
%11 = call i32 @add_c_string_escaped_char(i8 signext %9, i8** %4, i8* %10)
%12 = load i8*, i8** %4
store i8 0, i8* %12
ret void
}

LLVM IR (-O2):
define void @c_escape_char_for_string_literal(i8 signext %0, i8* %1) {
%3 = alloca i8*
store i8* %1, i8** %3
%4 = getelementptr inbounds i8, i8* %1, i64 4
%5 = call i32 @add_c_string_escaped_char(i8 signext %0, i8** %3, i8* %4)
%6 = load i8*, i8** %3
store i8 0, i8* %6
ret void
}
void RTDbgModSegmentByIndex(void) {}


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

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

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

LLVM IR (-O2):
define void @RTDbgModSegmentByIndex() {
ret void
}
long long min(long long x, long long y) {
  if (x == -1 && y == -1)
    return 0;
  if (x == -1)
    return y;
  if (y == -1)
    return x;
  return x > y ? y : x;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0xffffffffffffffff,-0x10(%rbp)
jne    112f <min+0x2f>
cmpq   $0xffffffffffffffff,-0x18(%rbp)
jne    112f <min+0x2f>
movq   $0x0,-0x8(%rbp)
jmp    118a <min+0x8a>
cmpq   $0xffffffffffffffff,-0x10(%rbp)
jne    1147 <min+0x47>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    118a <min+0x8a>
cmpq   $0xffffffffffffffff,-0x18(%rbp)
jne    115f <min+0x5f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    118a <min+0x8a>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    117a <min+0x7a>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1182 <min+0x82>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %rsi,%rax
and    %rdi,%rax
cmp    $0xffffffffffffffff,%rax
je     112a <min+0x2a>
mov    %rdi,%rax
cmp    $0xffffffffffffffff,%rdi
cmove  %rsi,%rax
je     1129 <min+0x29>
cmp    $0xffffffffffffffff,%rsi
je     1129 <min+0x29>
cmp    %rsi,%rdi
cmovg  %rsi,%rdi
mov    %rdi,%rax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @min(i64 %0, i64 %1) {
%3 = and i64 %1, %0
%4 = icmp eq i64 %3, -1
br i1 %4, label %13, label %5
5: ; preds = %2
%6 = icmp eq i64 %1, -1
%7 = icmp eq i64 %0, -1
%8 = or i1 %7, %6
%9 = select i1 %7, i64 %1, i64 %0
br i1 %8, label %13, label %10
10: ; preds = %5
%11 = icmp sgt i64 %0, %1
%12 = select i1 %11, i64 %1, i64 %0
br label %13
13: ; preds = %5, %2, %10
%14 = phi i64 [ %12, %10 ], [ 0, %2 ], [ %9, %5 ]
ret i64 %14
}
__attribute__((no)) int foo(unsigned long long x) {
  unsigned long long y = (x >> 31ULL) & 1ULL;
  if (y == 0ULL)
    return 0;
  return -1;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x1f,%rax
and    $0x1,%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    112f <foo+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1136 <foo+0x36>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movslq %edi,%rax
shr    $0x1f,%rax
ret

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

LLVM IR (-O2):
define i32 @foo(i64 %0) {
%2 = shl i64 %0, 32
%3 = ashr i64 %2, 63
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xce() {
  Assert_real((isxdigit(206) == 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",
              1035, ("isxdigit should be 0 for 0xce"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xce>:
push   %rax
mov    $0xce,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x40b,%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 0xce\00"
define void @t_isxdigit_0xce() {
%1 = call i64 @isxdigit(i32 206)
%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 1035, 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 0xce\00"
define void @t_isxdigit_0xce() {
%1 = tail call i64 @isxdigit(i32 206)
%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 1035, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
double calcIntercetta(double *x1, double *y1, double *x2, double *y2) {
  double q;
  q = (((*x1) * (*y2)) - ((*x2) * (*y1))) / ((*x1) - (*x2));
  return q;
}


x86 assembly (clang, -O0):
<calcIntercetta>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  (%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcIntercetta>:
movsd  (%rdi),%xmm1
movsd  (%rdx),%xmm2
movsd  (%rsi),%xmm3
mulsd  %xmm2,%xmm3
movsd  (%rcx),%xmm0
mulsd  %xmm1,%xmm0
subsd  %xmm3,%xmm0
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @calcIntercetta(double* %0, double* %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%10 = load double*, double** %5
%11 = load double, double* %10
%12 = load double*, double** %8
%13 = load double, double* %12
%14 = load double*, double** %7
%15 = load double, double* %14
%16 = load double*, double** %6
%17 = load double, double* %16
%18 = fmul double %15, %17
%19 = fneg double %18
%20 = call double @llvm.fmuladd.f64(double %11, double %13, double %19)
%21 = load double*, double** %5
%22 = load double, double* %21
%23 = load double*, double** %7
%24 = load double, double* %23
%25 = fsub double %22, %24
%26 = fdiv double %20, %25
store double %26, double* %9
%27 = load double, double* %9
ret double %27
}

LLVM IR (-O2):
define double @calcIntercetta(double* nocapture %0, double* nocapture %1, double* nocapture %2, double* nocapture %3) {
%5 = load double, double* %0
%6 = load double, double* %3
%7 = load double, double* %2
%8 = load double, double* %1
%9 = fneg double %7
%10 = fmul double %8, %9
%11 = tail call double @llvm.fmuladd.f64(double %5, double %6, double %10)
%12 = fsub double %5, %7
%13 = fdiv double %11, %12
ret double %13
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void write_bits(int, unsigned int, int /*<<< orphan*/ *);
void a2_write_9bit(unsigned int c, FILE *out) { return write_bits(9, c, out); }


x86 assembly (clang, -O0):
<a2_write_9bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    $0x9,%edi
call   1030 <write_bits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a2_write_9bit>:
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x9,%edi
jmp    1030 <write_bits@plt>

LLVM IR (-O0):
define void @a2_write_9bit(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
ret void
}

LLVM IR (-O2):
define void @a2_write_9bit(i32 %0, i32* %1) {
tail call void @write_bits(i32 9, i32 %0, i32* %1)
ret void
}
adr0adrreg1_set(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{ (*((short *)10000000)) = (p1[1111111 / 4]); }


x86 assembly (clang, -O0):
<adr0adrreg1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    0x87a22(%rax),%cx
mov    $0x989680,%eax
mov    %cx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adr0adrreg1_set>:
movzwl 0x87a22(%r9),%eax
mov    %ax,0x989680
ret

LLVM IR (-O0):
define i32 @adr0adrreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16*, i16** %13
%17 = getelementptr inbounds i16, i16* %16, i64 277777
%18 = load i16, i16* %17
store i16 %18, i16* inttoptr (i64 10000000 to i16*)
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @adr0adrreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture %5) {
%7 = getelementptr inbounds i16, i16* %5, i64 277777
%8 = load i16, i16* %7
store i16 %8, i16* inttoptr (i64 10000000 to i16*)
ret i32 undef
}
/* Variables and functions */
scalar_t__ _test_malloc(int, char *, int);
void leak_memory() {
  int *const temporary = (int *)_test_malloc(
      sizeof(int),
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/fsaintjacques/cmockery/refs/heads/master/"
      "examples/allocate_module.c",
      28);
  *temporary = 0;
}


x86 assembly (clang, -O0):
<leak_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
lea    0xedc(%rip),%rsi
mov    $0x1c,%edx
call   1030 <_test_malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leak_memory>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x4,%edi
mov    $0x1c,%edx
call   1030 <_test_malloc@plt>
movl   $0x0,(%rax)
pop    %rax
ret

LLVM IR (-O0):
@.str = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fsaintjacques/cmockery/refs/heads/master/examples/allocate_module.c\00"
define void @leak_memory() {
%1 = alloca i32*
%2 = call i64 @_test_malloc(i32 4, i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str, i64 0, i64 0), i32 28)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
store i32 0, i32* %4
ret void
}

LLVM IR (-O2):
@.str = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fsaintjacques/cmockery/refs/heads/master/examples/allocate_module.c\00"
define void @leak_memory() {
%1 = tail call i64 @_test_malloc(i32 4, i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str, i64 0, i64 0), i32 28)
%2 = inttoptr i64 %1 to i32*
store i32 0, i32* %2
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ *display;
};
struct TYPE_4__ {
  TYPE_1__ xconfigurerequest;
};
typedef TYPE_2__ XEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XEvent_xconfigurerequest_display(void *_p, void *_v) {
  ((XEvent *)_p)->xconfigurerequest.display = (Display *)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32* }
define void @set_XEvent_xconfigurerequest_display(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_4__*
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %9, i32 0, i32 0
store i32* %6, i32** %10
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xconfigurerequest_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ apbuart_test(int);
int /*<<< orphan*/ gptimer_test(int, int);
int /*<<< orphan*/ irqtest(int);
int /*<<< orphan*/ leon3_test(int, int, int /*<<< orphan*/);
base_test() {
  leon3_test(1, 0x80000200, 0);
  irqtest(0x80000200);
  gptimer_test(0x80000300, 8);
  apbuart_test(0x80000100);
}


x86 assembly (clang, -O0):
<base_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
mov    $0x80000200,%esi
xor    %edx,%edx
call   1040 <leon3_test@plt>
mov    $0x80000200,%edi
call   1050 <irqtest@plt>
mov    $0x80000300,%edi
mov    $0x8,%esi
call   1030 <gptimer_test@plt>
mov    $0x80000100,%edi
call   1060 <apbuart_test@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<base_test>:
push   %rax
mov    $0x1,%edi
mov    $0x80000200,%esi
xor    %edx,%edx
call   1040 <leon3_test@plt>
mov    $0x80000200,%edi
call   1050 <irqtest@plt>
mov    $0x80000300,%edi
mov    $0x8,%esi
call   1030 <gptimer_test@plt>
mov    $0x80000100,%edi
pop    %rax
jmp    1060 <apbuart_test@plt>

LLVM IR (-O0):
define i32 @base_test() {
%1 = alloca i32
%2 = call i32 @leon3_test(i32 1, i32 -2147483136, i32 0)
%3 = call i32 @irqtest(i32 -2147483136)
%4 = call i32 @gptimer_test(i32 -2147482880, i32 8)
%5 = call i32 @apbuart_test(i32 -2147483392)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @base_test() {
%1 = tail call i32 @leon3_test(i32 1, i32 -2147483136, i32 0)
%2 = tail call i32 @irqtest(i32 -2147483136)
%3 = tail call i32 @gptimer_test(i32 -2147482880, i32 8)
%4 = tail call i32 @apbuart_test(i32 -2147483392)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void label_printDouble(void *e) {
  double *d = e;
  printf("%f", *d);
}


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

x86 assembly (clang, -O2):
<label_printDouble>:
movsd  (%rdi),%xmm0
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define void @label_printDouble(i8* %0) {
%2 = alloca i8*
%3 = alloca double*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to double*
store double* %5, double** %3
%6 = load double*, double** %3
%7 = load double, double* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %7)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define void @label_printDouble(i8* nocapture %0) {
%2 = bitcast i8* %0 to double*
%3 = load double, double* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %3)
ret void
}
/* Type definitions */
struct AMCStaticBinSearchTree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _lock_Write_STree(struct AMCStaticBinSearchTree *);
int _sTree_Delete(struct AMCStaticBinSearchTree *, unsigned long);
int /*<<< orphan*/ _unlock_Write_STree(struct AMCStaticBinSearchTree *);
int AMCStaticBsTree_Delete(struct AMCStaticBinSearchTree *tree,
                           unsigned long id) {
  int ret;
  _lock_Write_STree(tree);
  ret = _sTree_Delete(tree, id);
  _unlock_Write_STree(tree);
  return ret;
}


x86 assembly (clang, -O0):
<AMCStaticBsTree_Delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <_lock_Write_STree@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <_sTree_Delete@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_unlock_Write_STree@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AMCStaticBsTree_Delete>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <_lock_Write_STree@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <_sTree_Delete@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <_unlock_Write_STree@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.AMCStaticBinSearchTree = type { i32 }
define i32 @AMCStaticBsTree_Delete(%struct.AMCStaticBinSearchTree* %0, i64 %1) {
%3 = alloca %struct.AMCStaticBinSearchTree*
%4 = alloca i64
%5 = alloca i32
store %struct.AMCStaticBinSearchTree* %0, %struct.AMCStaticBinSearchTree** %3
store i64 %1, i64* %4
%6 = load %struct.AMCStaticBinSearchTree*, %struct.AMCStaticBinSearchTree** %3
%7 = call i32 @_lock_Write_STree(%struct.AMCStaticBinSearchTree* %6)
%8 = load %struct.AMCStaticBinSearchTree*, %struct.AMCStaticBinSearchTree** %3
%9 = load i64, i64* %4
%10 = call i32 @_sTree_Delete(%struct.AMCStaticBinSearchTree* %8, i64 %9)
store i32 %10, i32* %5
%11 = load %struct.AMCStaticBinSearchTree*, %struct.AMCStaticBinSearchTree** %3
%12 = call i32 @_unlock_Write_STree(%struct.AMCStaticBinSearchTree* %11)
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
%struct.AMCStaticBinSearchTree = type { i32 }
define i32 @AMCStaticBsTree_Delete(%struct.AMCStaticBinSearchTree* %0, i64 %1) {
%3 = tail call i32 @_lock_Write_STree(%struct.AMCStaticBinSearchTree* %0)
%4 = tail call i32 @_sTree_Delete(%struct.AMCStaticBinSearchTree* %0, i64 %1)
%5 = tail call i32 @_unlock_Write_STree(%struct.AMCStaticBinSearchTree* %0)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ z_streamp;

/* Variables and functions */
int inflateReset(int /*<<< orphan*/);
__attribute__((__visibility__("default"))) int
kz_inflate_reset(z_streamp strm) {
  return inflateReset(strm);
}


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

x86 assembly (clang, -O2):
<kz_inflate_reset>:
jmp    1030 <inflateReset@plt>

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

LLVM IR (-O2):
define i32 @kz_inflate_reset(i32 %0) {
%2 = tail call i32 @inflateReset(i32 %0)
ret i32 %2
}
int test_imm_A3uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xA3 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_A3uint64_highword_reg>:
movabs $0xa300000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A3uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 163
%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_A3uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 700079669248
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}