#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 *, char *, int);
int strspn(char *, char *);
int test_strspn(void) {
  do {
    if (!(strspn("", "") == 0)) {
      printf("expression '%s' untrue at %d\n", "strspn(\"\", \"\") == 0", 188);
      return 0;
    }
  } while (0);
  do {
    if (!(strspn("xyz", "") == 0)) {
      printf("expression '%s' untrue at %d\n", "strspn(\"xyz\", \"\") == 0",
             189);
      return 0;
    }
  } while (0);
  do {
    if (!(strspn("xyz", "z") == 0)) {
      printf("expression '%s' untrue at %d\n", "strspn(\"xyz\", \"z\") == 0",
             190);
      return 0;
    }
  } while (0);
  do {
    if (!(strspn("xyzabc", "zxlyz") == 3)) {
      printf("expression '%s' untrue at %d\n",
             "strspn(\"xyzabc\", \"zxlyz\") == 3", 191);
      return 0;
    }
  } while (0);
  do {
    if (!(strspn("12344xyz", "0123456789") == 5)) {
      printf("expression '%s' untrue at %d\n",
             "strspn(\"12344xyz\", \"0123456789\") == 5", 192);
      return 0;
    }
  } while (0);
  return 1;
}


x86 assembly (clang, -O0):
<test_strspn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeee(%rip),%rsi
mov    %rsi,%rdi
call   1040 <strspn@plt>
cmp    $0x0,%eax
je     1164 <test_strspn+0x44>
lea    0xeb9(%rip),%rdi
lea    0xed0(%rip),%rsi
mov    $0xbc,%edx
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1298 <test_strspn+0x178>
jmp    1169 <test_strspn+0x49>
jmp    116e <test_strspn+0x4e>
lea    0xf1d(%rip),%rdi
lea    0xea1(%rip),%rsi
call   1040 <strspn@plt>
cmp    $0x0,%eax
je     11ae <test_strspn+0x8e>
lea    0xe6f(%rip),%rdi
lea    0xe9a(%rip),%rsi
mov    $0xbd,%edx
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1298 <test_strspn+0x178>
jmp    11b3 <test_strspn+0x93>
jmp    11b8 <test_strspn+0x98>
lea    0xed3(%rip),%rdi
lea    0xea6(%rip),%rsi
call   1040 <strspn@plt>
cmp    $0x0,%eax
je     11f8 <test_strspn+0xd8>
lea    0xe25(%rip),%rdi
lea    0xe67(%rip),%rsi
mov    $0xbe,%edx
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1298 <test_strspn+0x178>
jmp    11fd <test_strspn+0xdd>
jmp    1202 <test_strspn+0xe2>
lea    0xe58(%rip),%rdi
lea    0xe58(%rip),%rsi
call   1040 <strspn@plt>
cmp    $0x3,%eax
je     1242 <test_strspn+0x122>
lea    0xddb(%rip),%rdi
lea    0xe42(%rip),%rsi
mov    $0xbf,%edx
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1298 <test_strspn+0x178>
jmp    1247 <test_strspn+0x127>
jmp    124c <test_strspn+0x12c>
lea    0xe3a(%rip),%rdi
lea    0xe3c(%rip),%rsi
call   1040 <strspn@plt>
cmp    $0x5,%eax
je     128c <test_strspn+0x16c>
lea    0xd91(%rip),%rdi
lea    0xe2b(%rip),%rsi
mov    $0xc0,%edx
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1298 <test_strspn+0x178>
jmp    1291 <test_strspn+0x171>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_strspn>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [30 x i8] c"expression '%s' untrue at %d\0A\00"
@.str.2 = [20 x i8] c"strspn(\22\22, \22\22) == 0\00"
@.str.3 = [4 x i8] c"xyz\00"
@.str.4 = [23 x i8] c"strspn(\22xyz\22, \22\22) == 0\00"
@.str.5 = [2 x i8] c"z\00"
@.str.6 = [24 x i8] c"strspn(\22xyz\22, \22z\22) == 0\00"
@.str.7 = [7 x i8] c"xyzabc\00"
@.str.8 = [6 x i8] c"zxlyz\00"
@.str.9 = [31 x i8] c"strspn(\22xyzabc\22, \22zxlyz\22) == 3\00"
@.str.10 = [9 x i8] c"12344xyz\00"
@.str.11 = [11 x i8] c"0123456789\00"
@.str.12 = [38 x i8] c"strspn(\2212344xyz\22, \220123456789\22) == 5\00"
define i32 @test_strspn() {
%1 = alloca i32
br label %2
2: ; preds = %0
%3 = call i32 @strspn(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 188)
store i32 0, i32* %1
br label %37
7: ; preds = %2
br label %8
8: ; preds = %7
br label %9
9: ; preds = %8
%10 = call i32 @strspn(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %9
%13 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 189)
store i32 0, i32* %1
br label %37
14: ; preds = %9
br label %15
15: ; preds = %14
br label %16
16: ; preds = %15
%17 = call i32 @strspn(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %21, label %19
19: ; preds = %16
%20 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 190)
store i32 0, i32* %1
br label %37
21: ; preds = %16
br label %22
22: ; preds = %21
br label %23
23: ; preds = %22
%24 = call i32 @strspn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%25 = icmp eq i32 %24, 3
br i1 %25, label %28, label %26
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0), i32 191)
store i32 0, i32* %1
br label %37
28: ; preds = %23
br label %29
29: ; preds = %28
br label %30
30: ; preds = %29
%31 = call i32 @strspn(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%32 = icmp eq i32 %31, 5
br i1 %32, label %35, label %33
33: ; preds = %30
%34 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.12, i64 0, i64 0), i32 192)
store i32 0, i32* %1
br label %37
35: ; preds = %30
br label %36
36: ; preds = %35
store i32 1, i32* %1
br label %37
37: ; preds = %36, %33, %26, %19, %12, %5
%38 = load i32, i32* %1
ret i32 %38
}

LLVM IR (-O2):
define i32 @test_strspn() {
ret i32 1
}