#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 */
typedef int /*<<< orphan*/ string;
typedef int /*<<< orphan*/ str_log_level;

/* Variables and functions */
int irc_protocol_log_level_for_command(char const *);
int /*<<< orphan*/ snprintf(char *, int, char *, ...);
const char *irc_protocol_tags(const char *command, const char *tags,
                              const char *nick, const char *address) {
  static char string[1024];
  int log_level;
  char str_log_level[32];
  str_log_level[0] = '\0';
  if (!command && !tags && !nick)
    return NULL;
  if (command && command[0]) {
    log_level = irc_protocol_log_level_for_command(command);
    if (log_level > 0) {
      snprintf(str_log_level, sizeof(str_log_level), ",log%d", log_level);
    }
  }
  snprintf(string, sizeof(string), "%s%s%s%s%s%s%s%s%s",
           (command && command[0]) ? "irc_" : "",
           (command && command[0]) ? command : "", (tags && tags[0]) ? "," : "",
           (tags && tags[0]) ? tags : "", (nick && nick[0]) ? ",nick_" : "",
           (nick && nick[0]) ? nick : "",
           (address && address[0]) ? ",host_" : "",
           (address && address[0]) ? address : "", str_log_level);
  return string;
}


x86 assembly (clang, -O0):
<irc_protocol_tags>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %rdi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
movb   $0x0,-0x70(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1172 <irc_protocol_tags+0x52>
cmpq   $0x0,-0x30(%rbp)
jne    1172 <irc_protocol_tags+0x52>
cmpq   $0x0,-0x38(%rbp)
jne    1172 <irc_protocol_tags+0x52>
movq   $0x0,-0x20(%rbp)
jmp    1473 <irc_protocol_tags+0x353>
cmpq   $0x0,-0x28(%rbp)
je     11c2 <irc_protocol_tags+0xa2>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     11c2 <irc_protocol_tags+0xa2>
mov    -0x28(%rbp),%rdi
call   1030 <irc_protocol_log_level_for_command@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jle    11bd <irc_protocol_tags+0x9d>
lea    -0x70(%rbp),%rdi
mov    -0x44(%rbp),%ecx
mov    $0x20,%esi
lea    0xe4a(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
jmp    11c2 <irc_protocol_tags+0xa2>
xor    %eax,%eax
cmpq   $0x0,-0x28(%rbp)
mov    %al,-0x71(%rbp)
je     11e2 <irc_protocol_tags+0xc2>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x71(%rbp)
mov    -0x71(%rbp),%dl
lea    0xe34(%rip),%rax
lea    0xe27(%rip),%rcx
test   $0x1,%dl
cmovne %rcx,%rax
mov    %rax,-0x80(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1229 <irc_protocol_tags+0x109>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1229 <irc_protocol_tags+0x109>
mov    -0x28(%rbp),%rax
mov    %rax,-0x88(%rbp)
jmp    123c <irc_protocol_tags+0x11c>
lea    0xdf0(%rip),%rax
mov    %rax,-0x88(%rbp)
jmp    123c <irc_protocol_tags+0x11c>
mov    -0x88(%rbp),%rax
mov    %rax,-0x98(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x30(%rbp)
mov    %al,-0x89(%rbp)
je     1270 <irc_protocol_tags+0x150>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x89(%rbp)
mov    -0x89(%rbp),%dl
lea    0xda3(%rip),%rax
lea    0xd9b(%rip),%rcx
test   $0x1,%dl
cmovne %rcx,%rax
mov    %rax,-0xa0(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     12bd <irc_protocol_tags+0x19d>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     12bd <irc_protocol_tags+0x19d>
mov    -0x30(%rbp),%rax
mov    %rax,-0xa8(%rbp)
jmp    12d0 <irc_protocol_tags+0x1b0>
lea    0xd5c(%rip),%rax
mov    %rax,-0xa8(%rbp)
jmp    12d0 <irc_protocol_tags+0x1b0>
mov    -0xa8(%rbp),%rax
mov    %rax,-0xb8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x38(%rbp)
mov    %al,-0xa9(%rbp)
je     1304 <irc_protocol_tags+0x1e4>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0xa9(%rbp)
mov    -0xa9(%rbp),%dl
lea    0xd0f(%rip),%rax
lea    0xd09(%rip),%rcx
test   $0x1,%dl
cmovne %rcx,%rax
mov    %rax,-0xc0(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     1351 <irc_protocol_tags+0x231>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1351 <irc_protocol_tags+0x231>
mov    -0x38(%rbp),%rax
mov    %rax,-0xc8(%rbp)
jmp    1364 <irc_protocol_tags+0x244>
lea    0xcc8(%rip),%rax
mov    %rax,-0xc8(%rbp)
jmp    1364 <irc_protocol_tags+0x244>
mov    -0xc8(%rbp),%rax
mov    %rax,-0xd8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x40(%rbp)
mov    %al,-0xc9(%rbp)
je     1398 <irc_protocol_tags+0x278>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0xc9(%rbp)
mov    -0xc9(%rbp),%dl
lea    0xc7b(%rip),%rax
lea    0xc7c(%rip),%rcx
test   $0x1,%dl
cmovne %rcx,%rax
mov    %rax,-0xe0(%rbp)
cmpq   $0x0,-0x40(%rbp)
je     13e5 <irc_protocol_tags+0x2c5>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     13e5 <irc_protocol_tags+0x2c5>
mov    -0x40(%rbp),%rax
mov    %rax,-0xe8(%rbp)
jmp    13f8 <irc_protocol_tags+0x2d8>
lea    0xc34(%rip),%rax
mov    %rax,-0xe8(%rbp)
jmp    13f8 <irc_protocol_tags+0x2d8>
mov    -0xe0(%rbp),%r11
mov    -0xd8(%rbp),%rbx
mov    -0xc0(%rbp),%r14
mov    -0xb8(%rbp),%r15
mov    -0xa0(%rbp),%r9
mov    -0x98(%rbp),%r8
mov    -0x80(%rbp),%rcx
mov    -0xe8(%rbp),%r10
lea    -0x70(%rbp),%rax
lea    0x2c08(%rip),%rdi
mov    $0x400,%esi
lea    0xbc3(%rip),%rdx
mov    %r15,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
mov    $0x0,%al
call   1040 <snprintf@plt>
lea    0x2bd1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x108,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_protocol_tags>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
movb   $0x0,(%rsp)
test   %rdi,%rdi
jne    1153 <irc_protocol_tags+0x33>
test   %r12,%r12
jne    1153 <irc_protocol_tags+0x33>
test   %r15,%r15
jne    1153 <irc_protocol_tags+0x33>
xor    %ebx,%ebx
jmp    1250 <irc_protocol_tags+0x130>
lea    0xec6(%rip),%r13
mov    %r13,%rcx
mov    %r13,%r8
test   %rbx,%rbx
je     11aa <irc_protocol_tags+0x8a>
cmpb   $0x0,(%rbx)
je     118e <irc_protocol_tags+0x6e>
mov    %rbx,%rdi
call   1030 <irc_protocol_log_level_for_command@plt>
test   %eax,%eax
jle    118e <irc_protocol_tags+0x6e>
lea    0xe83(%rip),%rdx
mov    %rsp,%rdi
mov    $0x20,%esi
mov    %eax,%ecx
xor    %eax,%eax
call   1040 <snprintf@plt>
cmpb   $0x0,(%rbx)
lea    0xe88(%rip),%rax
lea    0xe7b(%rip),%rcx
cmove  %rax,%rcx
cmove  %rax,%rbx
mov    %rbx,%r8
mov    %r13,%r9
mov    %r13,%r10
test   %r12,%r12
je     11d3 <irc_protocol_tags+0xb3>
cmpb   $0x0,(%r12)
lea    0xe5f(%rip),%rax
lea    0xe57(%rip),%r9
cmove  %rax,%r9
cmove  %rax,%r12
mov    %r12,%r10
mov    %r13,%r11
mov    %r13,%r12
test   %r15,%r15
je     11fb <irc_protocol_tags+0xdb>
cmpb   $0x0,(%r15)
lea    0xe37(%rip),%rax
lea    0xe31(%rip),%r11
cmove  %rax,%r11
cmove  %rax,%r15
mov    %r15,%r12
mov    %r13,%r15
test   %r14,%r14
je     1220 <irc_protocol_tags+0x100>
cmpb   $0x0,(%r14)
lea    0xe12(%rip),%rax
lea    0xe13(%rip),%r13
cmove  %rax,%r13
cmove  %rax,%r14
mov    %r14,%r15
mov    %rsp,%r14
lea    0x2e16(%rip),%rbx
lea    0xdd6(%rip),%rdx
mov    %rbx,%rdi
mov    $0x400,%esi
xor    %eax,%eax
push   %r14
push   %r15
push   %r13
push   %r12
push   %r11
push   %r10
call   1040 <snprintf@plt>
add    $0x30,%rsp
mov    %rbx,%rax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@irc_protocol_tags.string = internal global [1024 x i8] zeroinitializer
@.str = [7 x i8] c",log%d\00"
@.str.1 = [19 x i8] c"%s%s%s%s%s%s%s%s%s\00"
@.str.2 = [5 x i8] c"irc_\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [2 x i8] c",\00"
@.str.5 = [7 x i8] c",nick_\00"
@.str.6 = [7 x i8] c",host_\00"
define i8* @irc_protocol_tags(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca [32 x i8]
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
store i8 0, i8* %12
%13 = load i8*, i8** %6
%14 = icmp ne i8* %13, null
br i1 %14, label %22, label %15
15: ; preds = %4
%16 = load i8*, i8** %7
%17 = icmp ne i8* %16, null
br i1 %17, label %22, label %18
18: ; preds = %15
%19 = load i8*, i8** %8
%20 = icmp ne i8* %19, null
br i1 %20, label %22, label %21
21: ; preds = %18
store i8* null, i8** %5
br label %144
22: ; preds = %18, %15, %4
%23 = load i8*, i8** %6
%24 = icmp ne i8* %23, null
br i1 %24, label %25, label %41
25: ; preds = %22
%26 = load i8*, i8** %6
%27 = getelementptr inbounds i8, i8* %26, i64 0
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %41
31: ; preds = %25
%32 = load i8*, i8** %6
%33 = call i32 @irc_protocol_log_level_for_command(i8* %32)
store i32 %33, i32* %10
%34 = load i32, i32* %10
%35 = icmp sgt i32 %34, 0
br i1 %35, label %36, label %40
36: ; preds = %31
%37 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%38 = load i32, i32* %10
%39 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %37, i32 32, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %38)
br label %40
40: ; preds = %36, %31
br label %41
41: ; preds = %40, %25, %22
%42 = load i8*, i8** %6
%43 = icmp ne i8* %42, null
br i1 %43, label %44, label %50
44: ; preds = %41
%45 = load i8*, i8** %6
%46 = getelementptr inbounds i8, i8* %45, i64 0
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp ne i32 %48, 0
br label %50
50: ; preds = %44, %41
%51 = phi i1 [ false, %41 ], [ %49, %44 ]
%52 = zext i1 %51 to i64
%53 = select i1 %51, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
%54 = load i8*, i8** %6
%55 = icmp ne i8* %54, null
br i1 %55, label %56, label %64
56: ; preds = %50
%57 = load i8*, i8** %6
%58 = getelementptr inbounds i8, i8* %57, i64 0
%59 = load i8, i8* %58
%60 = sext i8 %59 to i32
%61 = icmp ne i32 %60, 0
br i1 %61, label %62, label %64
62: ; preds = %56
%63 = load i8*, i8** %6
br label %65
64: ; preds = %56, %50
br label %65
65: ; preds = %64, %62
%66 = phi i8* [ %63, %62 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), %64 ]
%67 = load i8*, i8** %7
%68 = icmp ne i8* %67, null
br i1 %68, label %69, label %75
69: ; preds = %65
%70 = load i8*, i8** %7
%71 = getelementptr inbounds i8, i8* %70, i64 0
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = icmp ne i32 %73, 0
br label %75
75: ; preds = %69, %65
%76 = phi i1 [ false, %65 ], [ %74, %69 ]
%77 = zext i1 %76 to i64
%78 = select i1 %76, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
%79 = load i8*, i8** %7
%80 = icmp ne i8* %79, null
br i1 %80, label %81, label %89
81: ; preds = %75
%82 = load i8*, i8** %7
%83 = getelementptr inbounds i8, i8* %82, i64 0
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = icmp ne i32 %85, 0
br i1 %86, label %87, label %89
87: ; preds = %81
%88 = load i8*, i8** %7
br label %90
89: ; preds = %81, %75
br label %90
90: ; preds = %89, %87
%91 = phi i8* [ %88, %87 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), %89 ]
%92 = load i8*, i8** %8
%93 = icmp ne i8* %92, null
br i1 %93, label %94, label %100
94: ; preds = %90
%95 = load i8*, i8** %8
%96 = getelementptr inbounds i8, i8* %95, i64 0
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = icmp ne i32 %98, 0
br label %100
100: ; preds = %94, %90
%101 = phi i1 [ false, %90 ], [ %99, %94 ]
%102 = zext i1 %101 to i64
%103 = select i1 %101, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
%104 = load i8*, i8** %8
%105 = icmp ne i8* %104, null
br i1 %105, label %106, label %114
106: ; preds = %100
%107 = load i8*, i8** %8
%108 = getelementptr inbounds i8, i8* %107, i64 0
%109 = load i8, i8* %108
%110 = sext i8 %109 to i32
%111 = icmp ne i32 %110, 0
br i1 %111, label %112, label %114
112: ; preds = %106
%113 = load i8*, i8** %8
br label %115
114: ; preds = %106, %100
br label %115
115: ; preds = %114, %112
%116 = phi i8* [ %113, %112 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), %114 ]
%117 = load i8*, i8** %9
%118 = icmp ne i8* %117, null
br i1 %118, label %119, label %125
119: ; preds = %115
%120 = load i8*, i8** %9
%121 = getelementptr inbounds i8, i8* %120, i64 0
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
%124 = icmp ne i32 %123, 0
br label %125
125: ; preds = %119, %115
%126 = phi i1 [ false, %115 ], [ %124, %119 ]
%127 = zext i1 %126 to i64
%128 = select i1 %126, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
%129 = load i8*, i8** %9
%130 = icmp ne i8* %129, null
br i1 %130, label %131, label %139
131: ; preds = %125
%132 = load i8*, i8** %9
%133 = getelementptr inbounds i8, i8* %132, i64 0
%134 = load i8, i8* %133
%135 = sext i8 %134 to i32
%136 = icmp ne i32 %135, 0
br i1 %136, label %137, label %139
137: ; preds = %131
%138 = load i8*, i8** %9
br label %140
139: ; preds = %131, %125
br label %140
140: ; preds = %139, %137
%141 = phi i8* [ %138, %137 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), %139 ]
%142 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%143 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @irc_protocol_tags.string, i64 0, i64 0), i32 1024, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %53, i8* %66, i8* %78, i8* %91, i8* %103, i8* %116, i8* %128, i8* %141, i8* %142)
store i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @irc_protocol_tags.string, i64 0, i64 0), i8** %5
br label %144
144: ; preds = %140, %21
%145 = load i8*, i8** %5
ret i8* %145
}

