xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ g(int);
int f(int a) {
  if (1 && g(a))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <g@plt>
cmp    $0x0,%rax
je     1139 <f+0x29>
movl   $0x1,-0x4(%rbp)
jmp    1140 <f+0x30>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
call   1030 <g@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @g(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = tail call i64 @g(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float, float, float);
void printIntel(__m128 var) {
  printf("{%f, %f, %f, %f}\n", *((float *)(&var) + 0), *((float *)(&var) + 1),
         *((float *)(&var) + 2), *((float *)(&var) + 3));
}


x86 assembly (clang, -O0):
<printIntel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0x0(%rbp),%xmm1
movss  0x4(%rbp),%xmm2
movss  0x8(%rbp),%xmm3
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printIntel>:
movd   %edi,%xmm0
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"{%f, %f, %f, %f}\0A\00"
define void @printIntel(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = bitcast i32* %2 to float*
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
%6 = bitcast i32* %2 to float*
%7 = getelementptr inbounds float, float* %6, i64 1
%8 = load float, float* %7
%9 = bitcast i32* %2 to float*
%10 = getelementptr inbounds float, float* %9, i64 2
%11 = load float, float* %10
%12 = bitcast i32* %2 to float*
%13 = getelementptr inbounds float, float* %12, i64 3
%14 = load float, float* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), float %5, float %8, float %11, float %14)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"{%f, %f, %f, %f}\0A\00"
define void @printIntel(i32 %0) {
%2 = bitcast i32 %0 to float
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), float %2, float poison, float poison, float poison)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t swab32(uint32_t v) {
  return ((((v) << 24) & 0xff000000u) | (((v) << 8) & 0x00ff0000u) |
          (((v) >> 8) & 0x0000ff00u) | (((v) >> 24) & 0x000000ffu));
}


x86 assembly (clang, -O0):
<swab32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x18,%eax
and    $0xff000000,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swab32>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @swab32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
%5 = and i32 %4, -16777216
%6 = load i32, i32* %2
%7 = shl i32 %6, 8
%8 = and i32 %7, 16711680
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = ashr i32 %10, 8
%12 = and i32 %11, 65280
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = ashr i32 %14, 24
%16 = and i32 %15, 255
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @swab32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
void *malloc(size_t);
int /*<<< orphan*/ memcpy(void *, void *, size_t);
int /*<<< orphan*/ printf(char *);
void *kmemdup(void *src, size_t len, int flags) {
  void *dst;
  if ((dst = malloc(len)) == NULL) {
    printf("kcalloc failing!\n");
    fflush(0);
    exit(-1);
  }
  memcpy(dst, src, len);
  return dst;
}


