xunge/DecIR huggingface dataset:
void idiv_m32abs(unsigned int *m32) {
  if ((long)m32 & 0xFFFFFFFF80000000LL) {
    printf("Error: destination %lx not in lower 2GB for idiv_m32abs()\n",
           (long)m32);
    asm(" int $3; ");
  }
  put8(0xF7);
  put8(0x3C);
  put8(0x25);
  put32((int)(unsigned long)m32);
}


x86 assembly (clang, -O0):
<idiv_m32abs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xffffffff80000000,%rax
cmp    $0x0,%rax
je     1163 <idiv_m32abs+0x33>
mov    -0x8(%rbp),%rsi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
int3
mov    $0xf7,%edi
mov    $0x0,%al
call   1030 <put8@plt>
mov    $0x3c,%edi
mov    $0x0,%al
call   1030 <put8@plt>
mov    $0x25,%edi
mov    $0x0,%al
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    $0x0,%al
call   1050 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idiv_m32abs>:
push   %rbx
mov    %rdi,%rbx
test   $0xffffffff80000000,%rdi
je     114f <idiv_m32abs+0x1f>
lea    0xebc(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
int3
mov    $0xf7,%edi
xor    %eax,%eax
call   1030 <put8@plt>
mov    $0x3c,%edi
xor    %eax,%eax
call   1030 <put8@plt>
mov    $0x25,%edi
xor    %eax,%eax
call   1030 <put8@plt>
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1050 <put32@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"Error: destination %lx not in lower 2GB for idiv_m32abs()\0A\00"
define void @idiv_m32abs(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = ptrtoint i32* %3 to i64
%5 = and i64 %4, -2147483648
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32*, i32** %2
%9 = ptrtoint i32* %8 to i64
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i64 %9)
br label %11
11: ; preds = %7, %1
%12 = call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 247)
%13 = call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 60)
%14 = call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 37)
%15 = load i32*, i32** %2
%16 = ptrtoint i32* %15 to i64
%17 = trunc i64 %16 to i32
%18 = call i32 (i32, ...) bitcast (i32 (...)* @put32 to i32 (i32, ...)*)(i32 %17)
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c"Error: destination %lx not in lower 2GB for idiv_m32abs()\0A\00"
define void @idiv_m32abs(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = icmp ult i32* %0, inttoptr (i64 2147483648 to i32*)
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i64 %2)
tail call void asm sideeffect " int $$3; ", "~{dirflag},~{fpsr},~{flags}"()
br label %6
6: ; preds = %4, %1
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 247)
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 60)
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 37)
%10 = trunc i64 %2 to i32
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @put32 to i32 (i32, ...)*)(i32 %10)
ret void
}
/* Variables and functions */
scalar_t__ bgbcc_ralloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *bgbcc_rstrdup(char *s) {
  char *t;
  t = (char *)bgbcc_ralloc(strlen(s) + 1);
  strcpy(t, s);
  return (t);
}


