#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 *, ...);
scalar_t__ test_copy();
scalar_t__ test_sprintf();
scalar_t__ test_toke();
scalar_t__ test_type_conv();
int main() {
  if (test_toke()) {
    printf("----------------------------------------------------------\n");
    printf("%s failed\n", "toke");
    printf("----------------------------------------------------------\n");
    return -1;
  };
  {
    printf("----------------------------------------------------------\n");
    printf("%s passed\n", "toke");
    printf("----------------------------------------------------------\n");
    printf("\n");
  };
  if (test_type_conv()) {
    printf("----------------------------------------------------------\n");
    printf("%s failed\n", "type_conv");
    printf("----------------------------------------------------------\n");
    return -1;
  };
  {
    printf("----------------------------------------------------------\n");
    printf("%s passed\n", "type_conv");
    printf("----------------------------------------------------------\n");
    printf("\n");
  };
  if (test_sprintf()) {
    printf("----------------------------------------------------------\n");
    printf("%s failed\n", "sprintf");
    printf("----------------------------------------------------------\n");
    return -1;
  };
  {
    printf("----------------------------------------------------------\n");
    printf("%s passed\n", "sprintf");
    printf("----------------------------------------------------------\n");
    printf("\n");
  };
  if (test_copy()) {
    printf("----------------------------------------------------------\n");
    printf("%s failed\n", "test_copy");
    printf("----------------------------------------------------------\n");
    return -1;
  };
  {
    printf("----------------------------------------------------------\n");
    printf("%s passed\n", "test_copy");
    printf("----------------------------------------------------------\n");
    printf("\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 <test_toke@plt>
cmp    $0x0,%rax
je     11ad <main+0x5d>
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb7(%rip),%rdi
lea    0xebb(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    139a <main+0x24a>
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe8a(%rip),%rdi
lea    0xe7e(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe55(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <test_type_conv@plt>
cmp    $0x0,%rax
je     123a <main+0xea>
lea    0xdfc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe2a(%rip),%rdi
lea    0xe3e(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    139a <main+0x24a>
lea    0xdbf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdfd(%rip),%rdi
lea    0xe01(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd9c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdc8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <test_sprintf@plt>
cmp    $0x0,%rax
je     12c7 <main+0x177>
lea    0xd6f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd9d(%rip),%rdi
lea    0xdbb(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd4c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    139a <main+0x24a>
lea    0xd32(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd70(%rip),%rdi
lea    0xd7e(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd0f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd3b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <test_copy@plt>
cmp    $0x0,%rax
je     1354 <main+0x204>
lea    0xce2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd10(%rip),%rdi
lea    0xd36(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xcbf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    139a <main+0x24a>
lea    0xca5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xce3(%rip),%rdi
lea    0xcf9(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc82(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xcae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1090 <test_toke@plt>
lea    0xeb5(%rip),%rbx
mov    %rbx,%rdi
test   %rax,%rax
je     11a2 <main+0x32>
call   1040 <puts@plt>
lea    0xe6a(%rip),%rdi
lea    0xe6e(%rip),%rsi
jmp    12b4 <main+0x144>
call   1040 <puts@plt>
lea    0xe62(%rip),%rdi
lea    0xe56(%rip),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1070 <test_type_conv@plt>
lea    0xe5b(%rip),%rbx
mov    %rbx,%rdi
test   %rax,%rax
je     11fc <main+0x8c>
call   1040 <puts@plt>
lea    0xe10(%rip),%rdi
lea    0xe24(%rip),%rsi
jmp    12b4 <main+0x144>
call   1040 <puts@plt>
lea    0xe08(%rip),%rdi
lea    0xe0c(%rip),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1080 <test_sprintf@plt>
test   %rax,%rax
je     1253 <main+0xe3>
lea    0xdfc(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xdb6(%rip),%rdi
lea    0xdd4(%rip),%rsi
jmp    12b4 <main+0x144>
lea    0xddd(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xda7(%rip),%rdi
lea    0xdb5(%rip),%rsi
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1050 <test_copy@plt>
test   %rax,%rax
je     12d2 <main+0x162>
lea    0xd99(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xd53(%rip),%rdi
lea    0xd79(%rip),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xd5e(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xd28(%rip),%rdi
lea    0xd3e(%rip),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    12c8 <main+0x158>

LLVM IR (-O0):
@.str = [60 x i8] c"----------------------------------------------------------\0A\00"
@.str.1 = [11 x i8] c"%s failed\0A\00"
@.str.2 = [5 x i8] c"toke\00"
@.str.3 = [11 x i8] c"%s passed\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [10 x i8] c"type_conv\00"
@.str.6 = [8 x i8] c"sprintf\00"
@.str.7 = [10 x i8] c"test_copy\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @test_toke()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %1
br label %46
8: ; preds = %0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%13 = call i64 (...) @test_type_conv()
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %8
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %1
br label %46
19: ; preds = %8
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%24 = call i64 (...) @test_sprintf()
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %30
26: ; preds = %19
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %1
br label %46
30: ; preds = %19
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%35 = call i64 (...) @test_copy()
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %41
37: ; preds = %30
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %1
br label %46
41: ; preds = %30
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %1
br label %46
46: ; preds = %41, %37, %26, %15, %4
%47 = load i32, i32* %1
ret i32 %47
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"%s failed\0A\00"
@.str.2 = [5 x i8] c"toke\00"
@.str.3 = [11 x i8] c"%s passed\0A\00"
@.str.5 = [10 x i8] c"type_conv\00"
@.str.6 = [8 x i8] c"sprintf\00"
@.str.7 = [10 x i8] c"test_copy\00"
@str.22 = [59 x i8] c"----------------------------------------------------------\00"
define i32 @main() {
%1 = tail call i64 (...) @test_toke()
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
br label %45
7: ; preds = %0
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
%11 = tail call i32 @putchar(i32 10)
%12 = tail call i64 (...) @test_type_conv()
%13 = icmp eq i64 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %7
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
br label %45
18: ; preds = %7
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
%22 = tail call i32 @putchar(i32 10)
%23 = tail call i64 (...) @test_sprintf()
%24 = icmp eq i64 %23, 0
br i1 %24, label %29, label %25
25: ; preds = %18
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
br label %45
29: ; preds = %18
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
%33 = tail call i32 @putchar(i32 10)
%34 = tail call i64 (...) @test_copy()
%35 = icmp eq i64 %34, 0
br i1 %35, label %40, label %36
36: ; preds = %29
%37 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%39 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
br label %45
40: ; preds = %29
%41 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%43 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
%44 = tail call i32 @putchar(i32 10)
br label %45
45: ; preds = %40, %36, %25, %14, %3
%46 = phi i32 [ -1, %3 ], [ -1, %14 ], [ -1, %25 ], [ -1, %36 ], [ 0, %40 ]
ret i32 %46
}