#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*/ puts(char *);
int /*<<< orphan*/ test_memchr();
int /*<<< orphan*/ test_memcmp();
int /*<<< orphan*/ test_memcpy();
int /*<<< orphan*/ test_memmove();
int /*<<< orphan*/ test_mempcpy();
int /*<<< orphan*/ test_memrchr();
int /*<<< orphan*/ test_strcat_chk();
int /*<<< orphan*/ test_strchr();
int /*<<< orphan*/ test_strchrnul();
int /*<<< orphan*/ test_strcmp();
int /*<<< orphan*/ test_strcpy();
int /*<<< orphan*/ test_strcspn();
int /*<<< orphan*/ test_strlen();
int /*<<< orphan*/ test_strncasecmp();
int /*<<< orphan*/ test_strncat_chk();
int /*<<< orphan*/ test_strncmp();
int /*<<< orphan*/ test_strncpy();
int /*<<< orphan*/ test_strpbrk();
int /*<<< orphan*/ test_strrchr();
int /*<<< orphan*/ test_strspn();
int /*<<< orphan*/ test_strstr();
int /*<<< orphan*/ test_strtok();
int main(int argc, char **argv) {
  if (!test_strlen())
    return 1;
  if (!test_strcmp())
    return 1;
  if (!test_strncmp())
    return 1;
  if (!test_strncasecmp())
    return 1;
  if (!test_memcpy())
    return 1;
  if (!test_mempcpy())
    return 1;
  if (!test_memmove())
    return 1;
  if (!test_strspn())
    return 1;
  if (!test_memcmp())
    return 1;
  if (!test_strcpy())
    return 1;
  if (!test_strncpy())
    return 1;
  if (!test_strcat_chk())
    return 1;
  if (!test_memchr())
    return 1;
  if (!test_memrchr())
    return 1;
  if (!test_strchr())
    return 1;
  if (!test_strrchr())
    return 1;
  if (!test_strchrnul())
    return 1;
  if (!test_strncat_chk())
    return 1;
  if (!test_strcspn())
    return 1;
  if (!test_strpbrk())
    return 1;
  if (!test_strstr())
    return 1;
  if (!test_strtok())
    return 1;
  puts("OK");
  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)
