xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ thr1(int /*<<< orphan*/);
int /*<<< orphan*/ thr2(int /*<<< orphan*/);
int /*<<< orphan*/ thr3(int /*<<< orphan*/);
int /*<<< orphan*/ thr4(int /*<<< orphan*/);
int /*<<< orphan*/ thr5(int /*<<< orphan*/);
int /*<<< orphan*/ thr6(int /*<<< orphan*/);
int main() {
__CPROVER_ASYNC_0:
  thr1(0);
__CPROVER_ASYNC_1:
  thr2(0);
__CPROVER_ASYNC_2:
  thr3(0);
__CPROVER_ASYNC_3:
  thr4(0);
__CPROVER_ASYNC_4:
  thr5(0);
__CPROVER_ASYNC_5:
  thr6(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
jmp    1169 <main+0x9>
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1050 <thr2@plt>
xor    %edi,%edi
call   1080 <thr3@plt>
xor    %edi,%edi
call   1040 <thr4@plt>
xor    %edi,%edi
call   1070 <thr5@plt>
xor    %edi,%edi
call   1060 <thr6@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1050 <thr2@plt>
xor    %edi,%edi
call   1080 <thr3@plt>
xor    %edi,%edi
call   1040 <thr4@plt>
xor    %edi,%edi
call   1070 <thr5@plt>
xor    %edi,%edi
call   1060 <thr6@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
br label %1
1: ; preds = %0
%2 = call i32 @thr1(i32 0)
br label %3
3: ; preds = %1
%4 = call i32 @thr2(i32 0)
br label %5
5: ; preds = %3
%6 = call i32 @thr3(i32 0)
br label %7
7: ; preds = %5
%8 = call i32 @thr4(i32 0)
br label %9
9: ; preds = %7
%10 = call i32 @thr5(i32 0)
br label %11
11: ; preds = %9
%12 = call i32 @thr6(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @thr1(i32 0)
%2 = tail call i32 @thr2(i32 0)
%3 = tail call i32 @thr3(i32 0)
%4 = tail call i32 @thr4(i32 0)
%5 = tail call i32 @thr5(i32 0)
%6 = tail call i32 @thr6(i32 0)
ret i32 0
}
/* Variables and functions */
char *strstr(char const *, char const *);
unsigned char strcount(const char *haystack, const char *needle) {
  unsigned char count = 0;
  const char *pos = haystack;
  do {
    pos = strstr(pos, needle);
    if (pos != NULL) {
      count++;
      pos++;
    }
  } while (pos != NULL);
  return count;
}


x86 assembly (clang, -O0):
<strcount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x0,-0x11(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     115c <strcount+0x4c>
mov    -0x11(%rbp),%al
add    $0x1,%al
mov    %al,-0x11(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1161 <strcount+0x51>
cmpq   $0x0,-0x20(%rbp)
jne    112c <strcount+0x1c>
movzbl -0x11(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcount>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    $0xff,%bl
nopl   0x0(%rax)
mov    %r14,%rsi
call   1030 <strstr@plt>
lea    0x1(%rax),%rdi
add    $0x1,%bl
test   %rax,%rax
jne    1120 <strcount+0x10>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define zeroext i8 @strcount(i8* %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8 [ 0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %0, %2 ], [ %9, %3 ]
%6 = tail call i8* @strstr(i8* dereferenceable(1) %5, i8* dereferenceable(1) %1)
%7 = icmp eq i8* %6, null
%8 = add i8 %4, 1
%9 = getelementptr inbounds i8, i8* %6, i64 1
br i1 %7, label %10, label %3
10: ; preds = %3
ret i8 %4
}
double mul(unsigned long long a, double b) { return a * b; }


x86 assembly (clang, -O0):
<mul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movaps 0xeec(%rip),%xmm1
movq   -0x8(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xeeb(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul>:
movq   %rdi,%xmm1
punpckldq 0xef3(%rip),%xmm1
subpd  0xefb(%rip),%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @mul(i64 %0, double %1) {
%3 = alloca i64
%4 = alloca double
store i64 %0, i64* %3
store double %1, double* %4
%5 = load i64, i64* %3
%6 = uitofp i64 %5 to double
%7 = load double, double* %4
%8 = fmul double %6, %7
ret double %8
}

LLVM IR (-O2):
define double @mul(i64 %0, double %1) {
%3 = uitofp i64 %0 to double
%4 = fmul double %3, %1
ret double %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void DESLengthSet(uint32_t ui32Base, uint32_t ui32Length) {
  ASSERT(ui32Base == 0x44038000);
  (*((volatile uint32_t *)(ui32Base + 0x00000024))) = ui32Length;
}


x86 assembly (clang, -O0):
<DESLengthSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x44038000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x24,%eax
cltq
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @DESLengthSet(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, 1141080064
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 36
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store volatile i32 %9, i32* %13
ret void
}

LLVM IR (-O2):
define void @DESLengthSet(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1141080064
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = add nsw i32 %0, 36
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
store volatile i32 %1, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void instructions(void) {
  printf("Enter your choice:\n"
         "    1 to push an item to the front of the deque.\n"
         "    2 to push an item to the back of the deque.\n"
         "    3 to pop an item from the front of the deque.\n"
         "    4 to pop an item from the back of the deque.\n"
         "    5 to peek at the item at the front of the deque.\n"
         "    6 to peek at the item at the back of the deque.\n"
         "    7 to end.\n");
}


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

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

LLVM IR (-O0):
@.str = [335 x i8] c"Enter your choice:\0A 1 to push an item to the front of the deque.\0A 2 to push an item to the back of the deque.\0A 3 to pop an item from the front of the deque.\0A 4 to pop an item from the back of the deque.\0A 5 to peek at the item at the front of the deque.\0A 6 to peek at the item at the back of the deque.\0A 7 to end.\0A\00"
define void @instructions() {
%1 = call i32 @printf(i8* getelementptr inbounds ([335 x i8], [335 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [334 x i8] c"Enter your choice:\0A 1 to push an item to the front of the deque.\0A 2 to push an item to the back of the deque.\0A 3 to pop an item from the front of the deque.\0A 4 to pop an item from the back of the deque.\0A 5 to peek at the item at the front of the deque.\0A 6 to peek at the item at the back of the deque.\0A 7 to end.\00"
define void @instructions() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([334 x i8], [334 x i8]* @str, i64 0, i64 0))
ret void
}
void smp_yield_cpu(int cpu) {}


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

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

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

LLVM IR (-O2):
define void @smp_yield_cpu(i32 %0) {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int strlen(char const *);
uint32_t length_of_string(const char *s) { return (strlen(s) / 4) + 1; }


x86 assembly (clang, -O0):
<length_of_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    $0x4,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<length_of_string>:
push   %rax
call   1030 <strlen@plt>
lea    0x3(%rax),%ecx
test   %eax,%eax
cmovs  %ecx,%eax
sar    $0x2,%eax
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @length_of_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strlen(i8* %3)
%5 = sdiv i32 %4, 4
%6 = add nsw i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @length_of_string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sdiv i32 %2, 4
%4 = add nsw i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(stderr, "\nUSAGE:\n\t%s <path_file>\n\n", progname);
  _exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"\0AUSAGE:\0A\09%s <path_file>\0A\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"\0AUSAGE:\0A\09%s <path_file>\0A\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @_exit(i32 1)
unreachable
}
/* Type definitions */
union bpf_attr {
  int /*<<< orphan*/ map_id;
};
typedef int /*<<< orphan*/ attr;
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
int /*<<< orphan*/ BPF_MAP_GET_FD_BY_ID;
int /*<<< orphan*/ memset(union bpf_attr *, int /*<<< orphan*/, int);
int sys_bpf(int /*<<< orphan*/, union bpf_attr *, int);
int bpf_map_get_fd_by_id(__u32 id) {
  union bpf_attr attr;
  memset(&attr, 0, sizeof(attr));
  attr.map_id = id;
  return sys_bpf(BPF_MAP_GET_FD_BY_ID, &attr, sizeof(attr));
}


x86 assembly (clang, -O0):
<bpf_map_get_fd_by_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <sys_bpf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_map_get_fd_by_id>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    %ebx,(%rsp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
mov    %r14,%rsi
mov    $0x4,%edx
call   1030 <sys_bpf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%union.bpf_attr = type { i32 }
@BPF_MAP_GET_FD_BY_ID = global i32 0
define i32 @bpf_map_get_fd_by_id(i32 %0) {
%2 = alloca i32
%3 = alloca %union.bpf_attr
store i32 %0, i32* %2
%4 = call i32 @memset(%union.bpf_attr* %3, i32 0, i32 4)
%5 = load i32, i32* %2
%6 = bitcast %union.bpf_attr* %3 to i32*
store i32 %5, i32* %6
%7 = load i32, i32* @BPF_MAP_GET_FD_BY_ID
%8 = call i32 @sys_bpf(i32 %7, %union.bpf_attr* %3, i32 4)
ret i32 %8
}

LLVM IR (-O2):
%union.bpf_attr = type { i32 }
@BPF_MAP_GET_FD_BY_ID = global i32 0
define i32 @bpf_map_get_fd_by_id(i32 %0) {
%2 = alloca %union.bpf_attr
%3 = bitcast %union.bpf_attr* %2 to i8*
%4 = call i32 @memset(%union.bpf_attr* %2, i32 0, i32 4)
%5 = getelementptr inbounds %union.bpf_attr, %union.bpf_attr* %2, i64 0, i32 0
store i32 %0, i32* %5
%6 = load i32, i32* @BPF_MAP_GET_FD_BY_ID
%7 = call i32 @sys_bpf(i32 %6, %union.bpf_attr* %2, i32 4)
ret i32 %7
}
void pm_loss_on_bus_removed(struct bus_type *b) {}


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

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

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

LLVM IR (-O2):
%struct.bus_type = type opaque
define void @pm_loss_on_bus_removed(%struct.bus_type* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int, char *);
void main() {
  int a = 0;
  for (int i = 0; i < 10; i++)
    a++;
  assert(a == 10, "Must be 10");
  a = 0;
  for (int i = 0; i < 10; i++) {
    a++;
  }
  assert(a == 10, "Must be 10");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1147 <main+0x37>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
cmpl   $0xa,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xea6(%rip),%rsi
call   1030 <assert@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    118e <main+0x7e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116d <main+0x5d>
cmpl   $0xa,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe5f(%rip),%rsi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    $0x1,%edi
mov    %rbx,%rsi
call   1030 <assert@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <assert@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Must be 10\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %10, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %10
10: ; preds = %7
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %4
13: ; preds = %4
%14 = load i32, i32* %1
%15 = icmp eq i32 %14, 10
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
store i32 0, i32* %3
br label %18
18: ; preds = %24, %13
%19 = load i32, i32* %3
%20 = icmp slt i32 %19, 10
br i1 %20, label %21, label %27
21: ; preds = %18
%22 = load i32, i32* %1
%23 = add nsw i32 %22, 1
store i32 %23, i32* %1
br label %24
24: ; preds = %21
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %18
27: ; preds = %18
%28 = load i32, i32* %1
%29 = icmp eq i32 %28, 10
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"Must be 10\00"
define void @main() {
%1 = tail call i32 @assert(i32 1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @assert(i32 1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *cgiGetByName(char *);
int /*<<< orphan*/ die(char *, char *);
char *cgiGetByNameM(char *name) {
  char *cp = cgiGetByName(name);
  if (!cp)
    die("cgiGetByNameM: name %s not found", name);
  return cp;
}


x86 assembly (clang, -O0):
<cgiGetByNameM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <cgiGetByName@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <cgiGetByNameM+0x34>
mov    -0x8(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1040 <die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgiGetByNameM>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <cgiGetByName@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <cgiGetByNameM+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1040 <die@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [33 x i8] c"cgiGetByNameM: name %s not found\00"
define i8* @cgiGetByNameM(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @cgiGetByName(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [33 x i8] c"cgiGetByNameM: name %s not found\00"
define i8* @cgiGetByNameM(i8* %0) {
%2 = tail call i8* @cgiGetByName(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @die(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printArr(int arr[], int n) {
  int i;
  for (i = 0; i < n; ++i)
    printf("%d ", arr[i]);
}


x86 assembly (clang, -O0):
<printArr>:
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 <printArr+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 <printArr+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <printArr+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 <printArr+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define void @printArr(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 \00"
define void @printArr(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
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void list(void) {
  printf("List of commands\n");
  printf("name, format, resolution, color, render, quit, list, saveas, save, "
         "open\n");
}


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

x86 assembly (clang, -O2):
<list>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeed(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"List of commands\0A\00"
@.str.1 = [73 x i8] c"name, format, resolution, color, render, quit, list, saveas, save, open\0A\00"
define void @list() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"List of commands\00"
@str.2 = [72 x i8] c"name, format, resolution, color, render, quit, list, saveas, save, open\00"
define void @list() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xRAND_add(int);
int /*<<< orphan*/ xRAND_add_long();
int xRAND_poll(void) {
  xRAND_add(32);
  xRAND_add_long();
  xRAND_add_long();
  xRAND_add_long();
  return 1;
}


x86 assembly (clang, -O0):
<xRAND_poll>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
call   1040 <xRAND_add@plt>
mov    $0x0,%al
call   1030 <xRAND_add_long@plt>
mov    $0x0,%al
call   1030 <xRAND_add_long@plt>
mov    $0x0,%al
call   1030 <xRAND_add_long@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xRAND_poll>:
push   %rax
mov    $0x20,%edi
call   1040 <xRAND_add@plt>
xor    %eax,%eax
call   1030 <xRAND_add_long@plt>
xor    %eax,%eax
call   1030 <xRAND_add_long@plt>
xor    %eax,%eax
call   1030 <xRAND_add_long@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @xRAND_poll() {
%1 = call i32 @xRAND_add(i32 32)
%2 = call i32 (...) @xRAND_add_long()
%3 = call i32 (...) @xRAND_add_long()
%4 = call i32 (...) @xRAND_add_long()
ret i32 1
}

LLVM IR (-O2):
define i32 @xRAND_poll() {
%1 = tail call i32 @xRAND_add(i32 32)
%2 = tail call i32 (...) @xRAND_add_long()
%3 = tail call i32 (...) @xRAND_add_long()
%4 = tail call i32 (...) @xRAND_add_long()
ret i32 1
}
int up_low(char c) {
  if (c >= 'A' && c <= 'Z')
    return (c - 'A' + 'a');
  return ((int)c);
}


x86 assembly (clang, -O0):
<up_low>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1136 <up_low+0x36>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1136 <up_low+0x36>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    113d <up_low+0x3d>
movsbl -0x5(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<up_low>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%cl
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @up_low(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 65
%15 = add nsw i32 %14, 97
store i32 %15, i32* %2
br label %19
16: ; preds = %7, %1
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
store i32 %18, i32* %2
br label %19
19: ; preds = %16, %11
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @up_low(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -65
%4 = icmp ult i8 %3, 26
%5 = add nsw i32 %2, 32
%6 = select i1 %4, i32 %5, i32 %2
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ yyparse();
int main() {
  printf("\nEnter a variable name : ");
  yyparse();
  printf("\nThe entered name is valid.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"\0AEnter a variable name : \00"
@.str.1 = [29 x i8] c"\0AThe entered name is valid.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @yyparse()
%4 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"\0AEnter a variable name : \00"
@str = [28 x i8] c"\0AThe entered name is valid.\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @yyparse()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret i32 0
}
OP(ed, c3) { illegal_2(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_2@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_2()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
float f(float x) { return (x > 0.f ? -1.f : 1.f); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm1
movss  0xeea(%rip),%xmm3
movss  0xee6(%rip),%xmm2
xorps  %xmm0,%xmm0
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm1
andps  %xmm3,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
seta   %al
lea    0xeee(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
ret

LLVM IR (-O0):
define float @f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float %3, 0.000000e+00
%5 = zext i1 %4 to i64
%6 = select i1 %4, float -1.000000e+00, float 1.000000e+00
ret float %6
}

LLVM IR (-O2):
define float @f(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = select i1 %2, float -1.000000e+00, float 1.000000e+00
ret float %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void EPIConfigSDRAMSet(uint32_t ui32Base, uint32_t ui32Config,
                       uint32_t ui32Refresh) {
  ASSERT(ui32Base == 0x400D0000);
  ASSERT(ui32Refresh < 2048);
  ui32Config &= ~0x07FF0000;
  ui32Config |= ui32Refresh << 16;
  (*((volatile uint32_t *)(ui32Base + 0x00000010))) = ui32Config;
}


x86 assembly (clang, -O0):
<EPIConfigSDRAMSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x400d0000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x800,-0xc(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%eax
and    $0xf800ffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x10,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x10,%eax
cltq
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPIConfigSDRAMSet>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r14d
xor    %edi,%edi
cmp    $0x400d0000,%r14d
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x800,%ebx
setl   %dil
call   1030 <ASSERT@plt>
and    $0xf800ffff,%ebp
shl    $0x10,%ebx
or     %ebp,%ebx
movslq %r14d,%rax
mov    %ebx,0x10(%rax)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @EPIConfigSDRAMSet(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
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 1074593792
%9 = zext i1 %8 to i32
%10 = call i32 @ASSERT(i32 %9)
%11 = load i32, i32* %6
%12 = icmp slt i32 %11, 2048
%13 = zext i1 %12 to i32
%14 = call i32 @ASSERT(i32 %13)
%15 = load i32, i32* %5
%16 = and i32 %15, -134152193
store i32 %16, i32* %5
%17 = load i32, i32* %6
%18 = shl i32 %17, 16
%19 = load i32, i32* %5
%20 = or i32 %19, %18
store i32 %20, i32* %5
%21 = load i32, i32* %5
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 16
%24 = sext i32 %23 to i64
%25 = inttoptr i64 %24 to i32*
store volatile i32 %21, i32* %25
ret void
}

LLVM IR (-O2):
define void @EPIConfigSDRAMSet(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 1074593792
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = icmp slt i32 %2, 2048
%8 = zext i1 %7 to i32
%9 = tail call i32 @ASSERT(i32 %8)
%10 = and i32 %1, -134152193
%11 = shl i32 %2, 16
%12 = or i32 %11, %10
%13 = add nsw i32 %0, 16
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
store volatile i32 %12, i32* %15
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ is_hint;
};
struct TYPE_4__ {
  TYPE_1__ xmotion;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
char get_XEvent_xmotion_is_hint(void *_p) {
  return (char)((XEvent *)_p)->xmotion.is_hint;
}


x86 assembly (clang, -O0):
<get_XEvent_xmotion_is_hint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_XEvent_xmotion_is_hint>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define signext i8 @get_XEvent_xmotion_is_hint(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i8
ret i8 %8
}

LLVM IR (-O2):
define signext i8 @get_XEvent_xmotion_is_hint(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i8
ret i8 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_cvtpi32_pd(int /*<<< orphan*/);
__m128d test_mm_cvtpi32_pd(__m64 a) { return _mm_cvtpi32_pd(a); }


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

x86 assembly (clang, -O2):
<test_mm_cvtpi32_pd>:
jmp    1030 <_mm_cvtpi32_pd@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cvtpi32_pd(i32 %0) {
%2 = tail call i32 @_mm_cvtpi32_pd(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ CheckedCommand(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                  char *, int, int);
void SetVisibility(FILE *p_cmd, FILE *p_res, int i_overlay, int i_visible) {
  CheckedCommand(p_cmd, p_res, "SetVisibility %d %d\n", i_overlay, i_visible);
}


x86 assembly (clang, -O0):
<SetVisibility>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
lea    0xec4(%rip),%rdx
call   1030 <CheckedCommand@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetVisibility>:
mov    %ecx,%r8d
mov    %edx,%ecx
lea    0xee4(%rip),%rdx
jmp    1030 <CheckedCommand@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"SetVisibility %d %d\0A\00"
define void @SetVisibility(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 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @CheckedCommand(i32* %9, i32* %10, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"SetVisibility %d %d\0A\00"
define void @SetVisibility(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @CheckedCommand(i32* %0, i32* %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
ret void
}
int smaller_value(int menor, int num) {
  if (menor >= num)
    menor = num;
  return menor;
}


x86 assembly (clang, -O0):
<smaller_value>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     111c <smaller_value+0x1c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<smaller_value>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @smaller_value(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 = icmp sge i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
store i32 %9, i32* %3
br label %10
10: ; preds = %8, %2
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @smaller_value(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ mpfr_t;
typedef int mpfr_exp_t;

/* Variables and functions */
int /*<<< orphan*/ MPFR_RNDN;
int /*<<< orphan*/ all(int /*<<< orphan*/, int, int, int);
int /*<<< orphan*/ mpfr_clear(int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_init(int /*<<< orphan*/);
int mpfr_set_d(int /*<<< orphan*/, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main() {
  mpfr_t op;
  mpfr_init(op);
  mpfr_exp_t e1, e2;
  int t;
  e1 = -123;
  e2 = 123;
  t = mpfr_set_d(op, 1. / 3, MPFR_RNDN);
  all(op, t, e1, e2);
  printf("\n");
  mpfr_clear(op);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <mpfr_init@plt>
movl   $0xffffff85,-0xc(%rbp)
movl   $0x7b,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2e69(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <mpfr_set_d@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <all@plt>
lea    0xe5d(%rip),%rdi
call   1060 <printf@plt>
mov    -0x8(%rbp),%edi
call   1070 <mpfr_clear@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1050 <mpfr_init@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1060 <mpfr_set_d@plt>
mov    %eax,%esi
mov    $0xffffff85,%edx
mov    $0x7b,%ecx
call   1040 <all@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
call   1070 <mpfr_clear@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@MPFR_RNDN = global i32 0
@.str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = load i32, i32* %2
%7 = call i32 @mpfr_init(i32 %6)
store i32 -123, i32* %3
store i32 123, i32* %4
%8 = load i32, i32* %2
%9 = load i32, i32* @MPFR_RNDN
%10 = call i32 @mpfr_set_d(i32 %8, i32 0, i32 %9)
store i32 %10, i32* %5
%11 = load i32, i32* %2
%12 = load i32, i32* %5
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = call i32 @all(i32 %11, i32 %12, i32 %13, i32 %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%17 = load i32, i32* %2
%18 = call i32 @mpfr_clear(i32 %17)
ret i32 0
}

LLVM IR (-O2):
@MPFR_RNDN = global i32 0
define i32 @main() {
%1 = tail call i32 @mpfr_init(i32 undef)
%2 = load i32, i32* @MPFR_RNDN
%3 = tail call i32 @mpfr_set_d(i32 undef, i32 0, i32 %2)
%4 = tail call i32 @all(i32 undef, i32 %3, i32 -123, i32 123)
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @mpfr_clear(i32 undef)
ret i32 0
}
int solve(int a, int b) {
  int c = a % b;
  if (c != 0) {
    return solve(b, c);
  }
  return b;
}


x86 assembly (clang, -O0):
<solve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1145 <solve+0x35>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <solve@plt>
mov    %eax,-0x4(%rbp)
jmp    114b <solve+0x3b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve>:
mov    %esi,%edx
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <solve+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @solve(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %5, %3 ]
%5 = phi i32 [ %1, %2 ], [ %6, %3 ]
%6 = srem i32 %4, %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_longlong_get(long long *dest, const long long *src,
                               size_t len, int pe) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_longlong_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_longlong_get(i64* %0, i64* %1, i64 %2, i32 %3) {
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca i64
%8 = alloca i32
store i64* %0, i64** %5
store i64* %1, i64** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_longlong_get(i64* nocapture readnone %0, i64* nocapture readnone %1, i64 %2, i32 %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo0();
void bar0() { foo0(); }


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

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

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

LLVM IR (-O2):
define void @bar0() {
%1 = tail call i32 (...) @foo0()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bbm_byte_write(void *, unsigned short, int, int);
int /*<<< orphan*/ msWait(int);
int fc8300_deinit(void *handle, unsigned short devid) {
  bbm_byte_write(handle, 0x5800, 0x0013, 0x00);
  msWait(24);
  bbm_byte_write(handle, devid, 0x0001, 0x00);
  return 0;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x5800,%esi
mov    $0x13,%edx
xor    %ecx,%ecx
call   1030 <bbm_byte_write@plt>
mov    $0x18,%edi
call   1040 <msWait@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%edx
xor    %ecx,%ecx
movzwl -0xa(%rbp),%esi
call   1030 <bbm_byte_write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x5800,%esi
mov    $0x13,%edx
xor    %ecx,%ecx
call   1030 <bbm_byte_write@plt>
mov    $0x18,%edi
call   1040 <msWait@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <bbm_byte_write@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fc8300_deinit(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i8*, i8** %3
%6 = call i32 @bbm_byte_write(i8* %5, i16 zeroext 22528, i32 19, i32 0)
%7 = call i32 @msWait(i32 24)
%8 = load i8*, i8** %3
%9 = load i16, i16* %4
%10 = call i32 @bbm_byte_write(i8* %8, i16 zeroext %9, i32 1, i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @fc8300_deinit(i8* %0, i16 zeroext %1) {
%3 = tail call i32 @bbm_byte_write(i8* %0, i16 zeroext 22528, i32 19, i32 0)
%4 = tail call i32 @msWait(i32 24)
%5 = tail call i32 @bbm_byte_write(i8* %0, i16 zeroext %1, i32 1, i32 0)
ret i32 0
}
void fillMemory(unsigned char *pBuff, int size, unsigned char val) {
  while (size) {
    *pBuff = val;
    pBuff++;
    size--;
  }
}


x86 assembly (clang, -O0):
<fillMemory>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     113d <fillMemory+0x3d>
mov    -0xd(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1110 <fillMemory+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fillMemory>:
test   %esi,%esi
je     1126 <fillMemory+0x16>
push   %rax
mov    %esi,%eax
movzbl %dl,%esi
mov    %rax,%rdx
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @fillMemory(i8* nocapture writeonly %0, i32 %1, i8 zeroext %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
size_t ft_nbrlen_unsigned(unsigned long nbr, unsigned long base) {
  size_t len;
  len = 1;
  while ((nbr / base) != 0) {
    nbr = nbr / base;
    len++;
  }
  return (len);
}


x86 assembly (clang, -O0):
<ft_nbrlen_unsigned>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
cmp    $0x0,%rax
je     114b <ft_nbrlen_unsigned+0x4b>
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <ft_nbrlen_unsigned+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_nbrlen_unsigned>:
mov    $0x1,%ecx
cmp    %rsi,%rdi
jae    110e <ft_nbrlen_unsigned+0xe>
mov    %rcx,%rax
ret
mov    %rdi,%rax
jmp    112e <ft_nbrlen_unsigned+0x2e>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %edx,%edx
div    %rsi
add    $0x1,%rcx
cmp    %rsi,%rax
jb     110a <ft_nbrlen_unsigned+0xa>
mov    %rax,%rdx
or     %rsi,%rdx
shr    $0x20,%rdx
jne    1120 <ft_nbrlen_unsigned+0x20>
xor    %edx,%edx
div    %esi
jmp    1125 <ft_nbrlen_unsigned+0x25>

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

LLVM IR (-O2):
define i64 @ft_nbrlen_unsigned(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %8, %4 ], [ 1, %2 ]
%6 = phi i64 [ %7, %4 ], [ %0, %2 ]
%7 = udiv i64 %6, %1
%8 = add i64 %5, 1
%9 = icmp ult i64 %7, %1
br i1 %9, label %10, label %4
10: ; preds = %4, %2
%11 = phi i64 [ 1, %2 ], [ %8, %4 ]
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ triangle();
void display() {
  glClear(GL_COLOR_BUFFER_BIT);
  triangle();
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
mov    $0x0,%al
call   1040 <triangle@plt>
mov    $0x0,%al
call   1050 <glFlush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
xor    %eax,%eax
call   1040 <triangle@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glFlush@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = call i32 @glClear(i32 %1)
%3 = call i32 (...) @triangle()
%4 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = tail call i32 @glClear(i32 %1)
%3 = tail call i32 (...) @triangle()
%4 = tail call i32 (...) @glFlush()
ret void
}