#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 /*<<< orphan*/ memcpy(unsigned char *, char *, int);
int /*<<< orphan*/ printf(char *, int, int, char *);
int mapif_party_leaved(int party_id, int account_id, char *name) {
  unsigned char buf[64];
  (*(unsigned short *)(((unsigned char *)((buf))) + ((0)))) = 0x3824;
  (*(unsigned int *)(((unsigned char *)((buf))) + ((2)))) = party_id;
  (*(unsigned int *)(((unsigned char *)((buf))) + ((6)))) = account_id;
  memcpy((((unsigned char *)(buf)) + (10)), name, 24);
  mapif_sendall(buf, 34);
  printf("int_party: party leaved %d %d %s\n", party_id, account_id, name);
  return 0;
}


x86 assembly (clang, -O0):
<mapif_party_leaved>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movw   $0x3824,-0x50(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4e(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4a(%rbp)
lea    -0x50(%rbp),%rdi
add    $0xa,%rdi
mov    -0x10(%rbp),%rsi
mov    $0x18,%edx
call   1050 <memcpy@plt>
lea    -0x50(%rbp),%rdi
mov    $0x22,%esi
call   1030 <mapif_sendall@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xe77(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapif_party_leaved>:
push   %rbp
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
movw   $0x3824,(%rsp)
mov    %edi,0x2(%rsp)
mov    %esi,0x6(%rsp)
lea    0xa(%rsp),%rdi
mov    %rdx,%rsi
mov    $0x18,%edx
call   1050 <memcpy@plt>
mov    %rsp,%rdi
mov    $0x22,%esi
call   1030 <mapif_sendall@plt>
lea    0xe8d(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14,%rcx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"int_party: party leaved %d %d %s\0A\00"
define i32 @mapif_party_leaved(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca [64 x i8]
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = bitcast i8* %9 to i16*
store i16 14372, i16* %10
%11 = load i32, i32* %4
%12 = getelementptr inbounds [64 x i8], [64 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 [64 x i8], [64 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 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%20 = getelementptr inbounds i8, i8* %19, i64 10
%21 = load i8*, i8** %6
%22 = call i32 @memcpy(i8* %20, i8* %21, i32 24)
%23 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%24 = call i32 @mapif_sendall(i8* %23, i32 34)
%25 = load i32, i32* %4
%26 = load i32, i32* %5
%27 = load i8*, i8** %6
%28 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %25, i32 %26, i8* %27)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"int_party: party leaved %d %d %s\0A\00"
define i32 @mapif_party_leaved(i32 %0, i32 %1, i8* %2) {
%4 = alloca [64 x i8]
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%6 = bitcast [64 x i8]* %4 to i16*
store i16 14372, i16* %6
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 2
%8 = bitcast i8* %7 to i32*
store i32 %0, i32* %8
%9 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 6
%10 = bitcast i8* %9 to i32*
store i32 %1, i32* %10
%11 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 10
%12 = call i32 @memcpy(i8* %11, i8* %2, i32 24)
%13 = call i32 @mapif_sendall(i8* %5, i32 34)
%14 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i8* %2)
ret i32 0
}