LLVM IR (-O2):
@irc_protocol_tags.string = internal global [1024 x i8] zeroinitializer
@.str = [7 x i8] c",log%d\00"
@.str.1 = [19 x i8] c"%s%s%s%s%s%s%s%s%s\00"
@.str.2 = [5 x i8] c"irc_\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [2 x i8] c",\00"
@.str.5 = [7 x i8] c",nick_\00"
@.str.6 = [7 x i8] c",host_\00"
define i8* @irc_protocol_tags(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca [32 x i8]
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
store i8 0, i8* %6
%7 = icmp ne i8* %0, null
%8 = icmp ne i8* %1, null
%9 = or i1 %7, %8
%10 = icmp ne i8* %2, null
%11 = or i1 %9, %10
br i1 %11, label %12, label %55
12: ; preds = %4
br i1 %7, label %13, label %26
13: ; preds = %12
%14 = load i8, i8* %0
%15 = icmp eq i8 %14, 0
br i1 %15, label %21, label %16
16: ; preds = %13
%17 = tail call i32 @irc_protocol_log_level_for_command(i8* %0)
%18 = icmp sgt i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %6, i32 32, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %17)
br label %21
21: ; preds = %16, %19, %13
%22 = load i8, i8* %0
%23 = icmp eq i8 %22, 0
%24 = select i1 %23, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%25 = select i1 %23, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* %0
br label %26
26: ; preds = %12, %21
%27 = phi i8* [ %24, %21 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), %12 ]
%28 = phi i8* [ %25, %21 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), %12 ]
br i1 %8, label %29, label %34
29: ; preds = %26
%30 = load i8, i8* %1
%31 = icmp eq i8 %30, 0
%32 = select i1 %31, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0)
%33 = select i1 %31, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* %1
br label %34
34: ; preds = %26, %29
%35 = phi i8* [ %32, %29 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), %26 ]
%36 = phi i8* [ %33, %29 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), %26 ]
br i1 %10, label %37, label %42
37: ; preds = %34
%38 = load i8, i8* %2
%39 = icmp eq i8 %38, 0
%40 = select i1 %39, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0)
%41 = select i1 %39, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* %2
br label %42
42: ; preds = %34, %37
%43 = phi i8* [ %40, %37 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), %34 ]
%44 = phi i8* [ %41, %37 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), %34 ]
%45 = icmp eq i8* %3, null
br i1 %45, label %51, label %46
46: ; preds = %42
%47 = load i8, i8* %3
%48 = icmp eq i8 %47, 0
%49 = select i1 %48, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0)
%50 = select i1 %48, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* %3
br label %51
51: ; preds = %42, %46
%52 = phi i8* [ %49, %46 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), %42 ]
%53 = phi i8* [ %50, %46 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), %42 ]
%54 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @irc_protocol_tags.string, i64 0, i64 0), i32 1024, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %27, i8* %28, i8* %35, i8* %36, i8* %43, i8* %44, i8* %52, i8* %53, i8* %6)
br label %55
55: ; preds = %4, %51
%56 = phi i8* [ getelementptr inbounds ([1024 x i8], [1024 x i8]* @irc_protocol_tags.string, i64 0, i64 0), %51 ], [ null, %4 ]
ret i8* %56
}