xunge/DecIR huggingface dataset:
unsigned int hash_function(const char *str, unsigned htable_size) {
  unsigned int h = 0;
  unsigned char *p;
  for (p = (unsigned char *)str; *p != '\0'; p++) {
    h = 31 * h + *p;
  }
  return h % htable_size;
}


x86 assembly (clang, -O0):
<hash_function>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
je     114b <hash_function+0x4b>
imul   $0x1f,-0x10(%rbp),%eax
mov    -0x18(%rbp),%rcx
movzbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    111a <hash_function+0x1a>
mov    -0x10(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_function>:
mov    (%rdi),%cl
test   %cl,%cl
je     1129 <hash_function+0x29>
add    $0x1,%rdi
xor    %edx,%edx
mov    %edx,%eax
xchg   %ax,%ax
movzbl %cl,%ecx
shl    $0x5,%eax
sub    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1110 <hash_function+0x10>
jmp    112b <hash_function+0x2b>
xor    %eax,%eax
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @hash_function(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %12, %5 ], [ %0, %2 ]
%8 = phi i32 [ %11, %5 ], [ 0, %2 ]
%9 = zext i8 %6 to i32
%10 = mul i32 %8, 31
%11 = add i32 %10, %9
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ 0, %2 ], [ %11, %5 ]
%17 = urem i32 %16, %1
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void showhrmn(double dhr) {
  int hr, mn;
  hr = (int)dhr;
  mn = (dhr - (double)hr) * 60;
  printf("%0d:%0d", hr, mn);
}


