xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printArray(int *A, int size) {
  int i;
  for (i = 0; i < size; i++) {
    printf("%d\n", A[i]);
  }
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <printArray+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArray+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <printArray+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printArray+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @printArray(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void switch_s1_select(const uint32_t repeat_count) { (void)repeat_count; }


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

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

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

LLVM IR (-O2):
define void @switch_s1_select(i32 %0) {
ret void
}
union tree_node *DECL_NAME(union tree_node *t) {}


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

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

LLVM IR (-O0):
%union.tree_node = type opaque
define %union.tree_node* @DECL_NAME(%union.tree_node* %0) {
%2 = alloca %union.tree_node*
%3 = alloca %union.tree_node*
store %union.tree_node* %0, %union.tree_node** %3
%4 = load %union.tree_node*, %union.tree_node** %2
ret %union.tree_node* %4
}

LLVM IR (-O2):
%union.tree_node = type opaque
define noalias %union.tree_node* @DECL_NAME(%union.tree_node* nocapture readnone %0) {
ret %union.tree_node* undef
}
int quantum_gcd(int u, int v) {
  int r;
  while (v) {
    r = u % v;
    u = v;
    v = r;
  }
  return u;
}


x86 assembly (clang, -O0):
<quantum_gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <quantum_gcd+0x2f>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <quantum_gcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<quantum_gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <quantum_gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <quantum_gcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @quantum_gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = srem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %6, %4 ]
ret i32 %10
}
int func(int a, int b) {
  if (a > 1) {
    return a * b - 3;
  } else {
    return a * (b - 3);
  }
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1126 <func+0x26>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x4(%rbp)
jmp    1135 <func+0x35>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x3,%ecx
imul   %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
lea    -0x3(%rsi),%eax
mov    %esi,%ecx
imul   %edi,%ecx
add    $0xfffffffd,%ecx
imul   %edi,%eax
cmp    $0x2,%edi
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @func(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 1
%4 = mul nsw i32 %1, %0
%5 = add nsw i32 %4, -3
%6 = add nsw i32 %1, -3
%7 = mul nsw i32 %6, %0
%8 = select i1 %3, i32 %5, i32 %7
ret i32 %8
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EPERM;
int /*<<< orphan*/ errno;
int settimeofday(const struct timeval *tv, const struct timezone *tz) {
  (void)tv;
  (void)tz;
  errno = EPERM;
  return -1;
}


x86 assembly (clang, -O0):
<settimeofday>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec4(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<settimeofday>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
@EPERM = global i32 0
@errno = global i32 0
define i32 @settimeofday(%struct.timeval* %0, %struct.timezone* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timezone*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timezone* %1, %struct.timezone** %4
%5 = load %struct.timeval*, %struct.timeval** %3
%6 = load %struct.timezone*, %struct.timezone** %4
%7 = load i32, i32* @EPERM
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
@EPERM = global i32 0
@errno = global i32 0
define i32 @settimeofday(%struct.timeval* nocapture readnone %0, %struct.timezone* nocapture readnone %1) {
%3 = load i32, i32* @EPERM
store i32 %3, i32* @errno
ret i32 -1
}
/* Type definitions */
struct timespec {
  int /*<<< orphan*/ tv_nsec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int /*<<< orphan*/);
void test_gettime() {
  struct timespec now;
  clock_gettime(CLOCK_REALTIME, &now);
  printf("Now: %lld sec, %ld ns\n", now.tv_sec, now.tv_nsec);
}


x86 assembly (clang, -O0):
<test_gettime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_gettime>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
mov    (%rsp),%edx
mov    0x4(%rsp),%esi
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
@CLOCK_REALTIME = global i32 0
@.str = [23 x i8] c"Now: %lld sec, %ld ns\0A\00"
define void @test_gettime() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_REALTIME
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
@CLOCK_REALTIME = global i32 0
@.str = [23 x i8] c"Now: %lld sec, %ld ns\0A\00"
define void @test_gettime() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%6 = load i32, i32* %5
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8)
ret void
}
unsigned int HSMMCSDIsHSupported(unsigned int baseAddr) {
  return ((*((volatile unsigned int *)(baseAddr + (0x240)))) & (0x00200000u)) >>
         (0x00000015u);
}


x86 assembly (clang, -O0):
<HSMMCSDIsHSupported>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x240,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x200000,%eax
shr    $0x15,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HSMMCSDIsHSupported>:
add    $0x240,%edi
mov    (%rdi),%eax
shr    $0x15,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @HSMMCSDIsHSupported(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 576
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, 2097152
%9 = lshr i32 %8, 21
ret i32 %9
}

LLVM IR (-O2):
define i32 @HSMMCSDIsHSupported(i32 %0) {
%2 = add i32 %0, 576
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = lshr i32 %5, 21
%7 = and i32 %6, 1
ret i32 %7
}
void mymmisc(type, leng, mess) int type, leng;
char *mess;
{
  prtime();
  printf("Meta 0x%02x", type);
  prhex(mess, leng);
}


x86 assembly (clang, -O0):
<mymmisc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    $0x0,%al
call   1050 <prtime@plt>
mov    -0x4(%rbp),%esi
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1040 <prhex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymmisc>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <prtime@plt>
lea    0xeb7(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <prhex@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Meta 0x%02x\00"
define void @mymmisc(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = call i32 (...) @prtime()
%8 = load i32, i32* %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i8*, i8** %6
%11 = load i32, i32* %5
%12 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @prhex to i32 (i8*, i32, ...)*)(i8* %10, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Meta 0x%02x\00"
define void @mymmisc(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 (...) @prtime()
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @prhex to i32 (i8*, i32, ...)*)(i8* %2, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freeListDataMemory(void *p) { free(p); }


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

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

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

LLVM IR (-O2):
define void @freeListDataMemory(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void deallocate_target_usage_marks(int **tusage, int num_cams) {
  int cam;
  for (cam = 0; cam < num_cams; cam++) {
    free(tusage[cam]);
  }
  free(tusage);
}


x86 assembly (clang, -O0):
<deallocate_target_usage_marks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <deallocate_target_usage_marks+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <deallocate_target_usage_marks+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @deallocate_target_usage_marks(i32** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32*, i32** %0, i64 %7
%9 = bitcast i32** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast i32** %0 to i8*
tail call void @free(i8* %14)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *eeprom_fp();
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void eeprom_close() {
  FILE *fp = eeprom_fp();
  fclose(fp);
}


x86 assembly (clang, -O0):
<eeprom_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <eeprom_fp@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eeprom_close>:
push   %rax
xor    %eax,%eax
call   1030 <eeprom_fp@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <fclose@plt>

LLVM IR (-O0):
define void @eeprom_close() {
%1 = alloca i32*
%2 = call i32* (...) @eeprom_fp()
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @fclose(i32* %3)
ret void
}

LLVM IR (-O2):
define void @eeprom_close() {
%1 = tail call i32* (...) @eeprom_fp()
%2 = tail call i32 @fclose(i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ entry_point(int);
void _start_entry() { entry_point(1); }


x86 assembly (clang, -O0):
<_start_entry>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <entry_point@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_start_entry>:
mov    $0x1,%edi
jmp    1030 <entry_point@plt>

LLVM IR (-O0):
define void @_start_entry() {
%1 = call i32 @entry_point(i32 1)
ret void
}

LLVM IR (-O2):
define void @_start_entry() {
%1 = tail call i32 @entry_point(i32 1)
ret void
}
void fiq_hdlr(void) { asm volatile("nop \n"); }


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

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

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

LLVM IR (-O2):
define void @fiq_hdlr() {
tail call void asm sideeffect "nop \0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int send(int, char *, int, int /*<<< orphan*/);
int SendSocketData(int sock, char *buf, int len) {
  return send(sock, buf, len, 0);
}


x86 assembly (clang, -O0):
<SendSocketData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SendSocketData>:
xor    %ecx,%ecx
jmp    1030 <send@plt>

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

LLVM IR (-O2):
define i32 @SendSocketData(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @send(i32 %0, i8* %1, i32 %2, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_newline() { printf("\n"); }


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

x86 assembly (clang, -O2):
<print_newline>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @print_newline() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ omp_lock_t;

/* Variables and functions */
void omp_set_lock(omp_lock_t *_Lock) {}


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

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

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

LLVM IR (-O2):
define void @omp_set_lock(i32* nocapture %0) {
ret void
}
/* Type definitions */
struct PdfGeneratorDataStreamField {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ MemoryManager_Free(struct PdfGeneratorDataStreamField *);
void PdfGeneratorDataStreamField_Destroy(
    struct PdfGeneratorDataStreamField *self) {
  MemoryManager_Free(self);
}


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

x86 assembly (clang, -O2):
<PdfGeneratorDataStreamField_Destroy>:
jmp    1030 <MemoryManager_Free@plt>

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

LLVM IR (-O2):
%struct.PdfGeneratorDataStreamField = type { i32 }
define void @PdfGeneratorDataStreamField_Destroy(%struct.PdfGeneratorDataStreamField* %0) {
%2 = tail call i32 @MemoryManager_Free(%struct.PdfGeneratorDataStreamField* %0)
ret void
}
double fisMax(double x, double y) { return ((x) > (y) ? (x) : (y)); }


x86 assembly (clang, -O0):
<fisMax>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112d <fisMax+0x2d>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1137 <fisMax+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fisMax>:
maxsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @fisMax(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
size_t strlen(char const *);
size_t strxfrm(char *__restrict destination, const char *__restrict source,
               size_t num) {
  size_t lenght_of_source = strlen(source);
  if (num > lenght_of_source)
    strcpy(destination, source);
  return lenght_of_source;
}


x86 assembly (clang, -O0):
<strxfrm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jbe    115c <strxfrm+0x3c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strxfrm>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %rax,%rbx
cmp    %r12,%rax
jae    114c <strxfrm+0x2c>
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @strxfrm(i8* noalias %0, i8* noalias %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i8*, i8** %5
%9 = call i64 @strlen(i8* %8)
store i64 %9, i64* %7
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = icmp ugt i64 %10, %11
br i1 %12, label %13, label %17
13: ; preds = %3
%14 = load i8*, i8** %4
%15 = load i8*, i8** %5
%16 = call i32 @strcpy(i8* %14, i8* %15)
br label %17
17: ; preds = %13, %3
%18 = load i64, i64* %7
ret i64 %18
}

LLVM IR (-O2):
define i64 @strxfrm(i8* noalias %0, i8* noalias %1, i64 %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = icmp ult i64 %4, %2
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @strcpy(i8* %0, i8* %1)
br label %8
8: ; preds = %6, %3
ret i64 %4
}
int uniphier_sbc_init_savepin(const struct uniphier_board_data *bd) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.uniphier_board_data = type opaque
define i32 @uniphier_sbc_init_savepin(%struct.uniphier_board_data* %0) {
%2 = alloca %struct.uniphier_board_data*
store %struct.uniphier_board_data* %0, %struct.uniphier_board_data** %2
ret i32 0
}

LLVM IR (-O2):
%struct.uniphier_board_data = type opaque
define i32 @uniphier_sbc_init_savepin(%struct.uniphier_board_data* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x < y) {
    x = x + y;
    y = -2 * y;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <main+0x47>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
imul   $0xfffffffe,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@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
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
br label %6
6: ; preds = %10, %0
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = add nsw i32 %11, %12
store i32 %13, i32* %2
%14 = load i32, i32* %3
%15 = mul nsw i32 -2, %14
store i32 %15, i32* %3
br label %6
16: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ rnc_default_verror_handler(int, int /*<<< orphan*/);
int /*<<< orphan*/ rnd_default_verror_handler(int, int /*<<< orphan*/);
void rnl_default_verror_handler(int erno, va_list ap) {
  if (erno & 0x01000) {
    rnc_default_verror_handler(erno & ~0x01000, ap);
  } else if (erno & 0x02000) {
    rnd_default_verror_handler(erno & ~0x02000, ap);
  }
}


x86 assembly (clang, -O0):
<rnl_default_verror_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1000,%eax
cmp    $0x0,%eax
je     1155 <rnl_default_verror_handler+0x35>
mov    -0x4(%rbp),%edi
and    $0xffffefff,%edi
mov    -0x8(%rbp),%esi
call   1030 <rnc_default_verror_handler@plt>
jmp    117c <rnl_default_verror_handler+0x5c>
mov    -0x4(%rbp),%eax
and    $0x2000,%eax
cmp    $0x0,%eax
je     1177 <rnl_default_verror_handler+0x57>
mov    -0x4(%rbp),%edi
and    $0xffffdfff,%edi
mov    -0x8(%rbp),%esi
call   1040 <rnd_default_verror_handler@plt>
jmp    117c <rnl_default_verror_handler+0x5c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnl_default_verror_handler>:
test   $0x1000,%edi
jne    1131 <rnl_default_verror_handler+0x11>
test   $0x2000,%edi
jne    113c <rnl_default_verror_handler+0x1c>
ret
and    $0xffffefff,%edi
jmp    1030 <rnc_default_verror_handler@plt>
and    $0xffffdfff,%edi
jmp    1040 <rnd_default_verror_handler@plt>

LLVM IR (-O0):
define void @rnl_default_verror_handler(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 = and i32 %5, 4096
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i32, i32* %3
%10 = and i32 %9, -4097
%11 = load i32, i32* %4
%12 = call i32 @rnc_default_verror_handler(i32 %10, i32 %11)
br label %23
13: ; preds = %2
%14 = load i32, i32* %3
%15 = and i32 %14, 8192
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %22
17: ; preds = %13
%18 = load i32, i32* %3
%19 = and i32 %18, -8193
%20 = load i32, i32* %4
%21 = call i32 @rnd_default_verror_handler(i32 %19, i32 %20)
br label %22
22: ; preds = %17, %13
br label %23
23: ; preds = %22, %8
ret void
}

LLVM IR (-O2):
define void @rnl_default_verror_handler(i32 %0, i32 %1) {
%3 = and i32 %0, 4096
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = and i32 %0, -4097
%7 = tail call i32 @rnc_default_verror_handler(i32 %6, i32 %1)
br label %14
8: ; preds = %2
%9 = and i32 %0, 8192
%10 = icmp eq i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = and i32 %0, -8193
%13 = tail call i32 @rnd_default_verror_handler(i32 %12, i32 %1)
br label %14
14: ; preds = %8, %11, %5
ret void
}
void main() {
  int n;
  int x = 0;
  while (x <= n - 1) {
    x++;
  }
  if (x < n)
    return;
  if (n >= 1 && (x <= n - 1 || x >= n + 1)) {
    goto ERROR;
  ERROR:;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     112a <main+0x2a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110b <main+0xb>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    113b <main+0x3b>
jmp    1171 <main+0x71>
cmpl   $0x1,-0x4(%rbp)
jl     1171 <main+0x71>
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jle    1167 <main+0x67>
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jl     1171 <main+0x71>
jmp    116c <main+0x6c>
jmp    1171 <main+0x71>
pop    %rbp
ret

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

LLVM IR (-O2):
int check_2_point(char *str) {
  if (str[1] != ':' || str[4] != ':')
    return (-1);
  return (0);
}


x86 assembly (clang, -O0):
<check_2_point>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x3a,%eax
jne    112a <check_2_point+0x2a>
mov    -0x10(%rbp),%rax
movsbl 0x4(%rax),%eax
cmp    $0x3a,%eax
je     1136 <check_2_point+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    113d <check_2_point+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_2_point>:
mov    $0xffffffff,%eax
cmpb   $0x3a,0x1(%rdi)
jne    1116 <check_2_point+0x16>
xor    %eax,%eax
cmpb   $0x3a,0x4(%rdi)
setne  %al
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @check_2_point(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 58
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 4
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 58
%9 = sext i1 %8 to i32
br label %10
10: ; preds = %5, %1
%11 = phi i32 [ -1, %1 ], [ %9, %5 ]
ret i32 %11
}
/* Variables and functions */
unsigned int Thrd_Get_Bits(int, int);
int Thrd_Get_dmvector(int t) {
  int tmp___0;
  unsigned int tmp___1;
  unsigned int tmp___2;
  {
    tmp___2 = Thrd_Get_Bits(t, 1);
    if (tmp___2) {
      tmp___1 = Thrd_Get_Bits(t, 1);
      if (tmp___1) {
        tmp___0 = -1;
      } else {
        tmp___0 = 1;
      }
      return (tmp___0);
    } else {
      return (0);
    }
  }
}


x86 assembly (clang, -O0):
<Thrd_Get_dmvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
call   1030 <Thrd_Get_Bits@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     116d <Thrd_Get_dmvector+0x5d>
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
call   1030 <Thrd_Get_Bits@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     115b <Thrd_Get_dmvector+0x4b>
movl   $0xffffffff,-0xc(%rbp)
jmp    1162 <Thrd_Get_dmvector+0x52>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <Thrd_Get_dmvector+0x64>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Thrd_Get_dmvector>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%esi
call   1030 <Thrd_Get_Bits@plt>
test   %eax,%eax
je     1136 <Thrd_Get_dmvector+0x26>
mov    %ebx,%edi
mov    $0x1,%esi
call   1030 <Thrd_Get_Bits@plt>
neg    %eax
sbb    %eax,%eax
or     $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @Thrd_Get_dmvector(i32 %0) {
%2 = tail call i32 @Thrd_Get_Bits(i32 %0, i32 1)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @Thrd_Get_Bits(i32 %0, i32 1)
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 1, i32 -1
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
plprint(char *s) { printf("%s", s); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @plprint(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ __set_BASEPRI_MAX(int);
uint8_t __basepriSetMemRetVal(uint8_t prio) {
  __set_BASEPRI_MAX(prio);
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @__basepriSetMemRetVal(i32 %0) {
%2 = tail call i32 @__set_BASEPRI_MAX(i32 %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  int i = 0;
  printf("%s\n", "not defined");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [12 x i8] c"not defined\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void do___symtabindex(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
bool existeArquivo(const char *nomeArquivo) {
  FILE *arquivo = fopen(nomeArquivo, "rb");
  bool result = arquivo != NULL;
  if (result) {
    fclose(arquivo);
  }
  return result;
}


x86 assembly (clang, -O0):
<existeArquivo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1163 <existeArquivo+0x43>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<existeArquivo>:
push   %rbx
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     113d <existeArquivo+0x1d>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
test   %rbx,%rbx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
define i32 @existeArquivo(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %4, %1
%7 = zext i1 %3 to i32
ret i32 %7
}
/* Variables and functions */
scalar_t__ malloc(int);
char *skipSpaces(char *);
int writeData(char *, char *);
char *compile(char *code) {
  char *stream = (char *)malloc(sizeof(char) * 4096);
  int headsize, datasize;
  char *id;
  code = skipSpaces(code);
  datasize = writeData(stream, code);
  return stream;
}


x86 assembly (clang, -O0):
<compile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1000,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <skipSpaces@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <writeData@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compile>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x1000,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <skipSpaces@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <writeData@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @compile(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %2
%7 = call i64 @malloc(i32 4096)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %2
%10 = call i8* @skipSpaces(i8* %9)
store i8* %10, i8** %2
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = call i32 @writeData(i8* %11, i8* %12)
store i32 %13, i32* %5
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @compile(i8* %0) {
%2 = tail call i64 @malloc(i32 4096)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i8* @skipSpaces(i8* %0)
%5 = tail call i32 @writeData(i8* %3, i8* %4)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int parser_default_func(char *str) {
  printf("ERROR: Unknown keyword \"%s\" !\n", str);
  return 0;
}


x86 assembly (clang, -O0):
<parser_default_func>:
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):
<parser_default_func>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"ERROR: Unknown keyword \22%s\22 !\0A\00"
define i32 @parser_default_func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"ERROR: Unknown keyword \22%s\22 !\0A\00"
define i32 @parser_default_func(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CP15DCacheFlushBuff(unsigned int, unsigned int);
void CacheDataInvalidateBuff(unsigned int startAddr, unsigned int numBytes) {
  CP15DCacheFlushBuff(startAddr, numBytes);
}


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

x86 assembly (clang, -O2):
<CacheDataInvalidateBuff>:
jmp    1030 <CP15DCacheFlushBuff@plt>

LLVM IR (-O0):
define void @CacheDataInvalidateBuff(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 @CP15DCacheFlushBuff(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @CacheDataInvalidateBuff(i32 %0, i32 %1) {
%3 = tail call i32 @CP15DCacheFlushBuff(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int recNumRvrs(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int input = 0;
  printf("Please enter a positive integer.\n");
  scanf("%d", &input);
  printf("The reverse of %d is %d.\n", input, recNumRvrs(input));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <recNumRvrs@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
lea    0xea0(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1050 <recNumRvrs@plt>
lea    0xe87(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Please enter a positive integer.\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [26 x i8] c"The reverse of %d is %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @recNumRvrs(i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [26 x i8] c"The reverse of %d is %d.\0A\00"
@str = [33 x i8] c"Please enter a positive integer.\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @recNumRvrs(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}