#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*/ SV_SendServerCommand(void *, int /*<<< orphan*/);
int /*<<< orphan*/ va(char *, char *, char *, char *, char *);
void SendWeaponsChanges(char *weapon, char *an, char *dest, char *value) {
  if (!weapon || !an || !dest || !value)
    return;
  SV_SendServerCommand(((void *)0),
                       va("wpch %s %s %s %s", weapon, an, dest, value));
}


x86 assembly (clang, -O0):
<SendWeaponsChanges>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1164 <SendWeaponsChanges+0x44>
cmpq   $0x0,-0x10(%rbp)
je     1164 <SendWeaponsChanges+0x44>
cmpq   $0x0,-0x18(%rbp)
je     1164 <SendWeaponsChanges+0x44>
cmpq   $0x0,-0x20(%rbp)
jne    1169 <SendWeaponsChanges+0x49>
jmp    1190 <SendWeaponsChanges+0x70>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xe80(%rip),%rdi
call   1040 <va@plt>
mov    %eax,%esi
xor    %eax,%eax
mov    %eax,%edi
call   1030 <SV_SendServerCommand@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SendWeaponsChanges>:
test   %rdi,%rdi
je     1157 <SendWeaponsChanges+0x37>
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
test   %rsi,%rsi
je     1157 <SendWeaponsChanges+0x37>
test   %rcx,%rcx
je     1157 <SendWeaponsChanges+0x37>
test   %r8,%r8
je     1157 <SendWeaponsChanges+0x37>
push   %rax
mov    %rdi,%rsi
lea    0xeb8(%rip),%rdi
call   1040 <va@plt>
xor    %edi,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <SV_SendServerCommand@plt>
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"wpch %s %s %s %s\00"
define void @SendWeaponsChanges(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = icmp ne i8* %0, null
%6 = icmp ne i8* %1, null
%7 = and i1 %5, %6
%8 = icmp ne i8* %2, null
%9 = and i1 %7, %8
%10 = icmp ne i8* %3, null
%11 = and i1 %9, %10
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = tail call i32 @va(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2, i8* %3)
%14 = tail call i32 @SV_SendServerCommand(i8* null, i32 %13)
br label %15
15: ; preds = %4, %12
ret void
}