#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 /*<<< orphan*/ isupport_token(char *);
char *strtok_r(char *, char *, char **);
void handle_isupport(char *prefix, int ncmd, char *params) {
  char *tok, *save;
  tok = strtok_r(params, " ", &save);
  while ((tok = strtok_r(NULL, " ", &save)) && tok[0] != ':')
    isupport_token(tok);
}


x86 assembly (clang, -O0):
<handle_isupport>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xec2(%rip),%rsi
lea    -0x28(%rbp),%rdx
call   1040 <strtok_r@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xeaa(%rip),%rsi
lea    -0x28(%rbp),%rdx
call   1040 <strtok_r@plt>
mov    %rax,%rcx
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x29(%rbp)
je     1185 <handle_isupport+0x65>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
setne  %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
test   $0x1,%al
jne    1195 <handle_isupport+0x75>
jmp    11a3 <handle_isupport+0x83>
mov    -0x20(%rbp),%rdi
call   1030 <isupport_token@plt>
jmp    114b <handle_isupport+0x2b>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_isupport>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rdi
lea    0xed2(%rip),%rbx
mov    %rsp,%r14
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <strtok_r@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <strtok_r@plt>
test   %rax,%rax
je     117f <handle_isupport+0x5f>
lea    0xeab(%rip),%r14
mov    %rsp,%rbx
nopl   0x0(%rax,%rax,1)
cmpb   $0x3a,(%rax)
je     117f <handle_isupport+0x5f>
mov    %rax,%rdi
call   1030 <isupport_token@plt>
xor    %edi,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <strtok_r@plt>
test   %rax,%rax
jne    1160 <handle_isupport+0x40>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define void @handle_isupport(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%9 = load i8*, i8** %6
%10 = call i8* @strtok_r(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %8)
store i8* %10, i8** %7
br label %11
11: ; preds = %22, %3
%12 = call i8* @strtok_r(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %8)
store i8* %12, i8** %7
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %20
14: ; preds = %11
%15 = load i8*, i8** %7
%16 = getelementptr inbounds i8, i8* %15, i64 0
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 58
br label %20
20: ; preds = %14, %11
%21 = phi i1 [ false, %11 ], [ %19, %14 ]
br i1 %21, label %22, label %25
22: ; preds = %20
%23 = load i8*, i8** %7
%24 = call i32 @isupport_token(i8* %23)
br label %11
25: ; preds = %20
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define void @handle_isupport(i8* nocapture readnone %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
%6 = call i8* @strtok_r(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %4)
%7 = call i8* @strtok_r(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %4)
%8 = icmp eq i8* %7, null
br i1 %8, label %17, label %9
9: ; preds = %3, %13
%10 = phi i8* [ %15, %13 ], [ %7, %3 ]
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 58
br i1 %12, label %17, label %13
13: ; preds = %9
%14 = call i32 @isupport_token(i8* %10)
%15 = call i8* @strtok_r(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %4)
%16 = icmp eq i8* %15, null
br i1 %16, label %17, label %9
17: ; preds = %9, %13, %3
ret void
}