xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void set_bit(uint32_t *map, unsigned int nr) {
  map[(nr >> 5)] |= (1 << (nr & 31));
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shr    $0x5,%ecx
mov    %ecx,%ecx
or     (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
shr    $0x5,%ecx
or     %eax,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @set_bit(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 31
%7 = shl i32 1, %6
%8 = load i32*, i32** %3
%9 = load i32, i32* %4
%10 = lshr i32 %9, 5
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %8, i64 %11
%13 = load i32, i32* %12
%14 = or i32 %13, %7
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @set_bit(i32* nocapture %0, i32 %1) {
%3 = and i32 %1, 31
%4 = shl nuw i32 1, %3
%5 = lshr i32 %1, 5
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = or i32 %8, %4
store i32 %9, i32* %7
ret void
}
int a(struct x *b) {
  struct x {
    int a;
  } *c = b;
}


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.x = type { i32 }
define i32 @a(%struct.x* nocapture readnone %0) {
ret i32 undef
}
double determine_machine_epsilon() {
  double u, den;
  u = 1.0;
  do {
    u /= 2.0;
    den = 1.0 + u;
  } while (den > 1.0);
  return (10.0 * u);
}


x86 assembly (clang, -O0):
<determine_machine_epsilon>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xed1(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeba(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1111 <determine_machine_epsilon+0x11>
movsd  0xeb8(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<determine_machine_epsilon>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @determine_machine_epsilon() {
%1 = alloca double
%2 = alloca double
store double 1.000000e+00, double* %1
br label %3
3: ; preds = %8, %0
%4 = load double, double* %1
%5 = fdiv double %4, 2.000000e+00
store double %5, double* %1
%6 = load double, double* %1
%7 = fadd double 1.000000e+00, %6
store double %7, double* %2
br label %8
8: ; preds = %3
%9 = load double, double* %2
%10 = fcmp ogt double %9, 1.000000e+00
br i1 %10, label %3, label %11
11: ; preds = %8
%12 = load double, double* %1
%13 = fmul double 1.000000e+01, %12
ret double %13
}

LLVM IR (-O2):
define double @determine_machine_epsilon() {
ret double 0x3CD4000000000000
}
void gtk_notebook_append_page_menu() {}


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

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

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

LLVM IR (-O2):
define void @gtk_notebook_append_page_menu() {
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t read_uint64(unsigned char *source) {
  return ((uint64_t)source[0]) << 56 | ((uint64_t)source[1]) << 48 |
         ((uint64_t)source[2]) << 40 | ((uint64_t)source[3]) << 32 |
         ((uint64_t)source[4]) << 24 | ((uint64_t)source[5]) << 16 |
         ((uint64_t)source[6]) << 8 | ((uint64_t)source[7]);
}


x86 assembly (clang, -O0):
<read_uint64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    $0x38,%ecx
shl    %cl,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%edx
mov    $0x30,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x4(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x5(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x6(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x7(%rcx),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @read_uint64(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 56
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 48
%13 = or i32 %7, %12
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 40
%19 = or i32 %13, %18
%20 = load i8*, i8** %2
%21 = getelementptr inbounds i8, i8* %20, i64 3
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = shl i32 %23, 32
%25 = or i32 %19, %24
%26 = load i8*, i8** %2
%27 = getelementptr inbounds i8, i8* %26, i64 4
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = shl i32 %29, 24
%31 = or i32 %25, %30
%32 = load i8*, i8** %2
%33 = getelementptr inbounds i8, i8* %32, i64 5
%34 = load i8, i8* %33
%35 = zext i8 %34 to i32
%36 = shl i32 %35, 16
%37 = or i32 %31, %36
%38 = load i8*, i8** %2
%39 = getelementptr inbounds i8, i8* %38, i64 6
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = shl i32 %41, 8
%43 = or i32 %37, %42
%44 = load i8*, i8** %2
%45 = getelementptr inbounds i8, i8* %44, i64 7
%46 = load i8, i8* %45
%47 = zext i8 %46 to i32
%48 = or i32 %43, %47
ret i32 %48
}

LLVM IR (-O2):
define i32 @read_uint64(i8* nocapture readnone %0) {
ret i32 poison
}
int sample_fun(int x, int y) {
  int temp = x - y;
  int temp2 = x + y;
  return temp * temp2;
}


x86 assembly (clang, -O0):
<sample_fun>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sample_fun>:
lea    (%rsi,%rdi,1),%eax
mov    %edi,%ecx
sub    %esi,%ecx
imul   %ecx,%eax
ret

LLVM IR (-O0):
define i32 @sample_fun(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = sub nsw i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = add nsw i32 %10, %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = mul nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @sample_fun(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = add nsw i32 %1, %0
%5 = mul nsw i32 %3, %4
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef void const *b;
typedef void *a;

/* Variables and functions */
int /*<<< orphan*/ cpy2(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int cpy8(void *, void const *);
void cpy10(void *a, const void *b) {
  cpy8(a, b), cpy2((uint8_t *)a + 8, (uint8_t *)b + 8);
}


x86 assembly (clang, -O0):
<cpy10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <cpy8@plt>
mov    -0x8(%rbp),%rdi
add    $0x20,%rdi
mov    -0x10(%rbp),%rsi
add    $0x20,%rsi
call   1040 <cpy2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpy10>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <cpy8@plt>
add    $0x20,%rbx
add    $0x20,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <cpy2@plt>

LLVM IR (-O0):
define void @cpy10(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 i32 @cpy8(i8* %5, i8* %6)
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
%10 = getelementptr inbounds i32, i32* %9, i64 8
%11 = load i8*, i8** %4
%12 = bitcast i8* %11 to i32*
%13 = getelementptr inbounds i32, i32* %12, i64 8
%14 = call i32 @cpy2(i32* %10, i32* %13)
ret void
}

LLVM IR (-O2):
define void @cpy10(i8* %0, i8* %1) {
%3 = tail call i32 @cpy8(i8* %0, i8* %1)
%4 = getelementptr inbounds i8, i8* %0, i64 32
%5 = bitcast i8* %4 to i32*
%6 = getelementptr inbounds i8, i8* %1, i64 32
%7 = bitcast i8* %6 to i32*
%8 = tail call i32 @cpy2(i32* %5, i32* %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void usage(char *argv[]) {
  printf("Usage: %s -f <trace file> [-d -t]\n", argv[0]);
  printf("\t-d : turn on debugging output\n");
  printf("\t-t : touch allocated memory\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    (%rdi),%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
lea    0xeed(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Usage: %s -f <trace file> [-d -t]\0A\00"
@.str.1 = [32 x i8] c"\09-d : turn on debugging output\0A\00"
@.str.2 = [30 x i8] c"\09-t : touch allocated memory\0A\00"
define void @usage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [35 x i8] c"Usage: %s -f <trace file> [-d -t]\0A\00"
@str = [31 x i8] c"\09-d : turn on debugging output\00"
@str.3 = [29 x i8] c"\09-t : touch allocated memory\00"
define void @usage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.3, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void junk_junk__() { printf("and __\n"); }


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

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

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

LLVM IR (-O2):
@str = [7 x i8] c"and __\00"
define void @junk_junk__() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret void
}
int main(void) {
  float c[2] = {1.1, 2.2};
  (1 || 2.0 ? c[0] : 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0xeee(%rip),%rax
mov    %rax,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.c = [2 x float] [float 0x3FF19999A0000000, float 0x40019999A0000000]
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x float]
store i32 0, i32* %1
%3 = bitcast [2 x float]* %2 to i8*
%4 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
%5 = load float, float* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
scalar_t__ isinf(float);
__attribute__((__visibility__("hidden"))) float __math_check_oflowf(float y) {
  return isinf(y) ? (y) : y;
}


x86 assembly (clang, -O0):
<__math_check_oflowf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <isinf@plt>
cmp    $0x0,%rax
je     1140 <__math_check_oflowf+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    114a <__math_check_oflowf+0x3a>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__math_check_oflowf>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1030 <isinf@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define hidden float @__math_check_oflowf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @isinf(float %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load float, float* %2
br label %10
8: ; preds = %1
%9 = load float, float* %2
br label %10
10: ; preds = %8, %6
%11 = phi float [ %7, %6 ], [ %9, %8 ]
ret float %11
}

LLVM IR (-O2):
define hidden float @__math_check_oflowf(float returned %0) {
%2 = tail call i64 @isinf(float %0)
ret float %0
}
indreg0imm1_set(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{ (*p0) = 33; }


x86 assembly (clang, -O0):
<indreg0imm1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movl   $0x21,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indreg0imm1_set>:
movl   $0x21,(%r8)
ret

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

LLVM IR (-O2):
define i32 @indreg0imm1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture writeonly %4, i32* nocapture readnone %5) {
store i32 33, i32* %4
ret i32 undef
}
void aica_stop(int ch) {
  (*((volatile unsigned long *)(((volatile unsigned char *)0x00800000) +
                                (0x80 * (ch) + (0))))) =
      ((*((volatile unsigned long *)(((volatile unsigned char *)0x00800000) +
                                     (0x80 * (ch) + (0))))) &
       ~0x4000) |
      0x8000;
}


x86 assembly (clang, -O0):
<aica_stop>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x7,%eax
add    $0x0,%eax
movslq %eax,%rcx
mov    $0x800000,%eax
mov    (%rax,%rcx,1),%rdx
and    $0xffffffffffffbfff,%rdx
or     $0x8000,%rdx
mov    -0x4(%rbp),%eax
shl    $0x7,%eax
add    $0x0,%eax
movslq %eax,%rcx
mov    $0x800000,%eax
mov    %rdx,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<aica_stop>:
movslq %edi,%rax
shl    $0x7,%rax
mov    $0xffffffffffff3fff,%rcx
and    0x800000(%rax),%rcx
or     $0x8000,%rcx
mov    %rcx,0x800000(%rax)
ret

LLVM IR (-O0):
define void @aica_stop(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 128, %3
%5 = add nsw i32 %4, 0
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %6
%8 = bitcast i8* %7 to i64*
%9 = load volatile i64, i64* %8
%10 = and i64 %9, -16385
%11 = or i64 %10, 32768
%12 = load i32, i32* %2
%13 = mul nsw i32 128, %12
%14 = add nsw i32 %13, 0
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %15
%17 = bitcast i8* %16 to i64*
store volatile i64 %11, i64* %17
ret void
}

LLVM IR (-O2):
define void @aica_stop(i32 %0) {
%2 = shl nsw i32 %0, 7
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %3
%5 = bitcast i8* %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, -49153
%8 = or i64 %7, 32768
store volatile i64 %8, i64* %5
ret void
}
void nfsd4_return_all_file_layouts(struct nfs4_client *clp,
                                   struct nfs4_file *fp) {}


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

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

LLVM IR (-O0):
%struct.nfs4_client = type opaque
%struct.nfs4_file = type opaque
define void @nfsd4_return_all_file_layouts(%struct.nfs4_client* %0, %struct.nfs4_file* %1) {
%3 = alloca %struct.nfs4_client*
%4 = alloca %struct.nfs4_file*
store %struct.nfs4_client* %0, %struct.nfs4_client** %3
store %struct.nfs4_file* %1, %struct.nfs4_file** %4
ret void
}

LLVM IR (-O2):
%struct.nfs4_client = type opaque
%struct.nfs4_file = type opaque
define void @nfsd4_return_all_file_layouts(%struct.nfs4_client* nocapture %0, %struct.nfs4_file* nocapture %1) {
ret void
}
int test_imm_D3int32_reg(int val) { return ((val) & (0xD3 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_D3int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xd3,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D3int32_reg>:
test   $0xd3,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_D3int32_reg(i32 %0) {
%2 = and i32 %0, 211
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
float volume(float);
int main(int argc, char const *argv[]) {
  float raio, volume1;
  printf("Insira o valor do raio: \n");
  scanf("%f", &raio);
  volume1 = volume(raio);
  printf("O volume da esfera eh %.2f: \n", volume1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
movss  -0x14(%rbp),%xmm0
call   1030 <volume@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe9a(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
lea    0xeac(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
movss  0x4(%rsp),%xmm0
call   1040 <volume@plt>
cvtss2sd %xmm0,%xmm0
lea    0xe8f(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Insira o valor do raio: \0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [30 x i8] c"O volume da esfera eh %.2f: \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %6)
%10 = load float, float* %6
%11 = call float @volume(float %10)
store float %11, float* %7
%12 = load float, float* %7
%13 = fpext float %12 to double
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), double %13)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [30 x i8] c"O volume da esfera eh %.2f: \0A\00"
@str = [25 x i8] c"Insira o valor do raio: \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%7 = load float, float* %3
%8 = call float @volume(float %7)
%9 = fpext float %8 to double
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), double %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, unsigned int);
void f2(int size) {
  char src[10];
  memset(src, 0, (unsigned)size);
}


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

x86 assembly (clang, -O2):
<f2>:
sub    $0x18,%rsp
mov    %edi,%edx
lea    0xe(%rsp),%rdi
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @f2(i32 %0) {
%2 = alloca i32
%3 = alloca [10 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @memset(i8* %4, i32 0, i32 %5)
ret void
}

LLVM IR (-O2):
define void @f2(i32 %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = call i32 @memset(i8* %3, i32 0, i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *copy_string(const char *str) {
  char *res = (char *)malloc(strlen(str) + 1);
  strcpy(res, str);
  return res;
}


x86 assembly (clang, -O0):
<copy_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @copy_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = load i8*, i8** %2
%11 = call i32 @strcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @copy_string(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
double gofx(x)
double x;
{ return x; }


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

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

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

LLVM IR (-O2):
define double @gofx(double returned %0) {
ret double %0
}
/* Type definitions */
typedef int /*<<< orphan*/ u_long;
typedef int /*<<< orphan*/ u_char;

/* Variables and functions */
int /*<<< orphan*/ NS_PUT32(int /*<<< orphan*/, int /*<<< orphan*/ *);
void ns_put32(u_long src, u_char *dst) { NS_PUT32(src, dst); }


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

x86 assembly (clang, -O2):
<ns_put32>:
jmp    1030 <NS_PUT32@plt>

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

LLVM IR (-O2):
define void @ns_put32(i32 %0, i32* %1) {
%3 = tail call i32 @NS_PUT32(i32 %0, i32* %1)
ret void
}
/* Type definitions */
struct gsw_mt753x {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mt753x_apply_vlan_config(struct gsw_mt753x *);
int mt753x_swconfig_init(struct gsw_mt753x *gsw) {
  mt753x_apply_vlan_config(gsw);
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.gsw_mt753x = type { i32 }
define i32 @mt753x_swconfig_init(%struct.gsw_mt753x* %0) {
%2 = tail call i32 @mt753x_apply_vlan_config(%struct.gsw_mt753x* %0)
ret i32 0
}
/* Variables and functions */
scalar_t__ sqrt(double);
float my_sqrtf(float n) { return (float)sqrt((double)n); }


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

x86 assembly (clang, -O2):
<my_sqrtf>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @my_sqrtf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @sqrt(double %4)
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @my_sqrtf(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @sqrt(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ BitTest_instr(int);
void RES(void) { BitTest_instr(128); }


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

x86 assembly (clang, -O2):
<RES>:
mov    $0x80,%edi
jmp    1030 <BitTest_instr@plt>

LLVM IR (-O0):
define void @RES() {
%1 = call i32 @BitTest_instr(i32 128)
ret void
}

LLVM IR (-O2):
define void @RES() {
%1 = tail call i32 @BitTest_instr(i32 128)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *name) {
  fprintf(stderr, "usage: %s bucket-size\n[add | rm] str\n", name);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"usage: %s bucket-size\0A[add | rm] str\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"usage: %s bucket-size\0A[add | rm] str\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int gcd(int x, int y) {
  int r;
  while (y != 0) {
    r = x % y;
    x = y;
    y = r;
  }
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = srem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %6, %4 ]
ret i32 %10
}
int div(int numerator, int denominator) { return numerator / denominator; }


x86 assembly (clang, -O0):
<div>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<div>:
mov    %edi,%eax
cltd
idiv   %esi
ret

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

LLVM IR (-O2):
define i32 @div(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ make_manual(int);
void latex_manual_() { make_manual(2); }


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

x86 assembly (clang, -O2):
<latex_manual_>:
mov    $0x2,%edi
jmp    1030 <make_manual@plt>

LLVM IR (-O0):
define void @latex_manual_() {
%1 = call i32 @make_manual(i32 2)
ret void
}

LLVM IR (-O2):
define void @latex_manual_() {
%1 = tail call i32 @make_manual(i32 2)
ret void
}
unsigned long __VERIFIER_nondet_ulong() {
  unsigned long val;
  return val;
}


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

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

LLVM IR (-O0):
define i64 @__VERIFIER_nondet_ulong() {
%1 = alloca i64
%2 = load i64, i64* %1
ret i64 %2
}

LLVM IR (-O2):
define i64 @__VERIFIER_nondet_ulong() {
ret i64 undef
}
void INT_Excep_SRC_IDEI(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SRC_IDEI() {
ret void
}
/* Variables and functions */
int supcon_lenp(unsigned int);
int supcon_lenx(unsigned int p) { return (supcon_lenp(p)); }


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

x86 assembly (clang, -O2):
<supcon_lenx>:
jmp    1030 <supcon_lenp@plt>

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

LLVM IR (-O2):
define i32 @supcon_lenx(i32 %0) {
%2 = tail call i32 @supcon_lenp(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef char wint_t;

/* Variables and functions */
int iswdigit(wint_t wc) { return (wc >= '0' && wc <= '9'); }


x86 assembly (clang, -O0):
<iswdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <iswdigit+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswdigit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @iswdigit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @iswdigit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
long GPUshutdown();
long ZN_GPUshutdown() { return GPUshutdown(); }


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

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

LLVM IR (-O0):
define i64 @ZN_GPUshutdown() {
%1 = call i64 (...) @GPUshutdown()
ret i64 %1
}

LLVM IR (-O2):
define i64 @ZN_GPUshutdown() {
%1 = tail call i64 (...) @GPUshutdown()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int /*<<< orphan*/ warning(char *, char const *, int /*<<< orphan*/);
void ewarning(const char *string) {
  warning("%s: %s", string, strerror(errno));
}


x86 assembly (clang, -O0):
<ewarning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
lea    0xeb1(%rip),%rdi
call   1030 <warning@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ewarning>:
push   %rbx
mov    %rdi,%rbx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <warning@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"%s: %s\00"
@errno = global i32 0
define void @ewarning(i8* %0) {
%2 = load i32, i32* @errno
%3 = tail call i32 @strerror(i32 %2)
%4 = tail call i32 @warning(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void closelog(FILE *fp) {
  time_t t = time(NULL);
  if (fp) {
    fprintf(fp, "Closed %s", ctime(&t));
    fclose(fp);
  }
}


x86 assembly (clang, -O0):
<closelog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1190 <closelog+0x50>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <ctime@plt>
mov    -0x18(%rbp),%rdi
mov    %rax,%rdx
lea    0xe7e(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closelog>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,0xc(%rsp)
test   %rbx,%rbx
je     117c <closelog+0x3c>
lea    0xc(%rsp),%rdi
call   1040 <ctime@plt>
lea    0xe97(%rip),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
call   1050 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"Closed %s\00"
define void @closelog(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @time(i32* null)
store i32 %4, i32* %2
%5 = icmp eq i32* %0, null
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = call i8* @ctime(i32* %2)
%8 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = call i32 @fclose(i32* %0)
br label %10
10: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main(void) {
  char *p;
  char c = *p;
  printf("\n [%c]\n", c);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"\0A [%c]\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 signext undef)
ret i32 0
}
/* Variables and functions */
char const *termname();
const char *wrap_termname(void) { return termname(); }


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

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

LLVM IR (-O0):
define i8* @wrap_termname() {
%1 = call i8* (...) @termname()
ret i8* %1
}

LLVM IR (-O2):
define i8* @wrap_termname() {
%1 = tail call i8* (...) @termname()
ret i8* %1
}
void doStuff_variadic(const int *u, ...) {}


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

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

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

LLVM IR (-O2):
define void @doStuff_variadic(i32* nocapture %0, ...) {
ret void
}
int compare_double(const void *d1, const void *d2) {
  double v_d1 = *((double *)d1);
  double v_d2 = *((double *)d2);
  if (v_d1 < v_d2)
    return -1;
  else if (v_d1 > v_d2)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<compare_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1146 <compare_double+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <compare_double+0x69>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1162 <compare_double+0x62>
movl   $0x1,-0x4(%rbp)
jmp    1169 <compare_double+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_double>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_double(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp olt double %4, %6
%8 = fcmp ogt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ do_dcs(char *, char);
int /*<<< orphan*/ padding(int);
int tst_cleanup(const char *the_title) {
  do_dcs("1;1;2%c @", '{');
  padding(20);
  return 0;
}


x86 assembly (clang, -O0):
<tst_cleanup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x7b,%esi
call   1040 <do_dcs@plt>
mov    $0x14,%edi
call   1030 <padding@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tst_cleanup>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x7b,%esi
call   1040 <do_dcs@plt>
mov    $0x14,%edi
call   1030 <padding@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"1;1;2%c @\00"
define i32 @tst_cleanup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @do_dcs(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext 123)
%4 = call i32 @padding(i32 20)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"1;1;2%c @\00"
define i32 @tst_cleanup(i8* nocapture readnone %0) {
%2 = tail call i32 @do_dcs(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext 123)
%3 = tail call i32 @padding(i32 20)
ret i32 0
}
void roadmap_native_keyboard_hide(void) {}


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

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

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

LLVM IR (-O2):
define void @roadmap_native_keyboard_hide() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Pop();
int /*<<< orphan*/ Push(int);
int CmdNegateLogical(void) {
  Push(!Pop());
  return 0;
}


x86 assembly (clang, -O0):
<CmdNegateLogical>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Pop@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <Push@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdNegateLogical>:
push   %rax
xor    %eax,%eax
call   1030 <Pop@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <Push@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @CmdNegateLogical() {
%1 = call i32 (...) @Pop()
%2 = icmp ne i32 %1, 0
%3 = xor i1 %2, true
%4 = zext i1 %3 to i32
%5 = call i32 @Push(i32 %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @CmdNegateLogical() {
%1 = tail call i32 (...) @Pop()
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Push(i32 %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;

/* Variables and functions */
int /*<<< orphan*/ __put_unaligned_le32(int /*<<< orphan*/, void *);
void put_unaligned_le32(u_int32_t val, void *p) {
  __put_unaligned_le32(val, p);
}


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

x86 assembly (clang, -O2):
<put_unaligned_le32>:
jmp    1030 <__put_unaligned_le32@plt>

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

LLVM IR (-O2):
define void @put_unaligned_le32(i32 %0, i8* %1) {
%3 = tail call i32 @__put_unaligned_le32(i32 %0, i8* %1)
ret void
}
void g_cclosure_marshal_VOID__UCHAR() {}


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

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

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

LLVM IR (-O2):
define void @g_cclosure_marshal_VOID__UCHAR() {
ret void
}