#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 EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ test_str_is_trimmable();
scalar_t__ test_str_trim();
scalar_t__ test_toSysPath();
scalar_t__ test_xindex();
scalar_t__ test_xrindex();
scalar_t__ test_xstrdup();
scalar_t__ test_xstrdupn();
scalar_t__ test_xstrncasecmp();
scalar_t__ test_xstrtok_r();
int main(void) {
  if (test_xstrdup() != 0 || test_xstrdupn() != 0 || test_xrindex() != 0 ||
      test_xindex() != 0 || test_xstrncasecmp() != 0 || test_xstrtok_r() != 0 ||
      test_str_is_trimmable() != 0 || test_str_trim() != 0 ||
      test_toSysPath() != 0)
    return EXIT_FAILURE;
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1090 <test_xstrdup@plt>
cmp    $0x0,%rax
jne    1238 <main+0xa8>
mov    $0x0,%al
call   10b0 <test_xstrdupn@plt>
cmp    $0x0,%rax
jne    1238 <main+0xa8>
mov    $0x0,%al
call   1030 <test_xrindex@plt>
cmp    $0x0,%rax
jne    1238 <main+0xa8>
mov    $0x0,%al
call   1040 <test_xindex@plt>
cmp    $0x0,%rax
jne    1238 <main+0xa8>
mov    $0x0,%al
call   10a0 <test_xstrncasecmp@plt>
cmp    $0x0,%rax
jne    1238 <main+0xa8>
mov    $0x0,%al
call   1080 <test_xstrtok_r@plt>
cmp    $0x0,%rax
jne    1238 <main+0xa8>
mov    $0x0,%al
call   1050 <test_str_is_trimmable@plt>
cmp    $0x0,%rax
jne    1238 <main+0xa8>
mov    $0x0,%al
call   1060 <test_str_trim@plt>
cmp    $0x0,%rax
jne    1238 <main+0xa8>
mov    $0x0,%al
call   1070 <test_toSysPath@plt>
cmp    $0x0,%rax
je     1249 <main+0xb9>
mov    0x2da1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1255 <main+0xc5>
mov    0x2d88(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1090 <test_xstrdup@plt>
mov    0x2e41(%rip),%rbx
test   %rax,%rax
jne    1214 <main+0x84>
xor    %eax,%eax
call   10b0 <test_xstrdupn@plt>
test   %rax,%rax
jne    1214 <main+0x84>
xor    %eax,%eax
call   1030 <test_xrindex@plt>
test   %rax,%rax
jne    1214 <main+0x84>
xor    %eax,%eax
call   1040 <test_xindex@plt>
test   %rax,%rax
jne    1214 <main+0x84>
xor    %eax,%eax
call   10a0 <test_xstrncasecmp@plt>
test   %rax,%rax
jne    1214 <main+0x84>
xor    %eax,%eax
call   1080 <test_xstrtok_r@plt>
test   %rax,%rax
jne    1214 <main+0x84>
xor    %eax,%eax
call   1050 <test_str_is_trimmable@plt>
test   %rax,%rax
jne    1214 <main+0x84>
xor    %eax,%eax
call   1060 <test_str_trim@plt>
test   %rax,%rax
jne    1214 <main+0x84>
xor    %eax,%eax
call   1070 <test_toSysPath@plt>
test   %rax,%rax
jne    120d <main+0x7d>
mov    0x2dcd(%rip),%rbx
jmp    1214 <main+0x84>
mov    0x2dcc(%rip),%rbx
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @test_xstrdup()
%3 = icmp ne i64 %2, 0
br i1 %3, label %28, label %4
4: ; preds = %0
%5 = call i64 (...) @test_xstrdupn()
%6 = icmp ne i64 %5, 0
br i1 %6, label %28, label %7
7: ; preds = %4
%8 = call i64 (...) @test_xrindex()
%9 = icmp ne i64 %8, 0
br i1 %9, label %28, label %10
10: ; preds = %7
%11 = call i64 (...) @test_xindex()
%12 = icmp ne i64 %11, 0
br i1 %12, label %28, label %13
13: ; preds = %10
%14 = call i64 (...) @test_xstrncasecmp()
%15 = icmp ne i64 %14, 0
br i1 %15, label %28, label %16
16: ; preds = %13
%17 = call i64 (...) @test_xstrtok_r()
%18 = icmp ne i64 %17, 0
br i1 %18, label %28, label %19
19: ; preds = %16
%20 = call i64 (...) @test_str_is_trimmable()
%21 = icmp ne i64 %20, 0
br i1 %21, label %28, label %22
22: ; preds = %19
%23 = call i64 (...) @test_str_trim()
%24 = icmp ne i64 %23, 0
br i1 %24, label %28, label %25
25: ; preds = %22
%26 = call i64 (...) @test_toSysPath()
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %25, %22, %19, %16, %13, %10, %7, %4, %0
%29 = load i32, i32* @EXIT_FAILURE
store i32 %29, i32* %1
br label %32
30: ; preds = %25
%31 = load i32, i32* @EXIT_SUCCESS
store i32 %31, i32* %1
br label %32
32: ; preds = %30, %28
%33 = load i32, i32* %1
ret i32 %33
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 (...) @test_xstrdup()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %28
3: ; preds = %0
%4 = tail call i64 (...) @test_xstrdupn()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %28
6: ; preds = %3
%7 = tail call i64 (...) @test_xrindex()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %28
9: ; preds = %6
%10 = tail call i64 (...) @test_xindex()
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %28
12: ; preds = %9
%13 = tail call i64 (...) @test_xstrncasecmp()
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %28
15: ; preds = %12
%16 = tail call i64 (...) @test_xstrtok_r()
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %28
18: ; preds = %15
%19 = tail call i64 (...) @test_str_is_trimmable()
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %28
21: ; preds = %18
%22 = tail call i64 (...) @test_str_trim()
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %28
24: ; preds = %21
%25 = tail call i64 (...) @test_toSysPath()
%26 = icmp eq i64 %25, 0
%27 = select i1 %26, i32* @EXIT_SUCCESS, i32* @EXIT_FAILURE
br label %28
28: ; preds = %24, %0, %3, %6, %9, %12, %15, %18, %21
%29 = phi i32* [ @EXIT_FAILURE, %21 ], [ @EXIT_FAILURE, %18 ], [ @EXIT_FAILURE, %15 ], [ @EXIT_FAILURE, %12 ], [ @EXIT_FAILURE, %9 ], [ @EXIT_FAILURE, %6 ], [ @EXIT_FAILURE, %3 ], [ @EXIT_FAILURE, %0 ], [ %27, %24 ]
%30 = load i32, i32* %29
ret i32 %30
}