xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int fpu_control_t;

/* Variables and functions */
int FE_ALL_EXCEPT;
int /*<<< orphan*/ _FPU_GETCW(int);
int /*<<< orphan*/ _FPU_SETCW(int);
int feclearexcept(int excepts) {
  fpu_control_t cw;
  excepts &= FE_ALL_EXCEPT;
  _FPU_GETCW(cw);
  cw &= ~excepts;
  _FPU_SETCW(cw);
  return 0;
}


x86 assembly (clang, -O0):
<feclearexcept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <_FPU_GETCW@plt>
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <_FPU_SETCW@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<feclearexcept>:
push   %rax
call   1030 <_FPU_GETCW@plt>
xor    %edi,%edi
call   1040 <_FPU_SETCW@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@FE_ALL_EXCEPT = global i32 0
define i32 @feclearexcept(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @FE_ALL_EXCEPT
%5 = load i32, i32* %2
%6 = and i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @_FPU_GETCW(i32 %7)
%9 = load i32, i32* %2
%10 = xor i32 %9, -1
%11 = load i32, i32* %3
%12 = and i32 %11, %10
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = call i32 @_FPU_SETCW(i32 %13)
ret i32 0
}

LLVM IR (-O2):
@FE_ALL_EXCEPT = global i32 0
define i32 @feclearexcept(i32 %0) {
%2 = tail call i32 @_FPU_GETCW(i32 undef)
%3 = tail call i32 @_FPU_SETCW(i32 0)
ret i32 0
}
void genbgez_idle() {}


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

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

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

LLVM IR (-O2):
define void @genbgez_idle() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void rayyfree(void *ptr) { free((char *)ptr); }


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

x86 assembly (clang, -O2):
<rayyfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @rayyfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned int **, unsigned int **, unsigned int);
int lame(unsigned int size, unsigned int value) {
  unsigned int array1[4];
  unsigned int array2[6];
  array2[5] = value;
  memcpy(&array1, &array2, size * sizeof(unsigned int));
  return 1;
}


