// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/dirmodel.c
// Function: dirmodel_notify_flush
int dirmodel_notify_flush(struct dirmodel *model)
{
	int ret = 0;
	size_t length = list_length(model->addchange_queue);
	for(size_t i = 0; i < length; i++) {
		ret = dirmodel_notify_file_added_or_changed_real(model, list_get_item(model->addchange_queue, i));
		if(ret == ENOMEM)
			break;
	}
	for(size_t i = length; i > 0; i--) {
		free(list_get_item(model->addchange_queue, i - 1));
		list_remove(model->addchange_queue, i - 1);
	}
	return ret == ENOMEM ? ENOMEM : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
callq 0x78de
movq %rax, %r14
testq %rax, %rax
setne %bpl
je 0x684e
leaq 0x48(%rbx), %rax
movq %rax, 0x28(%rsp)
xorl %r12d, %r12d
movq 0x38(%rbx), %rdi
movq %r12, %rsi
callq 0x7ab9
movq %rax, %r13
cmpb $0x1, 0x88(%rbx)
jne 0x6644
xorl %r15d, %r15d
movq 0x28(%rsp), %rdi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x34d0
testl %eax, %eax
jne 0x6838
movq 0x40(%rbx), %rdi
callq 0x33f0
leaq 0x18(%rsp), %rdi
movl %eax, %esi
movq %r13, %rdx
callq 0x76d2
movl %eax, %r15d
testl %eax, %eax
jne 0x6838
movq 0x28(%rbx), %rdi
movq 0x18(%rsp), %rdx
leaq 0x96d(%rip), %rsi       # 0x6fe4
leaq 0x30(%rsp), %rcx
callq 0x7b29
movq 0x18(%rsp), %r13
movq 0x30(%rsp), %r15
movq 0x28(%rbx), %rdi
testb %al, %al
je 0x6747
movq %r15, 0x20(%rsp)
movq %r15, %rsi
callq 0x7ab9
movq %rax, %r15
movb 0xa8(%rax), %al
movb %al, 0xa8(%r13)
cmpb $0x1, %al
jne 0x66c6
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x63a3
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x651c
movq 0x30(%rbx), %rdi
movq 0x90(%rbx), %rsi
movq %r15, %rdx
leaq 0x10(%rsp), %rcx
callq 0x7b29
movq 0x30(%rbx), %rdi
movq 0x90(%rbx), %rsi
movq %r13, %rdx
leaq 0x8(%rsp), %rcx
callq 0x7b29
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rsi
cmpq %rsi, %rax
setne %cl
leaq 0x1(%rsi), %rdx
cmpq %rdx, %rax
setne %dl
testb %dl, %cl
jne 0x67c4
movq 0x30(%rbx), %rdi
movq %r13, %rdx
callq 0x7ae7
movq 0x10(%rsp), %rcx
movq %rbx, %rdi
movl $0x2, %esi
movq %rcx, %rdx
jmp 0x67f1
movq %r15, %rsi
movq %r13, %rdx
callq 0x794a
testb %al, %al
je 0x6814
movq 0x30(%rbx), %rdi
movq 0x90(%rbx), %rsi
movq %r13, %rdx
leaq 0x8(%rsp), %rcx
callq 0x7b29
movq 0x30(%rbx), %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
callq 0x794a
testb %al, %al
je 0x681e
testq %r13, %r13
je 0x67ae
leaq 0x40(%r13), %rax
leaq 0xa0(%r13), %rcx
cmpb $0x0, 0x8(%r13)
cmovneq %rcx, %rax
movq (%rax), %rax
addq %rax, 0xb0(%rbx)
movq 0x8(%rsp), %rdx
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x7d00
jmp 0x6838
cmpq %rax, %rsi
jae 0x67d1
decq %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rbx), %rdi
movq 0x8(%rsp), %rdx
callq 0x79c7
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x7d00
movq 0x28(%rbx), %rdi
movq 0x20(%rsp), %rsi
movq %r13, %rdx
callq 0x7ae7
movq %r15, %rdi
callq 0x7822
xorl %r15d, %r15d
jmp 0x6838
movq %r13, %rdi
callq 0x7822
jmp 0x6832
movq %r13, %rdi
callq 0x7822
movq 0x28(%rbx), %rdi
movq %r15, %rsi
callq 0x7a67
movl $0xc, %r15d
cmpl $0xc, %r15d
je 0x684e
incq %r12
cmpq %r14, %r12
setb %bpl
jne 0x660d
testq %r14, %r14
je 0x687c
decq %r14
movq 0x38(%rbx), %rdi
movq %r14, %rsi
callq 0x7ab9
movq %rax, %rdi
callq 0x3740
movq 0x38(%rbx), %rdi
movq %r14, %rsi
callq 0x7a67
addq $-0x1, %r14
jb 0x6856
xorl %ecx, %ecx
testb $0x1, %bpl
movl $0xc, %eax
cmovel %ecx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq