// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: forget_client
void forget_client(window *win, int ws) {
	if (win->windows[WIN_PARENT] != XCB_WINDOW_NONE) {
		xcb_generic_error_t *error = NULL;
		error = xcb_request_check(conn, xcb_reparent_window_checked(conn,
				win->windows[WIN_CHILD], scr->root, win->geom[GEOM_X] + PAD,
				win->geom[GEOM_Y] + PAD_N));

		if (!error) {
			xcb_change_save_set(conn, XCB_SET_MODE_DELETE, win->windows[WIN_CHILD]);
		} else {
			free(error);
		}

		xcb_destroy_window(conn, win->windows[WIN_PARENT]);
	
		xcb_free_gc(conn, win->gc);
	}

	if ((state == MOVE || state == RESIZE) && win == stack[curws].fwin) {
		button_release(NULL);
	}

	if (win->sticky) {
		excise_from_all_but(ws, win);
	}
	
	excise_from(ws, win);

	free(win);
	
	if (ws != curws || stack[curws].fwin != win) {
		return;
	}
	
	stack[ws].fwin = NULL;

	refocus(ws);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0xd0(%rax)
je 0x690d
movq $0x0, -0x18(%rbp)
leaq 0x9c09(%rip), %rax      # 0x10448
movq (%rax), %rax
movq %rax, -0x30(%rbp)
leaq 0x9bfb(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xcc(%rax), %esi
leaq 0x9bef(%rip), %rax      # 0x10450
movq (%rax), %rax
movl (%rax), %edx
movq -0x8(%rbp), %rax
movl 0x108(%rax), %eax
addl $0x1, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movl 0x10c(%rax), %eax
addl $0x20, %eax
movswl %cx, %ecx
movswl %ax, %r8d
callq 0x30f0
movq -0x30(%rbp), %rdi
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %esi
callq 0x3540
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x68cc
leaq 0x9b98(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xcc(%rax), %edx
movl $0x1, %esi
callq 0x3500
movl %eax, -0x20(%rbp)
jmp 0x68d5
movq -0x18(%rbp), %rdi
callq 0x3270
leaq 0x9b6c(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xd0(%rax), %esi
callq 0x30d0
movl %eax, -0x24(%rbp)
leaq 0x9b50(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x104(%rax), %esi
callq 0x3190
movl %eax, -0x28(%rbp)
leaq 0x9b30(%rip), %rax      # 0x10444
cmpl $0x1, (%rax)
je 0x6925
leaq 0x9b24(%rip), %rax      # 0x10444
cmpl $0x2, (%rax)
jne 0x6950
movq -0x8(%rbp), %rax
leaq 0xa140(%rip), %rcx      # 0x10a70
movslq (%rcx), %rdx
leaq 0x9ff6(%rip), %rcx      # 0x10930
imulq $0x50, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x48(%rcx), %rax
jne 0x6950
xorl %eax, %eax
movl %eax, %edi
callq 0x9410
movq -0x8(%rbp), %rax
cmpl $0x0, 0xc8(%rax)
je 0x6969
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x85c0
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x8340
movq -0x8(%rbp), %rdi
callq 0x3270
movl -0xc(%rbp), %eax
leaq 0xa0e8(%rip), %rcx      # 0x10a70
cmpl (%rcx), %eax
jne 0x69ae
leaq 0xa0dd(%rip), %rax      # 0x10a70
movslq (%rax), %rcx
leaq 0x9f93(%rip), %rax      # 0x10930
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq 0x48(%rax), %rax
cmpq -0x8(%rbp), %rax
je 0x69b0
jmp 0x69d2
movslq -0xc(%rbp), %rcx
leaq 0x9f75(%rip), %rax      # 0x10930
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x48(%rax)
movl -0xc(%rbp), %edi
callq 0x8810
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)