#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*/ auth_set_prefix(char *, char *);
int /*<<< orphan*/ chan_set_prefix(char *);
char *strchr(char *, char);
int /*<<< orphan*/ strcmp(char *, char *);
void isupport_set(char *param, char *value) {
  char *modes, *prefixes, *paren;
  if (!strcmp(param, "CHANTYPES")) {
    chan_set_prefix(value);
  } else if (!strcmp(param, "PREFIX")) {
    if (value) {
      paren = strchr(value, ')');
      *paren = '\0';
      modes = value + 1;
      prefixes = paren + 1;
      auth_set_prefix(modes, prefixes);
    } else {
      auth_set_prefix("", "");
    }
  }
}


x86 assembly (clang, -O0):
<isupport_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea5(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1177 <isupport_set+0x37>
mov    -0x10(%rbp),%rdi
call   1040 <chan_set_prefix@plt>
jmp    11f7 <isupport_set+0xb7>
mov    -0x8(%rbp),%rdi
lea    0xe88(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    11f2 <isupport_set+0xb2>
cmpq   $0x0,-0x10(%rbp)
je     11de <isupport_set+0x9e>
mov    -0x10(%rbp),%rdi
mov    $0x29,%esi
call   1050 <strchr@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <auth_set_prefix@plt>
jmp    11ed <isupport_set+0xad>
lea    0xe24(%rip),%rsi
mov    %rsi,%rdi
call   1030 <auth_set_prefix@plt>
jmp    11f2 <isupport_set+0xb2>
jmp    11f7 <isupport_set+0xb7>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isupport_set>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xeaf(%rip),%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1175 <isupport_set+0x35>
lea    0xea9(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1184 <isupport_set+0x44>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <chan_set_prefix@plt>
test   %r14,%r14
je     11a6 <isupport_set+0x66>
mov    %r14,%rdi
mov    $0x29,%esi
call   1050 <strchr@plt>
movb   $0x0,(%rax)
add    $0x1,%r14
lea    0x1(%rax),%rsi
mov    %r14,%rdi
jmp    11b0 <isupport_set+0x70>
lea    0xe5c(%rip),%rdi
mov    %rdi,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <auth_set_prefix@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"CHANTYPES\00"
@.str.1 = [7 x i8] c"PREFIX\00"
@.str.2 = [1 x i8] zeroinitializer
define void @isupport_set(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %3
%9 = call i32 @strcmp(i8* %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%10 = icmp ne i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = call i32 @chan_set_prefix(i8* %12)
br label %36
14: ; preds = %2
%15 = load i8*, i8** %3
%16 = call i32 @strcmp(i8* %15, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp ne i32 %16, 0
br i1 %17, label %35, label %18
18: ; preds = %14
%19 = load i8*, i8** %4
%20 = icmp ne i8* %19, null
br i1 %20, label %21, label %32
21: ; preds = %18
%22 = load i8*, i8** %4
%23 = call i8* @strchr(i8* %22, i8 signext 41)
store i8* %23, i8** %7
%24 = load i8*, i8** %7
store i8 0, i8* %24
%25 = load i8*, i8** %4
%26 = getelementptr inbounds i8, i8* %25, i64 1
store i8* %26, i8** %5
%27 = load i8*, i8** %7
%28 = getelementptr inbounds i8, i8* %27, i64 1
store i8* %28, i8** %6
%29 = load i8*, i8** %5
%30 = load i8*, i8** %6
%31 = call i32 @auth_set_prefix(i8* %29, i8* %30)
br label %34
32: ; preds = %18
%33 = call i32 @auth_set_prefix(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
br label %34
34: ; preds = %32, %21
br label %35
35: ; preds = %34, %14
br label %36
36: ; preds = %35, %11
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"CHANTYPES\00"
@.str.1 = [7 x i8] c"PREFIX\00"
@.str.2 = [1 x i8] zeroinitializer
define void @isupport_set(i8* nocapture %0, i8* %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @chan_set_prefix(i8* %1)
br label %19
7: ; preds = %2
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %19
10: ; preds = %7
%11 = icmp eq i8* %1, null
br i1 %11, label %17, label %12
12: ; preds = %10
%13 = tail call i8* @strchr(i8* %1, i8 signext 41)
store i8 0, i8* %13
%14 = getelementptr inbounds i8, i8* %1, i64 1
%15 = getelementptr inbounds i8, i8* %13, i64 1
%16 = tail call i32 @auth_set_prefix(i8* %14, i8* %15)
br label %19
17: ; preds = %10
%18 = tail call i32 @auth_set_prefix(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
br label %19
19: ; preds = %7, %17, %12, %5
ret void
}