xunge/DecIR huggingface dataset:
/* Type definitions */
typedef union move {
  int dummy;
} move;
struct board_state {
  int dummy;
};

/* Variables and functions */
int eval_legal_moves(union move *, struct board_state *, int);
int get_legal_moves(union move *moves, struct board_state *state, int side) {
  return eval_legal_moves(moves, state, side);
}


x86 assembly (clang, -O0):
<get_legal_moves>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <eval_legal_moves@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_legal_moves>:
jmp    1030 <eval_legal_moves@plt>

LLVM IR (-O0):
%union.move = type { i32 }
%struct.board_state = type { i32 }
define i32 @get_legal_moves(%union.move* %0, %struct.board_state* %1, i32 %2) {
%4 = alloca %union.move*
%5 = alloca %struct.board_state*
%6 = alloca i32
store %union.move* %0, %union.move** %4
store %struct.board_state* %1, %struct.board_state** %5
store i32 %2, i32* %6
%7 = load %union.move*, %union.move** %4
%8 = load %struct.board_state*, %struct.board_state** %5
%9 = load i32, i32* %6
%10 = call i32 @eval_legal_moves(%union.move* %7, %struct.board_state* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%union.move = type { i32 }
%struct.board_state = type { i32 }
define i32 @get_legal_moves(%union.move* %0, %struct.board_state* %1, i32 %2) {
%4 = tail call i32 @eval_legal_moves(%union.move* %0, %struct.board_state* %1, i32 %2)
ret i32 %4
}
int readYacceleration() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @readYacceleration() {
ret i32 0
}
unsigned l_m_bit(unsigned src_bf) {
  int e;
  for (e = 0; src_bf > 1; ++e) {
    src_bf = src_bf >> 1;
  }
  return e;
}


x86 assembly (clang, -O0):
<l_m_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jbe    112f <l_m_bit+0x2f>
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <l_m_bit+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<l_m_bit>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111c <l_m_bit+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <l_m_bit+0x10>
ret

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

LLVM IR (-O2):
define i32 @l_m_bit(i32 %0) {
%2 = icmp ugt i32 %0, 1
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ugt i32 %5, 3
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
IR0A1(r0, r1, x0, x1, p0, p1) char r0, r1;
char *p0, *p1;
{ (*p0) = (*((char *)11111111)); }


x86 assembly (clang, -O0):
<IR0A1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    $0xa98ac7,%eax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IR0A1>:
mov    0xa98ac7,%al
mov    %al,(%r8)
ret

LLVM IR (-O0):
define i32 @IR0A1(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = trunc i32 %0 to i8
%15 = trunc i32 %1 to i8
store i8 %14, i8* %8
store i8 %15, i8* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%16 = load i8, i8* inttoptr (i64 11111111 to i8*)
%17 = load i8*, i8** %12
store i8 %16, i8* %17
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
define i32 @IR0A1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture writeonly %4, i8* nocapture readnone %5) {
%7 = load i8, i8* inttoptr (i64 11111111 to i8*)
store i8 %7, i8* %4
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void errMem(void) { error("Out of memory\n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Out of memory\0A\00"
define void @errMem() {
%1 = call i32 @error(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Out of memory\0A\00"
define void @errMem() {
%1 = tail call i32 @error(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
int _is_comment(char c) { return ('\'' == c); }


x86 assembly (clang, -O0):
<_is_comment>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x27,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_comment>:
xor    %eax,%eax
cmp    $0x27,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @_is_comment(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 39, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @_is_comment(i8 signext %0) {
%2 = icmp eq i8 %0, 39
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fwrite(void *, int, int, int /*<<< orphan*/ *);
size_t write_data(FILE *out, int size, void *buffer) {
  return fwrite(buffer, 1, size, out);
}


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

x86 assembly (clang, -O2):
<write_data>:
mov    %rdx,%rax
mov    %esi,%edx
mov    %rdi,%rcx
mov    %rax,%rdi
mov    $0x1,%esi
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
define i64 @write_data(i32* nocapture %0, i32 %1, i8* nocapture %2) {
%4 = tail call i64 @fwrite(i8* %2, i32 1, i32 %1, i32* %0)
ret i64 %4
}
int fn1() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @fn1() {
ret i32 1
}
void cache_fifo_policy_update_item(struct cache_policy_ *policy,
                                   struct cache_policy_item_ *item) {
  (void)0;
  (void)0;
}


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

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

LLVM IR (-O0):
%struct.cache_policy_ = type opaque
%struct.cache_policy_item_ = type opaque
define void @cache_fifo_policy_update_item(%struct.cache_policy_* %0, %struct.cache_policy_item_* %1) {
%3 = alloca %struct.cache_policy_*
%4 = alloca %struct.cache_policy_item_*
store %struct.cache_policy_* %0, %struct.cache_policy_** %3
store %struct.cache_policy_item_* %1, %struct.cache_policy_item_** %4
ret void
}

LLVM IR (-O2):
%struct.cache_policy_ = type opaque
%struct.cache_policy_item_ = type opaque
define void @cache_fifo_policy_update_item(%struct.cache_policy_* nocapture %0, %struct.cache_policy_item_* nocapture %1) {
ret void
}
/* Variables and functions */
int CheckTimeOut();
int dxl_hal_timeout(void) { return CheckTimeOut(); }


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

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

LLVM IR (-O0):
define i32 @dxl_hal_timeout() {
%1 = call i32 (...) @CheckTimeOut()
ret i32 %1
}

LLVM IR (-O2):
define i32 @dxl_hal_timeout() {
%1 = tail call i32 (...) @CheckTimeOut()
ret i32 %1
}
/* Variables and functions */
scalar_t__ rand();
float noise_tick() {
  float output;
  output = (float)rand() - 16384.;
  output *= 0.00006103516;
  return output;
}


x86 assembly (clang, -O0):
<noise_tick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed8(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb2(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<noise_tick>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
addss  0xedb(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xed7(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @noise_tick() {
%1 = alloca float
%2 = call i64 (...) @rand()
%3 = sitofp i64 %2 to float
%4 = fpext float %3 to double
%5 = fsub double %4, 1.638400e+04
%6 = fptrunc double %5 to float
store float %6, float* %1
%7 = load float, float* %1
%8 = fpext float %7 to double
%9 = fmul double %8, 0x3F100000107E1FE9
%10 = fptrunc double %9 to float
store float %10, float* %1
%11 = load float, float* %1
ret float %11
}

LLVM IR (-O2):
define float @noise_tick() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = fadd float %2, -1.638400e+04
%4 = fpext float %3 to double
%5 = fmul double %4, 0x3F100000107E1FE9
%6 = fptrunc double %5 to float
ret float %6
}
_sungetc(ch, sp) char **sp, ch;
{ --*sp; }


x86 assembly (clang, -O0):
<_sungetc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sungetc>:
addq   $0xffffffffffffffff,(%rsi)
ret

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

LLVM IR (-O2):
define i32 @_sungetc(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = getelementptr inbounds i8, i8* %3, i64 -1
store i8* %4, i8** %1
ret i32 undef
}
/* Forward declarations */
typedef struct TYPE_5__ TYPE_2__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_5__ {
  int /*<<< orphan*/ window;
};
struct TYPE_4__ {
  TYPE_2__ xcreatewindow;
};
typedef TYPE_1__ XEvent;
typedef TYPE_2__ XCreateWindowEvent;

/* Variables and functions */
int /*<<< orphan*/ _kbdd_add_window(int /*<<< orphan*/, int /*<<< orphan*/);
void _on_createEvent(XEvent *e) {
  XCreateWindowEvent *ev = &e->xcreatewindow;
  ;
  _kbdd_add_window(ev->window, 0);
}


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

x86 assembly (clang, -O2):
<_on_createEvent>:
mov    (%rdi),%edi
xor    %esi,%esi
jmp    1030 <_kbdd_add_window@plt>

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_5__ }
%struct.TYPE_5__ = type { i32 }
define void @_on_createEvent(%struct.TYPE_4__* %0) {
%2 = alloca %struct.TYPE_4__*
%3 = alloca %struct.TYPE_5__*
store %struct.TYPE_4__* %0, %struct.TYPE_4__** %2
%4 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
store %struct.TYPE_5__* %5, %struct.TYPE_5__** %3
%6 = load %struct.TYPE_5__*, %struct.TYPE_5__** %3
%7 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @_kbdd_add_window(i32 %8, i32 0)
ret void
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { %struct.TYPE_5__ }
%struct.TYPE_5__ = type { i32 }
define void @_on_createEvent(%struct.TYPE_4__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @_kbdd_add_window(i32 %3, i32 0)
ret void
}
/* Variables and functions */
double log10(float);
float dbLog(float x) { return (float)(10.0 * log10(x)); }


x86 assembly (clang, -O0):
<dbLog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <log10@plt>
movaps %xmm0,%xmm1
movsd  0xece(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbLog>:
push   %rax
call   1030 <log10@plt>
mulsd  0xee2(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @dbLog(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call double @log10(float %3)
%5 = fmul double 1.000000e+01, %4
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
define float @dbLog(float %0) {
%2 = tail call double @log10(float %0)
%3 = fmul double %2, 1.000000e+01
%4 = fptrunc double %3 to float
ret float %4
}
/* Type definitions */
struct parameter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pcn_out(int, int, int);
int /*<<< orphan*/ player_clear_messages(int);
scalar_t__ player_num_messages(int);
int com_clearmess(int p0, struct parameter *param) {
  (void)(param);
  if (player_num_messages(p0) <= 0) {
    pcn_out(p0, 9, 158);
    return 0;
  }
  pcn_out(p0, 9, 159);
  player_clear_messages(p0);
  return 0;
}


x86 assembly (clang, -O0):
<com_clearmess>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <player_num_messages@plt>
cmp    $0x0,%rax
jg     116f <com_clearmess+0x3f>
mov    -0x8(%rbp),%edi
mov    $0x9,%esi
mov    $0x9e,%edx
call   1050 <pcn_out@plt>
movl   $0x0,-0x4(%rbp)
jmp    1190 <com_clearmess+0x60>
mov    -0x8(%rbp),%edi
mov    $0x9,%esi
mov    $0x9f,%edx
call   1050 <pcn_out@plt>
mov    -0x8(%rbp),%edi
call   1040 <player_clear_messages@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<com_clearmess>:
push   %rbx
mov    %edi,%ebx
call   1030 <player_num_messages@plt>
test   %rax,%rax
jle    1157 <com_clearmess+0x27>
mov    %ebx,%edi
mov    $0x9,%esi
mov    $0x9f,%edx
call   1050 <pcn_out@plt>
mov    %ebx,%edi
call   1040 <player_clear_messages@plt>
jmp    1168 <com_clearmess+0x38>
mov    %ebx,%edi
mov    $0x9,%esi
mov    $0x9e,%edx
call   1050 <pcn_out@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.parameter = type { i32 }
define i32 @com_clearmess(i32 %0, %struct.parameter* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.parameter*
store i32 %0, i32* %4
store %struct.parameter* %1, %struct.parameter** %5
%6 = load %struct.parameter*, %struct.parameter** %5
%7 = load i32, i32* %4
%8 = call i64 @player_num_messages(i32 %7)
%9 = icmp sle i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32, i32* %4
%12 = call i32 @pcn_out(i32 %11, i32 9, i32 158)
store i32 0, i32* %3
br label %18
13: ; preds = %2
%14 = load i32, i32* %4
%15 = call i32 @pcn_out(i32 %14, i32 9, i32 159)
%16 = load i32, i32* %4
%17 = call i32 @player_clear_messages(i32 %16)
store i32 0, i32* %3
br label %18
18: ; preds = %13, %10
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
%struct.parameter = type { i32 }
define i32 @com_clearmess(i32 %0, %struct.parameter* nocapture readnone %1) {
%3 = tail call i64 @player_num_messages(i32 %0)
%4 = icmp slt i64 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @pcn_out(i32 %0, i32 9, i32 158)
br label %10
7: ; preds = %2
%8 = tail call i32 @pcn_out(i32 %0, i32 9, i32 159)
%9 = tail call i32 @player_clear_messages(i32 %0)
br label %10
10: ; preds = %7, %5
ret i32 0
}
void ft_get_values(char **data, char **str, char **to_find) {
  *str = data[0];
  *to_find = data[1];
}


x86 assembly (clang, -O0):
<ft_get_values>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_get_values>:
mov    (%rdi),%rax
mov    %rax,(%rsi)
mov    0x8(%rdi),%rax
mov    %rax,(%rdx)
ret

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

LLVM IR (-O2):
define void @ft_get_values(i8** nocapture %0, i8** nocapture writeonly %1, i8** nocapture writeonly %2) {
%4 = load i8*, i8** %0
store i8* %4, i8** %1
%5 = getelementptr inbounds i8*, i8** %0, i64 1
%6 = load i8*, i8** %5
store i8* %6, i8** %2
ret void
}
/* Type definitions */
struct tms {
  int /*<<< orphan*/ tms_utime;
};
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
int /*<<< orphan*/ times(struct tms *);
clock_t ticks(void) {
  struct tms buff;
  times(&buff);
  return buff.tms_utime;
}


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

x86 assembly (clang, -O2):
<ticks>:
push   %rax
mov    %rsp,%rdi
call   1030 <times@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tms = type { i32 }
define i32 @ticks() {
%1 = alloca %struct.tms
%2 = call i32 @times(%struct.tms* %1)
%3 = getelementptr inbounds %struct.tms, %struct.tms* %1, i32 0, i32 0
%4 = load i32, i32* %3
ret i32 %4
}

LLVM IR (-O2):
%struct.tms = type { i32 }
define i32 @ticks() {
%1 = alloca %struct.tms
%2 = bitcast %struct.tms* %1 to i8*
%3 = call i32 @times(%struct.tms* %1)
%4 = getelementptr inbounds %struct.tms, %struct.tms* %1, i64 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_stream_set_moved_callback() {
  printf("NOT IMPLEMENTED:"
         "pa_stream_set_moved_callback"
         "\n");
}


x86 assembly (clang, -O0):
<pa_stream_set_moved_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [46 x i8] c"NOT IMPLEMENTED:pa_stream_set_moved_callback\0A\00"
define i32 @pa_stream_set_moved_callback() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [45 x i8] c"NOT IMPLEMENTED:pa_stream_set_moved_callback\00"
define i32 @pa_stream_set_moved_callback() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
char const *version_get_git();
const char *plugin_api_info_version_git_cb(void *data, const char *info_name,
                                           const char *arguments) {
  (void)data;
  (void)info_name;
  (void)arguments;
  return version_get_git();
}


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

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

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

LLVM IR (-O2):
define i8* @plugin_api_info_version_git_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i8* (...) @version_get_git()
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
double __VERIFIER_nondet_double();
int main() {
  double x;
  x = __VERIFIER_nondet_double();
  if (x >= -1e307 && x <= 1e307) {
    __VERIFIER_assert(x == x);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_double@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeb8(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1181 <main+0x61>
movsd  0xeae(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1181 <main+0x61>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_double@plt>
ucomisd 0xed0(%rip),%xmm0
jb     114f <main+0x2f>
movsd  0xece(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     114f <main+0x2f>
xor    %edi,%edi
ucomisd %xmm0,%xmm0
setnp  %dil
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call double (...) @__VERIFIER_nondet_double()
store double %3, double* %2
%4 = load double, double* %2
%5 = fcmp oge double %4, 0xFFAC7B1F3CAC7433
br i1 %5, label %6, label %15
6: ; preds = %0
%7 = load double, double* %2
%8 = fcmp ole double %7, 0x7FAC7B1F3CAC7433
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load double, double* %2
%11 = load double, double* %2
%12 = fcmp oeq double %10, %11
%13 = zext i1 %12 to i32
%14 = call i32 @__VERIFIER_assert(i32 %13)
br label %15
15: ; preds = %9, %6, %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call double (...) @__VERIFIER_nondet_double()
%2 = fcmp oge double %1, 0xFFAC7B1F3CAC7433
%3 = fcmp ole double %1, 0x7FAC7B1F3CAC7433
%4 = and i1 %2, %3
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = fcmp ord double %1, 0.000000e+00
%7 = zext i1 %6 to i32
%8 = tail call i32 @__VERIFIER_assert(i32 %7)
br label %9
9: ; preds = %5, %0
ret i32 0
}
void dm_ima_measure_on_table_load(struct dm_table *table,
                                  unsigned int status_flags) {}


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

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

LLVM IR (-O0):
%struct.dm_table = type opaque
define void @dm_ima_measure_on_table_load(%struct.dm_table* %0, i32 %1) {
%3 = alloca %struct.dm_table*
%4 = alloca i32
store %struct.dm_table* %0, %struct.dm_table** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.dm_table = type opaque
define void @dm_ima_measure_on_table_load(%struct.dm_table* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(int /*<<< orphan*/, int /*<<< orphan*/, char *,
                         char const *);
void memory_error(const char *message) {
  error(0, 0, "Memory error: %s", message);
}


x86 assembly (clang, -O0):
<memory_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
xor    %esi,%esi
lea    0xed7(%rip),%rdx
mov    %esi,%edi
call   1030 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memory_error>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <error@plt>

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

LLVM IR (-O2):
@.str = [17 x i8] c"Memory error: %s\00"
define void @memory_error(i8* %0) {
%2 = tail call i32 @error(i32 0, i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int test_imm_19int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x19 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_19int64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x19,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_19int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 107374182400
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ foo(int **);
int main() {
  int b;
  int *c = &b;
  foo(&c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32** %2 to i8*
store i32* %1, i32** %2
%5 = call i32 @foo(i32** %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help() {
  printf("Usage:\n");
  printf("  backlight on\n");
  printf("  backlight off\n");
  printf("  backlight brightness N\n");
  printf("N should be an integer from 1 to 32\n");
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
lea    0xef7(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [16 x i8] c" backlight on\0A\00"
@.str.2 = [17 x i8] c" backlight off\0A\00"
@.str.3 = [26 x i8] c" backlight brightness N\0A\00"
@.str.4 = [37 x i8] c"N should be an integer from 1 to 32\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [7 x i8] c"Usage:\00"
@str.5 = [15 x i8] c" backlight on\00"
@str.6 = [16 x i8] c" backlight off\00"
@str.7 = [25 x i8] c" backlight brightness N\00"
@str.8 = [36 x i8] c"N should be an integer from 1 to 32\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.8, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned char);
int writeInt(char *, unsigned char);
int setDigital(unsigned char n, unsigned char d) {
  char f[30];
  sprintf(f, "/sys/class/gpio/gpio%d/value", n);
  return writeInt(f, d);
}


x86 assembly (clang, -O0):
<setDigital>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
lea    -0x20(%rbp),%rdi
lea    0xec1(%rip),%rsi
movzbl -0x1(%rbp),%edx
call   1040 <sprintf@plt>
lea    -0x20(%rbp),%rdi
movzbl -0x2(%rbp),%esi
call   1030 <writeInt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setDigital>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %esi,%ebx
mov    %edi,%edx
lea    0xece(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <sprintf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <writeInt@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [29 x i8] c"/sys/class/gpio/gpio%d/value\00"
define i32 @setDigital(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca [30 x i8]
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %5, i64 0, i64 0
%7 = load i8, i8* %3
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8 zeroext %7)
%9 = getelementptr inbounds [30 x i8], [30 x i8]* %5, i64 0, i64 0
%10 = load i8, i8* %4
%11 = call i32 @writeInt(i8* %9, i8 zeroext %10)
ret i32 %11
}

LLVM IR (-O2):
@.str = [29 x i8] c"/sys/class/gpio/gpio%d/value\00"
define i32 @setDigital(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca [30 x i8]
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8 zeroext %0)
%6 = call i32 @writeInt(i8* %4, i8 zeroext %1)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ someFunction(int *, int /*<<< orphan*/, int);
int main(void) {
  int a[10] = {8, 3, 1, 2, 6, 0, 9, 7, 4, 5};
  puts("Answer is:");
  someFunction(a, 0, 10);
  puts("");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <someFunction@plt>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xee5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xead(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeca(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <someFunction@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [10 x i32] [i32 8, i32 3, i32 1, i32 2, i32 6, i32 0, i32 9, i32 7, i32 4, i32 5]
@.str = [11 x i8] c"Answer is:\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
%3 = bitcast [10 x i32]* %2 to i8*
%4 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%6 = call i32 @someFunction(i32* %5, i32 0, i32 10)
%7 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [10 x i32] [i32 8, i32 3, i32 1, i32 2, i32 6, i32 0, i32 9, i32 7, i32 4, i32 5]
@.str = [11 x i8] c"Answer is:\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%5 = call i32 @someFunction(i32* %4, i32 0, i32 10)
%6 = call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
void ft_print_error(char *name) { perror(name); }


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

x86 assembly (clang, -O2):
<ft_print_error>:
jmp    1030 <perror@plt>

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

LLVM IR (-O2):
define void @ft_print_error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
ret void
}
void fast_log_bsend_debug_dump(struct fast_log_entry *fe
                               __attribute__((unused)),
                               char *buf __attribute__((unused))) {}


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

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

LLVM IR (-O0):
%struct.fast_log_entry = type opaque
define void @fast_log_bsend_debug_dump(%struct.fast_log_entry* %0, i8* %1) {
%3 = alloca %struct.fast_log_entry*
%4 = alloca i8*
store %struct.fast_log_entry* %0, %struct.fast_log_entry** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.fast_log_entry = type opaque
define void @fast_log_bsend_debug_dump(%struct.fast_log_entry* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_time(int, int);
int main(void) {
  int hour = 23, minute = 59;
  print_time(hour, minute);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x17,%edi
mov    $0x3b,%esi
call   1030 <print_time@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 23, i32* %2
store i32 59, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @print_time(i32 %4, i32 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @print_time(i32 23, i32 59)
ret i32 0
}
int get_sign(const double value) {
  if (value < 0)
    return -1;
  else
    return 1;
}


x86 assembly (clang, -O0):
<get_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1123 <get_sign+0x23>
movl   $0xffffffff,-0x4(%rbp)
jmp    112a <get_sign+0x2a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_sign>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setbe  %al
add    %eax,%eax
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @get_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = select i1 %2, i32 -1, i32 1
ret i32 %3
}
int cairo_code_draw_casGLabel_get_height() { return 10; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_casGLabel_get_height() {
ret i32 10
}

LLVM IR (-O2):
define i32 @cairo_code_draw_casGLabel_get_height() {
ret i32 10
}
int checkIndex2(int i, int j, int a, int b) {
  return (0 <= i) && (i < a) && (0 <= j) && (j < b);
}


x86 assembly (clang, -O0):
<checkIndex2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
xor    %eax,%eax
xor    %ecx,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x11(%rbp)
jg     114d <checkIndex2+0x4d>
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0x11(%rbp)
jge    114d <checkIndex2+0x4d>
xor    %eax,%eax
xor    %ecx,%ecx
cmp    -0x8(%rbp),%ecx
mov    %al,-0x11(%rbp)
jg     114d <checkIndex2+0x4d>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
setl   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkIndex2>:
xor    %eax,%eax
test   %edi,%edi
js     1115 <checkIndex2+0x15>
test   %esi,%esi
js     1115 <checkIndex2+0x15>
cmp    %edx,%edi
jge    1115 <checkIndex2+0x15>
xor    %eax,%eax
cmp    %ecx,%esi
setl   %al
ret

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

LLVM IR (-O2):
define i32 @checkIndex2(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %0, -1
br i1 %5, label %6, label %13
6: ; preds = %4
%7 = icmp slt i32 %0, %2
%8 = icmp sgt i32 %1, -1
%9 = and i1 %8, %7
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = icmp slt i32 %1, %3
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %10, %6, %4
%14 = phi i32 [ 0, %6 ], [ 0, %4 ], [ %12, %10 ]
ret i32 %14
}
__attribute__((__always___)) int rte_xtest(void) {
  unsigned char out;
  __asm__ volatile(".byte 0x0f,0x01,0xd6 ; setnz %0" : "=r"(out)::"memory");
  return out;
}


x86 assembly (clang, -O0):
<rte_xtest>:
push   %rbp
mov    %rsp,%rbp
xtest
setne  %al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rte_xtest>:
xtest
setne  %al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @rte_xtest() {
%1 = alloca i8
%2 = call i8 asm sideeffect ".byte 0x0f,0x01,0xd6 ; setnz $0", "=r,~{memory},~{dirflag},~{fpsr},~{flags}"()
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @rte_xtest() {
%1 = tail call i8 asm sideeffect ".byte 0x0f,0x01,0xd6 ; setnz $0", "=r,~{memory},~{dirflag},~{fpsr},~{flags}"()
%2 = zext i8 %1 to i32
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ d;

/* Variables and functions */
int /*<<< orphan*/ tx_bytes(unsigned char *, int);
void set_IR_timeout_period(unsigned samples) {
  unsigned char d[4];
  d[0] = (4 << 5) + 0x1F;
  d[1] = 0x0C;
  d[2] = (unsigned char)((samples >> 8) & 0xff);
  d[3] = (unsigned char)(samples & 0xff);
  tx_bytes(d, sizeof(d));
}


x86 assembly (clang, -O0):
<set_IR_timeout_period>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movb   $0x9f,-0x8(%rbp)
movb   $0xc,-0x7(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x5(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1030 <tx_bytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_IR_timeout_period>:
push   %rax
mov    %edi,%eax
movw   $0xc9f,0x4(%rsp)
mov    %ah,0x6(%rsp)
mov    %al,0x7(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <tx_bytes@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @set_IR_timeout_period(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
store i8 -97, i8* %4
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 1
store i8 12, i8* %5
%6 = load i32, i32* %2
%7 = lshr i32 %6, 8
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 2
store i8 %9, i8* %10
%11 = load i32, i32* %2
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
%14 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 3
store i8 %13, i8* %14
%15 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%16 = call i32 @tx_bytes(i8* %15, i32 4)
ret void
}

LLVM IR (-O2):
define void @set_IR_timeout_period(i32 %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
store i8 -97, i8* %3
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
store i8 12, i8* %4
%5 = lshr i32 %0, 8
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
store i8 %6, i8* %7
%8 = trunc i32 %0 to i8
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 3
store i8 %8, i8* %9
%10 = call i32 @tx_bytes(i8* %3, i32 4)
ret void
}
int foo(int a) {
  if (a <= 0) {
  L1:
    __builtin_unreachable();
  }
  if (a > 2)
    goto L1;
  return a > 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1116 <foo+0x16>
jmp    1116 <foo+0x16>
cmpl   $0x2,-0x4(%rbp)
jle    1125 <foo+0x25>
jmp    1116 <foo+0x16>
cmpl   $0x0,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
br label %6
6: ; preds = %10, %5
unreachable
7: ; preds = %1
%8 = load i32, i32* %2
%9 = icmp sgt i32 %8, 2
br i1 %9, label %10, label %11
10: ; preds = %7
br label %6
11: ; preds = %7
%12 = load i32, i32* %2
%13 = icmp sgt i32 %12, 0
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp ne i32 %0, 0
tail call void @llvm.assume(i1 %2)
%3 = icmp ult i32 %0, 3
tail call void @llvm.assume(i1 %3)
ret i32 1
}
/* Type definitions */
struct sockaddr_in {
  int /*<<< orphan*/ sin_port;
};
struct sockaddr {
  int dummy;
};
typedef scalar_t__ socklen_t;
typedef int /*<<< orphan*/ in_port_t;

/* Variables and functions */
int /*<<< orphan*/ getsockname(int, struct sockaddr *, scalar_t__ *);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
int /*<<< orphan*/ ntohs(int /*<<< orphan*/);
in_port_t sctp_get_local_port(int fd) {
  struct sockaddr_in addr;
  socklen_t addr_len;
  addr_len = (socklen_t)sizeof(struct sockaddr_in);
  memset((void *)&addr, 0, sizeof(struct sockaddr_in));
  (void)getsockname(fd, (struct sockaddr *)&addr, &addr_len);
  return (in_port_t)ntohs(addr.sin_port);
}


x86 assembly (clang, -O0):
<sctp_get_local_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x4,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1050 <getsockname@plt>
mov    -0x8(%rbp),%edi
call   1040 <ntohs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sctp_get_local_port>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebx
movq   $0x4,0x10(%rsp)
lea    0x8(%rsp),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
lea    0x10(%rsp),%rdx
mov    %ebx,%edi
mov    %r14,%rsi
call   1050 <getsockname@plt>
mov    0x8(%rsp),%edi
call   1040 <ntohs@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @sctp_get_local_port(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr_in
%4 = alloca i64
store i32 %0, i32* %2
store i64 4, i64* %4
%5 = bitcast %struct.sockaddr_in* %3 to i8*
%6 = call i32 @memset(i8* %5, i32 0, i32 4)
%7 = load i32, i32* %2
%8 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%9 = call i32 @getsockname(i32 %7, %struct.sockaddr* %8, i64* %4)
%10 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @ntohs(i32 %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @sctp_get_local_port(i32 %0) {
%2 = alloca %struct.sockaddr_in
%3 = alloca i64
%4 = bitcast %struct.sockaddr_in* %2 to i8*
%5 = bitcast i64* %3 to i8*
store i64 4, i64* %3
%6 = call i32 @memset(i8* %4, i32 0, i32 4)
%7 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%8 = call i32 @getsockname(i32 %0, %struct.sockaddr* %7, i64* %3)
%9 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @ntohs(i32 %10)
ret i32 %11
}
/* Variables and functions */
double log(double);
double i_hyperloglogLinearCounting(double m, double V) {
  return m * log(m / V);
}


x86 assembly (clang, -O0):
<i_hyperloglogLinearCounting>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_hyperloglogLinearCounting>:
push   %rax
movsd  %xmm0,(%rsp)
divsd  %xmm1,%xmm0
call   1030 <log@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @i_hyperloglogLinearCounting(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* %3
%7 = load double, double* %4
%8 = fdiv double %6, %7
%9 = call double @log(double %8)
%10 = fmul double %5, %9
ret double %10
}

LLVM IR (-O2):
define double @i_hyperloglogLinearCounting(double %0, double %1) {
%3 = fdiv double %0, %1
%4 = tail call double @log(double %3)
%5 = fmul double %4, %0
ret double %5
}
int _close(int file) {
  return -1;
  file = file;
}


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

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

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

LLVM IR (-O2):
define i32 @_close(i32 %0) {
ret i32 -1
}