// File: /workspace/github_c_makefile_star2_O0/wierton[P]socket-based-naive-game/server.c
// Function: inform_all_user_battle_state
void inform_all_user_battle_state(int bid) {
	server_message_t sm;
	sm.message = SERVER_MESSAGE_BATTLE_INFORMATION;
	for(int i = 0; i < USER_CNT; i++) {
		if(battles[bid].users[i].battle_state == BATTLE_STATE_LIVE) {
			sm.user_pos[i].x = battles[bid].users[i].pos.x;
			sm.user_pos[i].y = battles[bid].users[i].pos.y;
		}else{
			sm.user_pos[i].x = -1;
			sm.user_pos[i].y = -1;
		}
	}

	for(int i = 0; i < MAX_ITEM; i++) {
		if(battles[bid].items[i].is_used) {
			sm.item_kind[i] = battles[bid].items[i].kind;
			sm.item_pos[i].x = battles[bid].items[i].pos.x;
			sm.item_pos[i].y = battles[bid].items[i].pos.y;
		}else{
			sm.item_kind[i] = ITEM_NONE;
		}
	}

	for(int i = 0; i < USER_CNT; i++) {
		sm.index = i;
		sm.life = battles[bid].users[i].life;
		sm.bullets_num = battles[bid].users[i].nr_bullets;
		if(battles[bid].users[i].battle_state != BATTLE_STATE_UNJOINED) {
			wrap_send(sessions[i].conn, &sm);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movl %edi, -0x4(%rbp)
movb $0x1e, -0x1a7(%rbp)
movl $0x0, -0x1ac(%rbp)
cmpl $0x5, -0x1ac(%rbp)
jge 0x30ee
movslq -0x4(%rbp), %rcx
leaq 0x7369(%rip), %rax      # 0xa390
imulq $0xb08, %rcx, %rcx      # imm = 0xB08
addq %rcx, %rax
addq $0x10, %rax
movslq -0x1ac(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
jne 0x30ba
movslq -0x4(%rbp), %rcx
leaq 0x733d(%rip), %rax      # 0xa390
imulq $0xb08, %rcx, %rcx      # imm = 0xB08
addq %rcx, %rax
addq $0x10, %rax
movslq -0x1ac(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movb 0x10(%rax), %cl
movslq -0x1ac(%rbp), %rax
movb %cl, -0x1a3(%rbp,%rax,2)
movslq -0x4(%rbp), %rcx
leaq 0x7305(%rip), %rax      # 0xa390
imulq $0xb08, %rcx, %rcx      # imm = 0xB08
addq %rcx, %rax
addq $0x10, %rax
movslq -0x1ac(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movb 0x11(%rax), %cl
movslq -0x1ac(%rbp), %rax
movb %cl, -0x1a2(%rbp,%rax,2)
jmp 0x30d8
movslq -0x1ac(%rbp), %rax
movb $-0x1, -0x1a3(%rbp,%rax,2)
movslq -0x1ac(%rbp), %rax
movb $-0x1, -0x1a2(%rbp,%rax,2)
jmp 0x30da
movl -0x1ac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1ac(%rbp)
jmp 0x300f
movl $0x0, -0x1b0(%rbp)
cmpl $0x87, -0x1b0(%rbp)
jge 0x3209
movslq -0x4(%rbp), %rcx
leaq 0x727d(%rip), %rax      # 0xa390
imulq $0xb08, %rcx, %rcx      # imm = 0xB08
addq %rcx, %rax
addq $0x78, %rax
movslq -0x1b0(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
je 0x31e4
movslq -0x4(%rbp), %rcx
leaq 0x724d(%rip), %rax      # 0xa390
imulq $0xb08, %rcx, %rcx      # imm = 0xB08
addq %rcx, %rax
addq $0x78, %rax
movslq -0x1b0(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movb %al, %cl
movslq -0x1b0(%rbp), %rax
movb %cl, -0x199(%rbp,%rax)
movslq -0x4(%rbp), %rcx
leaq 0x7213(%rip), %rax      # 0xa390
imulq $0xb08, %rcx, %rcx      # imm = 0xB08
addq %rcx, %rax
addq $0x78, %rax
movslq -0x1b0(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movb 0x10(%rax), %cl
movslq -0x1b0(%rbp), %rax
movb %cl, -0x112(%rbp,%rax,2)
movslq -0x4(%rbp), %rcx
leaq 0x71db(%rip), %rax      # 0xa390
imulq $0xb08, %rcx, %rcx      # imm = 0xB08
addq %rcx, %rax
addq $0x78, %rax
movslq -0x1b0(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movb 0x11(%rax), %cl
movslq -0x1b0(%rbp), %rax
movb %cl, -0x111(%rbp,%rax,2)
jmp 0x31f3
movslq -0x1b0(%rbp), %rax
movb $0x0, -0x199(%rbp,%rax)
jmp 0x31f5
movl -0x1b0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1b0(%rbp)
jmp 0x30f8
movl $0x0, -0x1b4(%rbp)
cmpl $0x5, -0x1b4(%rbp)
jge 0x32f2
movl -0x1b4(%rbp), %eax
movb %al, -0x1a5(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x7159(%rip), %rax      # 0xa390
imulq $0xb08, %rcx, %rcx      # imm = 0xB08
addq %rcx, %rax
addq $0x10, %rax
movslq -0x1b4(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movb %al, -0x1a6(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x7129(%rip), %rax      # 0xa390
imulq $0xb08, %rcx, %rcx      # imm = 0xB08
addq %rcx, %rax
addq $0x10, %rax
movslq -0x1b4(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movb %al, -0x1a4(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x70f9(%rip), %rax      # 0xa390
imulq $0xb08, %rcx, %rcx      # imm = 0xB08
addq %rcx, %rax
addq $0x10, %rax
movslq -0x1b4(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
je 0x32dc
movslq -0x1b4(%rbp), %rcx
leaq 0x6f5a(%rip), %rax      # 0xa220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edi
leaq -0x1a7(%rbp), %rsi
callq 0x1560
jmp 0x32de
movl -0x1b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1b4(%rbp)
jmp 0x3213
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
nopl (%rax,%rax)