xunge/DecIR huggingface dataset:
/* Variables and functions */
int floor(double);
int NIN(double x) { return floor(0.5 + x); }


x86 assembly (clang, -O0):
<NIN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NIN>:
addsd  0xee8(%rip),%xmm0
jmp    1030 <floor@plt>

LLVM IR (-O0):
define i32 @NIN(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double 5.000000e-01, %3
%5 = call i32 @floor(double %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @NIN(double %0) {
%2 = fadd double %0, 5.000000e-01
%3 = tail call i32 @floor(double %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ twoDsim_drawCollisionFrames(unsigned int, unsigned int);
void draw_collision(unsigned int actual, unsigned int predict) {
  twoDsim_drawCollisionFrames(actual, predict);
}


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

x86 assembly (clang, -O2):
<draw_collision>:
jmp    1030 <twoDsim_drawCollisionFrames@plt>

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

LLVM IR (-O2):
define void @draw_collision(i32 %0, i32 %1) {
%3 = tail call i32 @twoDsim_drawCollisionFrames(i32 %0, i32 %1)
ret void
}
/* Type definitions */
struct ctlmsg {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ comm_del(struct ctlmsg *);
int /*<<< orphan*/ free(struct ctlmsg *);
void comm_free(struct ctlmsg *msg) {
  comm_del(msg);
  free(msg);
}


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

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

LLVM IR (-O0):
%struct.ctlmsg = type { i32 }
define void @comm_free(%struct.ctlmsg* %0) {
%2 = alloca %struct.ctlmsg*
store %struct.ctlmsg* %0, %struct.ctlmsg** %2
%3 = load %struct.ctlmsg*, %struct.ctlmsg** %2
%4 = call i32 @comm_del(%struct.ctlmsg* %3)
%5 = load %struct.ctlmsg*, %struct.ctlmsg** %2
%6 = call i32 @free(%struct.ctlmsg* %5)
ret void
}

LLVM IR (-O2):
%struct.ctlmsg = type { i32 }
define void @comm_free(%struct.ctlmsg* %0) {
%2 = tail call i32 @comm_del(%struct.ctlmsg* %0)
%3 = tail call i32 @free(%struct.ctlmsg* %0)
ret void
}
int cc() { return 7; }


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

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

LLVM IR (-O0):
define i32 @cc() {
ret i32 7
}

LLVM IR (-O2):
define i32 @cc() {
ret i32 7
}
/* Variables and functions */
scalar_t__ RRB_MALLOC_ATOMIC(int);
const void *rrb_guid_create() { return (const void *)RRB_MALLOC_ATOMIC(1); }


x86 assembly (clang, -O0):
<rrb_guid_create>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <RRB_MALLOC_ATOMIC@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rrb_guid_create>:
mov    $0x1,%edi
jmp    1030 <RRB_MALLOC_ATOMIC@plt>

LLVM IR (-O0):
define i8* @rrb_guid_create() {
%1 = call i64 @RRB_MALLOC_ATOMIC(i32 1)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}

LLVM IR (-O2):
define i8* @rrb_guid_create() {
%1 = tail call i64 @RRB_MALLOC_ATOMIC(i32 1)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ sectioning_underscore(char *);
void cm_heading(void) { sectioning_underscore("heading"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"heading\00"
define void @cm_heading() {
%1 = tail call i32 @sectioning_underscore(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int wchar_t;

/* Variables and functions */
wchar_t *wcsrchr(const wchar_t *s, wchar_t c) {
  size_t n = 0;
  wchar_t *last = NULL;
  for (;;) {
    wchar_t wc = s[n];
    if (wc == c)
      last = (wchar_t *)s + n;
    if (wc == L'\0')
      break;
    n++;
  }
  return last;
}


x86 assembly (clang, -O0):
<wcsrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1148 <wcsrchr+0x48>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    1157 <wcsrchr+0x57>
jmp    1168 <wcsrchr+0x68>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    111b <wcsrchr+0x1b>
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcsrchr>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rdi),%ecx
cmp    %esi,%ecx
cmove  %rdi,%rax
add    $0x4,%rdi
test   %ecx,%ecx
jne    1110 <wcsrchr+0x10>
ret

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

LLVM IR (-O2):
define i32* @wcsrchr(i32* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32* [ null, %2 ], [ %9, %3 ]
%5 = phi i64 [ 0, %2 ], [ %11, %3 ]
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, %1
%9 = select i1 %8, i32* %6, i32* %4
%10 = icmp eq i32 %7, 0
%11 = add i64 %5, 1
br i1 %10, label %12, label %3
12: ; preds = %3
ret i32* %9
}
int main() {
  double x = 1.0;
  x += 1.0;
  x -= 1.0;
  x /= 1.0;
  x *= 1.0;
  int b = 1;
  b <<= 1;
  b >>= 1;
  b %= 1;
  b &= 1;
  b |= 1;
  b ^= 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movsd  0xeed(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xee0(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec9(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeb3(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xea2(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x1,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0x1,%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca i32
store i32 0, i32* %1
store double 1.000000e+00, double* %2
%4 = load double, double* %2
%5 = fadd double %4, 1.000000e+00
store double %5, double* %2
%6 = load double, double* %2
%7 = fsub double %6, 1.000000e+00
store double %7, double* %2
%8 = load double, double* %2
%9 = fdiv double %8, 1.000000e+00
store double %9, double* %2
%10 = load double, double* %2
%11 = fmul double %10, 1.000000e+00
store double %11, double* %2
store i32 1, i32* %3
%12 = load i32, i32* %3
%13 = shl i32 %12, 1
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = ashr i32 %14, 1
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = srem i32 %16, 1
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = and i32 %18, 1
store i32 %19, i32* %3
%20 = load i32, i32* %3
%21 = or i32 %20, 1
store i32 %21, i32* %3
%22 = load i32, i32* %3
%23 = xor i32 %22, 1
store i32 %23, i32* %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
scalar_t__ strcmp(char const *, char const *);
__attribute__((visibility("default"))) int trio_equal_case(const char *first,
                                                           const char *second) {
  assert(first);
  assert(second);
  if ((first != 0) && (second != 0)) {
    return (0 == strcmp(first, second));
  }
  return (1 == 0);
}


x86 assembly (clang, -O0):
<trio_equal_case>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x18(%rbp),%rdi
call   1040 <assert@plt>
cmpq   $0x0,-0x10(%rbp)
je     117d <trio_equal_case+0x5d>
cmpq   $0x0,-0x18(%rbp)
je     117d <trio_equal_case+0x5d>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1184 <trio_equal_case+0x64>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trio_equal_case>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %r14,%rdi
call   1040 <assert@plt>
xor    %eax,%eax
test   %rbx,%rbx
je     1159 <trio_equal_case+0x39>
test   %r14,%r14
je     1159 <trio_equal_case+0x39>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @trio_equal_case(i8* %0, i8* %1) {
%3 = tail call i32 @assert(i8* %0)
%4 = tail call i32 @assert(i8* %1)
%5 = icmp ne i8* %0, null
%6 = icmp ne i8* %1, null
%7 = and i1 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = tail call i64 @strcmp(i8* %0, i8* %1)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %2, %8
%13 = phi i32 [ %11, %8 ], [ 0, %2 ]
ret i32 %13
}
int aa_pro_ctr_a1d(int chan, unsigned char *buf, int len) {
  hu_log(6, "hu_aap", __func__, "!!!!!!!!");
  return (-1);
}


x86 assembly (clang, -O0):
<aa_pro_ctr_a1d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x6,%edi
lea    0xed2(%rip),%rsi
lea    0xed2(%rip),%rdx
lea    0xeda(%rip),%rcx
mov    $0x0,%al
call   1030 <hu_log@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_pro_ctr_a1d>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xee8(%rip),%rdx
lea    0xef0(%rip),%rcx
mov    $0x6,%edi
xor    %eax,%eax
call   1030 <hu_log@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"hu_aap\00"
@__func__.aa_pro_ctr_a1d = [15 x i8] c"aa_pro_ctr_a1d\00"
@.str.1 = [9 x i8] c"!!!!!!!!\00"
define i32 @aa_pro_ctr_a1d(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = call i32 (i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @hu_log to i32 (i32, i8*, i8*, i8*, ...)*)(i32 6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.aa_pro_ctr_a1d, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [7 x i8] c"hu_aap\00"
@__func__.aa_pro_ctr_a1d = [15 x i8] c"aa_pro_ctr_a1d\00"
@.str.1 = [9 x i8] c"!!!!!!!!\00"
define i32 @aa_pro_ctr_a1d(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 (i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @hu_log to i32 (i32, i8*, i8*, i8*, ...)*)(i32 6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.aa_pro_ctr_a1d, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ setsid();
void c_setsid_() { setsid(); }


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

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

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

LLVM IR (-O2):
define void @c_setsid_() {
%1 = tail call i32 (...) @setsid()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_string(char *);
void print_crit(char *str) { __console_tx_string(str); }


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

x86 assembly (clang, -O2):
<print_crit>:
jmp    1030 <__console_tx_string@plt>

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

LLVM IR (-O2):
define void @print_crit(i8* %0) {
%2 = tail call i32 @__console_tx_string(i8* %0)
ret void
}
int calculaFactorialIterativo(int n) {
  int i, saida;
  if (n == 0)
    return 1;
  if (n < 0)
    return 0;
  for (i = 1; i <= n; i++) {
    saida = saida * i;
  }
}


x86 assembly (clang, -O0):
<calculaFactorialIterativo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <calculaFactorialIterativo+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    115e <calculaFactorialIterativo+0x5e>
cmpl   $0x0,-0x8(%rbp)
jge    1133 <calculaFactorialIterativo+0x33>
movl   $0x0,-0x4(%rbp)
jmp    115e <calculaFactorialIterativo+0x5e>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     115e <calculaFactorialIterativo+0x5e>
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <calculaFactorialIterativo+0x3a>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculaFactorialIterativo>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @calculaFactorialIterativo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %2
br label %25
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 0, i32* %2
br label %25
13: ; preds = %9
store i32 1, i32* %4
br label %14
14: ; preds = %22, %13
%15 = load i32, i32* %4
%16 = load i32, i32* %3
%17 = icmp sle i32 %15, %16
br i1 %17, label %18, label %25
18: ; preds = %14
%19 = load i32, i32* %5
%20 = load i32, i32* %4
%21 = mul nsw i32 %19, %20
store i32 %21, i32* %5
br label %22
22: ; preds = %18
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
store i32 %24, i32* %4
br label %14
25: ; preds = %8, %12, %14
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @calculaFactorialIterativo(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void mine_help() {
  printf("commands:\n");
  printf("  i, init x (x = 1,2)\n");
  printf("  o, open x y\n");
  printf("  m, mark x y\n");
  printf("  q, quit    \n");
}


x86 assembly (clang, -O0):
<mine_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mine_help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
lea    0xef0(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xef4(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"commands:\0A\00"
@.str.1 = [23 x i8] c" i, init x (x = 1,2)\0A\00"
@.str.2 = [15 x i8] c" o, open x y\0A\00"
@.str.3 = [15 x i8] c" m, mark x y\0A\00"
@.str.4 = [15 x i8] c" q, quit \0A\00"
define void @mine_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [10 x i8] c"commands:\00"
@str.5 = [22 x i8] c" i, init x (x = 1,2)\00"
@str.6 = [14 x i8] c" o, open x y\00"
@str.7 = [14 x i8] c" m, mark x y\00"
@str.8 = [14 x i8] c" q, quit \00"
define void @mine_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.8, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int xgetpid(void) {
  printf("getpid() not implemented\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<xgetpid>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<xgetpid>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"getpid() not implemented\0A\00"
define i32 @xgetpid() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [25 x i8] c"getpid() not implemented\00"
define i32 @xgetpid() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
bool is_sqmark(int c) {
  if (c == '\'') {
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<is_sqmark>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x27,-0x8(%rbp)
jne    111d <is_sqmark+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1124 <is_sqmark+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @is_sqmark(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 39
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_sqmark(i32 %0) {
%2 = icmp eq i32 %0, 39
%3 = zext i1 %2 to i32
ret i32 %3
}
void sol_netctl_shutdown(void) {}


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

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

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

LLVM IR (-O2):
define void @sol_netctl_shutdown() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mem_copy_content(char *, unsigned int);
int sscanf(char *, char *, unsigned int *, char *);
void mem_dumpin(char *cmd_line) {
  unsigned int address;
  char content[100];
  int nargs = 0;
  nargs = sscanf(cmd_line, "%x %s", &address, content);
  if (nargs == 2) {
    mem_copy_content(content, address);
  }
}


x86 assembly (clang, -O0):
<mem_dumpin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x70(%rbp),%rcx
lea    0xebb(%rip),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <sscanf@plt>
mov    %eax,-0x74(%rbp)
cmpl   $0x2,-0x74(%rbp)
jne    1167 <mem_dumpin+0x47>
lea    -0x70(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <mem_copy_content@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_dumpin>:
sub    $0x78,%rsp
lea    0xed5(%rip),%rsi
lea    0xc(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1030 <sscanf@plt>
cmp    $0x2,%eax
jne    114d <mem_dumpin+0x2d>
mov    0xc(%rsp),%esi
lea    0x10(%rsp),%rdi
call   1040 <mem_copy_content@plt>
add    $0x78,%rsp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%x %s\00"
define void @mem_dumpin(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [100 x i8]
%5 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %5
%6 = load i8*, i8** %2
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%8 = call i32 @sscanf(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 2
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%13 = load i32, i32* %3
%14 = call i32 @mem_copy_content(i8* %12, i32 %13)
br label %15
15: ; preds = %11, %1
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%x %s\00"
define void @mem_dumpin(i8* nocapture %0) {
%2 = alloca i32
%3 = alloca [100 x i8]
%4 = bitcast i32* %2 to i8*
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%6 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i8* %5)
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = call i32 @mem_copy_content(i8* %5, i32 %9)
br label %11
11: ; preds = %8, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test(uint8_t *c, uint16_t *d) {
  printf("Works\n");
  return 2;
}


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"Works\00"
define i32 @test(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 2
}
int sfindc(char *str, char ch) {
  int i;
  for (i = 0; str[i]; i++)
    if (str[i] == ch)
      return i;
  return -1;
}


x86 assembly (clang, -O0):
<sfindc>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     115d <sfindc+0x5d>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    114a <sfindc+0x4a>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1164 <sfindc+0x64>
jmp    114f <sfindc+0x4f>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <sfindc+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfindc>:
mov    (%rdi),%dl
mov    $0xffffffff,%eax
test   %dl,%dl
je     1122 <sfindc+0x22>
xor    %ecx,%ecx
nopl   (%rax)
cmp    %sil,%dl
je     1123 <sfindc+0x23>
movzbl 0x1(%rdi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <sfindc+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @sfindc(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %9
%6 = phi i64 [ %10, %9 ], [ 0, %2 ]
%7 = phi i8 [ %12, %9 ], [ %3, %2 ]
%8 = icmp eq i8 %7, %1
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = add nuw i64 %6, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %16, label %5
14: ; preds = %5
%15 = trunc i64 %6 to i32
br label %16
16: ; preds = %9, %14, %2
%17 = phi i32 [ -1, %2 ], [ %15, %14 ], [ -1, %9 ]
ret i32 %17
}
int path_034_expected_2(int y) {
  int x = y;
  if (x) {
  } else {
  }
  return x;
  if (x) {
  } else {
  }
}


x86 assembly (clang, -O0):
<path_034_expected_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     111c <path_034_expected_2+0x1c>
jmp    1121 <path_034_expected_2+0x21>
jmp    1121 <path_034_expected_2+0x21>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @path_034_expected_2(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRC9_get(void) { return U_WMRCORENONE_get("U_WMRC9"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRC9\00"
define i32 @U_WMRC9_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void *SwapPointer(void **addr, void *new) {
  return __atomic_exchange_n(addr, new, 5);
}


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

x86 assembly (clang, -O2):
<SwapPointer>:
mov    %rsi,%rax
xchg   %rax,(%rdi)
ret

LLVM IR (-O0):
define i8* @SwapPointer(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %4
store i8* %8, i8** %5
%9 = bitcast i8** %7 to i64*
%10 = bitcast i8** %5 to i64*
%11 = bitcast i8** %6 to i64*
%12 = load i64, i64* %10
%13 = atomicrmw xchg i64* %9, i64 %12 seq_cst
store i64 %13, i64* %11
%14 = bitcast i64* %11 to i8**
%15 = load i8*, i8** %14
ret i8* %15
}

LLVM IR (-O2):
define i8* @SwapPointer(i8** nocapture %0, i8* %1) {
%3 = bitcast i8** %0 to i64*
%4 = ptrtoint i8* %1 to i64
%5 = atomicrmw xchg i64* %3, i64 %4 seq_cst
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x70() {
  Assert_real((isbdigit(112) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              565, ("isbdigit should be 0 for p"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x70>:
push   %rbp
mov    %rsp,%rbp
mov    $0x70,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x235,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x70>:
push   %rax
mov    $0x70,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x235,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for p\00"
define void @t_isbdigit_0x70() {
%1 = call i64 @isbdigit(i32 112)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 565, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for p\00"
define void @t_isbdigit_0x70() {
%1 = tail call i64 @isbdigit(i32 112)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 565, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void gtk_tree_view_set_row_separator_func() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_set_row_separator_func() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t crc32c_shift(unsigned bit, uint32_t bcc) {
  unsigned val = ((bcc >> 31) ^ bit) & 1;
  if (val != 0) {
    bcc <<= 1;
    bcc ^= 0x1edc6f41;
  } else {
    bcc <<= 1;
  }
  return bcc;
}


x86 assembly (clang, -O0):
<crc32c_shift>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1f,%eax
xor    -0x4(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     113c <crc32c_shift+0x3c>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    $0x1edc6f41,%eax
mov    %eax,-0x8(%rbp)
jmp    1145 <crc32c_shift+0x45>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc32c_shift>:
lea    (%rsi,%rsi,1),%ecx
mov    %esi,%edx
shr    $0x1f,%edx
and    $0x1,%edi
mov    %ecx,%eax
xor    $0x1edc6f41,%eax
cmp    %edi,%edx
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @crc32c_shift(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = ashr i32 %6, 31
%8 = load i32, i32* %3
%9 = xor i32 %7, %8
%10 = and i32 %9, 1
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = load i32, i32* %4
%15 = shl i32 %14, 1
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = xor i32 %16, 517762881
store i32 %17, i32* %4
br label %21
18: ; preds = %2
%19 = load i32, i32* %4
%20 = shl i32 %19, 1
store i32 %20, i32* %4
br label %21
21: ; preds = %18, %13
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
define i32 @crc32c_shift(i32 %0, i32 %1) {
%3 = lshr i32 %1, 31
%4 = and i32 %0, 1
%5 = icmp eq i32 %3, %4
%6 = shl i32 %1, 1
%7 = xor i32 %6, 517762881
%8 = select i1 %5, i32 %6, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
void suma() {
  int d1, d2, d3, r;
  printf("Dame tres numeros\n");
  scanf("%d %d %d", &d1, &d2, &d3);
  r = d1 + d2 + d3;
  printf("%d\n", r);
}


x86 assembly (clang, -O0):
<suma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suma>:
sub    $0x18,%rsp
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x10(%rsp),%esi
add    0x14(%rsp),%esi
add    0xc(%rsp),%esi
lea    0xe9b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Dame tres numeros\0A\00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define void @suma() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = add nsw i32 %7, %8
%10 = load i32, i32* %3
%11 = add nsw i32 %9, %10
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %12)
ret void
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@str = [18 x i8] c"Dame tres numeros\00"
define void @suma() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = add nsw i32 %10, %9
%12 = load i32, i32* %3
%13 = add nsw i32 %11, %12
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void Usage(int exitcode) {
  fputs("Usage: mknetid [-q] [-h hosts] [-p passwd] [-g group] [-d domain] [-n "
        "netid]\n",
        stderr);
  fputs("Usage: mknetid --version\n", stderr);
  exit(exitcode);
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
lea    0xec5(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
lea    0xefe(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Usage>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2eb3(%rip),%r14
mov    (%r14),%esi
lea    0xec9(%rip),%rdi
call   1030 <fputs@plt>
mov    (%r14),%esi
lea    0xf08(%rip),%rdi
call   1030 <fputs@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [78 x i8] c"Usage: mknetid [-q] [-h hosts] [-p passwd] [-g group] [-d domain] [-n netid]\0A\00"
@stderr = global i32 0
@.str.1 = [26 x i8] c"Usage: mknetid --version\0A\00"
define void @Usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fputs(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stderr
%6 = call i32 @fputs(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@.str = [78 x i8] c"Usage: mknetid [-q] [-h hosts] [-p passwd] [-g group] [-d domain] [-n netid]\0A\00"
@stderr = global i32 0
@.str.1 = [26 x i8] c"Usage: mknetid --version\0A\00"
define void @Usage(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fputs(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
unsigned long inportb(unsigned short);
void inportsl(unsigned short _port, unsigned long *_buff, unsigned _len) {
  int i = 0;
  while (i < _len) {
    unsigned long o = inportb(_port);
    _buff[i] = o;
    i++;
  }
}


x86 assembly (clang, -O0):
<inportsl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    1164 <inportsl+0x54>
movzwl -0x2(%rbp),%edi
call   1030 <inportb@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112d <inportsl+0x1d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inportsl>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edx,%edx
je     1144 <inportsl+0x34>
mov    %rsi,%r14
mov    %edx,%r15d
xor    %ebx,%ebx
movzwl %di,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1030 <inportb@plt>
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <inportsl+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @inportsl(i16 zeroext %0, i64* nocapture writeonly %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %13, label %5
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %11, %7 ]
%9 = tail call i64 @inportb(i16 zeroext %0)
%10 = getelementptr inbounds i64, i64* %1, i64 %8
store i64 %9, i64* %10
%11 = add nuw nsw i64 %8, 1
%12 = icmp eq i64 %11, %6
br i1 %12, label %13, label %7
13: ; preds = %7, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprintf(int /*<<< orphan*/ *, char *, char *);
void set_bom_label(uint8_t *bom, char *value_option) {
  printf("setting bom label %s\n", value_option);
  sprintf(bom, "%s", value_option);
}


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

x86 assembly (clang, -O2):
<set_bom_label>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xecf(%rip),%rdi
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>

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

LLVM IR (-O2):
@.str = [22 x i8] c"setting bom label %s\0A\00"
define void @set_bom_label(i32* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = bitcast i32* %0 to i8*
%5 = tail call i32* @strcpy(i8* dereferenceable(1) %4, i8* dereferenceable(1) %1)
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int stringcmp(void *a, void *b) {
  char *as = a;
  char *bs = b;
  return strcmp(as, bs);
}


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

x86 assembly (clang, -O2):
<stringcmp>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @stringcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
%8 = load i8*, i8** %4
store i8* %8, i8** %6
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i32 @strcmp(i8* %9, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @stringcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int tor_open_socket_with_extensions(int, int, int, int, int);
int tor_open_socket_nonblocking(int domain, int type, int protocol) {
  return tor_open_socket_with_extensions(domain, type, protocol, 1, 1);
}


x86 assembly (clang, -O0):
<tor_open_socket_nonblocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    $0x1,%r8d
mov    %r8d,%ecx
call   1030 <tor_open_socket_with_extensions@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tor_open_socket_nonblocking>:
mov    $0x1,%ecx
mov    $0x1,%r8d
jmp    1030 <tor_open_socket_with_extensions@plt>

LLVM IR (-O0):
define i32 @tor_open_socket_nonblocking(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* %5
%9 = load i32, i32* %6
%10 = call i32 @tor_open_socket_with_extensions(i32 %7, i32 %8, i32 %9, i32 1, i32 1)
ret i32 %10
}

LLVM IR (-O2):
define i32 @tor_open_socket_nonblocking(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @tor_open_socket_with_extensions(i32 %0, i32 %1, i32 %2, i32 1, i32 1)
ret i32 %4
}
void type_base_prim_placeholder(void) {}


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

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

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

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