xunge/DecIR huggingface dataset:
int test_fits_bits(int x, unsigned n) {
  int tmax_n = (1 << (n - 1)) - 1;
  int tmin_n = -tmax_n - 1;
  return x >= tmin_n && x <= tmax_n;
}


x86 assembly (clang, -O0):
<test_fits_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
cmp    -0x10(%rbp),%ecx
mov    %al,-0x11(%rbp)
jl     1145 <test_fits_bits+0x45>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
setle  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fits_bits>:
lea    -0x1(%rsi),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
cmp    %edi,%eax
not    %eax
setle  %cl
cmp    %edi,%eax
setge  %al
and    %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @test_fits_bits(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub i32 %7, 1
%9 = shl i32 1, %8
%10 = sub nsw i32 %9, 1
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = sub nsw i32 0, %11
%13 = sub nsw i32 %12, 1
store i32 %13, i32* %6
%14 = load i32, i32* %3
%15 = load i32, i32* %6
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %2
%18 = load i32, i32* %3
%19 = load i32, i32* %5
%20 = icmp sle i32 %18, %19
br label %21
21: ; preds = %17, %2
%22 = phi i1 [ false, %2 ], [ %20, %17 ]
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @test_fits_bits(i32 %0, i32 %1) {
%3 = add i32 %1, -1
%4 = shl nsw i32 -1, %3
%5 = xor i32 %4, -1
%6 = icmp sle i32 %4, %0
%7 = icmp sge i32 %5, %0
%8 = and i1 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ allocator_77A602DD(void *);
void free(void *ptr) { allocator_77A602DD(ptr); }


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

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

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

LLVM IR (-O2):
define void @free(i8* %0) {
%2 = tail call i32 @allocator_77A602DD(i8* %0)
ret void
}
int getSegmentLength(char *str) {
  int i = 0;
  int length = 0;
  while (str[i] != '.') {
    length = length * 10 + (str[i] - '0');
    ++i;
  }
  return length;
}


x86 assembly (clang, -O0):
<getSegmentLength>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2e,%eax
je     1151 <getSegmentLength+0x51>
imul   $0xa,-0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <getSegmentLength+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSegmentLength>:
mov    (%rdi),%cl
xor    %eax,%eax
cmp    $0x2e,%cl
je     1128 <getSegmentLength+0x28>
add    $0x1,%rdi
xor    %eax,%eax
nop
movsbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
cmp    $0x2e,%cl
jne    1110 <getSegmentLength+0x10>
ret

LLVM IR (-O0):
define i32 @getSegmentLength(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %13, %1
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%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, 46
br i1 %12, label %13, label %26
13: ; preds = %5
%14 = load i32, i32* %4
%15 = mul nsw i32 %14, 10
%16 = load i8*, i8** %2
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = sub nsw i32 %21, 48
%23 = add nsw i32 %15, %22
store i32 %23, i32* %4
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %5
26: ; preds = %5
%27 = load i32, i32* %4
ret i32 %27
}

LLVM IR (-O2):
define i32 @getSegmentLength(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 46
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %12, %4 ], [ 0, %1 ]
%6 = phi i8 [ %14, %4 ], [ %2, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = sext i8 %6 to i32
%9 = mul nsw i32 %7, 10
%10 = add i32 %9, -48
%11 = add i32 %10, %8
%12 = add nuw nsw i64 %5, 1
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 46
br i1 %15, label %16, label %4
16: ; preds = %4, %1
%17 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %17
}
void prune_constant_false_Ok() {
  int a[1];
  if (0) {
    a[1] = 0;
  } else {
    a[0] = 0;
  }
}


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

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

LLVM IR (-O0):
define void @prune_constant_false_Ok() {
%1 = alloca [1 x i32]
%2 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
store i32 0, i32* %2
ret void
}

LLVM IR (-O2):
define void @prune_constant_false_Ok() {
ret void
}
int fun918() { return 918; }


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

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

LLVM IR (-O0):
define i32 @fun918() {
ret i32 918
}

LLVM IR (-O2):
define i32 @fun918() {
ret i32 918
}
void SobelXRow_C() {}


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

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

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

LLVM IR (-O2):
define void @SobelXRow_C() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _assert(int, char *, int);
scalar_t__ fstat(int, int /*<<< orphan*/);
int /*<<< orphan*/ write(int, char *, int);
void writechar(int fd, char c) {
  _assert(fstat(fd, 0) < 0,
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/fossum/wsu_cs460/refs/heads/master/final/"
          "printlib.c",
          10);
  write(fd, &c, 1);
}


x86 assembly (clang, -O0):
<writechar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <fstat@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xea2(%rip),%rsi
mov    $0xa,%edx
call   1040 <_assert@plt>
mov    -0x4(%rbp),%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writechar>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %sil,0xf(%rsp)
xor    %esi,%esi
call   1050 <fstat@plt>
shr    $0x3f,%rax
lea    0xeb2(%rip),%rsi
mov    %eax,%edi
mov    $0xa,%edx
call   1040 <_assert@plt>
lea    0xf(%rsp),%rsi
mov    %ebx,%edi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
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/fossum/wsu_cs460/refs/heads/master/final/printlib.c\00"
define void @writechar(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = call i64 @fstat(i32 %5, i32 0)
%7 = icmp slt i64 %6, 0
%8 = zext i1 %7 to i32
%9 = call i32 @_assert(i32 %8, i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str, i64 0, i64 0), i32 10)
%10 = load i32, i32* %3
%11 = call i32 @write(i32 %10, i8* %4, i32 1)
ret void
}

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/fossum/wsu_cs460/refs/heads/master/final/printlib.c\00"
define void @writechar(i32 %0, i8 signext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = tail call i64 @fstat(i32 %0, i32 0)
%5 = lshr i64 %4, 63
%6 = trunc i64 %5 to i32
%7 = tail call i32 @_assert(i32 %6, i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str, i64 0, i64 0), i32 10)
%8 = call i32 @write(i32 %0, i8* %3, i32 1)
ret void
}
char *stpcpy(dest, source)
char *dest;
char *source;
{
  while ((*dest++ = *source++) != '\0')
    ;
  return dest - 1;
}


