#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 */
struct t_irc_channel {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ irc_channel_nick_speaking_add_to_list(struct t_irc_channel *,
                                                         char const *, int);
void irc_channel_nick_speaking_add(struct t_irc_channel *channel,
                                   const char *nick_name, int highlight) {
  if (highlight < 0)
    highlight = 0;
  if (highlight > 1)
    highlight = 1;
  if (highlight)
    irc_channel_nick_speaking_add_to_list(channel, nick_name, 1);
  irc_channel_nick_speaking_add_to_list(channel, nick_name, 0);
}


x86 assembly (clang, -O0):
<irc_channel_nick_speaking_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1134 <irc_channel_nick_speaking_add+0x24>
movl   $0x0,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jle    1145 <irc_channel_nick_speaking_add+0x35>
movl   $0x1,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1161 <irc_channel_nick_speaking_add+0x51>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1030 <irc_channel_nick_speaking_add_to_list@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <irc_channel_nick_speaking_add_to_list@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_channel_nick_speaking_add>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
test   %edx,%edx
jle    112e <irc_channel_nick_speaking_add+0x1e>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <irc_channel_nick_speaking_add_to_list@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %edx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <irc_channel_nick_speaking_add_to_list@plt>

LLVM IR (-O0):
%struct.t_irc_channel = type { i32 }
define void @irc_channel_nick_speaking_add(%struct.t_irc_channel* %0, i8* %1, i32 %2) {
%4 = alloca %struct.t_irc_channel*
%5 = alloca i8*
%6 = alloca i32
store %struct.t_irc_channel* %0, %struct.t_irc_channel** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %3
store i32 0, i32* %6
br label %10
10: ; preds = %9, %3
%11 = load i32, i32* %6
%12 = icmp sgt i32 %11, 1
br i1 %12, label %13, label %14
13: ; preds = %10
store i32 1, i32* %6
br label %14
14: ; preds = %13, %10
%15 = load i32, i32* %6
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load %struct.t_irc_channel*, %struct.t_irc_channel** %4
%19 = load i8*, i8** %5
%20 = call i32 @irc_channel_nick_speaking_add_to_list(%struct.t_irc_channel* %18, i8* %19, i32 1)
br label %21
21: ; preds = %17, %14
%22 = load %struct.t_irc_channel*, %struct.t_irc_channel** %4
%23 = load i8*, i8** %5
%24 = call i32 @irc_channel_nick_speaking_add_to_list(%struct.t_irc_channel* %22, i8* %23, i32 0)
ret void
}

LLVM IR (-O2):
%struct.t_irc_channel = type { i32 }
define void @irc_channel_nick_speaking_add(%struct.t_irc_channel* %0, i8* %1, i32 %2) {
%4 = icmp slt i32 %2, 1
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @irc_channel_nick_speaking_add_to_list(%struct.t_irc_channel* %0, i8* %1, i32 1)
br label %7
7: ; preds = %5, %3
%8 = tail call i32 @irc_channel_nick_speaking_add_to_list(%struct.t_irc_channel* %0, i8* %1, i32 0)
ret void
}