xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, size_t);
void *realloc(void *, size_t);
void *Memory_realloc(void *memblock, size_t size) {
  void *ptr;
  ptr = realloc(memblock, size);
  if (ptr != ((void *)0)) {
    return ptr;
  }
  printf("[memory.c] Could not reallocate %d bytes\n", size);
  return ((void *)0);
}


x86 assembly (clang, -O0):
<Memory_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1159 <Memory_realloc+0x39>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1171 <Memory_realloc+0x51>
mov    -0x18(%rbp),%rsi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Memory_realloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <Memory_realloc+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [42 x i8] c"[memory.c] Could not reallocate %d bytes\0A\00"
define i8* @Memory_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = call i8* @realloc(i8* %7, i64 %8)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i8*, i8** %6
store i8* %13, i8** %3
br label %17
14: ; preds = %2
%15 = load i64, i64* %5
%16 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i64 %15)
store i8* null, i8** %3
br label %17
17: ; preds = %14, %12
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
@.str = [42 x i8] c"[memory.c] Could not reallocate %d bytes\0A\00"
define noalias i8* @Memory_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %7
7: ; preds = %2, %5
ret i8* %3
}
/* Variables and functions */
double M_PI;
double sin(double);
double dphi_dy(double L, double a_phiy, double phi_y, double y) {
  return -M_PI * a_phiy * phi_y * sin(M_PI * a_phiy * y / L) / L;
}