x86 assembly (clang, -O0):
<bgbcc_rstrdup>:
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   1050 <bgbcc_ralloc@plt>
mov    %rax,-0x10(%rbp)
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):
<bgbcc_rstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <bgbcc_ralloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @bgbcc_rstrdup(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 i64 @bgbcc_ralloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = load i8*, i8** %2
%11 = call i32 @strcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @bgbcc_rstrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @bgbcc_ralloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int WEXITSTATUS(int /*<<< orphan*/);
int /*<<< orphan*/ WIFEXITED(int /*<<< orphan*/);
int ExitStatus(uint32_t *w) {
  if (!WIFEXITED(*w))
    return -1;
  return WEXITSTATUS(*w);
}


x86 assembly (clang, -O0):
<ExitStatus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <WIFEXITED@plt>
cmp    $0x0,%eax
jne    114c <ExitStatus+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <ExitStatus+0x3a>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <WEXITSTATUS@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExitStatus>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1040 <WIFEXITED@plt>
test   %eax,%eax
je     1137 <ExitStatus+0x17>
mov    (%rbx),%edi
pop    %rbx
jmp    1030 <WEXITSTATUS@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ExitStatus(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @WIFEXITED(i32 %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %0
%7 = tail call i32 @WEXITSTATUS(i32 %6)
br label %8
8: ; preds = %1, %5
%9 = phi i32 [ %7, %5 ], [ -1, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ LedsP__Leds__led0Toggle();
void BlinkNoTimerTaskC__Leds__led0Toggle(void) { LedsP__Leds__led0Toggle(); }


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

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

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

LLVM IR (-O2):
define void @BlinkNoTimerTaskC__Leds__led0Toggle() {
%1 = tail call i32 (...) @LedsP__Leds__led0Toggle()
ret void
}
int test_04(unsigned char x, int y, int z) { return (x << 3) & 192 ? y : z; }


x86 assembly (clang, -O0):
<test_04>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x3,%eax
and    $0xc0,%eax
cmp    $0x0,%eax
je     1130 <test_04+0x30>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <test_04+0x36>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_04>:
mov    %esi,%eax
test   $0x18,%dil
cmove  %edx,%eax
ret

LLVM IR (-O0):
define i32 @test_04(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 3
%10 = and i32 %9, 192
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = load i32, i32* %5
br label %16
14: ; preds = %3
%15 = load i32, i32* %6
br label %16
16: ; preds = %14, %12
%17 = phi i32 [ %13, %12 ], [ %15, %14 ]
ret i32 %17
}

LLVM IR (-O2):
define i32 @test_04(i8 zeroext %0, i32 %1, i32 %2) {
%4 = and i8 %0, 24
%5 = icmp eq i8 %4, 0
%6 = select i1 %5, i32 %2, i32 %1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *);
void sig_invalid_handler(int signum) { panic("signal error"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"signal error\00"
define void @sig_invalid_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @panic(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"signal error\00"
define void @sig_invalid_handler(i32 %0) {
%2 = tail call i32 @panic(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
void hitbottom() {}


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

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

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

LLVM IR (-O2):
define void @hitbottom() {
ret void
}
/* Variables and functions */
float __infer_nondet_float();
float sinhf(float x) { return __infer_nondet_float(); }


x86 assembly (clang, -O0):
<sinhf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_float@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @sinhf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call float (...) @__infer_nondet_float()
ret float %3
}

LLVM IR (-O2):
define float @sinhf(float %0) {
%2 = tail call float (...) @__infer_nondet_float()
ret float %2
}
double biomass(double fpar, double solar_day, double evap_fr,
               double light_use_ef) {
  double result, apar, conversion_coefs;
  conversion_coefs = 0.0864 * 10;
  apar = fpar * (0.48 * solar_day);
  result = apar * light_use_ef * evap_fr * conversion_coefs;
  return result;
}


x86 assembly (clang, -O0):
<biomass>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xece(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<biomass>:
mulsd  0xef8(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm0
mulsd  0xeec(%rip),%xmm0
ret

LLVM IR (-O0):
define double @biomass(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
store double 0x3FEBA5E353F7CEDA, double* %11
%12 = load double, double* %5
%13 = load double, double* %6
%14 = fmul double 4.800000e-01, %13
%15 = fmul double %12, %14
store double %15, double* %10
%16 = load double, double* %10
%17 = load double, double* %8
%18 = fmul double %16, %17
%19 = load double, double* %7
%20 = fmul double %18, %19
%21 = load double, double* %11
%22 = fmul double %20, %21
store double %22, double* %9
%23 = load double, double* %9
ret double %23
}

LLVM IR (-O2):
define double @biomass(double %0, double %1, double %2, double %3) {
%5 = fmul double %1, 4.800000e-01
%6 = fmul double %5, %0
%7 = fmul double %6, %3
%8 = fmul double %7, %2
%9 = fmul double %8, 0x3FEBA5E353F7CEDA
ret double %9
}
int sum_of_days(int from, int cards) {}


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

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

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

LLVM IR (-O2):
define i32 @sum_of_days(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
scalar_t__ xBeta_Distribution(double, double, double);
double Beta_Distribution(double x, double a, double b) {
  if (x <= 0.0)
    return 0.0;
  if (x >= 1.0)
    return 1.0;
  return (double)xBeta_Distribution(x, a, b);
}


x86 assembly (clang, -O0):
<Beta_Distribution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1142 <Beta_Distribution+0x32>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1189 <Beta_Distribution+0x79>
movsd  -0x10(%rbp),%xmm0
movsd  0xeb1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     116b <Beta_Distribution+0x5b>
movsd  0xe9f(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1189 <Beta_Distribution+0x79>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1030 <xBeta_Distribution@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Beta_Distribution>:
push   %rax
xorpd  %xmm3,%xmm3
ucomisd %xmm0,%xmm3
jae    1136 <Beta_Distribution+0x26>
movsd  0xedd(%rip),%xmm3
ucomisd %xmm3,%xmm0
jae    1136 <Beta_Distribution+0x26>
call   1030 <xBeta_Distribution@plt>
xorps  %xmm3,%xmm3
cvtsi2sd %rax,%xmm3
movapd %xmm3,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Beta_Distribution(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%8 = load double, double* %5
%9 = fcmp ole double %8, 0.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %3
store double 0.000000e+00, double* %4
br label %21
11: ; preds = %3
%12 = load double, double* %5
%13 = fcmp oge double %12, 1.000000e+00
br i1 %13, label %14, label %15
14: ; preds = %11
store double 1.000000e+00, double* %4
br label %21
15: ; preds = %11
%16 = load double, double* %5
%17 = load double, double* %6
%18 = load double, double* %7
%19 = call i64 @xBeta_Distribution(double %16, double %17, double %18)
%20 = sitofp i64 %19 to double
store double %20, double* %4
br label %21
21: ; preds = %15, %14, %10
%22 = load double, double* %4
ret double %22
}

LLVM IR (-O2):
define double @Beta_Distribution(double %0, double %1, double %2) {
%4 = fcmp ugt double %0, 0.000000e+00
br i1 %4, label %5, label %10
5: ; preds = %3
%6 = fcmp ult double %0, 1.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %5
%8 = tail call i64 @xBeta_Distribution(double %0, double %1, double %2)
%9 = sitofp i64 %8 to double
br label %10
10: ; preds = %5, %3, %7
%11 = phi double [ %9, %7 ], [ 0.000000e+00, %3 ], [ 1.000000e+00, %5 ]
ret double %11
}
/* Type definitions */
struct sa_timer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct sa_timer *);
scalar_t__ sa_timer_active(struct sa_timer *);
int /*<<< orphan*/ sa_timer_cancel(struct sa_timer *);
void sa_timer_free(struct sa_timer *tm) {
  if (sa_timer_active(tm))
    sa_timer_cancel(tm);
  free(tm);
}


x86 assembly (clang, -O0):
<sa_timer_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <sa_timer_active@plt>
cmp    $0x0,%rax
je     1158 <sa_timer_free+0x28>
mov    -0x8(%rbp),%rdi
call   1050 <sa_timer_cancel@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sa_timer_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <sa_timer_active@plt>
test   %rax,%rax
je     1146 <sa_timer_free+0x16>
mov    %rbx,%rdi
call   1050 <sa_timer_cancel@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.sa_timer = type { i32 }
define void @sa_timer_free(%struct.sa_timer* %0) {
%2 = alloca %struct.sa_timer*
store %struct.sa_timer* %0, %struct.sa_timer** %2
%3 = load %struct.sa_timer*, %struct.sa_timer** %2
%4 = call i64 @sa_timer_active(%struct.sa_timer* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load %struct.sa_timer*, %struct.sa_timer** %2
%8 = call i32 @sa_timer_cancel(%struct.sa_timer* %7)
br label %9
9: ; preds = %6, %1
%10 = load %struct.sa_timer*, %struct.sa_timer** %2
%11 = call i32 @free(%struct.sa_timer* %10)
ret void
}

LLVM IR (-O2):
%struct.sa_timer = type { i32 }
define void @sa_timer_free(%struct.sa_timer* %0) {
%2 = tail call i64 @sa_timer_active(%struct.sa_timer* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @sa_timer_cancel(%struct.sa_timer* %0)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @free(%struct.sa_timer* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ renum_show();
int main(int argc, char *argv[]) {
  (void)argc;
  (void)argv;
  renum_show();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @renum_show()
ret i32 0
}
IR0I1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((*p0) <= 33)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<IR0I1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
cmp    $0x21,%eax
jg     113b <IR0I1+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <IR0I1+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IR0I1>:
xor    %eax,%eax
cmpw   $0x22,(%r8)
setl   %al
ret

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

LLVM IR (-O2):
define i32 @IR0I1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture readnone %5) {
%7 = load i16, i16* %4
%8 = icmp slt i16 %7, 34
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *int2str(char *buffer, int x) {
  sprintf(buffer, "%d", x);
  return buffer;
}


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

x86 assembly (clang, -O2):
<int2str>:
push   %rbx
mov    %esi,%edx
mov    %rdi,%rbx
lea    0xee3(%rip),%rsi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @int2str(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 @sprintf(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @int2str(i8* returned writeonly %0, i32 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* %0
}
/* Type definitions */
struct fuse_args {
  int dummy;
};

/* Variables and functions */
int fuse_opt_insert_arg_common(struct fuse_args *, int, char const *);
int fuse_opt_insert_arg(struct fuse_args *args, int pos, const char *arg) {
  return fuse_opt_insert_arg_common(args, pos, arg);
}


x86 assembly (clang, -O0):
<fuse_opt_insert_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <fuse_opt_insert_arg_common@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fuse_opt_insert_arg>:
jmp    1030 <fuse_opt_insert_arg_common@plt>

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

LLVM IR (-O2):
%struct.fuse_args = type { i32 }
define i32 @fuse_opt_insert_arg(%struct.fuse_args* %0, i32 %1, i8* %2) {
%4 = tail call i32 @fuse_opt_insert_arg_common(%struct.fuse_args* %0, i32 %1, i8* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void console_callback(char *str) { printf("cons> %s\n", str); }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"cons> %s\0A\00"
define void @console_callback(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int getStringLength(char *string) {
  int i, length = 0;
  for (i = 0; string[i]; i++) {
    length++;
  }
  return length;
}


x86 assembly (clang, -O0):
<getStringLength>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     113f <getStringLength+0x3f>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <getStringLength+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getStringLength>:
cmpb   $0x0,(%rdi)
je     111c <getStringLength+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <getStringLength+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @getStringLength(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %6, %4 ], [ 0, %1 ]
%6 = add nuw nsw i64 %5, 1
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %4
10: ; preds = %4
%11 = trunc i64 %6 to i32
br label %12
12: ; preds = %10, %1
%13 = phi i32 [ 0, %1 ], [ %11, %10 ]
ret i32 %13
}
/* Type definitions */
typedef int wchar_t;
struct _Locale_monetary {
  int dummy;
};

/* Variables and functions */
wchar_t _WLocale_mon_decimal_point(struct _Locale_monetary *lmon
                                   __attribute__((__unused__))) {
  return L'.';
}


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

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

LLVM IR (-O0):
%struct._Locale_monetary = type { i32 }
define i32 @_WLocale_mon_decimal_point(%struct._Locale_monetary* %0) {
%2 = alloca %struct._Locale_monetary*
store %struct._Locale_monetary* %0, %struct._Locale_monetary** %2
ret i32 46
}

LLVM IR (-O2):
%struct._Locale_monetary = type { i32 }
define i32 @_WLocale_mon_decimal_point(%struct._Locale_monetary* nocapture readnone %0) {
ret i32 46
}
int do_884() { return 884; }


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

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

LLVM IR (-O0):
define i32 @do_884() {
ret i32 884
}

LLVM IR (-O2):
define i32 @do_884() {
ret i32 884
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_unless_null(void *p) {
  if (p) {
    free(p);
  }
}


x86 assembly (clang, -O0):
<free_unless_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <free_unless_null+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_unless_null>:
test   %rdi,%rdi
je     111a <free_unless_null+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @free_unless_null(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
char *strdup(char const *);
char *xstrdup(const char *s) {
  char *mem = strdup(s);
  if (mem == NULL) {
    perror("strdup");
  }
  return mem;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <xstrdup+0x30>
lea    0xeb5(%rip),%rdi
call   1030 <perror@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1133 <xstrdup+0x13>
mov    %rbx,%rax
pop    %rbx
ret
lea    0xec6(%rip),%rdi
call   1030 <perror@plt>
jmp    112e <xstrdup+0xe>

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

LLVM IR (-O2):
@.str = [7 x i8] c"strdup\00"
define noalias i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ err_msg(char *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int open(char const *, int);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int Open(const char *pathname, int flags) {
  int ret;
  if ((ret = open(pathname, flags)) == -1) {
    err_msg("error open path: %s", strerror(errno));
    exit(EXIT_FAILURE);
  }
  return ret;
}


x86 assembly (clang, -O0):
<Open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <open@plt>
mov    %eax,-0x10(%rbp)
cmp    $0xffffffff,%eax
jne    1191 <Open+0x51>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
mov    %eax,%esi
lea    0xe82(%rip),%rdi
call   1040 <err_msg@plt>
mov    0x2e4e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Open>:
push   %rax
call   1030 <open@plt>
cmp    $0xffffffff,%eax
je     114d <Open+0xd>
pop    %rcx
ret
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
lea    0xe9e(%rip),%rdi
mov    %eax,%esi
call   1040 <err_msg@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"error open path: %s\00"
@errno = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @Open(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @open(i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load i32, i32* @errno
%12 = call i32 @strerror(i32 %11)
%13 = call i32 @err_msg(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @exit(i32 %14)
unreachable
16: ; preds = %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@.str = [20 x i8] c"error open path: %s\00"
@errno = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @Open(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @open(i8* %0, i32 %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* @errno
%7 = tail call i32 @strerror(i32 %6)
%8 = tail call i32 @err_msg(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %2
ret i32 %3
}
/* Type definitions */
struct chat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ chat_Finish(struct chat *);
void chat_Destroy(struct chat *c) { chat_Finish(c); }


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

x86 assembly (clang, -O2):
<chat_Destroy>:
jmp    1030 <chat_Finish@plt>

LLVM IR (-O0):
%struct.chat = type { i32 }
define void @chat_Destroy(%struct.chat* %0) {
%2 = alloca %struct.chat*
store %struct.chat* %0, %struct.chat** %2
%3 = load %struct.chat*, %struct.chat** %2
%4 = call i32 @chat_Finish(%struct.chat* %3)
ret void
}

LLVM IR (-O2):
%struct.chat = type { i32 }
define void @chat_Destroy(%struct.chat* %0) {
%2 = tail call i32 @chat_Finish(%struct.chat* %0)
ret void
}
int test_imm_F2int32_reg(int val) { return ((val) & (0xF2 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_F2int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xf2,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_F2int32_reg(i32 %0) {
%2 = and i32 %0, 242
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct stat {
  size_t st_size;
};

/* Variables and functions */
int /*<<< orphan*/ stat(char *, struct stat *);
size_t get_passwd_size() {
  struct stat st;
  stat("/etc/passwd", &st);
  return st.st_size;
}


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

x86 assembly (clang, -O2):
<get_passwd_size>:
push   %rax
lea    0xee8(%rip),%rdi
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
@.str = [12 x i8] c"/etc/passwd\00"
define i64 @get_passwd_size() {
%1 = alloca %struct.stat
%2 = call i32 @stat(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %struct.stat* %1)
%3 = getelementptr inbounds %struct.stat, %struct.stat* %1, i32 0, i32 0
%4 = load i64, i64* %3
ret i64 %4
}

LLVM IR (-O2):
%struct.stat = type { i64 }
@.str = [12 x i8] c"/etc/passwd\00"
define i64 @get_passwd_size() {
%1 = alloca %struct.stat
%2 = bitcast %struct.stat* %1 to i8*
%3 = call i32 @stat(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %struct.stat* %1)
%4 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 0
%5 = load i64, i64* %4
ret i64 %5
}
int sem_init() {
  ;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @sem_init() {
ret i32 0
}
int set_max_kcs_loops(int ms) {
  int rv = 0;
  return (rv);
}


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

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

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

LLVM IR (-O2):
define i32 @set_max_kcs_loops(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ vs_write_reg(int, short);
void vs_write_volume(int vol) {
  short v;
  vol = 100 - vol;
  v = vol;
  v <<= 8;
  v |= vol;
  vs_write_reg((0x0B), v);
}


x86 assembly (clang, -O0):
<vs_write_volume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x64,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %ax,-0x6(%rbp)
movswl -0x6(%rbp),%eax
shl    $0x8,%eax
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%ecx
movswl -0x6(%rbp),%eax
or     %ecx,%eax
mov    %ax,-0x6(%rbp)
mov    $0xb,%edi
movswl -0x6(%rbp),%esi
call   1030 <vs_write_reg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vs_write_volume>:
mov    $0x64,%eax
sub    %edi,%eax
mov    %eax,%ecx
shl    $0x8,%ecx
or     %eax,%ecx
movswl %cx,%esi
mov    $0xb,%edi
jmp    1030 <vs_write_reg@plt>

LLVM IR (-O0):
define void @vs_write_volume(i32 %0) {
%2 = alloca i32
%3 = alloca i16
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 100, %4
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = trunc i32 %6 to i16
store i16 %7, i16* %3
%8 = load i16, i16* %3
%9 = sext i16 %8 to i32
%10 = shl i32 %9, 8
%11 = trunc i32 %10 to i16
store i16 %11, i16* %3
%12 = load i32, i32* %2
%13 = load i16, i16* %3
%14 = sext i16 %13 to i32
%15 = or i32 %14, %12
%16 = trunc i32 %15 to i16
store i16 %16, i16* %3
%17 = load i16, i16* %3
%18 = call i32 @vs_write_reg(i32 11, i16 signext %17)
ret void
}

LLVM IR (-O2):
define void @vs_write_volume(i32 %0) {
%2 = sub nsw i32 100, %0
%3 = shl i32 %2, 8
%4 = or i32 %3, %2
%5 = trunc i32 %4 to i16
%6 = tail call i32 @vs_write_reg(i32 11, i16 signext %5)
ret void
}
int lockd_start_vg(struct cmd_context *cmd, struct volume_group *vg,
                   int start_init) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.cmd_context = type opaque
%struct.volume_group = type opaque
define i32 @lockd_start_vg(%struct.cmd_context* %0, %struct.volume_group* %1, i32 %2) {
%4 = alloca %struct.cmd_context*
%5 = alloca %struct.volume_group*
%6 = alloca i32
store %struct.cmd_context* %0, %struct.cmd_context** %4
store %struct.volume_group* %1, %struct.volume_group** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.cmd_context = type opaque
%struct.volume_group = type opaque
define i32 @lockd_start_vg(%struct.cmd_context* nocapture readnone %0, %struct.volume_group* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
scalar_t__ is_mod(char);
char sp(char *s) {
  while (is_mod(*s) && *s)
    s++;
  return (*s);
}


x86 assembly (clang, -O0):
<sp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <is_mod@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     114a <sp+0x3a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    115a <sp+0x4a>
jmp    116b <sp+0x5b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <sp+0xc>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sp>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <is_mod@plt>
test   %rax,%rax
je     1139 <sp+0x29>
cmpb   $0x0,(%rbx)
je     1139 <sp+0x29>
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
jmp    1120 <sp+0x10>
mov    (%rbx),%al
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @sp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i64 @is_mod(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
%20 = load i8, i8* %19
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @sp(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @is_mod(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %1, %9
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = tail call i64 @is_mod(i8 signext %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %9, %1
%15 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %5 ]
%16 = load i8, i8* %15
ret i8 %16
}
void fa45(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    p01B:
      goto p01B;
      goto a;
    a:
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa45>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa45+0x4>

x86 assembly (clang, -O2):
<fa45>:
jmp    1100 <fa45>

LLVM IR (-O0):
define void @fa45() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; No predecessors!
br label %20
20: ; preds = %20, %19
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa45() {
br label %1
1: ; preds = %1, %0
br label %1
}
void dbct_allote_mem() {}


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

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

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

LLVM IR (-O2):
define void @dbct_allote_mem() {
ret void
}
void convert(val, buf) const long val;
char *const buf;
{
  register int i;
  register long shift;
  for (i = 0, shift = 24; i < 4; ++i, shift -= 8)
    buf[i] = val >> shift;
}


x86 assembly (clang, -O0):
<convert>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movq   $0x18,-0x20(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    1157 <convert+0x57>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
sar    %cl,%rax
mov    %al,%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rax
sub    $0x8,%rax
mov    %rax,-0x20(%rbp)
jmp    111b <convert+0x1b>
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert>:
bswap  %edi
mov    %edi,(%rsi)
ret

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

LLVM IR (-O2):
define void @convert(i64 %0, i8* nocapture writeonly %1) {
%3 = lshr i64 %0, 24
%4 = trunc i64 %3 to i8
store i8 %4, i8* %1
%5 = lshr i64 %0, 16
%6 = trunc i64 %5 to i8
%7 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %6, i8* %7
%8 = lshr i64 %0, 8
%9 = trunc i64 %8 to i8
%10 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %9, i8* %10
%11 = trunc i64 %0 to i8
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _sys_call(int, int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/);
void sleep_proc() { _sys_call(0x32, 0, 0, 0); }


x86 assembly (clang, -O0):
<sleep_proc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x32,%edi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <_sys_call@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep_proc>:
mov    $0x32,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <_sys_call@plt>

LLVM IR (-O0):
define void @sleep_proc() {
%1 = call i32 @_sys_call(i32 50, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @sleep_proc() {
%1 = tail call i32 @_sys_call(i32 50, i32 0, i32 0, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *stdout;
FILE *get_output_destination(int argc, char **argv) {
  FILE *output;
  argc = 0;
  argv = NULL;
  output = stdout;
  return output;
}


x86 assembly (clang, -O0):
<get_output_destination>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_output_destination>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%rax
ret

LLVM IR (-O0):
@stdout = global i32* null
define i32* @get_output_destination(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32*
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 0, i32* %3
store i8** null, i8*** %4
%6 = load i32*, i32** @stdout
store i32* %6, i32** %5
%7 = load i32*, i32** %5
ret i32* %7
}

LLVM IR (-O2):
@stdout = global i32* null
define i32* @get_output_destination(i32 %0, i8** nocapture readnone %1) {
%3 = load i32*, i32** @stdout
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void macscp4_1_from_macscp3() {
  puts("macscp4_1_"
       "from_macscp3");
}


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

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

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

LLVM IR (-O2):
@.str = [23 x i8] c"macscp4_1_from_macscp3\00"
define void @macscp4_1_from_macscp3() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ cosh(double);
long double coshl(long double x) { return (long double)cosh((double)x); }


x86 assembly (clang, -O0):
<coshl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <cosh@plt>
mov    %rax,-0x18(%rbp)
fildll -0x18(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coshl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <cosh@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @coshl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call i64 @cosh(double %4)
%6 = sitofp i64 %5 to x86_fp80
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @coshl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call i64 @cosh(double %2)
%4 = sitofp i64 %3 to x86_fp80
ret x86_fp80 %4
}