x86 assembly (clang, -O0):
<kmemdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1197 <kmemdup+0x47>
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1060 <fflush@plt>
mov    $0xffffffff,%edi
call   1070 <exit@plt>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmemdup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rsi,%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     1182 <kmemdup+0x32>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xe77(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <fflush@plt>
mov    $0xffffffff,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"kcalloc failing!\0A\00"
define i8* @kmemdup(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%8 = load i64, i64* %5
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %7
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %3
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @fflush(i32 0)
%14 = call i32 @exit(i32 -1)
unreachable
15: ; preds = %3
%16 = load i8*, i8** %7
%17 = load i8*, i8** %4
%18 = load i64, i64* %5
%19 = call i32 @memcpy(i8* %16, i8* %17, i64 %18)
%20 = load i8*, i8** %7
ret i8* %20
}

LLVM IR (-O2):
@str = [17 x i8] c"kcalloc failing!\00"
define i8* @kmemdup(i8* %0, i64 %1, i32 %2) {
%4 = tail call i8* @malloc(i64 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @fflush(i32 0)
%9 = tail call i32 @exit(i32 -1)
unreachable
10: ; preds = %3
%11 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %1)
ret i8* %4
}
double dde_atan_rn(double x) { return 0; }


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

x86 assembly (clang, -O2):
<dde_atan_rn>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @dde_atan_rn(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @dde_atan_rn(double %0) {
ret double 0.000000e+00
}
void mumps_metis_idxsize(int *metis_int_size) { *metis_int_size = -99999; }


x86 assembly (clang, -O0):
<mumps_metis_idxsize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xfffe7961,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mumps_metis_idxsize>:
movl   $0xfffe7961,(%rdi)
ret

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

LLVM IR (-O2):
define void @mumps_metis_idxsize(i32* nocapture writeonly %0) {
store i32 -99999, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int a = 1;
  if (*(char *)&a == 1)
    printf("little endian\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"little endian\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int char_in_array(char c, const char a[], size_t size) {
  unsigned int i = 0;
  while (i < size) {
    if (c == a[i]) {
      return i;
    }
    ++i;
  }
  return -1;
}


x86 assembly (clang, -O0):
<char_in_array>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%rax
jae    1156 <char_in_array+0x56>
movsbl -0x5(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    -0x1c(%rbp),%edx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    1148 <char_in_array+0x48>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115d <char_in_array+0x5d>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1119 <char_in_array+0x19>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_in_array>:
mov    $0xffffffff,%eax
test   %rdx,%rdx
je     111e <char_in_array+0x1e>
xor    %ecx,%ecx
nopl   0x0(%rax)
cmp    %dil,(%rsi,%rcx,1)
je     111f <char_in_array+0x1f>
add    $0x1,%ecx
cmp    %rdx,%rcx
jb     1110 <char_in_array+0x10>
ret
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @char_in_array(i8 signext %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store i8 %0, i8* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 0, i32* %8
br label %9
9: ; preds = %26, %3
%10 = load i32, i32* %8
%11 = zext i32 %10 to i64
%12 = load i64, i64* %7
%13 = icmp ult i64 %11, %12
br i1 %13, label %14, label %29
14: ; preds = %9
%15 = load i8, i8* %5
%16 = sext i8 %15 to i32
%17 = load i8*, i8** %6
%18 = load i32, i32* %8
%19 = zext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %16, %22
br i1 %23, label %24, label %26
24: ; preds = %14
%25 = load i32, i32* %8
store i32 %25, i32* %4
br label %30
26: ; preds = %14
%27 = load i32, i32* %8
%28 = add i32 %27, 1
store i32 %28, i32* %8
br label %9
29: ; preds = %9
store i32 -1, i32* %4
br label %30
30: ; preds = %29, %24
%31 = load i32, i32* %4
ret i32 %31
}

LLVM IR (-O2):
define i32 @char_in_array(i8 signext %0, i8* nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %16, label %5
5: ; preds = %3, %10
%6 = phi i64 [ %12, %10 ], [ 0, %3 ]
%7 = getelementptr inbounds i8, i8* %1, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, %0
br i1 %9, label %14, label %10
10: ; preds = %5
%11 = add nuw nsw i64 %6, 1
%12 = and i64 %11, 4294967295
%13 = icmp ult i64 %12, %2
br i1 %13, label %5, label %16
14: ; preds = %5
%15 = trunc i64 %6 to i32
br label %16
16: ; preds = %10, %14, %3
%17 = phi i32 [ -1, %3 ], [ %15, %14 ], [ -1, %10 ]
ret i32 %17
}
/* Type definitions */
struct obus_server {
  int dummy;
};
struct obus_object {
  int dummy;
};
struct net_interface {
  int dummy;
};

/* Variables and functions */
int obus_server_unregister_object(struct obus_server *, struct obus_object *);
int net_interface_unregister(struct obus_server *server,
                             struct net_interface *object) {
  struct obus_object *obj = (struct obus_object *)object;
  return obus_server_unregister_object(server, obj);
}


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

x86 assembly (clang, -O2):
<net_interface_unregister>:
jmp    1030 <obus_server_unregister_object@plt>

LLVM IR (-O0):
%struct.obus_server = type { i32 }
%struct.net_interface = type { i32 }
%struct.obus_object = type { i32 }
define i32 @net_interface_unregister(%struct.obus_server* %0, %struct.net_interface* %1) {
%3 = alloca %struct.obus_server*
%4 = alloca %struct.net_interface*
%5 = alloca %struct.obus_object*
store %struct.obus_server* %0, %struct.obus_server** %3
store %struct.net_interface* %1, %struct.net_interface** %4
%6 = load %struct.net_interface*, %struct.net_interface** %4
%7 = bitcast %struct.net_interface* %6 to %struct.obus_object*
store %struct.obus_object* %7, %struct.obus_object** %5
%8 = load %struct.obus_server*, %struct.obus_server** %3
%9 = load %struct.obus_object*, %struct.obus_object** %5
%10 = call i32 @obus_server_unregister_object(%struct.obus_server* %8, %struct.obus_object* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.obus_server = type { i32 }
%struct.net_interface = type { i32 }
%struct.obus_object = type { i32 }
define i32 @net_interface_unregister(%struct.obus_server* %0, %struct.net_interface* %1) {
%3 = bitcast %struct.net_interface* %1 to %struct.obus_object*
%4 = tail call i32 @obus_server_unregister_object(%struct.obus_server* %0, %struct.obus_object* %3)
ret i32 %4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
void fromuint64(uint64_t v, int *fd, int *id) {
  *fd = (int)(v >> 32);
  *id = (int)(v & 0xffffffff);
}


x86 assembly (clang, -O0):
<fromuint64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
and    $0xffffffff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fromuint64>:
mov    %edi,(%rdx)
ret

LLVM IR (-O0):
define void @fromuint64(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = ashr i32 %7, 32
%9 = load i32*, i32** %5
store i32 %8, i32* %9
%10 = load i32, i32* %4
%11 = and i32 %10, -1
%12 = load i32*, i32** %6
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @fromuint64(i32 %0, i32* nocapture readnone %1, i32* nocapture writeonly %2) {
store i32 %0, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
int main() {
  printf("Running ps with system\n");
  system("ps -eaf &");
  printf("Done.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
call   1030 <system@plt>
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
call   1040 <system@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Running ps with system\0A\00"
@.str.1 = [10 x i8] c"ps -eaf &\00"
@.str.2 = [7 x i8] c"Done.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"ps -eaf &\00"
@str = [23 x i8] c"Running ps with system\00"
@str.3 = [6 x i8] c"Done.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ file1();
int /*<<< orphan*/ file2();
int /*<<< orphan*/ file3();
int /*<<< orphan*/ file4();
int /*<<< orphan*/ file5();
int /*<<< orphan*/ printf(char *);
int main(void) {
  file1();
  file2();
  file3();
  file4();
  file5();
  printf("All Functions Executed\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <file1@plt>
mov    $0x0,%al
call   1030 <file2@plt>
mov    $0x0,%al
call   1060 <file3@plt>
mov    $0x0,%al
call   1040 <file4@plt>
mov    $0x0,%al
call   1080 <file5@plt>
lea    0xe67(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <file1@plt>
xor    %eax,%eax
call   1040 <file2@plt>
xor    %eax,%eax
call   1060 <file3@plt>
xor    %eax,%eax
call   1050 <file4@plt>
xor    %eax,%eax
call   1080 <file5@plt>
lea    0xe75(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"All Functions Executed\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @file1()
%3 = call i32 (...) @file2()
%4 = call i32 (...) @file3()
%5 = call i32 (...) @file4()
%6 = call i32 (...) @file5()
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [23 x i8] c"All Functions Executed\00"
define i32 @main() {
%1 = tail call i32 (...) @file1()
%2 = tail call i32 (...) @file2()
%3 = tail call i32 (...) @file3()
%4 = tail call i32 (...) @file4()
%5 = tail call i32 (...) @file5()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int main() {
  const int a = 4;
  const struct A {
    int a;
    int b;
  } X;
  struct B {
    const int a;
    int b;
  } Y;
  Y.b = 4;
}


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

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

LLVM IR (-O0):
%struct.A = type { i32, i32 }
%struct.B = type { i32, i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.A
%3 = alloca %struct.B
store i32 4, i32* %1
%4 = getelementptr inbounds %struct.B, %struct.B* %3, i32 0, i32 1
store i32 4, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.A = type { i32, i32 }
define i32 @main() {
ret i32 0
}
/* Type definitions */
struct dentry {
  int dummy;
};
struct au_nhash {
  int dummy;
};

/* Variables and functions */
int au_test_empty(struct dentry *, struct au_nhash *);
int may_rename_dstdir(struct dentry *dentry, struct au_nhash *whlist) {
  return au_test_empty(dentry, whlist);
}


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

x86 assembly (clang, -O2):
<may_rename_dstdir>:
jmp    1030 <au_test_empty@plt>

LLVM IR (-O0):
%struct.dentry = type { i32 }
%struct.au_nhash = type { i32 }
define i32 @may_rename_dstdir(%struct.dentry* %0, %struct.au_nhash* %1) {
%3 = alloca %struct.dentry*
%4 = alloca %struct.au_nhash*
store %struct.dentry* %0, %struct.dentry** %3
store %struct.au_nhash* %1, %struct.au_nhash** %4
%5 = load %struct.dentry*, %struct.dentry** %3
%6 = load %struct.au_nhash*, %struct.au_nhash** %4
%7 = call i32 @au_test_empty(%struct.dentry* %5, %struct.au_nhash* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.dentry = type { i32 }
%struct.au_nhash = type { i32 }
define i32 @may_rename_dstdir(%struct.dentry* %0, %struct.au_nhash* %1) {
%3 = tail call i32 @au_test_empty(%struct.dentry* %0, %struct.au_nhash* %1)
ret i32 %3
}
double sqrt8(const double fg) {
  double n = fg / 2.0;
  double lstX = 0.0;
  while (n != lstX) {
    lstX = n;
    n = (n + fg / n) / 2.0;
  }
  return n;
}


x86 assembly (clang, -O0):
<sqrt8>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jne    1142 <sqrt8+0x42>
jp     1142 <sqrt8+0x42>
jmp    1175 <sqrt8+0x75>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
divsd  -0x10(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe99(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1127 <sqrt8+0x27>
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrt8>:
movsd  0xef8(%rip),%xmm2
mulsd  %xmm0,%xmm2
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm2
jne    1118 <sqrt8+0x18>
jnp    1141 <sqrt8+0x41>
movsd  0xee0(%rip),%xmm3
movapd %xmm0,%xmm1
divsd  %xmm2,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm3,%xmm1
ucomisd %xmm2,%xmm1
movapd %xmm1,%xmm2
jne    1120 <sqrt8+0x20>
jp     1120 <sqrt8+0x20>
movapd %xmm1,%xmm0
ret
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @sqrt8(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = fdiv double %5, 2.000000e+00
store double %6, double* %3
store double 0.000000e+00, double* %4
br label %7
7: ; preds = %11, %1
%8 = load double, double* %3
%9 = load double, double* %4
%10 = fcmp une double %8, %9
br i1 %10, label %11, label %19
11: ; preds = %7
%12 = load double, double* %3
store double %12, double* %4
%13 = load double, double* %3
%14 = load double, double* %2
%15 = load double, double* %3
%16 = fdiv double %14, %15
%17 = fadd double %13, %16
%18 = fdiv double %17, 2.000000e+00
store double %18, double* %3
br label %7
19: ; preds = %7
%20 = load double, double* %3
ret double %20
}

LLVM IR (-O2):
define double @sqrt8(double %0) {
%2 = fmul double %0, 5.000000e-01
%3 = fcmp une double %2, 0.000000e+00
br i1 %3, label %4, label %10
4: ; preds = %1, %4
%5 = phi double [ %8, %4 ], [ %2, %1 ]
%6 = fdiv double %0, %5
%7 = fadd double %5, %6
%8 = fmul double %7, 5.000000e-01
%9 = fcmp une double %8, %5
br i1 %9, label %4, label %10
10: ; preds = %4, %1
%11 = phi double [ %2, %1 ], [ %8, %4 ]
ret double %11
}
int d_bun_cr2(double a1) { return !(__builtin_isunordered(100, a1)); }


x86 assembly (clang, -O0):
<d_bun_cr2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
setp   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_bun_cr2>:
xor    %eax,%eax
ucomisd %xmm0,%xmm0
setnp  %al
ret

LLVM IR (-O0):
define i32 @d_bun_cr2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp uno double 1.000000e+02, %3
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @d_bun_cr2(double %0) {
%2 = fcmp ord double %0, 0.000000e+00
%3 = zext i1 %2 to i32
ret i32 %3
}
int f(int u, int v) {
  if (v > 0)
    return 5 * u + 3 * v;
  return u;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1126 <f+0x26>
imul   $0x5,-0x8(%rbp),%eax
imul   $0x3,-0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    112c <f+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    (%rdi,%rdi,4),%ecx
lea    (%rsi,%rsi,2),%eax
add    %ecx,%eax
test   %esi,%esi
cmovle %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
%4 = mul nsw i32 %0, 5
%5 = mul nsw i32 %1, 3
%6 = add nsw i32 %5, %4
%7 = select i1 %3, i32 %6, i32 %0
ret i32 %7
}
/* Variables and functions */
scalar_t__ isupper(char);
int util_char_to_color(char piece_c) { return isupper(piece_c) ? 0 : 1; }


x86 assembly (clang, -O0):
<util_char_to_color>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isupper@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_char_to_color>:
push   %rax
call   1030 <isupper@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @util_char_to_color(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isupper(i8 signext %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 0, i32 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @util_char_to_color(i8 signext %0) {
%2 = tail call i64 @isupper(i8 signext %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void fatal(char *message) {
  fprintf(stderr, "fatal error: %s\n", message);
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"fatal error: %s\0A\00"
define void @fatal(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 ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"fatal error: %s\0A\00"
define void @fatal(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int test_07(unsigned int a) { return a < 0x80000000 ? -5 : 10; }


x86 assembly (clang, -O0):
<test_07>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0xa,%eax
mov    $0xfffffffb,%ecx
cmp    $0x80000000,%edx
cmovb  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_07>:
test   %edi,%edi
mov    $0xfffffffb,%ecx
mov    $0xa,%eax
cmovns %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_07(i32 %0) {
%2 = icmp sgt i32 %0, -1
%3 = select i1 %2, i32 -5, i32 10
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fn2();
int main() { fn2(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fn2()
ret i32 0
}
/* Variables and functions */
float cosf(float);
float libm_cosf(float x) { return cosf(x); }


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

x86 assembly (clang, -O2):
<libm_cosf>:
jmp    1030 <cosf@plt>

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

LLVM IR (-O2):
define float @libm_cosf(float %0) {
%2 = tail call float @cosf(float %0)
ret float %2
}
void haptic_hal_disable() {}


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

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

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

LLVM IR (-O2):
define void @haptic_hal_disable() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ process_ytml(char *);
int main(int argc, char *argv[]) {
  if (argc < 2) {
    printf("²ÎÊý²»¹»¶à!\n");
    return -1;
  }
  process_ytml(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1158 <main+0x38>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116c <main+0x4c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <process_ytml@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     1139 <main+0x19>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
mov    0x8(%rsi),%rdi
call   1040 <process_ytml@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"\C2\B2\C3\8E\C3\8A\C3\BD\C2\B2\C2\BB\C2\B9\C2\BB\C2\B6\C3\A0!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @process_ytml(i8* %13)
store i32 0, i32* %3
br label %15
15: ; preds = %10, %8
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@str = [22 x i8] c"\C2\B2\C3\8E\C3\8A\C3\BD\C2\B2\C2\BB\C2\B9\C2\BB\C2\B6\C3\A0!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
br label %10
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @process_ytml(i8* %8)
br label %10
10: ; preds = %6, %4
%11 = phi i32 [ -1, %4 ], [ 0, %6 ]
ret i32 %11
}
double geocenX(x)
double x;
{
  double r;
  r = atan((1.0 - (1.0 / 298.256)) * tan(x));
  return (r);
}


x86 assembly (clang, -O0):
<geocenX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <tan@plt>
movaps %xmm0,%xmm1
movsd  0xebe(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <atan@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geocenX>:
push   %rax
call   1040 <tan@plt>
mulsd  0xed2(%rip),%xmm0
pop    %rax
jmp    1030 <atan@plt>

LLVM IR (-O0):
define double @geocenX(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @tan(double %4)
%6 = fmul double 0x3FEFE4889E18A326, %5
%7 = call double @atan(double %6)
store double %7, double* %3
%8 = load double, double* %3
ret double %8
}

LLVM IR (-O2):
define double @geocenX(double %0) {
%2 = tail call double @tan(double %0)
%3 = fmul double %2, 0x3FEFE4889E18A326
%4 = tail call double @atan(double %3)
ret double %4
}
/* Type definitions */
struct ev_loop {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ev_verify(struct ev_loop *);
void __attribute__((unused)) ev_loop_verify(struct ev_loop *loop) {
  ev_verify(loop);
}


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

x86 assembly (clang, -O2):
<ev_loop_verify>:
jmp    1030 <ev_verify@plt>

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

LLVM IR (-O2):
%struct.ev_loop = type { i32 }
define void @ev_loop_verify(%struct.ev_loop* %0) {
%2 = tail call i32 @ev_verify(%struct.ev_loop* %0)
ret void
}
main(y) { f(y - 1, -1); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    $0xffffffff,%esi
mov    $0x0,%al
call   1030 <f@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1
%5 = call i32 (i32, i32, ...) bitcast (i32 (...)* @f to i32 (i32, i32, ...)*)(i32 %4, i32 -1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @f to i32 (i32, i32, ...)*)(i32 %2, i32 -1)
ret i32 0
}
void av_expr_free() {}


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

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

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

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

/* Variables and functions */
int _input(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int vscanf(const char *fmt, va_list args) { return _input(stdin, fmt, args); }


x86 assembly (clang, -O0):
<vscanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <_input@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vscanf>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ecc(%rip),%rax
mov    (%rax),%edi
jmp    1030 <_input@plt>

LLVM IR (-O0):
@stdin = global i32 0
define i32 @vscanf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdin
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @_input(i32 %5, i8* %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @vscanf(i8* %0, i32 %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @_input(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error(char *str) {
  fprintf(stderr, "%s\n", str);
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error(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 ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
float prv_process_fpa_add_real32(float a, float b) { return a + b; }


x86 assembly (clang, -O0):
<prv_process_fpa_add_real32>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<prv_process_fpa_add_real32>:
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @prv_process_fpa_add_real32(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fadd float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @prv_process_fpa_add_real32(float %0, float %1) {
%3 = fadd float %0, %1
ret float %3
}
int xmlUCSIsHangulJamo(int code) {
  return (((code >= 0x1100) && (code <= 0x11FF)));
}


x86 assembly (clang, -O0):
<xmlUCSIsHangulJamo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x1100,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsHangulJamo+0x26>
cmpl   $0x11ff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsHangulJamo>:
and    $0xffffff00,%edi
xor    %eax,%eax
cmp    $0x1100,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @xmlUCSIsHangulJamo(i32 %0) {
%2 = and i32 %0, -256
%3 = icmp eq i32 %2, 4352
%4 = zext i1 %3 to i32
ret i32 %4
}
hey() {
  int x, y, z;
  z = x ?: y;
}


x86 assembly (clang, -O0):
<hey>:
push   %rbp
mov    %rsp,%rbp
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     111e <hey+0x1e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1124 <hey+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @hey() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ do_close();
void _nss_ldap_close(void) { do_close(); }


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

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

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

LLVM IR (-O2):
define void @_nss_ldap_close() {
%1 = tail call i32 (...) @do_close()
ret void
}
long dwordBeToLong(unsigned char *buffer) {
  long result = 0;
  result = buffer[0];
  result <<= 8;
  result += buffer[1];
  result <<= 8;
  result += buffer[2];
  result <<= 8;
  result += buffer[3];
  return result;
}


x86 assembly (clang, -O0):
<dwordBeToLong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%eax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%eax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dwordBeToLong>:
mov    (%rdi),%eax
shl    $0x20,%rax
bswap  %rax
ret

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

LLVM IR (-O2):
define i64 @dwordBeToLong(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i64
%7 = shl nuw nsw i64 %3, 16
%8 = shl nuw nsw i64 %6, 8
%9 = or i64 %8, %7
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i64
%13 = or i64 %9, %12
%14 = shl nuw nsw i64 %13, 8
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i64
%18 = or i64 %14, %17
ret i64 %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float numero_litri;
  printf("Inserisci il numero di litri\n");
  scanf("%f", &numero_litri);
  printf("Il numero dei litri e\' %f \n", numero_litri * 1.7);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea9(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0xec7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [30 x i8] c"Inserisci il numero di litri\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [28 x i8] c"Il numero dei litri e' %f \0A\00"
define i32 @main() {
%1 = alloca float
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = fmul double %5, 1.700000e+00
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %6)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [28 x i8] c"Il numero dei litri e' %f \0A\00"
@str = [29 x i8] c"Inserisci il numero di litri\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = fmul double %6, 1.700000e+00
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}
int test_imm_ADuint8_reg(unsigned char val) {
  return ((val) & (-0xAD << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_ADuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff53,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_ADuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 83
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int main() {
  int x, y;
  x = 0;
  y = 0;
  while (y >= 0) {
    if (x <= 50) {
      y = y + 1;
    } else {
      y = y - 1;
    }
    x = x + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1152 <main+0x52>
cmpl   $0x32,-0x8(%rbp)
jg     113b <main+0x3b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1144 <main+0x44>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <main+0x19>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %edx,%edx
cmp    $0x33,%ecx
setb   %dl
add    $0x1,%ecx
lea    (%rax,%rdx,2),%eax
add    $0xffffffff,%eax
jns    1110 <main+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %7, %1 ]
%3 = phi i32 [ 0, %0 ], [ %5, %1 ]
%4 = icmp ult i32 %3, 51
%5 = add nuw nsw i32 %3, 1
%6 = select i1 %4, i32 1, i32 -1
%7 = add nsw i32 %6, %2
%8 = icmp sgt i32 %7, -1
br i1 %8, label %1, label %9
9: ; preds = %1
ret i32 0
}
void gtk_expander_new() {}


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

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

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

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