#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 userinfo {
  int dummy;
};
struct instance_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ IRC_SendAction(struct instance_data *, char *, char *);
int /*<<< orphan*/ IRC_SendMessage(struct instance_data *, char *, char *);
void CMD_do(struct instance_data *pID, struct userinfo *pUI, char *szChannel,
            unsigned int iArgc, char **ppArgs, char *szArgsRaw) {
  if (iArgc)
    IRC_SendAction(pID, szChannel, szArgsRaw);
  else
    IRC_SendMessage(pID, szChannel, "Usage: .do [command]");
}


x86 assembly (clang, -O0):
<CMD_do>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     115f <CMD_do+0x3f>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1040 <IRC_SendAction@plt>
jmp    1173 <CMD_do+0x53>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xe92(%rip),%rdx
call   1030 <IRC_SendMessage@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CMD_do>:
test   %ecx,%ecx
je     112f <CMD_do+0xf>
mov    %rdx,%rsi
mov    %r9,%rdx
jmp    1040 <IRC_SendAction@plt>
lea    0xeca(%rip),%rax
mov    %rdx,%rsi
mov    %rax,%rdx
jmp    1030 <IRC_SendMessage@plt>

LLVM IR (-O0):
%struct.instance_data = type { i32 }
%struct.userinfo = type { i32 }
@.str = [21 x i8] c"Usage: .do [command]\00"
define void @CMD_do(%struct.instance_data* %0, %struct.userinfo* %1, i8* %2, i32 %3, i8** %4, i8* %5) {
%7 = alloca %struct.instance_data*
%8 = alloca %struct.userinfo*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8**
%12 = alloca i8*
store %struct.instance_data* %0, %struct.instance_data** %7
store %struct.userinfo* %1, %struct.userinfo** %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i8** %4, i8*** %11
store i8* %5, i8** %12
%13 = load i32, i32* %10
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %20
15: ; preds = %6
%16 = load %struct.instance_data*, %struct.instance_data** %7
%17 = load i8*, i8** %9
%18 = load i8*, i8** %12
%19 = call i32 @IRC_SendAction(%struct.instance_data* %16, i8* %17, i8* %18)
br label %24
20: ; preds = %6
%21 = load %struct.instance_data*, %struct.instance_data** %7
%22 = load i8*, i8** %9
%23 = call i32 @IRC_SendMessage(%struct.instance_data* %21, i8* %22, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %24
24: ; preds = %20, %15
ret void
}

LLVM IR (-O2):
%struct.instance_data = type { i32 }
%struct.userinfo = type { i32 }
@.str = [21 x i8] c"Usage: .do [command]\00"
define void @CMD_do(%struct.instance_data* %0, %struct.userinfo* nocapture readnone %1, i8* %2, i32 %3, i8** nocapture readnone %4, i8* %5) {
%7 = icmp eq i32 %3, 0
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 @IRC_SendAction(%struct.instance_data* %0, i8* %2, i8* %5)
br label %12
10: ; preds = %6
%11 = tail call i32 @IRC_SendMessage(%struct.instance_data* %0, i8* %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
ret void
}