xunge/DecIR huggingface dataset:
int _cmp_long(const void *_a, const void *_b) {
  const long *a = _a, *b = _b;
  if (*a < *b)
    return -1;
  else if (*a > *b)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<_cmp_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jge    113c <_cmp_long+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <_cmp_long+0x63>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jle    115c <_cmp_long+0x5c>
movl   $0x1,-0x4(%rbp)
jmp    1163 <_cmp_long+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cmp_long>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @_cmp_long(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
%8 = icmp sgt i64 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ capacityHS(size_t);
scalar_t__ needRehashHS(size_t, int /*<<< orphan*/);
unsigned neededNBitsHS(size_t nbits, size_t nitems, size_t expected) {
  while (needRehashHS(nitems + expected, capacityHS(nbits)))
    nbits++;
  return nbits;
}


x86 assembly (clang, -O0):
<neededNBitsHS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <capacityHS@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1030 <needRehashHS@plt>
cmp    $0x0,%rax
je     116f <neededNBitsHS+0x4f>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1134 <neededNBitsHS+0x14>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<neededNBitsHS>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
add    %rdx,%r14
nopl   (%rax)
mov    %rbx,%rdi
call   1040 <capacityHS@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <needRehashHS@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1130 <neededNBitsHS+0x10>
add    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @neededNBitsHS(i64 %0, i64 %1, i64 %2) {
%4 = add i64 %2, %1
br label %5
5: ; preds = %5, %3
%6 = phi i64 [ %0, %3 ], [ %10, %5 ]
%7 = tail call i32 @capacityHS(i64 %6)
%8 = tail call i64 @needRehashHS(i64 %4, i32 %7)
%9 = icmp eq i64 %8, 0
%10 = add i64 %6, 1
br i1 %9, label %11, label %5
11: ; preds = %5
%12 = trunc i64 %6 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ debug_puts(char *);
int main() {
  volatile char in_char;
  debug_puts("\n"
             "This program goes into an infinite loop after these messages.\n"
             "When run with the -m XXX option, the simulator should kill us.\n"
             "\n");
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <debug_puts@plt>
jmp    112b <main+0x1b>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <debug_puts@plt>
nopl   (%rax)
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [128 x i8] c"\0AThis program goes into an infinite loop after these messages.\0AWhen run with the -m XXX option, the simulator should kill us.\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @debug_puts(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %0, %4
br label %4
}

LLVM IR (-O2):
@.str = [128 x i8] c"\0AThis program goes into an infinite loop after these messages.\0AWhen run with the -m XXX option, the simulator should kill us.\0A\0A\00"
define i32 @main() {
%1 = tail call i32 @debug_puts(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}
/* Variables and functions */
char *dlerror();
int /*<<< orphan*/ printf(char *, char const *, char *);
int dltest(const char *msg) {
  char *error;
  if ((error = dlerror())) {
    printf("%s: %s\n", msg, error);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<dltest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1161 <dltest+0x41>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1168 <dltest+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dltest>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <dlerror@plt>
test   %rax,%rax
je     114b <dltest+0x2b>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1040 <printf@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
define i32 @dltest(i8* %0) {
%2 = tail call i8* (...) @dlerror()
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int blockAllocated(int *);
int blockMarked(int *);
int length(int *);
int /*<<< orphan*/ printf(char *, int *, int, int, int);
void printblock(int *p) {
  printf("Block: %p \tSize: %d \tAllocated: %d \tMarked: %d\n", p, length(p),
         blockAllocated(p), blockMarked(p));
}


x86 assembly (clang, -O0):
<printblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <length@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <blockAllocated@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <blockMarked@plt>
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    %eax,%r8d
lea    0xe77(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printblock>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <length@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
call   1060 <blockAllocated@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1050 <blockMarked@plt>
lea    0xe98(%rip),%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %ebp,%ecx
mov    %eax,%r8d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"Block: %p \09Size: %d \09Allocated: %d \09Marked: %d\0A\00"
define void @printblock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @length(i32* %4)
%6 = load i32*, i32** %2
%7 = call i32 @blockAllocated(i32* %6)
%8 = load i32*, i32** %2
%9 = call i32 @blockMarked(i32* %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32* %3, i32 %5, i32 %7, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c"Block: %p \09Size: %d \09Allocated: %d \09Marked: %d\0A\00"
define void @printblock(i32* %0) {
%2 = tail call i32 @length(i32* %0)
%3 = tail call i32 @blockAllocated(i32* %0)
%4 = tail call i32 @blockMarked(i32* %0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32* %0, i32 %2, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_track_dobldobl_solution_path(int k, int i, int otp) {
  int b[2], fail;
  double *c;
  b[0] = i;
  b[1] = otp;
  fail = _ada_use_c2phc(467, &k, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_track_dobldobl_solution_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    -0x14(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1d3,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_track_dobldobl_solution_path>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
mov    %esi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    $0x1d3,%edi
call   1030 <_ada_use_c2phc@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @celcon_track_dobldobl_solution_path(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [2 x i32]
%8 = alloca i32
%9 = alloca double*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %5
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
store i32 %10, i32* %11
%12 = load i32, i32* %6
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
store i32 %12, i32* %13
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%15 = load double*, double** %9
%16 = call i32 @_ada_use_c2phc(i32 467, i32* %4, i32* %14, double* %15)
store i32 %16, i32* %8
%17 = load i32, i32* %8
ret i32 %17
}

LLVM IR (-O2):
define i32 @celcon_track_dobldobl_solution_path(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca [2 x i32]
store i32 %0, i32* %4
%6 = bitcast [2 x i32]* %5 to i8*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %1, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %2, i32* %8
%9 = call i32 @_ada_use_c2phc(i32 467, i32* %4, i32* %7, double* undef)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
int /*<<< orphan*/ reverse_memcpy(void *, void *, int);
float bytes_to_single_float(const unsigned char bytes[4], int switch_endian) {
  float dest_num;
  void *dest_ptr = (void *)&dest_num;
  if (switch_endian) {
    reverse_memcpy(dest_ptr, (void *)bytes, 4);
  } else {
    memcpy(dest_ptr, (void *)bytes, 4);
  }
  return dest_num;
}


x86 assembly (clang, -O0):
<bytes_to_single_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1158 <bytes_to_single_float+0x38>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <reverse_memcpy@plt>
jmp    116a <bytes_to_single_float+0x4a>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
movss  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytes_to_single_float>:
push   %rax
mov    %rdi,%rax
lea    0x4(%rsp),%rdi
test   %esi,%esi
je     113c <bytes_to_single_float+0x1c>
mov    %rax,%rsi
mov    $0x4,%edx
call   1030 <reverse_memcpy@plt>
jmp    1149 <bytes_to_single_float+0x29>
mov    %rax,%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define float @bytes_to_single_float(i8* %0, i32 %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
%5 = icmp eq i32 %1, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = call i32 @reverse_memcpy(i8* %4, i8* %0, i32 4)
br label %10
8: ; preds = %2
%9 = call i32 @memcpy(i8* %4, i8* %0, i32 4)
br label %10
10: ; preds = %8, %6
%11 = load float, float* %3
ret float %11
}
float clampf(float v, float min, float max) {
  if (v < min) {
    return min;
  }
  if (v > max) {
    return max;
  }
  return v;
}


x86 assembly (clang, -O0):
<clampf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1135 <clampf+0x35>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <clampf+0x5d>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1153 <clampf+0x53>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <clampf+0x5d>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clampf>:
minss  %xmm0,%xmm2
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm3
andnps %xmm2,%xmm3
andps  %xmm1,%xmm0
orps   %xmm3,%xmm0
ret

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

LLVM IR (-O2):
define float @clampf(float %0, float %1, float %2) {
%4 = fcmp olt float %0, %1
%5 = fcmp ogt float %0, %2
%6 = select i1 %5, float %2, float %0
%7 = select i1 %4, float %1, float %6
ret float %7
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SIGKILL;
scalar_t__ fork();
int /*<<< orphan*/ kill(scalar_t__, int /*<<< orphan*/);
int main() {
  pid_t child;
  child = fork();
  if (child > 0)
    kill(child, SIGKILL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    1157 <main+0x37>
mov    -0x10(%rbp),%rdi
mov    0x2e90(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <fork@plt>
test   %rax,%rax
jle    113e <main+0x1e>
mov    0x2eac(%rip),%rcx
mov    (%rcx),%esi
mov    %rax,%rdi
call   1030 <kill@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGKILL = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i64 (...) @fork()
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = load i64, i64* %2
%8 = load i32, i32* @SIGKILL
%9 = call i32 @kill(i64 %7, i32 %8)
br label %10
10: ; preds = %6, %0
ret i32 0
}

LLVM IR (-O2):
@SIGKILL = global i32 0
define i32 @main() {
%1 = tail call i64 (...) @fork()
%2 = icmp sgt i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @SIGKILL
%5 = tail call i32 @kill(i64 %1, i32 %4)
br label %6
6: ; preds = %3, %0
ret i32 0
}
int test_imm_C0int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xC0 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C0int64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0xc0,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C0int64_highword_mem>:
testb  $0xc0,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_C0int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 192
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_C0int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 824633720832
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void priority_queue_free(struct priority_queue *head) {}


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

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

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

LLVM IR (-O2):
%struct.priority_queue = type opaque
define void @priority_queue_free(%struct.priority_queue* nocapture %0) {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_read_next_solution(int n, int *m, double *sol) {
  int fail;
  fail = _ada_use_c2phc(135, &n, m, sol);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_read_next_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x87,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_read_next_solution>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x87,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @solcon_read_next_solution(i32 %0, i32* %1, double* %2) {
%4 = alloca i32
store i32 %0, i32* %4
%5 = call i32 @_ada_use_c2phc(i32 135, i32* %4, i32* %1, double* %2)
ret i32 %5
}
int __kipc_call(void *iov_base, int iov_len) {
  log_debug(7, "in %s", __FUNCTION__);
  return 0;
}


x86 assembly (clang, -O0):
<__kipc_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x7,%edi
lea    0xed5(%rip),%rsi
lea    0xed4(%rip),%rdx
mov    $0x0,%al
call   1030 <log_debug@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__kipc_call>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xee7(%rip),%rdx
mov    $0x7,%edi
xor    %eax,%eax
call   1030 <log_debug@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"in %s\00"
@__FUNCTION__.__kipc_call = [12 x i8] c"__kipc_call\00"
define i32 @__kipc_call(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @log_debug to i32 (i32, i8*, i8*, ...)*)(i32 7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.__kipc_call, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"in %s\00"
@__FUNCTION__.__kipc_call = [12 x i8] c"__kipc_call\00"
define i32 @__kipc_call(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @log_debug to i32 (i32, i8*, i8*, ...)*)(i32 7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.__kipc_call, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
float __rtl_sin_f32_v1_00(float);
float rtl_sin_f32(float a) { return __rtl_sin_f32_v1_00(a); }


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

x86 assembly (clang, -O2):
<rtl_sin_f32>:
jmp    1030 <__rtl_sin_f32_v1_00@plt>

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

LLVM IR (-O2):
define float @rtl_sin_f32(float %0) {
%2 = tail call float @__rtl_sin_f32_v1_00(float %0)
ret float %2
}
void outer_clean_range(unsigned long start, unsigned long end) {}


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

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

LLVM IR (-O0):
define void @outer_clean_range(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @outer_clean_range(i64 %0, i64 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printUsage(const char *msg) {
  if (msg) {
    printf("ERROR: %s\n", msg);
  }
  printf("Usage: sortidx [OPTIONS] <INDEX>\n\n"
         "Options:\n"
         "-r n      'n' is the sort buffer size (memory) in megabytes\n");
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1139 <printUsage+0x29>
mov    -0x8(%rbp),%rsi
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsage>:
test   %rdi,%rdi
je     113b <printUsage+0x1b>
push   %rax
mov    %rdi,%rsi
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x8,%rsp
lea    0xec9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"ERROR: %s\0A\00"
@.str.1 = [104 x i8] c"Usage: sortidx [OPTIONS] <INDEX>\0A\0AOptions:\0A-r n 'n' is the sort buffer size (memory) in megabytes\0A\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %5, %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"ERROR: %s\0A\00"
@str = [103 x i8] c"Usage: sortidx [OPTIONS] <INDEX>\0A\0AOptions:\0A-r n 'n' is the sort buffer size (memory) in megabytes\00"
define void @printUsage(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([103 x i8], [103 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned length(const char *s) {
  static unsigned char_count = 0;
  if (*s) {
    ++char_count;
    length(s + 1);
  }
  return char_count;
}


x86 assembly (clang, -O0):
<length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <length+0x35>
mov    0x2efd(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ef4(%rip)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1030 <length@plt>
mov    0x2ee1(%rip),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<length>:
push   %rax
cmpb   $0x0,(%rdi)
je     1126 <length+0x16>
addl   $0x1,0x2f0f(%rip)
add    $0x1,%rdi
call   1030 <length@plt>
mov    0x2f00(%rip),%eax
pop    %rcx
ret

LLVM IR (-O0):
@length.char_count = internal global i32 0
define i32 @length(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* @length.char_count
%8 = add i32 %7, 1
store i32 %8, i32* @length.char_count
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = call i32 @length(i8* %10)
br label %12
12: ; preds = %6, %1
%13 = load i32, i32* @length.char_count
ret i32 %13
}

LLVM IR (-O2):
@length.char_count = internal unnamed_addr global i32 0
define i32 @length(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = load i32, i32* @length.char_count
%6 = add i32 %5, 1
store i32 %6, i32* @length.char_count
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = tail call i32 @length(i8* %7)
br label %9
9: ; preds = %4, %1
%10 = load i32, i32* @length.char_count
ret i32 %10
}
void call1d(unsigned long ul, unsigned char uc, unsigned short us,
            unsigned int ui) {
  uc = 5;
  us = 6;
  ui = 7;
  ul = 8;
}


x86 assembly (clang, -O0):
<call1d>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %sil,%dl
mov    %rdi,-0x8(%rbp)
mov    %dl,-0x9(%rbp)
mov    %ax,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movb   $0x5,-0x9(%rbp)
movw   $0x6,-0xc(%rbp)
movl   $0x7,-0x10(%rbp)
movq   $0x8,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @call1d(i64 %0, i8 zeroext %1, i16 zeroext %2, i32 %3) {
%5 = alloca i64
%6 = alloca i8
%7 = alloca i16
%8 = alloca i32
store i64 %0, i64* %5
store i8 %1, i8* %6
store i16 %2, i16* %7
store i32 %3, i32* %8
store i8 5, i8* %6
store i16 6, i16* %7
store i32 7, i32* %8
store i64 8, i64* %5
ret void
}

LLVM IR (-O2):
define void @call1d(i64 %0, i8 zeroext %1, i16 zeroext %2, i32 %3) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_CERTID;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_CERTID_it;
OCSP_CERTID *OCSP_CERTID_new(void) {
  return (OCSP_CERTID *)ASN1_item_new(&OCSP_CERTID_it);
}


x86 assembly (clang, -O0):
<OCSP_CERTID_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OCSP_CERTID_new>:
mov    0x2ee1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@OCSP_CERTID_it = global i32 0
define i32* @OCSP_CERTID_new() {
%1 = call i64 @ASN1_item_new(i32* @OCSP_CERTID_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@OCSP_CERTID_it = global i32 0
define i32* @OCSP_CERTID_new() {
%1 = tail call i64 @ASN1_item_new(i32* @OCSP_CERTID_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Type definitions */
struct Var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pA(char *, char const *, char const *);
void __func_invert_sint(struct Var *avar, const char *areg, const char *lreg,
                        const char *rreg) {
  pA("%s = %s ^ (-1);", areg, lreg);
}


x86 assembly (clang, -O0):
<__func_invert_sint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xec9(%rip),%rdi
call   1030 <pA@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.Var = type { i32 }
@.str = [16 x i8] c"%s = %s ^ (-1);\00"
define void @__func_invert_sint(%struct.Var* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.Var*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.Var* %0, %struct.Var** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = call i32 @pA(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10)
ret void
}

LLVM IR (-O2):
%struct.Var = type { i32 }
@.str = [16 x i8] c"%s = %s ^ (-1);\00"
define void @__func_invert_sint(%struct.Var* nocapture readnone %0, i8* %1, i8* %2, i8* nocapture readnone %3) {
%5 = tail call i32 @pA(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ term_print_decu(long);
int /*<<< orphan*/ term_putchar(char);
void term_print_dec(long x) {
  if (x < 0) {
    term_putchar('-');
    x = -x;
  }
  term_print_decu(x);
}


x86 assembly (clang, -O0):
<term_print_dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    114b <term_print_dec+0x2b>
mov    $0x2d,%edi
call   1040 <term_putchar@plt>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <term_print_decu@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<term_print_dec>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jns    1136 <term_print_dec+0x16>
mov    $0x2d,%edi
call   1040 <term_putchar@plt>
neg    %rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <term_print_decu@plt>

LLVM IR (-O0):
define void @term_print_dec(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = call i32 @term_putchar(i8 signext 45)
%7 = load i64, i64* %2
%8 = sub nsw i64 0, %7
store i64 %8, i64* %2
br label %9
9: ; preds = %5, %1
%10 = load i64, i64* %2
%11 = call i32 @term_print_decu(i64 %10)
ret void
}

LLVM IR (-O2):
define void @term_print_dec(i64 %0) {
%2 = icmp slt i64 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @term_putchar(i8 signext 45)
%5 = sub nsw i64 0, %0
br label %6
6: ; preds = %3, %1
%7 = phi i64 [ %5, %3 ], [ %0, %1 ]
%8 = tail call i32 @term_print_decu(i64 %7)
ret void
}
void pinmux_disable_setting(const struct pinctrl_setting *setting) {}


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

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

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

LLVM IR (-O2):
%struct.pinctrl_setting = type opaque
define void @pinmux_disable_setting(%struct.pinctrl_setting* nocapture %0) {
ret void
}
/* Variables and functions */
size_t strlen(char const *);
int /*<<< orphan*/ strncpy(char *, char const *, size_t const);
char *xbasename(char const *);
char *xmalloc(size_t const);
char *login_arg0(const char *arg0) {
  const char *base = xbasename(arg0);
  const size_t len = strlen(base);
  char *ret = xmalloc(len + 2);
  ret[0] = '-';
  strncpy(ret + 1, base, len + 1);
  return ret;
}


x86 assembly (clang, -O0):
<login_arg0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <xbasename@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x2,%rdi
call   1060 <xmalloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movb   $0x2d,(%rax)
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
add    $0x1,%rdx
call   1030 <strncpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<login_arg0>:
push   %r15
push   %r14
push   %rbx
call   1040 <xbasename@plt>
mov    %rax,%r14
mov    %rax,%rdi
call   1050 <strlen@plt>
mov    %rax,%rbx
lea    0x2(%rax),%rdi
call   1060 <xmalloc@plt>
mov    %rax,%r15
movb   $0x2d,(%rax)
lea    0x1(%rax),%rdi
add    $0x1,%rbx
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <strncpy@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @login_arg0(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i8* @xbasename(i8* %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i64 @strlen(i8* %8)
store i64 %9, i64* %4
%10 = load i64, i64* %4
%11 = add i64 %10, 2
%12 = call i8* @xmalloc(i64 %11)
store i8* %12, i8** %5
%13 = load i8*, i8** %5
%14 = getelementptr inbounds i8, i8* %13, i64 0
store i8 45, i8* %14
%15 = load i8*, i8** %5
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8*, i8** %3
%18 = load i64, i64* %4
%19 = add i64 %18, 1
%20 = call i32 @strncpy(i8* %16, i8* %17, i64 %19)
%21 = load i8*, i8** %5
ret i8* %21
}

LLVM IR (-O2):
define i8* @login_arg0(i8* %0) {
%2 = tail call i8* @xbasename(i8* %0)
%3 = tail call i64 @strlen(i8* dereferenceable(1) %2)
%4 = add i64 %3, 2
%5 = tail call i8* @xmalloc(i64 %4)
store i8 45, i8* %5
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = add i64 %3, 1
%8 = tail call i32 @strncpy(i8* %6, i8* %2, i64 %7)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_eval(int);
void test_17(int i) {
  int j = 42;
  __analyzer_eval(j == 42);
  __analyzer_eval(i == j);
  i = j;
  __analyzer_eval(i == j);
}


x86 assembly (clang, -O0):
<test_17>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x2a,-0x8(%rbp)
cmpl   $0x2a,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_17>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
cmp    $0x2a,%ebx
sete   %dil
call   1030 <__analyzer_eval@plt>
mov    $0x1,%edi
pop    %rbx
jmp    1030 <__analyzer_eval@plt>

LLVM IR (-O0):
define void @test_17(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 42, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 42
%6 = zext i1 %5 to i32
%7 = call i32 @__analyzer_eval(i32 %6)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = icmp eq i32 %8, %9
%11 = zext i1 %10 to i32
%12 = call i32 @__analyzer_eval(i32 %11)
%13 = load i32, i32* %3
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = icmp eq i32 %14, %15
%17 = zext i1 %16 to i32
%18 = call i32 @__analyzer_eval(i32 %17)
ret void
}

LLVM IR (-O2):
define void @test_17(i32 %0) {
%2 = tail call i32 @__analyzer_eval(i32 1)
%3 = icmp eq i32 %0, 42
%4 = zext i1 %3 to i32
%5 = tail call i32 @__analyzer_eval(i32 %4)
%6 = tail call i32 @__analyzer_eval(i32 1)
ret void
}
int flood_greaterequal(float a, int npar, void *par) {
  double thres;
  thres = ((double *)par)[0];
  return (a >= thres);
}


x86 assembly (clang, -O0):
<flood_greaterequal>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flood_greaterequal>:
cvtss2sd %xmm0,%xmm0
xor    %eax,%eax
ucomisd (%rsi),%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @flood_greaterequal(float %0, i32 %1, i8* %2) {
%4 = alloca float
%5 = alloca i32
%6 = alloca i8*
%7 = alloca double
store float %0, float* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to double*
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
store double %11, double* %7
%12 = load float, float* %4
%13 = fpext float %12 to double
%14 = load double, double* %7
%15 = fcmp oge double %13, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @flood_greaterequal(float %0, i32 %1, i8* nocapture %2) {
%4 = bitcast i8* %2 to double*
%5 = load double, double* %4
%6 = fpext float %0 to double
%7 = fcmp ole double %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_tagstruct_free() {
  printf("NOT IMPLEMENTED:"
         "pa_tagstruct_free"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [34 x i8] c"NOT IMPLEMENTED:pa_tagstruct_free\00"
define i32 @pa_tagstruct_free() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int i(int);
int h(int n) { return i(n); }


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

x86 assembly (clang, -O2):
<h>:
jmp    1030 <i@plt>

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

LLVM IR (-O2):
define i32 @h(i32 %0) {
%2 = tail call i32 @i(i32 %0)
ret i32 %2
}
long maximum(long a, long b) {
  if (a > b)
    return a;
  else
    return b;
}


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

x86 assembly (clang, -O2):
<maximum>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @maximum(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__38__IO__set();
void Msp430GpioC__9__HplGeneralIO__set(void) {
  HplMsp430GeneralIOP__38__IO__set();
}


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

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

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

LLVM IR (-O2):
define void @Msp430GpioC__9__HplGeneralIO__set() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__38__IO__set()
ret void
}
/* Variables and functions */
size_t cwk_path_join_and_normalize_multiple(char const **, char *, size_t);
size_t cwk_path_join_multiple(const char **paths, char *buffer,
                              size_t buffer_size) {
  return cwk_path_join_and_normalize_multiple(paths, buffer, buffer_size);
}


x86 assembly (clang, -O0):
<cwk_path_join_multiple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <cwk_path_join_and_normalize_multiple@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cwk_path_join_multiple>:
jmp    1030 <cwk_path_join_and_normalize_multiple@plt>

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

LLVM IR (-O2):
define i64 @cwk_path_join_multiple(i8** %0, i8* %1, i64 %2) {
%4 = tail call i64 @cwk_path_join_and_normalize_multiple(i8** %0, i8* %1, i64 %2)
ret i64 %4
}
/* Type definitions */
typedef int GLint;
typedef int GLenum;

/* Variables and functions */
#define GL_FOG_COLOR 133
#define GL_FOG_DENSITY 132
#define GL_FOG_END 131
#define GL_FOG_INDEX 130
#define GL_FOG_MODE 129
#define GL_FOG_START 128
GLint __glFogiv_size(GLenum pname) {
  switch (pname) {
  case GL_FOG_COLOR:
    return 4;
  case GL_FOG_DENSITY:
    return 1;
  case GL_FOG_END:
    return 1;
  case GL_FOG_MODE:
    return 1;
  case GL_FOG_INDEX:
    return 1;
  case GL_FOG_START:
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<__glFogiv_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5,%eax
ja     1178 <__glFogiv_size+0x78>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x4,-0x4(%rbp)
jmp    117f <__glFogiv_size+0x7f>
movl   $0x1,-0x4(%rbp)
jmp    117f <__glFogiv_size+0x7f>
movl   $0x1,-0x4(%rbp)
jmp    117f <__glFogiv_size+0x7f>
movl   $0x1,-0x4(%rbp)
jmp    117f <__glFogiv_size+0x7f>
movl   $0x1,-0x4(%rbp)
jmp    117f <__glFogiv_size+0x7f>
movl   $0x1,-0x4(%rbp)
jmp    117f <__glFogiv_size+0x7f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__glFogiv_size>:
add    $0xffffff80,%edi
xor    %eax,%eax
cmp    $0x5,%edi
ja     1117 <__glFogiv_size+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @__glFogiv_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %11 [
i32 133, label %5
i32 132, label %6
i32 131, label %7
i32 129, label %8
i32 130, label %9
i32 128, label %10
]
5: ; preds = %1
store i32 4, i32* %2
br label %12
6: ; preds = %1
store i32 1, i32* %2
br label %12
7: ; preds = %1
store i32 1, i32* %2
br label %12
8: ; preds = %1
store i32 1, i32* %2
br label %12
9: ; preds = %1
store i32 1, i32* %2
br label %12
10: ; preds = %1
store i32 1, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %10, %9, %8, %7, %6, %5
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@switch.table.__glFogiv_size = [6 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1, i32 4]
define i32 @__glFogiv_size(i32 %0) {
%2 = add i32 %0, -128
%3 = icmp ult i32 %2, 6
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [6 x i32], [6 x i32]* @switch.table.__glFogiv_size, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
int my_max(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int a, b, m;
  printf("Please input two numbers:\n");
  scanf("%d %d", &a, &b);
  m = my_max(a, b);
  printf("The greater number is %d\n", m);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeac(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1050 <my_max@plt>
lea    0xe92(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Please input two numbers:\0A\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [26 x i8] c"The greater number is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 @my_max(i32 %7, i32 %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [26 x i8] c"The greater number is %d\0A\00"
@str = [26 x i8] c"Please input two numbers:\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @my_max(i32 %7, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}