xunge/DecIR huggingface dataset:
/* Type definitions */
struct netobj {
  int /*<<< orphan*/ n_len;
  int /*<<< orphan*/ n_bytes;
};
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int /*<<< orphan*/ xdr_bytes(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ *, int);
bool_t xdr_netobj(XDR *xdrs, struct netobj *np) {
  return (xdr_bytes(xdrs, &np->n_bytes, &np->n_len, 1024));
}


x86 assembly (clang, -O0):
<xdr_netobj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x4,%rsi
mov    -0x10(%rbp),%rdx
mov    $0x400,%ecx
call   1030 <xdr_bytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_netobj>:
mov    %rsi,%rdx
add    $0x4,%rsi
mov    $0x400,%ecx
jmp    1030 <xdr_bytes@plt>

LLVM IR (-O0):
%struct.netobj = type { i32, i32 }
define i32 @xdr_netobj(i32* %0, %struct.netobj* %1) {
%3 = alloca i32*
%4 = alloca %struct.netobj*
store i32* %0, i32** %3
store %struct.netobj* %1, %struct.netobj** %4
%5 = load i32*, i32** %3
%6 = load %struct.netobj*, %struct.netobj** %4
%7 = getelementptr inbounds %struct.netobj, %struct.netobj* %6, i32 0, i32 1
%8 = load %struct.netobj*, %struct.netobj** %4
%9 = getelementptr inbounds %struct.netobj, %struct.netobj* %8, i32 0, i32 0
%10 = call i32 @xdr_bytes(i32* %5, i32* %7, i32* %9, i32 1024)
ret i32 %10
}

LLVM IR (-O2):
%struct.netobj = type { i32, i32 }
define i32 @xdr_netobj(i32* %0, %struct.netobj* %1) {
%3 = getelementptr inbounds %struct.netobj, %struct.netobj* %1, i64 0, i32 1
%4 = getelementptr inbounds %struct.netobj, %struct.netobj* %1, i64 0, i32 0
%5 = tail call i32 @xdr_bytes(i32* %0, i32* %3, i32* %4, i32 1024)
ret i32 %5
}
/* Type definitions */
struct HeroState {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct HeroState *);
void HeroState_Destroy(struct HeroState *self) {
  do {
    if (self != 0)
      free(self);
  } while (0);
}


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

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

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