x86 assembly (clang, -O0):
<lame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x2c(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    -0x4(%rbp),%eax
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
mov    $0x1,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lame>:
sub    $0x38,%rsp
mov    %esi,0x14(%rsp)
lea    0x0(,%rdi,4),%edx
lea    0x20(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <memcpy@plt>
mov    $0x1,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
define i32 @lame(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [4 x i32]
%6 = alloca [6 x i32]
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = getelementptr inbounds [6 x i32], [6 x i32]* %6, i64 0, i64 5
store i32 %7, i32* %8
%9 = bitcast [4 x i32]* %5 to i32**
%10 = bitcast [6 x i32]* %6 to i32**
%11 = load i32, i32* %3
%12 = zext i32 %11 to i64
%13 = mul i64 %12, 4
%14 = trunc i64 %13 to i32
%15 = call i32 @memcpy(i32** %9, i32** %10, i32 %14)
ret i32 1
}

LLVM IR (-O2):
define i32 @lame(i32 %0, i32 %1) {
%3 = alloca [4 x i32]
%4 = alloca [6 x i32]
%5 = bitcast [4 x i32]* %3 to i8*
%6 = bitcast [6 x i32]* %4 to i8*
%7 = getelementptr inbounds [6 x i32], [6 x i32]* %4, i64 0, i64 5
store i32 %1, i32* %7
%8 = bitcast [4 x i32]* %3 to i32**
%9 = bitcast [6 x i32]* %4 to i32**
%10 = shl i32 %0, 2
%11 = call i32 @memcpy(i32** %8, i32** %9, i32 %10)
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct in_addr {
  int /*<<< orphan*/ s_addr;
};

/* Variables and functions */
int /*<<< orphan*/ inet_ntoa(struct in_addr);
int /*<<< orphan*/ strcpy(char *, int /*<<< orphan*/);
void int2ip(uint32_t ip, char *result) {
  struct in_addr a;
  a.s_addr = ip;
  strcpy(result, inet_ntoa(a));
}


x86 assembly (clang, -O0):
<int2ip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%edi
call   1040 <inet_ntoa@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int2ip>:
push   %rbx
mov    %rsi,%rbx
call   1040 <inet_ntoa@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
%struct.in_addr = type { i32 }
define void @int2ip(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %struct.in_addr
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %5, i32 0, i32 0
store i32 %6, i32* %7
%8 = load i8*, i8** %4
%9 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %5, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @inet_ntoa(i32 %10)
%12 = call i32 @strcpy(i8* %8, i32 %11)
ret void
}

LLVM IR (-O2):
define void @int2ip(i32 %0, i8* %1) {
%3 = tail call i32 @inet_ntoa(i32 %0)
%4 = tail call i32 @strcpy(i8* %1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(unsigned int);
void octave_sleep(unsigned int seconds) { sleep(seconds); }


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

x86 assembly (clang, -O2):
<octave_sleep>:
jmp    1030 <sleep@plt>

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

LLVM IR (-O2):
define void @octave_sleep(i32 %0) {
%2 = tail call i32 @sleep(i32 %0)
ret void
}
int GRFMEM(size, pointer)
int *size, *pointer;
{
  char *area = (char *)*pointer;
  free(area);
  return 1;
}


x86 assembly (clang, -O0):
<GRFMEM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GRFMEM>:
push   %rax
movslq (%rsi),%rdi
call   1030 <free@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @GRFMEM(i32* nocapture readnone %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
tail call void @free(i8* %5)
ret i32 1
}
void new_attach(struct VariantCallFormat *pvcf, char *buffer) {}


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

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

LLVM IR (-O0):
%struct.VariantCallFormat = type opaque
define void @new_attach(%struct.VariantCallFormat* %0, i8* %1) {
%3 = alloca %struct.VariantCallFormat*
%4 = alloca i8*
store %struct.VariantCallFormat* %0, %struct.VariantCallFormat** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.VariantCallFormat = type opaque
define void @new_attach(%struct.VariantCallFormat* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ thing_2();
int main() {
  thing_2();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @thing_2()
ret i32 0
}
/* Variables and functions */
float sqrt(int);
float Circ__easeOut(float t, float b, float c, float d, float p0, float p1) {
  return c * sqrt(1 - (t = t / d - 1) * t) + b;
}


x86 assembly (clang, -O0):
<Circ__easeOut>:
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  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
movss  0xeae(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm1,%xmm0
movss  0xe87(%rip),%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
call   1030 <sqrt@plt>
movaps %xmm0,%xmm2
movss  -0x1c(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Circ__easeOut>:
push   %rax
movss  %xmm2,(%rsp)
movss  %xmm1,0x4(%rsp)
divss  %xmm3,%xmm0
addss  0xed8(%rip),%xmm0
mulss  %xmm0,%xmm0
movss  0xed0(%rip),%xmm1
subss  %xmm0,%xmm1
cvttss2si %xmm1,%edi
call   1030 <sqrt@plt>
mulss  (%rsp),%xmm0
addss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @Circ__easeOut(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%13 = load float, float* %9
%14 = load float, float* %7
%15 = load float, float* %10
%16 = fdiv float %14, %15
%17 = fsub float %16, 1.000000e+00
store float %17, float* %7
%18 = load float, float* %7
%19 = fneg float %17
%20 = call float @llvm.fmuladd.f32(float %19, float %18, float 1.000000e+00)
%21 = fptosi float %20 to i32
%22 = call float @sqrt(i32 %21)
%23 = load float, float* %8
%24 = call float @llvm.fmuladd.f32(float %13, float %22, float %23)
ret float %24
}

LLVM IR (-O2):
define float @Circ__easeOut(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = fdiv float %0, %3
%8 = fadd float %7, -1.000000e+00
%9 = fneg float %8
%10 = tail call float @llvm.fmuladd.f32(float %9, float %8, float 1.000000e+00)
%11 = fptosi float %10 to i32
%12 = tail call float @sqrt(i32 %11)
%13 = tail call float @llvm.fmuladd.f32(float %2, float %12, float %1)
ret float %13
}
/* Variables and functions */
int /*<<< orphan*/ av_free_packet(void *);
void wrapped_packet_unref(void *param) { av_free_packet(param); }


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

x86 assembly (clang, -O2):
<wrapped_packet_unref>:
jmp    1030 <av_free_packet@plt>

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

LLVM IR (-O2):
define void @wrapped_packet_unref(i8* %0) {
%2 = tail call i32 @av_free_packet(i8* %0)
ret void
}
int nhm_offcore_num(void) { return (1); }


x86 assembly (clang, -O0):
<nhm_offcore_num>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @nhm_offcore_num() {
ret i32 1
}

LLVM IR (-O2):
define i32 @nhm_offcore_num() {
ret i32 1
}
/* Variables and functions */
int max(int, int);
int main() { return max(4, 23); }


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

x86 assembly (clang, -O2):
<main>:
mov    $0x4,%edi
mov    $0x17,%esi
jmp    1030 <max@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @max(i32 4, i32 23)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_head(int *head, int len) {
  for (int i = 0; i <= len; i++) {
    printf("%d, ", head[i]);
  }
  printf("\n");
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d, \00"
define void @print_head(i32* nocapture %0, i32 %1) {
%3 = icmp slt i32 %1, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = add nuw i32 %1, 1
%6 = zext i32 %5 to i64
br label %9
7: ; preds = %9, %2
%8 = tail call i32 @putchar(i32 10)
ret void
9: ; preds = %4, %9
%10 = phi i64 [ 0, %4 ], [ %14, %9 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = add nuw nsw i64 %10, 1
%15 = icmp eq i64 %14, %6
br i1 %15, label %7, label %9
}
void handler(int what) {
  printf("\n %s: \n", __func__);
  printf("We have received SIGALRM: Executing periodic work\n");
  alarm(5);
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    0xecf(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x5,%edi
mov    $0x0,%al
call   1040 <alarm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec9(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
xor    %eax,%eax
pop    %rcx
jmp    1050 <alarm@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"\0A %s: \0A\00"
@__func__.handler = [8 x i8] c"handler\00"
@.str.1 = [51 x i8] c"We have received SIGALRM: Executing periodic work\0A\00"
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.handler, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (i32, ...) bitcast (i32 (...)* @alarm to i32 (i32, ...)*)(i32 5)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\0A %s: \0A\00"
@__func__.handler = [8 x i8] c"handler\00"
@str = [50 x i8] c"We have received SIGALRM: Executing periodic work\00"
define void @handler(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.handler, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @alarm to i32 (i32, ...)*)(i32 5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ _exit(int);
scalar_t__ getgroups(int, int /*<<< orphan*/ *);
int setgroups(int, int /*<<< orphan*/ *);
int main() {
  short x[4];
  x[0] = x[1] = 0;
  if (getgroups(1, (gid_t *)x) == 0)
    if (setgroups(1, (gid_t *)x) == -1)
      _exit(1);
  _exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movw   $0x0,-0xa(%rbp)
movw   $0x0,-0xc(%rbp)
lea    -0xc(%rbp),%rsi
mov    $0x1,%edi
call   1050 <getgroups@plt>
cmp    $0x0,%rax
jne    1189 <main+0x59>
lea    -0xc(%rbp),%rsi
mov    $0x1,%edi
call   1040 <setgroups@plt>
cmp    $0xffffffff,%eax
jne    1184 <main+0x54>
mov    $0x1,%edi
call   1030 <_exit@plt>
jmp    1189 <main+0x59>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,(%rsp)
mov    %rsp,%rsi
mov    $0x1,%edi
call   1050 <getgroups@plt>
test   %rax,%rax
jne    1166 <main+0x36>
mov    %rsp,%rsi
mov    $0x1,%edi
call   1040 <setgroups@plt>
cmp    $0xffffffff,%eax
jne    1166 <main+0x36>
mov    $0x1,%edi
call   1030 <_exit@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i16]
store i32 0, i32* %1
%3 = getelementptr inbounds [4 x i16], [4 x i16]* %2, i64 0, i64 1
store i16 0, i16* %3
%4 = getelementptr inbounds [4 x i16], [4 x i16]* %2, i64 0, i64 0
store i16 0, i16* %4
%5 = getelementptr inbounds [4 x i16], [4 x i16]* %2, i64 0, i64 0
%6 = bitcast i16* %5 to i32*
%7 = call i64 @getgroups(i32 1, i32* %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %0
%10 = getelementptr inbounds [4 x i16], [4 x i16]* %2, i64 0, i64 0
%11 = bitcast i16* %10 to i32*
%12 = call i32 @setgroups(i32 1, i32* %11)
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = call i32 @_exit(i32 1)
unreachable
16: ; preds = %9
br label %17
17: ; preds = %16, %0
%18 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [4 x i16]
%2 = bitcast [4 x i16]* %1 to i8*
%3 = getelementptr inbounds [4 x i16], [4 x i16]* %1, i64 0, i64 1
store i16 0, i16* %3
%4 = getelementptr inbounds [4 x i16], [4 x i16]* %1, i64 0, i64 0
store i16 0, i16* %4
%5 = bitcast [4 x i16]* %1 to i32*
%6 = call i64 @getgroups(i32 1, i32* %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %0
%9 = call i32 @setgroups(i32 1, i32* %5)
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @_exit(i32 1)
unreachable
13: ; preds = %8, %0
%14 = call i32 @_exit(i32 0)
unreachable
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr1setBank0(int);
void m65setParamsB000(uint16_t addr, uint8_t val) {
  (void)addr;
  chr1setBank0(val << 10);
}


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

x86 assembly (clang, -O2):
mov    %esi,%edi
shl    $0xa,%edi
jmp    1030 <chr1setBank0@plt>

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

LLVM IR (-O2):
define void @m65setParamsB000(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = tail call i32 @chr1setBank0(i32 %3)
ret void
}
void ff_hevc_put_hevc_uni_qpel_h4_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_h4_12_sse4() {
ret void
}
/* Type definitions */
typedef char int32_t;

/* Variables and functions */
size_t int32PackSize(char *);
size_t int32Unpack(const char *buffer, size_t size, int32_t *data) {
  size_t req = int32PackSize(data);
  if (size >= req) {
    *data =
        (buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | (buffer[3]);
  }
  return req;
}


x86 assembly (clang, -O0):
<int32Unpack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <int32PackSize@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jb     1175 <int32Unpack+0x65>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x3(%rcx),%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int32Unpack>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rdx,%rdi
call   1030 <int32PackSize@plt>
cmp    %r15,%rax
ja     1131 <int32Unpack+0x21>
mov    0x3(%r14),%cl
mov    %cl,(%rbx)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @int32Unpack(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = call i64 @int32PackSize(i8* %8)
store i64 %9, i64* %7
%10 = load i64, i64* %5
%11 = load i64, i64* %7
%12 = icmp uge i64 %10, %11
br i1 %12, label %13, label %38
13: ; preds = %3
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = shl i32 %17, 24
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i64 1
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = shl i32 %22, 16
%24 = or i32 %18, %23
%25 = load i8*, i8** %4
%26 = getelementptr inbounds i8, i8* %25, i64 2
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = shl i32 %28, 8
%30 = or i32 %24, %29
%31 = load i8*, i8** %4
%32 = getelementptr inbounds i8, i8* %31, i64 3
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = or i32 %30, %34
%36 = trunc i32 %35 to i8
%37 = load i8*, i8** %6
store i8 %36, i8* %37
br label %38
38: ; preds = %13, %3
%39 = load i64, i64* %7
ret i64 %39
}

LLVM IR (-O2):
define i64 @int32Unpack(i8* nocapture %0, i64 %1, i8* %2) {
%4 = tail call i64 @int32PackSize(i8* %2)
%5 = icmp ugt i64 %4, %1
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %0, i64 3
%8 = load i8, i8* %7
store i8 %8, i8* %2
br label %9
9: ; preds = %6, %3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ setConfig();
int /*<<< orphan*/ writeDebugStreamLine(char *);
void our_pre_auto() {
  writeDebugStreamLine(
      "****** Starting Pre Auto Function **********************");
  setConfig();
  writeDebugStreamLine(
      "****** Completed Pre Auto Function **********************");
}


x86 assembly (clang, -O0):
<our_pre_auto>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <writeDebugStreamLine@plt>
mov    $0x0,%al
call   1030 <setConfig@plt>
lea    0xefb(%rip),%rdi
call   1040 <writeDebugStreamLine@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<our_pre_auto>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <writeDebugStreamLine@plt>
xor    %eax,%eax
call   1030 <setConfig@plt>
lea    0xefe(%rip),%rdi
pop    %rax
jmp    1040 <writeDebugStreamLine@plt>

LLVM IR (-O0):
@.str = [57 x i8] c"****** Starting Pre Auto Function **********************\00"
@.str.1 = [58 x i8] c"****** Completed Pre Auto Function **********************\00"
define void @our_pre_auto() {
%1 = call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @setConfig()
%3 = call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [57 x i8] c"****** Starting Pre Auto Function **********************\00"
@.str.1 = [58 x i8] c"****** Completed Pre Auto Function **********************\00"
define void @our_pre_auto() {
%1 = tail call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @setConfig()
%3 = tail call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int calc_pocket_count(int length, int pocket_length) {
  return ((length / pocket_length) + 1);
}


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

x86 assembly (clang, -O2):
<calc_pocket_count>:
mov    %edi,%eax
cltd
idiv   %esi
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @calc_pocket_count(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
%4 = add nsw i32 %3, 1
ret i32 %4
}
void mutex_lock(struct mutex *m) { (void)m; }


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

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

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

LLVM IR (-O2):
%struct.mutex = type opaque
define void @mutex_lock(%struct.mutex* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xb1() {
  Assert_real((isalnum(177) == 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_isalnum.c",
              890, ("isalnum should be 0 for 0xb1"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xb1\00"
define void @t_isalnum_0xb1() {
%1 = tail call i64 @isalnum(i32 177)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 890, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *allocationMalloc(size_t size, int no, int requested_alignment) {
  (void)no;
  (void)requested_alignment;
  return (malloc(size));
}


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

x86 assembly (clang, -O2):
<allocationMalloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @allocationMalloc(i64 %0, i32 %1, i32 %2) {
%4 = tail call i8* @malloc(i64 %0)
ret i8* %4
}
double dne(x, y)
double x, y;
{ return ((double)(x != y)); }


x86 assembly (clang, -O0):
<dne>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dne>:
cmpneqsd %xmm1,%xmm0
movsd  0xef3(%rip),%xmm1
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dne(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 = fcmp une double %5, %6
%8 = zext i1 %7 to i32
%9 = sitofp i32 %8 to double
ret double %9
}

LLVM IR (-O2):
define double @dne(double %0, double %1) {
%3 = fcmp une double %0, %1
%4 = uitofp i1 %3 to double
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ arm_memio_immdh_op();
int /*<<< orphan*/ arm_memio_ldrd(int /*<<< orphan*/);
void arm_ldrd_imm() { arm_memio_ldrd(arm_memio_immdh_op()); }


x86 assembly (clang, -O0):
<arm_ldrd_imm>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <arm_memio_immdh_op@plt>
mov    %eax,%edi
call   1040 <arm_memio_ldrd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<arm_ldrd_imm>:
push   %rax
xor    %eax,%eax
call   1030 <arm_memio_immdh_op@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <arm_memio_ldrd@plt>

LLVM IR (-O0):
define void @arm_ldrd_imm() {
%1 = call i32 (...) @arm_memio_immdh_op()
%2 = call i32 @arm_memio_ldrd(i32 %1)
ret void
}

LLVM IR (-O2):
define void @arm_ldrd_imm() {
%1 = tail call i32 (...) @arm_memio_immdh_op()
%2 = tail call i32 @arm_memio_ldrd(i32 %1)
ret void
}
/* Variables and functions */
int f(int *, int *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int p, q, r;
  r = f(&p, &q);
  printf("%d\n", r);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <f@plt>
lea    0xecb(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @f(i32* %1, i32* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef unsigned char int8_t;

/* Variables and functions */
unsigned char *deserialize_int8_t(unsigned char *buffer, int8_t *value) {
  *value = buffer[0];
  return buffer + 1;
}


x86 assembly (clang, -O0):
<deserialize_int8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<deserialize_int8_t>:
mov    (%rdi),%al
mov    %al,(%rsi)
lea    0x1(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @deserialize_int8_t(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 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = load i8*, i8** %4
store i8 %7, i8* %8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
ret i8* %10
}

LLVM IR (-O2):
define i8* @deserialize_int8_t(i8* %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
store i8 %3, i8* %1
%4 = getelementptr inbounds i8, i8* %0, i64 1
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ _unsupported();
void _Unwind_GetIPInfo() { _unsupported(); }


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

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

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

LLVM IR (-O2):
define void @_Unwind_GetIPInfo() {
%1 = tail call i32 (...) @_unsupported()
ret void
}
/* Variables and functions */
int core9_safe(char const *);
int U_EMRPIE_safe(const char *record) { return (core9_safe(record)); }


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

x86 assembly (clang, -O2):
<U_EMRPIE_safe>:
jmp    1030 <core9_safe@plt>

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

LLVM IR (-O2):
define i32 @U_EMRPIE_safe(i8* %0) {
%2 = tail call i32 @core9_safe(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void pass(char *test_name, char *message) {
  printf("%s pass: %s", test_name, message);
}


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

x86 assembly (clang, -O2):
<pass>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%s pass: %s\00"
define void @pass(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s pass: %s\00"
define void @pass(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fio_cli_end();
void fio_cli_end_promise(void *ignr_) {
  fio_cli_end();
  (void)ignr_;
}


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

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

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

LLVM IR (-O2):
define void @fio_cli_end_promise(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @fio_cli_end()
ret void
}
void ff_hevc_put_hevc_epel_h32_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_h32_8_avx2() {
ret void
}
void cthread_dtr(struct cthread *p) {}


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

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

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

LLVM IR (-O2):
%struct.cthread = type opaque
define void @cthread_dtr(%struct.cthread* nocapture %0) {
ret void
}
double dEpsilon(void) { return (double)(0.000001f); }


x86 assembly (clang, -O0):
<dEpsilon>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @dEpsilon() {
ret double 0x3EB0C6F7A0000000
}

LLVM IR (-O2):
define double @dEpsilon() {
ret double 0x3EB0C6F7A0000000
}
int get_highbit(unsigned char *a) {
  int i, j = 256;
  for (i = 7; i >= 0; i--) {
    if (a[0] & (j >>= 1))
      break;
  }
  return i;
}


x86 assembly (clang, -O0):
<get_highbit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x100,-0x10(%rbp)
movl   $0x7,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1153 <get_highbit+0x53>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%ecx
sar    $0x1,%ecx
mov    %ecx,-0x10(%rbp)
and    %ecx,%eax
cmp    $0x0,%eax
je     1140 <get_highbit+0x40>
jmp    1153 <get_highbit+0x53>
jmp    1145 <get_highbit+0x45>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <get_highbit+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_highbit>:
movzbl (%rdi),%ecx
mov    $0x7,%eax
test   $0x80,%cl
jne    1151 <get_highbit+0x51>
mov    $0x6,%eax
test   $0x40,%cl
jne    1151 <get_highbit+0x51>
mov    $0x5,%eax
test   $0x20,%cl
jne    1151 <get_highbit+0x51>
mov    $0x4,%eax
test   $0x10,%cl
jne    1151 <get_highbit+0x51>
mov    $0x3,%eax
test   $0x8,%cl
jne    1151 <get_highbit+0x51>
mov    $0x2,%eax
test   $0x4,%cl
jne    1151 <get_highbit+0x51>
mov    $0x1,%eax
test   $0x2,%cl
jne    1151 <get_highbit+0x51>
and    $0x1,%ecx
add    $0xffffffff,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @get_highbit(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 256, i32* %4
store i32 7, i32* %3
br label %5
5: ; preds = %19, %1
%6 = load i32, i32* %3
%7 = icmp sge i32 %6, 0
br i1 %7, label %8, label %22
8: ; preds = %5
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i32, i32* %4
%14 = ashr i32 %13, 1
store i32 %14, i32* %4
%15 = and i32 %12, %14
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %8
br label %22
18: ; preds = %8
br label %19
19: ; preds = %18
%20 = load i32, i32* %3
%21 = add nsw i32 %20, -1
store i32 %21, i32* %3
br label %5
22: ; preds = %17, %5
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @get_highbit(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = and i32 %3, 128
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %27
6: ; preds = %1
%7 = and i32 %3, 64
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %27
9: ; preds = %6
%10 = and i32 %3, 32
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %27
12: ; preds = %9
%13 = and i32 %3, 16
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %27
15: ; preds = %12
%16 = and i32 %3, 8
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %27
18: ; preds = %15
%19 = and i32 %3, 4
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %27
21: ; preds = %18
%22 = and i32 %3, 2
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %21
%25 = and i32 %3, 1
%26 = add nsw i32 %25, -1
br label %27
27: ; preds = %24, %21, %18, %15, %12, %9, %6, %1
%28 = phi i32 [ 7, %1 ], [ 6, %6 ], [ 5, %9 ], [ 4, %12 ], [ 3, %15 ], [ 2, %18 ], [ 1, %21 ], [ %26, %24 ]
ret i32 %28
}
void rop3_248_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D & S;
  stk1 = T | stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_248_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_248_1_0>:
mov    (%rdi),%al
xor    %dl,%al
and    %sil,%al
xor    %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_248_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = and i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = xor i32 %25, -1
%27 = and i32 %23, %26
%28 = load i8*, i8** %4
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = load i8, i8* %5
%32 = zext i8 %31 to i32
%33 = and i32 %30, %32
%34 = or i32 %27, %33
%35 = trunc i32 %34 to i8
%36 = load i8*, i8** %4
store i8 %35, i8* %36
ret void
}

LLVM IR (-O2):
define void @rop3_248_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %1
%6 = xor i8 %1, -1
%7 = and i8 %6, %2
%8 = or i8 %5, %7
store i8 %8, i8* %0
ret void
}
void gtk_notebook_set_scrollable() {}


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

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

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

LLVM IR (-O2):
define void @gtk_notebook_set_scrollable() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
scalar_t__ calloc(size_t, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int *new_vector_int(size_t size) {
  int *pRet = (int *)calloc(size, sizeof(int));
  if (!pRet) {
    perror("Out of memory when initializing int vector\n");
    exit(EXIT_FAILURE);
  }
  return pRet;
}


x86 assembly (clang, -O0):
<new_vector_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <new_vector_int+0x43>
lea    0xea0(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_vector_int>:
push   %rax
mov    $0x4,%esi
call   1030 <calloc@plt>
test   %rax,%rax
je     1142 <new_vector_int+0x12>
pop    %rcx
ret
lea    0xeb7(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"Out of memory when initializing int vector\0A\00"
@EXIT_FAILURE = global i32 0
define i32* @new_vector_int(i64 %0) {
%2 = alloca i64
%3 = alloca i32*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @calloc(i64 %4, i32 4)
%6 = inttoptr i64 %5 to i32*
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = icmp ne i32* %7, null
br i1 %8, label %13, label %9
9: ; preds = %1
%10 = call i32 @perror(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %1
%14 = load i32*, i32** %3
ret i32* %14
}

LLVM IR (-O2):
@.str = [44 x i8] c"Out of memory when initializing int vector\0A\00"
@EXIT_FAILURE = global i32 0
define i32* @new_vector_int(i64 %0) {
%2 = tail call i64 @calloc(i64 %0, i32 4)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
%9 = inttoptr i64 %2 to i32*
ret i32* %9
}
/* Variables and functions */
void sprintf();
void mock_sprintf() {
  void (*f)() = sprintf;
  f();
}


x86 assembly (clang, -O0):
<mock_sprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ed9(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @mock_sprintf() {
%1 = alloca void (...)*
store void (...)* @sprintf, void (...)** %1
%2 = load void (...)*, void (...)** %1
ret void
}

LLVM IR (-O2):
define void @mock_sprintf() {
tail call void (...) @sprintf()
ret void
}