#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int test_basic();
int test_double();
int test_float();
int test_int();
int test_long();
int test_longlong();
int test_unsignedint();
int test_unsignedlong();
int test_unsignedlonglong();
int main() {
  int r;
  if ((r = test_basic())) {
    printf("failed at basic(%d)\n", r);
    return 1;
  }
  if ((r = test_int())) {
    printf("failed at int(%d)\n", r);
    return 1;
  }
  if ((r = test_unsignedint())) {
    printf("failed at unsigned int(%d)\n", r);
    return 1;
  }
  if ((r = test_long())) {
    printf("failed at long(%d)\n", r);
    return 1;
  }
  if ((r = test_unsignedlong())) {
    printf("failed at unsigned long(%d)\n", r);
    return 1;
  }
  if ((r = test_longlong())) {
    printf("failed at long long(%d)\n", r);
    return 1;
  }
  if ((r = test_unsignedlonglong())) {
    printf("failed at unsigned long long(%d)\n", r);
    return 1;
  }
  if ((r = test_float())) {
    printf("failed at float(%d)\n", r);
    return 1;
  }
  if ((r = test_double())) {
    printf("failed at double(%d)\n", r);
    return 1;
  }
  printf("PASS\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   10c0 <test_basic@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     11df <main+0x3f>
mov    -0x8(%rbp),%esi
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1374 <main+0x1d4>
mov    $0x0,%al
call   10b0 <test_int@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     120f <main+0x6f>
mov    -0x8(%rbp),%esi
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1374 <main+0x1d4>
mov    $0x0,%al
call   1090 <test_unsignedint@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     123f <main+0x9f>
mov    -0x8(%rbp),%esi
lea    0xdfc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1374 <main+0x1d4>
mov    $0x0,%al
call   1080 <test_long@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     126f <main+0xcf>
mov    -0x8(%rbp),%esi
lea    0xde8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1374 <main+0x1d4>
mov    $0x0,%al
call   1040 <test_unsignedlong@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     129f <main+0xff>
mov    -0x8(%rbp),%esi
lea    0xdcc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1374 <main+0x1d4>
mov    $0x0,%al
call   1070 <test_longlong@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     12cf <main+0x12f>
mov    -0x8(%rbp),%esi
lea    0xdb9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1374 <main+0x1d4>
mov    $0x0,%al
call   1030 <test_unsignedlonglong@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     12ff <main+0x15f>
mov    -0x8(%rbp),%esi
lea    0xda2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1374 <main+0x1d4>
mov    $0x0,%al
call   1060 <test_float@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     132f <main+0x18f>
mov    -0x8(%rbp),%esi
lea    0xd94(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1374 <main+0x1d4>
mov    $0x0,%al
call   10a0 <test_double@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     135f <main+0x1bf>
mov    -0x8(%rbp),%esi
lea    0xd79(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1374 <main+0x1d4>
lea    0xd75(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   10d0 <test_basic@plt>
test   %eax,%eax
je     11c8 <main+0x18>
lea    0xe3d(%rip),%rdi
jmp    126b <main+0xbb>
xor    %eax,%eax
call   10c0 <test_int@plt>
test   %eax,%eax
je     11df <main+0x2f>
lea    0xe3b(%rip),%rdi
jmp    126b <main+0xbb>
xor    %eax,%eax
call   10a0 <test_unsignedint@plt>
test   %eax,%eax
je     11f3 <main+0x43>
lea    0xe37(%rip),%rdi
jmp    126b <main+0xbb>
xor    %eax,%eax
call   1090 <test_long@plt>
test   %eax,%eax
je     1207 <main+0x57>
lea    0xe3f(%rip),%rdi
jmp    126b <main+0xbb>
xor    %eax,%eax
call   1050 <test_unsignedlong@plt>
test   %eax,%eax
je     121b <main+0x6b>
lea    0xe3f(%rip),%rdi
jmp    126b <main+0xbb>
xor    %eax,%eax
call   1080 <test_longlong@plt>
test   %eax,%eax
je     122f <main+0x7f>
lea    0xe48(%rip),%rdi
jmp    126b <main+0xbb>
xor    %eax,%eax
call   1030 <test_unsignedlonglong@plt>
test   %eax,%eax
je     1243 <main+0x93>
lea    0xe4d(%rip),%rdi
jmp    126b <main+0xbb>
xor    %eax,%eax
call   1070 <test_float@plt>
test   %eax,%eax
je     1257 <main+0xa7>
lea    0xe5b(%rip),%rdi
jmp    126b <main+0xbb>
xor    %ebx,%ebx
xor    %eax,%eax
call   10b0 <test_double@plt>
test   %eax,%eax
je     127d <main+0xcd>
lea    0xe5a(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret
lea    0xe57(%rip),%rdi
call   1040 <puts@plt>
jmp    1279 <main+0xc9>

LLVM IR (-O0):
@.str = [21 x i8] c"failed at basic(%d)\0A\00"
@.str.1 = [19 x i8] c"failed at int(%d)\0A\00"
@.str.2 = [28 x i8] c"failed at unsigned int(%d)\0A\00"
@.str.3 = [20 x i8] c"failed at long(%d)\0A\00"
@.str.4 = [29 x i8] c"failed at unsigned long(%d)\0A\00"
@.str.5 = [25 x i8] c"failed at long long(%d)\0A\00"
@.str.6 = [34 x i8] c"failed at unsigned long long(%d)\0A\00"
@.str.7 = [21 x i8] c"failed at float(%d)\0A\00"
@.str.8 = [22 x i8] c"failed at double(%d)\0A\00"
@.str.9 = [6 x i8] c"PASS\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @test_basic()
store i32 %3, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %6)
store i32 1, i32* %1
br label %58
8: ; preds = %0
%9 = call i32 (...) @test_int()
store i32 %9, i32* %2
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %12)
store i32 1, i32* %1
br label %58
14: ; preds = %8
%15 = call i32 (...) @test_unsignedint()
store i32 %15, i32* %2
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %18)
store i32 1, i32* %1
br label %58
20: ; preds = %14
%21 = call i32 (...) @test_long()
store i32 %21, i32* %2
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load i32, i32* %2
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %24)
store i32 1, i32* %1
br label %58
26: ; preds = %20
%27 = call i32 (...) @test_unsignedlong()
store i32 %27, i32* %2
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = load i32, i32* %2
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i32 %30)
store i32 1, i32* %1
br label %58
32: ; preds = %26
%33 = call i32 (...) @test_longlong()
store i32 %33, i32* %2
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %38
35: ; preds = %32
%36 = load i32, i32* %2
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %36)
store i32 1, i32* %1
br label %58
38: ; preds = %32
%39 = call i32 (...) @test_unsignedlonglong()
store i32 %39, i32* %2
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = load i32, i32* %2
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32 %42)
store i32 1, i32* %1
br label %58
44: ; preds = %38
%45 = call i32 (...) @test_float()
store i32 %45, i32* %2
%46 = icmp ne i32 %45, 0
br i1 %46, label %47, label %50
47: ; preds = %44
%48 = load i32, i32* %2
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i32 %48)
store i32 1, i32* %1
br label %58
50: ; preds = %44
%51 = call i32 (...) @test_double()
store i32 %51, i32* %2
%52 = icmp ne i32 %51, 0
br i1 %52, label %53, label %56
53: ; preds = %50
%54 = load i32, i32* %2
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0), i32 %54)
store i32 1, i32* %1
br label %58
56: ; preds = %50
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %1
br label %58
58: ; preds = %56, %53, %47, %41, %35, %29, %23, %17, %11, %5
%59 = load i32, i32* %1
ret i32 %59
}

