xunge/DecIR huggingface dataset:
void foo186() {}


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

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

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

LLVM IR (-O2):
define void @foo186() {
ret void
}
void foo() {
  float f;
  for (f = 0.0; f < 101.0f; f += 1.0f) {
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xeec(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    113a <foo+0x3a>
jmp    1123 <foo+0x23>
movss  0xed9(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    110c <foo+0xc>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca float
store float 0.000000e+00, float* %1
br label %2
2: ; preds = %6, %0
%3 = load float, float* %1
%4 = fcmp olt float %3, 1.010000e+02
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load float, float* %1
%8 = fadd float %7, 1.000000e+00
store float %8, float* %1
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
signed int writepng(char *name, signed int xres, signed int yres,
                    unsigned char *imgdata) {
  return 2;
}


x86 assembly (clang, -O0):
<writepng>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    $0x2,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @writepng(i8* nocapture readnone %0, i32 %1, i32 %2, i8* nocapture readnone %3) {
ret i32 2
}
/* Type definitions */
struct Param {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ barrier(int);
int /*<<< orphan*/ eval_A_times_u(struct Param *);
int /*<<< orphan*/ eval_At_times_u(struct Param *);
void eval_AtA_times_u(struct Param *p, int threads) {
  eval_A_times_u(p);
  barrier(threads);
  eval_At_times_u(p);
  barrier(threads);
}


x86 assembly (clang, -O0):
<eval_AtA_times_u>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <eval_A_times_u@plt>
mov    -0xc(%rbp),%edi
call   1030 <barrier@plt>
mov    -0x8(%rbp),%rdi
call   1040 <eval_At_times_u@plt>
mov    -0xc(%rbp),%edi
call   1030 <barrier@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_AtA_times_u>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1050 <eval_A_times_u@plt>
mov    %ebp,%edi
call   1030 <barrier@plt>
mov    %rbx,%rdi
call   1040 <eval_At_times_u@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <barrier@plt>

LLVM IR (-O0):
%struct.Param = type { i32 }
define void @eval_AtA_times_u(%struct.Param* %0, i32 %1) {
%3 = alloca %struct.Param*
%4 = alloca i32
store %struct.Param* %0, %struct.Param** %3
store i32 %1, i32* %4
%5 = load %struct.Param*, %struct.Param** %3
%6 = call i32 @eval_A_times_u(%struct.Param* %5)
%7 = load i32, i32* %4
%8 = call i32 @barrier(i32 %7)
%9 = load %struct.Param*, %struct.Param** %3
%10 = call i32 @eval_At_times_u(%struct.Param* %9)
%11 = load i32, i32* %4
%12 = call i32 @barrier(i32 %11)
ret void
}

LLVM IR (-O2):
%struct.Param = type { i32 }
define void @eval_AtA_times_u(%struct.Param* %0, i32 %1) {
%3 = tail call i32 @eval_A_times_u(%struct.Param* %0)
%4 = tail call i32 @barrier(i32 %1)
%5 = tail call i32 @eval_At_times_u(%struct.Param* %0)
%6 = tail call i32 @barrier(i32 %1)
ret void
}
int flsnz8_generic(unsigned int x) {
  int ret = 0;
  if (x >> 4) {
    x >>= 4;
    ret += 4;
  }
  return ret + ((0xFFFFAA50U >> (x << 1)) & 3) + 1;
}


x86 assembly (clang, -O0):
<flsnz8_generic>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
cmp    $0x0,%eax
je     112f <flsnz8_generic+0x2f>
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
mov    $0xffffaa50,%edx
shr    %cl,%edx
mov    %edx,%ecx
and    $0x3,%ecx
add    %ecx,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flsnz8_generic>:
mov    %edi,%ecx
shr    $0x4,%ecx
xor    %eax,%eax
cmp    $0x10,%edi
setae  %al
cmovb  %edi,%ecx
add    %ecx,%ecx
mov    $0xffffaa50,%edx
shr    %cl,%edx
and    $0x3,%edx
lea    (%rdx,%rax,4),%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @flsnz8_generic(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = lshr i32 %4, 4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i32, i32* %2
%9 = lshr i32 %8, 4
store i32 %9, i32* %2
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 4
store i32 %11, i32* %3
br label %12
12: ; preds = %7, %1
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = shl i32 %14, 1
%16 = lshr i32 -21936, %15
%17 = and i32 %16, 3
%18 = add i32 %13, %17
%19 = add i32 %18, 1
ret i32 %19
}

LLVM IR (-O2):
define i32 @flsnz8_generic(i32 %0) {
%2 = icmp ult i32 %0, 16
%3 = lshr i32 %0, 4
%4 = select i1 %2, i32 %0, i32 %3
%5 = shl nuw nsw i32 %4, 1
%6 = lshr i32 -21936, %5
%7 = and i32 %6, 3
%8 = select i1 %2, i32 1, i32 5
%9 = add nuw nsw i32 %8, %7
ret i32 %9
}
void av_pix_fmt_desc_next() {}


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

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

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

LLVM IR (-O2):
define void @av_pix_fmt_desc_next() {
ret void
}
/* Variables and functions */
int isdigit(int);
int sim_isdigit(int c) { return ((c < 0) || (c >= 128)) ? 0 : isdigit(c); }


x86 assembly (clang, -O0):
<sim_isdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1132 <sim_isdigit+0x22>
cmpl   $0x80,-0x4(%rbp)
jl     113c <sim_isdigit+0x2c>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1147 <sim_isdigit+0x37>
mov    -0x4(%rbp),%edi
call   1030 <isdigit@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sim_isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @sim_isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 128
br i1 %7, label %8, label %9
8: ; preds = %5, %1
br label %12
9: ; preds = %5
%10 = load i32, i32* %2
%11 = call i32 @isdigit(i32 %10)
br label %12
12: ; preds = %9, %8
%13 = phi i32 [ 0, %8 ], [ %11, %9 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @sim_isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
int endianness() {
  int i = 1;
  char *p = (char *)&i;
  if (p[0] == 1)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<endianness>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x1,%eax
jne    112f <endianness+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1136 <endianness+0x36>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @endianness() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
store i32 1, i32* %2
%4 = bitcast i32* %2 to i8*
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %0
store i32 0, i32* %1
br label %12
11: ; preds = %0
store i32 1, i32* %1
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @endianness() {
ret i32 0
}
int op_pat(char *operand, char **filename) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @op_pat(i8* nocapture readnone %0, i8** nocapture readnone %1) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ PN5180A_readRegister(int, int /*<<< orphan*/ *);
uint32_t PN5180A_getIRQStatus() {
  uint32_t irqStatus;
  PN5180A_readRegister((0x02), &irqStatus);
  return irqStatus;
}


x86 assembly (clang, -O0):
<PN5180A_getIRQStatus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
lea    -0x4(%rbp),%rsi
call   1030 <PN5180A_readRegister@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PN5180A_getIRQStatus>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0x2,%edi
call   1030 <PN5180A_readRegister@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @PN5180A_getIRQStatus() {
%1 = alloca i32
%2 = call i32 @PN5180A_readRegister(i32 2, i32* %1)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @PN5180A_getIRQStatus() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @PN5180A_readRegister(i32 2, i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ DirectIndexedXE0(int);
int /*<<< orphan*/ STY16(int /*<<< orphan*/, int);
void Op94E0X0(void) { STY16(DirectIndexedXE0(2), 0xFFFF); }


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

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

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

LLVM IR (-O2):
define void @Op94E0X0() {
%1 = tail call i32 @DirectIndexedXE0(i32 2)
%2 = tail call i32 @STY16(i32 %1, i32 65535)
ret void
}
/* Variables and functions */
double sqrt(double);
double vecLength(double *v) {
  return sqrt((v[0] * v[0]) + (v[1] * v[1]) + (v[2] * v[2]));
}


x86 assembly (clang, -O0):
<vecLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vecLength>:
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1141 <vecLength+0x31>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @vecLength(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = load double*, double** %2
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = fmul double %11, %14
%16 = call double @llvm.fmuladd.f64(double %5, double %8, double %15)
%17 = load double*, double** %2
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = load double*, double** %2
%21 = getelementptr inbounds double, double* %20, i64 2
%22 = load double, double* %21
%23 = call double @llvm.fmuladd.f64(double %19, double %22, double %16)
%24 = call double @sqrt(double %23)
ret double %24
}

LLVM IR (-O2):
define double @vecLength(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %5)
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double %8, double %6)
%10 = tail call double @sqrt(double %9)
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int a;
  printf("input a number:");
  scanf("%d", &a);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"input a number:\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
ret i32 0
}
/* Variables and functions */
void stats_evict(size_t sz) {}


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

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

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

LLVM IR (-O2):
define void @stats_evict(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ shmdt(void *);
void ft_shmdt(void **shaddr) {
  if (*shaddr) {
    shmdt(*shaddr);
    *shaddr = NULL;
  }
}


x86 assembly (clang, -O0):
<ft_shmdt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1141 <ft_shmdt+0x31>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <shmdt@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_shmdt>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1128 <ft_shmdt+0x18>
call   1030 <shmdt@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @ft_shmdt(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8**, i8*** %2
%8 = load i8*, i8** %7
%9 = call i32 @shmdt(i8* %8)
%10 = load i8**, i8*** %2
store i8* null, i8** %10
br label %11
11: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @ft_shmdt(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @shmdt(i8* %2)
store i8* null, i8** %0
br label %6
6: ; preds = %4, %1
ret void
}
int foo(int i) {}


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

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

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 undef
}
void c_pomp_init_() { (void)0; }


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

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

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

LLVM IR (-O2):
define void @c_pomp_init_() {
ret void
}
/* Type definitions */
typedef int time_t;
struct stat {
  int st_ctime;
};
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
scalar_t__ stat(char *, struct stat *);
time_t pid_ctime(pid_t pid) {
  char path[256];
  struct stat stat_buf;
  sprintf(path, "/proc/%d", pid);
  if (stat(path, &stat_buf) < 0) {
    return -1;
  }
  return stat_buf.st_ctime;
}


x86 assembly (clang, -O0):
<pid_ctime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %edi,-0x8(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xec1(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
lea    -0x118(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jge    116d <pid_ctime+0x4d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1176 <pid_ctime+0x56>
mov    -0x118(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pid_ctime>:
push   %rbx
sub    $0x110,%rsp
mov    %edi,%edx
lea    0xecf(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <stat@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
js     115c <pid_ctime+0x3c>
mov    0x8(%rsp),%eax
add    $0x110,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [9 x i8] c"/proc/%d\00"
define i32 @pid_ctime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [256 x i8]
%5 = alloca %struct.stat
store i32 %0, i32* %3
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%7 = load i32, i32* %3
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%10 = call i64 @stat(i8* %9, %struct.stat* %5)
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 -1, i32* %2
br label %16
13: ; preds = %1
%14 = getelementptr inbounds %struct.stat, %struct.stat* %5, i32 0, i32 0
%15 = load i32, i32* %14
store i32 %15, i32* %2
br label %16
16: ; preds = %13, %12
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [9 x i8] c"/proc/%d\00"
define i32 @pid_ctime(i32 %0) {
%2 = alloca [256 x i8]
%3 = alloca %struct.stat
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%5 = bitcast %struct.stat* %3 to i8*
%6 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = call i64 @stat(i8* %4, %struct.stat* %3)
%8 = icmp slt i64 %7, 0
%9 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%10 = load i32, i32* %9
%11 = select i1 %8, i32 -1, i32 %10
ret i32 %11
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int bind(int, struct sockaddr const *, int /*<<< orphan*/);
__attribute__((weak)) int __real_bind(int fd, const struct sockaddr *my_addr,
                                      socklen_t addrlen) {
  return bind(fd, my_addr, addrlen);
}


x86 assembly (clang, -O0):
<__real_bind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <bind@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__real_bind>:
jmp    1030 <bind@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define weak i32 @__real_bind(i32 %0, %struct.sockaddr* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load %struct.sockaddr*, %struct.sockaddr** %5
%9 = load i32, i32* %6
%10 = call i32 @bind(i32 %7, %struct.sockaddr* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define weak i32 @__real_bind(i32 %0, %struct.sockaddr* %1, i32 %2) {
%4 = tail call i32 @bind(i32 %0, %struct.sockaddr* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void fun2() { assert(0); }


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

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

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

LLVM IR (-O2):
define void @fun2() {
%1 = tail call i32 @assert(i32 0)
ret void
}
extern int TakeAByteArray(char *bytes) {
  if (bytes[0] == 31 && bytes[1] == 28 && bytes[2] == 30)
    return 18;
  return 0;
}


x86 assembly (clang, -O0):
<TakeAByteArray>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x1f,%eax
jne    1146 <TakeAByteArray+0x46>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x1c,%eax
jne    1146 <TakeAByteArray+0x46>
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x1e,%eax
jne    1146 <TakeAByteArray+0x46>
movl   $0x12,-0x4(%rbp)
jmp    114d <TakeAByteArray+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TakeAByteArray>:
cmpb   $0x1f,(%rdi)
jne    1116 <TakeAByteArray+0x16>
cmpb   $0x1c,0x1(%rdi)
jne    1116 <TakeAByteArray+0x16>
mov    $0x12,%eax
cmpb   $0x1e,0x2(%rdi)
je     1118 <TakeAByteArray+0x18>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @TakeAByteArray(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 31
br i1 %3, label %4, label %12
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 28
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 30
br i1 %11, label %13, label %12
12: ; preds = %8, %4, %1
br label %13
13: ; preds = %8, %12
%14 = phi i32 [ 0, %12 ], [ 18, %8 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *xstrdup(const char *s) {
  char *ret;
  ret = malloc(strlen(s) + 1);
  if (ret == NULL) {
    errx(1, "Out of memory");
  }
  strcpy(ret, s);
  return ret;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1181 <xstrdup+0x41>
mov    $0x1,%edi
lea    0xe84(%rip),%rsi
call   1050 <errx@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1060 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    116e <xstrdup+0x2e>
lea    0xe9c(%rip),%rsi
mov    $0x1,%edi
call   1050 <errx@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Out of memory\00"
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 @errx(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %1
%13 = load i8*, i8** %3
%14 = load i8*, i8** %2
%15 = call i32 @strcpy(i8* %13, i8* %14)
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@.str = [14 x i8] c"Out of memory\00"
define i8* @xstrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_wbkgrnd(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_wbkgrnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_wbkgrnd+0x2a>
jmp    1170 <cmd_wbkgrnd+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_wbkgrnd>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_wbkgrnd+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_wbkgrnd(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 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_wbkgrnd(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
/* Variables and functions */
scalar_t__ posix_memalign(void **, size_t, size_t);
void *roaring_bitmap_aligned_malloc(size_t alignment, size_t size) {
  void *p;
  if (posix_memalign(&p, alignment, size) != 0)
    return NULL;
  return p;
}


x86 assembly (clang, -O0):
<roaring_bitmap_aligned_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rdi
call   1030 <posix_memalign@plt>
cmp    $0x0,%rax
je     1148 <roaring_bitmap_aligned_malloc+0x38>
movq   $0x0,-0x8(%rbp)
jmp    1150 <roaring_bitmap_aligned_malloc+0x40>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roaring_bitmap_aligned_malloc>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1030 <posix_memalign@plt>
test   %rax,%rax
jne    112a <roaring_bitmap_aligned_malloc+0x1a>
mov    (%rsp),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @roaring_bitmap_aligned_malloc(i64 %0, i64 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i64 @posix_memalign(i8** %3, i64 %0, i64 %1)
%6 = icmp eq i64 %5, 0
%7 = load i8*, i8** %3
%8 = select i1 %6, i8* %7, i8* null
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *malloc(size_t);
int /*<<< orphan*/ perror(char *);
void *safe_malloc(size_t size) {
  void *addr = malloc(size);
  if (addr == NULL) {
    perror("malloc");
    exit(EXIT_FAILURE);
  }
  return addr;
}


x86 assembly (clang, -O0):
<safe_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116e <safe_malloc+0x3e>
lea    0xea5(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_malloc>:
push   %rax
call   1030 <malloc@plt>
test   %rax,%rax
je     113d <safe_malloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"malloc\00"
@EXIT_FAILURE = global i32 0
define i8* @safe_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [7 x i8] c"malloc\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @safe_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret i8* %2
}
unsigned long unsignedlong_ignoring_signedshort(unsigned long x,
                                                signed short y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @unsignedlong_ignoring_signedshort(i64 %0, i16 signext %1) {
%3 = alloca i64
%4 = alloca i16
store i64 %0, i64* %3
store i16 %1, i16* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlong_ignoring_signedshort(i64 returned %0, i16 signext %1) {
ret i64 %0
}
/* Type definitions */
struct Job {
  int dummy;
};

/* Variables and functions */
struct Job *find_finished_job(int);
struct Job *findjob(int);
struct Job *get_job(int jobid) {
  struct Job *j;
  j = findjob(jobid);
  if (j != NULL)
    return j;
  j = find_finished_job(jobid);
  if (j != NULL)
    return j;
  return 0;
}


x86 assembly (clang, -O0):
<get_job>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <findjob@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114f <get_job+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    117b <get_job+0x5b>
mov    -0xc(%rbp),%edi
call   1030 <find_finished_job@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1173 <get_job+0x53>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    117b <get_job+0x5b>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_job>:
push   %rbx
mov    %edi,%ebx
call   1040 <findjob@plt>
test   %rax,%rax
je     112f <get_job+0xf>
pop    %rbx
ret
mov    %ebx,%edi
pop    %rbx
jmp    1030 <find_finished_job@plt>

LLVM IR (-O0):
%struct.Job = type { i32 }
define %struct.Job* @get_job(i32 %0) {
%2 = alloca %struct.Job*
%3 = alloca i32
%4 = alloca %struct.Job*
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call %struct.Job* @findjob(i32 %5)
store %struct.Job* %6, %struct.Job** %4
%7 = load %struct.Job*, %struct.Job** %4
%8 = icmp ne %struct.Job* %7, null
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load %struct.Job*, %struct.Job** %4
store %struct.Job* %10, %struct.Job** %2
br label %19
11: ; preds = %1
%12 = load i32, i32* %3
%13 = call %struct.Job* @find_finished_job(i32 %12)
store %struct.Job* %13, %struct.Job** %4
%14 = load %struct.Job*, %struct.Job** %4
%15 = icmp ne %struct.Job* %14, null
br i1 %15, label %16, label %18
16: ; preds = %11
%17 = load %struct.Job*, %struct.Job** %4
store %struct.Job* %17, %struct.Job** %2
br label %19
18: ; preds = %11
store %struct.Job* null, %struct.Job** %2
br label %19
19: ; preds = %18, %16, %9
%20 = load %struct.Job*, %struct.Job** %2
ret %struct.Job* %20
}

LLVM IR (-O2):
%struct.Job = type { i32 }
define %struct.Job* @get_job(i32 %0) {
%2 = tail call %struct.Job* @findjob(i32 %0)
%3 = icmp eq %struct.Job* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call %struct.Job* @find_finished_job(i32 %0)
br label %6
6: ; preds = %4, %1
%7 = phi %struct.Job* [ %2, %1 ], [ %5, %4 ]
ret %struct.Job* %7
}
/* Variables and functions */
int isnormal(double);
int __pruabi_isnormal(double a) { return isnormal(a); }


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

x86 assembly (clang, -O2):
<__pruabi_isnormal>:
jmp    1030 <isnormal@plt>

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

LLVM IR (-O2):
define i32 @__pruabi_isnormal(double %0) {
%2 = tail call i32 @isnormal(double %0)
ret i32 %2
}
int load(char *recp __attribute__((unused)),
         int recsize __attribute__((unused)),
         char const *buf __attribute__((unused)),
         char const *udata __attribute__((unused)),
         int uleng __attribute__((unused))) {
  return 0;
}


x86 assembly (clang, -O0):
<load>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @load(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i32 %4) {
ret i32 0
}
void gtk_grab_remove() {}


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

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

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

LLVM IR (-O2):
define void @gtk_grab_remove() {
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
void finalizer_scrub16(void *ptr) {
  uint64_t *sz_ptr = (uint64_t *)ptr;
  sz_ptr[0] = 0xa5a5a5a5a5a5a5a5ULL;
  sz_ptr[1] = 0xa5a5a5a5a5a5a5a5ULL;
}


x86 assembly (clang, -O0):
<finalizer_scrub16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0xa5a5a5a5,(%rax)
mov    -0x10(%rbp),%rax
movl   $0xa5a5a5a5,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<finalizer_scrub16>:
movabs $0xa5a5a5a5a5a5a5a5,%rax
a5 a5 a5
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @finalizer_scrub16(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
store i32 -1515870811, i32* %7
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32 -1515870811, i32* %9
ret void
}

LLVM IR (-O2):
define void @finalizer_scrub16(i8* nocapture writeonly %0) {
%2 = bitcast i8* %0 to i32*
store i32 -1515870811, i32* %2
%3 = getelementptr inbounds i8, i8* %0, i64 4
%4 = bitcast i8* %3 to i32*
store i32 -1515870811, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void help() { puts("progname naive|x86|sse2|sse4 repeat-count [default=100]"); }


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

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

LLVM IR (-O0):
@.str = [56 x i8] c"progname naive|x86|sse2|sse4 repeat-count [default=100]\00"
define void @help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"progname naive|x86|sse2|sse4 repeat-count [default=100]\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct flashrom_layout {
  int dummy;
};

/* Variables and functions */
int include_region(struct flashrom_layout *const, char const *,
                   int /*<<< orphan*/ *);
int flashrom_layout_include_region(struct flashrom_layout *const layout,
                                   const char *name) {
  return include_region(layout, name, NULL);
}


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

x86 assembly (clang, -O2):
<flashrom_layout_include_region>:
xor    %edx,%edx
jmp    1030 <include_region@plt>

LLVM IR (-O0):
%struct.flashrom_layout = type { i32 }
define i32 @flashrom_layout_include_region(%struct.flashrom_layout* %0, i8* %1) {
%3 = alloca %struct.flashrom_layout*
%4 = alloca i8*
store %struct.flashrom_layout* %0, %struct.flashrom_layout** %3
store i8* %1, i8** %4
%5 = load %struct.flashrom_layout*, %struct.flashrom_layout** %3
%6 = load i8*, i8** %4
%7 = call i32 @include_region(%struct.flashrom_layout* %5, i8* %6, i32* null)
ret i32 %7
}

LLVM IR (-O2):
%struct.flashrom_layout = type { i32 }
define i32 @flashrom_layout_include_region(%struct.flashrom_layout* %0, i8* %1) {
%3 = tail call i32 @include_region(%struct.flashrom_layout* %0, i8* %1, i32* null)
ret i32 %3
}
void g(void) { const union u2; }


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

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

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

LLVM IR (-O2):
define void @g() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CTEST_ERR(char *, char const *, int);
void assert_fail(const char *caller, int line) {
  CTEST_ERR("%s:%d  shouldn't come here", caller, line);
}


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

x86 assembly (clang, -O2):
<assert_fail>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <CTEST_ERR@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"%s:%d shouldn't come here\00"
define void @assert_fail(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 = call i32 @CTEST_ERR(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"%s:%d shouldn't come here\00"
define void @assert_fail(i8* %0, i32 %1) {
%3 = tail call i32 @CTEST_ERR(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
void nfs_fscache_release_client_cookie(struct nfs_client *clp) {}


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

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

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

LLVM IR (-O2):
%struct.nfs_client = type opaque
define void @nfs_fscache_release_client_cookie(%struct.nfs_client* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LPSPI3_DriverIRQHandler();
__attribute__((weak)) void LPSPI3_IRQHandler(void) {
  LPSPI3_DriverIRQHandler();
}


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

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

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

LLVM IR (-O2):
define weak void @LPSPI3_IRQHandler() {
%1 = tail call i32 (...) @LPSPI3_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void lineBreak() { puts("----------------------------------------"); }


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

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

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

LLVM IR (-O2):
@.str = [41 x i8] c"----------------------------------------\00"
define void @lineBreak() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int stat(char const *, struct stat *);
bool is_dir(const char *path) {
  struct stat buffer;
  int status;
  status = stat(path, &buffer);
  if (status == 0) {
    return (S_ISDIR(buffer.st_mode) != 0);
  } else {
    printf("Error!:");
    return false;
  }
}


x86 assembly (clang, -O0):
<is_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <stat@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1172 <is_dir+0x42>
mov    -0x18(%rbp),%edi
call   1040 <S_ISDIR@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1185 <is_dir+0x55>
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_dir>:
push   %rax
mov    %rsp,%rsi
call   1050 <stat@plt>
test   %eax,%eax
je     114d <is_dir+0x1d>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    (%rsp),%edi
call   1040 <S_ISDIR@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [8 x i8] c"Error!:\00"
define i32 @is_dir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @stat(i8* %6, %struct.stat* %4)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %1
%11 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%12 = load i32, i32* %11
%13 = call i64 @S_ISDIR(i32 %12)
%14 = icmp ne i64 %13, 0
%15 = zext i1 %14 to i32
store i32 %15, i32* %2
br label %18
16: ; preds = %1
%17 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %18
18: ; preds = %16, %10
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [8 x i8] c"Error!:\00"
define i32 @is_dir(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i64 @S_ISDIR(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %14
12: ; preds = %1
%13 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %6
%15 = phi i32 [ %11, %6 ], [ 0, %12 ]
ret i32 %15
}
int funcaoX(int n) {
  int a = 0;
  for (int i = 1; i <= n; ++i) {
    a += i;
  }
  return a;
}


x86 assembly (clang, -O0):
<funcaoX>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1138 <funcaoX+0x38>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <funcaoX+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcaoX>:
test   %edi,%edi
jle    1118 <funcaoX+0x18>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
shr    %rcx
lea    (%rcx,%rdi,2),%eax
add    $0xffffffff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @funcaoX(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = shl nuw i32 %0, 1
%5 = add nsw i32 %0, -1
%6 = zext i32 %5 to i33
%7 = add nsw i32 %0, -2
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %4, %11
%13 = add i32 %12, -1
br label %14
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %13, %3 ]
ret i32 %15
}