#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 test_memchr();
int test_memclr();
int test_memcmp();
int test_memcpy();
int test_memmove();
int test_memset();
int test_strcat();
int test_strchr();
int test_strcmp();
int test_strcpy();
int test_strcspn();
int test_strdup();
int test_strlen();
int test_strncat();
int test_strncmp();
int test_strncpy();
int test_strparse();
int test_strpbrk();
int test_strrchr();
int test_strspn();
int test_strstr();
int test_strtok();
int test_string(void) {
  return 0 + test_memchr() + test_memcmp() + test_memcpy() + test_memmove() +
         test_memset() + test_memclr() + test_strcpy() + test_strncpy() +
         test_strcat() + test_strncat() + test_strcmp() + test_strncmp() +
         test_strlen() + test_strchr() + test_strrchr() + test_strstr() +
         test_strpbrk() + test_strspn() + test_strcspn() + test_strtok() +
         test_strdup() + test_strparse();
}


x86 assembly (clang, -O0):
<test_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    $0x0,%al
call   1100 <test_memchr@plt>
add    $0x0,%eax
mov    %eax,-0x54(%rbp)
mov    $0x0,%al
call   1170 <test_memcmp@plt>
mov    %eax,%ecx
mov    -0x54(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x50(%rbp)
mov    $0x0,%al
call   1060 <test_memcpy@plt>
mov    %eax,%ecx
mov    -0x50(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4c(%rbp)
mov    $0x0,%al
call   10d0 <test_memmove@plt>
mov    %eax,%ecx
mov    -0x4c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x48(%rbp)
mov    $0x0,%al
call   10a0 <test_memset@plt>
mov    %eax,%ecx
mov    -0x48(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x44(%rbp)
mov    $0x0,%al
call   1080 <test_memclr@plt>
mov    %eax,%ecx
mov    -0x44(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x40(%rbp)
mov    $0x0,%al
call   10c0 <test_strcpy@plt>
mov    %eax,%ecx
mov    -0x40(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x3c(%rbp)
mov    $0x0,%al
call   1040 <test_strncpy@plt>
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x38(%rbp)
mov    $0x0,%al
call   1070 <test_strcat@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    $0x0,%al
call   1110 <test_strncat@plt>
mov    %eax,%ecx
mov    -0x34(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x30(%rbp)
mov    $0x0,%al
call   10e0 <test_strcmp@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    $0x0,%al
call   1090 <test_strncmp@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    $0x0,%al
call   1050 <test_strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1160 <test_strchr@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   10b0 <test_strrchr@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <test_strstr@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1140 <test_strpbrk@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   10f0 <test_strspn@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1180 <test_strcspn@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1130 <test_strtok@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1150 <test_strdup@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1120 <test_strparse@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_string>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1100 <test_memchr@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1170 <test_memcmp@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1060 <test_memcpy@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   10d0 <test_memmove@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   10a0 <test_memset@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1080 <test_memclr@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   10c0 <test_strcpy@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1040 <test_strncpy@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1070 <test_strcat@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1110 <test_strncat@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   10e0 <test_strcmp@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1090 <test_strncmp@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1050 <test_strlen@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1160 <test_strchr@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   10b0 <test_strrchr@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1030 <test_strstr@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1140 <test_strpbrk@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   10f0 <test_strspn@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1180 <test_strcspn@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1130 <test_strtok@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1150 <test_strdup@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1120 <test_strparse@plt>
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @test_string() {
%1 = call i32 (...) @test_memchr()
%2 = add nsw i32 0, %1
%3 = call i32 (...) @test_memcmp()
%4 = add nsw i32 %2, %3
%5 = call i32 (...) @test_memcpy()
%6 = add nsw i32 %4, %5
%7 = call i32 (...) @test_memmove()
%8 = add nsw i32 %6, %7
%9 = call i32 (...) @test_memset()
%10 = add nsw i32 %8, %9
%11 = call i32 (...) @test_memclr()
%12 = add nsw i32 %10, %11
%13 = call i32 (...) @test_strcpy()
%14 = add nsw i32 %12, %13
%15 = call i32 (...) @test_strncpy()
%16 = add nsw i32 %14, %15
%17 = call i32 (...) @test_strcat()
%18 = add nsw i32 %16, %17
%19 = call i32 (...) @test_strncat()
%20 = add nsw i32 %18, %19
%21 = call i32 (...) @test_strcmp()
%22 = add nsw i32 %20, %21
%23 = call i32 (...) @test_strncmp()
%24 = add nsw i32 %22, %23
%25 = call i32 (...) @test_strlen()
%26 = add nsw i32 %24, %25
%27 = call i32 (...) @test_strchr()
%28 = add nsw i32 %26, %27
%29 = call i32 (...) @test_strrchr()
%30 = add nsw i32 %28, %29
%31 = call i32 (...) @test_strstr()
%32 = add nsw i32 %30, %31
%33 = call i32 (...) @test_strpbrk()
%34 = add nsw i32 %32, %33
%35 = call i32 (...) @test_strspn()
%36 = add nsw i32 %34, %35
%37 = call i32 (...) @test_strcspn()
%38 = add nsw i32 %36, %37
%39 = call i32 (...) @test_strtok()
%40 = add nsw i32 %38, %39
%41 = call i32 (...) @test_strdup()
%42 = add nsw i32 %40, %41
%43 = call i32 (...) @test_strparse()
%44 = add nsw i32 %42, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @test_string() {
%1 = tail call i32 (...) @test_memchr()
%2 = tail call i32 (...) @test_memcmp()
%3 = add nsw i32 %2, %1
%4 = tail call i32 (...) @test_memcpy()
%5 = add nsw i32 %3, %4
%6 = tail call i32 (...) @test_memmove()
%7 = add nsw i32 %5, %6
%8 = tail call i32 (...) @test_memset()
%9 = add nsw i32 %7, %8
%10 = tail call i32 (...) @test_memclr()
%11 = add nsw i32 %9, %10
%12 = tail call i32 (...) @test_strcpy()
%13 = add nsw i32 %11, %12
%14 = tail call i32 (...) @test_strncpy()
%15 = add nsw i32 %13, %14
%16 = tail call i32 (...) @test_strcat()
%17 = add nsw i32 %15, %16
%18 = tail call i32 (...) @test_strncat()
%19 = add nsw i32 %17, %18
%20 = tail call i32 (...) @test_strcmp()
%21 = add nsw i32 %19, %20
%22 = tail call i32 (...) @test_strncmp()
%23 = add nsw i32 %21, %22
%24 = tail call i32 (...) @test_strlen()
%25 = add nsw i32 %23, %24
%26 = tail call i32 (...) @test_strchr()
%27 = add nsw i32 %25, %26
%28 = tail call i32 (...) @test_strrchr()
%29 = add nsw i32 %27, %28
%30 = tail call i32 (...) @test_strstr()
%31 = add nsw i32 %29, %30
%32 = tail call i32 (...) @test_strpbrk()
%33 = add nsw i32 %31, %32
%34 = tail call i32 (...) @test_strspn()
%35 = add nsw i32 %33, %34
%36 = tail call i32 (...) @test_strcspn()
%37 = add nsw i32 %35, %36
%38 = tail call i32 (...) @test_strtok()
%39 = add nsw i32 %37, %38
%40 = tail call i32 (...) @test_strdup()
%41 = add nsw i32 %39, %40
%42 = tail call i32 (...) @test_strparse()
%43 = add nsw i32 %41, %42
ret i32 %43
}