mov    $0x0,%al
call   1050 <test_strlen@plt>
cmp    $0x0,%eax
jne    12a2 <main+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   10f0 <test_strcmp@plt>
cmp    $0x0,%eax
jne    12be <main+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   1090 <test_strncmp@plt>
cmp    $0x0,%eax
jne    12da <main+0x6a>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   1150 <test_strncasecmp@plt>
cmp    $0x0,%eax
jne    12f6 <main+0x86>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   1060 <test_memcpy@plt>
cmp    $0x0,%eax
jne    1312 <main+0xa2>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   10e0 <test_mempcpy@plt>
cmp    $0x0,%eax
jne    132e <main+0xbe>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   10d0 <test_memmove@plt>
cmp    $0x0,%eax
jne    134a <main+0xda>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   1110 <test_strspn@plt>
cmp    $0x0,%eax
jne    1366 <main+0xf6>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   1180 <test_memcmp@plt>
cmp    $0x0,%eax
jne    1382 <main+0x112>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   10c0 <test_strcpy@plt>
cmp    $0x0,%eax
jne    139e <main+0x12e>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   1040 <test_strncpy@plt>
cmp    $0x0,%eax
jne    13ba <main+0x14a>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   1080 <test_strcat_chk@plt>
cmp    $0x0,%eax
jne    13d6 <main+0x166>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   1120 <test_memchr@plt>
cmp    $0x0,%eax
jne    13f2 <main+0x182>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   1160 <test_memrchr@plt>
cmp    $0x0,%eax
jne    140e <main+0x19e>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   1170 <test_strchr@plt>
cmp    $0x0,%eax
jne    142a <main+0x1ba>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   10b0 <test_strrchr@plt>
cmp    $0x0,%eax
jne    1446 <main+0x1d6>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   10a0 <test_strchrnul@plt>
cmp    $0x0,%eax
jne    1462 <main+0x1f2>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   1100 <test_strncat_chk@plt>
cmp    $0x0,%eax
jne    147e <main+0x20e>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   1190 <test_strcspn@plt>
cmp    $0x0,%eax
jne    149a <main+0x22a>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   1140 <test_strpbrk@plt>
cmp    $0x0,%eax
jne    14b6 <main+0x246>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   1030 <test_strstr@plt>
cmp    $0x0,%eax
jne    14d2 <main+0x262>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
mov    $0x0,%al
call   1130 <test_strtok@plt>
cmp    $0x0,%eax
jne    14ee <main+0x27e>
movl   $0x1,-0x4(%rbp)
jmp    1501 <main+0x291>
lea    0xb0b(%rip),%rdi
call   1070 <puts@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   1050 <test_strlen@plt>
mov    $0x1,%ebx
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   10f0 <test_strcmp@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   1090 <test_strncmp@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   1150 <test_strncasecmp@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   1060 <test_memcpy@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   10e0 <test_mempcpy@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   10d0 <test_memmove@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   1110 <test_strspn@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   1180 <test_memcmp@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   10c0 <test_strcpy@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   1040 <test_strncpy@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   1080 <test_strcat_chk@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   1120 <test_memchr@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   1160 <test_memrchr@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   1170 <test_strchr@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   10b0 <test_strrchr@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   10a0 <test_strchrnul@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   1100 <test_strncat_chk@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   1190 <test_strcspn@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   1140 <test_strpbrk@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   1030 <test_strstr@plt>
test   %eax,%eax
je     13a2 <main+0x132>
xor    %eax,%eax
call   1130 <test_strtok@plt>
test   %eax,%eax
je     13a2 <main+0x132>
lea    0xc65(%rip),%rdi
call   1070 <puts@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"OK\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 = call i32 (...) @test_strlen()
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %2
store i32 1, i32* %3
br label %95
9: ; preds = %2
%10 = call i32 (...) @test_strcmp()
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %9
store i32 1, i32* %3
br label %95
13: ; preds = %9
%14 = call i32 (...) @test_strncmp()
%15 = icmp ne i32 %14, 0
br i1 %15, label %17, label %16
16: ; preds = %13
store i32 1, i32* %3
br label %95
17: ; preds = %13
%18 = call i32 (...) @test_strncasecmp()
%19 = icmp ne i32 %18, 0
br i1 %19, label %21, label %20
20: ; preds = %17
store i32 1, i32* %3
br label %95
21: ; preds = %17
%22 = call i32 (...) @test_memcpy()
%23 = icmp ne i32 %22, 0
br i1 %23, label %25, label %24
24: ; preds = %21
store i32 1, i32* %3
br label %95
25: ; preds = %21
%26 = call i32 (...) @test_mempcpy()
%27 = icmp ne i32 %26, 0
br i1 %27, label %29, label %28
28: ; preds = %25
store i32 1, i32* %3
br label %95
29: ; preds = %25
%30 = call i32 (...) @test_memmove()
%31 = icmp ne i32 %30, 0
br i1 %31, label %33, label %32
32: ; preds = %29
store i32 1, i32* %3
br label %95
33: ; preds = %29
%34 = call i32 (...) @test_strspn()
%35 = icmp ne i32 %34, 0
br i1 %35, label %37, label %36
36: ; preds = %33
store i32 1, i32* %3
br label %95
37: ; preds = %33
%38 = call i32 (...) @test_memcmp()
%39 = icmp ne i32 %38, 0
br i1 %39, label %41, label %40
40: ; preds = %37
store i32 1, i32* %3
br label %95
41: ; preds = %37
%42 = call i32 (...) @test_strcpy()
%43 = icmp ne i32 %42, 0
br i1 %43, label %45, label %44
44: ; preds = %41
store i32 1, i32* %3
br label %95
45: ; preds = %41
%46 = call i32 (...) @test_strncpy()
%47 = icmp ne i32 %46, 0
br i1 %47, label %49, label %48
48: ; preds = %45
store i32 1, i32* %3
br label %95
49: ; preds = %45
%50 = call i32 (...) @test_strcat_chk()
%51 = icmp ne i32 %50, 0
br i1 %51, label %53, label %52
52: ; preds = %49
store i32 1, i32* %3
br label %95
53: ; preds = %49
%54 = call i32 (...) @test_memchr()
%55 = icmp ne i32 %54, 0
br i1 %55, label %57, label %56
56: ; preds = %53
store i32 1, i32* %3
br label %95
57: ; preds = %53
%58 = call i32 (...) @test_memrchr()
%59 = icmp ne i32 %58, 0
br i1 %59, label %61, label %60
60: ; preds = %57
store i32 1, i32* %3
br label %95
61: ; preds = %57
%62 = call i32 (...) @test_strchr()
%63 = icmp ne i32 %62, 0
br i1 %63, label %65, label %64
64: ; preds = %61
store i32 1, i32* %3
br label %95
65: ; preds = %61
%66 = call i32 (...) @test_strrchr()
%67 = icmp ne i32 %66, 0
br i1 %67, label %69, label %68
68: ; preds = %65
store i32 1, i32* %3
br label %95
69: ; preds = %65
%70 = call i32 (...) @test_strchrnul()
%71 = icmp ne i32 %70, 0
br i1 %71, label %73, label %72
72: ; preds = %69
store i32 1, i32* %3
br label %95
73: ; preds = %69
%74 = call i32 (...) @test_strncat_chk()
%75 = icmp ne i32 %74, 0
br i1 %75, label %77, label %76
76: ; preds = %73
store i32 1, i32* %3
br label %95
77: ; preds = %73
%78 = call i32 (...) @test_strcspn()
%79 = icmp ne i32 %78, 0
br i1 %79, label %81, label %80
80: ; preds = %77
store i32 1, i32* %3
br label %95
81: ; preds = %77
%82 = call i32 (...) @test_strpbrk()
%83 = icmp ne i32 %82, 0
br i1 %83, label %85, label %84
84: ; preds = %81
store i32 1, i32* %3
br label %95
85: ; preds = %81
%86 = call i32 (...) @test_strstr()
%87 = icmp ne i32 %86, 0
br i1 %87, label %89, label %88
88: ; preds = %85
store i32 1, i32* %3
br label %95
89: ; preds = %85
%90 = call i32 (...) @test_strtok()
%91 = icmp ne i32 %90, 0
br i1 %91, label %93, label %92
92: ; preds = %89
store i32 1, i32* %3
br label %95
93: ; preds = %89
%94 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %95
95: ; preds = %93, %92, %88, %84, %80, %76, %72, %68, %64, %60, %56, %52, %48, %44, %40, %36, %32, %28, %24, %20, %16, %12, %8
%96 = load i32, i32* %3
ret i32 %96
}