x86 assembly (clang, -O0):
<showhrmn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  0xec5(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showhrmn>:
cvttsd2si %xmm0,%esi
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
subsd  %xmm1,%xmm0
mulsd  0xed8(%rip),%xmm0
cvttsd2si %xmm0,%edx
lea    0xed5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%0d:%0d\00"
define void @showhrmn(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca i32
store double %0, double* %2
%5 = load double, double* %2
%6 = fptosi double %5 to i32
store i32 %6, i32* %3
%7 = load double, double* %2
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to double
%10 = fsub double %7, %9
%11 = fmul double %10, 6.000000e+01
%12 = fptosi double %11 to i32
store i32 %12, i32* %4
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%0d:%0d\00"
define void @showhrmn(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
%4 = fsub double %0, %3
%5 = fmul double %4, 6.000000e+01
%6 = fptosi double %5 to i32
%7 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ umfpack_dl_solve(long, long *, long *, double *, double *,
                                    double *, void *, double *, double *);
void umf4sol_(long *sys, double x[], double b[], void **Numeric,
              double Control[20], double Info[90]) {
  Control[7] = 0;
  (void)umfpack_dl_solve(*sys, (long *)0, (long *)0, (double *)0, x, b,
                         *Numeric, Control, Info);
}


x86 assembly (clang, -O0):
<umf4sol_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x38(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%r9
mov    -0x20(%rbp),%rax
mov    (%rax),%r11
mov    -0x28(%rbp),%r10
mov    -0x30(%rbp),%rax
xor    %ecx,%ecx
mov    %rcx,%rsi
mov    %rcx,%rdx
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <umfpack_dl_solve@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umf4sol_>:
push   %rax
mov    %r9,%r10
mov    %r8,%rax
mov    %rcx,%r11
mov    %rdx,%r9
mov    %rsi,%r8
movq   $0x0,0x38(%rax)
mov    (%rdi),%rdi
sub    $0x8,%rsp
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
push   %r10
push   %rax
push   (%r11)
call   1030 <umfpack_dl_solve@plt>
add    $0x20,%rsp
pop    %rax
ret

LLVM IR (-O0):
define void @umf4sol_(i64* %0, double* %1, double* %2, i8** %3, double* %4, double* %5) {
%7 = alloca i64*
%8 = alloca double*
%9 = alloca double*
%10 = alloca i8**
%11 = alloca double*
%12 = alloca double*
store i64* %0, i64** %7
store double* %1, double** %8
store double* %2, double** %9
store i8** %3, i8*** %10
store double* %4, double** %11
store double* %5, double** %12
%13 = load double*, double** %11
%14 = getelementptr inbounds double, double* %13, i64 7
store double 0.000000e+00, double* %14
%15 = load i64*, i64** %7
%16 = load i64, i64* %15
%17 = load double*, double** %8
%18 = load double*, double** %9
%19 = load i8**, i8*** %10
%20 = load i8*, i8** %19
%21 = load double*, double** %11
%22 = load double*, double** %12
%23 = call i32 @umfpack_dl_solve(i64 %16, i64* null, i64* null, double* null, double* %17, double* %18, i8* %20, double* %21, double* %22)
ret void
}

LLVM IR (-O2):
define void @umf4sol_(i64* nocapture %0, double* %1, double* %2, i8** nocapture %3, double* %4, double* %5) {
%7 = getelementptr inbounds double, double* %4, i64 7
store double 0.000000e+00, double* %7
%8 = load i64, i64* %0
%9 = load i8*, i8** %3
%10 = tail call i32 @umfpack_dl_solve(i64 %8, i64* null, i64* null, double* null, double* %1, double* %2, i8* %9, double* %4, double* %5)
ret void
}
/* Type definitions */
struct ebmb_node {
  int dummy;
};
struct eb_root {
  int dummy;
};

/* Variables and functions */
struct ebmb_node *__ebmb_insert_prefix(struct eb_root *, struct ebmb_node *,
                                       unsigned int);
struct ebmb_node *ebmb_insert_prefix(struct eb_root *root,
                                     struct ebmb_node *new, unsigned int len) {
  return __ebmb_insert_prefix(root, new, len);
}


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

x86 assembly (clang, -O2):
<ebmb_insert_prefix>:
jmp    1030 <__ebmb_insert_prefix@plt>

LLVM IR (-O0):
%struct.eb_root = type { i32 }
%struct.ebmb_node = type { i32 }
define %struct.ebmb_node* @ebmb_insert_prefix(%struct.eb_root* %0, %struct.ebmb_node* %1, i32 %2) {
%4 = alloca %struct.eb_root*
%5 = alloca %struct.ebmb_node*
%6 = alloca i32
store %struct.eb_root* %0, %struct.eb_root** %4
store %struct.ebmb_node* %1, %struct.ebmb_node** %5
store i32 %2, i32* %6
%7 = load %struct.eb_root*, %struct.eb_root** %4
%8 = load %struct.ebmb_node*, %struct.ebmb_node** %5
%9 = load i32, i32* %6
%10 = call %struct.ebmb_node* @__ebmb_insert_prefix(%struct.eb_root* %7, %struct.ebmb_node* %8, i32 %9)
ret %struct.ebmb_node* %10
}

LLVM IR (-O2):
%struct.eb_root = type { i32 }
%struct.ebmb_node = type { i32 }
define %struct.ebmb_node* @ebmb_insert_prefix(%struct.eb_root* %0, %struct.ebmb_node* %1, i32 %2) {
%4 = tail call %struct.ebmb_node* @__ebmb_insert_prefix(%struct.eb_root* %0, %struct.ebmb_node* %1, i32 %2)
ret %struct.ebmb_node* %4
}
void strength_test6(int *data) {
  int j = data[0];
  int i = data[1];
  do {
    data[data[2]] = 2;
    i = i + j;
  } while (i * 21 < data[3]);
}


x86 assembly (clang, -O0):
<strength_test6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq 0x8(%rcx),%rcx
movl   $0x2,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
imul   $0x15,-0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    0xc(%rcx),%eax
jl     111b <strength_test6+0x1b>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strength_test6>:
mov    (%rdi),%ecx
mov    0x4(%rdi),%eax
lea    (%rax,%rax,4),%edx
lea    (%rax,%rdx,4),%eax
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    %ecx,%eax
movslq 0x8(%rdi),%rdx
movl   $0x2,(%rdi,%rdx,4)
cmp    0xc(%rdi),%eax
jl     1120 <strength_test6+0x20>
ret

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

LLVM IR (-O2):
define void @strength_test6(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = getelementptr inbounds i32, i32* %0, i64 3
br label %7
7: ; preds = %7, %1
%8 = phi i32 [ %4, %1 ], [ %12, %7 ]
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %0, i64 %10
store i32 2, i32* %11
%12 = add nsw i32 %8, %2
%13 = mul nsw i32 %12, 21
%14 = load i32, i32* %6
%15 = icmp slt i32 %13, %14
br i1 %15, label %7, label %16
16: ; preds = %7
ret void
}
void free_long(long *val) {}


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

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

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

LLVM IR (-O2):
define void @free_long(i64* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ BN_CTX;
typedef int /*<<< orphan*/ BN_BLINDING;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int BN_BLINDING_invert_ex(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int rsa_blinding_invert(BN_BLINDING *b, BIGNUM *f, BIGNUM *unblind,
                        BN_CTX *ctx) {
  return BN_BLINDING_invert_ex(f, unblind, b, ctx);
}


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

x86 assembly (clang, -O2):
<rsa_blinding_invert>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rax,%rdx
jmp    1030 <BN_BLINDING_invert_ex@plt>

LLVM IR (-O0):
define i32 @rsa_blinding_invert(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %6
%10 = load i32*, i32** %7
%11 = load i32*, i32** %5
%12 = load i32*, i32** %8
%13 = call i32 @BN_BLINDING_invert_ex(i32* %9, i32* %10, i32* %11, i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @rsa_blinding_invert(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = tail call i32 @BN_BLINDING_invert_ex(i32* %1, i32* %2, i32* %0, i32* %3)
ret i32 %5
}
double Min(x, y)
double x, y;
{
  if (x < y)
    return (x);
  return (y);
}


x86 assembly (clang, -O0):
<Min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <Min+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113b <Min+0x3b>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Min>:
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @Min(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp olt double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %4
store double %10, double* %3
br label %13
11: ; preds = %2
%12 = load double, double* %5
store double %12, double* %3
br label %13
13: ; preds = %11, %9
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @Min(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
int pow(int, int);
int isfluid(int flag) {
  int ret = pow(2, 12);
  return ((flag & (3 * ret)) == ret);
}


x86 assembly (clang, -O0):
<isfluid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x2,%edi
mov    $0xc,%esi
call   1030 <pow@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   $0x3,-0x8(%rbp),%ecx
and    %ecx,%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isfluid>:
push   %rbx
mov    %edi,%ebx
mov    $0x2,%edi
mov    $0xc,%esi
call   1030 <pow@plt>
lea    (%rax,%rax,2),%edx
and    %ebx,%edx
xor    %ecx,%ecx
cmp    %eax,%edx
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isfluid(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @pow(i32 2, i32 12)
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = mul nsw i32 3, %6
%8 = and i32 %5, %7
%9 = load i32, i32* %3
%10 = icmp eq i32 %8, %9
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @isfluid(i32 %0) {
%2 = tail call i32 @pow(i32 2, i32 12)
%3 = mul nsw i32 %2, 3
%4 = and i32 %3, %0
%5 = icmp eq i32 %4, %2
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_head(int position) {
  int index = 0;
  for (index = 0; index < position; index++)
    printf("     ");
  printf("  *\n");
}


x86 assembly (clang, -O0):
<show_head>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    114f <show_head+0x3f>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <show_head+0x19>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_head>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    114d <show_head+0x2d>
mov    %edi,%ebx
lea    0xecf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0xffffffff,%ebx
jne    1140 <show_head+0x20>
lea    0xeb2(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c" \00"
@str = [4 x i8] c" *\00"
define void @show_head(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int *func(char *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  printf("this is voide_pointer.c");
  char *cp = "1234";
  int *vp = func(cp);
  printf("%08x\n", *vp);
  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
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <func@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
call   1040 <func@plt>
mov    (%rax),%esi
lea    0xed9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"this is voide_pointer.c\00"
@.str.1 = [5 x i8] c"1234\00"
@.str.2 = [6 x i8] c"%08x\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %6
%9 = load i8*, i8** %6
%10 = call i32* @func(i8* %9)
store i32* %10, i32** %7
%11 = load i32*, i32** %7
%12 = load i32, i32* %11
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"this is voide_pointer.c\00"
@.str.1 = [5 x i8] c"1234\00"
@.str.2 = [6 x i8] c"%08x\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32* @func(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %4
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("print hello on develop branch\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"print hello on develop branch\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [30 x i8] c"print hello on develop branch\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int main() {
  int a[] = {1, 2, 3};
  int *p = a + 2;
  int *q = a + 1;
  asm volatile("nop");
  *p += 10;
  asm volatile("nop");
  *q += 10;
  asm volatile("nop");
  __builtin_memcpy(&a, (int[3]){4, 5, 6}, sizeof(a));
  asm volatile("nop");
  *p += 20;
  asm volatile("nop");
  *q += 20;
  asm volatile("nop");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0xeee(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeec(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
lea    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x20(%rbp)
nop
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0xa,%ecx
mov    %ecx,(%rax)
nop
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0xa,%ecx
mov    %ecx,(%rax)
nop
movl   $0x4,-0x2c(%rbp)
movl   $0x5,-0x28(%rbp)
movl   $0x6,-0x24(%rbp)
mov    -0x2c(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x8(%rbp)
nop
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x14,%ecx
mov    %ecx,(%rax)
nop
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0x14,%ecx
mov    %ecx,(%rax)
nop
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.a = [3 x i32] [i32 1, i32 2, i32 3]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [3 x i32]
store i32 0, i32* %1
%6 = bitcast [3 x i32]* %2 to i8*
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%8 = getelementptr inbounds i32, i32* %7, i64 2
store i32* %8, i32** %3
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%10 = getelementptr inbounds i32, i32* %9, i64 1
store i32* %10, i32** %4
%11 = load i32*, i32** %3
%12 = load i32, i32* %11
%13 = add nsw i32 %12, 10
store i32 %13, i32* %11
%14 = load i32*, i32** %4
%15 = load i32, i32* %14
%16 = add nsw i32 %15, 10
store i32 %16, i32* %14
%17 = bitcast [3 x i32]* %2 to i8*
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
store i32 4, i32* %18
%19 = getelementptr inbounds i32, i32* %18, i64 1
store i32 5, i32* %19
%20 = getelementptr inbounds i32, i32* %19, i64 1
store i32 6, i32* %20
%21 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%22 = bitcast i32* %21 to i8*
%23 = load i32*, i32** %3
%24 = load i32, i32* %23
%25 = add nsw i32 %24, 20
store i32 %25, i32* %23
%26 = load i32*, i32** %4
%27 = load i32, i32* %26
%28 = add nsw i32 %27, 20
store i32 %28, i32* %26
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}
/* Variables and functions */
double luaL_check_number(int);
int /*<<< orphan*/ lua_pushnumber(int /*<<< orphan*/);
int /*<<< orphan*/ sin(double);
void math_sin(void) {
  lua_pushnumber(sin(
      ((luaL_check_number(1)) * (((double)3.14159265358979323846) / 180.0))));
}


x86 assembly (clang, -O0):
<math_sin>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <luaL_check_number@plt>
movsd  0xeba(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1040 <sin@plt>
mov    %eax,%edi
call   1050 <lua_pushnumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_sin>:
push   %rax
mov    $0x1,%edi
call   1030 <luaL_check_number@plt>
mulsd  0xebd(%rip),%xmm0
call   1040 <sin@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <lua_pushnumber@plt>

LLVM IR (-O0):
define void @math_sin() {
%1 = call double @luaL_check_number(i32 1)
%2 = fmul double %1, 0x3F91DF46A2529D39
%3 = call i32 @sin(double %2)
%4 = call i32 @lua_pushnumber(i32 %3)
ret void
}

LLVM IR (-O2):
define void @math_sin() {
%1 = tail call double @luaL_check_number(i32 1)
%2 = fmul double %1, 0x3F91DF46A2529D39
%3 = tail call i32 @sin(double %2)
%4 = tail call i32 @lua_pushnumber(i32 %3)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int CountBits8(uint8_t val) {
  val = (val & 0x55) + ((val & 0xaa) >> 1);
  val = (val & 0x33) + ((val & 0xcc) >> 2);
  val = (val & 0x0f) + ((val & 0xf0) >> 4);
  return val;
}


x86 assembly (clang, -O0):
<CountBits8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x55,%eax
mov    -0x4(%rbp),%ecx
and    $0xaa,%ecx
sar    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x33,%eax
mov    -0x4(%rbp),%ecx
and    $0xcc,%ecx
sar    $0x2,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    -0x4(%rbp),%ecx
and    $0xf0,%ecx
sar    $0x4,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CountBits8>:
mov    %edi,%eax
and    $0x55,%eax
shr    %edi
and    $0x55,%edi
add    %edi,%eax
mov    %eax,%ecx
and    $0x33,%ecx
shr    $0x2,%eax
and    $0xfffffff3,%eax
add    %ecx,%eax
mov    %eax,%ecx
and    $0x7,%ecx
shr    $0x4,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @CountBits8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 85
%5 = load i32, i32* %2
%6 = and i32 %5, 170
%7 = ashr i32 %6, 1
%8 = add nsw i32 %4, %7
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = and i32 %9, 51
%11 = load i32, i32* %2
%12 = and i32 %11, 204
%13 = ashr i32 %12, 2
%14 = add nsw i32 %10, %13
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = and i32 %15, 15
%17 = load i32, i32* %2
%18 = and i32 %17, 240
%19 = ashr i32 %18, 4
%20 = add nsw i32 %16, %19
store i32 %20, i32* %2
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @CountBits8(i32 %0) {
%2 = and i32 %0, 85
%3 = lshr i32 %0, 1
%4 = and i32 %3, 85
%5 = add nuw nsw i32 %4, %2
%6 = and i32 %5, 51
%7 = lshr i32 %5, 2
%8 = and i32 %7, 51
%9 = add nuw nsw i32 %8, %6
%10 = and i32 %9, 7
%11 = lshr i32 %9, 4
%12 = add nuw nsw i32 %10, %11
ret i32 %12
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t revbits(uint16_t n) {
  uint16_t nr;
  unsigned int i;
  const unsigned int bits = sizeof(uint16_t) * 8;
  i = 0;
  nr = 0;
  while (1) {
    nr |= (n & 1);
    if (++i >= bits)
      break;
    nr = nr << 1;
    n = n >> 1;
  }
  return nr;
}


x86 assembly (clang, -O0):
<revbits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x20,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x20,%eax
jb     113f <revbits+0x3f>
jmp    1156 <revbits+0x56>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111c <revbits+0x1c>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<revbits>:
mov    %edi,%eax
and    $0x1,%eax
mov    $0x1c,%ecx
nopw   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x2,%edx
lea    (%rdx,%rax,4),%eax
mov    %edi,%edx
shr    $0x2,%edx
and    $0x1,%edx
or     %eax,%edx
mov    %edi,%eax
shr    $0x3,%eax
and    $0x1,%eax
lea    (%rax,%rdx,2),%eax
test   %ecx,%ecx
je     1141 <revbits+0x41>
sar    $0x4,%edi
mov    %edi,%edx
and    $0x1,%edx
lea    (%rdx,%rax,2),%eax
add    $0xfffffffc,%ecx
jmp    1110 <revbits+0x10>
ret

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

LLVM IR (-O2):
define i32 @revbits(i32 %0) {
%2 = and i32 %0, 1
br label %3
3: ; preds = %18, %1
%4 = phi i32 [ 1, %1 ], [ %23, %18 ]
%5 = phi i32 [ %2, %1 ], [ %22, %18 ]
%6 = phi i32 [ %0, %1 ], [ %20, %18 ]
%7 = shl i32 %5, 2
%8 = and i32 %6, 2
%9 = or i32 %7, %8
%10 = lshr i32 %6, 2
%11 = and i32 %10, 1
%12 = or i32 %11, %9
%13 = shl i32 %12, 1
%14 = lshr i32 %6, 3
%15 = and i32 %14, 1
%16 = or i32 %15, %13
%17 = icmp eq i32 %4, 29
br i1 %17, label %24, label %18
18: ; preds = %3
%19 = shl i32 %16, 1
%20 = ashr i32 %6, 4
%21 = and i32 %20, 1
%22 = or i32 %21, %19
%23 = add nuw nsw i32 %4, 4
br label %3
24: ; preds = %3
ret i32 %16
}
/* Variables and functions */
int isspace(unsigned char);
int isSpace(const char *ptr) { return isspace(*(unsigned char *)ptr); }


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

x86 assembly (clang, -O2):
<isSpace>:
movzbl (%rdi),%edi
jmp    1030 <isspace@plt>

LLVM IR (-O0):
define i32 @isSpace(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = call i32 @isspace(i8 zeroext %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @isSpace(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @isspace(i8 zeroext %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int dup_safer(int);
int errno;
int fd_safer(int fd) {
  if (0 <= fd && fd <= 2) {
    int f = dup_safer(fd);
    int e = errno;
    close(fd);
    errno = e;
    fd = f;
  }
  return fd;
}


x86 assembly (clang, -O0):
<fd_safer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmp    -0x4(%rbp),%eax
jg     1171 <fd_safer+0x51>
cmpl   $0x2,-0x4(%rbp)
jg     1171 <fd_safer+0x51>
mov    -0x4(%rbp),%edi
call   1040 <dup_safer@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    -0xc(%rbp),%ecx
mov    0x2e77(%rip),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_safer>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
cmp    $0x2,%edi
ja     1151 <fd_safer+0x31>
mov    %ebx,%edi
call   1040 <dup_safer@plt>
mov    %eax,%r15d
mov    0x2ea1(%rip),%r14
mov    (%r14),%ebp
mov    %ebx,%edi
call   1030 <close@plt>
mov    %ebp,(%r14)
mov    %r15d,%eax
jmp    1153 <fd_safer+0x33>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @fd_safer(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = icmp sle i32 0, %5
br i1 %6, label %7, label %18
7: ; preds = %1
%8 = load i32, i32* %2
%9 = icmp sle i32 %8, 2
br i1 %9, label %10, label %18
10: ; preds = %7
%11 = load i32, i32* %2
%12 = call i32 @dup_safer(i32 %11)
store i32 %12, i32* %3
%13 = load i32, i32* @errno
store i32 %13, i32* %4
%14 = load i32, i32* %2
%15 = call i32 @close(i32 %14)
%16 = load i32, i32* %4
store i32 %16, i32* @errno
%17 = load i32, i32* %3
store i32 %17, i32* %2
br label %18
18: ; preds = %10, %7, %1
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @fd_safer(i32 %0) {
%2 = icmp ult i32 %0, 3
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i32 @dup_safer(i32 %0)
%5 = load i32, i32* @errno
%6 = tail call i32 @close(i32 %0)
store i32 %5, i32* @errno
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ %4, %3 ], [ %0, %1 ]
ret i32 %8
}
short VerDate(char *pcDate) {
  short sRetour = 0;
  if (pcDate == 0) {
    sRetour = 1;
  }
  if (pcDate == 0)
    sRetour = 1;
  if (pcDate == 0) {
    sRetour = 1;
    return sRetour;
  }
  return sRetour;
}


x86 assembly (clang, -O0):
<VerDate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movw   $0x0,-0x12(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <VerDate+0x1f>
movw   $0x1,-0x12(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1130 <VerDate+0x30>
movw   $0x1,-0x12(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114e <VerDate+0x4e>
movw   $0x1,-0x12(%rbp)
mov    -0x12(%rbp),%ax
mov    %ax,-0x2(%rbp)
jmp    1156 <VerDate+0x56>
mov    -0x12(%rbp),%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define signext i16 @VerDate(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = zext i1 %2 to i16
ret i16 %3
}
void string_replace(char *_des, const char _ch, const unsigned int _pos) {
  _des[_pos] = _ch;
  return;
}


x86 assembly (clang, -O0):
<string_replace>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x9(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_replace>:
mov    %edx,%eax
mov    %sil,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @string_replace(i8* %0, i8 signext %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i32
store i8* %0, i8** %4
store i8 %1, i8* %5
store i32 %2, i32* %6
%7 = load i8, i8* %5
%8 = load i8*, i8** %4
%9 = load i32, i32* %6
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
store i8 %7, i8* %11
ret void
}

LLVM IR (-O2):
define void @string_replace(i8* nocapture writeonly %0, i8 signext %1, i32 %2) {
%4 = zext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %1, i8* %5
ret void
}
/* Variables and functions */
int max(unsigned int, unsigned int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  unsigned int a = 63;
  unsigned int b = 68;
  printf("max: %d ", max(a, b));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3f,-0x4(%rbp)
movl   $0x44,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <max@plt>
mov    %eax,%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3f,%edi
mov    $0x44,%esi
call   1040 <max@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"max: %d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 63, i32* %1
store i32 68, i32* %2
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = call i32 @max(i32 %3, i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"max: %d \00"
define i32 @main() {
%1 = tail call i32 @max(i32 63, i32 68)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int file_uninit(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @file_uninit() {
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int x;
};
typedef TYPE_1__ XMotionEvent;

/* Variables and functions */
void set_XMotionEvent_x(void *_p, int _v) { ((XMotionEvent *)_p)->x = (int)_v; }


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

x86 assembly (clang, -O2):
<set_XMotionEvent_x>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XMotionEvent_x(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XMotionEvent_x(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ inlined();
void test() { inlined(); }


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

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

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

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 (...) @inlined()
ret void
}
void XPointInRegion() {}


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

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

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

LLVM IR (-O2):
define void @XPointInRegion() {
ret void
}
void test7(void *context, void (*callback)(void *context)) {}


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

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

LLVM IR (-O0):
define void @test7(i8* %0, void (i8*)* %1) {
%3 = alloca i8*
%4 = alloca void (i8*)*
store i8* %0, i8** %3
store void (i8*)* %1, void (i8*)** %4
ret void
}

LLVM IR (-O2):
define void @test7(i8* nocapture %0, void (i8*)* nocapture %1) {
ret void
}
void discard_buffer(void) {}


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

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

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

LLVM IR (-O2):
define void @discard_buffer() {
ret void
}
/* Variables and functions */
scalar_t__ db_query(int /*<<< orphan*/ *, int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
ativRemover(int codAtividade) {
  char query[70];
  sprintf(query, "DELETE FROM atividade WHERE codatividade = %d;",
          codAtividade);
  return db_query(NULL, NULL, query) != 0;
}


x86 assembly (clang, -O0):
<ativRemover>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x50(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   1030 <db_query@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ativRemover>:
push   %rbx
sub    $0x50,%rsp
mov    %edi,%edx
lea    0xed2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <db_query@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"DELETE FROM atividade WHERE codatividade = %d;\00"
define i32 @ativRemover(i32 %0) {
%2 = alloca i32
%3 = alloca [70 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [70 x i8], [70 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [70 x i8], [70 x i8]* %3, i64 0, i64 0
%8 = call i64 @db_query(i32* null, i32* null, i8* %7)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
@.str = [47 x i8] c"DELETE FROM atividade WHERE codatividade = %d;\00"
define i32 @ativRemover(i32 %0) {
%2 = alloca [70 x i8]
%3 = getelementptr inbounds [70 x i8], [70 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i64 @db_query(i32* null, i32* null, i8* %3)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
void speakup_init(int currcons) {}


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

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

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

LLVM IR (-O2):
define void @speakup_init(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ porting_dbg(char *, char const *, char const *);
int link(const char *path1, const char *path2) {
  porting_dbg("*** link(%s,%s) is not available.", path1, path2);
  return -1;
}


x86 assembly (clang, -O0):
<link>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rdi
call   1030 <porting_dbg@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<link>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee2(%rip),%rdi
call   1030 <porting_dbg@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"*** link(%s,%s) is not available.\00"
define i32 @link(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @porting_dbg(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret i32 -1
}

LLVM IR (-O2):
@.str = [34 x i8] c"*** link(%s,%s) is not available.\00"
define i32 @link(i8* %0, i8* %1) {
%3 = tail call i32 @porting_dbg(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strcspn(char const *, char const *);
int main() {
  int posicao;
  const char string1[] = "1234567890";
  const char string2[] = "468";
  posicao = strcspn(string1, string2);
  printf("posicao encontrada: %d\n", posicao + 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x13(%rbp)
mov    0xec7(%rip),%ax
mov    %ax,-0xb(%rbp)
mov    0xebf(%rip),%al
mov    %al,-0x9(%rbp)
mov    0xeb7(%rip),%eax
mov    %eax,-0x17(%rbp)
lea    -0x13(%rbp),%rdi
lea    -0x17(%rbp),%rsi
call   1040 <strcspn@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
add    $0x1,%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.string1 = [11 x i8] c"1234567890\00"
@__const.main.string2 = [4 x i8] c"468\00"
@.str = [24 x i8] c"posicao encontrada: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [11 x i8]
%4 = alloca [4 x i8]
store i32 0, i32* %1
%5 = bitcast [11 x i8]* %3 to i8*
%6 = bitcast [4 x i8]* %4 to i8*
%7 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%9 = call i32 @strcspn(i8* %7, i8* %8)
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
%12 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"posicao encontrada: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}
/* Type definitions */
struct bplus_leaf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct bplus_leaf *);
void leaf_delete(struct bplus_leaf *node) { free(node); }


x86 assembly (clang, -O0):
<leaf_delete>:
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):
<leaf_delete>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.bplus_leaf = type { i32 }
define void @leaf_delete(%struct.bplus_leaf* nocapture %0) {
%2 = tail call i32 @free(%struct.bplus_leaf* %0)
ret void
}