xunge/DecIR huggingface dataset:
/* Variables and functions */
int read();
int main() {
  int i;
  i = 0;
  if (i == 0) {
    i = read();
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    113a <main+0x2a>
mov    $0x0,%al
call   1030 <read@plt>
mov    %eax,-0x8(%rbp)
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @read()
store i32 %6, i32* %2
br label %7
7: ; preds = %5, %0
ret i32 1
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @read()
ret i32 1
}
/* Type definitions */
typedef int uint32_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void EMACVLANRxConfigSet(uint32_t ui32Base, uint16_t ui16Tag,
                         uint32_t ui32Config) {
  ASSERT(ui32Base == 0x400EC000);
  (*((volatile uint32_t *)(ui32Base + 0x0000001C))) =
      ui32Config | (((uint32_t)ui16Tag) << 0);
}


x86 assembly (clang, -O0):
<EMACVLANRxConfigSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x400ec000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
shl    $0x0,%eax
or     %eax,%ecx
mov    -0x4(%rbp),%eax
add    $0x1c,%eax
cltq
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACVLANRxConfigSet>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x400ec000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
or     %r14d,%ebx
movslq %ebp,%rax
mov    %ebx,0x1c(%rax)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @EMACVLANRxConfigSet(i32 %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 1074708480
%9 = zext i1 %8 to i32
%10 = call i32 @ASSERT(i32 %9)
%11 = load i32, i32* %6
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
%14 = shl i32 %13, 0
%15 = or i32 %11, %14
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 28
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i32*
store volatile i32 %15, i32* %19
ret void
}

LLVM IR (-O2):
define void @EMACVLANRxConfigSet(i32 %0, i64 %1, i32 %2) {
%4 = icmp eq i32 %0, 1074708480
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = trunc i64 %1 to i32
%8 = or i32 %7, %2
%9 = add nsw i32 %0, 28
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
store volatile i32 %8, i32* %11
ret void
}
void gtk_text_iter_forward_to_tag_toggle() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_forward_to_tag_toggle() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ expf(int /*<<< orphan*/);
int /*<<< orphan*/ fabsf(float);
float fmaxf(float, float);
float log1pf(int /*<<< orphan*/);
float logsumexpf(float x, float y) {
  return fmaxf(x, y) + log1pf(expf(-fabsf(x - y)));
}


x86 assembly (clang, -O0):
<logsumexpf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm3
movss  -0x8(%rbp),%xmm2
movaps %xmm2,%xmm4
movaps %xmm3,%xmm0
cmpunordss %xmm0,%xmm0
movaps %xmm0,%xmm1
pand   %xmm4,%xmm1
maxss  %xmm3,%xmm2
pandn  %xmm2,%xmm0
por    %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
call   1030 <fabsf@plt>
xor    %edi,%edi
sub    %eax,%edi
call   1050 <expf@plt>
mov    %eax,%edi
call   1040 <log1pf@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logsumexpf>:
sub    $0x18,%rsp
movaps %xmm0,%xmm4
cmpunordss %xmm0,%xmm4
movaps %xmm4,%xmm2
andps  %xmm1,%xmm2
movaps %xmm1,%xmm3
maxss  %xmm0,%xmm3
andnps %xmm3,%xmm4
orps   %xmm2,%xmm4
movaps %xmm4,(%rsp)
subss  %xmm1,%xmm0
call   1030 <fabsf@plt>
neg    %eax
mov    %eax,%edi
call   1050 <expf@plt>
mov    %eax,%edi
call   1040 <log1pf@plt>
addss  (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @logsumexpf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call float @llvm.maxnum.f32(float %5, float %6)
%8 = load float, float* %3
%9 = load float, float* %4
%10 = fsub float %8, %9
%11 = call i32 @fabsf(float %10)
%12 = sub nsw i32 0, %11
%13 = call i32 @expf(i32 %12)
%14 = call float @log1pf(i32 %13)
%15 = fadd float %7, %14
ret float %15
}

LLVM IR (-O2):
define float @logsumexpf(float %0, float %1) {
%3 = tail call float @llvm.maxnum.f32(float %0, float %1)
%4 = fsub float %0, %1
%5 = tail call i32 @fabsf(float %4)
%6 = sub nsw i32 0, %5
%7 = tail call i32 @expf(i32 %6)
%8 = tail call float @log1pf(i32 %7)
%9 = fadd float %3, %8
ret float %9
}
void Empty(void) {}


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

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

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

LLVM IR (-O2):
define void @Empty() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
char *strstr(char *, char *);
void escape_space(char *buf) {
  char *p1, *p2;
  p1 = p2 = buf;
  while ((p1 = strstr(p1, "\\ ")) != NULL) {
    *p1++ = 0;
    strcat(buf, p1);
  }
}


x86 assembly (clang, -O0):
<escape_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xebd(%rip),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     117a <escape_space+0x5a>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcat@plt>
jmp    1138 <escape_space+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<escape_space>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
lea    0xed1(%rip),%rsi
call   1040 <strstr@plt>
test   %rax,%rax
je     1175 <escape_space+0x55>
mov    %rax,%rbx
lea    0xebd(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movb   $0x0,(%rbx)
add    $0x1,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strcat@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strstr@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1150 <escape_space+0x30>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"\\ \00"
define void @escape_space(i8* %0) {
%2 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %8, %4 ], [ %2, %1 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
store i8 0, i8* %5
%7 = tail call i32 @strcat(i8* %0, i8* %6)
%8 = tail call i8* @strstr(i8* dereferenceable(1) %6, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %4
10: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int n = 10;
  int i = 3;
  printf("Contenuto di n: %d\n%d", n, i);
  return 0;
}


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

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

LLVM IR (-O2):
@.str = [22 x i8] c"Contenuto di n: %d\0A%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 10, i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ h2o__fatal(char *, int, char *);
void *malloc(size_t);
void *h2o_mem_alloc(size_t sz) {
  void *p = malloc(sz);
  if (p == NULL)
    h2o__fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/devnexen/h2o/refs/heads/"
               "master/include/h2o/memory.h",
               406, "no memory");
  return p;
}


x86 assembly (clang, -O0):
<h2o_mem_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115c <h2o_mem_alloc+0x3c>
lea    0xeb5(%rip),%rdi
mov    $0x196,%esi
lea    0xf37(%rip),%rdx
call   1030 <h2o__fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2o_mem_alloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1146 <h2o_mem_alloc+0x26>
lea    0xecb(%rip),%rdi
lea    0xf52(%rip),%rdx
mov    $0x196,%esi
call   1030 <h2o__fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/devnexen/h2o/refs/heads/master/include/h2o/memory.h\00"
@.str.1 = [10 x i8] c"no memory\00"
define i8* @h2o_mem_alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @h2o__fatal(i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str, i64 0, i64 0), i32 406, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/devnexen/h2o/refs/heads/master/include/h2o/memory.h\00"
@.str.1 = [10 x i8] c"no memory\00"
define noalias i8* @h2o_mem_alloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @h2o__fatal(i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str, i64 0, i64 0), i32 406, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
int prime(int n) {
  int a = 2;
  while (a < n) {
    if (n % a == 0)
      return 0;
    a++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1144 <prime+0x44>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1136 <prime+0x36>
movl   $0x0,-0x4(%rbp)
jmp    114b <prime+0x4b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <prime+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prime>:
mov    $0x1,%ecx
cmp    $0x3,%edi
jl     1120 <prime+0x20>
mov    $0x2,%esi
nop
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1123 <prime+0x23>
add    $0x1,%esi
cmp    %esi,%edi
jne    1110 <prime+0x10>
mov    %ecx,%eax
ret
xor    %ecx,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @prime(i32 %0) {
%2 = icmp sgt i32 %0, 2
br i1 %2, label %5, label %10
3: ; preds = %5
%4 = icmp eq i32 %9, %0
br i1 %4, label %10, label %5
5: ; preds = %1, %3
%6 = phi i32 [ %9, %3 ], [ 2, %1 ]
%7 = srem i32 %0, %6
%8 = icmp eq i32 %7, 0
%9 = add nuw nsw i32 %6, 1
br i1 %8, label %10, label %3
10: ; preds = %5, %3, %1
%11 = phi i32 [ 1, %1 ], [ 1, %3 ], [ 0, %5 ]
ret i32 %11
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int file_exist(char *filename) {
  struct stat buffer;
  return (stat(filename, &buffer) == 0);
}


x86 assembly (clang, -O0):
<file_exist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exist>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @file_exist(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @file_exist(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
long double test3l(long double a) { return __builtin_copysignl(a, 0.0); }


x86 assembly (clang, -O0):
<test3l>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fabs
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3l>:
fldt   0x8(%rsp)
fabs
ret

LLVM IR (-O0):
define x86_fp80 @test3l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @llvm.copysign.f80(x86_fp80 %3, x86_fp80 0xK00000000000000000000)
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @test3l(x86_fp80 %0) {
%2 = tail call x86_fp80 @llvm.fabs.f80(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_warnIfReached();
void for_loop_exits() {
  int i;
  for (i = 0; i < 10; ++i) {
  }
  clang_analyzer_warnIfReached();
}


x86 assembly (clang, -O0):
<for_loop_exits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    113c <for_loop_exits+0x2c>
jmp    112e <for_loop_exits+0x1e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <for_loop_exits+0xf>
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @for_loop_exits() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
%10 = call i32 (...) @clang_analyzer_warnIfReached()
ret void
}

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

/* Variables and functions */
int /*<<< orphan*/ AUDIO_SELECT_SOURCE;
int ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int audioSelectSource(int fd, audio_stream_source_t source) {
  int ans;
  if ((ans = ioctl(fd, AUDIO_SELECT_SOURCE, source)) < 0) {
    perror("AUDIO SELECT SOURCE: ");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<audioSelectSource>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    -0xc(%rbp),%edx
call   1030 <ioctl@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
jge    1166 <audioSelectSource+0x46>
lea    0xeab(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116d <audioSelectSource+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<audioSelectSource>:
push   %rax
mov    %esi,%edx
mov    0x2ece(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
js     113b <audioSelectSource+0x1b>
pop    %rcx
ret
lea    0xebe(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@AUDIO_SELECT_SOURCE = global i32 0
@.str = [22 x i8] c"AUDIO SELECT SOURCE: \00"
define i32 @audioSelectSource(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = load i32, i32* @AUDIO_SELECT_SOURCE
%9 = load i32, i32* %5
%10 = call i32 @ioctl(i32 %7, i32 %8, i32 %9)
store i32 %10, i32* %6
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %15
14: ; preds = %2
store i32 0, i32* %3
br label %15
15: ; preds = %14, %12
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@AUDIO_SELECT_SOURCE = global i32 0
@.str = [22 x i8] c"AUDIO SELECT SOURCE: \00"
define i32 @audioSelectSource(i32 %0, i32 %1) {
%3 = load i32, i32* @AUDIO_SELECT_SOURCE
%4 = tail call i32 @ioctl(i32 %0, i32 %3, i32 %1)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ -1, %6 ], [ 0, %2 ]
ret i32 %9
}
void X509_delete_ext(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_delete_ext() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int x = 0;
  int y = 0;
  while (x < 5) {
    y = x - y;
    printf("%i%i ", x, y);
    x = x + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1160 <main+0x50>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fputchar(int /*<<< orphan*/ *, char);
void printChars(FILE *out, char *str, int start, int len) {
  int i;
  for (i = start; i < (start + len); i++)
    fputchar(out, str[i]);
}


x86 assembly (clang, -O0):
<printChars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
cmp    %ecx,%eax
jge    1160 <printChars+0x50>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
call   1030 <fputchar@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112c <printChars+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printChars>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %ecx,%ecx
jle    1146 <printChars+0x36>
mov    %rsi,%r14
mov    %rdi,%r15
add    %edx,%ecx
movslq %edx,%rbx
movslq %ecx,%r12
nopw   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%esi
mov    %r15,%rdi
call   1030 <fputchar@plt>
add    $0x1,%rbx
cmp    %r12,%rbx
jl     1130 <printChars+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @printChars(i32* %0, i8* nocapture %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %3, 0
br i1 %5, label %6, label %17
6: ; preds = %4
%7 = add nsw i32 %3, %2
%8 = sext i32 %2 to i64
%9 = sext i32 %7 to i64
br label %10
10: ; preds = %6, %10
%11 = phi i64 [ %8, %6 ], [ %15, %10 ]
%12 = getelementptr inbounds i8, i8* %1, i64 %11
%13 = load i8, i8* %12
%14 = tail call i32 @fputchar(i32* %0, i8 signext %13)
%15 = add nsw i64 %11, 1
%16 = icmp slt i64 %15, %9
br i1 %16, label %10, label %17
17: ; preds = %10, %4
ret void
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Enter a char:\n");
  printf("value of expression getchar() != EOF is %d\n", getchar() != EOF);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    0x2e9d(%rip),%rcx
xor    %esi,%esi
cmp    (%rcx),%rax
setne  %sil
lea    0xea5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Enter a char:\0A\00"
@.str.1 = [44 x i8] c"value of expression getchar() != EOF is %d\0A\00"
@EOF = global i64 0
define i32 @main() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i64 (...) @getchar()
%3 = load i64, i64* @EOF
%4 = icmp ne i64 %2, %3
%5 = zext i1 %4 to i32
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [44 x i8] c"value of expression getchar() != EOF is %d\0A\00"
@EOF = global i64 0
@str = [14 x i8] c"Enter a char:\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i64 (...) @getchar()
%3 = load i64, i64* @EOF
%4 = icmp ne i64 %2, %3
%5 = zext i1 %4 to i32
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ emitln(char *);
int /*<<< orphan*/ factor();
int /*<<< orphan*/ match(char);
void divide(void) {
  match('/');
  factor();
  emitln("MOVE (SP)+,D1");
  emitln("DIVS D1,D0");
}


x86 assembly (clang, -O0):
<divide>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2f,%edi
call   1040 <match@plt>
mov    $0x0,%al
call   1050 <factor@plt>
lea    0xeb4(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeb6(%rip),%rdi
call   1030 <emitln@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<divide>:
push   %rax
mov    $0x2f,%edi
call   1040 <match@plt>
xor    %eax,%eax
call   1050 <factor@plt>
lea    0xeb7(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeb9(%rip),%rdi
pop    %rax
jmp    1030 <emitln@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"MOVE (SP)+,D1\00"
@.str.1 = [11 x i8] c"DIVS D1,D0\00"
define void @divide() {
%1 = call i32 @match(i8 signext 47)
%2 = call i32 (...) @factor()
%3 = call i32 @emitln(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @emitln(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"MOVE (SP)+,D1\00"
@.str.1 = [11 x i8] c"DIVS D1,D0\00"
define void @divide() {
%1 = tail call i32 @match(i8 signext 47)
%2 = tail call i32 (...) @factor()
%3 = tail call i32 @emitln(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @emitln(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
int Cyc_Lex_comment_rec(struct Cyc_Lexing_lexbuf *, int);
int Cyc_Lex_comment(struct Cyc_Lexing_lexbuf *lexbuf) {
  int _T0;
  _T0 = Cyc_Lex_comment_rec(lexbuf, 6);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_Lex_comment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x6,%esi
call   1030 <Cyc_Lex_comment_rec@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Lex_comment>:
mov    $0x6,%esi
jmp    1030 <Cyc_Lex_comment_rec@plt>

LLVM IR (-O0):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_Lex_comment(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca i32
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call i32 @Cyc_Lex_comment_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 6)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_Lex_comment(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_Lex_comment_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 6)
ret i32 %2
}
/* Variables and functions */
int isPowerOfThree(int);
int /*<<< orphan*/ printf(char *, int, char *);
void main() {
  int n = 729;
  bool res = isPowerOfThree(n);
  printf("Result whether %d isPowerOfThree is : %s\n", n,
         (res == 0) ? "False" : "True");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2d9,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isPowerOfThree@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%ecx
lea    0xee9(%rip),%rdx
lea    0xedc(%rip),%rax
cmp    $0x0,%ecx
cmove  %rax,%rdx
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2d9,%edi
call   1030 <isPowerOfThree@plt>
test   %eax,%eax
lea    0xef6(%rip),%rax
lea    0xef5(%rip),%rdx
cmove  %rax,%rdx
lea    0xeba(%rip),%rdi
mov    $0x2d9,%esi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Result whether %d isPowerOfThree is : %s\0A\00"
@.str.1 = [6 x i8] c"False\00"
@.str.2 = [5 x i8] c"True\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
store i32 729, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @isPowerOfThree(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%10 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"Result whether %d isPowerOfThree is : %s\0A\00"
@.str.1 = [6 x i8] c"False\00"
@.str.2 = [5 x i8] c"True\00"
define void @main() {
%1 = tail call i32 @isPowerOfThree(i32 729)
%2 = icmp eq i32 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 729, i8* %3)
ret void
}
/* Variables and functions */
int function(char *);
int main() {
  char t[] = "asdf";
  return function(t);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xed6(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x9(%rbp),%rdi
call   1030 <function@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0x0,0x4(%rsp)
movl   $0x66647361,(%rsp)
mov    %rsp,%rdi
call   1030 <function@plt>
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.t = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
store i32 0, i32* %1
%3 = bitcast [5 x i8]* %2 to i8*
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%5 = call i32 @function(i8* %4)
ret i32 %5
}

LLVM IR (-O2):
@__const.main.t = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i32 @function(i8* %2)
ret i32 %3
}
int getXFromQueue(int index) { return (index % 6) * (800 / 6) + 150; }


x86 assembly (clang, -O0):
<getXFromQueue>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
imul   $0x85,%edx,%eax
add    $0x96,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getXFromQueue>:
movslq %edi,%rax
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
imul   $0x85,%eax,%eax
add    $0x96,%eax
ret

LLVM IR (-O0):
define i32 @getXFromQueue(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 6
%5 = mul nsw i32 %4, 133
%6 = add nsw i32 %5, 150
ret i32 %6
}

LLVM IR (-O2):
define i32 @getXFromQueue(i32 %0) {
%2 = srem i32 %0, 6
%3 = mul nsw i32 %2, 133
%4 = add nsw i32 %3, 150
ret i32 %4
}
int zeroish(float v) { return (v < .0001 && v > -.0001); }


x86 assembly (clang, -O0):
<zeroish>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xor    %eax,%eax
movsd  0xee4(%rip),%xmm0
ucomisd %xmm1,%xmm0
mov    %al,-0x5(%rbp)
jbe    1144 <zeroish+0x44>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xece(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zeroish>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
ucomisd %xmm0,%xmm1
seta   %al
ucomisd 0xeed(%rip),%xmm0
seta   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @zeroish(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fcmp olt double %4, 1.000000e-04
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fcmp ogt double %8, -1.000000e-04
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @zeroish(float %0) {
%2 = fpext float %0 to double
%3 = fcmp olt double %2, 1.000000e-04
%4 = fcmp ogt double %2, -1.000000e-04
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ INT_MIN;
int /*<<< orphan*/ itoa(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char buffer[20];
  itoa(INT_MIN, buffer, 7);
  printf("Buffer:%s\n", buffer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rsi
mov    $0x7,%edx
call   1040 <itoa@plt>
lea    -0x20(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rbx
mov    %rbx,%rsi
mov    $0x7,%edx
call   1040 <itoa@plt>
lea    0xebb(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@INT_MIN = global i32 0
@.str = [11 x i8] c"Buffer:%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
store i32 0, i32* %1
%3 = load i32, i32* @INT_MIN
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = call i32 @itoa(i32 %3, i8* %4, i32 7)
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@INT_MIN = global i32 0
@.str = [11 x i8] c"Buffer:%s\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @INT_MIN
%4 = call i32 @itoa(i32 %3, i8* %2, i32 7)
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sys_defs_free();
int /*<<< orphan*/ sys_defs_init();
int /*<<< orphan*/ testDefSysDefs();
void testDef() {
  sys_defs_init();
  testDefSysDefs();
  sys_defs_free();
}


x86 assembly (clang, -O0):
<testDef>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <sys_defs_init@plt>
mov    $0x0,%al
call   1030 <testDefSysDefs@plt>
mov    $0x0,%al
call   1040 <sys_defs_free@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testDef>:
push   %rax
xor    %eax,%eax
call   1050 <sys_defs_init@plt>
xor    %eax,%eax
call   1030 <testDefSysDefs@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <sys_defs_free@plt>

LLVM IR (-O0):
define void @testDef() {
%1 = call i32 (...) @sys_defs_init()
%2 = call i32 (...) @testDefSysDefs()
%3 = call i32 (...) @sys_defs_free()
ret void
}

LLVM IR (-O2):
define void @testDef() {
%1 = tail call i32 (...) @sys_defs_init()
%2 = tail call i32 (...) @testDefSysDefs()
%3 = tail call i32 (...) @sys_defs_free()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void cpp_overload1(int p1) { printf("CPP One param: %d\n", p1); }


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

x86 assembly (clang, -O2):
<cpp_overload1>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"CPP One param: %d\0A\00"
define void @cpp_overload1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"CPP One param: %d\0A\00"
define void @cpp_overload1(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int main(void) {
  int c;
  for (;;)
    c++;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    %eax,-0x8(%rbp)
jmp    110b <main+0xb>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %3, %0
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
store i32 %5, i32* %2
br label %3
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ DecodeI_xxxxxxxxssmmmrrr();
int /*<<< orphan*/ DoCompare(int /*<<< orphan*/);
void DoCodeCmpI(void) { DoCompare(DecodeI_xxxxxxxxssmmmrrr()); }


x86 assembly (clang, -O0):
<DoCodeCmpI>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <DecodeI_xxxxxxxxssmmmrrr@plt>
mov    %eax,%edi
call   1040 <DoCompare@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoCodeCmpI>:
push   %rax
xor    %eax,%eax
call   1030 <DecodeI_xxxxxxxxssmmmrrr@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <DoCompare@plt>

LLVM IR (-O0):
define void @DoCodeCmpI() {
%1 = call i32 (...) @DecodeI_xxxxxxxxssmmmrrr()
%2 = call i32 @DoCompare(i32 %1)
ret void
}

LLVM IR (-O2):
define void @DoCodeCmpI() {
%1 = tail call i32 (...) @DecodeI_xxxxxxxxssmmmrrr()
%2 = tail call i32 @DoCompare(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ENGINE;

/* Variables and functions */
int /*<<< orphan*/ *ENGINE_get_first();
int /*<<< orphan*/ *ENGINE_get_next(int /*<<< orphan*/ *);
int /*<<< orphan*/ ENGINE_register_digests(int /*<<< orphan*/ *);
void ENGINE_register_all_digests(void) {
  ENGINE *e;
  for (e = ENGINE_get_first(); e; e = ENGINE_get_next(e))
    ENGINE_register_digests(e);
}


x86 assembly (clang, -O0):
<ENGINE_register_all_digests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <ENGINE_get_first@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1169 <ENGINE_register_all_digests+0x39>
mov    -0x8(%rbp),%rdi
call   1030 <ENGINE_register_digests@plt>
mov    -0x8(%rbp),%rdi
call   1040 <ENGINE_get_next@plt>
mov    %rax,-0x8(%rbp)
jmp    1143 <ENGINE_register_all_digests+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ENGINE_register_all_digests>:
push   %rbx
xor    %eax,%eax
call   1050 <ENGINE_get_first@plt>
test   %rax,%rax
je     1158 <ENGINE_register_all_digests+0x28>
mov    %rax,%rbx
mov    %rbx,%rdi
call   1030 <ENGINE_register_digests@plt>
mov    %rbx,%rdi
call   1040 <ENGINE_get_next@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1140 <ENGINE_register_all_digests+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ENGINE_register_all_digests() {
%1 = tail call i32* (...) @ENGINE_get_first()
%2 = icmp eq i32* %1, null
br i1 %2, label %8, label %3
3: ; preds = %0, %3
%4 = phi i32* [ %6, %3 ], [ %1, %0 ]
%5 = tail call i32 @ENGINE_register_digests(i32* %4)
%6 = tail call i32* @ENGINE_get_next(i32* %4)
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %3
8: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOMEM;
int /*<<< orphan*/ _safe_calloc_check_mul(size_t, size_t, size_t *);
int /*<<< orphan*/ errno;
void *realloc(void *, size_t);
void *recalloc(void *old, size_t num, size_t sz) {
  size_t tot_sz;
  if (!_safe_calloc_check_mul(num, sz, &tot_sz)) {
    errno = ENOMEM;
    return NULL;
  }
  return realloc(old, tot_sz);
}


x86 assembly (clang, -O0):
<recalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x28(%rbp),%rdx
call   1030 <_safe_calloc_check_mul@plt>
cmp    $0x0,%eax
jne    116d <recalloc+0x4d>
mov    0x2e8b(%rip),%rax
mov    (%rax),%ecx
mov    0x2e7a(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
jmp    117e <recalloc+0x5e>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recalloc>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rax,%rdx
call   1030 <_safe_calloc_check_mul@plt>
test   %eax,%eax
je     114e <recalloc+0x2e>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <realloc@plt>
jmp    1162 <recalloc+0x42>
mov    0x2e8b(%rip),%rax
mov    (%rax),%eax
mov    0x2e7a(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@ENOMEM = global i32 0
@errno = global i32 0
define i8* @recalloc(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%9 = load i64, i64* %6
%10 = load i64, i64* %7
%11 = call i32 @_safe_calloc_check_mul(i64 %9, i64 %10, i64* %8)
%12 = icmp ne i32 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %3
%14 = load i32, i32* @ENOMEM
store i32 %14, i32* @errno
store i8* null, i8** %4
br label %19
15: ; preds = %3
%16 = load i8*, i8** %5
%17 = load i64, i64* %8
%18 = call i8* @realloc(i8* %16, i64 %17)
store i8* %18, i8** %4
br label %19
19: ; preds = %15, %13
%20 = load i8*, i8** %4
ret i8* %20
}

LLVM IR (-O2):
@ENOMEM = global i32 0
@errno = global i32 0
define noalias i8* @recalloc(i8* nocapture %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = bitcast i64* %4 to i8*
%6 = call i32 @_safe_calloc_check_mul(i64 %1, i64 %2, i64* %4)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = load i32, i32* @ENOMEM
store i32 %9, i32* @errno
br label %13
10: ; preds = %3
%11 = load i64, i64* %4
%12 = call i8* @realloc(i8* %0, i64 %11)
br label %13
13: ; preds = %10, %8
%14 = phi i8* [ %12, %10 ], [ null, %8 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ chi(unsigned char *);
int /*<<< orphan*/ iota(unsigned char *, unsigned int);
int /*<<< orphan*/ pi(unsigned char *);
int /*<<< orphan*/ rho(unsigned char *);
int /*<<< orphan*/ theta(unsigned char *);
void Round200(unsigned char *state, unsigned int rnd) {
  theta(state);
  rho(state);
  pi(state);
  chi(state);
  iota(state, rnd);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <theta@plt>
mov    -0x8(%rbp),%rdi
call   1050 <rho@plt>
mov    -0x8(%rbp),%rdi
call   1070 <pi@plt>
mov    -0x8(%rbp),%rdi
call   1030 <chi@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1060 <iota@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <theta@plt>
mov    %rbx,%rdi
call   1050 <rho@plt>
mov    %rbx,%rdi
call   1070 <pi@plt>
mov    %rbx,%rdi
call   1030 <chi@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <iota@plt>

LLVM IR (-O0):
define void @Round200(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @theta(i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 @rho(i8* %7)
%9 = load i8*, i8** %3
%10 = call i32 @pi(i8* %9)
%11 = load i8*, i8** %3
%12 = call i32 @chi(i8* %11)
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = call i32 @iota(i8* %13, i32 %14)
ret void
}

LLVM IR (-O2):
define void @Round200(i8* %0, i32 %1) {
%3 = tail call i32 @theta(i8* %0)
%4 = tail call i32 @rho(i8* %0)
%5 = tail call i32 @pi(i8* %0)
%6 = tail call i32 @chi(i8* %0)
%7 = tail call i32 @iota(i8* %0, i32 %1)
ret void
}
int HT_add() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HT_add() {
ret i32 0
}
/* Variables and functions */
int _min(size_t a, size_t b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<_min>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1127 <_min+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <_min+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_min>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @_min(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ult i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
%14 = trunc i64 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @_min(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
%5 = trunc i64 %4 to i32
ret i32 %5
}
void foo016() {}


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

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

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

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