LLVM IR (-O2):
%struct.HeroState = type { i32 }
define void @HeroState_Destroy(%struct.HeroState* %0) {
%2 = icmp eq %struct.HeroState* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.HeroState* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_extension(char **, char *);
char *TeX_search_encoding_file(char **name) {
  handle_extension(name, ".enc");
  return *name;
}


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

x86 assembly (clang, -O2):
<TeX_search_encoding_file>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <handle_extension@plt>
mov    (%rbx),%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c".enc\00"
define i8* @TeX_search_encoding_file(i8** %0) {
%2 = tail call i32 @handle_extension(i8** %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = load i8*, i8** %0
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ max_heapify(int *, int, int);
void build_max_heap(int a[], int heapsize) {
  int i;
  for (i = heapsize / 2; i >= 0; i--) {
    max_heapify(a, i, heapsize);
  }
}


x86 assembly (clang, -O0):
<build_max_heap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1154 <build_max_heap+0x44>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <max_heapify@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <build_max_heap+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_max_heap>:
push   %rbp
push   %r14
push   %rbx
cmp    $0xffffffff,%esi
jl     1141 <build_max_heap+0x31>
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%ebp
shr    $0x1f,%ebp
add    %esi,%ebp
sar    %ebp
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <max_heapify@plt>
add    $0xffffffff,%ebp
jb     1130 <build_max_heap+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @build_max_heap(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, -2
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = sdiv i32 %1, 2
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ %9, %6 ], [ %5, %4 ]
%8 = tail call i32 @max_heapify(i32* %0, i32 %7, i32 %1)
%9 = add nsw i32 %7, -1
%10 = icmp eq i32 %7, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *);
void hfp_debug(const char *str, void *user_data) {
  const char *prefix = user_data;
  printf("%s%s\n", prefix, str);
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%s%s\0A\00"
define void @hfp_debug(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
void stop_at_ten(int i) {
  printf("%s = %d\n", "i", (i));
  if (i >= 10)
    return;
  else
    stop_at_ten(++i);
}


x86 assembly (clang, -O0):
<stop_at_ten>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xecb(%rip),%rdi
lea    0xecd(%rip),%rsi
call   1040 <printf@plt>
cmpl   $0xa,-0x4(%rbp)
jl     1150 <stop_at_ten+0x30>
jmp    115e <stop_at_ten+0x3e>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    %edi,-0x4(%rbp)
call   1030 <stop_at_ten@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop_at_ten>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
cmp    $0xb,%edi
mov    $0xa,%ebp
cmovge %edi,%ebp
add    $0x1,%ebp
lea    0xed2(%rip),%r14
lea    0xed4(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    %ebx,%ebp
jne    1140 <stop_at_ten+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%s = %d\0A\00"
@.str.1 = [2 x i8] c"i\00"
define void @stop_at_ten(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, 10
br i1 %6, label %7, label %8
7: ; preds = %1
br label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %11
11: ; preds = %7, %8
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s = %d\0A\00"
@.str.1 = [2 x i8] c"i\00"
define void @stop_at_ten(i32 %0) {
%2 = call i32 @llvm.smax.i32(i32 %0, i32 10)
br label %3
3: ; preds = %3, %1
%4 = phi i32 [ %0, %1 ], [ %6, %3 ]
%5 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = add i32 %4, 1
%7 = icmp eq i32 %4, %2
br i1 %7, label %8, label %3
8: ; preds = %3
ret void
}
int test_imm_F0int16_reg(short val) {
  return ((val) & (-0xF0 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F0int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff10,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F0int16_reg>:
test   $0xff10,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_F0int16_reg(i16 signext %0) {
%2 = and i16 %0, -240
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
void *untag_ptr(void *p) {
  return (void *)(((uintptr_t)p) & ~((uintptr_t)0x3));
}


x86 assembly (clang, -O0):
<untag_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xfffffffffffffffc,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<untag_ptr>:
mov    %rdi,%rax
and    $0xfffffffffffffffc,%rax
ret

LLVM IR (-O0):
define i8* @untag_ptr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = and i64 %4, -4
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}

LLVM IR (-O2):
define i8* @untag_ptr(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = and i64 %2, -4
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
void inc(int *i) { (*i)++; }


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

x86 assembly (clang, -O2):
<inc>:
addl   $0x1,(%rdi)
ret

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

LLVM IR (-O2):
define void @inc(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, 1
store i32 %3, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EAC_remove_all_objects();
int /*<<< orphan*/ EVP_cleanup();
void EAC_cleanup(void) {
  EAC_remove_all_objects();
  EVP_cleanup();
}


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

x86 assembly (clang, -O2):
<EAC_cleanup>:
push   %rax
xor    %eax,%eax
call   1030 <EAC_remove_all_objects@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <EVP_cleanup@plt>

LLVM IR (-O0):
define void @EAC_cleanup() {
%1 = call i32 (...) @EAC_remove_all_objects()
%2 = call i32 (...) @EVP_cleanup()
ret void
}

LLVM IR (-O2):
define void @EAC_cleanup() {
%1 = tail call i32 (...) @EAC_remove_all_objects()
%2 = tail call i32 (...) @EVP_cleanup()
ret void
}
/* Variables and functions */
double ceil(double);
double findCounter(double Time, double start, double interval) {
  double i = ceil((Time - start) / interval);
  return i + 1;
}


x86 assembly (clang, -O0):
<findCounter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1030 <ceil@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  0xeb8(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findCounter>:
push   %rax
subsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
call   1030 <ceil@plt>
addsd  0xeda(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @findCounter(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %4
%9 = load double, double* %5
%10 = fsub double %8, %9
%11 = load double, double* %6
%12 = fdiv double %10, %11
%13 = call double @llvm.ceil.f64(double %12)
store double %13, double* %7
%14 = load double, double* %7
%15 = fadd double %14, 1.000000e+00
ret double %15
}

LLVM IR (-O2):
define double @findCounter(double %0, double %1, double %2) {
%4 = fsub double %0, %1
%5 = fdiv double %4, %2
%6 = tail call double @llvm.ceil.f64(double %5)
%7 = fadd double %6, 1.000000e+00
ret double %7
}
void g_spawn_sync() {}


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

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

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

LLVM IR (-O2):
define void @g_spawn_sync() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _MM_FLUSH_ZERO_ON;
int /*<<< orphan*/ _MM_SET_FLUSH_ZERO_MODE(int /*<<< orphan*/);
void set_ftz_() { _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); }


x86 assembly (clang, -O0):
<set_ftz_>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <_MM_SET_FLUSH_ZERO_MODE@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_ftz_>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <_MM_SET_FLUSH_ZERO_MODE@plt>

LLVM IR (-O0):
@_MM_FLUSH_ZERO_ON = global i32 0
define void @set_ftz_() {
%1 = load i32, i32* @_MM_FLUSH_ZERO_ON
%2 = call i32 @_MM_SET_FLUSH_ZERO_MODE(i32 %1)
ret void
}

LLVM IR (-O2):
@_MM_FLUSH_ZERO_ON = global i32 0
define void @set_ftz_() {
%1 = load i32, i32* @_MM_FLUSH_ZERO_ON
%2 = tail call i32 @_MM_SET_FLUSH_ZERO_MODE(i32 %1)
ret void
}
int alldigits(char *s) {
  int result = !0;
  if (*s == '\0')
    return 0;
  while (*s != '\0') {
    if (!(*s >= '0' && *s <= '9'))
      return 0;
    s++;
  }
  return result;
}


x86 assembly (clang, -O0):
<alldigits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    112b <alldigits+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    1183 <alldigits+0x83>
jmp    1130 <alldigits+0x30>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     117d <alldigits+0x7d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     1160 <alldigits+0x60>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jle    116c <alldigits+0x6c>
movl   $0x0,-0x4(%rbp)
jmp    1183 <alldigits+0x83>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1130 <alldigits+0x30>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<alldigits>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1128 <alldigits+0x28>
add    $0x1,%rdi
nopl   0x0(%rax)
add    $0xd0,%cl
cmp    $0x9,%cl
ja     1128 <alldigits+0x28>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <alldigits+0x10>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @alldigits(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8* [ %10, %9 ], [ %0, %1 ]
%6 = phi i8 [ %11, %9 ], [ %2, %1 ]
%7 = add i8 %6, -48
%8 = icmp ult i8 %7, 10
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i32 [ 0, %1 ], [ 0, %4 ], [ 1, %9 ]
ret i32 %14
}
void ff_hevc_put_hevc_bi_w_epel_h16_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_h16_12_sse4() {
ret void
}
gcall(sname) char *sname;
{
  if (*sname == '^') {
    ot("jsr\tT");
    outstr(++sname);
  } else {
    ot("jsr\t");
    prefix();
    outstr(sname);
  }
  nl();
}


x86 assembly (clang, -O0):
<gcall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5e,%eax
jne    1182 <gcall+0x42>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1050 <ot@plt>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <outstr@plt>
jmp    11a2 <gcall+0x62>
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1050 <ot@plt>
mov    $0x0,%al
call   1060 <prefix@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <outstr@plt>
mov    $0x0,%al
call   1030 <nl@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcall>:
push   %rbx
mov    %rdi,%rbx
cmpb   $0x5e,(%rdi)
jne    115d <gcall+0x1d>
lea    0xeb0(%rip),%rdi
xor    %eax,%eax
call   1050 <ot@plt>
add    $0x1,%rbx
jmp    1172 <gcall+0x32>
lea    0xea2(%rip),%rdi
xor    %eax,%eax
call   1050 <ot@plt>
xor    %eax,%eax
call   1060 <prefix@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <outstr@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <nl@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"jsr\09T\00"
@.str.1 = [5 x i8] c"jsr\09\00"
define i32 @gcall(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 94
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @outstr to i32 (i8*, ...)*)(i8* %11)
br label %18
13: ; preds = %1
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%15 = call i32 (...) @prefix()
%16 = load i8*, i8** %3
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @outstr to i32 (i8*, ...)*)(i8* %16)
br label %18
18: ; preds = %13, %8
%19 = call i32 (...) @nl()
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@.str = [6 x i8] c"jsr\09T\00"
@.str.1 = [5 x i8] c"jsr\09\00"
define i32 @gcall(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 94
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds i8, i8* %0, i64 1
br label %10
7: ; preds = %1
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 (...) @prefix()
br label %10
10: ; preds = %7, %4
%11 = phi i8* [ %0, %7 ], [ %6, %4 ]
%12 = tail call i32 (i8*, ...) bitcast (i32 (...)* @outstr to i32 (i8*, ...)*)(i8* %11)
%13 = tail call i32 (...) @nl()
ret i32 undef
}
void foo(int *p) { *p = 0; }


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

x86 assembly (clang, -O2):
<foo>:
movl   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @foo(i32* nocapture writeonly %0) {
store i32 0, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ row_security_dvr(char *, char *, char *, char *);
int main(void) {
  char *application_name = "benthic";
  char *role_name = "supervisor";
  char *folder_name = "species_count";
  char *no_display_pressed_attribute_name_list_string = "";
  row_security_dvr(application_name, role_name, folder_name,
                   no_display_pressed_attribute_name_list_string);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xed7(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xec0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1030 <row_security_dvr@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee9(%rip),%rsi
lea    0xeed(%rip),%rdx
lea    0xeda(%rip),%rcx
call   1030 <row_security_dvr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"benthic\00"
@.str.1 = [11 x i8] c"supervisor\00"
@.str.2 = [14 x i8] c"species_count\00"
@.str.3 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8** %3
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8** %4
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8** %5
%6 = load i8*, i8** %2
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = call i32 @row_security_dvr(i8* %6, i8* %7, i8* %8, i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"benthic\00"
@.str.1 = [11 x i8] c"supervisor\00"
@.str.2 = [14 x i8] c"species_count\00"
@.str.3 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = tail call i32 @row_security_dvr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bcm2835_i2c_end();
void I2C_Close(void) { bcm2835_i2c_end(); }


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

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

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

LLVM IR (-O2):
define void @I2C_Close() {
%1 = tail call i32 (...) @bcm2835_i2c_end()
ret void
}
int vbat_check_cb_chain(char *vbat_check_name) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @vbat_check_cb_chain(i8* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           unsigned int, char const *, char const *, long);
int /*<<< orphan*/ stderr;
void warning_trace(const char *assertion, const char *filename,
                   const char *func, unsigned line, long val) {
  if (!val)
    return;
  fprintf(stderr, "%s:%u: %s: Warning: assertion `%s` failed, value %ld\n",
          filename, line, func, assertion, val);
}


x86 assembly (clang, -O0):
<warning_trace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    113b <warning_trace+0x2b>
jmp    1167 <warning_trace+0x57>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x8(%rbp),%r9
mov    -0x28(%rbp),%rax
lea    0xea2(%rip),%rsi
mov    %rax,(%rsp)
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warning_trace>:
test   %r8,%r8
je     113c <warning_trace+0x2c>
push   %rax
mov    %rdx,%rax
mov    %rsi,%rdx
mov    %rdi,%r9
mov    0x2eba(%rip),%rsi
mov    (%rsi),%edi
mov    %r8,(%rsp)
lea    0xecd(%rip),%rsi
mov    %rax,%r8
call   1030 <fprintf@plt>
pop    %rax
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [54 x i8] c"%s:%u: %s: Warning: assertion `%s` failed, value %ld\0A\00"
define void @warning_trace(i8* %0, i8* %1, i8* %2, i32 %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i64
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i64 %4, i64* %10
%11 = load i64, i64* %10
%12 = icmp ne i64 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %5
br label %22
14: ; preds = %5
%15 = load i32, i32* @stderr
%16 = load i8*, i8** %7
%17 = load i32, i32* %9
%18 = load i8*, i8** %8
%19 = load i8*, i8** %6
%20 = load i64, i64* %10
%21 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* %16, i32 %17, i8* %18, i8* %19, i64 %20)
br label %22
22: ; preds = %14, %13
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [54 x i8] c"%s:%u: %s: Warning: assertion `%s` failed, value %ld\0A\00"
define void @warning_trace(i8* %0, i8* %1, i8* %2, i32 %3, i64 %4) {
%6 = icmp eq i64 %4, 0
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %3, i8* %2, i8* %0, i64 %4)
br label %10
10: ; preds = %5, %7
ret void
}
double Sleef_atan2_u10(double x, double y) { return __builtin_atan2(x, y); }


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

x86 assembly (clang, -O2):
<Sleef_atan2_u10>:
jmp    1030 <atan2@plt>

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

LLVM IR (-O2):
define double @Sleef_atan2_u10(double %0, double %1) {
%3 = tail call double @atan2(double %0, double %1)
ret double %3
}
void ff_hevc_put_hevc_bi_epel_h4_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_h4_10_sse4() {
ret void
}
int mIsIndiaState(int ccode) { return (ccode >= 271 && ccode <= 305); }


x86 assembly (clang, -O0):
<mIsIndiaState>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x10f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <mIsIndiaState+0x26>
cmpl   $0x131,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mIsIndiaState>:
add    $0xfffffef1,%edi
xor    %eax,%eax
cmp    $0x23,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @mIsIndiaState(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 271
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 305
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @mIsIndiaState(i32 %0) {
%2 = add i32 %0, -271
%3 = icmp ult i32 %2, 35
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
void AAS_ClearShownDebugLines(void) {}


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

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

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

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

/* Variables and functions */
void *mellow_allocString(char *, int /*<<< orphan*/);
void *mellow_copyString(void *str) {
  return mellow_allocString((char *)(str + ((8) + (8))),
                            ((uint64_t *)(str + (8)))[0]);
}


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

x86 assembly (clang, -O2):
<mellow_copyString>:
mov    0x8(%rdi),%esi
add    $0x10,%rdi
jmp    1030 <mellow_allocString@plt>

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

LLVM IR (-O2):
define i8* @mellow_copyString(i8* %0) {
%2 = getelementptr i8, i8* %0, i64 16
%3 = getelementptr i8, i8* %0, i64 8
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = tail call i8* @mellow_allocString(i8* %2, i32 %5)
ret i8* %6
}
/* Variables and functions */
unsigned long long rdmsr(int);
int /*<<< orphan*/ wrmsr(int, unsigned long long);
void set_efer_nx(int nx) {
  unsigned long long efer;
  efer = rdmsr(0xc0000080);
  efer &= ~(1ull << 11);
  if (nx)
    efer |= (1ull << 11);
  wrmsr(0xc0000080, efer);
}


x86 assembly (clang, -O0):
<set_efer_nx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xc0000080,%edi
call   1030 <rdmsr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xfffffffffffff7ff,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     115f <set_efer_nx+0x3f>
mov    -0x10(%rbp),%rax
or     $0x800,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0xc0000080,%edi
call   1040 <wrmsr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_efer_nx>:
push   %rbx
xor    %ebx,%ebx
test   %edi,%edi
setne  %bl
mov    $0xc0000080,%edi
call   1030 <rdmsr@plt>
and    $0xfffffffffffff7ff,%rax
shl    $0xb,%rbx
or     %rax,%rbx
mov    $0xc0000080,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <wrmsr@plt>

LLVM IR (-O0):
define void @set_efer_nx(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = call i64 @rdmsr(i32 -1073741696)
store i64 %4, i64* %3
%5 = load i64, i64* %3
%6 = and i64 %5, -2049
store i64 %6, i64* %3
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i64, i64* %3
%11 = or i64 %10, 2048
store i64 %11, i64* %3
br label %12
12: ; preds = %9, %1
%13 = load i64, i64* %3
%14 = call i32 @wrmsr(i32 -1073741696, i64 %13)
ret void
}

LLVM IR (-O2):
define void @set_efer_nx(i32 %0) {
%2 = tail call i64 @rdmsr(i32 -1073741696)
%3 = and i64 %2, -2049
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i64 0, i64 2048
%6 = or i64 %3, %5
%7 = tail call i32 @wrmsr(i32 -1073741696, i64 %6)
ret void
}
/* Type definitions */
struct cart {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _cartVarDbName(char *, char *);
char *cartUsualString(struct cart *, int /*<<< orphan*/, char *);
char *cartUsualStringDb(struct cart *cart, char *db, char *var, char *usual) {
  return cartUsualString(cart, _cartVarDbName(db, var), usual);
}


x86 assembly (clang, -O0):
<cartUsualStringDb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <_cartVarDbName@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
mov    -0x20(%rbp),%rdx
call   1030 <cartUsualString@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cartUsualStringDb>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1040 <_cartVarDbName@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <cartUsualString@plt>

LLVM IR (-O0):
%struct.cart = type { i32 }
define i8* @cartUsualStringDb(%struct.cart* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.cart*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.cart* %0, %struct.cart** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load %struct.cart*, %struct.cart** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = call i32 @_cartVarDbName(i8* %10, i8* %11)
%13 = load i8*, i8** %8
%14 = call i8* @cartUsualString(%struct.cart* %9, i32 %12, i8* %13)
ret i8* %14
}

LLVM IR (-O2):
%struct.cart = type { i32 }
define i8* @cartUsualStringDb(%struct.cart* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @_cartVarDbName(i8* %1, i8* %2)
%6 = tail call i8* @cartUsualString(%struct.cart* %0, i32 %5, i8* %3)
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ MD5_CTX;

/* Variables and functions */
int /*<<< orphan*/ md5_block_data_order(int /*<<< orphan*/ *, void const *,
                                        size_t);
void HASH_BLOCK_DATA_ORDER(MD5_CTX *c, const void *p, size_t num) {
  md5_block_data_order(c, p, num);
  return;
}


x86 assembly (clang, -O0):
<HASH_BLOCK_DATA_ORDER>:
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 <md5_block_data_order@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HASH_BLOCK_DATA_ORDER>:
jmp    1030 <md5_block_data_order@plt>

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

LLVM IR (-O2):
define void @HASH_BLOCK_DATA_ORDER(i32* %0, i8* %1, i64 %2) {
%4 = tail call i32 @md5_block_data_order(i32* %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Ello, World!\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"Ello, World!\0A\00"
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 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Ello, World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
char *hash_plugin_detailed(void) {
  return ("phpbb3 - phpBB3 hashes plugin\n"
          "------------------------\n"
          "Use this module to crack phpbb3 passwords\n"
          "Input should be in form: \'user:hash\' or just \'hash\'.\n"
          "Known software that uses this password hashing method:\n"
          "phpBB > 3.0.x\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


x86 assembly (clang, -O0):
<hash_plugin_detailed>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [265 x i8] c"phpbb3 - phpBB3 hashes plugin\0A------------------------\0AUse this module to crack phpbb3 passwords\0AInput should be in form: 'user:hash' or just 'hash'.\0AKnown software that uses this password hashing method:\0AphpBB > 3.0.x\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([265 x i8], [265 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [265 x i8] c"phpbb3 - phpBB3 hashes plugin\0A------------------------\0AUse this module to crack phpbb3 passwords\0AInput should be in form: 'user:hash' or just 'hash'.\0AKnown software that uses this password hashing method:\0AphpBB > 3.0.x\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([265 x i8], [265 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void testBash(char *bashFile) { system(bashFile); }


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

x86 assembly (clang, -O2):
<testBash>:
jmp    1030 <system@plt>

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

LLVM IR (-O2):
define void @testBash(i8* nocapture %0) {
%2 = tail call i32 @system(i8* %0)
ret void
}
/* Variables and functions */
int EINTR;
int __aio_close(int);
int __syscall_cp(int, int);
int __syscall_ret(int);
int close(int fd) {
  fd = __aio_close(fd);
  int r = __syscall_cp(6, fd);
  if (r == -EINTR)
    r = 0;
  return __syscall_ret(r);
}


x86 assembly (clang, -O0):
<close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <__aio_close@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x6,%edi
call   1040 <__syscall_cp@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    %ecx,%ecx
mov    0x2e7e(%rip),%rdx
sub    (%rdx),%ecx
cmp    %ecx,%eax
jne    1173 <close+0x43>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <__syscall_ret@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close>:
push   %rax
call   1030 <__aio_close@plt>
mov    $0x6,%edi
mov    %eax,%esi
call   1040 <__syscall_cp@plt>
mov    0x2e97(%rip),%rcx
xor    %edi,%edi
mov    (%rcx),%ecx
add    %eax,%ecx
cmovne %eax,%edi
pop    %rax
jmp    1050 <__syscall_ret@plt>

LLVM IR (-O0):
@EINTR = global i32 0
define i32 @close(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @__aio_close(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @__syscall_cp(i32 6, i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = load i32, i32* @EINTR
%10 = sub nsw i32 0, %9
%11 = icmp eq i32 %8, %10
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 0, i32* %3
br label %13
13: ; preds = %12, %1
%14 = load i32, i32* %3
%15 = call i32 @__syscall_ret(i32 %14)
ret i32 %15
}

LLVM IR (-O2):
@EINTR = global i32 0
define i32 @close(i32 %0) {
%2 = tail call i32 @__aio_close(i32 %0)
%3 = tail call i32 @__syscall_cp(i32 6, i32 %2)
%4 = load i32, i32* @EINTR
%5 = sub nsw i32 0, %4
%6 = icmp eq i32 %3, %5
%7 = select i1 %6, i32 0, i32 %3
%8 = tail call i32 @__syscall_ret(i32 %7)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void test_condition(int value) {
  printf("Testing condition for x = %i: ", value);
  if (value) {
    printf("true");
  } else {
    printf("false");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<test_condition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
je     1149 <test_condition+0x39>
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1157 <test_condition+0x47>
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_condition>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
lea    0xee8(%rip),%rax
lea    0xedc(%rip),%rdi
cmove  %rax,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Testing condition for x = %i: \00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [6 x i8] c"false\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @test_condition(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %11
9: ; preds = %1
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"Testing condition for x = %i: \00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [6 x i8] c"false\00"
define void @test_condition(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp eq i32 %0, 0
%4 = select i1 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %4)
%6 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check_offloading();
int main(void) {
  check_offloading();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @check_offloading()
ret i32 0
}
void pad_with_nops(void) {
  asm volatile("nop");
  asm volatile("nop");
  asm volatile("nop");
  asm volatile("nop");
  asm volatile("nop");
  asm volatile("nop");
}


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

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

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

LLVM IR (-O2):
define void @pad_with_nops() {
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}