#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 */
__attribute__((pure)) char *str_skip_char_space(char *restrict str) {
  if (!str)
    return NULL;
  while (((*str >= ' ') && (*str <= '~')) || (*str < 0) || (*str == '\t'))
    str++;
  return str;
}


x86 assembly (clang, -O0):
<str_skip_char_space>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1120 <str_skip_char_space+0x20>
movq   $0x0,-0x8(%rbp)
jmp    1198 <str_skip_char_space+0x98>
jmp    1125 <str_skip_char_space+0x25>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jl     114a <str_skip_char_space+0x4a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x7e,%ecx
mov    %al,-0x11(%rbp)
jle    116f <str_skip_char_space+0x6f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
jl     116f <str_skip_char_space+0x6f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    117f <str_skip_char_space+0x7f>
jmp    1190 <str_skip_char_space+0x90>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1125 <str_skip_char_space+0x25>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_skip_char_space>:
test   %rdi,%rdi
je     1129 <str_skip_char_space+0x29>
mov    %rdi,%rax
jmp    1114 <str_skip_char_space+0x14>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rax
movzbl (%rax),%ecx
lea    -0x7f(%rcx),%edx
cmp    $0xa0,%dl
ja     1110 <str_skip_char_space+0x10>
test   %cl,%cl
js     1110 <str_skip_char_space+0x10>
cmp    $0x9,%cl
je     1110 <str_skip_char_space+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @str_skip_char_space(i8* noalias %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i8* null, i8** %2
br label %35
7: ; preds = %1
br label %8
8: ; preds = %30, %7
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp sge i32 %11, 32
br i1 %12, label %13, label %18
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 126
br i1 %17, label %28, label %18
18: ; preds = %13, %8
%19 = load i8*, i8** %3
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp slt i32 %21, 0
br i1 %22, label %28, label %23
23: ; preds = %18
%24 = load i8*, i8** %3
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 9
br label %28
28: ; preds = %23, %18, %13
%29 = phi i1 [ true, %18 ], [ true, %13 ], [ %27, %23 ]
br i1 %29, label %30, label %33
30: ; preds = %28
%31 = load i8*, i8** %3
%32 = getelementptr inbounds i8, i8* %31, i32 1
store i8* %32, i8** %3
br label %8
33: ; preds = %28
%34 = load i8*, i8** %3
store i8* %34, i8** %2
br label %35
35: ; preds = %33, %6
%36 = load i8*, i8** %2
ret i8* %36
}

LLVM IR (-O2):
define i8* @str_skip_char_space(i8* noalias %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %14, label %3
3: ; preds = %1, %12
%4 = phi i8* [ %13, %12 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = add i8 %5, -127
%7 = icmp ult i8 %6, -95
br i1 %7, label %8, label %12
8: ; preds = %3
%9 = icmp slt i8 %5, 0
%10 = icmp eq i8 %5, 9
%11 = or i1 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %3, %8
%13 = getelementptr inbounds i8, i8* %4, i64 1
br label %3
14: ; preds = %8, %1
%15 = phi i8* [ null, %1 ], [ %4, %8 ]
ret i8* %15
}