#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__ ispunct(int);
scalar_t__ isspace(char const);
int strcspn(char const *, char *);
int strspn(char const *, char *);
int M_JumpWord(const char *line) {
  int c;
  c = line[0];
  if (isspace(c))
    return strspn(line, " ");
  else if (ispunct(c))
    return strspn(line, "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");
  else {
    if (isspace(line[1]))
      return 1 + strspn(&line[1], " ");
    else
      return strcspn(line, " "
                           "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");
  }
}


x86 assembly (clang, -O0):
<M_JumpWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
movsbl %al,%edi
call   1050 <isspace@plt>
cmp    $0x0,%rax
je     1183 <M_JumpWord+0x43>
mov    -0x10(%rbp),%rdi
lea    0xe8a(%rip),%rsi
call   1040 <strspn@plt>
mov    %eax,-0x4(%rbp)
jmp    11f6 <M_JumpWord+0xb6>
mov    -0x14(%rbp),%edi
call   1030 <ispunct@plt>
cmp    $0x0,%rax
je     11ad <M_JumpWord+0x6d>
mov    -0x10(%rbp),%rdi
lea    0xe63(%rip),%rsi
call   1040 <strspn@plt>
mov    %eax,-0x4(%rbp)
jmp    11f6 <M_JumpWord+0xb6>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1050 <isspace@plt>
cmp    $0x0,%rax
je     11e3 <M_JumpWord+0xa3>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0xe2d(%rip),%rsi
call   1040 <strspn@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11f6 <M_JumpWord+0xb6>
mov    -0x10(%rbp),%rdi
lea    0xe14(%rip),%rsi
call   1060 <strcspn@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M_JumpWord>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
movsbl (%rdi),%ebp
mov    %ebp,%edi
call   1050 <isspace@plt>
test   %rax,%rax
je     115e <M_JumpWord+0x1e>
lea    0xea4(%rip),%rsi
jmp    1171 <M_JumpWord+0x31>
mov    %ebp,%edi
call   1030 <ispunct@plt>
test   %rax,%rax
je     117f <M_JumpWord+0x3f>
lea    0xe92(%rip),%rsi
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <strspn@plt>
movsbl 0x1(%rbx),%edi
call   1050 <isspace@plt>
test   %rax,%rax
je     11aa <M_JumpWord+0x6a>
add    $0x1,%rbx
lea    0xe68(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strspn@plt>
add    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe51(%rip),%rsi
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <strcspn@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [33 x i8] c"!\22#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\00"
@.str.2 = [34 x i8] c" !\22#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\00"
define i32 @M_JumpWord(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = trunc i32 %9 to i8
%11 = call i64 @isspace(i8 signext %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %1
%14 = load i8*, i8** %3
%15 = call i32 @strspn(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 %15, i32* %2
br label %37
16: ; preds = %1
%17 = load i32, i32* %4
%18 = call i64 @ispunct(i32 %17)
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = load i8*, i8** %3
%22 = call i32 @strspn(i8* %21, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
store i32 %22, i32* %2
br label %37
23: ; preds = %16
%24 = load i8*, i8** %3
%25 = getelementptr inbounds i8, i8* %24, i64 1
%26 = load i8, i8* %25
%27 = call i64 @isspace(i8 signext %26)
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %34
29: ; preds = %23
%30 = load i8*, i8** %3
%31 = getelementptr inbounds i8, i8* %30, i64 1
%32 = call i32 @strspn(i8* %31, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%33 = add nsw i32 1, %32
store i32 %33, i32* %2
br label %37
34: ; preds = %23
%35 = load i8*, i8** %3
%36 = call i32 @strcspn(i8* %35, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
store i32 %36, i32* %2
br label %37
37: ; preds = %34, %29, %20, %13
%38 = load i32, i32* %2
ret i32 %38
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [33 x i8] c"!\22#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\00"
@.str.2 = [34 x i8] c" !\22#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\00"
define i32 @M_JumpWord(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @isspace(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @strspn(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %23
7: ; preds = %1
%8 = sext i8 %2 to i32
%9 = tail call i64 @ispunct(i32 %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %7
%12 = tail call i32 @strspn(i8* %0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
br label %23
13: ; preds = %7
%14 = getelementptr inbounds i8, i8* %0, i64 1
%15 = load i8, i8* %14
%16 = tail call i64 @isspace(i8 signext %15)
%17 = icmp eq i64 %16, 0
br i1 %17, label %21, label %18
18: ; preds = %13
%19 = tail call i32 @strspn(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%20 = add nsw i32 %19, 1
br label %23
21: ; preds = %13
%22 = tail call i32 @strcspn(i8* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
br label %23
23: ; preds = %21, %18, %11, %5
%24 = phi i32 [ %6, %5 ], [ %12, %11 ], [ %20, %18 ], [ %22, %21 ]
ret i32 %24
}