// File: /workspace/github_c_makefile_star2_O0/wierton[P]socket-based-naive-game/client.c
// Function: log_psm_info
void log_psm_info(server_message_t *psm) {
	int len = 0;
	static char s[1024 * 1024];
	char *p = s;
	len += sprintf(p + len, "message: %d, life:%d, user_index:%d\n", psm->message, psm->life, psm->index);
	len += sprintf(p + len, "user_pos:");
	for(int i = 0; i < USER_CNT; i++) {
		len += sprintf(p + len, "(%d,%d), ", psm->user_pos[i].x, psm->user_pos[i].y);
	}

	len += sprintf(p + len, "\n");

	len += sprintf(p + len, "items:");
	for(int i = 0; i < MAX_ITEM; i++) {
		len += sprintf(p + len, "(%d:%d,%d), ", psm->item_kind[i], psm->item_pos[i].x, psm->item_pos[i].y);
	}

	len += sprintf(p + len, "\n");

	if(len > sizeof(s) - 1)
		eprintf("buffer overflow\n");

	wlog("battle info:\n%s\n", s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
leaq 0x5476(%rip), %rax      # 0xa7c0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movzbl (%rax), %edx
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %ecx
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %r8d
leaq 0x1da8(%rip), %rsi      # 0x7120
movb $0x0, %al
callq 0x21d0
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rax
addq %rax, %rdi
leaq 0x1dae(%rip), %rsi      # 0x7145
movb $0x0, %al
callq 0x21d0
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x5, -0x1c(%rbp)
jge 0x53f5
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movzbl 0x4(%rax,%rcx,2), %edx
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movzbl 0x5(%rax,%rcx,2), %ecx
leaq 0x1d72(%rip), %rsi      # 0x714f
movb $0x0, %al
callq 0x21d0
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x53ab
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rax
addq %rax, %rdi
leaq 0x1225(%rip), %rsi      # 0x662c
movb $0x0, %al
callq 0x21d0
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rax
addq %rax, %rdi
leaq 0x1d33(%rip), %rsi      # 0x7159
movb $0x0, %al
callq 0x21d0
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl $0x0, -0x20(%rbp)
cmpl $0x87, -0x20(%rbp)
jge 0x549b
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movzbl 0xe(%rax,%rcx), %edx
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movzbl 0x95(%rax,%rcx,2), %ecx
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rsi
movzbl 0x96(%rax,%rsi,2), %r8d
leaq 0x1cdd(%rip), %rsi      # 0x7160
movb $0x0, %al
callq 0x21d0
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x543a
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rax
addq %rax, %rdi
leaq 0x117f(%rip), %rsi      # 0x662c
movb $0x0, %al
callq 0x21d0
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movslq -0xc(%rbp), %rax
cmpq $0xfffff, %rax          # imm = 0xFFFFF
jbe 0x54f3
jmp 0x54c8
movq 0x4b29(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0xfdb(%rip), %rsi       # 0x64b4
leaq 0x1c8d(%rip), %rdx      # 0x716d
movl $0x4c7, %ecx            # imm = 0x4C7
movb $0x0, %al
callq 0x2140
xorl %edi, %edi
callq 0x21e0
movq 0x4c7e(%rip), %rsi      # 0xa178
leaq 0x1c79(%rip), %rdi      # 0x717a
movl $0x4c9, %edx            # imm = 0x4C9
leaq 0x52b3(%rip), %rcx      # 0xa7c0
movb $0x0, %al
callq 0x2780
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)