#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 */
scalar_t__ iscntrl(unsigned char);
scalar_t__ isspace(unsigned char);
void skip_whitespace(const char **cursor) {
  if (**cursor == '\0')
    return;
  while (iscntrl((unsigned char)**cursor) || isspace((unsigned char)**cursor))
    ++(*cursor);
}


x86 assembly (clang, -O0):
<skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1144 <skip_whitespace+0x24>
jmp    11a6 <skip_whitespace+0x86>
jmp    1149 <skip_whitespace+0x29>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl (%rax),%edi
call   1030 <iscntrl@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    1183 <skip_whitespace+0x63>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1193 <skip_whitespace+0x73>
jmp    11a6 <skip_whitespace+0x86>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1149 <skip_whitespace+0x29>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_whitespace>:
push   %rbx
mov    (%rdi),%rax
mov    (%rax),%al
test   %al,%al
je     115b <skip_whitespace+0x3b>
mov    %rdi,%rbx
jmp    113e <skip_whitespace+0x1e>
nop
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movzbl 0x1(%rax),%eax
movzbl %al,%edi
call   1030 <iscntrl@plt>
test   %rax,%rax
jne    1130 <skip_whitespace+0x10>
mov    (%rbx),%rax
movzbl (%rax),%edi
call   1040 <isspace@plt>
test   %rax,%rax
jne    1130 <skip_whitespace+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @skip_whitespace(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
br label %28
9: ; preds = %1
br label %10
10: ; preds = %24, %9
%11 = load i8**, i8*** %2
%12 = load i8*, i8** %11
%13 = load i8, i8* %12
%14 = call i64 @iscntrl(i8 zeroext %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %22, label %16
16: ; preds = %10
%17 = load i8**, i8*** %2
%18 = load i8*, i8** %17
%19 = load i8, i8* %18
%20 = call i64 @isspace(i8 zeroext %19)
%21 = icmp ne i64 %20, 0
br label %22
22: ; preds = %16, %10
%23 = phi i1 [ true, %10 ], [ %21, %16 ]
br i1 %23, label %24, label %28
24: ; preds = %22
%25 = load i8**, i8*** %2
%26 = load i8*, i8** %25
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %25
br label %10
28: ; preds = %8, %22
ret void
}

LLVM IR (-O2):
define void @skip_whitespace(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
br i1 %4, label %18, label %5
5: ; preds = %1, %14
%6 = phi i8 [ %17, %14 ], [ %3, %1 ]
%7 = tail call i64 @iscntrl(i8 zeroext %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = load i8*, i8** %0
%11 = load i8, i8* %10
%12 = tail call i64 @isspace(i8 zeroext %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %5, %9
%15 = load i8*, i8** %0
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8* %16, i8** %0
%17 = load i8, i8* %16
br label %5
18: ; preds = %9, %1
ret void
}