xunge/DecIR huggingface dataset:
unsigned int load32(const unsigned char *x) {
  unsigned int u = x[3];
  u = (u << 8) | x[2];
  u = (u << 8) | x[1];
  return (u << 8) | x[0];
}


x86 assembly (clang, -O0):
<load32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<load32>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @load32(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 3
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = shl i32 %8, 8
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 2
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = or i32 %9, %13
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = shl i32 %15, 8
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i64 1
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = or i32 %16, %20
store i32 %21, i32* %3
%22 = load i32, i32* %3
%23 = shl i32 %22, 8
%24 = load i8*, i8** %2
%25 = getelementptr inbounds i8, i8* %24, i64 0
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = or i32 %23, %27
ret i32 %28
}

LLVM IR (-O2):
define i32 @load32(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %4, 16
%9 = shl nuw nsw i32 %7, 8
%10 = or i32 %9, %8
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = or i32 %10, %13
%15 = shl nuw i32 %14, 8
%16 = load i8, i8* %0
%17 = zext i8 %16 to i32
%18 = or i32 %15, %17
ret i32 %18
}
/* Variables and functions */
char *str_legacy_to_utf8_internal(char const *, char const *, char);
char *str_legacy_to_utf8_lossy(const char *string,
                               const char *legacy_encoding) {
  return str_legacy_to_utf8_internal(string, legacy_encoding, '?');
}


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

x86 assembly (clang, -O2):
<str_legacy_to_utf8_lossy>:
mov    $0x3f,%edx
jmp    1030 <str_legacy_to_utf8_internal@plt>

LLVM IR (-O0):
define i8* @str_legacy_to_utf8_lossy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i8* @str_legacy_to_utf8_internal(i8* %5, i8* %6, i8 signext 63)
ret i8* %7
}

LLVM IR (-O2):
define i8* @str_legacy_to_utf8_lossy(i8* %0, i8* %1) {
%3 = tail call i8* @str_legacy_to_utf8_internal(i8* %0, i8* %1, i8 signext 63)
ret i8* %3
}
/* Variables and functions */
int read(int /*<<< orphan*/, char *, int);
int inbyte(void) {
  char ch;
  if (read(0, &ch, 1) == 1)
    return ch;
  return -1;
}