x86 assembly (clang, -O0):
<dphi_dy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    0x2eb5(%rip),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    0x2e84(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dphi_dy>:
sub    $0x28,%rsp
movapd %xmm0,%xmm4
movsd  %xmm0,0x8(%rsp)
mov    0x2ec3(%rip),%rax
movsd  (%rax),%xmm0
movapd 0xecf(%rip),%xmm5
xorpd  %xmm0,%xmm5
mulsd  %xmm1,%xmm5
mulsd  %xmm2,%xmm5
movapd %xmm5,0x10(%rsp)
mulsd  %xmm1,%xmm0
mulsd  %xmm3,%xmm0
divsd  %xmm4,%xmm0
call   1030 <sin@plt>
mulsd  0x10(%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @dphi_dy(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* @M_PI
%10 = fneg double %9
%11 = load double, double* %6
%12 = fmul double %10, %11
%13 = load double, double* %7
%14 = fmul double %12, %13
%15 = load double, double* @M_PI
%16 = load double, double* %6
%17 = fmul double %15, %16
%18 = load double, double* %8
%19 = fmul double %17, %18
%20 = load double, double* %5
%21 = fdiv double %19, %20
%22 = call double @sin(double %21)
%23 = fmul double %14, %22
%24 = load double, double* %5
%25 = fdiv double %23, %24
ret double %25
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @dphi_dy(double %0, double %1, double %2, double %3) {
%5 = load double, double* @M_PI
%6 = fneg double %5
%7 = fmul double %6, %1
%8 = fmul double %7, %2
%9 = fmul double %5, %1
%10 = fmul double %9, %3
%11 = fdiv double %10, %0
%12 = tail call double @sin(double %11)
%13 = fmul double %12, %8
%14 = fdiv double %13, %0
ret double %14
}
char *str_cp(char *dst, const char *src) {
  while ((*dst = *src++))
    ++dst;
  return dst;
}


x86 assembly (clang, -O0):
<str_cp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
cmp    $0x0,%al
je     113c <str_cp+0x3c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <str_cp+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_cp>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %cl,(%rdi)
test   %cl,%cl
je     1122 <str_cp+0x22>
add    $0x1,%rsi
nop
movzbl (%rsi),%ecx
mov    %cl,0x1(%rax)
add    $0x1,%rax
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <str_cp+0x10>
ret

LLVM IR (-O0):
define i8* @str_cp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %11, %2
%6 = load i8*, i8** %4
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %4
%8 = load i8, i8* %6
%9 = load i8*, i8** %3
store i8 %8, i8* %9
%10 = icmp ne i8 %8, 0
br i1 %10, label %11, label %14
11: ; preds = %5
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %3
br label %5
14: ; preds = %5
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @str_cp(i8* writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
store i8 %3, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %8, %5 ], [ %1, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %8
store i8 %10, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
%13 = phi i8* [ %0, %2 ], [ %9, %5 ]
ret i8* %13
}
extern void cleanup() {}


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

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

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

LLVM IR (-O2):
define void @cleanup() {
ret void
}
int _min(int a, int b) { return ((a) > (b) ? (b) : (a)); }


x86 assembly (clang, -O0):
<_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <_min+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <_min+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_min>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

LLVM IR (-O0):
define i32 @_min(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
br label %12
10: ; preds = %2
%11 = load i32, i32* %3
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @_min(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ assert_false(int, char *, int);
void __ctest_suite1_test1_run(void) {
  assert_false(1 == 2,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/madphage/mpcstl/refs/heads/"
               "master/testlib/example_suite1.c",
               4);
}


x86 assembly (clang, -O0):
<__ctest_suite1_test1_run>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x4,%edx
call   1030 <assert_false@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ctest_suite1_test1_run>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
mov    $0x4,%edx
jmp    1030 <assert_false@plt>

LLVM IR (-O0):
@.str = [149 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/madphage/mpcstl/refs/heads/master/testlib/example_suite1.c\00"
define void @__ctest_suite1_test1_run() {
%1 = call i32 @assert_false(i32 0, i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@.str = [149 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/madphage/mpcstl/refs/heads/master/testlib/example_suite1.c\00"
define void @__ctest_suite1_test1_run() {
%1 = tail call i32 @assert_false(i32 0, i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __Pyx_RaiseBufferIndexError(int);
void __Pyx_RaiseBufferIndexErrorNogil(int axis) {
  __Pyx_RaiseBufferIndexError(axis);
}


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

x86 assembly (clang, -O2):
<__Pyx_RaiseBufferIndexErrorNogil>:
jmp    1030 <__Pyx_RaiseBufferIndexError@plt>

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

LLVM IR (-O2):
define void @__Pyx_RaiseBufferIndexErrorNogil(i32 %0) {
%2 = tail call i32 @__Pyx_RaiseBufferIndexError(i32 %0)
ret void
}
int sem_remove(int sid) { return 0; }


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

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

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

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


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

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

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

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

/* Variables and functions */
int rev_nibble(int);
u_int8_t rev_byte(u_int8_t in) {
  return (rev_nibble(in) << 4) | rev_nibble(in >> 4);
}


x86 assembly (clang, -O0):
<rev_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <rev_nibble@plt>
shl    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x4,%edi
call   1030 <rev_nibble@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev_byte>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <rev_nibble@plt>
mov    %eax,%ebp
shl    $0x4,%ebp
sar    $0x4,%ebx
mov    %ebx,%edi
call   1030 <rev_nibble@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rev_byte(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @rev_nibble(i32 %3)
%5 = shl i32 %4, 4
%6 = load i32, i32* %2
%7 = ashr i32 %6, 4
%8 = call i32 @rev_nibble(i32 %7)
%9 = or i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @rev_byte(i32 %0) {
%2 = tail call i32 @rev_nibble(i32 %0)
%3 = shl i32 %2, 4
%4 = ashr i32 %0, 4
%5 = tail call i32 @rev_nibble(i32 %4)
%6 = or i32 %3, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ bar();
void foo(char *dst) {
  char *const end = dst;
  do {
    bar();
    dst += 2;
  } while (dst < end);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jb     1124 <foo+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <bar@plt>
add    $0x2,%rbx
cmp    %r14,%rbx
jb     1120 <foo+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @foo(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %9, %1
%6 = call i32 (...) @bar()
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 2
store i8* %8, i8** %2
br label %9
9: ; preds = %5
%10 = load i8*, i8** %2
%11 = load i8*, i8** %3
%12 = icmp ult i8* %10, %11
br i1 %12, label %5, label %13
13: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @foo(i8* readnone %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %5, %2 ]
%4 = tail call i32 (...) @bar()
%5 = getelementptr inbounds i8, i8* %3, i64 2
%6 = icmp ult i8* %5, %0
br i1 %6, label %2, label %7
7: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M558_f(char *s) {
  debug("M558_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M558_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M558_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M558_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M558_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M558_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M558_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
unsigned long crb_close(long channel) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @crb_close(i64 %0) {
ret i64 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ IntUnregister(int);
void SysTickIntUnregister(void) {
  (*((volatile uint32_t *)(0xE000E010))) &= ~(0x00000002);
  IntUnregister(15);
}


x86 assembly (clang, -O0):
<SysTickIntUnregister>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000e010,%eax
mov    (%rax),%ecx
and    $0xfffffffd,%ecx
mov    $0xe000e010,%eax
mov    %ecx,(%rax)
mov    $0xf,%edi
call   1030 <IntUnregister@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysTickIntUnregister>:
mov    $0xe000e010,%eax
andl   $0xfffffffd,(%rax)
mov    $0xf,%edi
jmp    1030 <IntUnregister@plt>

LLVM IR (-O0):
define void @SysTickIntUnregister() {
%1 = load volatile i32, i32* inttoptr (i64 3758153744 to i32*)
%2 = and i32 %1, -3
store volatile i32 %2, i32* inttoptr (i64 3758153744 to i32*)
%3 = call i32 @IntUnregister(i32 15)
ret void
}

LLVM IR (-O2):
define void @SysTickIntUnregister() {
%1 = load volatile i32, i32* inttoptr (i64 3758153744 to i32*)
%2 = and i32 %1, -3
store volatile i32 %2, i32* inttoptr (i64 3758153744 to i32*)
%3 = tail call i32 @IntUnregister(i32 15)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_boilerplate() {
  printf("wildmac-solver  Copyright (C) 2010  Stefan Guna\n"
         "This program comes with ABSOLUTELY NO WARRANTY.\n"
         "This is free software, and you are welcome to redistribute it\n"
         "under certain conditions; see the accompanying license file\n"
         "for details.\n\n");
}


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

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

LLVM IR (-O0):
@.str = [233 x i8] c"wildmac-solver Copyright (C) 2010 Stefan Guna\0AThis program comes with ABSOLUTELY NO WARRANTY.\0AThis is free software, and you are welcome to redistribute it\0Aunder certain conditions; see the accompanying license file\0Afor details.\0A\0A\00"
define void @print_boilerplate() {
%1 = call i32 @printf(i8* getelementptr inbounds ([233 x i8], [233 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [232 x i8] c"wildmac-solver Copyright (C) 2010 Stefan Guna\0AThis program comes with ABSOLUTELY NO WARRANTY.\0AThis is free software, and you are welcome to redistribute it\0Aunder certain conditions; see the accompanying license file\0Afor details.\0A\00"
define void @print_boilerplate() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([232 x i8], [232 x i8]* @str, i64 0, i64 0))
ret void
}
int SDL_imageFilterMultDivby4MMX(unsigned char *Src1, unsigned char *Src2,
                                 unsigned char *Dest, int length) {
  return (0);
}


x86 assembly (clang, -O0):
<SDL_imageFilterMultDivby4MMX>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @SDL_imageFilterMultDivby4MMX(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @SDL_imageFilterMultDivby4MMX(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
ret i32 0
}
void save_mode(void) {}


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

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

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

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


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

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

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

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

/* Variables and functions */
void *memrchr(const void *m, int c, size_t n) {
  const uint8_t *s = m;
  c = (uint8_t)c;
  while (n--) {
    if (s[n] == c) {
      return (void *)(s + n);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<memrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
cmp    $0x0,%rax
je     1167 <memrchr+0x67>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x14(%rbp),%eax
jne    1162 <memrchr+0x62>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    116f <memrchr+0x6f>
jmp    111d <memrchr+0x1d>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memrchr>:
lea    (%rdi,%rdx,4),%rcx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
sub    $0x1,%rdx
jb     1123 <memrchr+0x23>
lea    -0x4(%rcx),%rax
cmp    %esi,-0x4(%rcx)
mov    %rax,%rcx
jne    1110 <memrchr+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @memrchr(i8* %0, i32 %1, i64 %2) {
%4 = bitcast i8* %0 to i32*
br label %5
5: ; preds = %9, %3
%6 = phi i64 [ %2, %3 ], [ %7, %9 ]
%7 = add i64 %6, -1
%8 = icmp eq i64 %6, 0
br i1 %8, label %16, label %9
9: ; preds = %5
%10 = getelementptr inbounds i32, i32* %4, i64 %7
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, %1
br i1 %12, label %13, label %5
13: ; preds = %9
%14 = getelementptr inbounds i32, i32* %4, i64 %7
%15 = bitcast i32* %14 to i8*
br label %16
16: ; preds = %5, %13
%17 = phi i8* [ %15, %13 ], [ null, %5 ]
ret i8* %17
}
_Complex double foo(_Complex double x) { return __builtin_cexp(x); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  %xmm1,-0x30(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
call   1030 <cexp@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
jmp    1030 <cexp@plt>

LLVM IR (-O0):
define { double, double } @foo(double %0, double %1) {
%3 = alloca { double, double }
%4 = alloca { double, double }
%5 = alloca { double, double }
%6 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
store double %0, double* %6
%7 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
store double %1, double* %7
%8 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
%9 = load double, double* %8
%10 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
%11 = load double, double* %10
%12 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 0
%13 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 1
store double %9, double* %12
store double %11, double* %13
%14 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 0
%15 = load double, double* %14
%16 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 1
%17 = load double, double* %16
%18 = call { double, double } @cexp(double %15, double %17)
%19 = extractvalue { double, double } %18, 0
%20 = extractvalue { double, double } %18, 1
%21 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%22 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %19, double* %21
store double %20, double* %22
%23 = load { double, double }, { double, double }* %3
ret { double, double } %23
}

LLVM IR (-O2):
define { double, double } @foo(double %0, double %1) {
%3 = tail call { double, double } @cexp(double %0, double %1)
ret { double, double } %3
}
int c(int arg) { return arg + 1; }


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

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

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

LLVM IR (-O2):
define i32 @c(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
scalar_t__ allocate_mem(int, int /*<<< orphan*/, int, unsigned long);
short *allocate_shorts(long n_short) {
  return (short *)allocate_mem(7, 0, sizeof(short), (unsigned long)n_short);
}


x86 assembly (clang, -O0):
<allocate_shorts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x7,%edi
xor    %esi,%esi
mov    $0x2,%edx
call   1030 <allocate_mem@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocate_shorts>:
mov    %rdi,%rcx
mov    $0x7,%edi
xor    %esi,%esi
mov    $0x2,%edx
jmp    1030 <allocate_mem@plt>

LLVM IR (-O0):
define i16* @allocate_shorts(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @allocate_mem(i32 7, i32 0, i32 2, i64 %3)
%5 = inttoptr i64 %4 to i16*
ret i16* %5
}

LLVM IR (-O2):
define i16* @allocate_shorts(i64 %0) {
%2 = tail call i64 @allocate_mem(i32 7, i32 0, i32 2, i64 %0)
%3 = inttoptr i64 %2 to i16*
ret i16* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void function_location_1() { printf("Hello"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
define void @function_location_1() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void tarefa(int r) {
  for (int e = 1; e <= r; e++)
    printf(" %d  ", r);
  printf("\n");
}


x86 assembly (clang, -O0):
<tarefa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     114d <tarefa+0x3d>
mov    -0x4(%rbp),%esi
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <tarefa+0x12>
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tarefa>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    1151 <tarefa+0x31>
mov    %edi,%ebx
lea    0xecf(%rip),%r14
mov    %edi,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    1140 <tarefa+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c" %d \00"
define void @tarefa(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %5
3: ; preds = %5, %1
%4 = tail call i32 @putchar(i32 10)
ret void
5: ; preds = %1, %5
%6 = phi i32 [ %8, %5 ], [ 1, %1 ]
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
%8 = add nuw i32 %6, 1
%9 = icmp eq i32 %6, %0
br i1 %9, label %3, label %5
}
/* Variables and functions */
int /*<<< orphan*/ error(char *, int, char *, char *, char *);
scalar_t__ strcmp(char *, char *);
void eq_str1(int line, char *expected, char *got, char *msg) {
  if (strcmp(expected, got))
    error("line %d: \"%s\" expected, but got \"%s\"\n  %s", line, expected, got,
          msg);
}


x86 assembly (clang, -O0):
<eq_str1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     1169 <eq_str1+0x49>
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xe9c(%rip),%rdi
call   1040 <error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eq_str1>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1163 <eq_str1+0x43>
lea    0xeb7(%rip),%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
mov    %r15,%rcx
mov    %r14,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <error@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [42 x i8] c"line %d: \22%s\22 expected, but got \22%s\22\0A %s\00"
define void @eq_str1(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = call i64 @strcmp(i8* %9, i8* %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %4
%14 = load i32, i32* %5
%15 = load i8*, i8** %6
%16 = load i8*, i8** %7
%17 = load i8*, i8** %8
%18 = call i32 @error(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %14, i8* %15, i8* %16, i8* %17)
br label %19
19: ; preds = %13, %4
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"line %d: \22%s\22 expected, but got \22%s\22\0A %s\00"
define void @eq_str1(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i64 @strcmp(i8* %1, i8* %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @error(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1, i8* %2, i8* %3)
br label %9
9: ; preds = %7, %4
ret void
}
/* Type definitions */
struct pcep_msg_hdr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct pcep_msg_hdr *);
extern void pcep_msg_free(struct pcep_msg_hdr *m) {
  if (!m)
    free(m);
}


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

x86 assembly (clang, -O2):
<pcep_msg_free>:
test   %rdi,%rdi
je     1116 <pcep_msg_free+0x6>
ret
xor    %edi,%edi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.pcep_msg_hdr = type { i32 }
define void @pcep_msg_free(%struct.pcep_msg_hdr* readnone %0) {
%2 = icmp eq %struct.pcep_msg_hdr* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @free(%struct.pcep_msg_hdr* null)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int Cyc_Tcutil_is_any_float_type(void *);
int Cyc_Tcutil_is_integral_type(void *);
int Cyc_Tcutil_is_arithmetic_type(void *t) {
  int _T0;
  int _T1;
  _T1 = Cyc_Tcutil_is_integral_type(t);
  if (!_T1)
    goto _TL22;
  _T0 = 1;
  goto _TL23;
_TL22:
  _T0 = Cyc_Tcutil_is_any_float_type(t);
_TL23:
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_Tcutil_is_arithmetic_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <Cyc_Tcutil_is_integral_type@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1147 <Cyc_Tcutil_is_arithmetic_type+0x27>
jmp    1153 <Cyc_Tcutil_is_arithmetic_type+0x33>
movl   $0x1,-0xc(%rbp)
jmp    115f <Cyc_Tcutil_is_arithmetic_type+0x3f>
mov    -0x8(%rbp),%rdi
call   1040 <Cyc_Tcutil_is_any_float_type@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Tcutil_is_arithmetic_type>:
push   %rbx
mov    %rdi,%rbx
call   1030 <Cyc_Tcutil_is_integral_type@plt>
test   %eax,%eax
je     1134 <Cyc_Tcutil_is_arithmetic_type+0x14>
mov    $0x1,%eax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <Cyc_Tcutil_is_any_float_type@plt>

LLVM IR (-O0):
define i32 @Cyc_Tcutil_is_arithmetic_type(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @Cyc_Tcutil_is_integral_type(i8* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %1
br label %11
10: ; preds = %1
store i32 1, i32* %3
br label %14
11: ; preds = %9
%12 = load i8*, i8** %2
%13 = call i32 @Cyc_Tcutil_is_any_float_type(i8* %12)
store i32 %13, i32* %3
br label %14
14: ; preds = %11, %10
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @Cyc_Tcutil_is_arithmetic_type(i8* %0) {
%2 = tail call i32 @Cyc_Tcutil_is_integral_type(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @Cyc_Tcutil_is_any_float_type(i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 1, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ get_string(char *);
int /*<<< orphan*/ hex2int(int /*<<< orphan*/, int);
int /*<<< orphan*/ int2sig(int /*<<< orphan*/);
char *long2str(char *, int /*<<< orphan*/);
char *machex2sig(char *arg) {
  return long2str(arg, int2sig(hex2int(get_string(arg), -1)));
}


x86 assembly (clang, -O0):
<machex2sig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_string@plt>
mov    %eax,%edi
mov    $0xffffffff,%esi
call   1040 <hex2int@plt>
mov    %eax,%edi
call   1050 <int2sig@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1060 <long2str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<machex2sig>:
push   %rbx
mov    %rdi,%rbx
call   1030 <get_string@plt>
mov    %eax,%edi
mov    $0xffffffff,%esi
call   1040 <hex2int@plt>
mov    %eax,%edi
call   1050 <int2sig@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1060 <long2str@plt>

LLVM IR (-O0):
define i8* @machex2sig(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @get_string(i8* %4)
%6 = call i32 @hex2int(i32 %5, i32 -1)
%7 = call i32 @int2sig(i32 %6)
%8 = call i8* @long2str(i8* %3, i32 %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @machex2sig(i8* %0) {
%2 = tail call i32 @get_string(i8* %0)
%3 = tail call i32 @hex2int(i32 %2, i32 -1)
%4 = tail call i32 @int2sig(i32 %3)
%5 = tail call i8* @long2str(i8* %0, i32 %4)
ret i8* %5
}
/* Variables and functions */
int AF_INET;
int privsep_get_family(int *lport) {
  int family = (*lport >> 16) & 0xffff;
  *lport &= 0xffff;
  return (family ? family : AF_INET);
}


x86 assembly (clang, -O0):
<privsep_get_family>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sar    $0x10,%eax
and    $0xffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
and    $0xffff,%ecx
mov    %ecx,(%rax)
cmpl   $0x0,-0xc(%rbp)
je     113c <privsep_get_family+0x3c>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1148 <privsep_get_family+0x48>
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<privsep_get_family>:
mov    (%rdi),%eax
movzwl %ax,%ecx
mov    %ecx,(%rdi)
cmp    $0x10000,%eax
jae    1118 <privsep_get_family+0x18>
mov    0x2ed3(%rip),%rax
mov    (%rax),%eax
ret
shr    $0x10,%eax
ret

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

LLVM IR (-O2):
@AF_INET = global i32 0
define i32 @privsep_get_family(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = lshr i32 %2, 16
%4 = and i32 %2, 65535
store i32 %4, i32* %0
%5 = icmp ult i32 %2, 65536
%6 = load i32, i32* @AF_INET
%7 = select i1 %5, i32 %6, i32 %3
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ AUTHORITY_INFO_ACCESS;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ AUTHORITY_INFO_ACCESS_it;
void AUTHORITY_INFO_ACCESS_free(AUTHORITY_INFO_ACCESS *a) {
  ASN1_item_free((ASN1_VALUE *)a, &AUTHORITY_INFO_ACCESS_it);
}


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

x86 assembly (clang, -O2):
<AUTHORITY_INFO_ACCESS_free>:
mov    0x2ed1(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

LLVM IR (-O0):
@AUTHORITY_INFO_ACCESS_it = global i32 0
define void @AUTHORITY_INFO_ACCESS_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ASN1_item_free(i32* %3, i32* @AUTHORITY_INFO_ACCESS_it)
ret void
}

LLVM IR (-O2):
@AUTHORITY_INFO_ACCESS_it = global i32 0
define void @AUTHORITY_INFO_ACCESS_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @AUTHORITY_INFO_ACCESS_it)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t lsll63(uint64_t x) { return x << 63; }


x86 assembly (clang, -O0):
<lsll63>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3f,%ecx
shl    %cl,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @lsll63(i32 %0) {
ret i32 poison
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int xh_uint64_t_equal(const void *key1, const void *key2, void *data) {
  (void)data;
  return *(uint64_t *)key1 == *(uint64_t *)key2;
}


x86 assembly (clang, -O0):
<xh_uint64_t_equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xh_uint64_t_equal>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmp    (%rsi),%rcx
sete   %al
ret

LLVM IR (-O0):
define i32 @xh_uint64_t_equal(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** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i64*
%13 = load i64, i64* %12
%14 = icmp eq i64 %10, %13
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @xh_uint64_t_equal(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %0 to i64*
%5 = load i64, i64* %4
%6 = bitcast i8* %1 to i64*
%7 = load i64, i64* %6
%8 = icmp eq i64 %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void p_safe_free(void **pointerp) {
  if (pointerp != NULL && *pointerp != NULL) {
    free(*pointerp);
    *pointerp = NULL;
  }
}


x86 assembly (clang, -O0):
<p_safe_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114c <p_safe_free+0x3c>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     114c <p_safe_free+0x3c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p_safe_free>:
push   %rbx
test   %rdi,%rdi
je     112d <p_safe_free+0x1d>
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     112d <p_safe_free+0x1d>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @p_safe_free(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = icmp ne i8** %3, null
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = load i8**, i8*** %2
%11 = load i8*, i8** %10
%12 = call i32 @free(i8* %11)
%13 = load i8**, i8*** %2
store i8* null, i8** %13
br label %14
14: ; preds = %9, %5, %1
ret void
}

LLVM IR (-O2):
define void @p_safe_free(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @free(i8* %4)
store i8* null, i8** %0
br label %8
8: ; preds = %6, %3, %1
ret void
}
void *val() {
  int *ret = (int *)malloc(sizeof(char) * 10);
  for (int i = 0; i < 10; i++) {
    ret[i] = 'a';
  }
  return ret;
}


x86 assembly (clang, -O0):
<val>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1154 <val+0x44>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x61,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <val+0x1d>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<val>:
push   %rax
mov    $0xa,%edi
call   1030 <malloc@plt>
movaps 0xede(%rip),%xmm0
movups %xmm0,(%rax)
movups %xmm0,0x10(%rax)
movabs $0x6100000061,%rcx
mov    %rcx,0x20(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i8* @val() {
%1 = alloca i32*
%2 = alloca i32
%3 = call i8* @malloc(i64 10)
%4 = bitcast i8* %3 to i32*
store i32* %4, i32** %1
store i32 0, i32* %2
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 10
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i32*, i32** %1
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
store i32 97, i32* %12
br label %13
13: ; preds = %8
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %5
16: ; preds = %5
%17 = load i32*, i32** %1
%18 = bitcast i32* %17 to i8*
ret i8* %18
}

LLVM IR (-O2):
define noalias i8* @val() {
%1 = tail call dereferenceable_or_null(10) i8* @malloc(i64 10)
%2 = bitcast i8* %1 to i32*
%3 = bitcast i8* %1 to <4 x i32>*
store <4 x i32> <i32 97, i32 97, i32 97, i32 97>, <4 x i32>* %3
%4 = getelementptr inbounds i32, i32* %2, i64 4
%5 = bitcast i32* %4 to <4 x i32>*
store <4 x i32> <i32 97, i32 97, i32 97, i32 97>, <4 x i32>* %5
%6 = getelementptr inbounds i32, i32* %2, i64 8
store i32 97, i32* %6
%7 = getelementptr inbounds i32, i32* %2, i64 9
store i32 97, i32* %7
ret i8* %1
}
int codigoClienteInvalido(const int codigoCliente) { return codigoCliente < 0; }


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

x86 assembly (clang, -O2):
<codigoClienteInvalido>:
mov    %edi,%eax
shr    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @codigoClienteInvalido(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @codigoClienteInvalido(i32 %0) {
%2 = lshr i32 %0, 31
ret i32 %2
}
/* Type definitions */
struct snd_mask {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ snd_mask_empty(struct snd_mask const *);
int snd_mask_min(struct snd_mask const *);
int snd_mask_value(const struct snd_mask *mask) {
  (void)(!snd_mask_empty(mask));
  return snd_mask_min(mask);
}


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

x86 assembly (clang, -O2):
<snd_mask_value>:
push   %rbx
mov    %rdi,%rbx
call   1030 <snd_mask_empty@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <snd_mask_min@plt>

LLVM IR (-O0):
%struct.snd_mask = type { i32 }
define i32 @snd_mask_value(%struct.snd_mask* %0) {
%2 = alloca %struct.snd_mask*
store %struct.snd_mask* %0, %struct.snd_mask** %2
%3 = load %struct.snd_mask*, %struct.snd_mask** %2
%4 = call i32 @snd_mask_empty(%struct.snd_mask* %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
%8 = load %struct.snd_mask*, %struct.snd_mask** %2
%9 = call i32 @snd_mask_min(%struct.snd_mask* %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.snd_mask = type { i32 }
define i32 @snd_mask_value(%struct.snd_mask* %0) {
%2 = tail call i32 @snd_mask_empty(%struct.snd_mask* %0)
%3 = tail call i32 @snd_mask_min(%struct.snd_mask* %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ A_BOLD;
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
void ion_set_bold(int ion_bold_on) {
  if (ion_bold_on) {
    attron(A_BOLD);
  } else {
    attroff(A_BOLD);
  }
}


x86 assembly (clang, -O0):
<ion_set_bold>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1148 <ion_set_bold+0x28>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <attron@plt>
jmp    1156 <ion_set_bold+0x36>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1030 <attroff@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ion_set_bold>:
mov    %edi,%eax
mov    0x2eb7(%rip),%rcx
mov    (%rcx),%edi
test   %eax,%eax
je     1134 <ion_set_bold+0x14>
jmp    1040 <attron@plt>
jmp    1030 <attroff@plt>

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

LLVM IR (-O2):
@A_BOLD = global i32 0
define void @ion_set_bold(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = load i32, i32* @A_BOLD
br i1 %2, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @attron(i32 %3)
br label %8
6: ; preds = %1
%7 = tail call i32 @attroff(i32 %3)
br label %8
8: ; preds = %6, %4
ret void
}