LLVM IR (-O2):
@.str = [21 x i8] c"failed at basic(%d)\0A\00"
@.str.1 = [19 x i8] c"failed at int(%d)\0A\00"
@.str.2 = [28 x i8] c"failed at unsigned int(%d)\0A\00"
@.str.3 = [20 x i8] c"failed at long(%d)\0A\00"
@.str.4 = [29 x i8] c"failed at unsigned long(%d)\0A\00"
@.str.5 = [25 x i8] c"failed at long long(%d)\0A\00"
@.str.6 = [34 x i8] c"failed at unsigned long long(%d)\0A\00"
@.str.7 = [21 x i8] c"failed at float(%d)\0A\00"
@.str.8 = [22 x i8] c"failed at double(%d)\0A\00"
@str = [5 x i8] c"PASS\00"
define i32 @main() {
%1 = tail call i32 (...) @test_basic()
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %47
5: ; preds = %0
%6 = tail call i32 (...) @test_int()
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %6)
br label %47
10: ; preds = %5
%11 = tail call i32 (...) @test_unsignedint()
%12 = icmp eq i32 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %11)
br label %47
15: ; preds = %10
%16 = tail call i32 (...) @test_long()
%17 = icmp eq i32 %16, 0
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %16)
br label %47
20: ; preds = %15
%21 = tail call i32 (...) @test_unsignedlong()
%22 = icmp eq i32 %21, 0
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i32 %21)
br label %47
25: ; preds = %20
%26 = tail call i32 (...) @test_longlong()
%27 = icmp eq i32 %26, 0
br i1 %27, label %30, label %28
28: ; preds = %25
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %26)
br label %47
30: ; preds = %25
%31 = tail call i32 (...) @test_unsignedlonglong()
%32 = icmp eq i32 %31, 0
br i1 %32, label %35, label %33
33: ; preds = %30
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32 %31)
br label %47
35: ; preds = %30
%36 = tail call i32 (...) @test_float()
%37 = icmp eq i32 %36, 0
br i1 %37, label %40, label %38
38: ; preds = %35
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i32 %36)
br label %47
40: ; preds = %35
%41 = tail call i32 (...) @test_double()
%42 = icmp eq i32 %41, 0
br i1 %42, label %45, label %43
43: ; preds = %40
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0), i32 %41)
br label %47
45: ; preds = %40
%46 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
br label %47
47: ; preds = %45, %43, %38, %33, %28, %23, %18, %13, %8, %3
%48 = phi i32 [ 1, %3 ], [ 1, %8 ], [ 1, %13 ], [ 1, %18 ], [ 1, %23 ], [ 1, %28 ], [ 1, %33 ], [ 1, %38 ], [ 1, %43 ], [ 0, %45 ]
ret i32 %48
}