xunge/DecIR huggingface dataset:
int binarystringTest(char n[]) {
  int test;
  for (int i = 0; n[i] != 0; i++) {
    if (!(n[i] == 0 || n[i] == 1)) {
      test = 0;
      break;
    } else {
      test = 1;
    }
  }
  return test;
}


x86 assembly (clang, -O0):
<binarystringTest>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1174 <binarystringTest+0x74>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115a <binarystringTest+0x5a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x1,%eax
je     115a <binarystringTest+0x5a>
movl   $0x0,-0xc(%rbp)
jmp    1174 <binarystringTest+0x74>
movl   $0x1,-0xc(%rbp)
jmp    1166 <binarystringTest+0x66>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    110f <binarystringTest+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<binarystringTest>:
movzbl (%rdi),%eax
cmp    $0x1,%al
jne    110d <binarystringTest+0xd>
add    $0x1,%rdi
jmp    1100 <binarystringTest>
test   %al,%al
jne    1117 <binarystringTest+0x17>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @binarystringTest(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ %7, %6 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %9 [
i8 0, label %8
i8 1, label %6
]
6: ; preds = %2
%7 = add nuw i64 %3, 1
br label %2
8: ; preds = %2
br label %9
9: ; preds = %2, %8
%10 = phi i32 [ 1, %8 ], [ 0, %2 ]
ret i32 %10
}
__attribute__((always_)) int LZ4HC_literalsPrice(int const litlen) {
  int price = litlen;
  ((void)0);
  if (litlen >= (int)((1U << (8 - 4)) - 1))
    price += 1 + ((litlen - (int)((1U << (8 - 4)) - 1)) / 255);
  return price;
}


