xunge/DecIR huggingface dataset:
int test_00(unsigned char *x, int y, int z) {
  return (x[0] << 4) & 192 ? y : z;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x4,%eax
and    $0xc0,%eax
cmp    $0x0,%eax
je     1131 <test_00+0x31>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1137 <test_00+0x37>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    %esi,%eax
testb  $0xc,(%rdi)
cmove  %edx,%eax
ret

LLVM IR (-O0):
define i32 @test_00(i8* %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 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 4
%12 = and i32 %11, 192
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = load i32, i32* %5
br label %18
16: ; preds = %3
%17 = load i32, i32* %6
br label %18
18: ; preds = %16, %14
%19 = phi i32 [ %15, %14 ], [ %17, %16 ]
ret i32 %19
}

LLVM IR (-O2):
define i32 @test_00(i8* nocapture %0, i32 %1, i32 %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, 12
%6 = icmp eq i8 %5, 0
%7 = select i1 %6, i32 %2, i32 %1
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p448_sub(uintptr_t, uintptr_t, uintptr_t);
void fiat_p448_sub(uint64_t out1[8], const uint64_t arg1[8],
                   const uint64_t arg2[8]) {
  internal_fiat_p448_sub((uintptr_t)out1, (uintptr_t)arg1, (uintptr_t)arg2);
}


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

x86 assembly (clang, -O2):
<fiat_p448_sub>:
jmp    1030 <internal_fiat_p448_sub@plt>

LLVM IR (-O0):
define void @fiat_p448_sub(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = load i32*, i32** %5
%10 = ptrtoint i32* %9 to i64
%11 = load i32*, i32** %6
%12 = ptrtoint i32* %11 to i64
%13 = call i32 @internal_fiat_p448_sub(i64 %8, i64 %10, i64 %12)
ret void
}

LLVM IR (-O2):
define void @fiat_p448_sub(i32* %0, i32* %1, i32* %2) {
%4 = ptrtoint i32* %0 to i64
%5 = ptrtoint i32* %1 to i64
%6 = ptrtoint i32* %2 to i64
%7 = tail call i32 @internal_fiat_p448_sub(i64 %4, i64 %5, i64 %6)
ret void
}
/* Type definitions */
struct gsgp_parameters {
  int dummy;
};
struct gsgp_individual {
  int dummy;
};

/* Variables and functions */
double perform_evaluation(struct gsgp_individual *, int, double *,
                          struct gsgp_parameters *);
double gsgp_exec_individual(struct gsgp_individual *ind, int id,
                            double *features, struct gsgp_parameters *param) {
  return perform_evaluation(ind, id, features, param);
}


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

x86 assembly (clang, -O2):
<gsgp_exec_individual>:
jmp    1030 <perform_evaluation@plt>

LLVM IR (-O0):
%struct.gsgp_individual = type { i32 }
%struct.gsgp_parameters = type { i32 }
define double @gsgp_exec_individual(%struct.gsgp_individual* %0, i32 %1, double* %2, %struct.gsgp_parameters* %3) {
%5 = alloca %struct.gsgp_individual*
%6 = alloca i32
%7 = alloca double*
%8 = alloca %struct.gsgp_parameters*
store %struct.gsgp_individual* %0, %struct.gsgp_individual** %5
store i32 %1, i32* %6
store double* %2, double** %7
store %struct.gsgp_parameters* %3, %struct.gsgp_parameters** %8
%9 = load %struct.gsgp_individual*, %struct.gsgp_individual** %5
%10 = load i32, i32* %6
%11 = load double*, double** %7
%12 = load %struct.gsgp_parameters*, %struct.gsgp_parameters** %8
%13 = call double @perform_evaluation(%struct.gsgp_individual* %9, i32 %10, double* %11, %struct.gsgp_parameters* %12)
ret double %13
}

LLVM IR (-O2):
%struct.gsgp_individual = type { i32 }
%struct.gsgp_parameters = type { i32 }
define double @gsgp_exec_individual(%struct.gsgp_individual* %0, i32 %1, double* %2, %struct.gsgp_parameters* %3) {
%5 = tail call double @perform_evaluation(%struct.gsgp_individual* %0, i32 %1, double* %2, %struct.gsgp_parameters* %3)
ret double %5
}
/* Variables and functions */
size_t INT_MAX;
int cast_size_t_to_int(size_t n) { return n > INT_MAX ? INT_MAX : n; }


x86 assembly (clang, -O0):
<cast_size_t_to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2ed5(%rip),%rcx
cmp    (%rcx),%rax
jbe    112f <cast_size_t_to_int+0x2f>
mov    0x2ec5(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
jmp    1137 <cast_size_t_to_int+0x37>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cast_size_t_to_int>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%rax
cmp    %rdi,%rax
cmovae %edi,%eax
ret

LLVM IR (-O0):
@INT_MAX = global i64 0
define i32 @cast_size_t_to_int(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* @INT_MAX
%5 = icmp ugt i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i64, i64* @INT_MAX
br label %10
8: ; preds = %1
%9 = load i64, i64* %2
br label %10
10: ; preds = %8, %6
%11 = phi i64 [ %7, %6 ], [ %9, %8 ]
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@INT_MAX = global i64 0
define i32 @cast_size_t_to_int(i64 %0) {
%2 = load i64, i64* @INT_MAX
%3 = icmp ult i64 %2, %0
%4 = select i1 %3, i64 %2, i64 %0
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
float fminf(float, float);
float fmin32(float x, float y) { return fminf(x, y); }


x86 assembly (clang, -O0):
<fmin32>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm3
movss  -0x8(%rbp),%xmm2
movaps %xmm2,%xmm4
movaps %xmm3,%xmm0
cmpunordss %xmm0,%xmm0
movaps %xmm0,%xmm1
pand   %xmm4,%xmm1
minss  %xmm3,%xmm2
pandn  %xmm2,%xmm0
por    %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmin32>:
movaps %xmm0,%xmm2
cmpunordss %xmm0,%xmm2
movaps %xmm2,%xmm3
andps  %xmm1,%xmm3
minss  %xmm0,%xmm1
andnps %xmm1,%xmm2
orps   %xmm3,%xmm2
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @fmin32(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call float @llvm.minnum.f32(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @fmin32(float %0, float %1) {
%3 = tail call float @llvm.minnum.f32(float %0, float %1)
ret float %3
}
/* Variables and functions */
void *realloc(void *, size_t);
void *os_realloc_array(void *ptr, size_t nmemb, size_t size) {
  if (size && nmemb > (~(size_t)0) / size)
    return NULL;
  return realloc((ptr), (nmemb * size));
}


x86 assembly (clang, -O0):
<os_realloc_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1163 <os_realloc_array+0x53>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    $0xffffffffffffffff,%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x20(%rbp)
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
jbe    1163 <os_realloc_array+0x53>
movq   $0x0,-0x8(%rbp)
jmp    1179 <os_realloc_array+0x69>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
imul   -0x20(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_realloc_array>:
mov    %rdx,%rcx
test   %rdx,%rdx
je     1123 <os_realloc_array+0x13>
mov    %rcx,%rax
mul    %rsi
jno    1123 <os_realloc_array+0x13>
xor    %eax,%eax
ret
imul   %rsi,%rcx
mov    %rcx,%rsi
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define i8* @os_realloc_array(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%8 = load i64, i64* %7
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %3
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = udiv i64 -1, %12
%14 = icmp ugt i64 %11, %13
br i1 %14, label %15, label %16
15: ; preds = %10
store i8* null, i8** %4
br label %22
16: ; preds = %10, %3
%17 = load i8*, i8** %5
%18 = load i64, i64* %6
%19 = load i64, i64* %7
%20 = mul i64 %18, %19
%21 = call i8* @realloc(i8* %17, i64 %20)
store i8* %21, i8** %4
br label %22
22: ; preds = %16, %15
%23 = load i8*, i8** %4
ret i8* %23
}

LLVM IR (-O2):
define noalias i8* @os_realloc_array(i8* nocapture %0, i64 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %2, i64 %1)
%7 = extractvalue { i64, i1 } %6, 1
br i1 %7, label %11, label %8
8: ; preds = %5, %3
%9 = mul i64 %2, %1
%10 = tail call i8* @realloc(i8* %0, i64 %9)
br label %11
11: ; preds = %5, %8
%12 = phi i8* [ %10, %8 ], [ null, %5 ]
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ cnfExprt(char *, char *const, int);
int /*<<< orphan*/ datErmsg(int, size_t *, char *);
void dat_ermsg_(int *status, int *length, char *const msg, int msg_length) {
  char msg_c[200 + 1];
  size_t length_c;
  datErmsg(*status, &length_c, msg_c);
  *length = (int)length_c;
  cnfExprt(msg_c, msg, msg_length);
}


x86 assembly (clang, -O0):
<dat_ermsg_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
lea    -0xf0(%rbp),%rdx
lea    -0xf8(%rbp),%rsi
call   1040 <datErmsg@plt>
mov    -0xf8(%rbp),%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
lea    -0xf0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <cnfExprt@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dat_ermsg_>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0xe8,%rsp
mov    %ecx,%r14d
mov    %rdx,%rbx
mov    %rsi,%rbp
mov    (%rdi),%edi
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%r15
mov    %r15,%rdx
call   1040 <datErmsg@plt>
mov    0x8(%rsp),%eax
mov    %eax,0x0(%rbp)
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <cnfExprt@plt>
add    $0xe8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @dat_ermsg_(i32* %0, i32* %1, i8* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca [201 x i8]
%10 = alloca i64
store i32* %0, i32** %5
store i32* %1, i32** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = getelementptr inbounds [201 x i8], [201 x i8]* %9, i64 0, i64 0
%14 = call i32 @datErmsg(i32 %12, i64* %10, i8* %13)
%15 = load i64, i64* %10
%16 = trunc i64 %15 to i32
%17 = load i32*, i32** %6
store i32 %16, i32* %17
%18 = getelementptr inbounds [201 x i8], [201 x i8]* %9, i64 0, i64 0
%19 = load i8*, i8** %7
%20 = load i32, i32* %8
%21 = call i32 @cnfExprt(i8* %18, i8* %19, i32 %20)
ret void
}

LLVM IR (-O2):
define void @dat_ermsg_(i32* nocapture %0, i32* nocapture writeonly %1, i8* %2, i32 %3) {
%5 = alloca [201 x i8]
%6 = alloca i64
%7 = getelementptr inbounds [201 x i8], [201 x i8]* %5, i64 0, i64 0
%8 = bitcast i64* %6 to i8*
%9 = load i32, i32* %0
%10 = call i32 @datErmsg(i32 %9, i64* %6, i8* %7)
%11 = load i64, i64* %6
%12 = trunc i64 %11 to i32
store i32 %12, i32* %1
%13 = call i32 @cnfExprt(i8* %7, i8* %2, i32 %3)
ret void
}
unsigned long long test_csneg_uxtw(unsigned int a, unsigned int b,
                                   unsigned int c) {
  unsigned int val;
  val = a ? b : -c;
  return val;
}


x86 assembly (clang, -O0):
<test_csneg_uxtw>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1122 <test_csneg_uxtw+0x22>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    112a <test_csneg_uxtw+0x2a>
xor    %eax,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_csneg_uxtw>:
mov    %edx,%eax
neg    %eax
test   %edi,%edi
cmovne %esi,%eax
ret

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

LLVM IR (-O2):
define i64 @test_csneg_uxtw(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
%5 = sub i32 0, %2
%6 = select i1 %4, i32 %5, i32 %1
%7 = zext i32 %6 to i64
ret i64 %7
}
void snapscani_mutex_lock(int *sem_id) {}


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

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

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

LLVM IR (-O2):
define void @snapscani_mutex_lock(i32* nocapture %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int override_redirect;
};
typedef TYPE_1__ XCreateWindowEvent;

/* Variables and functions */
void set_XCreateWindowEvent_override_redirect(void *_p, int _v) {
  ((XCreateWindowEvent *)_p)->override_redirect = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XCreateWindowEvent_override_redirect>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XCreateWindowEvent_override_redirect(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
void RB_SurfaceSkip(void *surf) {}


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

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

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

LLVM IR (-O2):
define void @RB_SurfaceSkip(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ read_line(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ str_sort(char *);
int main(void) {
  char line[81];
  read_line(stdin, line);
  str_sort(line);
  printf("%s\n", line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    -0x60(%rbp),%rsi
call   1050 <read_line@plt>
lea    -0x60(%rbp),%rdi
call   1040 <str_sort@plt>
lea    -0x60(%rbp),%rsi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <read_line@plt>
mov    %rbx,%rdi
call   1040 <str_sort@plt>
lea    0xea8(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@stdin = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [81 x i8]
%2 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @read_line(i32 %3, i8* %2)
%5 = call i32 @str_sort(i8* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
double _sqrt(double);
double d2d(double);
double sqrt(double x) { return d2d(_sqrt(d2d(x))); }


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

x86 assembly (clang, -O2):
<sqrt>:
push   %rax
call   1040 <d2d@plt>
call   1030 <_sqrt@plt>
pop    %rax
jmp    1040 <d2d@plt>

LLVM IR (-O0):
define double @sqrt(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @d2d(double %3)
%5 = call double @_sqrt(double %4)
%6 = call double @d2d(double %5)
ret double %6
}

LLVM IR (-O2):
define double @sqrt(double %0) {
%2 = tail call double @d2d(double %0)
%3 = tail call double @_sqrt(double %2)
%4 = tail call double @d2d(double %3)
ret double %4
}
void f1(int n) {
  int a = 0;
  while (n--) {
    a += 1;
  }
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1130 <f1+0x30>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <f1+0xe>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f1(i32 %0) {
ret void
}
void RTVfsLockAcquireWriteSlow(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsLockAcquireWriteSlow() {
ret void
}
void dmatrix_all_free(double **m) {
  double *a;
  a = m[0];
  free(m);
  free(a);
  return;
}


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

x86 assembly (clang, -O2):
<dmatrix_all_free>:
push   %rbx
mov    (%rdi),%rbx
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @dmatrix_all_free(double** nocapture %0) {
%2 = bitcast double** %0 to i8**
%3 = load i8*, i8** %2
%4 = bitcast double** %0 to i8*
tail call void @free(i8* %4)
tail call void @free(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cs2th(int);
void cs2th_(int *iid) { cs2th(*iid); }


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

x86 assembly (clang, -O2):
<cs2th_>:
mov    (%rdi),%edi
jmp    1030 <cs2th@plt>

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

LLVM IR (-O2):
define void @cs2th_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @cs2th(i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ max_water_surface(int, int, int **);
int test_all_land() {
  int map[5][5] = {{1, 2, 2, 1, 1},
                   {2, 3, 3, 2, 1},
                   {2, 3, 4, 3, 2},
                   {1, 2, 3, 2, 1},
                   {1, 1, 2, 1, 1}};
  return 0 == max_water_surface(5, 5, map);
}


x86 assembly (clang, -O0):
<test_all_land>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x70(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x64,%edx
call   1030 <memcpy@plt>
lea    -0x70(%rbp),%rdx
mov    $0x5,%esi
mov    %esi,%edi
call   1040 <max_water_surface@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_all_land>:
sub    $0x68,%rsp
mov    0xf46(%rip),%eax
mov    %eax,0x60(%rsp)
movaps 0xf2b(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xf0f(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xef3(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed7(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xebb(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe9f(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    $0x5,%edi
mov    $0x5,%esi
call   1030 <max_water_surface@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x68,%rsp
ret

LLVM IR (-O0):
@__const.test_all_land.map = [5 x [5 x i32]] [[5 x i32] [i32 1, i32 2, i32 2, i32 1, i32 1], [5 x i32] [i32 2, i32 3, i32 3, i32 2, i32 1], [5 x i32] [i32 2, i32 3, i32 4, i32 3, i32 2], [5 x i32] [i32 1, i32 2, i32 3, i32 2, i32 1], [5 x i32] [i32 1, i32 1, i32 2, i32 1, i32 1]]
define i32 @test_all_land() {
%1 = alloca [5 x [5 x i32]]
%2 = bitcast [5 x [5 x i32]]* %1 to i8*
%3 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 0
%4 = bitcast [5 x i32]* %3 to i32**
%5 = call i64 @max_water_surface(i32 5, i32 5, i32** %4)
%6 = icmp eq i64 0, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@__const.test_all_land.map = [5 x [5 x i32]] [[5 x i32] [i32 1, i32 2, i32 2, i32 1, i32 1], [5 x i32] [i32 2, i32 3, i32 3, i32 2, i32 1], [5 x i32] [i32 2, i32 3, i32 4, i32 3, i32 2], [5 x i32] [i32 1, i32 2, i32 3, i32 2, i32 1], [5 x i32] [i32 1, i32 1, i32 2, i32 1, i32 1]]
define i32 @test_all_land() {
%1 = alloca [5 x [5 x i32]]
%2 = bitcast [5 x [5 x i32]]* %1 to i8*
%3 = bitcast [5 x [5 x i32]]* %1 to i32**
%4 = call i64 @max_water_surface(i32 5, i32 5, i32** %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
unsigned long elfinmsbu32(unsigned char *bp) {
  unsigned long v;
  (v = ((unsigned long)(bp)[0] << 24) | ((unsigned long)(bp)[1] << 16) |
       ((bp)[2] << 8) | (bp)[3]);
  return v;
}


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

x86 assembly (clang, -O2):
<elfinmsbu32>:
mov    (%rdi),%eax
shl    $0x20,%rax
bswap  %rax
ret

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

LLVM IR (-O2):
define i64 @elfinmsbu32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i64
%4 = shl nuw nsw i64 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i64
%8 = shl nuw nsw i64 %7, 16
%9 = or i64 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i64
%13 = shl nuw nsw i64 %12, 8
%14 = or i64 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i64
%18 = or i64 %14, %17
ret i64 %18
}
/* Variables and functions */
int /*<<< orphan*/ EX_SOFTWARE;
int /*<<< orphan*/ pfpanic(char *, unsigned short, unsigned short, char const *,
                           char const *, int, int, int /*<<< orphan*/);
void __pfpanic_zmq_recv(unsigned short _syslog, unsigned short _verbose,
                        const char *_function_name, const char *_file_name,
                        int _line_number, int _errno) {
  pfpanic("Unable to receive from ZeroMQ socket", _syslog, _verbose,
          _function_name, _file_name, _line_number, _errno, EX_SOFTWARE);
}


x86 assembly (clang, -O0):
<__pfpanic_zmq_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %si,%ax
mov    %di,%si
mov    %si,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x2(%rbp),%si
mov    -0x4(%rbp),%dx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
mov    -0x20(%rbp),%r10d
mov    0x2e8b(%rip),%rax
mov    (%rax),%eax
lea    0xea2(%rip),%rdi
movzwl %si,%esi
movzwl %dx,%edx
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <pfpanic@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__pfpanic_zmq_recv>:
push   %rax
mov    %r9d,%r10d
mov    %r8d,%r9d
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    0x2eb8(%rip),%rdi
mov    (%rdi),%eax
lea    0xecf(%rip),%rdi
push   %rax
push   %r10
call   1030 <pfpanic@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Unable to receive from ZeroMQ socket\00"
@EX_SOFTWARE = global i32 0
define void @__pfpanic_zmq_recv(i16 zeroext %0, i16 zeroext %1, i8* %2, i8* %3, i32 %4, i32 %5) {
%7 = alloca i16
%8 = alloca i16
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
store i16 %0, i16* %7
store i16 %1, i16* %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i16, i16* %7
%14 = load i16, i16* %8
%15 = load i8*, i8** %9
%16 = load i8*, i8** %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = load i32, i32* @EX_SOFTWARE
%20 = call i32 @pfpanic(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i16 zeroext %13, i16 zeroext %14, i8* %15, i8* %16, i32 %17, i32 %18, i32 %19)
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"Unable to receive from ZeroMQ socket\00"
@EX_SOFTWARE = global i32 0
define void @__pfpanic_zmq_recv(i16 zeroext %0, i16 zeroext %1, i8* %2, i8* %3, i32 %4, i32 %5) {
%7 = load i32, i32* @EX_SOFTWARE
%8 = tail call i32 @pfpanic(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i16 zeroext %0, i16 zeroext %1, i8* %2, i8* %3, i32 %4, i32 %5, i32 %7)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ENGINE;

/* Variables and functions */
int deadcafe_finish(ENGINE *e __attribute__((unused))) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @deadcafe_finish(i32* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t answer() { return 42; }


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

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

LLVM IR (-O0):
define i32 @answer() {
ret i32 42
}

LLVM IR (-O2):
define i32 @answer() {
ret i32 42
}
unsigned bits_mask(int l) { return (unsigned)-1 >> (32 - l); }


x86 assembly (clang, -O0):
<bits_mask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x20,%ecx
sub    -0x4(%rbp),%ecx
mov    $0xffffffff,%eax
shr    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bits_mask>:
mov    %edi,%ecx
neg    %cl
mov    $0xffffffff,%eax
shr    %cl,%eax
ret

LLVM IR (-O0):
define i32 @bits_mask(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 32, %3
%5 = lshr i32 -1, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @bits_mask(i32 %0) {
%2 = sub nsw i32 32, %0
%3 = lshr i32 -1, %2
ret i32 %3
}
int fun828() { return 828; }


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

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

LLVM IR (-O0):
define i32 @fun828() {
ret i32 828
}

LLVM IR (-O2):
define i32 @fun828() {
ret i32 828
}
/* Variables and functions */
scalar_t__ __nondet();
int /*<<< orphan*/ pop();
int /*<<< orphan*/ push();
int main() {
  for (;;) {
    if (__nondet())
      push();
    else
      pop();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__nondet@plt>
cmp    $0x0,%rax
je     115c <main+0x2c>
mov    $0x0,%al
call   1050 <push@plt>
jmp    1163 <main+0x33>
mov    $0x0,%al
call   1040 <pop@plt>
jmp    113f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
jmp    1147 <main+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1050 <push@plt>
xor    %eax,%eax
call   1030 <__nondet@plt>
test   %rax,%rax
jne    1140 <main+0x10>
xor    %eax,%eax
call   1040 <pop@plt>
jmp    1147 <main+0x17>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %9, %0
%3 = call i64 (...) @__nondet()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = call i32 (...) @push()
br label %9
7: ; preds = %2
%8 = call i32 (...) @pop()
br label %9
9: ; preds = %7, %5
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %8, %0
%2 = tail call i64 (...) @__nondet()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @push()
br label %8
6: ; preds = %1
%7 = tail call i32 (...) @pop()
br label %8
8: ; preds = %6, %4
br label %1
}
char *XDisplayName(char *display_name) { return ("127.0.0.1:0.0"); }


x86 assembly (clang, -O0):
<XDisplayName>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<XDisplayName>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"127.0.0.1:0.0\00"
define i8* @XDisplayName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"127.0.0.1:0.0\00"
define i8* @XDisplayName(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_subs_pu8(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test47(__m64 a, __m64 b) { return _mm_subs_pu8(a, b); }


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

x86 assembly (clang, -O2):
<test47>:
jmp    1030 <_mm_subs_pu8@plt>

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

LLVM IR (-O2):
define i32 @test47(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_subs_pu8(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(char *argv0) { fprintf(stderr, "RTFSC\n"); }


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

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"RTFSC\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"RTFSC\0A\00"
define void @usage(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int strlen(char *);
void strcat_delim(char *dirspec) {
  int ldirspec = strlen(dirspec);
  if (dirspec[ldirspec - 1] != '/')
    strcat(dirspec, "/");
}


x86 assembly (clang, -O0):
<strcat_delim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
je     1162 <strcat_delim+0x42>
mov    -0x8(%rbp),%rdi
lea    0xea3(%rip),%rsi
call   1040 <strcat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat_delim>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
cmpb   $0x2f,-0x1(%rax,%rbx,1)
jne    1134 <strcat_delim+0x14>
pop    %rbx
ret
lea    0xec5(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <strcat@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
define void @strcat_delim(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
store i32 %5, i32* %3
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = sub nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 47
br i1 %13, label %14, label %17
14: ; preds = %1
%15 = load i8*, i8** %2
%16 = call i32 @strcat(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %14, %1
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define void @strcat_delim(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 47
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void init(void) {
  glClearColor(0.9, 0.3, 0.1, 0.0);
  glShadeModel(GL_SMOOTH);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
movsd  0xed4(%rip),%xmm0
movsd  0xed4(%rip),%xmm1
movsd  0xed4(%rip),%xmm2
xorps  %xmm3,%xmm3
call   1030 <glClearColor@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1040 <glShadeModel@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
movsd  0xed7(%rip),%xmm2
xorps  %xmm3,%xmm3
call   1030 <glClearColor@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <glShadeModel@plt>

LLVM IR (-O0):
@GL_SMOOTH = global i32 0
define void @init() {
%1 = call i32 @glClearColor(double 9.000000e-01, double 3.000000e-01, double 1.000000e-01, double 0.000000e+00)
%2 = load i32, i32* @GL_SMOOTH
%3 = call i32 @glShadeModel(i32 %2)
ret void
}

LLVM IR (-O2):
@GL_SMOOTH = global i32 0
define void @init() {
%1 = tail call i32 @glClearColor(double 9.000000e-01, double 3.000000e-01, double 1.000000e-01, double 0.000000e+00)
%2 = load i32, i32* @GL_SMOOTH
%3 = tail call i32 @glShadeModel(i32 %2)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void myhtobe16(void *be, uint16_t h) {
  uint8_t *p = (uint8_t *)be;
  p[0] = h >> 8;
  p[1] = h & 0xff;
}


x86 assembly (clang, -O0):
<myhtobe16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<myhtobe16>:
movzbl %sil,%eax
sar    $0x8,%esi
mov    %esi,(%rdi)
mov    %eax,0x4(%rdi)
ret

LLVM IR (-O0):
define void @myhtobe16(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 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32, i32* %4
%9 = ashr i32 %8, 8
%10 = load i32*, i32** %5
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
%12 = load i32, i32* %4
%13 = and i32 %12, 255
%14 = load i32*, i32** %5
%15 = getelementptr inbounds i32, i32* %14, i64 1
store i32 %13, i32* %15
ret void
}

LLVM IR (-O2):
define void @myhtobe16(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = ashr i32 %1, 8
store i32 %4, i32* %3
%5 = and i32 %1, 255
%6 = getelementptr inbounds i8, i8* %0, i64 4
%7 = bitcast i8* %6 to i32*
store i32 %5, i32* %7
ret void
}
/* Type definitions */
struct gl_cache {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct gl_cache *);
int gl_cache_term(struct gl_cache *);
int gl_free_cache(struct gl_cache *cache) {
  int n;
  n = gl_cache_term(cache);
  if (!n) {
    free(cache);
  }
  return n;
}


x86 assembly (clang, -O0):
<gl_free_cache>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <gl_cache_term@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    114b <gl_free_cache+0x2b>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gl_free_cache>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <gl_cache_term@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    1139 <gl_free_cache+0x19>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.gl_cache = type { i32 }
define i32 @gl_free_cache(%struct.gl_cache* %0) {
%2 = tail call i32 @gl_cache_term(%struct.gl_cache* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @free(%struct.gl_cache* %0)
br label %6
6: ; preds = %4, %1
ret i32 %2
}
notrapv(unsigned i) { return i + 1; }


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

x86 assembly (clang, -O2):
<notrapv>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @notrapv(i32 %0) {
%2 = add i32 %0, 1
ret i32 %2
}
/* Variables and functions */
scalar_t__ dcac_acl_ops(int, int, int, char *, int /*<<< orphan*/ *);
int dcac_set_def_wracl(char *plain_acl) {
  return (int)dcac_acl_ops(21, -1, -1, plain_acl, NULL);
}


x86 assembly (clang, -O0):
<dcac_set_def_wracl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x15,%edi
mov    $0xffffffff,%edx
xor    %eax,%eax
mov    %eax,%r8d
mov    %edx,%esi
call   1030 <dcac_acl_ops@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcac_set_def_wracl>:
mov    %rdi,%rcx
mov    $0x15,%edi
mov    $0xffffffff,%esi
mov    $0xffffffff,%edx
xor    %r8d,%r8d
jmp    1030 <dcac_acl_ops@plt>

LLVM IR (-O0):
define i32 @dcac_set_def_wracl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @dcac_acl_ops(i32 21, i32 -1, i32 -1, i8* %3, i32* null)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @dcac_set_def_wracl(i8* %0) {
%2 = tail call i64 @dcac_acl_ops(i32 21, i32 -1, i32 -1, i8* %0, i32* null)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Type definitions */
struct tm {
  int dummy;
};
struct stat {
  int /*<<< orphan*/ st_mtime;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ gmtime_r(int /*<<< orphan*/ *, struct tm *);
int /*<<< orphan*/ print_file_info_(int /*<<< orphan*/ *, struct stat *,
                                    struct tm *);
int /*<<< orphan*/ stat(char const *, struct stat *);
void print_file_info(FILE *dst, const char *file) {
  struct stat sb;
  struct tm tm;
  stat(file, &sb);
  gmtime_r(&sb.st_mtime, &tm);
  print_file_info_(dst, &sb, &tm);
}


x86 assembly (clang, -O0):
<print_file_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <gmtime_r@plt>
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1050 <print_file_info_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_file_info>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r14
lea    0x8(%rsp),%rbx
mov    %rsi,%rdi
mov    %rbx,%rsi
call   1040 <stat@plt>
mov    %rsp,%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <gmtime_r@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1050 <print_file_info_@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
%struct.tm = type { i32 }
define void @print_file_info(i32* %0, i8* nocapture %1) {
%3 = alloca %struct.stat
%4 = alloca %struct.tm
%5 = bitcast %struct.stat* %3 to i8*
%6 = bitcast %struct.tm* %4 to i8*
%7 = call i32 @stat(i8* %1, %struct.stat* %3)
%8 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%9 = call i32 @gmtime_r(i32* %8, %struct.tm* %4)
%10 = call i32 @print_file_info_(i32* %0, %struct.stat* %3, %struct.tm* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Nvm_Init();
int /*<<< orphan*/ ReadGlobalSettings();
int /*<<< orphan*/ Report_GrblSettings();
int /*<<< orphan*/ Report_StatusMessage(int);
int /*<<< orphan*/ Settings_Restore(int);
int /*<<< orphan*/ TT_Init();
void Settings_Init(void) {
  Nvm_Init();
  if (!ReadGlobalSettings()) {
    Report_StatusMessage(7);
    Settings_Restore(0xFF);
    Report_GrblSettings();
  }
  TT_Init();
}


x86 assembly (clang, -O0):
<Settings_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1080 <Nvm_Init@plt>
mov    $0x0,%al
call   1060 <ReadGlobalSettings@plt>
cmp    $0x0,%eax
jne    1196 <Settings_Init+0x36>
mov    $0x7,%edi
call   1050 <Report_StatusMessage@plt>
mov    $0xff,%edi
call   1030 <Settings_Restore@plt>
mov    $0x0,%al
call   1070 <Report_GrblSettings@plt>
mov    $0x0,%al
call   1040 <TT_Init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Settings_Init>:
push   %rax
xor    %eax,%eax
call   1080 <Nvm_Init@plt>
xor    %eax,%eax
call   1060 <ReadGlobalSettings@plt>
test   %eax,%eax
jne    118e <Settings_Init+0x2e>
mov    $0x7,%edi
call   1050 <Report_StatusMessage@plt>
mov    $0xff,%edi
call   1030 <Settings_Restore@plt>
xor    %eax,%eax
call   1070 <Report_GrblSettings@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <TT_Init@plt>

LLVM IR (-O0):
define void @Settings_Init() {
%1 = call i32 (...) @Nvm_Init()
%2 = call i32 (...) @ReadGlobalSettings()
%3 = icmp ne i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %0
%5 = call i32 @Report_StatusMessage(i32 7)
%6 = call i32 @Settings_Restore(i32 255)
%7 = call i32 (...) @Report_GrblSettings()
br label %8
8: ; preds = %4, %0
%9 = call i32 (...) @TT_Init()
ret void
}

LLVM IR (-O2):
define void @Settings_Init() {
%1 = tail call i32 (...) @Nvm_Init()
%2 = tail call i32 (...) @ReadGlobalSettings()
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = tail call i32 @Report_StatusMessage(i32 7)
%6 = tail call i32 @Settings_Restore(i32 255)
%7 = tail call i32 (...) @Report_GrblSettings()
br label %8
8: ; preds = %4, %0
%9 = tail call i32 (...) @TT_Init()
ret void
}