#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 */
char *strpbrk(char *, char *);
int SplitIRCPrefixNick(char *strCommand, char **strNick) {
  ;
  ;
  if (!strCommand || !strNick)
    return 0;
  if (*strCommand == ':') {
    char *str = strpbrk(++strCommand, "! ");
    if (str) {
      *strNick = strCommand;
      *str = '\0';
      return 1;
    }
  }
  *strNick = 0;
  return 0;
}


x86 assembly (clang, -O0):
<SplitIRCPrefixNick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <SplitIRCPrefixNick+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <SplitIRCPrefixNick+0x32>
movl   $0x0,-0x4(%rbp)
jmp    11ae <SplitIRCPrefixNick+0x9e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jne    119c <SplitIRCPrefixNick+0x8c>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    %rdi,-0x10(%rbp)
lea    0xe9b(%rip),%rsi
call   1030 <strpbrk@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1197 <SplitIRCPrefixNick+0x87>
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    11ae <SplitIRCPrefixNick+0x9e>
jmp    119c <SplitIRCPrefixNick+0x8c>
mov    -0x18(%rbp),%rax
movq   $0x0,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SplitIRCPrefixNick>:
push   %rbp
push   %r14
push   %rbx
xor    %r14d,%r14d
test   %rdi,%rdi
je     1159 <SplitIRCPrefixNick+0x49>
mov    %rsi,%rbx
test   %rsi,%rsi
je     1159 <SplitIRCPrefixNick+0x49>
mov    %rdi,%rbp
cmpb   $0x3a,(%rdi)
jne    1152 <SplitIRCPrefixNick+0x42>
add    $0x1,%rbp
lea    0xec9(%rip),%rsi
mov    %rbp,%rdi
call   1030 <strpbrk@plt>
test   %rax,%rax
je     1152 <SplitIRCPrefixNick+0x42>
mov    %rbp,(%rbx)
movb   $0x0,(%rax)
mov    $0x1,%r14d
jmp    1159 <SplitIRCPrefixNick+0x49>
movq   $0x0,(%rbx)
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"! \00"
define i32 @SplitIRCPrefixNick(i8* %0, i8** writeonly %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8** %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %15
6: ; preds = %2
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 58
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = getelementptr inbounds i8, i8* %0, i64 1
%11 = tail call i8* @strpbrk(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i8* %11, null
br i1 %12, label %14, label %13
13: ; preds = %9
store i8* %10, i8** %1
store i8 0, i8* %11
br label %15
14: ; preds = %9, %6
store i8* null, i8** %1
br label %15
15: ; preds = %13, %2, %14
%16 = phi i32 [ 1, %13 ], [ 0, %14 ], [ 0, %2 ]
ret i32 %16
}