xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ gpio_set_ce(int);
void nrf_start_rx(void) { gpio_set_ce(1); }


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

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

LLVM IR (-O0):
define void @nrf_start_rx() {
%1 = call i32 @gpio_set_ce(i32 1)
ret void
}

LLVM IR (-O2):
define void @nrf_start_rx() {
%1 = tail call i32 @gpio_set_ce(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void cryptoMemoryFree(void *memory) { free(memory); }


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

x86 assembly (clang, -O2):
<cryptoMemoryFree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @cryptoMemoryFree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glClearColor(double, double, double, double);
void init() { glClearColor(1.0, 0.5, 1.0, 1.0); }


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
movsd  0xee4(%rip),%xmm3
movsd  0xee4(%rip),%xmm1
movaps %xmm3,%xmm0
movaps %xmm3,%xmm2
call   1030 <glClearColor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
movsd  0xee8(%rip),%xmm1
movsd  0xee8(%rip),%xmm0
movaps %xmm0,%xmm2
movaps %xmm0,%xmm3
jmp    1030 <glClearColor@plt>

LLVM IR (-O0):
define void @init() {
%1 = call i32 @glClearColor(double 1.000000e+00, double 5.000000e-01, double 1.000000e+00, double 1.000000e+00)
ret void
}

LLVM IR (-O2):
define void @init() {
%1 = tail call i32 @glClearColor(double 1.000000e+00, double 5.000000e-01, double 1.000000e+00, double 1.000000e+00)
ret void
}
char *strcpy(char *strDestination, const char *strSource) {
  char *s;
  s = strDestination;
  while (*strSource) {
    *s++ = *strSource++;
  }
  *s = 0;
  return strDestination;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1148 <strcpy+0x48>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %rdi,%rdx
test   %cl,%cl
je     1131 <strcpy+0x31>
add    $0x1,%rsi
mov    %rax,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %cl,(%rdx)
add    $0x1,%rdx
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1120 <strcpy+0x20>
movb   $0x0,(%rdx)
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %7
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret i8* %0
}
/* Variables and functions */
size_t fmt_uint_base(char *, unsigned int, int);
size_t fmt_uint(char *ptr, unsigned int val) {
  return fmt_uint_base(ptr, val, 10);
}


x86 assembly (clang, -O0):
<fmt_uint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0xa,%edx
call   1030 <fmt_uint_base@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmt_uint>:
mov    $0xa,%edx
jmp    1030 <fmt_uint_base@plt>

LLVM IR (-O0):
define i64 @fmt_uint(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i64 @fmt_uint_base(i8* %5, i32 %6, i32 10)
ret i64 %7
}

LLVM IR (-O2):
define i64 @fmt_uint(i8* %0, i32 %1) {
%3 = tail call i64 @fmt_uint_base(i8* %0, i32 %1, i32 10)
ret i64 %3
}
/* Variables and functions */
size_t bitvect_calc_mem_size(size_t size) {
  return ((((size + ((1 << 6) - 1)) & ~(((1 << 6) - 1)))) >> 3);
}


x86 assembly (clang, -O0):
<bitvect_calc_mem_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x3f,%rax
and    $0xffffffffffffffc0,%rax
shr    $0x3,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitvect_calc_mem_size>:
lea    0x3f(%rdi),%rax
shr    $0x3,%rax
and    $0xfffffffffffffff8,%rax
ret

LLVM IR (-O0):
define i64 @bitvect_calc_mem_size(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 63
%5 = and i64 %4, -64
%6 = lshr i64 %5, 3
ret i64 %6
}

LLVM IR (-O2):
define i64 @bitvect_calc_mem_size(i64 %0) {
%2 = add i64 %0, 63
%3 = lshr i64 %2, 3
%4 = and i64 %3, 2305843009213693944
ret i64 %4
}
int foo(void) {
  int a, b, c, d, e, f;
  asm("# Magic instruction" : "=r"(a), "=r"(d));
  asm("# Magic instruction" : "=r"(b), "=r"(e));
  asm("# Magic instruction" : "=r"(c), "=r"(f));
  return a + b + c;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %ecx,-0x4(%rbp)
mov    %eax,-0x10(%rbp)
mov    %ecx,-0x8(%rbp)
mov    %eax,-0x14(%rbp)
mov    %ecx,-0xc(%rbp)
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    (%rcx,%rcx,2),%eax
ret

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = call { i32, i32 } asm "# Magic instruction", "=r,=r,~{dirflag},~{fpsr},~{flags}"()
%8 = extractvalue { i32, i32 } %7, 0
%9 = extractvalue { i32, i32 } %7, 1
store i32 %8, i32* %1
store i32 %9, i32* %4
%10 = call { i32, i32 } asm "# Magic instruction", "=r,=r,~{dirflag},~{fpsr},~{flags}"()
%11 = extractvalue { i32, i32 } %10, 0
%12 = extractvalue { i32, i32 } %10, 1
store i32 %11, i32* %2
store i32 %12, i32* %5
%13 = call { i32, i32 } asm "# Magic instruction", "=r,=r,~{dirflag},~{fpsr},~{flags}"()
%14 = extractvalue { i32, i32 } %13, 0
%15 = extractvalue { i32, i32 } %13, 1
store i32 %14, i32* %3
store i32 %15, i32* %6
%16 = load i32, i32* %1
%17 = load i32, i32* %2
%18 = add nsw i32 %16, %17
%19 = load i32, i32* %3
%20 = add nsw i32 %18, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call { i32, i32 } asm "# Magic instruction", "=r,=r,~{dirflag},~{fpsr},~{flags}"()
%2 = extractvalue { i32, i32 } %1, 0
%3 = mul nsw i32 %2, 3
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ YMF262Shutdown();
int /*<<< orphan*/ mid_stop();
int mid_deinit() {
  mid_stop();
  YMF262Shutdown();
  return 1;
}


x86 assembly (clang, -O0):
<mid_deinit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <mid_stop@plt>
mov    $0x0,%al
call   1030 <YMF262Shutdown@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mid_deinit>:
push   %rax
xor    %eax,%eax
call   1040 <mid_stop@plt>
xor    %eax,%eax
call   1030 <YMF262Shutdown@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mid_deinit() {
%1 = call i32 (...) @mid_stop()
%2 = call i32 (...) @YMF262Shutdown()
ret i32 1
}

LLVM IR (-O2):
define i32 @mid_deinit() {
%1 = tail call i32 (...) @mid_stop()
%2 = tail call i32 (...) @YMF262Shutdown()
ret i32 1
}
/* Type definitions */
typedef int int8_t;
typedef scalar_t__ int64_t;

/* Variables and functions */
scalar_t__ stdlib_ndarray_numel(scalar_t__, scalar_t__ *);
int8_t stdlib_ndarray_is_buffer_length_compatible_shape(int64_t len,
                                                        int64_t ndims,
                                                        int64_t *shape) {
  if (len > stdlib_ndarray_numel(ndims, shape)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<stdlib_ndarray_is_buffer_length_compatible_shape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <stdlib_ndarray_numel@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
jle    1155 <stdlib_ndarray_is_buffer_length_compatible_shape+0x45>
movl   $0x1,-0x4(%rbp)
jmp    115c <stdlib_ndarray_is_buffer_length_compatible_shape+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_ndarray_is_buffer_length_compatible_shape>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <stdlib_ndarray_numel@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
setl   %cl
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @stdlib_ndarray_is_buffer_length_compatible_shape(i64 %0, i64 %1, i64* %2) {
%4 = tail call i64 @stdlib_ndarray_numel(i64 %1, i64* %2)
%5 = icmp slt i64 %4, %0
%6 = zext i1 %5 to i32
ret i32 %6
}
int compareDoubleAscending(const void *i, const void *j) {
  double a = *(double *)i;
  double b = *(double *)j;
  if (a < b) {
    return -1;
  }
  if (a > b) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<compareDoubleAscending>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1146 <compareDoubleAscending+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <compareDoubleAscending+0x69>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1162 <compareDoubleAscending+0x62>
movl   $0x1,-0x4(%rbp)
jmp    1169 <compareDoubleAscending+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareDoubleAscending>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compareDoubleAscending(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
store double %10, double* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to double*
%13 = load double, double* %12
store double %13, double* %7
%14 = load double, double* %6
%15 = load double, double* %7
%16 = fcmp olt double %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %24
18: ; preds = %2
%19 = load double, double* %6
%20 = load double, double* %7
%21 = fcmp ogt double %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @compareDoubleAscending(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp olt double %4, %6
%8 = fcmp ogt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
void *test_anti_range_52(short n) {
  extern void *alloc_anti_range_52(short) __attribute__((alloc_size(1)));
  if (0x7fff - 1 <= n && n <= 0x7fff - 1)
    n = 0x7fff - 1 - 1;
  return alloc_anti_range_52(n);
}


x86 assembly (clang, -O0):
<test_anti_range_52>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%ecx
mov    $0x7ffe,%eax
cmp    %ecx,%eax
jg     1145 <test_anti_range_52+0x35>
movswl -0x2(%rbp),%eax
cmp    $0x7ffe,%eax
jg     1145 <test_anti_range_52+0x35>
movw   $0x7ffd,-0x2(%rbp)
movswl -0x2(%rbp),%edi
call   1030 <alloc_anti_range_52@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_52>:
cmp    $0x7ffe,%edi
mov    $0x7ffd,%eax
cmove  %eax,%edi
jmp    1030 <alloc_anti_range_52@plt>

LLVM IR (-O0):
define i8* @test_anti_range_52(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = icmp sle i32 32766, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i16, i16* %2
%8 = sext i16 %7 to i32
%9 = icmp sle i32 %8, 32766
br i1 %9, label %10, label %11
10: ; preds = %6
store i16 32765, i16* %2
br label %11
11: ; preds = %10, %6, %1
%12 = load i16, i16* %2
%13 = call i8* @alloc_anti_range_52(i16 signext %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @test_anti_range_52(i16 signext %0) {
%2 = icmp eq i16 %0, 32766
%3 = select i1 %2, i16 32765, i16 %0
%4 = tail call i8* @alloc_anti_range_52(i16 signext %3)
ret i8* %4
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
int INT_MAX;
int /*<<< orphan*/ walk(struct TreeNode *, int, int *);
int minDepth(struct TreeNode *root) {
  if (root) {
    int min_depth = INT_MAX;
    walk(root, 1, &min_depth);
    return min_depth;
  }
  return 0;
}


x86 assembly (clang, -O0):
<minDepth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1150 <minDepth+0x40>
mov    0x2eba(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
lea    -0x14(%rbp),%rdx
call   1030 <walk@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <minDepth+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minDepth>:
test   %rdi,%rdi
je     113b <minDepth+0x2b>
push   %rax
mov    0x2ecb(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    $0x1,%esi
call   1030 <walk@plt>
mov    0x4(%rsp),%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
@INT_MAX = global i32 0
define i32 @minDepth(%struct.TreeNode* %0) {
%2 = alloca i32
%3 = alloca %struct.TreeNode*
%4 = alloca i32
store %struct.TreeNode* %0, %struct.TreeNode** %3
%5 = load %struct.TreeNode*, %struct.TreeNode** %3
%6 = icmp ne %struct.TreeNode* %5, null
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i32, i32* @INT_MAX
store i32 %8, i32* %4
%9 = load %struct.TreeNode*, %struct.TreeNode** %3
%10 = call i32 @walk(%struct.TreeNode* %9, i32 1, i32* %4)
%11 = load i32, i32* %4
store i32 %11, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
@INT_MAX = global i32 0
define i32 @minDepth(%struct.TreeNode* %0) {
%2 = alloca i32
%3 = icmp eq %struct.TreeNode* %0, null
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = bitcast i32* %2 to i8*
%6 = load i32, i32* @INT_MAX
store i32 %6, i32* %2
%7 = call i32 @walk(%struct.TreeNode* %0, i32 1, i32* %2)
%8 = load i32, i32* %2
br label %9
9: ; preds = %1, %4
%10 = phi i32 [ %8, %4 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char nome[120];
  gets(nome);
  printf("Seja muito bem-vindo %s\n", nome);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x80(%rbp),%rdi
call   1040 <gets@plt>
lea    -0x80(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Seja muito bem-vindo %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [120 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [120 x i8], [120 x i8]* %2, i64 0, i64 0
%4 = call i32 @gets(i8* %3)
%5 = getelementptr inbounds [120 x i8], [120 x i8]* %2, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"Seja muito bem-vindo %s\0A\00"
define i32 @main() {
%1 = alloca [120 x i8]
%2 = getelementptr inbounds [120 x i8], [120 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
void clear_line(char *line, int size) {
  int count;
  for (count = 0; count < size; line[count] = ' ', count++)
    ;
}


x86 assembly (clang, -O0):
<clear_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113d <clear_line+0x3d>
jmp    1123 <clear_line+0x23>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x20,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <clear_line+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_line>:
test   %esi,%esi
jle    1125 <clear_line+0x15>
push   %rax
mov    %esi,%edx
mov    $0x20,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @clear_line(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
long kmul_o_s32_p_23(long x) {
  long t0;
  long t1;
  long t2;
  long t3;
  long t4;
  long t5;
  long t6;
  long t7;
  long t8;
  long t9;
  long t10;
  long t11;
  long t12;
  long t13;
  long t14;
  long t15;
  long y;
  t0 = x;
  t1 = t0 << 1;
  t2 = t1 + x;
  t3 = t2 << 3;
  t4 = t3 - x;
  y = t4;
  return (y);
}


x86 assembly (clang, -O0):
<kmul_o_s32_p_23>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
shl    $0x3,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
sub    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmul_o_s32_p_23>:
lea    (%rdi,%rdi,2),%rax
shl    $0x3,%rax
sub    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @kmul_o_s32_p_23(i64 %0) {
%2 = mul i64 %0, 23
ret i64 %2
}
double angle_diff_signed(double a, double b) {
  a -= b;
  while (a <= -3.14159265358979323846)
    a += 6.28318530718;
  while (a > 3.14159265358979323846)
    a -= 6.28318530718;
  return a;
}


x86 assembly (clang, -O0):
<angle_diff_signed>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xed7(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     114b <angle_diff_signed+0x4b>
movsd  0xed4(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1121 <angle_diff_signed+0x21>
jmp    1150 <angle_diff_signed+0x50>
movsd  -0x8(%rbp),%xmm0
movsd  0xeab(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1182 <angle_diff_signed+0x82>
movsd  -0x8(%rbp),%xmm0
movsd  0xe9c(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1150 <angle_diff_signed+0x50>
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<angle_diff_signed>:
subsd  %xmm1,%xmm0
movsd  0xef4(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     112a <angle_diff_signed+0x2a>
movsd  0xeee(%rip),%xmm2
nopw   0x0(%rax,%rax,1)
addsd  %xmm2,%xmm0
ucomisd %xmm0,%xmm1
jae    1120 <angle_diff_signed+0x20>
ucomisd 0xede(%rip),%xmm0
jbe    115a <angle_diff_signed+0x5a>
movsd  0xedc(%rip),%xmm1
movsd  0xecc(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
ja     1150 <angle_diff_signed+0x50>
ret

LLVM IR (-O0):
define double @angle_diff_signed(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %3
%7 = fsub double %6, %5
store double %7, double* %3
br label %8
8: ; preds = %11, %2
%9 = load double, double* %3
%10 = fcmp ole double %9, 0xC00921FB54442D18
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load double, double* %3
%13 = fadd double %12, 0x401921FB54442EEA
store double %13, double* %3
br label %8
14: ; preds = %8
br label %15
15: ; preds = %18, %14
%16 = load double, double* %3
%17 = fcmp ogt double %16, 0x400921FB54442D18
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load double, double* %3
%20 = fsub double %19, 0x401921FB54442EEA
store double %20, double* %3
br label %15
21: ; preds = %15
%22 = load double, double* %3
ret double %22
}

LLVM IR (-O2):
define double @angle_diff_signed(double %0, double %1) {
%3 = fsub double %0, %1
%4 = fcmp ugt double %3, 0xC00921FB54442D18
br i1 %4, label %5, label %8
5: ; preds = %8, %2
%6 = phi double [ %3, %2 ], [ %10, %8 ]
%7 = fcmp ogt double %6, 0x400921FB54442D18
br i1 %7, label %12, label %16
8: ; preds = %2, %8
%9 = phi double [ %10, %8 ], [ %3, %2 ]
%10 = fadd double %9, 0x401921FB54442EEA
%11 = fcmp ugt double %10, 0xC00921FB54442D18
br i1 %11, label %5, label %8
12: ; preds = %5, %12
%13 = phi double [ %14, %12 ], [ %6, %5 ]
%14 = fadd double %13, 0xC01921FB54442EEA
%15 = fcmp ogt double %14, 0x400921FB54442D18
br i1 %15, label %12, label %16
16: ; preds = %12, %5
%17 = phi double [ %6, %5 ], [ %14, %12 ]
ret double %17
}
/* Variables and functions */
int countVowels(char *);
int countWords(char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stdin;
int main() {
  char str[100];
  fgets(str, 100, stdin);
  printf("\n#Vowels = %d\n", countVowels(str));
  printf("\n#words = %d\n", countWords(str));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
mov    0x2e8e(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
call   1050 <fgets@plt>
lea    -0x70(%rbp),%rdi
call   1060 <countVowels@plt>
mov    %eax,%esi
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1040 <countWords@plt>
mov    %eax,%esi
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
mov    0x2e9c(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1060 <countVowels@plt>
lea    0xe93(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <countWords@plt>
lea    0xe8c(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [15 x i8] c"\0A#Vowels = %d\0A\00"
@.str.1 = [14 x i8] c"\0A#words = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %3, i32 100, i32 %4)
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%7 = call i32 @countVowels(i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%10 = call i32 @countWords(i8* %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [15 x i8] c"\0A#Vowels = %d\0A\00"
@.str.1 = [14 x i8] c"\0A#words = %d\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 100, i32 %3)
%5 = call i32 @countVowels(i8* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @countWords(i8* %2)
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}
void foo115(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo115(i32 %0) {
ret void
}
void SteamAPI_ISteamMatchmakingServers_RefreshServer(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


x86 assembly (clang, -O0):
<SteamAPI_ISteamMatchmakingServers_RefreshServer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x0,%al
call   1030 <xlogf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamAPI_ISteamMatchmakingServers_RefreshServer>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamMatchmakingServers_RefreshServer = [48 x i8] c"SteamAPI_ISteamMatchmakingServers_RefreshServer\00"
define void @SteamAPI_ISteamMatchmakingServers_RefreshServer(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @__func__.SteamAPI_ISteamMatchmakingServers_RefreshServer, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamMatchmakingServers_RefreshServer = [48 x i8] c"SteamAPI_ISteamMatchmakingServers_RefreshServer\00"
define void @SteamAPI_ISteamMatchmakingServers_RefreshServer(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @__func__.SteamAPI_ISteamMatchmakingServers_RefreshServer, i64 0, i64 0), i8* %0)
ret void
}
float fmodf_neon_hfp(float x, float y) {}


x86 assembly (clang, -O0):
<fmodf_neon_hfp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @fmodf_neon_hfp(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
define float @fmodf_neon_hfp(float %0, float %1) {
ret float undef
}
void ProcessPlugins(int n) {}


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

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

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

LLVM IR (-O2):
define void @ProcessPlugins(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cap_task_kmod_set_label();
void security_task_kmod_set_label(void) { cap_task_kmod_set_label(); }


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

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

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

LLVM IR (-O2):
define void @security_task_kmod_set_label() {
%1 = tail call i32 (...) @cap_task_kmod_set_label()
ret void
}
/* Variables and functions */
char *str_concatenate(int count, ...) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @str_concatenate(i32 %0, ...) {
ret i8* null
}
int ands_si_test3(int a, int b, int c) {
  int d = a & (b << 3);
  if (d == 0)
    return a + c;
  else
    return d;
}


x86 assembly (clang, -O0):
<ands_si_test3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x3,%ecx
and    %ecx,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1133 <ands_si_test3+0x33>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1139 <ands_si_test3+0x39>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ands_si_test3>:
lea    0x0(,%rsi,8),%ecx
and    %edi,%ecx
lea    (%rdx,%rdi,1),%eax
test   %ecx,%ecx
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ands_si_test3(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 3
%5 = and i32 %4, %0
%6 = icmp eq i32 %5, 0
%7 = add nsw i32 %2, %0
%8 = select i1 %6, i32 %7, i32 %5
ret i32 %8
}
char *string_ncopy(char *dest, const char *src, int n) {
  int i;
  i = 0;
  while (src[i] != '\0') {
    dest[i] = src[i];
    i++;
    n++;
  }
  return (dest);
}


x86 assembly (clang, -O0):
<string_ncopy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1158 <string_ncopy+0x58>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1116 <string_ncopy+0x16>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_ncopy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1120 <string_ncopy+0x20>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
mov    %cl,(%rax,%rdx,1)
movzbl 0x1(%rsi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <string_ncopy+0x10>
ret

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

LLVM IR (-O2):
define i8* @string_ncopy(i8* returned writeonly %0, i8* nocapture %1, i32 %2) {
%4 = load i8, i8* %1
%5 = icmp eq i8 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %10, %6 ], [ 0, %3 ]
%8 = phi i8 [ %12, %6 ], [ %4, %3 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 %8, i8* %9
%10 = add nuw nsw i64 %7, 1
%11 = getelementptr inbounds i8, i8* %1, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %3
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ clr();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
int main() {
  clr();
  goto printme;
printme:
  printf("Welcome home\n");
  printf("This is test");
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <clr@plt>
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <clr@plt>
lea    0xebe(%rip),%rdi
call   1040 <puts@plt>
lea    0xea5(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Welcome home\0A\00"
@.str.1 = [13 x i8] c"This is test\00"
define i32 @main() {
%1 = call i32 (...) @clr()
br label %2
2: ; preds = %0
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [13 x i8] c"This is test\00"
@str = [13 x i8] c"Welcome home\00"
define i32 @main() {
%1 = tail call i32 (...) @clr()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @getchar()
ret i32 0
}
void INT_Excep_TPU9_TGI9A(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU9_TGI9A() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(int argc, char *argv[]) {
  int a, b;
  scanf("%i %i", &a, &b);
  printf("%i", a + b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x14(%rbp),%esi
add    -0x18(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
add    0x4(%rsp),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%i %i\00"
@.str.1 = [3 x i8] c"%i\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add nsw i32 %9, %8
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}
void sws_printVec2() {}


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

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

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

LLVM IR (-O2):
define void @sws_printVec2() {
ret void
}
/* Variables and functions */
int diaDaSemana(int, int, int);
int terceiroDomingo(int ano, int mes) {
  int primeiroDomingo = 1;
  int dds = diaDaSemana(ano, mes, primeiroDomingo);
  if (dds != 0) {
    primeiroDomingo += (7 - dds);
  }
  return primeiroDomingo + 14;
}


x86 assembly (clang, -O0):
<terceiroDomingo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <diaDaSemana@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     114e <terceiroDomingo+0x3e>
mov    $0x7,%eax
sub    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xe,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<terceiroDomingo>:
push   %rax
mov    $0x1,%edx
call   1030 <diaDaSemana@plt>
mov    $0x16,%ecx
sub    %eax,%ecx
test   %eax,%eax
mov    $0xf,%eax
cmovne %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @terceiroDomingo(i32 %0, i32 %1) {
%3 = tail call i32 @diaDaSemana(i32 %0, i32 %1, i32 1)
%4 = icmp eq i32 %3, 0
%5 = sub i32 22, %3
%6 = select i1 %4, i32 15, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() {
  int i;
  printf("Hello World\n");
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
struct rsn_pmksa_cache *pmksa_cache_init(
    void (*free_cb)(struct rsn_pmksa_cache_entry *entry, void *ctx, int reason),
    void *ctx, struct wpa_sm *sm) {
  return (void *)-1;
}


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

x86 assembly (clang, -O2):
<pmksa_cache_init>:
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
%struct.rsn_pmksa_cache = type opaque
%struct.rsn_pmksa_cache_entry = type opaque
%struct.wpa_sm = type opaque
define %struct.rsn_pmksa_cache* @pmksa_cache_init(void (%struct.rsn_pmksa_cache_entry*, i8*, i32)* %0, i8* %1, %struct.wpa_sm* %2) {
%4 = alloca void (%struct.rsn_pmksa_cache_entry*, i8*, i32)*
%5 = alloca i8*
%6 = alloca %struct.wpa_sm*
store void (%struct.rsn_pmksa_cache_entry*, i8*, i32)* %0, void (%struct.rsn_pmksa_cache_entry*, i8*, i32)** %4
store i8* %1, i8** %5
store %struct.wpa_sm* %2, %struct.wpa_sm** %6
ret %struct.rsn_pmksa_cache* inttoptr (i64 -1 to %struct.rsn_pmksa_cache*)
}

LLVM IR (-O2):
%struct.rsn_pmksa_cache = type opaque
%struct.rsn_pmksa_cache_entry = type opaque
%struct.wpa_sm = type opaque
define %struct.rsn_pmksa_cache* @pmksa_cache_init(void (%struct.rsn_pmksa_cache_entry*, i8*, i32)* nocapture readnone %0, i8* nocapture readnone %1, %struct.wpa_sm* nocapture readnone %2) {
ret %struct.rsn_pmksa_cache* inttoptr (i64 -1 to %struct.rsn_pmksa_cache*)
}
/* Variables and functions */
int /*<<< orphan*/ combine(char *, char *, char *, char *, char *);
void main(int argc, char *argv[]) {
  combine(argv[1], argv[2], argv[3], argv[4], argv[5]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%r8
call   1030 <combine@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rax
mov    0x18(%rsi),%rdx
mov    0x20(%rsi),%rcx
mov    0x28(%rsi),%r8
mov    %rax,%rsi
jmp    1030 <combine@plt>

LLVM IR (-O0):
define void @main(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 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds i8*, i8** %8, i64 2
%10 = load i8*, i8** %9
%11 = load i8**, i8*** %4
%12 = getelementptr inbounds i8*, i8** %11, i64 3
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %4
%15 = getelementptr inbounds i8*, i8** %14, i64 4
%16 = load i8*, i8** %15
%17 = load i8**, i8*** %4
%18 = getelementptr inbounds i8*, i8** %17, i64 5
%19 = load i8*, i8** %18
%20 = call i32 @combine(i8* %7, i8* %10, i8* %13, i8* %16, i8* %19)
ret void
}

LLVM IR (-O2):
define void @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8*, i8** %1, i64 3
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8*, i8** %1, i64 4
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8*, i8** %1, i64 5
%12 = load i8*, i8** %11
%13 = tail call i32 @combine(i8* %4, i8* %6, i8* %8, i8* %10, i8* %12)
ret void
}
OP(dd, a9) {
  illegal_1();
  op_a9();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_a9@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_a9()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_a9()
ret i32 undef
}