x86 assembly (clang, -O0):
<stpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     113f <stpcpy+0x3f>
jmp    110c <stpcpy+0xc>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stpcpy>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl (%rsi),%ecx
add    $0x1,%rsi
mov    %cl,0x1(%rax)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <stpcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @stpcpy(i8* writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %4
}
/* Variables and functions */
int S_IRWXG;
int S_IRWXO;
int S_IRWXU;
int fileCreateMode(char *, int);
int fileCreateRWX(char *name) {
  int mode = S_IRWXU | S_IRWXG | S_IRWXO;
  return (fileCreateMode(name, mode));
}


x86 assembly (clang, -O0):
<fileCreateRWX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
mov    0x2eac(%rip),%rcx
or     (%rcx),%eax
mov    0x2ebb(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <fileCreateMode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileCreateRWX>:
mov    0x2ec9(%rip),%rax
mov    0x2eba(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2ec7(%rip),%rax
or     (%rax),%esi
jmp    1030 <fileCreateMode@plt>

LLVM IR (-O0):
@S_IRWXU = global i32 0
@S_IRWXG = global i32 0
@S_IRWXO = global i32 0
define i32 @fileCreateRWX(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i32, i32* @S_IRWXU
%5 = load i32, i32* @S_IRWXG
%6 = or i32 %4, %5
%7 = load i32, i32* @S_IRWXO
%8 = or i32 %6, %7
store i32 %8, i32* %3
%9 = load i8*, i8** %2
%10 = load i32, i32* %3
%11 = call i32 @fileCreateMode(i8* %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@S_IRWXU = global i32 0
@S_IRWXG = global i32 0
@S_IRWXO = global i32 0
define i32 @fileCreateRWX(i8* %0) {
%2 = load i32, i32* @S_IRWXU
%3 = load i32, i32* @S_IRWXG
%4 = or i32 %3, %2
%5 = load i32, i32* @S_IRWXO
%6 = or i32 %4, %5
%7 = tail call i32 @fileCreateMode(i8* %0, i32 %6)
ret i32 %7
}
int conn_setautocommit() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @conn_setautocommit() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void flockfile(FILE *file) { (void)file; }


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

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

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

LLVM IR (-O2):
define void @flockfile(i32* nocapture %0) {
ret void
}
void RTAvlGCPtrGetBestFit(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlGCPtrGetBestFit() {
ret void
}
void test_non_identifiers() {
  int i, x;
#pragma omp parallel
#pragma omp master taskloop simd;
  for (i = 0; i < 16; ++i)
    ;
#pragma omp parallel
#pragma omp master taskloop simd linear(x);
  for (i = 0; i < 16; ++i)
    ;
#pragma omp parallel
#pragma omp master taskloop simd private(x);
  for (i = 0; i < 16; ++i)
    ;
#pragma omp parallel
#pragma omp master taskloop simd, private(x);
  for (i = 0; i < 16; ++i)
    ;
}


x86 assembly (clang, -O0):
<test_non_identifiers>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_non_identifiers+0x28>
jmp    111a <test_non_identifiers+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_non_identifiers+0xb>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    114c <test_non_identifiers+0x4c>
jmp    113e <test_non_identifiers+0x3e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <test_non_identifiers+0x2f>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1170 <test_non_identifiers+0x70>
jmp    1162 <test_non_identifiers+0x62>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <test_non_identifiers+0x53>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1194 <test_non_identifiers+0x94>
jmp    1186 <test_non_identifiers+0x86>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1177 <test_non_identifiers+0x77>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_non_identifiers() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int idade;
  scanf("%d", &idade);
  if (idade >= 18) {
    printf("maior de idade\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x12,-0x8(%rbp)
jl     1155 <main+0x35>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x12,0x4(%rsp)
jl     1145 <main+0x25>
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [16 x i8] c"maior de idade\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 18
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [15 x i8] c"maior de idade\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 17
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
ret i32 0
}
/* Variables and functions */
scalar_t__ sock_write_bytes(int, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int sock_write_string(int sock, const char *buff) {
  return (sock_write_bytes(sock, buff, strlen(buff)) > 0);
}


x86 assembly (clang, -O0):
<sock_write_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <sock_write_bytes@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sock_write_string>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <sock_write_bytes@plt>
xor    %ecx,%ecx
test   %rax,%rax
setg   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @sock_write_string(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i64 @sock_write_bytes(i32 %5, i8* %6, i32 %8)
%10 = icmp sgt i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @sock_write_string(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @sock_write_bytes(i32 %0, i8* %1, i32 %3)
%5 = icmp sgt i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
scalar_t__ __builtin_tbegin(int /*<<< orphan*/);
int /*<<< orphan*/ __builtin_tend();
void __attribute__((no)) foo(int a) {
  if (__builtin_tbegin(0) == 0)
    __builtin_tend();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <__builtin_tbegin@plt>
cmp    $0x0,%rax
jne    1143 <foo+0x23>
mov    $0x0,%al
call   1040 <__builtin_tend@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %edi,%edi
call   1030 <__builtin_tbegin@plt>
test   %rax,%rax
je     112f <foo+0xf>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <__builtin_tend@plt>

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

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = tail call i64 @__builtin_tbegin(i32 0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @__builtin_tend()
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strcmp(char *, char *);
void strcmp_constant_and_var_1() {
  char *x = "123";
  clang_analyzer_eval(strcmp("123", x) == 0);
}


x86 assembly (clang, -O0):
<strcmp_constant_and_var_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp_constant_and_var_1>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rdi,%rsi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
define void @strcmp_constant_and_var_1() {
%1 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @clang_analyzer_eval(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
define void @strcmp_constant_and_var_1() {
%1 = tail call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int usage(char *program) {
  printf("Error using program %s\n", program);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"Error using program %s\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Error using program %s\0A\00"
define i32 @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printid(int);
int main() {
  int a = 2, b = 3;
  a /= a / b;
  printid(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <printid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
store i32 3, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = sdiv i32 %4, %5
%7 = load i32, i32* %2
%8 = sdiv i32 %7, %6
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = call i32 @printid(i32 %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @printid(i32 poison)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ handle_GRANT(int /*<<< orphan*/);
int gen_GRANT(void) {
  handle_GRANT(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_GRANT>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_GRANT@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @gen_GRANT() {
%1 = call i32 @handle_GRANT(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_GRANT() {
%1 = tail call i32 @handle_GRANT(i32 0)
ret i32 0
}
int platform_bits() {
  if (1) {
    return 64;
  }
  return sizeof(void *) * 8;
}


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

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

LLVM IR (-O0):
define i32 @platform_bits() {
ret i32 64
}

LLVM IR (-O2):
define i32 @platform_bits() {
ret i32 64
}
/* Variables and functions */
scalar_t__ fork();
int /*<<< orphan*/ printf(char *);
void fork0() {
  if (fork() == 0) {
    printf("Hello from child\n");
  } else {
    printf("Hello from parent\n");
  }
}


x86 assembly (clang, -O0):
<fork0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <fork@plt>
cmp    $0x0,%rax
jne    1146 <fork0+0x26>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
jmp    1152 <fork0+0x32>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fork0>:
push   %rax
xor    %eax,%eax
call   1040 <fork@plt>
test   %rax,%rax
lea    0xee0(%rip),%rax
lea    0xec7(%rip),%rdi
cmove  %rax,%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Hello from child\0A\00"
@.str.1 = [19 x i8] c"Hello from parent\0A\00"
define void @fork0() {
%1 = call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"Hello from parent\00"
@str.2 = [17 x i8] c"Hello from child\00"
define void @fork0() {
%1 = tail call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ con_start();
int ser_Start();
int main() {
  con_start();
  return ser_Start();
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @con_start()
%2 = tail call i32 (...) @ser_Start()
ret i32 %2
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ server_start();
int main(void) {
  server_start();
  return EXIT_SUCCESS;
}


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

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

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @server_start()
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
float to_degrees(float radians) { return radians * 180.0f / 3.1415926536f; }


x86 assembly (clang, -O0):
<to_degrees>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xee2(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_degrees>:
mulss  0xef8(%rip),%xmm0
divss  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @to_degrees(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 1.800000e+02
%5 = fdiv float %4, 0x400921FB60000000
ret float %5
}

LLVM IR (-O2):
define float @to_degrees(float %0) {
%2 = fmul float %0, 1.800000e+02
%3 = fdiv float %2, 0x400921FB60000000
ret float %3
}
void gfx_draw_sprite(int sprite_no, int x, int y) {}


x86 assembly (clang, -O0):
<gfx_draw_sprite>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @gfx_draw_sprite(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @gfx_draw_sprite(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void usage(void) {
  fputs("usage: aoecfg "
        "[-c cmd] [-s cfgstr] [-t timeout] "
        "[shelf slot] [net]\n",
        stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [68 x i8] c"usage: aoecfg [-c cmd] [-s cfgstr] [-t timeout] [shelf slot] [net]\0A\00"
@stderr = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [68 x i8] c"usage: aoecfg [-c cmd] [-s cfgstr] [-t timeout] [shelf slot] [net]\0A\00"
@stderr = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int Update(char *, char *, char *);
int HandleSubmitPLC(void) {
  return Update("PLC", "/local/root/control.tar.gz",
                "tar -C /local/control/ xzf /local/root/control.tar.gz"
                " && rm /local/root/control.tar.gz");
}


x86 assembly (clang, -O0):
<HandleSubmitPLC>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xf1e(%rip),%rsi
lea    0xedb(%rip),%rdx
call   1030 <Update@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HandleSubmitPLC>:
lea    0xee9(%rip),%rdi
lea    0xf22(%rip),%rsi
lea    0xedf(%rip),%rdx
jmp    1030 <Update@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"PLC\00"
@.str.1 = [27 x i8] c"/local/root/control.tar.gz\00"
@.str.2 = [87 x i8] c"tar -C /local/control/ xzf /local/root/control.tar.gz && rm /local/root/control.tar.gz\00"
define i32 @HandleSubmitPLC() {
%1 = call i32 @Update(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.2, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [4 x i8] c"PLC\00"
@.str.1 = [27 x i8] c"/local/root/control.tar.gz\00"
@.str.2 = [87 x i8] c"tar -C /local/control/ xzf /local/root/control.tar.gz && rm /local/root/control.tar.gz\00"
define i32 @HandleSubmitPLC() {
%1 = tail call i32 @Update(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.2, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ helper(struct TreeNode *, int *);
int diameterOfBinaryTree(struct TreeNode *root) {
  int maxDiameter = 0;
  helper(root, &maxDiameter);
  return maxDiameter;
}


x86 assembly (clang, -O0):
<diameterOfBinaryTree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <helper@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diameterOfBinaryTree>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <helper@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32 @diameterOfBinaryTree(%struct.TreeNode* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @helper(%struct.TreeNode* %0, i32* %2)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ SetupMemoryPaging(int, int, unsigned char *);
void Setup256kSiliconDiskExpansion(unsigned char *pExpansionMemoryAddress) {
  int i;
  for (i = 0; i < 64; i++) {
    if ((i & 0x020) != 0) {
      SetupMemoryPaging(i, (i & 0x01f), pExpansionMemoryAddress);
    }
  }
}


x86 assembly (clang, -O0):
<Setup256kSiliconDiskExpansion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    1161 <Setup256kSiliconDiskExpansion+0x51>
mov    -0xc(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     114e <Setup256kSiliconDiskExpansion+0x3e>
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%esi
and    $0x1f,%esi
mov    -0x8(%rbp),%rdx
call   1030 <SetupMemoryPaging@plt>
jmp    1153 <Setup256kSiliconDiskExpansion+0x43>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <Setup256kSiliconDiskExpansion+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Setup256kSiliconDiskExpansion>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %ebp,%ebp
jmp    1128 <Setup256kSiliconDiskExpansion+0x18>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebp
cmp    $0x40,%ebp
je     113f <Setup256kSiliconDiskExpansion+0x2f>
test   $0x20,%bpl
je     1120 <Setup256kSiliconDiskExpansion+0x10>
mov    %ebp,%esi
and    $0x1f,%esi
mov    %ebp,%edi
mov    %rbx,%rdx
call   1030 <SetupMemoryPaging@plt>
jmp    1120 <Setup256kSiliconDiskExpansion+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @Setup256kSiliconDiskExpansion(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 64
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = load i32, i32* %3
%9 = and i32 %8, 32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i32, i32* %3
%13 = load i32, i32* %3
%14 = and i32 %13, 31
%15 = load i8*, i8** %2
%16 = call i32 @SetupMemoryPaging(i32 %12, i32 %14, i8* %15)
br label %17
17: ; preds = %11, %7
br label %18
18: ; preds = %17
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %4
21: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @Setup256kSiliconDiskExpansion(i8* %0) {
br label %2
2: ; preds = %1, %9
%3 = phi i32 [ 0, %1 ], [ %10, %9 ]
%4 = and i32 %3, 32
%5 = icmp eq i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = and i32 %3, 31
%8 = tail call i32 @SetupMemoryPaging(i32 %3, i32 %7, i8* %0)
br label %9
9: ; preds = %2, %6
%10 = add nuw nsw i32 %3, 1
%11 = icmp eq i32 %10, 64
br i1 %11, label %12, label %2
12: ; preds = %9
ret void
}
int f(x) {
  if (x == 0)
    return 5;
  else
    return 2 * f(x - 1) + 3;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <f+0x21>
movl   $0x5,-0x4(%rbp)
jmp    1145 <f+0x35>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <f@plt>
shl    $0x1,%eax
add    $0x3,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
test   %edi,%edi
je     1127 <f+0x17>
push   %rax
add    $0xffffffff,%edi
call   1030 <f@plt>
add    %eax,%eax
add    $0x3,%eax
add    $0x8,%rsp
ret
mov    $0x5,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1, %5
%4 = phi i32 [ %9, %5 ], [ 5, %1 ]
ret i32 %4
5: ; preds = %1
%6 = add nsw i32 %0, -1
%7 = tail call i32 @f(i32 %6)
%8 = shl nsw i32 %7, 1
%9 = add nsw i32 %8, 3
br label %3
}
/* Variables and functions */
double Slater_2S_6S(double, double, double);
double Slater_6S_2S(double rij, double xii, double xij) {
  return Slater_2S_6S(rij, xij, xii);
}


x86 assembly (clang, -O0):
<Slater_6S_2S>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
call   1030 <Slater_2S_6S@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Slater_6S_2S>:
movaps %xmm1,%xmm3
movaps %xmm2,%xmm1
movaps %xmm3,%xmm2
jmp    1030 <Slater_2S_6S@plt>

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

LLVM IR (-O2):
define double @Slater_6S_2S(double %0, double %1, double %2) {
%4 = tail call double @Slater_2S_6S(double %0, double %2, double %1)
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
scalar_t__ eb128_compose_264(int /*<<< orphan*/ const,
                             int /*<<< orphan*/ const);
bool eb128i_greater_264(const uint64_t alo, const int64_t ahi,
                        const uint64_t blo, const int64_t bhi) {
  return eb128_compose_264(alo, ahi) > eb128_compose_264(blo, bhi);
}


x86 assembly (clang, -O0):
<eb128i_greater_264>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <eb128_compose_264@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <eb128_compose_264@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eb128i_greater_264>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
call   1030 <eb128_compose_264@plt>
mov    %rax,%rbx
mov    %ebp,%edi
mov    %r14d,%esi
call   1030 <eb128_compose_264@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
setg   %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @eb128i_greater_264(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i64 @eb128_compose_264(i32 %9, i32 %10)
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i64 @eb128_compose_264(i32 %12, i32 %13)
%15 = icmp sgt i64 %11, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @eb128i_greater_264(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i64 @eb128_compose_264(i32 %0, i32 %1)
%6 = tail call i64 @eb128_compose_264(i32 %2, i32 %3)
%7 = icmp sgt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void OneWireIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags) {
  ASSERT(ui32Base == 0x400B6000);
  ASSERT((ui32IntFlags & ~(0x00000001 | 0x00000002 | 0x00000010 | 0x00000004 |
                           0x00000008)) == 0);
  (*((volatile uint32_t *)(ui32Base + 0x00000100))) |= ui32IntFlags;
}


x86 assembly (clang, -O0):
<OneWireIntEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x400b6000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%eax
and    $0xffffffe0,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0x100,%eax
cltq
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OneWireIntEnable>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x400b6000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x20,%ebx
setb   %dil
call   1030 <ASSERT@plt>
movslq %ebp,%rax
or     %ebx,0x100(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @OneWireIntEnable(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 eq i32 %5, 1074487296
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %4
%10 = and i32 %9, -32
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @ASSERT(i32 %12)
%14 = load i32, i32* %4
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 256
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
%19 = load volatile i32, i32* %18
%20 = or i32 %19, %14
store volatile i32 %20, i32* %18
ret void
}

LLVM IR (-O2):
define void @OneWireIntEnable(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1074487296
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = icmp ult i32 %1, 32
%7 = zext i1 %6 to i32
%8 = tail call i32 @ASSERT(i32 %7)
%9 = add nsw i32 %0, 256
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
%13 = or i32 %12, %1
store volatile i32 %13, i32* %11
ret void
}
/* Variables and functions */
int foo2(int **);
int foo1(int *pa) {
  int **ppa = &pa;
  return foo2(ppa);
}


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

x86 assembly (clang, -O2):
<foo1>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <foo2@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @foo1(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @foo2(i32** %2)
ret i32 %3
}
int sum(int x[]) {
  int out = 0;
  for (int i = 0; i < 10; i++)
    out += x[i];
  return out;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    113f <sum+0x3f>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <sum+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
movdqu 0x8(%rdi),%xmm0
movdqu 0x18(%rdi),%xmm1
paddd  %xmm0,%xmm1
pshufd $0xee,%xmm1,%xmm0
paddd  %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%eax
add    0x4(%rdi),%eax
add    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @sum(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = bitcast i32* %5 to <8 x i32>*
%7 = load <8 x i32>, <8 x i32>* %6
%8 = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> %7)
%9 = add nsw i32 %8, %4
%10 = add nsw i32 %9, %2
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int wechochar(int /*<<< orphan*/ *, int /*<<< orphan*/ const);
int __darwin_wechochar(WINDOW *w, const uint32_t c) { return wechochar(w, c); }


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

x86 assembly (clang, -O2):
<__darwin_wechochar>:
jmp    1030 <wechochar@plt>

LLVM IR (-O0):
define i32 @__darwin_wechochar(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 = call i32 @wechochar(i32* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @__darwin_wechochar(i32* %0, i32 %1) {
%3 = tail call i32 @wechochar(i32* %0, i32 %1)
ret i32 %3
}
int ti_cci_start(double const *options) {
  const int period = (int)options[0];
  return (period - 1) * 2;
}


x86 assembly (clang, -O0):
<ti_cci_start>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvttsd2si (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
shl    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ti_cci_start>:
cvttsd2si (%rdi),%eax
add    %eax,%eax
add    $0xfffffffe,%eax
ret

LLVM IR (-O0):
define i32 @ti_cci_start(double* %0) {
%2 = alloca double*
%3 = alloca i32
store double* %0, double** %2
%4 = load double*, double** %2
%5 = getelementptr inbounds double, double* %4, i64 0
%6 = load double, double* %5
%7 = fptosi double %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = mul nsw i32 %9, 2
ret i32 %10
}

LLVM IR (-O2):
define i32 @ti_cci_start(double* nocapture %0) {
%2 = load double, double* %0
%3 = fptosi double %2 to i32
%4 = shl i32 %3, 1
%5 = add i32 %4, -2
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ __m256i;

/* Variables and functions */
int /*<<< orphan*/ _mm256_ror_epi32(int /*<<< orphan*/, int);
__attribute__((always_)) __m256i rot7_256(__m256i x) {
  return _mm256_ror_epi32(x, 7);
}


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

x86 assembly (clang, -O2):
<rot7_256>:
mov    $0x7,%esi
jmp    1030 <_mm256_ror_epi32@plt>

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

LLVM IR (-O2):
define i32 @rot7_256(i32 %0) {
%2 = tail call i32 @_mm256_ror_epi32(i32 %0, i32 7)
ret i32 %2
}