// File: /workspace/github_c_makefile_star2_O2/wahern[P]cqueues/src/lib/notify.c
// Function: notify_close
void notify_close(struct notify *nfy) {
	struct file *file, *next;

	if (!nfy)
		return;

	for (file = LLRB_MIN(files, &nfy->files); file != NULL; file = next) {
		next = LLRB_NEXT(files, &nfy->files, file);

		discard(nfy, file);
	}

	closefd(&nfy->fd);
	closefd(&nfy->dirfd);

#if ENABLE_FEN
	port_dissociate(nfy->fd, PORT_SOURCE_FILE, (intptr_t)&nfy->dirfo);
#endif

	free(nfy);
}

// Assembly:
testq %rdi, %rdi
je 0x2e9ab
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x8(%rdi), %rbx
movq %rdi, (%rsp)
movq 0x8(%rdi), %rdi
callq 0x2e9ac
movq %rax, %r14
testq %r14, %r14
je 0x2e980
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x2e717
callq 0x2e9ac
jmp 0x2e73f
movq 0x48(%r14), %rax
testq %rax, %rax
je 0x2e73d
cmpq %r14, 0x38(%rax)
je 0x2e73f
movq %r14, %rcx
movq 0x48(%rcx), %rax
testq %rax, %rax
je 0x2e73d
cmpq 0x40(%rax), %rcx
movq %rax, %rcx
je 0x2e729
jmp 0x2e73f
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %r14, %rdi
callq 0x2e9be
movq %r14, 0x10(%rsp)
leaq 0x60(%r14), %rbp
xorl %r14d, %r14d
movq %rbx, %r12
movq (%r12), %r13
testq %r13, %r13
je 0x2e933
movq 0x48(%r13), %r14
leaq 0x60(%r13), %rsi
movq %rbp, %rdi
callq 0x102e0
movq 0x38(%r13), %rcx
testl %eax, %eax
jns 0x2e7af
testq %rcx, %rcx
je 0x2e7a6
cmpb $0x0, 0x50(%rcx)
jne 0x2e7a6
movq 0x38(%rcx), %rax
testq %rax, %rax
je 0x2e79a
cmpb $0x0, 0x50(%rax)
jne 0x2e7a6
movq %r12, %rdi
callq 0x2eda7
movq (%r12), %r13
addq $0x38, %r13
movq %r13, %r12
jmp 0x2e75b
testq %rcx, %rcx
je 0x2e7d2
cmpb $0x1, 0x50(%rcx)
jne 0x2e7d2
movq %r12, %rdi
callq 0x2ede5
movq (%r12), %r13
leaq 0x60(%r13), %rsi
movq %rbp, %rdi
callq 0x102e0
movq 0x40(%r13), %rcx
testl %eax, %eax
je 0x2e7e1
testq %rcx, %rcx
jne 0x2e7ea
jmp 0x2e843
testq %rcx, %rcx
je 0x2e906
cmpb $0x0, 0x50(%rcx)
jne 0x2e83f
movq 0x38(%rcx), %rcx
testq %rcx, %rcx
je 0x2e7ff
cmpb $0x0, 0x50(%rcx)
jne 0x2e83f
movq %r13, %rdi
callq 0x2ee97
movq (%r12), %r13
movq 0x38(%r13), %rax
movq 0x38(%rax), %rax
testq %rax, %rax
je 0x2e833
cmpb $0x1, 0x50(%rax)
jne 0x2e833
movq %r12, %rdi
callq 0x2ede5
movq (%r12), %rdi
callq 0x2ee97
movq (%r12), %r13
leaq 0x60(%r13), %rsi
movq %rbp, %rdi
callq 0x102e0
testl %eax, %eax
je 0x2e84f
addq $0x40, %r13
movq %r13, %r12
jmp 0x2e75b
addq $0x40, %r13
movq %r13, %rbp
movq (%rbp), %r15
movq 0x38(%r15), %rax
testq %rax, %rax
je 0x2e88d
cmpb $0x0, 0x50(%rax)
jne 0x2e884
movq 0x38(%rax), %rax
testq %rax, %rax
je 0x2e878
cmpb $0x0, 0x50(%rax)
jne 0x2e884
movq %rbp, %rdi
callq 0x2eda7
movq (%rbp), %r15
addq $0x38, %r15
movq %r15, %rbp
jmp 0x2e856
movq 0x48(%r15), %rax
andq $0x0, (%rbp)
cmpq %r13, %rbp
je 0x2e8c4
movq 0x48(%rax), %r14
movq %rbx, %rbp
cmpq (%rbx), %rax
je 0x2e8b7
cmpq 0x38(%r14), %rax
je 0x2e8b3
leaq 0x40(%r14), %rbp
jmp 0x2e8b7
leaq 0x38(%r14), %rbp
movq %rbp, %rdi
callq 0x2ee1b
movq %r14, %rax
jmp 0x2e896
movq (%r12), %rax
movb 0x50(%rax), %cl
movb %cl, 0x50(%r15)
movq 0x48(%rax), %rax
movq %rax, 0x48(%r15)
movq (%r12), %rax
movq 0x40(%rax), %rax
movq %rax, 0x40(%r15)
testq %rax, %rax
je 0x2e8ec
movq %r15, 0x48(%rax)
movq (%r12), %rax
movq 0x38(%rax), %rax
movq %rax, 0x38(%r15)
testq %rax, %rax
je 0x2e901
movq %r15, 0x48(%rax)
movq %r15, %r14
jmp 0x2e909
xorl %r15d, %r15d
movq %r15, (%r12)
jmp 0x2e933
movq 0x48(%r14), %r15
movq %rbx, %rdi
cmpq %rax, %r14
je 0x2e92b
cmpq 0x38(%r15), %r14
je 0x2e927
leaq 0x40(%r15), %rdi
jmp 0x2e92b
leaq 0x38(%r15), %rdi
callq 0x2ee1b
movq %r15, %r14
movq (%rbx), %rax
testq %r14, %r14
jne 0x2e90f
testq %rax, %rax
je 0x2e944
movb $0x0, 0x50(%rax)
movq 0x10(%rsp), %rdi
movq 0x18(%rdi), %rax
movq 0x20(%rdi), %rcx
testq %rax, %rax
je 0x2e95a
movq %rcx, 0x20(%rax)
movq %rax, (%rcx)
movq 0x28(%rdi), %rax
movq 0x30(%rdi), %rcx
testq %rax, %rax
je 0x2e96e
movq %rcx, 0x30(%rax)
movq %rax, (%rcx)
callq 0xffc0
movq 0x8(%rsp), %r14
jmp 0x2e6fe
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x2e9be
leaq 0x54(%rbx), %rdi
callq 0x2e9be
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xffc0
retq