#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*/ mapif_sendall(unsigned char *, int);
int mapif_party_leader_changed(int party_id, int old_account_id,
                               int account_id) {
  unsigned char buf[16];
  (*(unsigned short *)(((unsigned char *)(buf)) + (0))) = 0x3828;
  (*(unsigned int *)(((unsigned char *)(buf)) + (2))) = party_id;
  (*(unsigned int *)(((unsigned char *)(buf)) + (6))) = old_account_id;
  (*(unsigned int *)(((unsigned char *)(buf)) + (10))) = account_id;
  mapif_sendall(buf, 14);
  return 0;
}


x86 assembly (clang, -O0):
<mapif_party_leader_changed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movw   $0x3828,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1e(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1a(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x16(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0xe,%esi
call   1030 <mapif_sendall@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapif_party_leader_changed>:
sub    $0x18,%rsp
movw   $0x3828,(%rsp)
mov    %edi,0x2(%rsp)
mov    %esi,0x6(%rsp)
mov    %edx,0xa(%rsp)
mov    %rsp,%rdi
mov    $0xe,%esi
call   1030 <mapif_sendall@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @mapif_party_leader_changed(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [16 x i8]
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = bitcast i8* %9 to i16*
store i16 14376, i16* %10
%11 = load i32, i32* %4
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%13 = getelementptr inbounds i8, i8* %12, i64 2
%14 = bitcast i8* %13 to i32*
store i32 %11, i32* %14
%15 = load i32, i32* %5
%16 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%17 = getelementptr inbounds i8, i8* %16, i64 6
%18 = bitcast i8* %17 to i32*
store i32 %15, i32* %18
%19 = load i32, i32* %6
%20 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%21 = getelementptr inbounds i8, i8* %20, i64 10
%22 = bitcast i8* %21 to i32*
store i32 %19, i32* %22
%23 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%24 = call i32 @mapif_sendall(i8* %23, i32 14)
ret i32 0
}

LLVM IR (-O2):
define i32 @mapif_party_leader_changed(i32 %0, i32 %1, i32 %2) {
%4 = alloca [16 x i8]
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%6 = bitcast [16 x i8]* %4 to i16*
store i16 14376, i16* %6
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 2
%8 = bitcast i8* %7 to i32*
store i32 %0, i32* %8
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 6
%10 = bitcast i8* %9 to i32*
store i32 %1, i32* %10
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 10
%12 = bitcast i8* %11 to i32*
store i32 %2, i32* %12
%13 = call i32 @mapif_sendall(i8* %5, i32 14)
ret i32 0
}