#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 const *, int);
int mapif_guild_alliance(int guild_id1, int guild_id2, int account_id1,
                         int account_id2, int flag, const char *name1,
                         const char *name2) {
  unsigned char buf[128];
  (*(unsigned short *)(((unsigned char *)(buf)) + (0))) = 0x383d;
  (*(unsigned int *)(((unsigned char *)(buf)) + (2))) = guild_id1;
  (*(unsigned int *)(((unsigned char *)(buf)) + (6))) = guild_id2;
  (*(unsigned int *)(((unsigned char *)(buf)) + (10))) = account_id1;
  (*(unsigned int *)(((unsigned char *)(buf)) + (14))) = account_id2;
  (*(unsigned char *)(((unsigned char *)(buf)) + (18))) = flag;
  memcpy((((unsigned char *)(buf)) + (19)), name1, 24);
  memcpy((((unsigned char *)(buf)) + (43)), name2, 24);
  mapif_sendall(buf, 67);
  return 0;
}


x86 assembly (clang, -O0):
<mapif_guild_alliance>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9,-0x20(%rbp)
movw   $0x383d,-0xa0(%rbp)
3d 38
mov    -0x4(%rbp),%eax
mov    %eax,-0x9e(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x9a(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x96(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x92(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,-0x8e(%rbp)
lea    -0xa0(%rbp),%rdi
add    $0x13,%rdi
mov    -0x20(%rbp),%rsi
mov    $0x18,%edx
call   1040 <memcpy@plt>
lea    -0xa0(%rbp),%rdi
add    $0x2b,%rdi
mov    0x10(%rbp),%rsi
mov    $0x18,%edx
call   1040 <memcpy@plt>
lea    -0xa0(%rbp),%rdi
mov    $0x43,%esi
call   1030 <mapif_sendall@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapif_guild_alliance>:
push   %rbx
sub    $0x80,%rsp
mov    0x90(%rsp),%rbx
movw   $0x383d,(%rsp)
mov    %edi,0x2(%rsp)
mov    %esi,0x6(%rsp)
mov    %edx,0xa(%rsp)
mov    %ecx,0xe(%rsp)
mov    %r8b,0x12(%rsp)
lea    0x13(%rsp),%rdi
mov    %r9,%rsi
mov    $0x18,%edx
call   1040 <memcpy@plt>
lea    0x2b(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x18,%edx
call   1040 <memcpy@plt>
mov    %rsp,%rdi
mov    $0x43,%esi
call   1030 <mapif_sendall@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mapif_guild_alliance(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* %5, i8* %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca [128 x i8]
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i8* %5, i8** %13
store i8* %6, i8** %14
%16 = getelementptr inbounds [128 x i8], [128 x i8]* %15, i64 0, i64 0
%17 = getelementptr inbounds i8, i8* %16, i64 0
%18 = bitcast i8* %17 to i16*
store i16 14397, i16* %18
%19 = load i32, i32* %8
%20 = getelementptr inbounds [128 x i8], [128 x i8]* %15, i64 0, i64 0
%21 = getelementptr inbounds i8, i8* %20, i64 2
%22 = bitcast i8* %21 to i32*
store i32 %19, i32* %22
%23 = load i32, i32* %9
%24 = getelementptr inbounds [128 x i8], [128 x i8]* %15, i64 0, i64 0
%25 = getelementptr inbounds i8, i8* %24, i64 6
%26 = bitcast i8* %25 to i32*
store i32 %23, i32* %26
%27 = load i32, i32* %10
%28 = getelementptr inbounds [128 x i8], [128 x i8]* %15, i64 0, i64 0
%29 = getelementptr inbounds i8, i8* %28, i64 10
%30 = bitcast i8* %29 to i32*
store i32 %27, i32* %30
%31 = load i32, i32* %11
%32 = getelementptr inbounds [128 x i8], [128 x i8]* %15, i64 0, i64 0
%33 = getelementptr inbounds i8, i8* %32, i64 14
%34 = bitcast i8* %33 to i32*
store i32 %31, i32* %34
%35 = load i32, i32* %12
%36 = trunc i32 %35 to i8
%37 = getelementptr inbounds [128 x i8], [128 x i8]* %15, i64 0, i64 0
%38 = getelementptr inbounds i8, i8* %37, i64 18
store i8 %36, i8* %38
%39 = getelementptr inbounds [128 x i8], [128 x i8]* %15, i64 0, i64 0
%40 = getelementptr inbounds i8, i8* %39, i64 19
%41 = load i8*, i8** %13
%42 = call i32 @memcpy(i8* %40, i8* %41, i32 24)
%43 = getelementptr inbounds [128 x i8], [128 x i8]* %15, i64 0, i64 0
%44 = getelementptr inbounds i8, i8* %43, i64 43
%45 = load i8*, i8** %14
%46 = call i32 @memcpy(i8* %44, i8* %45, i32 24)
%47 = getelementptr inbounds [128 x i8], [128 x i8]* %15, i64 0, i64 0
%48 = call i32 @mapif_sendall(i8* %47, i32 67)
ret i32 0
}

LLVM IR (-O2):
define i32 @mapif_guild_alliance(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* %5, i8* %6) {
%8 = alloca [128 x i8]
%9 = getelementptr inbounds [128 x i8], [128 x i8]* %8, i64 0, i64 0
%10 = bitcast [128 x i8]* %8 to i16*
store i16 14397, i16* %10
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %8, i64 0, i64 2
%12 = bitcast i8* %11 to i32*
store i32 %0, i32* %12
%13 = getelementptr inbounds [128 x i8], [128 x i8]* %8, i64 0, i64 6
%14 = bitcast i8* %13 to i32*
store i32 %1, i32* %14
%15 = getelementptr inbounds [128 x i8], [128 x i8]* %8, i64 0, i64 10
%16 = bitcast i8* %15 to i32*
store i32 %2, i32* %16
%17 = getelementptr inbounds [128 x i8], [128 x i8]* %8, i64 0, i64 14
%18 = bitcast i8* %17 to i32*
store i32 %3, i32* %18
%19 = trunc i32 %4 to i8
%20 = getelementptr inbounds [128 x i8], [128 x i8]* %8, i64 0, i64 18
store i8 %19, i8* %20
%21 = getelementptr inbounds [128 x i8], [128 x i8]* %8, i64 0, i64 19
%22 = call i32 @memcpy(i8* %21, i8* %5, i32 24)
%23 = getelementptr inbounds [128 x i8], [128 x i8]* %8, i64 0, i64 43
%24 = call i32 @memcpy(i8* %23, i8* %6, i32 24)
%25 = call i32 @mapif_sendall(i8* %9, i32 67)
ret i32 0
}