x86 assembly (clang, -O0):
<inbyte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
jne    113d <inbyte+0x2d>
movsbl -0x5(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1144 <inbyte+0x34>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inbyte>:
push   %rax
lea    0x7(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
movsbl 0x7(%rsp),%ecx
mov    $0xffffffff,%eax
cmove  %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @inbyte() {
%1 = alloca i8
%2 = call i32 @read(i32 0, i8* %1, i32 1)
%3 = icmp eq i32 %2, 1
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = select i1 %3, i32 %5, i32 -1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void **);
void free_2D_matrix(int rows, void **matrix) {
  int j;
  for (j = 0; j < rows; j++) {
    free(matrix[j]);
  }
  free(matrix);
}


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

x86 assembly (clang, -O2):
<free_2D_matrix>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
test   %edi,%edi
jle    1142 <free_2D_matrix+0x32>
mov    %edi,%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 <free_2D_matrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_2D_matrix(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = bitcast i8** %8 to i8***
%10 = load i8**, i8*** %9
%11 = tail call i32 @free(i8** %10)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = tail call i32 @free(i8** %1)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syspool_standard_create(int k) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(304, &k, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syspool_standard_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x130,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syspool_standard_create>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x130,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syspool_standard_create(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 304, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @syspool_standard_create(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 304, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ draw_char24(int, int, int, int);
void wideat(int x, int y, int c, int color) {
  draw_char24(x * 12, y * 24, c, color);
}


x86 assembly (clang, -O0):
<wideat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
imul   $0xc,-0x4(%rbp),%edi
imul   $0x18,-0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <draw_char24@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wideat>:
shl    $0x2,%edi
lea    (%rdi,%rdi,2),%edi
shl    $0x3,%esi
lea    (%rsi,%rsi,2),%esi
jmp    1030 <draw_char24@plt>

LLVM IR (-O0):
define void @wideat(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 = mul nsw i32 %9, 12
%11 = load i32, i32* %6
%12 = mul nsw i32 %11, 24
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = call i32 @draw_char24(i32 %10, i32 %12, i32 %13, i32 %14)
ret void
}

LLVM IR (-O2):
define void @wideat(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = mul nsw i32 %0, 12
%6 = mul nsw i32 %1, 24
%7 = tail call i32 @draw_char24(i32 %5, i32 %6, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
unsigned int dictIntHashFunction(long);
unsigned int _dictIntCopyHTHashFunction(const void *key) {
  return dictIntHashFunction((long)key);
}


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

x86 assembly (clang, -O2):
<_dictIntCopyHTHashFunction>:
jmp    1030 <dictIntHashFunction@plt>

LLVM IR (-O0):
define i32 @_dictIntCopyHTHashFunction(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = call i32 @dictIntHashFunction(i64 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @_dictIntCopyHTHashFunction(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = tail call i32 @dictIntHashFunction(i64 %2)
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ realbuff;

/* Variables and functions */
unsigned long long getpagesize();
char *malloc(int);
char *get_buffer() {
  unsigned long long pagesize = getpagesize();
  char *realbuff = malloc((1024 * 1024 * 16) + pagesize + 99);
  return (char *)((((long long)(realbuff) + pagesize - 1) / pagesize) *
                  pagesize);
}


x86 assembly (clang, -O0):
<get_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getpagesize@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1000000,%rax
add    $0x63,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    -0x8(%rbp),%rax
sub    $0x1,%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x8(%rbp)
imul   -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_buffer>:
push   %rbx
xor    %eax,%eax
call   1040 <getpagesize@plt>
mov    %rax,%rbx
lea    0x1000063(%rax),%edi
call   1030 <malloc@plt>
lea    (%rbx,%rax,1),%rcx
add    $0xffffffffffffffff,%rcx
mov    %rbx,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     1154 <get_buffer+0x34>
mov    %rcx,%rax
xor    %edx,%edx
div    %rbx
jmp    115a <get_buffer+0x3a>
mov    %ecx,%eax
xor    %edx,%edx
div    %ebx
sub    %rdx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @get_buffer() {
%1 = alloca i64
%2 = alloca i8*
%3 = call i64 (...) @getpagesize()
store i64 %3, i64* %1
%4 = load i64, i64* %1
%5 = add i64 16777216, %4
%6 = add i64 %5, 99
%7 = trunc i64 %6 to i32
%8 = call i8* @malloc(i32 %7)
store i8* %8, i8** %2
%9 = load i8*, i8** %2
%10 = ptrtoint i8* %9 to i64
%11 = load i64, i64* %1
%12 = add i64 %10, %11
%13 = sub i64 %12, 1
%14 = load i64, i64* %1
%15 = udiv i64 %13, %14
%16 = load i64, i64* %1
%17 = mul i64 %15, %16
%18 = inttoptr i64 %17 to i8*
ret i8* %18
}

LLVM IR (-O2):
define i8* @get_buffer() {
%1 = tail call i64 (...) @getpagesize()
%2 = trunc i64 %1 to i32
%3 = add i32 %2, 16777315
%4 = tail call i8* @malloc(i32 %3)
%5 = ptrtoint i8* %4 to i64
%6 = add i64 %1, -1
%7 = add i64 %6, %5
%8 = urem i64 %7, %1
%9 = sub i64 %7, %8
%10 = inttoptr i64 %9 to i8*
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_usage(void) {
  printf("usage: prog_name <options>...\n"
         "-h : show usage\n"
         "-g : specify group name, current mapping or security\n\n");
}


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

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

LLVM IR (-O0):
@.str = [101 x i8] c"usage: prog_name <options>...\0A-h : show usage\0A-g : specify group name, current mapping or security\0A\0A\00"
define void @show_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [100 x i8] c"usage: prog_name <options>...\0A-h : show usage\0A-g : specify group name, current mapping or security\0A\00"
define void @show_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([100 x i8], [100 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void usage(FILE *fdo, const char *name) {
  fprintf(fdo, "ASIPRO V2.0"
               "\n");
  fprintf(fdo, "Usage: %s input_file output_file\n", name);
  fprintf(fdo, "\t Assembles input_file to output_file\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xedc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xec3(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xed1(%rip),%rdi
mov    $0x26,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"ASIPRO V2.0\0A\00"
@.str.1 = [34 x i8] c"Usage: %s input_file output_file\0A\00"
@.str.2 = [39 x i8] c"\09 Assembles input_file to output_file\0A\00"
define void @usage(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = load i32*, i32** %3
%8 = load i8*, i8** %4
%9 = call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = load i32*, i32** %3
%11 = call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"ASIPRO V2.0\0A\00"
@.str.1 = [34 x i8] c"Usage: %s input_file output_file\0A\00"
@.str.2 = [39 x i8] c"\09 Assembles input_file to output_file\0A\00"
define void @usage(i32* nocapture %0, i8* %1) {
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 12, i64 1, i32* %0)
%4 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i64 38, i64 1, i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_set_pi32(int, int);
__m64 test_mm_set_pi32(int a, int b) { return _mm_set_pi32(a, b); }


x86 assembly (clang, -O0):
<test_mm_set_pi32>:
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 <_mm_set_pi32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_set_pi32>:
jmp    1030 <_mm_set_pi32@plt>

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

LLVM IR (-O2):
define i32 @test_mm_set_pi32(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_set_pi32(i32 %0, i32 %1)
ret i32 %3
}
char *getcolor(int player) {
  switch (player) {
  case 0:
    return "\x1B[31m";
  case 1:
    return "\x1B[32m";
  case 2:
    return "\x1B[33m";
  case 3:
    return "\x1B[34m";
  default:
    return "error";
  }
}


x86 assembly (clang, -O0):
<getcolor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x3,%rax
ja     116c <getcolor+0x6c>
mov    -0x18(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xedd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <getcolor+0x77>
lea    0xed3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <getcolor+0x77>
lea    0xec9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <getcolor+0x77>
lea    0xebf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <getcolor+0x77>
lea    0xeb5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getcolor>:
cmp    $0x3,%edi
ja     1117 <getcolor+0x17>
movslq %edi,%rax
lea    0xf11(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0xefa(%rip),%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[31m\00"
@.str.1 = [6 x i8] c"\1B[32m\00"
@.str.2 = [6 x i8] c"\1B[33m\00"
@.str.3 = [6 x i8] c"\1B[34m\00"
@.str.4 = [6 x i8] c"error\00"
define i8* @getcolor(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
]
5: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
6: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
7: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %10
8: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %10
9: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %10
10: ; preds = %9, %8, %7, %6, %5
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[31m\00"
@.str.1 = [6 x i8] c"\1B[32m\00"
@.str.2 = [6 x i8] c"\1B[33m\00"
@.str.3 = [6 x i8] c"\1B[34m\00"
@.str.4 = [6 x i8] c"error\00"
@reltable.getcolor = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str to i64), i64 ptrtoint ([4 x i32]* @reltable.getcolor to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.1 to i64), i64 ptrtoint ([4 x i32]* @reltable.getcolor to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.2 to i64), i64 ptrtoint ([4 x i32]* @reltable.getcolor to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.3 to i64), i64 ptrtoint ([4 x i32]* @reltable.getcolor to i64)) to i32)]
define i8* @getcolor(i32 %0) {
%2 = icmp ult i32 %0, 4
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.getcolor to i8*), i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), %1 ]
ret i8* %8
}
/* Variables and functions */
scalar_t__ reglib_isalpha_upper(char const);
int reglib_is_alpha2(const char *alpha2) {
  if (reglib_isalpha_upper(alpha2[0]) && reglib_isalpha_upper(alpha2[1]))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<reglib_is_alpha2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <reglib_isalpha_upper@plt>
cmp    $0x0,%rax
je     1155 <reglib_is_alpha2+0x45>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1030 <reglib_isalpha_upper@plt>
cmp    $0x0,%rax
je     1155 <reglib_is_alpha2+0x45>
movl   $0x1,-0x4(%rbp)
jmp    115c <reglib_is_alpha2+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reglib_is_alpha2>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1030 <reglib_isalpha_upper@plt>
test   %rax,%rax
je     1139 <reglib_is_alpha2+0x29>
movsbl 0x1(%rbx),%edi
call   1030 <reglib_isalpha_upper@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1139 <reglib_is_alpha2+0x29>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @reglib_is_alpha2(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 0
%6 = load i8, i8* %5
%7 = call i64 @reglib_isalpha_upper(i8 signext %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = call i64 @reglib_isalpha_upper(i8 signext %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %9
store i32 1, i32* %2
br label %17
16: ; preds = %9, %1
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 @reglib_is_alpha2(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @reglib_isalpha_upper(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = tail call i64 @reglib_isalpha_upper(i8 signext %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %5, %1
br label %11
11: ; preds = %5, %10
%12 = phi i32 [ 0, %10 ], [ 1, %5 ]
ret i32 %12
}
void foo193() {}


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

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

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

LLVM IR (-O2):
define void @foo193() {
ret void
}
void swap(int **p, int **q) {
  int m = 1, n = 2;
  int *a = &m, *b = &n;
  swap(&a, &b);
  int *tmp = p;
  p = q;
  q = tmp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x2,-0x18(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1030 <swap@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x10(%rbp)
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @swap(i32** %0, i32** %1) {
%3 = alloca i32**
%4 = alloca i32**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
store i32** %0, i32*** %3
store i32** %1, i32*** %4
store i32 1, i32* %5
store i32 2, i32* %6
store i32* %5, i32** %7
store i32* %6, i32** %8
%10 = load i32**, i32*** %3
%11 = bitcast i32** %10 to i32*
store i32* %11, i32** %9
%12 = load i32**, i32*** %4
store i32** %12, i32*** %3
%13 = load i32*, i32** %9
%14 = bitcast i32* %13 to i32**
store i32** %14, i32*** %4
ret void
}

LLVM IR (-O2):
define void @swap(i32** nocapture %0, i32** nocapture %1) {
%3 = alloca i32*
%4 = bitcast i32** %3 to i8*
ret void
}
int largest_prime() {
  int factor = 3;
  long large_num = 600851475143l;
  while (factor < large_num) {
    if (large_num % factor == 0) {
      large_num /= factor;
      factor--;
    }
    factor++;
  }
  return factor;
}


x86 assembly (clang, -O0):
<largest_prime>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
movabs $0x8be589eac7,%rax
mov    %rax,-0x10(%rbp)
movslq -0x4(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1166 <largest_prime+0x66>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    1158 <largest_prime+0x58>
movslq -0x4(%rbp),%rcx
mov    -0x10(%rbp),%rax
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1119 <largest_prime+0x19>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<largest_prime>:
mov    $0x3,%esi
movabs $0x8be589eac7,%rcx
mov    $0x3,%edi
jmp    1142 <largest_prime+0x42>
cs nopw 0x0(%rax,%rax,1)
mov    %rcx,%rax
cqto
idiv   %rdi
lea    -0x1(%rsi),%edi
test   %rdx,%rdx
cmovne %esi,%edi
cmove  %rax,%rcx
mov    %edi,%esi
add    $0x1,%esi
movslq %esi,%rdi
cmp    %rdi,%rcx
jle    1156 <largest_prime+0x56>
mov    %rcx,%rax
or     %rdi,%rax
shr    $0x20,%rax
jne    1120 <largest_prime+0x20>
mov    %ecx,%eax
xor    %edx,%edx
div    %edi
jmp    1128 <largest_prime+0x28>
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @largest_prime() {
br label %1
1: ; preds = %0, %1
%2 = phi i64 [ 3, %0 ], [ %12, %1 ]
%3 = phi i64 [ 600851475143, %0 ], [ %10, %1 ]
%4 = phi i32 [ 3, %0 ], [ %11, %1 ]
%5 = srem i64 %3, %2
%6 = sdiv i64 %3, %2
%7 = icmp eq i64 %5, 0
%8 = add nsw i32 %4, -1
%9 = select i1 %7, i32 %8, i32 %4
%10 = select i1 %7, i64 %6, i64 %3
%11 = add nsw i32 %9, 1
%12 = sext i32 %11 to i64
%13 = icmp sgt i64 %10, %12
br i1 %13, label %1, label %14
14: ; preds = %1
ret i32 %11
}
int grid_xpub_ispeer(int socktype) { return socktype == (2 * 16 + 1) ? 1 : 0; }


x86 assembly (clang, -O0):
<grid_xpub_ispeer>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x21,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<grid_xpub_ispeer>:
xor    %eax,%eax
cmp    $0x21,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @grid_xpub_ispeer(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 33
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @grid_xpub_ispeer(i32 %0) {
%2 = icmp eq i32 %0, 33
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int __VERIFIER_nondet_int();
scalar_t__ alloca(int);
int /*<<< orphan*/ insertionSort(int *, int);
int main() {
  int array_size = __VERIFIER_nondet_int();
  if (array_size < 1) {
    array_size = 1;
  }
  int *a = (int *)alloca(array_size * sizeof(int));
  insertionSort(a, array_size);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    115a <main+0x2a>
movl   $0x1,-0x8(%rbp)
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <alloca@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1050 <insertionSort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
mov    $0x1,%ebx
cmovg  %eax,%ebx
lea    0x0(,%rbx,4),%edi
call   1030 <alloca@plt>
mov    %rax,%rdi
mov    %ebx,%esi
call   1050 <insertionSort@plt>
xor    %eax,%eax
pop    %rbx
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 = load i32, i32* %2
%6 = icmp slt i32 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 1, i32* %2
br label %8
8: ; preds = %7, %0
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i64 @alloca(i32 %12)
%14 = inttoptr i64 %13 to i32*
store i32* %14, i32** %3
%15 = load i32*, i32** %3
%16 = load i32, i32* %2
%17 = call i32 @insertionSort(i32* %15, i32 %16)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp sgt i32 %1, 1
%3 = select i1 %2, i32 %1, i32 1
%4 = shl i32 %3, 2
%5 = tail call i64 @alloca(i32 %4)
%6 = inttoptr i64 %5 to i32*
%7 = tail call i32 @insertionSort(i32* %6, i32 %3)
ret i32 0
}
/* Type definitions */
struct cmsghdr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_pktinfo(const struct cmsghdr *c) {
  printf("IP_PKTINFO, {ipi_ifindex=if_nametoindex(\"lo\")"
         ", ipi_spec_dst=inet_addr(\"127.0.0.1\")"
         ", ipi_addr=inet_addr(\"127.0.0.1\")}");
}


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

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

LLVM IR (-O0):
%struct.cmsghdr = type { i32 }
@.str = [117 x i8] c"IP_PKTINFO, {ipi_ifindex=if_nametoindex(\22lo\22), ipi_spec_dst=inet_addr(\22127.0.0.1\22), ipi_addr=inet_addr(\22127.0.0.1\22)}\00"
define void @print_pktinfo(%struct.cmsghdr* %0) {
%2 = alloca %struct.cmsghdr*
store %struct.cmsghdr* %0, %struct.cmsghdr** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.cmsghdr = type { i32 }
@.str = [117 x i8] c"IP_PKTINFO, {ipi_ifindex=if_nametoindex(\22lo\22), ipi_spec_dst=inet_addr(\22127.0.0.1\22), ipi_addr=inet_addr(\22127.0.0.1\22)}\00"
define void @print_pktinfo(%struct.cmsghdr* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([117 x i8], [117 x i8]* @.str, i64 0, i64 0))
ret void
}
reg0adrx1_set(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ r0 = (((float *)11111111)[x1]); }


x86 assembly (clang, -O0):
<reg0adrx1_set>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movslq -0x14(%rbp),%rcx
mov    $0xa98ac7,%eax
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @reg0adrx1_set(double %0, double %1, i32 %2, i32 %3, float* %4, float* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = fptrunc double %0 to float
%15 = fptrunc double %1 to float
store float %14, float* %8
store float %15, float* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
%16 = load i32, i32* %11
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds float, float* inttoptr (i64 11111111 to float*), i64 %17
%19 = load float, float* %18
store float %19, float* %8
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @reg0adrx1_set(double %0, double %1, i32 %2, i32 %3, float* nocapture readnone %4, float* nocapture readnone %5) {
ret i32 undef
}
int greaterThanEqual(double x, double y) {
  int i;
  if (x >= y) {
    i = 1;
  } else {
    i = 0;
  }
  return i;
}


x86 assembly (clang, -O0):
<greaterThanEqual>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     112a <greaterThanEqual+0x2a>
movl   $0x1,-0x14(%rbp)
jmp    1131 <greaterThanEqual+0x31>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<greaterThanEqual>:
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setae  %al
ret

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

LLVM IR (-O2):
define i32 @greaterThanEqual(double %0, double %1) {
%3 = fcmp oge double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
float RAND_MAX;
scalar_t__ rand();
char random_char() {
  char new_char;
  int random = (int)(((float)rand() / RAND_MAX) * 27);
  if (random == 26) {
    new_char = ' ';
  } else {
    new_char = (char)(random + 65);
  }
  return new_char;
}


x86 assembly (clang, -O0):
<random_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ebd(%rip),%rax
divss  (%rax),%xmm0
movss  0xec9(%rip),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1a,-0x8(%rbp)
jne    1155 <random_char+0x45>
movb   $0x20,-0x1(%rbp)
jmp    115e <random_char+0x4e>
mov    -0x8(%rbp),%eax
add    $0x41,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_char>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec4(%rip),%rax
divss  (%rax),%xmm0
mulss  0xed0(%rip),%xmm0
cvttss2si %xmm0,%eax
lea    0x41(%rax),%ecx
cmp    $0x1a,%eax
movzbl %cl,%ecx
mov    $0x20,%eax
cmovne %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@RAND_MAX = global float 0.000000e+00
define signext i8 @random_char() {
%1 = alloca i8
%2 = alloca i32
%3 = call i64 (...) @rand()
%4 = sitofp i64 %3 to float
%5 = load float, float* @RAND_MAX
%6 = fdiv float %4, %5
%7 = fmul float %6, 2.700000e+01
%8 = fptosi float %7 to i32
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 26
br i1 %10, label %11, label %12
11: ; preds = %0
store i8 32, i8* %1
br label %16
12: ; preds = %0
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 65
%15 = trunc i32 %14 to i8
store i8 %15, i8* %1
br label %16
16: ; preds = %12, %11
%17 = load i8, i8* %1
ret i8 %17
}

LLVM IR (-O2):
@RAND_MAX = global float 0.000000e+00
define signext i8 @random_char() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load float, float* @RAND_MAX
%4 = fdiv float %2, %3
%5 = fmul float %4, 2.700000e+01
%6 = fptosi float %5 to i32
%7 = icmp eq i32 %6, 26
%8 = trunc i32 %6 to i8
%9 = add i8 %8, 65
%10 = select i1 %7, i8 32, i8 %9
ret i8 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ POSIX_FADV_WILLNEED;
int posix_fadvise(int, int /*<<< orphan*/, size_t, int /*<<< orphan*/);
int give_posix_hints(int fd, off_t start, size_t len) {
  return posix_fadvise(fd, start, len, POSIX_FADV_WILLNEED);
}


x86 assembly (clang, -O0):
<give_posix_hints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%ecx
call   1030 <posix_fadvise@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<give_posix_hints>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <posix_fadvise@plt>

LLVM IR (-O0):
@POSIX_FADV_WILLNEED = global i32 0
define i32 @give_posix_hints(i32 %0, i32 %1, i64 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64
store i32 %0, i32* %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i64, i64* %6
%10 = load i32, i32* @POSIX_FADV_WILLNEED
%11 = call i32 @posix_fadvise(i32 %7, i32 %8, i64 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@POSIX_FADV_WILLNEED = global i32 0
define i32 @give_posix_hints(i32 %0, i32 %1, i64 %2) {
%4 = load i32, i32* @POSIX_FADV_WILLNEED
%5 = tail call i32 @posix_fadvise(i32 %0, i32 %1, i64 %2, i32 %4)
ret i32 %5
}
/* Variables and functions */
scalar_t__ tbcw_thread2();
void *tbcw_thread2_wrap(void *v __attribute__((unused))) {
  return (void *)(intptr_t)tbcw_thread2();
}


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

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

LLVM IR (-O0):
define i8* @tbcw_thread2_wrap(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i64 (...) @tbcw_thread2()
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}

LLVM IR (-O2):
define i8* @tbcw_thread2_wrap(i8* nocapture readnone %0) {
%2 = tail call i64 (...) @tbcw_thread2()
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
unsigned long long square_of_sum(int limit) {
  unsigned long long sum = 0;
  for (int i = 1; i <= limit; i++) {
    sum += i;
  }
  return sum * sum;
}


x86 assembly (clang, -O0):
<square_of_sum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     113c <square_of_sum+0x3c>
movslq -0x14(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1116 <square_of_sum+0x16>
mov    -0x10(%rbp),%rax
imul   -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<square_of_sum>:
test   %edi,%edi
jle    111e <square_of_sum+0x1e>
lea    -0x1(%rdi),%eax
add    $0xfffffffe,%edi
imul   %rax,%rdi
shr    %rdi
lea    (%rdi,%rax,2),%rax
add    $0x1,%rax
imul   %rax,%rax
ret
xor    %eax,%eax
imul   %rax,%rax
ret

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

LLVM IR (-O2):
define i64 @square_of_sum(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = zext i32 %4 to i64
%6 = shl nuw nsw i64 %5, 1
%7 = zext i32 %4 to i64
%8 = add nsw i32 %0, -2
%9 = zext i32 %8 to i64
%10 = mul nuw nsw i64 %7, %9
%11 = lshr i64 %10, 1
%12 = add nuw nsw i64 %6, %11
%13 = add nuw nsw i64 %12, 1
br label %14
14: ; preds = %3, %1
%15 = phi i64 [ 0, %1 ], [ %13, %3 ]
%16 = mul i64 %15, %15
ret i64 %16
}
/* Variables and functions */
int /*<<< orphan*/ rec(int);
main() { rec(1); }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ extract32(int /*<<< orphan*/, int, int);
uint32_t parse_bits(uint32_t encoding) { return extract32(encoding, 14, 2); }


x86 assembly (clang, -O0):
<parse_bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xe,%esi
mov    $0x2,%edx
call   1030 <extract32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_bits>:
mov    $0xe,%esi
mov    $0x2,%edx
jmp    1030 <extract32@plt>

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

LLVM IR (-O2):
define i32 @parse_bits(i32 %0) {
%2 = tail call i32 @extract32(i32 %0, i32 14, i32 2)
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void AUXSMPHRelease(uint32_t ui32Semaphore) {

  ;
  (*((volatile unsigned long *)(0x400C8000 + 0x00000000 + 4 * ui32Semaphore))) =
      0x00000001;
}


x86 assembly (clang, -O0):
<AUXSMPHRelease>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
add    $0x400c8000,%eax
cltq
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AUXSMPHRelease>:
movslq %edi,%rax
movq   $0x1,0x400c8000(,%rax,4)
ret

LLVM IR (-O0):
define void @AUXSMPHRelease(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 4, %3
%5 = add nsw i32 1074561024, %4
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i64*
store volatile i64 1, i64* %7
ret void
}

LLVM IR (-O2):
define void @AUXSMPHRelease(i32 %0) {
%2 = shl nsw i32 %0, 2
%3 = add nsw i32 %2, 1074561024
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i64*
store volatile i64 1, i64* %5
ret void
}
/* Variables and functions */
scalar_t__ isdigit(int);
int is_number_start(int c, int ahead) {
  return (isdigit(c) || ((c == '-' || c == '+') && isdigit(ahead)));
}


x86 assembly (clang, -O0):
<is_number_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    1169 <is_number_start+0x59>
cmpl   $0x2d,-0x4(%rbp)
je     1151 <is_number_start+0x41>
xor    %eax,%eax
cmpl   $0x2b,-0x4(%rbp)
mov    %al,-0xa(%rbp)
jne    1163 <is_number_start+0x53>
mov    -0x8(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_number_start>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    1147 <is_number_start+0x37>
cmp    $0x2d,%ebp
je     1135 <is_number_start+0x25>
xor    %eax,%eax
cmp    $0x2b,%ebp
jne    1147 <is_number_start+0x37>
mov    %ebx,%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @is_number_start(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 = call i64 @isdigit(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %20, label %8
8: ; preds = %2
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 45
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 43
br i1 %13, label %14, label %18
14: ; preds = %11, %8
%15 = load i32, i32* %4
%16 = call i64 @isdigit(i32 %15)
%17 = icmp ne i64 %16, 0
br label %18
18: ; preds = %14, %11
%19 = phi i1 [ false, %11 ], [ %17, %14 ]
br label %20
20: ; preds = %18, %2
%21 = phi i1 [ true, %2 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @is_number_start(i32 %0, i32 %1) {
%3 = tail call i64 @isdigit(i32 %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
switch i32 %0, label %10 [
i32 45, label %6
i32 43, label %6
]
6: ; preds = %5, %5
%7 = tail call i64 @isdigit(i32 %1)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %5, %6, %2
%11 = phi i32 [ 1, %2 ], [ %9, %6 ], [ 0, %5 ]
ret i32 %11
}
int mkstemp(char *template __attribute__((unused))) { return (-1); }


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

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

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

LLVM IR (-O2):
define i32 @mkstemp(i8* nocapture readnone %0) {
ret i32 -1
}
int __s5p_scanf(char *fmt, ...) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__s5p_scanf(i8* nocapture readnone %0, ...) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write_string(char *);
void ipf_end_link(void) { write_string(":elink."); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c":elink.\00"
define void @ipf_end_link() {
%1 = tail call i32 @write_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}