#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 */
typedef int int32_t;

/* Variables and functions */
int32_t is_file_path_valid(const char *path) {
  while (*path) {
    switch (*path) {
    case '*':
      return 0;
      break;
    case '?':
      return 0;
      break;
    case '"':
      return 0;
      break;
    case '<':
      return 0;
      break;
    case '>':
      return 0;
      break;
    case '|':
      return 0;
      break;
    default:
      break;
    }
    ++path;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_file_path_valid>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     11e0 <is_file_path_valid+0xe0>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
sub    $0x22,%eax
je     119a <is_file_path_valid+0x9a>
jmp    112d <is_file_path_valid+0x2d>
mov    -0x14(%rbp),%eax
sub    $0x2a,%eax
je     1182 <is_file_path_valid+0x82>
jmp    113e <is_file_path_valid+0x3e>
mov    -0x14(%rbp),%eax
sub    $0x3c,%eax
je     11a6 <is_file_path_valid+0xa6>
jmp    114f <is_file_path_valid+0x4f>
mov    -0x14(%rbp),%eax
sub    $0x3e,%eax
je     11b2 <is_file_path_valid+0xb2>
jmp    1160 <is_file_path_valid+0x60>
mov    -0x14(%rbp),%eax
sub    $0x3f,%eax
je     118e <is_file_path_valid+0x8e>
jmp    1171 <is_file_path_valid+0x71>
mov    -0x14(%rbp),%eax
sub    $0x7c,%eax
je     11be <is_file_path_valid+0xbe>
jmp    11ca <is_file_path_valid+0xca>
movl   $0x0,-0x4(%rbp)
jmp    11e7 <is_file_path_valid+0xe7>
movl   $0x0,-0x4(%rbp)
jmp    11e7 <is_file_path_valid+0xe7>
movl   $0x0,-0x4(%rbp)
jmp    11e7 <is_file_path_valid+0xe7>
movl   $0x0,-0x4(%rbp)
jmp    11e7 <is_file_path_valid+0xe7>
movl   $0x0,-0x4(%rbp)
jmp    11e7 <is_file_path_valid+0xe7>
movl   $0x0,-0x4(%rbp)
jmp    11e7 <is_file_path_valid+0xe7>
jmp    11cf <is_file_path_valid+0xcf>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <is_file_path_valid+0x8>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_file_path_valid>:
mov    (%rdi),%al
test   %al,%al
je     1140 <is_file_path_valid+0x40>
add    $0x1,%rdi
movabs $0xd000040400000000,%rcx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%edx
xor    %eax,%eax
cmp    $0x3f,%edx
ja     1130 <is_file_path_valid+0x30>
bt     %rdx,%rcx
jb     1145 <is_file_path_valid+0x45>
cmp    $0x7c,%edx
je     1145 <is_file_path_valid+0x45>
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1120 <is_file_path_valid+0x20>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @is_file_path_valid(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %19, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %22
8: ; preds = %4
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
switch i32 %11, label %18 [
i32 42, label %12
i32 63, label %13
i32 34, label %14
i32 60, label %15
i32 62, label %16
i32 124, label %17
]
12: ; preds = %8
store i32 0, i32* %2
br label %23
13: ; preds = %8
store i32 0, i32* %2
br label %23
14: ; preds = %8
store i32 0, i32* %2
br label %23
15: ; preds = %8
store i32 0, i32* %2
br label %23
16: ; preds = %8
store i32 0, i32* %2
br label %23
17: ; preds = %8
store i32 0, i32* %2
br label %23
18: ; preds = %8
br label %19
19: ; preds = %18
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %3
br label %4
22: ; preds = %4
store i32 1, i32* %2
br label %23
23: ; preds = %22, %17, %16, %15, %14, %13, %12
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @is_file_path_valid(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %8
%5 = phi i8 [ %10, %8 ], [ %2, %1 ]
%6 = phi i8* [ %9, %8 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
switch i32 %7, label %8 [
i32 42, label %12
i32 63, label %12
i32 34, label %12
i32 60, label %12
i32 62, label %12
i32 124, label %12
]
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %4, %4, %4, %4, %4, %8, %1
%13 = phi i32 [ 1, %1 ], [ 1, %8 ], [ 0, %4 ], [ 0, %4 ], [ 0, %4 ], [ 0, %4 ], [ 0, %4 ], [ 0, %4 ]
ret i32 %13
}