xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ array_dcl();
int /*<<< orphan*/ get_lexval();
int /*<<< orphan*/ type();
int yyselect();
argument() {
  switch (yyselect()) {
  case 14: {
    type();
    get_lexval();
    array_dcl();
  } break;
  }
}


x86 assembly (clang, -O0):
<argument>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <yyselect@plt>
sub    $0xe,%eax
jne    1172 <argument+0x32>
jmp    115d <argument+0x1d>
mov    $0x0,%al
call   1030 <type@plt>
mov    $0x0,%al
call   1050 <get_lexval@plt>
mov    $0x0,%al
call   1060 <array_dcl@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<argument>:
push   %rax
xor    %eax,%eax
call   1040 <yyselect@plt>
cmp    $0xe,%eax
jne    1162 <argument+0x22>
xor    %eax,%eax
call   1030 <type@plt>
xor    %eax,%eax
call   1050 <get_lexval@plt>
xor    %eax,%eax
call   1060 <array_dcl@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @argument() {
%1 = alloca i32
%2 = call i32 (...) @yyselect()
switch i32 %2, label %7 [
i32 14, label %3
]
3: ; preds = %0
%4 = call i32 (...) @type()
%5 = call i32 (...) @get_lexval()
%6 = call i32 (...) @array_dcl()
br label %7
7: ; preds = %0, %3
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @argument() {
%1 = tail call i32 (...) @yyselect()
%2 = icmp eq i32 %1, 14
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 (...) @type()
%5 = tail call i32 (...) @get_lexval()
%6 = tail call i32 (...) @array_dcl()
br label %7
7: ; preds = %0, %3
ret i32 undef
}
/* Variables and functions */
scalar_t__ login_strinlist(char const **, char const *, int);
int login_str2inlist(const char **ttlst, const char *str1, const char *str2,
                     int flags) {
  int rc = 0;
  if (login_strinlist(ttlst, str1, flags))
    rc = 1;
  else if (login_strinlist(ttlst, str2, flags))
    rc = 1;
  return rc;
}


x86 assembly (clang, -O0):
<login_str2inlist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <login_strinlist@plt>
cmp    $0x0,%rax
je     1154 <login_str2inlist+0x44>
movl   $0x1,-0x20(%rbp)
jmp    117a <login_str2inlist+0x6a>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <login_strinlist@plt>
cmp    $0x0,%rax
je     1175 <login_str2inlist+0x65>
movl   $0x1,-0x20(%rbp)
jmp    117a <login_str2inlist+0x6a>
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<login_str2inlist>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%ebp
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %ecx,%edx
call   1030 <login_strinlist@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    1148 <login_str2inlist+0x38>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <login_strinlist@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @login_str2inlist(i8** %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i64 @login_strinlist(i8** %0, i8* %1, i32 %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i64 @login_strinlist(i8** %0, i8* %2, i32 %3)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4
%12 = phi i32 [ 1, %4 ], [ %10, %7 ]
ret i32 %12
}
void freeArgArray(char **array, int argArrayLength) {
  int i;
  if (argArrayLength == 0)
    return;
  for (i = 0; i < argArrayLength; i++) {
    free(array[i]);
  }
  free(array);
}


x86 assembly (clang, -O0):
<freeArgArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    112e <freeArgArray+0x1e>
jmp    1169 <freeArgArray+0x59>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1160 <freeArgArray+0x50>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1135 <freeArgArray+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeArgArray>:
test   %esi,%esi
je     114f <freeArgArray+0x3f>
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
jle    1142 <freeArgArray+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <freeArgArray+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @freeArgArray(i8** nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %16, label %4
4: ; preds = %2
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %14
6: ; preds = %4
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %12, %8 ]
%10 = getelementptr inbounds i8*, i8** %0, i64 %9
%11 = load i8*, i8** %10
tail call void @free(i8* %11)
%12 = add nuw nsw i64 %9, 1
%13 = icmp eq i64 %12, %7
br i1 %13, label %14, label %8
14: ; preds = %8, %4
%15 = bitcast i8** %0 to i8*
tail call void @free(i8* %15)
br label %16
16: ; preds = %2, %14
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void error(const char *err) {
  perror(err);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_SUCCESS
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int abs(int);
int /*<<< orphan*/ assert(int);
int nondet();
void main() {
  int x;
  int y;
  x = nondet();
  y = abs(x);
  assert(y >= 0);
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <nondet@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <nondet@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @nondet()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 @abs(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 0
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @nondet()
%2 = tail call i32 @assert(i32 1)
ret void
}
void test_three(int x, int y) {
#pragma omp taskloop simd collapse(1)
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      ;
}


x86 assembly (clang, -O0):
<test_three>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1156 <test_three+0x56>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1143 <test_three+0x43>
jmp    1135 <test_three+0x35>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1124 <test_three+0x24>
jmp    1148 <test_three+0x48>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <test_three+0x11>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_three(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 0, i32* %5
br label %7
7: ; preds = %21, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %7
store i32 0, i32* %6
br label %12
12: ; preds = %17, %11
%13 = load i32, i32* %6
%14 = load i32, i32* %4
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %20
16: ; preds = %12
br label %17
17: ; preds = %16
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %12
20: ; preds = %12
br label %21
21: ; preds = %20
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %7
24: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @test_three(i32 %0, i32 %1) {
ret void
}
void ffi_test_20(double x1, double x2, double x3, double y1, double y2,
                 double y3, double z1, double z2, double z3) {}


x86 assembly (clang, -O0):
<ffi_test_20>:
push   %rbp
mov    %rsp,%rbp
movsd  0x10(%rbp),%xmm8
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ffi_test_20(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8) {
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
store double %0, double* %10
store double %1, double* %11
store double %2, double* %12
store double %3, double* %13
store double %4, double* %14
store double %5, double* %15
store double %6, double* %16
store double %7, double* %17
store double %8, double* %18
ret void
}

LLVM IR (-O2):
define void @ffi_test_20(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
scalar_t__ sched_yield();
int main(void) {
  if (sched_yield() != 0)
    abort();
  printf("pass\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <sched_yield@plt>
cmp    $0x0,%rax
je     1167 <main+0x27>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xe92(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <sched_yield@plt>
test   %rax,%rax
jne    1160 <main+0x20>
lea    0xeac(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"pass\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @sched_yield()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [5 x i8] c"pass\00"
define i32 @main() {
%1 = tail call i64 (...) @sched_yield()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
float vectors_norm(float const *);
void vectors_normalize(const float v[3], float u[3]) {
  float norm = vectors_norm(v);
  for (int32_t i = 0; i < 3; ++i) {
    u[i] = v[i] / norm;
  }
}


x86 assembly (clang, -O0):
<vectors_normalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <vectors_norm@plt>
movss  %xmm0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    116c <vectors_normalize+0x5c>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
divss  -0x14(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1135 <vectors_normalize+0x25>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vectors_normalize>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <vectors_norm@plt>
movss  (%rbx),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,(%r14)
movss  0x4(%rbx),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,0x4(%r14)
movss  0x8(%rbx),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,0x8(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @vectors_normalize(float* %0, float* nocapture writeonly %1) {
%3 = tail call float @vectors_norm(float* %0)
%4 = load float, float* %0
%5 = fdiv float %4, %3
store float %5, float* %1
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = fdiv float %7, %3
%9 = getelementptr inbounds float, float* %1, i64 1
store float %8, float* %9
%10 = getelementptr inbounds float, float* %0, i64 2
%11 = load float, float* %10
%12 = fdiv float %11, %3
%13 = getelementptr inbounds float, float* %1, i64 2
store float %12, float* %13
ret void
}
/* Variables and functions */
int /*<<< orphan*/ inlineFunc();
void use87() { inlineFunc(); }


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

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

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

LLVM IR (-O2):
define void @use87() {
%1 = tail call i32 (...) @inlineFunc()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ v1;

/* Variables and functions */
int /*<<< orphan*/ back(char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  char v1[100];
  printf("digite a entrada da string:\n");
  fgets(v1, sizeof(v1), stdin);
  back(v1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
lea    -0x80(%rbp),%rdi
mov    0x2e88(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
call   1050 <fgets@plt>
lea    -0x80(%rbp),%rdi
call   1030 <back@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xec4(%rip),%rdi
call   1040 <puts@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1030 <back@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"digite a entrada da string:\0A\00"
@stdin = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %8, i32 100, i32 %9)
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%12 = call i32 @back(i8* %11)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@str = [28 x i8] c"digite a entrada da string:\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %4, i32 100, i32 %6)
%8 = call i32 @back(i8* %4)
ret i32 0
}
void foo_2_2_1_1_2_2_2_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_1_1_2_2_2_1_2() {
ret void
}
void x86_trace_dummy() {
  int x = 0;
  int y = x + 4;
}


x86 assembly (clang, -O0):
<x86_trace_dummy>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @x86_trace_dummy() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ read(int, void *, size_t);
ssize_t os_read(int fd, void *buf, size_t count) {
  return read(fd, buf, count);
}


x86 assembly (clang, -O0):
<os_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_read>:
jmp    1030 <read@plt>

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

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


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_pwrstarttLabel_get_width() {
ret i32 127
}

LLVM IR (-O2):
define i32 @cairo_code_draw_pwrstarttLabel_get_width() {
ret i32 127
}
void PWMSyncTimeBase(unsigned long ulBase, unsigned long ulGenBits) {
  ;

  ;
  (*((volatile unsigned long *)(ulBase + 0x00000004))) = ulGenBits;
}


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

x86 assembly (clang, -O2):
<PWMSyncTimeBase>:
mov    %rsi,0x4(%rdi)
ret

LLVM IR (-O0):
define void @PWMSyncTimeBase(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 4
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @PWMSyncTimeBase(i64 %0, i64 %1) {
%3 = add i64 %0, 4
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
double Frac(double f) { return ((long)f - (long)(f)); }


x86 assembly (clang, -O0):
<Frac>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%rax
cvttsd2si -0x8(%rbp),%rcx
sub    %rcx,%rax
cvtsi2sd %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Frac>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @Frac(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fptosi double %3 to i64
%5 = load double, double* %2
%6 = fptosi double %5 to i64
%7 = sub nsw i64 %4, %6
%8 = sitofp i64 %7 to double
ret double %8
}

LLVM IR (-O2):
define double @Frac(double %0) {
ret double 0.000000e+00
}
void _infix_operator_mult_double_double(double lhs, double rhs,
                                        double *__rval_1) {
  *__rval_1 = lhs * rhs;
}


x86 assembly (clang, -O0):
<_infix_operator_mult_double_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_infix_operator_mult_double_double>:
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @_infix_operator_mult_double_double(double %0, double %1, double* %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double*
store double %0, double* %4
store double %1, double* %5
store double* %2, double** %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fmul double %7, %8
%10 = load double*, double** %6
store double %9, double* %10
ret void
}

LLVM IR (-O2):
define void @_infix_operator_mult_double_double(double %0, double %1, double* nocapture writeonly %2) {
%4 = fmul double %0, %1
store double %4, double* %2
ret void
}
int mik_isblank(int c) { return (c == ' ' || c == '\t'); }


x86 assembly (clang, -O0):
<mik_isblank>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <mik_isblank+0x20>
cmpl   $0x9,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mik_isblank>:
cmp    $0x20,%edi
sete   %al
cmp    $0x9,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @mik_isblank(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 9
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @mik_isblank(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = icmp eq i32 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ dev_t;

/* Variables and functions */
char *devt_to_devpath(int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
int path_attached_to_hba(char *, char const *);
int devt_attached_to_hba(dev_t dev, const char *hba_path) {
  char *disk_path = devt_to_devpath(dev);
  int rc = path_attached_to_hba(disk_path, hba_path);
  if (disk_path)
    free(disk_path);
  return rc;
}


x86 assembly (clang, -O0):
<devt_attached_to_hba>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <devt_to_devpath@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <path_attached_to_hba@plt>
mov    %eax,-0x1c(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116f <devt_attached_to_hba+0x3f>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<devt_attached_to_hba>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbp
call   1050 <devt_to_devpath@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %rbp,%rsi
call   1040 <path_attached_to_hba@plt>
mov    %eax,%ebp
test   %rbx,%rbx
je     1158 <devt_attached_to_hba+0x28>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @devt_attached_to_hba(i32 %0, i8* %1) {
%3 = tail call i8* @devt_to_devpath(i32 %0)
%4 = tail call i32 @path_attached_to_hba(i8* %3, i8* %1)
%5 = icmp eq i8* %3, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @free(i8* %3)
br label %8
8: ; preds = %6, %2
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t dec32le(const void *src) {
  const unsigned char *buf;
  buf = src;
  return (uint32_t)buf[0] | ((uint32_t)buf[1] << 8) | ((uint32_t)buf[2] << 16) |
         ((uint32_t)buf[3] << 24);
}


x86 assembly (clang, -O0):
<dec32le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dec32le>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @dec32le(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t bin_to_uint16(const void *s) {
  uint16_t x = *((uint16_t *)s);
  return (x << 8) | (x >> 8);
}


x86 assembly (clang, -O0):
<bin_to_uint16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bin_to_uint16>:
mov    (%rdi),%eax
mov    %eax,%ecx
shl    $0x8,%ecx
sar    $0x8,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @bin_to_uint16(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = shl i32 %7, 8
%9 = load i32, i32* %3
%10 = ashr i32 %9, 8
%11 = or i32 %8, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @bin_to_uint16(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = ashr i32 %3, 8
%6 = or i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void english(const char *name) { printf("Hello World! Welcome, %s\n", name); }


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

x86 assembly (clang, -O2):
<english>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Hello World! Welcome, %s\0A\00"
define void @english(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Hello World! Welcome, %s\0A\00"
define void @english(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void pthread_self() {}


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

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

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

LLVM IR (-O2):
define void @pthread_self() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int strlen(char *);
char *myctime(time_t time) {
  char *ts = ctime(&time);
  ts[strlen(ts) - 1] = 0;
  return ts;
}


x86 assembly (clang, -O0):
<myctime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myctime>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <ctime@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @myctime(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i8* @ctime(i32* %2)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = sub nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %5, i64 %9
store i8 0, i8* %10
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @myctime(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i8* @ctime(i32* %2)
%4 = call i32 @strlen(i8* %3)
%5 = add nsw i32 %4, -1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %3, i64 %6
store i8 0, i8* %7
ret i8* %3
}
void XSyncValueIsZero() {}


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

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

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

LLVM IR (-O2):
define void @XSyncValueIsZero() {
ret void
}
unsigned int strhash(const char *x) {
  unsigned int h = 0;
  while (*x)
    h = h * 13 + *(x++);
  return h;
}


x86 assembly (clang, -O0):
<strhash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113c <strhash+0x3c>
imul   $0xd,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strhash+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strhash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1127 <strhash+0x27>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
lea    (%rax,%rax,2),%edx
lea    (%rax,%rdx,4),%edx
movsbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <strhash+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strhash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = mul i32 %6, 13
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i32
%11 = add i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ VIM_HIF_SetReg8(int, unsigned char);
void VIM_MARB_SetMultiFrameCount(unsigned char FramCount) {
  FramCount--;
  VIM_HIF_SetReg8((0x2400 + 0x04D), FramCount);
}


x86 assembly (clang, -O0):
<VIM_MARB_SetMultiFrameCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0xff,%al
mov    %al,-0x1(%rbp)
mov    $0x244d,%edi
movzbl -0x1(%rbp),%esi
call   1030 <VIM_HIF_SetReg8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_MARB_SetMultiFrameCount>:
add    $0xff,%dil
movzbl %dil,%esi
mov    $0x244d,%edi
jmp    1030 <VIM_HIF_SetReg8@plt>

LLVM IR (-O0):
define void @VIM_MARB_SetMultiFrameCount(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = add i8 %3, -1
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = call i32 @VIM_HIF_SetReg8(i32 9293, i8 zeroext %5)
ret void
}

LLVM IR (-O2):
define void @VIM_MARB_SetMultiFrameCount(i8 zeroext %0) {
%2 = add i8 %0, -1
%3 = tail call i32 @VIM_HIF_SetReg8(i32 9293, i8 zeroext %2)
ret void
}
void RTAvloGCPtrInsert(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvloGCPtrInsert() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, int);
void bitmap_st2_name(int num, char *dir, char *out) {
  if (num == 0)
    num = 30;
  sprintf(out, "%s%d.squ", dir, num);
}


x86 assembly (clang, -O0):
<bitmap_st2_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1134 <bitmap_st2_name+0x24>
movl   $0x1e,-0x4(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x4(%rbp),%ecx
lea    0xeba(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_st2_name>:
mov    %rdx,%rax
mov    %rsi,%rdx
test   %edi,%edi
mov    $0x1e,%ecx
cmovne %edi,%ecx
lea    0xed9(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <sprintf@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"%s%d.squ\00"
define void @bitmap_st2_name(i32 %0, i8* %1, i8* nocapture writeonly %2) {
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i32 30, i32 %0
%6 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ IPPROTO_UDP;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ error(char *);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int get_sock_fd() {
  int sockfd;
  if ((sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) {
    error("socket");
  }
  return sockfd;
}


x86 assembly (clang, -O0):
<get_sock_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
mov    0x2e87(%rip),%rax
mov    (%rax),%edx
call   1040 <socket@plt>
mov    %eax,-0x4(%rbp)
cmp    $0xffffffff,%eax
jne    1160 <get_sock_fd+0x40>
lea    0xea5(%rip),%rdi
call   1030 <error@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_sock_fd>:
push   %rbx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    0x2e8e(%rip),%rax
mov    (%rax),%edx
call   1040 <socket@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1154 <get_sock_fd+0x34>
lea    0xeb1(%rip),%rdi
call   1030 <error@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@IPPROTO_UDP = global i32 0
@.str = [7 x i8] c"socket\00"
define i32 @get_sock_fd() {
%1 = alloca i32
%2 = load i32, i32* @AF_INET
%3 = load i32, i32* @SOCK_DGRAM
%4 = load i32, i32* @IPPROTO_UDP
%5 = call i32 @socket(i32 %2, i32 %3, i32 %4)
store i32 %5, i32* %1
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @error(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@IPPROTO_UDP = global i32 0
@.str = [7 x i8] c"socket\00"
define i32 @get_sock_fd() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_DGRAM
%3 = load i32, i32* @IPPROTO_UDP
%4 = tail call i32 @socket(i32 %1, i32 %2, i32 %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = tail call i32 @error(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
ret i32 %4
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int copy_quaddobl_Laurent_container_to_start_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(779, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_quaddobl_Laurent_container_to_start_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x30b,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_quaddobl_Laurent_container_to_start_system>:
mov    $0x30b,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @copy_quaddobl_Laurent_container_to_start_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 779, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
int Abc_TtByteNum(int nVars) { return nVars <= 3 ? 1 : 1 << (nVars - 3); }


x86 assembly (clang, -O0):
<Abc_TtByteNum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jg     111e <Abc_TtByteNum+0x1e>
mov    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112e <Abc_TtByteNum+0x2e>
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Abc_TtByteNum>:
lea    -0x3(%rdi),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    $0x1,%ecx
cmp    $0x4,%edi
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @Abc_TtByteNum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 3
br i1 %4, label %5, label %6
5: ; preds = %1
br label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 3
%9 = shl i32 1, %8
br label %10
10: ; preds = %6, %5
%11 = phi i32 [ 1, %5 ], [ %9, %6 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @Abc_TtByteNum(i32 %0) {
%2 = icmp slt i32 %0, 4
%3 = add nsw i32 %0, -3
%4 = shl nuw i32 1, %3
%5 = select i1 %2, i32 1, i32 %4
ret i32 %5
}
void forward_comm() {}


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

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

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

LLVM IR (-O2):
define void @forward_comm() {
ret void
}
/* Variables and functions */
int axis_y_off_double(int);
int axis_y_off(int y) { return axis_y_off_double(y); }


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

x86 assembly (clang, -O2):
<axis_y_off>:
jmp    1030 <axis_y_off_double@plt>

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

LLVM IR (-O2):
define i32 @axis_y_off(i32 %0) {
%2 = tail call i32 @axis_y_off_double(i32 %0)
ret i32 %2
}
void RTLdrLoadAppPriv(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLdrLoadAppPriv() {
ret void
}
int event_network_start(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @event_network_start() {
ret i32 0
}
int test_imm_96int32_mem(int *val) {
  return ((*val) & (0x96 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_96int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 150
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int mvwprintw(int /*<<< orphan*/ *, int, int, char const *, int, int);
int ii_mvwprintw(WINDOW *win, int y, int x, const char *fmt, int i, int j) {
  return (mvwprintw(win, y, x, fmt, i, j));
}


x86 assembly (clang, -O0):
<ii_mvwprintw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
call   1030 <mvwprintw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ii_mvwprintw>:
jmp    1030 <mvwprintw@plt>

LLVM IR (-O0):
define i32 @ii_mvwprintw(i32* %0, i32 %1, i32 %2, i8* %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32*, i32** %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i8*, i8** %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call i32 @mvwprintw(i32* %13, i32 %14, i32 %15, i8* %16, i32 %17, i32 %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @ii_mvwprintw(i32* %0, i32 %1, i32 %2, i8* %3, i32 %4, i32 %5) {
%7 = tail call i32 @mvwprintw(i32* %0, i32 %1, i32 %2, i8* %3, i32 %4, i32 %5)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ color_def(char *, int);
void gen_color(void) { color_def("Default_Color", -1); }


x86 assembly (clang, -O0):
<gen_color>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <color_def@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_color>:
lea    0xee9(%rip),%rdi
mov    $0xffffffff,%esi
jmp    1030 <color_def@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"Default_Color\00"
define void @gen_color() {
%1 = tail call i32 @color_def(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 -1)
ret void
}