LLVM IR (-O2):
@.str = [3 x i8] c"OK\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_strlen()
%4 = icmp eq i32 %3, 0
br i1 %4, label %70, label %5
5: ; preds = %2
%6 = tail call i32 (...) @test_strcmp()
%7 = icmp eq i32 %6, 0
br i1 %7, label %70, label %8
8: ; preds = %5
%9 = tail call i32 (...) @test_strncmp()
%10 = icmp eq i32 %9, 0
br i1 %10, label %70, label %11
11: ; preds = %8
%12 = tail call i32 (...) @test_strncasecmp()
%13 = icmp eq i32 %12, 0
br i1 %13, label %70, label %14
14: ; preds = %11
%15 = tail call i32 (...) @test_memcpy()
%16 = icmp eq i32 %15, 0
br i1 %16, label %70, label %17
17: ; preds = %14
%18 = tail call i32 (...) @test_mempcpy()
%19 = icmp eq i32 %18, 0
br i1 %19, label %70, label %20
20: ; preds = %17
%21 = tail call i32 (...) @test_memmove()
%22 = icmp eq i32 %21, 0
br i1 %22, label %70, label %23
23: ; preds = %20
%24 = tail call i32 (...) @test_strspn()
%25 = icmp eq i32 %24, 0
br i1 %25, label %70, label %26
26: ; preds = %23
%27 = tail call i32 (...) @test_memcmp()
%28 = icmp eq i32 %27, 0
br i1 %28, label %70, label %29
29: ; preds = %26
%30 = tail call i32 (...) @test_strcpy()
%31 = icmp eq i32 %30, 0
br i1 %31, label %70, label %32
32: ; preds = %29
%33 = tail call i32 (...) @test_strncpy()
%34 = icmp eq i32 %33, 0
br i1 %34, label %70, label %35
35: ; preds = %32
%36 = tail call i32 (...) @test_strcat_chk()
%37 = icmp eq i32 %36, 0
br i1 %37, label %70, label %38
38: ; preds = %35
%39 = tail call i32 (...) @test_memchr()
%40 = icmp eq i32 %39, 0
br i1 %40, label %70, label %41
41: ; preds = %38
%42 = tail call i32 (...) @test_memrchr()
%43 = icmp eq i32 %42, 0
br i1 %43, label %70, label %44
44: ; preds = %41
%45 = tail call i32 (...) @test_strchr()
%46 = icmp eq i32 %45, 0
br i1 %46, label %70, label %47
47: ; preds = %44
%48 = tail call i32 (...) @test_strrchr()
%49 = icmp eq i32 %48, 0
br i1 %49, label %70, label %50
50: ; preds = %47
%51 = tail call i32 (...) @test_strchrnul()
%52 = icmp eq i32 %51, 0
br i1 %52, label %70, label %53
53: ; preds = %50
%54 = tail call i32 (...) @test_strncat_chk()
%55 = icmp eq i32 %54, 0
br i1 %55, label %70, label %56
56: ; preds = %53
%57 = tail call i32 (...) @test_strcspn()
%58 = icmp eq i32 %57, 0
br i1 %58, label %70, label %59
59: ; preds = %56
%60 = tail call i32 (...) @test_strpbrk()
%61 = icmp eq i32 %60, 0
br i1 %61, label %70, label %62
62: ; preds = %59
%63 = tail call i32 (...) @test_strstr()
%64 = icmp eq i32 %63, 0
br i1 %64, label %70, label %65
65: ; preds = %62
%66 = tail call i32 (...) @test_strtok()
%67 = icmp eq i32 %66, 0
br i1 %67, label %70, label %68
68: ; preds = %65
%69 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %70
70: ; preds = %65, %62, %59, %56, %53, %50, %47, %44, %41, %38, %35, %32, %29, %26, %23, %20, %17, %14, %11, %8, %5, %2, %68
%71 = phi i32 [ 0, %68 ], [ 1, %2 ], [ 1, %5 ], [ 1, %8 ], [ 1, %11 ], [ 1, %14 ], [ 1, %17 ], [ 1, %20 ], [ 1, %23 ], [ 1, %26 ], [ 1, %29 ], [ 1, %32 ], [ 1, %35 ], [ 1, %38 ], [ 1, %41 ], [ 1, %44 ], [ 1, %47 ], [ 1, %50 ], [ 1, %53 ], [ 1, %56 ], [ 1, %59 ], [ 1, %62 ], [ 1, %65 ]
ret i32 %71
}