#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 strcspn(char *, char *);
int test_strcspn(void) {
  do {
    if (!(strcspn("", "") == 0)) {
      printf("expression '%s' untrue at %d\n", "strcspn(\"\", \"\") == 0", 286);
      return 0;
    }
  } while (0);
  do {
    if (!(strcspn("xyz", "") == 3)) {
      printf("expression '%s' untrue at %d\n", "strcspn(\"xyz\", \"\") == 3",
             287);
      return 0;
    }
  } while (0);
  do {
    if (!(strcspn("xyz", "z") == 2)) {
      printf("expression '%s' untrue at %d\n", "strcspn(\"xyz\", \"z\") == 2",
             288);
      return 0;
    }
  } while (0);
  do {
    if (!(strcspn("xyzabc", "zxlyz") == 0)) {
      printf("expression '%s' untrue at %d\n",
             "strcspn(\"xyzabc\", \"zxlyz\") == 0", 289);
      return 0;
    }
  } while (0);
  do {
    if (!(strcspn("12344xyz", "0123456789") == 0)) {
      printf("expression '%s' untrue at %d\n",
             "strcspn(\"12344xyz\", \"0123456789\") == 0", 290);
      return 0;
    }
  } while (0);
  do {
    if (!(strcspn("12344.", "./") == 5)) {
      printf("expression '%s' untrue at %d\n",
             "strcspn(\"12344.\", \"./\") == 5", 291);
      return 0;
    }
  } while (0);
  return 1;
}


x86 assembly (clang, -O0):
<test_strcspn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeee(%rip),%rsi
mov    %rsi,%rdi
call   1040 <strcspn@plt>
cmp    $0x0,%eax
je     1164 <test_strcspn+0x44>
lea    0xeb9(%rip),%rdi
lea    0xed0(%rip),%rsi
mov    $0x11e,%edx
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    12e2 <test_strcspn+0x1c2>
jmp    1169 <test_strcspn+0x49>
jmp    116e <test_strcspn+0x4e>
lea    0xf21(%rip),%rdi
lea    0xea1(%rip),%rsi
call   1040 <strcspn@plt>
cmp    $0x3,%eax
je     11ae <test_strcspn+0x8e>
lea    0xe6f(%rip),%rdi
lea    0xe9b(%rip),%rsi
mov    $0x11f,%edx
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    12e2 <test_strcspn+0x1c2>
jmp    11b3 <test_strcspn+0x93>
jmp    11b8 <test_strcspn+0x98>
lea    0xed7(%rip),%rdi
lea    0xea9(%rip),%rsi
call   1040 <strcspn@plt>
cmp    $0x2,%eax
je     11f8 <test_strcspn+0xd8>
lea    0xe25(%rip),%rdi
lea    0xe69(%rip),%rsi
mov    $0x120,%edx
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    12e2 <test_strcspn+0x1c2>
jmp    11fd <test_strcspn+0xdd>
jmp    1202 <test_strcspn+0xe2>
lea    0xe5b(%rip),%rdi
lea    0xe5b(%rip),%rsi
call   1040 <strcspn@plt>
cmp    $0x0,%eax
je     1242 <test_strcspn+0x122>
lea    0xddb(%rip),%rdi
lea    0xe45(%rip),%rsi
mov    $0x121,%edx
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    12e2 <test_strcspn+0x1c2>
jmp    1247 <test_strcspn+0x127>
jmp    124c <test_strcspn+0x12c>
lea    0xe3e(%rip),%rdi
lea    0xe40(%rip),%rsi
call   1040 <strcspn@plt>
cmp    $0x0,%eax
je     128c <test_strcspn+0x16c>
lea    0xd91(%rip),%rdi
lea    0xe2f(%rip),%rsi
mov    $0x122,%edx
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    12e2 <test_strcspn+0x1c2>
jmp    1291 <test_strcspn+0x171>
jmp    1296 <test_strcspn+0x176>
lea    0xe2f(%rip),%rdi
lea    0xe2f(%rip),%rsi
call   1040 <strcspn@plt>
cmp    $0x5,%eax
je     12d6 <test_strcspn+0x1b6>
lea    0xd47(%rip),%rdi
lea    0xe16(%rip),%rsi
mov    $0x123,%edx
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    12e2 <test_strcspn+0x1c2>
jmp    12db <test_strcspn+0x1bb>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_strcspn>:
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 = [21 x i8] c"strcspn(\22\22, \22\22) == 0\00"
@.str.3 = [4 x i8] c"xyz\00"
@.str.4 = [24 x i8] c"strcspn(\22xyz\22, \22\22) == 3\00"
@.str.5 = [2 x i8] c"z\00"
@.str.6 = [25 x i8] c"strcspn(\22xyz\22, \22z\22) == 2\00"
@.str.7 = [7 x i8] c"xyzabc\00"
@.str.8 = [6 x i8] c"zxlyz\00"
@.str.9 = [32 x i8] c"strcspn(\22xyzabc\22, \22zxlyz\22) == 0\00"
@.str.10 = [9 x i8] c"12344xyz\00"
@.str.11 = [11 x i8] c"0123456789\00"
@.str.12 = [39 x i8] c"strcspn(\2212344xyz\22, \220123456789\22) == 0\00"
@.str.13 = [7 x i8] c"12344.\00"
@.str.14 = [3 x i8] c"./\00"
@.str.15 = [29 x i8] c"strcspn(\2212344.\22, \22./\22) == 5\00"
define i32 @test_strcspn() {
%1 = alloca i32
br label %2
2: ; preds = %0
%3 = call i32 @strcspn(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 ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 286)
store i32 0, i32* %1
br label %44
7: ; preds = %2
br label %8
8: ; preds = %7
br label %9
9: ; preds = %8
%10 = call i32 @strcspn(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, 3
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 ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 287)
store i32 0, i32* %1
br label %44
14: ; preds = %9
br label %15
15: ; preds = %14
br label %16
16: ; preds = %15
%17 = call i32 @strcspn(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, 2
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 ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 288)
store i32 0, i32* %1
br label %44
21: ; preds = %16
br label %22
22: ; preds = %21
br label %23
23: ; preds = %22
%24 = call i32 @strcspn(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, 0
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 ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0), i32 289)
store i32 0, i32* %1
br label %44
28: ; preds = %23
br label %29
29: ; preds = %28
br label %30
30: ; preds = %29
%31 = call i32 @strcspn(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, 0
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 ([39 x i8], [39 x i8]* @.str.12, i64 0, i64 0), i32 290)
store i32 0, i32* %1
br label %44
35: ; preds = %30
br label %36
36: ; preds = %35
br label %37
37: ; preds = %36
%38 = call i32 @strcspn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
%39 = icmp eq i32 %38, 5
br i1 %39, label %42, label %40
40: ; preds = %37
%41 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.15, i64 0, i64 0), i32 291)
store i32 0, i32* %1
br label %44
42: ; preds = %37
br label %43
43: ; preds = %42
store i32 1, i32* %1
br label %44
44: ; preds = %43, %40, %33, %26, %19, %12, %5
%45 = load i32, i32* %1
ret i32 %45
}

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