xunge/DecIR huggingface dataset:
/* Variables and functions */
int visitor_counter(const char *key, void *data, void *arg) {
  (void)key;
  (void)data;
  size_t *count = arg;
  count[0]++;
  return 0;
}


x86 assembly (clang, -O0):
<visitor_counter>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<visitor_counter>:
addq   $0x1,(%rdx)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @visitor_counter(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = bitcast i8* %10 to i64*
store i64* %11, i64** %7
%12 = load i64*, i64** %7
%13 = getelementptr inbounds i64, i64* %12, i64 0
%14 = load i64, i64* %13
%15 = add i64 %14, 1
store i64 %15, i64* %13
ret i32 0
}

LLVM IR (-O2):
define i32 @visitor_counter(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture %2) {
%4 = bitcast i8* %2 to i64*
%5 = load i64, i64* %4
%6 = add i64 %5, 1
store i64 %6, i64* %4
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_dobldobl_drop_coordinate_by_index(int k) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc(348, &k, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_dobldobl_drop_coordinate_by_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x15c,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @solcon_dobldobl_drop_coordinate_by_index(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %4
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc(i32 348, i32* %2, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @solcon_dobldobl_drop_coordinate_by_index(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 348, i32* %2, i32* undef, double* undef)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ pmu_set_sleep_clk(int, int, int, int);
void pmu_set_sleep_low() { pmu_set_sleep_clk(0x5, 0x2, 0x1, 0x2); }


x86 assembly (clang, -O0):
<pmu_set_sleep_low>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
mov    $0x2,%ecx
mov    $0x1,%edx
mov    %ecx,%esi
call   1030 <pmu_set_sleep_clk@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_set_sleep_low>:
mov    $0x5,%edi
mov    $0x2,%esi
mov    $0x1,%edx
mov    $0x2,%ecx
jmp    1030 <pmu_set_sleep_clk@plt>

LLVM IR (-O0):
define void @pmu_set_sleep_low() {
%1 = call i32 @pmu_set_sleep_clk(i32 5, i32 2, i32 1, i32 2)
ret void
}

LLVM IR (-O2):
define void @pmu_set_sleep_low() {
%1 = tail call i32 @pmu_set_sleep_clk(i32 5, i32 2, i32 1, i32 2)
ret void
}
void ath_dynack_init(struct ath_hw *ah) {}


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

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

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

LLVM IR (-O2):
%struct.ath_hw = type opaque
define void @ath_dynack_init(%struct.ath_hw* nocapture %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ int16_t;

/* Variables and functions */
void bound_int16(int16_t *number, int16_t max, int16_t min) {
  if (*number > max)
    *number = max;
  else if (*number < min)
    *number = min;
}


x86 assembly (clang, -O0):
<bound_int16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
jle    1131 <bound_int16+0x31>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    1152 <bound_int16+0x52>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
cmp    -0x18(%rbp),%rax
jge    114d <bound_int16+0x4d>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    1152 <bound_int16+0x52>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bound_int16>:
mov    (%rdi),%rax
cmp    %rsi,%rax
jg     1110 <bound_int16+0x10>
mov    %rdx,%rsi
cmp    %rdx,%rax
jge    1113 <bound_int16+0x13>
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
define void @bound_int16(i64* %0, i64 %1, i64 %2) {
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i64
store i64* %0, i64** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64*, i64** %4
%8 = load i64, i64* %7
%9 = load i64, i64* %5
%10 = icmp sgt i64 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = load i64, i64* %5
%13 = load i64*, i64** %4
store i64 %12, i64* %13
br label %23
14: ; preds = %3
%15 = load i64*, i64** %4
%16 = load i64, i64* %15
%17 = load i64, i64* %6
%18 = icmp slt i64 %16, %17
br i1 %18, label %19, label %22
19: ; preds = %14
%20 = load i64, i64* %6
%21 = load i64*, i64** %4
store i64 %20, i64* %21
br label %22
22: ; preds = %19, %14
br label %23
23: ; preds = %22, %11
ret void
}

LLVM IR (-O2):
define void @bound_int16(i64* nocapture %0, i64 %1, i64 %2) {
%4 = load i64, i64* %0
%5 = icmp sgt i64 %4, %1
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = icmp slt i64 %4, %2
br i1 %7, label %8, label %10
8: ; preds = %6, %3
%9 = phi i64 [ %1, %3 ], [ %2, %6 ]
store i64 %9, i64* %0
br label %10
10: ; preds = %8, %6
ret void
}
void twoxsai_generic_output(void *data, unsigned *out_width,
                            unsigned *out_height, unsigned width,
                            unsigned height) {
  *out_width = width * 2;
  *out_height = height * 2;
}


x86 assembly (clang, -O0):
<twoxsai_generic_output>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<twoxsai_generic_output>:
add    %ecx,%ecx
mov    %ecx,(%rsi)
add    %r8d,%r8d
mov    %r8d,(%rdx)
ret

LLVM IR (-O0):
define void @twoxsai_generic_output(i8* %0, i32* %1, i32* %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %9
%12 = mul i32 %11, 2
%13 = load i32*, i32** %7
store i32 %12, i32* %13
%14 = load i32, i32* %10
%15 = mul i32 %14, 2
%16 = load i32*, i32** %8
store i32 %15, i32* %16
ret void
}

LLVM IR (-O2):
define void @twoxsai_generic_output(i8* nocapture readnone %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32 %3, i32 %4) {
%6 = shl i32 %3, 1
store i32 %6, i32* %1
%7 = shl i32 %4, 1
store i32 %7, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PossiblyQuoteName(char *);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char *);
void CatPossiblyQuotedName(char *str, const char *name) {
  int len;
  len = (int)strlen(str);
  strcpy(str + len, name);
  PossiblyQuoteName(str + len);
}


x86 assembly (clang, -O0):
<CatPossiblyQuotedName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
add    %rax,%rdi
call   1040 <PossiblyQuoteName@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CatPossiblyQuotedName>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1050 <strlen@plt>
movslq %eax,%rbx
add    %r15,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <PossiblyQuoteName@plt>

LLVM IR (-O0):
define void @CatPossiblyQuotedName(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = trunc i64 %7 to i32
store i32 %8, i32* %5
%9 = load i8*, i8** %3
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8*, i8** %4
%14 = call i32 @strcpy(i8* %12, i8* %13)
%15 = load i8*, i8** %3
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = call i32 @PossiblyQuoteName(i8* %18)
ret void
}

LLVM IR (-O2):
define void @CatPossiblyQuotedName(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = shl i64 %3, 32
%5 = ashr exact i64 %4, 32
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = tail call i32 @strcpy(i8* %6, i8* %1)
%8 = tail call i32 @PossiblyQuoteName(i8* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emit_cmovl_imm(int, int);
int /*<<< orphan*/ emit_cmpimm(int, int);
int /*<<< orphan*/ emit_movimm(int /*<<< orphan*/, int);
int /*<<< orphan*/ emit_zeroreg(int);
void emit_slti32(int rs, int imm, int rt) {
  if (rs != rt)
    emit_zeroreg(rt);
  emit_cmpimm(rs, imm);
  if (rs == rt)
    emit_movimm(0, rt);
  emit_cmovl_imm(1, rt);
}


x86 assembly (clang, -O0):
<emit_slti32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1165 <emit_slti32+0x25>
mov    -0xc(%rbp),%edi
call   1030 <emit_zeroreg@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <emit_cmpimm@plt>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1186 <emit_slti32+0x46>
mov    -0xc(%rbp),%esi
xor    %edi,%edi
call   1060 <emit_movimm@plt>
mov    -0xc(%rbp),%esi
mov    $0x1,%edi
call   1050 <emit_cmovl_imm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_slti32>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
cmp    %edx,%edi
jne    1164 <emit_slti32+0x24>
mov    %ebp,%edi
mov    %r14d,%esi
call   1040 <emit_cmpimm@plt>
xor    %edi,%edi
mov    %ebp,%esi
call   1060 <emit_movimm@plt>
jmp    1175 <emit_slti32+0x35>
mov    %ebx,%edi
call   1030 <emit_zeroreg@plt>
mov    %ebp,%edi
mov    %r14d,%esi
call   1040 <emit_cmpimm@plt>
mov    $0x1,%edi
mov    %ebx,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <emit_cmovl_imm@plt>

LLVM IR (-O0):
define void @emit_slti32(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 = load i32, i32* %6
%9 = icmp ne i32 %7, %8
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i32, i32* %6
%12 = call i32 @emit_zeroreg(i32 %11)
br label %13
13: ; preds = %10, %3
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = call i32 @emit_cmpimm(i32 %14, i32 %15)
%17 = load i32, i32* %4
%18 = load i32, i32* %6
%19 = icmp eq i32 %17, %18
br i1 %19, label %20, label %23
20: ; preds = %13
%21 = load i32, i32* %6
%22 = call i32 @emit_movimm(i32 0, i32 %21)
br label %23
23: ; preds = %20, %13
%24 = load i32, i32* %6
%25 = call i32 @emit_cmovl_imm(i32 1, i32 %24)
ret void
}

LLVM IR (-O2):
define void @emit_slti32(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, %2
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = tail call i32 @emit_zeroreg(i32 %2)
%7 = tail call i32 @emit_cmpimm(i32 %0, i32 %1)
br label %11
8: ; preds = %3
%9 = tail call i32 @emit_cmpimm(i32 %0, i32 %1)
%10 = tail call i32 @emit_movimm(i32 0, i32 %0)
br label %11
11: ; preds = %5, %8
%12 = tail call i32 @emit_cmovl_imm(i32 1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ perror(char const *);
void pr_error(const char *msg) {
  perror(msg);
  abort();
}


x86 assembly (clang, -O0):
<pr_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<pr_error>:
push   %rax
call   1040 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @pr_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @pr_error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 (...) @abort()
unreachable
}
void outsb(int port, const void *addr, unsigned long count) {
  __asm__ __volatile__("rep; outs"
                       "b"
                       : "+S"(addr), "+c"(count)
                       : "d"(port));
}


x86 assembly (clang, -O0):
<outsb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x4(%rbp),%edx
rep outsb %ds:(%rsi),(%dx)
mov    %rsi,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outsb>:
mov    %rdx,%rcx
mov    %edi,%edx
rep outsb %ds:(%rsi),(%dx)
ret

LLVM IR (-O0):
define void @outsb(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 i8*, i8** %5
%8 = load i64, i64* %6
%9 = load i32, i32* %4
%10 = call { i8*, i64 } asm sideeffect "rep; outsb", "={si},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i32 %9, i8* %7, i64 %8)
%11 = extractvalue { i8*, i64 } %10, 0
%12 = extractvalue { i8*, i64 } %10, 1
store i8* %11, i8** %5
store i64 %12, i64* %6
ret void
}

LLVM IR (-O2):
define void @outsb(i32 %0, i8* %1, i64 %2) {
%4 = tail call { i8*, i64 } asm sideeffect "rep; outsb", "={si},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i32 %0, i8* %1, i64 %2)
ret void
}
unsigned xrop3_177_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = S ^ T;
  stk2 = D | stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_177_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_177_1_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
mov    %esi,%eax
shl    $0x8,%eax
lea    (%rsi,%rax,1),%edx
xor    %ecx,%eax
or     %edi,%ecx
or     $0xff,%eax
xor    %edx,%eax
or     %ecx,%eax
not    %eax
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_177_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = or i32 %4, %3
%6 = zext i8 %1 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %6
%9 = xor i32 %7, %4
%10 = or i32 %9, 255
%11 = xor i32 %10, %8
%12 = or i32 %5, %11
%13 = xor i32 %12, -1
%14 = or i32 %13, %3
ret i32 %14
}
int ft_isspace(int c) {
  return (c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' ||
          c == '\r');
}


x86 assembly (clang, -O0):
<ft_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <ft_isspace+0x5c>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <ft_isspace+0x5c>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <ft_isspace+0x5c>
mov    $0x1,%al
cmpl   $0xb,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <ft_isspace+0x5c>
mov    $0x1,%al
cmpl   $0xc,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <ft_isspace+0x5c>
cmpl   $0xd,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isspace>:
mov    $0x1,%eax
lea    -0x9(%rdi),%ecx
cmp    $0x4,%ecx
jae    110e <ft_isspace+0xe>
ret
cmp    $0x20,%edi
je     110d <ft_isspace+0xd>
xor    %eax,%eax
cmp    $0xd,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @ft_isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 12, label %5
i32 11, label %5
i32 10, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 13
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
int __IUSAT(int, int);
__attribute__((always_)) uint32_t __UQASX(uint32_t x, uint32_t y) {
  int32_t r, s;
  r = __IUSAT((((x << 16) >> 16) - ((y) >> 16)), 16) & 0x0000FFFF;
  s = __IUSAT((((x) >> 16) + ((y << 16) >> 16)), 16) & 0x0000FFFF;
  return ((s << 16) | (r));
}


x86 assembly (clang, -O0):
<__UQASX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
shl    $0x10,%edi
sar    $0x10,%edi
mov    -0x8(%rbp),%eax
sar    $0x10,%eax
sub    %eax,%edi
mov    $0x10,%esi
call   1030 <__IUSAT@plt>
and    $0xffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x10,%edi
mov    -0x8(%rbp),%eax
shl    $0x10,%eax
sar    $0x10,%eax
add    %eax,%edi
mov    $0x10,%esi
call   1030 <__IUSAT@plt>
and    $0xffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x10,%eax
or     -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__UQASX>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%ebp
movswl %bp,%edi
mov    %esi,%eax
sar    $0x10,%eax
sub    %eax,%edi
mov    $0x10,%esi
call   1030 <__IUSAT@plt>
movzwl %ax,%r14d
sar    $0x10,%ebp
movswl %bx,%edi
add    %ebp,%edi
mov    $0x10,%esi
call   1030 <__IUSAT@plt>
shl    $0x10,%eax
or     %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @__UQASX(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = shl i32 %7, 16
%9 = ashr i32 %8, 16
%10 = load i32, i32* %4
%11 = ashr i32 %10, 16
%12 = sub nsw i32 %9, %11
%13 = call i32 @__IUSAT(i32 %12, i32 16)
%14 = and i32 %13, 65535
store i32 %14, i32* %5
%15 = load i32, i32* %3
%16 = ashr i32 %15, 16
%17 = load i32, i32* %4
%18 = shl i32 %17, 16
%19 = ashr i32 %18, 16
%20 = add nsw i32 %16, %19
%21 = call i32 @__IUSAT(i32 %20, i32 16)
%22 = and i32 %21, 65535
store i32 %22, i32* %6
%23 = load i32, i32* %6
%24 = shl i32 %23, 16
%25 = load i32, i32* %5
%26 = or i32 %24, %25
ret i32 %26
}

LLVM IR (-O2):
define i32 @__UQASX(i32 %0, i32 %1) {
%3 = shl i32 %0, 16
%4 = ashr exact i32 %3, 16
%5 = ashr i32 %1, 16
%6 = sub nsw i32 %4, %5
%7 = tail call i32 @__IUSAT(i32 %6, i32 16)
%8 = and i32 %7, 65535
%9 = ashr i32 %0, 16
%10 = shl i32 %1, 16
%11 = ashr exact i32 %10, 16
%12 = add nsw i32 %11, %9
%13 = tail call i32 @__IUSAT(i32 %12, i32 16)
%14 = shl i32 %13, 16
%15 = or i32 %14, %8
ret i32 %15
}
void g_type_depth() {}


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

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

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

LLVM IR (-O2):
define void @g_type_depth() {
ret void
}
void gtk_font_selection_dialog_get_font_name() {}


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

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

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

LLVM IR (-O2):
define void @gtk_font_selection_dialog_get_font_name() {
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ auth_attr;
};
typedef TYPE_1__ PKCS7_SIGNER_INFO;
typedef int /*<<< orphan*/ ASN1_TYPE;

/* Variables and functions */
int /*<<< orphan*/ *get_attribute(int /*<<< orphan*/, int);
ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid) {
  return (get_attribute(si->auth_attr, nid));
}


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

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

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

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
define i32* @PKCS7_get_signed_attribute(%struct.TYPE_3__* nocapture %0, i32 %1) {
%3 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = tail call i32* @get_attribute(i32 %4, i32 %1)
ret i32* %5
}
/* Variables and functions */
int /*<<< orphan*/ dma_stop();
void pb_stop(void) { dma_stop(); }


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

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

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

LLVM IR (-O2):
define void @pb_stop() {
%1 = tail call i32 (...) @dma_stop()
ret void
}
void RFA1RadioP__UniqueConfig__reportChannelError(void) {}


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

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

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

LLVM IR (-O2):
define void @RFA1RadioP__UniqueConfig__reportChannelError() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_letters(int, char *);
int strlen(char *);
void print_arguments(int argc, char *argv[]) {
  int i;
  int len;
  for (i = 1; i < argc; i++) {
    len = strlen(argv[i]);
    print_letters(len, argv[i]);
  }
}


x86 assembly (clang, -O0):
<print_arguments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1178 <print_arguments+0x58>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1040 <print_letters@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1136 <print_arguments+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_arguments>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     115d <print_arguments+0x3d>
mov    %rsi,%r15
mov    %edi,%r14d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r15,%rbx,8),%rdi
call   1030 <strlen@plt>
mov    (%r15,%rbx,8),%rsi
mov    %eax,%edi
call   1040 <print_letters@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1140 <print_arguments+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @print_arguments(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %13, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @strlen(i8* %9)
%11 = load i8*, i8** %8
%12 = tail call i32 @print_letters(i32 %10, i8* %11)
%13 = add nuw nsw i64 %7, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %15, label %6
15: ; preds = %6, %2
ret void
}
void helper4() {}


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

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

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

LLVM IR (-O2):
define void @helper4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _dorand48(unsigned short *);
double ldexp(double, int);
double erand48(unsigned short xseed[3]) {
  _dorand48(xseed);
  return ldexp((double)xseed[0], -48) + ldexp((double)xseed[1], -32) +
         ldexp((double)xseed[2], -16);
}


x86 assembly (clang, -O0):
<erand48>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_dorand48@plt>
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
cvtsi2sd %eax,%xmm0
mov    $0xffffffd0,%edi
call   1030 <ldexp@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movzwl 0x2(%rax),%eax
cvtsi2sd %eax,%xmm0
mov    $0xffffffe0,%edi
call   1030 <ldexp@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl 0x4(%rax),%eax
cvtsi2sd %eax,%xmm0
mov    $0xfffffff0,%edi
call   1030 <ldexp@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erand48>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1040 <_dorand48@plt>
movzwl (%rbx),%eax
cvtsi2sd %eax,%xmm0
mov    $0xffffffd0,%edi
call   1030 <ldexp@plt>
movsd  %xmm0,0x8(%rsp)
movzwl 0x2(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    $0xffffffe0,%edi
call   1030 <ldexp@plt>
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movzwl 0x4(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    $0xfffffff0,%edi
call   1030 <ldexp@plt>
addsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @erand48(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = call i32 @_dorand48(i16* %3)
%5 = load i16*, i16** %2
%6 = getelementptr inbounds i16, i16* %5, i64 0
%7 = load i16, i16* %6
%8 = uitofp i16 %7 to double
%9 = call double @ldexp(double %8, i32 -48)
%10 = load i16*, i16** %2
%11 = getelementptr inbounds i16, i16* %10, i64 1
%12 = load i16, i16* %11
%13 = uitofp i16 %12 to double
%14 = call double @ldexp(double %13, i32 -32)
%15 = fadd double %9, %14
%16 = load i16*, i16** %2
%17 = getelementptr inbounds i16, i16* %16, i64 2
%18 = load i16, i16* %17
%19 = uitofp i16 %18 to double
%20 = call double @ldexp(double %19, i32 -16)
%21 = fadd double %15, %20
ret double %21
}

LLVM IR (-O2):
define double @erand48(i16* %0) {
%2 = tail call i32 @_dorand48(i16* %0)
%3 = load i16, i16* %0
%4 = uitofp i16 %3 to double
%5 = tail call double @ldexp(double %4, i32 -48)
%6 = getelementptr inbounds i16, i16* %0, i64 1
%7 = load i16, i16* %6
%8 = uitofp i16 %7 to double
%9 = tail call double @ldexp(double %8, i32 -32)
%10 = fadd double %5, %9
%11 = getelementptr inbounds i16, i16* %0, i64 2
%12 = load i16, i16* %11
%13 = uitofp i16 %12 to double
%14 = tail call double @ldexp(double %13, i32 -16)
%15 = fadd double %10, %14
ret double %15
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ getopt_long_test(int, char **);
int main(int argc, char *argv[]) {
  getopt_long_test(argc, argv);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <getopt_long_test@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <getopt_long_test@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @getopt_long_test(i32 %6, i8** %7)
%9 = load i32, i32* @EXIT_SUCCESS
%10 = call i32 @exit(i32 %9)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @getopt_long_test(i32 %0, i8** %1)
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
struct Userland_slab {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ munmap(struct Userland_slab *, size_t);
void destroy_slab(struct Userland_slab *slab, size_t slab_sz) {
  assert(slab != NULL);
  munmap(slab, slab_sz);
}


x86 assembly (clang, -O0):
<destroy_slab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <munmap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_slab>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <munmap@plt>

LLVM IR (-O0):
%struct.Userland_slab = type { i32 }
define void @destroy_slab(%struct.Userland_slab* %0, i64 %1) {
%3 = alloca %struct.Userland_slab*
%4 = alloca i64
store %struct.Userland_slab* %0, %struct.Userland_slab** %3
store i64 %1, i64* %4
%5 = load %struct.Userland_slab*, %struct.Userland_slab** %3
%6 = icmp ne %struct.Userland_slab* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load %struct.Userland_slab*, %struct.Userland_slab** %3
%10 = load i64, i64* %4
%11 = call i32 @munmap(%struct.Userland_slab* %9, i64 %10)
ret void
}

LLVM IR (-O2):
%struct.Userland_slab = type { i32 }
define void @destroy_slab(%struct.Userland_slab* %0, i64 %1) {
%3 = icmp ne %struct.Userland_slab* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @munmap(%struct.Userland_slab* %0, i64 %1)
ret void
}
/* Variables and functions */
scalar_t__ Xcalloc(unsigned long, int);
void *ag_Xmalloc0(unsigned long bytes) { return (void *)Xcalloc(bytes, 1); }


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

x86 assembly (clang, -O2):
<ag_Xmalloc0>:
mov    $0x1,%esi
jmp    1030 <Xcalloc@plt>

LLVM IR (-O0):
define i8* @ag_Xmalloc0(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @Xcalloc(i64 %3, i32 1)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @ag_Xmalloc0(i64 %0) {
%2 = tail call i64 @Xcalloc(i64 %0, i32 1)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
unsigned hashdjb2(const void *key) {
  const char *ptr = key;
  int c;
  unsigned hash = 5381;
  while ((c = *ptr++))
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<hashdjb2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x1505,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1149 <hashdjb2+0x49>
mov    -0x18(%rbp),%eax
shl    $0x5,%eax
add    -0x18(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1117 <hashdjb2+0x17>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashdjb2>:
mov    (%rdi),%cl
test   %cl,%cl
je     1138 <hashdjb2+0x38>
add    $0x1,%rdi
mov    $0x1505,%edx
mov    %edx,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %cl,%ecx
shl    $0x5,%eax
add    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1120 <hashdjb2+0x20>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i32 @hashdjb2(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = mul i32 %6, 33
%11 = add i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 5381, %1 ], [ %11, %4 ]
ret i32 %15
}
int pointsystem_wta(int players, int alive) { return alive == 1; }


x86 assembly (clang, -O0):
<pointsystem_wta>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointsystem_wta>:
xor    %eax,%eax
cmp    $0x1,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @pointsystem_wta(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @pointsystem_wta(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int power(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
void main() {
  int a, b, c;
  printf("enter the nos.: ");
  scanf("%d%d", &a, &b);
  c = power(a, b);
  printf("Pow= %d", c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec4(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <power@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecb(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1030 <power@plt>
lea    0xeb0(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [17 x i8] c"enter the nos.: \00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [8 x i8] c"Pow= %d\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @power(i32 %6, i32 %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"enter the nos.: \00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [8 x i8] c"Pow= %d\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @power(i32 %7, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret void
}
expozero(short int *exp) { return ((exp[0] == 0) ? 1 : 0); }


x86 assembly (clang, -O0):
<expozero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<expozero>:
xor    %eax,%eax
cmpw   $0x0,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @expozero(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = getelementptr inbounds i16, i16* %3, i64 0
%5 = load i16, i16* %4
%6 = sext i16 %5 to i32
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 1, i32 0
ret i32 %9
}

LLVM IR (-O2):
define i32 @expozero(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = icmp eq i16 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int abs(int);
int _casemod(int x, int v) {
  int r = abs(x % v);
  if (x < 0)
    r = v - r;
  return r;
}


x86 assembly (clang, -O0):
<_casemod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%edi
call   1030 <abs@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1142 <_casemod+0x32>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_casemod>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
neg    %eax
cmovs  %edx,%eax
sub    %eax,%esi
test   %edi,%edi
cmovs  %esi,%eax
ret

LLVM IR (-O0):
define i32 @_casemod(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* %3
%7 = load i32, i32* %4
%8 = srem i32 %6, %7
%9 = call i32 @abs(i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = sub nsw i32 %13, %14
store i32 %15, i32* %5
br label %16
16: ; preds = %12, %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
define i32 @_casemod(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = tail call i32 @llvm.abs.i32(i32 %3, i1 true)
%5 = icmp slt i32 %0, 0
%6 = sub nsw i32 %1, %4
%7 = select i1 %5, i32 %6, i32 %4
ret i32 %7
}
unsigned int appendPage(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @appendPage() {
ret i32 1
}
int test_imm_5Bint32_mem(int *val) {
  return ((*val) & (0x5B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Bint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x5b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Bint32_mem>:
testb  $0x5b,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_5Bint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 91
%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_5Bint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 91
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int isdigit(int a) { return (((unsigned)(a) - '0') < 10); }


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x30,%eax
cmp    $0xa,%eax
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub i32 %3, 48
%5 = icmp ult i32 %4, 10
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  int dummy;
};

/* Variables and functions */
int gettimeofday(struct timeval *, struct timezone *);
scalar_t__ inc_addr(void *, int);
int bad_gettimeofday(void *addr) {
  struct timezone *tz = (struct timezone *)inc_addr(addr, 1);
  return gettimeofday((struct timeval *)addr, tz);
}


x86 assembly (clang, -O0):
<bad_gettimeofday>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <inc_addr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <gettimeofday@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bad_gettimeofday>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1040 <inc_addr@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <gettimeofday@plt>

LLVM IR (-O0):
%struct.timezone = type { i32 }
%struct.timeval = type { i32 }
define i32 @bad_gettimeofday(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.timezone*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @inc_addr(i8* %4, i32 1)
%6 = inttoptr i64 %5 to %struct.timezone*
store %struct.timezone* %6, %struct.timezone** %3
%7 = load i8*, i8** %2
%8 = bitcast i8* %7 to %struct.timeval*
%9 = load %struct.timezone*, %struct.timezone** %3
%10 = call i32 @gettimeofday(%struct.timeval* %8, %struct.timezone* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.timezone = type { i32 }
%struct.timeval = type { i32 }
define i32 @bad_gettimeofday(i8* %0) {
%2 = tail call i64 @inc_addr(i8* %0, i32 1)
%3 = inttoptr i64 %2 to %struct.timezone*
%4 = bitcast i8* %0 to %struct.timeval*
%5 = tail call i32 @gettimeofday(%struct.timeval* %4, %struct.timezone* %3)
ret i32 %5
}
unsigned int to_little(unsigned int a) {
  unsigned char *buf = (unsigned char *)(&a);
  unsigned int w = buf[3];
  w += buf[2] << 8;
  w += buf[1] << 16;
  w += buf[0] << 24;
  return w;
}


x86 assembly (clang, -O0):
<to_little>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%eax
shl    $0x8,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
shl    $0x10,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
shl    $0x18,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @to_little(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}