x86 assembly (clang, -O0):
<LZ4HC_literalsPrice>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xf,-0x4(%rbp)
jl     112e <LZ4HC_literalsPrice+0x2e>
mov    -0x4(%rbp),%eax
sub    $0xf,%eax
mov    $0xff,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4HC_literalsPrice>:
mov    %edi,%eax
cmp    $0xf,%edi
jl     111c <LZ4HC_literalsPrice+0x1c>
lea    -0xf(%rax),%ecx
mov    $0x80808081,%edx
imul   %rcx,%rdx
shr    $0x27,%rdx
add    %edx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @LZ4HC_literalsPrice(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, 15
br i1 %6, label %7, label %14
7: ; preds = %1
%8 = load i32, i32* %2
%9 = sub nsw i32 %8, 15
%10 = sdiv i32 %9, 255
%11 = add nsw i32 1, %10
%12 = load i32, i32* %3
%13 = add nsw i32 %12, %11
store i32 %13, i32* %3
br label %14
14: ; preds = %7, %1
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @LZ4HC_literalsPrice(i32 %0) {
%2 = icmp sgt i32 %0, 14
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = add nsw i32 %0, -15
%5 = udiv i32 %4, 255
%6 = add nuw i32 %0, 1
%7 = add nuw i32 %6, %5
br label %8
8: ; preds = %3, %1
%9 = phi i32 [ %7, %3 ], [ %0, %1 ]
ret i32 %9
}
/* Type definitions */
struct list_node {
  int dummy;
};
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ list_del(struct list_node *);
int /*<<< orphan*/ list_empty(struct list_head *);
void list_del_from(struct list_head *h, struct list_node *n) {
  assert(!list_empty(h));
  list_del(n);
}


x86 assembly (clang, -O0):
<list_del_from>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <list_empty@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1030 <list_del@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_del_from>:
push   %rbx
mov    %rsi,%rbx
call   1050 <list_empty@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <list_del@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
%struct.list_node = type { i32 }
define void @list_del_from(%struct.list_head* %0, %struct.list_node* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_node*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_node* %1, %struct.list_node** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = call i32 @list_empty(%struct.list_head* %5)
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load %struct.list_node*, %struct.list_node** %4
%12 = call i32 @list_del(%struct.list_node* %11)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
%struct.list_node = type { i32 }
define void @list_del_from(%struct.list_head* %0, %struct.list_node* %1) {
%3 = tail call i32 @list_empty(%struct.list_head* %0)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @list_del(%struct.list_node* %1)
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int utype;
};
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef TYPE_1__ ASN1_ITEM;

/* Variables and functions */
int asn1_get_choice_selector(ASN1_VALUE **pval, const ASN1_ITEM *it) {
  int *sel = (void *)(((char *)*pval) + it->utype);
  return *sel;
}


x86 assembly (clang, -O0):
<asn1_get_choice_selector>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<asn1_get_choice_selector>:
mov    (%rdi),%rax
movslq (%rsi),%rcx
mov    (%rax,%rcx,1),%eax
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
define i32 @asn1_get_choice_selector(i32** %0, %struct.TYPE_3__* %1) {
%3 = alloca i32**
%4 = alloca %struct.TYPE_3__*
%5 = alloca i32*
store i32** %0, i32*** %3
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %4
%6 = load i32**, i32*** %3
%7 = load i32*, i32** %6
%8 = bitcast i32* %7 to i8*
%9 = load %struct.TYPE_3__*, %struct.TYPE_3__** %4
%10 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %9, i32 0, i32 0
%11 = load i32, i32* %10
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %8, i64 %12
%14 = bitcast i8* %13 to i32*
store i32* %14, i32** %5
%15 = load i32*, i32** %5
%16 = load i32, i32* %15
ret i32 %16
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
define i32 @asn1_get_choice_selector(i32** nocapture %0, %struct.TYPE_3__* nocapture %1) {
%3 = bitcast i32** %0 to i8**
%4 = load i8*, i8** %3
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %4, i64 %7
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
ret i32 %10
}
int DestroyGenerator(Generator_t) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @DestroyGenerator(i32 %0) {
ret i32 0
}
/* Variables and functions */
float distributions_uniform(double, double);
float log(double);
float distributions_exponential(float mean) {
  float u, x;
  u = distributions_uniform(0.0, 1.0);
  x = -(float)(log(1.0 - u) * mean);
  return (x);
}


x86 assembly (clang, -O0):
<distributions_exponential>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  0xec8(%rip),%xmm1
call   1030 <distributions_uniform@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xead(%rip),%xmm0
subsd  %xmm1,%xmm0
call   1040 <log@plt>
mulss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<distributions_exponential>:
push   %rax
movss  %xmm0,0x4(%rsp)
movsd  0xed1(%rip),%xmm1
xorps  %xmm0,%xmm0
call   1030 <distributions_uniform@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xeba(%rip),%xmm0
subsd  %xmm1,%xmm0
call   1040 <log@plt>
xorpd  0xeb9(%rip),%xmm0
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @distributions_exponential(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
%5 = call float @distributions_uniform(double 0.000000e+00, double 1.000000e+00)
store float %5, float* %3
%6 = load float, float* %3
%7 = fpext float %6 to double
%8 = fsub double 1.000000e+00, %7
%9 = call float @log(double %8)
%10 = load float, float* %2
%11 = fmul float %9, %10
%12 = fneg float %11
store float %12, float* %4
%13 = load float, float* %4
ret float %13
}

LLVM IR (-O2):
define float @distributions_exponential(float %0) {
%2 = tail call float @distributions_uniform(double 0.000000e+00, double 1.000000e+00)
%3 = fpext float %2 to double
%4 = fsub double 1.000000e+00, %3
%5 = tail call float @log(double %4)
%6 = fneg float %5
%7 = fmul float %6, %0
ret float %7
}
int test_imm_CAint8_reg(signed char val) {
  return ((val) & (-0xCA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CAint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff36,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_CAint8_reg>:
test   $0xffffff36,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_CAint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -202
%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_CAint8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -202
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void functionStrstr() {
  char *s1 = "fenglin";
  char *s2 = "dad";
  printf("ret->%p\n", strstr(s1, s2));
  char *s3 = "en";
  printf("ret->%p\n", strstr(s1, s3));
  printf("ret->%c\n", *strstr(s1, s3));
}


x86 assembly (clang, -O0):
<functionStrstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xece(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strstr@plt>
mov    %rax,%rsi
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb2(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strstr@plt>
mov    %rax,%rsi
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strstr@plt>
movsbl (%rax),%esi
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<functionStrstr>:
push   %rbx
lea    0xef0(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed6(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
mov    $0x65,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"fenglin\00"
@.str.1 = [4 x i8] c"dad\00"
@.str.2 = [9 x i8] c"ret->%p\0A\00"
@.str.3 = [3 x i8] c"en\00"
@.str.4 = [9 x i8] c"ret->%c\0A\00"
define void @functionStrstr() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%4 = load i8*, i8** %1
%5 = load i8*, i8** %2
%6 = call i8* @strstr(i8* %4, i8* %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %6)
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %3
%8 = load i8*, i8** %1
%9 = load i8*, i8** %3
%10 = call i8* @strstr(i8* %8, i8* %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %10)
%12 = load i8*, i8** %1
%13 = load i8*, i8** %3
%14 = call i8* @strstr(i8* %12, i8* %13)
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %16)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"fenglin\00"
@.str.2 = [9 x i8] c"ret->%p\0A\00"
@.str.4 = [9 x i8] c"ret->%c\0A\00"
define void @functionStrstr() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* null)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 1))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 101)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void hash_vdelete(void *v) {
  if (v) {
    free(v);
  }
}


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

x86 assembly (clang, -O2):
<hash_vdelete>:
test   %rdi,%rdi
je     111a <hash_vdelete+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @hash_vdelete(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
unsigned long PWMGenFaultTriggerGet(unsigned long ulBase, unsigned long ulGen,
                                    unsigned long ulGroup) {
  ;
  ;
  ;
  if (ulGroup == 0) {
    return ((*((volatile unsigned long *)(((ulBase) + (ulGen)) + 0x00000034))));
  } else {
    return ((*((volatile unsigned long *)(((ulBase) + (ulGen)) + 0x00000038))));
  }
}


x86 assembly (clang, -O0):
<PWMGenFaultTriggerGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1130 <PWMGenFaultTriggerGet+0x30>
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    0x34(%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1140 <PWMGenFaultTriggerGet+0x40>
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    0x38(%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMGenFaultTriggerGet>:
xor    %eax,%eax
test   %rdx,%rdx
setne  %al
add    %rsi,%rdi
mov    0x34(%rdi,%rax,4),%rax
ret

LLVM IR (-O0):
define i64 @PWMGenFaultTriggerGet(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%8 = load i64, i64* %7
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %3
%11 = load i64, i64* %5
%12 = load i64, i64* %6
%13 = add i64 %11, %12
%14 = add i64 %13, 52
%15 = inttoptr i64 %14 to i64*
%16 = load volatile i64, i64* %15
store i64 %16, i64* %4
br label %24
17: ; preds = %3
%18 = load i64, i64* %5
%19 = load i64, i64* %6
%20 = add i64 %18, %19
%21 = add i64 %20, 56
%22 = inttoptr i64 %21 to i64*
%23 = load volatile i64, i64* %22
store i64 %23, i64* %4
br label %24
24: ; preds = %17, %10
%25 = load i64, i64* %4
ret i64 %25
}

LLVM IR (-O2):
define i64 @PWMGenFaultTriggerGet(i64 %0, i64 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
%5 = add i64 %1, %0
%6 = select i1 %4, i64 52, i64 56
%7 = add i64 %5, %6
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void exec_script() {
  system(
      "/usr/local/pharos/sbin/rndc -c /usr/local/pharos/conf/trndc.conf stats");
  system("perl /tmp/rndc_tsar.pl > /tmp/rndc_tsar.txt");
  system("echo -n 'badvs,' >> /tmp/rndc_tsar.txt; MYSQL_BIN=`/bin/rpm -ql "
         "mysql|/bin/egrep -e '/bin/mysql$'` && ${MYSQL_BIN} -ss -uroot "
         "-Ddns_config -e 'SELECT COUNT(name) FROM vs WHERE in_use=1 AND "
         "available=0' >> /tmp/rndc_tsar.txt");
}


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

x86 assembly (clang, -O2):
<exec_script>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
lea    0xf23(%rip),%rdi
call   1030 <system@plt>
lea    0xf43(%rip),%rdi
pop    %rax
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [71 x i8] c"/usr/local/pharos/sbin/rndc -c /usr/local/pharos/conf/trndc.conf stats\00"
@.str.1 = [44 x i8] c"perl /tmp/rndc_tsar.pl > /tmp/rndc_tsar.txt\00"
@.str.2 = [224 x i8] c"echo -n 'badvs,' >> /tmp/rndc_tsar.txt; MYSQL_BIN=`/bin/rpm -ql mysql|/bin/egrep -e '/bin/mysql$'` && ${MYSQL_BIN} -ss -uroot -Ddns_config -e 'SELECT COUNT(name) FROM vs WHERE in_use=1 AND available=0' >> /tmp/rndc_tsar.txt\00"
define void @exec_script() {
%1 = call i32 @system(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([224 x i8], [224 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [71 x i8] c"/usr/local/pharos/sbin/rndc -c /usr/local/pharos/conf/trndc.conf stats\00"
@.str.1 = [44 x i8] c"perl /tmp/rndc_tsar.pl > /tmp/rndc_tsar.txt\00"
@.str.2 = [224 x i8] c"echo -n 'badvs,' >> /tmp/rndc_tsar.txt; MYSQL_BIN=`/bin/rpm -ql mysql|/bin/egrep -e '/bin/mysql$'` && ${MYSQL_BIN} -ss -uroot -Ddns_config -e 'SELECT COUNT(name) FROM vs WHERE in_use=1 AND available=0' >> /tmp/rndc_tsar.txt\00"
define void @exec_script() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([224 x i8], [224 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rol32(uint32_t x, int r) { return (x << r) | (x >> (32 - r)); }


x86 assembly (clang, -O0):
<rol32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rol32>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rol32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rol32(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
void INT_Excep_CTSU_CTSUFN(void) {}


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

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

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

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

/* Variables and functions */
int asprintf(char **, char *, int /*<<< orphan*/);
char *strdup(char *);
char *print_pid(pid_t pid) {
  char *tmp = NULL;
  if (asprintf(&tmp, "%d", pid) < 1)
    return strdup("0");
  return tmp;
}


x86 assembly (clang, -O0):
<print_pid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0xc(%rbp),%edx
lea    -0x18(%rbp),%rdi
lea    0xebf(%rip),%rsi
call   1030 <asprintf@plt>
cmp    $0x1,%eax
jge    1164 <print_pid+0x44>
lea    0xead(%rip),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    116c <print_pid+0x4c>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_pid>:
push   %rax
mov    %edi,%edx
movq   $0x0,(%rsp)
lea    0xece(%rip),%rsi
mov    %rsp,%rdi
call   1030 <asprintf@plt>
test   %eax,%eax
jle    1144 <print_pid+0x24>
mov    (%rsp),%rax
pop    %rcx
ret
lea    0xeb8(%rip),%rdi
call   1040 <strdup@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"0\00"
define i8* @print_pid(i32 %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
store i8* null, i8** %2
%4 = call i32 @asprintf(i8** %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = icmp slt i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call dereferenceable_or_null(2) i8* @strdup(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = load i8*, i8** %2
br label %10
10: ; preds = %8, %6
%11 = phi i8* [ %7, %6 ], [ %9, %8 ]
ret i8* %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ fwrite(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void trace_log_int(uint32_t v) {
  uint32_t sw;
  sw = htonl(v);
  fwrite(&sw, 4, 1, stdout);
}


x86 assembly (clang, -O0):
<trace_log_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%ecx
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fwrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trace_log_int>:
push   %rax
call   1030 <htonl@plt>
mov    %eax,0x4(%rsp)
mov    0x2eaf(%rip),%rax
mov    (%rax),%ecx
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fwrite@plt>
pop    %rax
ret

LLVM IR (-O0):
@stdout = global i32 0
define void @trace_log_int(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @htonl(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* @stdout
%7 = call i32 @fwrite(i32* %3, i32 4, i32 1, i32 %6)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @trace_log_int(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @htonl(i32 %0)
store i32 %4, i32* %2
%5 = load i32, i32* @stdout
%6 = call i32 @fwrite(i32* %2, i32 4, i32 1, i32 %5)
ret void
}
/* Variables and functions */
int omap_rev();
int is_omap343x(void) {
  return (((omap_rev() >> 20) & 0x0fff) == (0x343)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<is_omap343x>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <omap_rev@plt>
mov    %eax,%edx
sar    $0x14,%edx
and    $0xfff,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x343,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_omap343x>:
push   %rax
xor    %eax,%eax
call   1030 <omap_rev@plt>
and    $0xfff00000,%eax
xor    %ecx,%ecx
cmp    $0x34300000,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_omap343x() {
%1 = call i32 (...) @omap_rev()
%2 = ashr i32 %1, 20
%3 = and i32 %2, 4095
%4 = icmp eq i32 %3, 835
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_omap343x() {
%1 = tail call i32 (...) @omap_rev()
%2 = and i32 %1, -1048576
%3 = icmp eq i32 %2, 875560960
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
main() {
  int a = 10, b = 3, c = 5, d;
  printf(" %d %d %d \n", a << 1, a = b, a >> 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    -0x4(%rbp),%esi
shl    $0x1,%esi
mov    -0x8(%rbp),%edx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x1,%ecx
lea    0xeba(%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
mov    $0x14,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c" %d %d %d \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 20, i32 3, i32 1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ KeySym;

/* Variables and functions */
int IsMiscFunctionKey(int /*<<< orphan*/);
int x11_extras_IsMiscFunctionKey(KeySym keysym) {
  return IsMiscFunctionKey(keysym);
}


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

x86 assembly (clang, -O2):
<x11_extras_IsMiscFunctionKey>:
jmp    1030 <IsMiscFunctionKey@plt>

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

LLVM IR (-O2):
define i32 @x11_extras_IsMiscFunctionKey(i32 %0) {
%2 = tail call i32 @IsMiscFunctionKey(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ encrypt(char *);
int main() {
  char *msg = "CONVERT THIS MORSE CODE";
  encrypt(msg);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"CONVERT THIS MORSE CODE\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @encrypt(i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"CONVERT THIS MORSE CODE\00"
define i32 @main() {
%1 = tail call i32 @encrypt(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ pclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ *stdout;
void close_file(FILE *fp, int zip) {
  if (fp && fp != stdin && fp != stdout) {
    if (zip)
      pclose(fp);
    else
      fclose(fp);
  }
}


x86 assembly (clang, -O0):
<close_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1188 <close_file+0x68>
mov    -0x8(%rbp),%rax
mov    0x2ea3(%rip),%rcx
cmp    (%rcx),%rax
je     1188 <close_file+0x68>
mov    -0x8(%rbp),%rax
mov    0x2e7f(%rip),%rcx
cmp    (%rcx),%rax
je     1188 <close_file+0x68>
cmpl   $0x0,-0xc(%rbp)
je     117a <close_file+0x5a>
mov    -0x8(%rbp),%rdi
call   1040 <pclose@plt>
jmp    1183 <close_file+0x63>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
jmp    1188 <close_file+0x68>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_file>:
test   %rdi,%rdi
je     1146 <close_file+0x26>
mov    0x2ebc(%rip),%rax
cmp    %rdi,(%rax)
je     1146 <close_file+0x26>
mov    0x2ea0(%rip),%rax
cmp    %rdi,(%rax)
je     1146 <close_file+0x26>
test   %esi,%esi
je     1147 <close_file+0x27>
jmp    1040 <pclose@plt>
ret
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
@stdin = global i32* null
@stdout = global i32* null
define void @close_file(i32* %0, i32 %1) {
%3 = icmp eq i32* %0, null
%4 = load i32*, i32** @stdin
%5 = icmp eq i32* %4, %0
%6 = select i1 %3, i1 true, i1 %5
%7 = load i32*, i32** @stdout
%8 = icmp eq i32* %7, %0
%9 = select i1 %6, i1 true, i1 %8
br i1 %9, label %16, label %10
10: ; preds = %2
%11 = icmp eq i32 %1, 0
br i1 %11, label %14, label %12
12: ; preds = %10
%13 = tail call i32 @pclose(i32* %0)
br label %16
14: ; preds = %10
%15 = tail call i32 @fclose(i32* %0)
br label %16
16: ; preds = %12, %14, %2
ret void
}
void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  unsigned char local1;
  {
    state[0UL] = (input[0UL] - 51238316UL) - (unsigned char)191;
    local1 = 0UL;
    while (local1 < 1UL) {
      state[0UL] |= (state[0UL] & (unsigned char)15) << 3UL;
      state[local1] = state[0UL] - state[local1];
      local1++;
    }
    output[0UL] = state[0UL] + (787497705UL >> (unsigned char)255);
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
sub    $0x30dd5ac,%rax
sub    $0xbf,%rax
mov    %al,-0x11(%rbp)
movb   $0x0,-0x12(%rbp)
movzbl -0x12(%rbp),%eax
cmp    $0x1,%rax
jae    116d <RandomFunc+0x6d>
movzbl -0x11(%rbp),%ecx
and    $0xf,%ecx
shl    $0x3,%ecx
movzbl -0x11(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
movzbl -0x12(%rbp),%ecx
movzbl -0x11(%rbp,%rcx,1),%ecx
sub    %ecx,%eax
mov    %al,%cl
movzbl -0x12(%rbp),%eax
mov    %cl,-0x11(%rbp,%rax,1)
mov    -0x12(%rbp),%al
add    $0x1,%al
mov    %al,-0x12(%rbp)
jmp    1126 <RandomFunc+0x26>
movzbl -0x11(%rbp),%eax
add    %rcx,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @RandomFunc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1 x i8]
%6 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = zext i8 %9 to i64
%11 = sub i64 %10, 51238316
%12 = sub i64 %11, 191
%13 = trunc i64 %12 to i8
%14 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 %13, i8* %14
store i8 0, i8* %6
br label %15
15: ; preds = %19, %2
%16 = load i8, i8* %6
%17 = zext i8 %16 to i64
%18 = icmp ult i64 %17, 1
br i1 %18, label %19, label %45
19: ; preds = %15
%20 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = and i32 %22, 15
%24 = shl i32 %23, 3
%25 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = or i32 %27, %24
%29 = trunc i32 %28 to i8
store i8 %29, i8* %25
%30 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = load i8, i8* %6
%34 = zext i8 %33 to i64
%35 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 %34
%36 = load i8, i8* %35
%37 = zext i8 %36 to i32
%38 = sub nsw i32 %32, %37
%39 = trunc i32 %38 to i8
%40 = load i8, i8* %6
%41 = zext i8 %40 to i64
%42 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 %41
store i8 %39, i8* %42
%43 = load i8, i8* %6
%44 = add i8 %43, 1
store i8 %44, i8* %6
br label %15
45: ; preds = %15
%46 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%47 = load i8, i8* %46
%48 = zext i8 %47 to i64
%49 = add i64 %48, poison
%50 = trunc i64 %49 to i8
%51 = load i8*, i8** %4
%52 = getelementptr inbounds i8, i8* %51, i64 0
store i8 %50, i8* %52
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void *f2(void *arg) {
  printf("f2(%d)\n", (int)arg);
  return (void *)12;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    $0xc,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xc,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"f2(%d)\0A\00"
define i8* @f2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i32
%5 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i8* inttoptr (i64 12 to i8*)
}

LLVM IR (-O2):
@.str = [8 x i8] c"f2(%d)\0A\00"
define i8* @f2(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* inttoptr (i64 12 to i8*)
}
int bar() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @bar() {
ret i32 0
}
/* Variables and functions */
char *k_strrstr(char const *, char const *);
char *k_utf8rchr(const char *s, const char *utf8ch) {
  return k_strrstr(s, utf8ch);
}


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

x86 assembly (clang, -O2):
<k_utf8rchr>:
jmp    1030 <k_strrstr@plt>

LLVM IR (-O0):
define i8* @k_utf8rchr(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 i8* @k_strrstr(i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @k_utf8rchr(i8* %0, i8* %1) {
%3 = tail call i8* @k_strrstr(i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
int ft_iterative_power(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int result;
  result = ft_iterative_power(2, 2);
  printf("The result is %d \n", result);
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"The result is %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @ft_iterative_power(i32 2, i32 2)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"The result is %d \0A\00"
define i32 @main() {
%1 = tail call i32 @ft_iterative_power(i32 2, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int iscntrl(int c) { return c >= 0 && c < 31; }


x86 assembly (clang, -O0):
<iscntrl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <iscntrl+0x20>
cmpl   $0x1f,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscntrl>:
xor    %eax,%eax
cmp    $0x1f,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @iscntrl(i32 %0) {
%2 = icmp ult i32 %0, 31
%3 = zext i1 %2 to i32
ret i32 %3
}
int roundUpPowerOf2(int v) {
  v--;
  v |= v >> 1;
  v |= v >> 2;
  v |= v >> 4;
  v |= v >> 8;
  v |= v >> 16;
  v++;
  return v;
}


x86 assembly (clang, -O0):
<roundUpPowerOf2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundUpPowerOf2>:
lea    -0x1(%rdi),%eax
mov    %eax,%ecx
sar    %ecx
or     %eax,%ecx
mov    %ecx,%eax
sar    $0x2,%eax
or     %ecx,%eax
mov    %eax,%ecx
sar    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,%edx
sar    $0x8,%edx
or     %ecx,%edx
mov    %edx,%eax
sar    $0x10,%eax
or     %edx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @roundUpPowerOf2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, -1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 1
%7 = load i32, i32* %2
%8 = or i32 %7, %6
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = ashr i32 %9, 2
%11 = load i32, i32* %2
%12 = or i32 %11, %10
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = ashr i32 %13, 4
%15 = load i32, i32* %2
%16 = or i32 %15, %14
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = ashr i32 %17, 8
%19 = load i32, i32* %2
%20 = or i32 %19, %18
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = ashr i32 %21, 16
%23 = load i32, i32* %2
%24 = or i32 %23, %22
store i32 %24, i32* %2
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @roundUpPowerOf2(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = ashr i32 %2, 1
%4 = or i32 %3, %2
%5 = ashr i32 %4, 2
%6 = or i32 %5, %4
%7 = ashr i32 %6, 4
%8 = or i32 %7, %6
%9 = ashr i32 %8, 8
%10 = or i32 %9, %8
%11 = ashr i32 %10, 16
%12 = or i32 %11, %10
%13 = add nsw i32 %12, 1
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ found();
int main(void) {
  found();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <found@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @found()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @found()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_warnIfReached();
void f11_3(void) {
  int x;
  --x;
  clang_analyzer_warnIfReached();
}


x86 assembly (clang, -O0):
<f11_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f11_3() {
%1 = tail call i32 (...) @clang_analyzer_warnIfReached()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fftss_plan_with_nthreads(int);
void dfftss_plan_with_nthreads__(int *nthreads) {
  fftss_plan_with_nthreads(*nthreads);
}


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

x86 assembly (clang, -O2):
<dfftss_plan_with_nthreads__>:
mov    (%rdi),%edi
jmp    1030 <fftss_plan_with_nthreads@plt>

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

LLVM IR (-O2):
define void @dfftss_plan_with_nthreads__(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @fftss_plan_with_nthreads(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void GreeterSayHi() { printf("Hello from greeter!! \n"); }


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

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

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

LLVM IR (-O2):
@str = [22 x i8] c"Hello from greeter!! \00"
define void @GreeterSayHi() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret void
}
__attribute__((no, noclone)) unsigned __int128 t160_5sub(unsigned __int128 x) {
  unsigned __int128 r;
  if (__builtin_sub_overflow(x, (unsigned __int128)(3), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t160_5sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
sub    $0x3,%rdx
sbb    $0x0,%rcx
setb   %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1158 <t160_5sub+0x48>
jmp    115f <t160_5sub+0x4f>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t160_5sub>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
sub    $0x3,%rbx
sbb    $0x0,%r14
jae    112b <t160_5sub+0x1b>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t160_5sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.usub.with.overflow.i128(i128 %11, i128 3)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t160_5sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.usub.with.overflow.i128(i128 %6, i128 3)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}