// File: /workspace/github_c_makefile_star2_O0/LemonBoy[P]autobahn/xdiff/xmerge.c
// Function: xdl_fill_merge_buffer
static int xdl_fill_merge_buffer(xdfenv_t *xe1, const char *name1,
				 xdfenv_t *xe2, const char *name2,
				 const char *ancestor_name,
				 int favor,
				 xdmerge_t *m, char *dest, int style,
				 int marker_size)
{
	int size, i;

	for (size = i = 0; m; m = m->next) {
		if (favor && !m->mode)
			m->mode = favor;

		if (m->mode == 0)
			size = fill_conflict_hunk(xe1, name1, xe2, name2,
						  ancestor_name,
						  size, i, style, m, dest,
						  marker_size);
		else if (m->mode & 3) {
			/* Before conflicting part */
			size += xdl_recs_copy(xe1, i, m->i1 - i, 0, 0,
					      dest ? dest + size : NULL);
			/* Postimage from side #1 */
			if (m->mode & 1) {
				int needs_cr = is_cr_needed(xe1, xe2, m);

				size += xdl_recs_copy(xe1, m->i1, m->chg1, needs_cr, (m->mode & 2),
						      dest ? dest + size : NULL);
			}
			/* Postimage from side #2 */
			if (m->mode & 2)
				size += xdl_recs_copy(xe2, m->i2, m->chg2, 0, 0,
						      dest ? dest + size : NULL);
		} else
			continue;
		i = m->i1 + m->chg1;
	}
	size += xdl_recs_copy(xe1, i, xe1->xdf2.nrec - i, 0, 0,
			      dest ? dest + size : NULL);
	return size;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0xc8, %rsp
movl 0xf8(%rsp), %eax
movl 0xf0(%rsp), %eax
movq 0xe8(%rsp), %rax
movq 0xe0(%rsp), %rax
movq %rdi, 0xc0(%rsp)
movq %rsi, 0xb8(%rsp)
movq %rdx, 0xb0(%rsp)
movq %rcx, 0xa8(%rsp)
movq %r8, 0xa0(%rsp)
movl %r9d, 0x9c(%rsp)
movl $0x0, 0x94(%rsp)
movl $0x0, 0x98(%rsp)
cmpq $0x0, 0xe0(%rsp)
je 0x9a8f
cmpl $0x0, 0x9c(%rsp)
je 0x9796
movq 0xe0(%rsp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x9796
movl 0x9c(%rsp), %ecx
movq 0xe0(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0xe0(%rsp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x981f
movq 0xc0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
movq 0xa8(%rsp), %rcx
movq 0xa0(%rsp), %r8
movl 0x98(%rsp), %r9d
movl 0x94(%rsp), %ebp
movl 0xf0(%rsp), %ebx
movq 0xe0(%rsp), %r11
movq 0xe8(%rsp), %r10
movl 0xf8(%rsp), %eax
movl %ebp, (%rsp)
movl %ebx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movl %eax, 0x20(%rsp)
callq 0x9cb0
movl %eax, 0x98(%rsp)
jmp 0x9a58
movq 0xe0(%rsp), %rax
movl 0x8(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x9a54
movq 0xc0(%rsp), %rax
movq %rax, 0x80(%rsp)
movl 0x94(%rsp), %eax
movl %eax, 0x88(%rsp)
movq 0xe0(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x94(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0x8c(%rsp)
cmpq $0x0, 0xe8(%rsp)
je 0x9897
movq 0xe8(%rsp), %rax
movslq 0x98(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x78(%rsp)
jmp 0x98a0
xorl %eax, %eax
movq %rax, 0x78(%rsp)
jmp 0x98a0
movl 0x8c(%rsp), %edx
movl 0x88(%rsp), %esi
movq 0x80(%rsp), %rdi
movq 0x78(%rsp), %r9
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0xa490
addl 0x98(%rsp), %eax
movl %eax, 0x98(%rsp)
movq 0xe0(%rsp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x99b5
movq 0xc0(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq 0xe0(%rsp), %rdx
callq 0xa4e0
movl %eax, 0x90(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xe0(%rsp), %rax
movq 0x10(%rax), %rax
movl %eax, 0x68(%rsp)
movq 0xe0(%rsp), %rax
movq 0x20(%rax), %rax
movl %eax, 0x6c(%rsp)
movl 0x90(%rsp), %eax
movl %eax, 0x70(%rsp)
movq 0xe0(%rsp), %rax
movl 0x8(%rax), %eax
andl $0x2, %eax
movl %eax, 0x74(%rsp)
cmpq $0x0, 0xe8(%rsp)
je 0x997e
movq 0xe8(%rsp), %rax
movslq 0x98(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x58(%rsp)
jmp 0x9987
xorl %eax, %eax
movq %rax, 0x58(%rsp)
jmp 0x9987
movl 0x74(%rsp), %r8d
movl 0x70(%rsp), %ecx
movl 0x6c(%rsp), %edx
movl 0x68(%rsp), %esi
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %r9
callq 0xa490
addl 0x98(%rsp), %eax
movl %eax, 0x98(%rsp)
movq 0xe0(%rsp), %rax
movl 0x8(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x9a52
movq 0xb0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xe0(%rsp), %rax
movq 0x18(%rax), %rax
movl %eax, 0x50(%rsp)
movq 0xe0(%rsp), %rax
movq 0x28(%rax), %rax
movl %eax, 0x54(%rsp)
cmpq $0x0, 0xe8(%rsp)
je 0x9a1e
movq 0xe8(%rsp), %rax
movslq 0x98(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x40(%rsp)
jmp 0x9a27
xorl %eax, %eax
movq %rax, 0x40(%rsp)
jmp 0x9a27
movl 0x54(%rsp), %edx
movl 0x50(%rsp), %esi
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %r9
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0xa490
addl 0x98(%rsp), %eax
movl %eax, 0x98(%rsp)
jmp 0x9a56
jmp 0x9a77
jmp 0x9a58
movq 0xe0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xe0(%rsp), %rcx
addq 0x20(%rcx), %rax
movl %eax, 0x94(%rsp)
movq 0xe0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe0(%rsp)
jmp 0x975d
movq 0xc0(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x94(%rsp), %eax
movl %eax, 0x38(%rsp)
movq 0xc0(%rsp), %rax
movq 0xc0(%rax), %rax
movslq 0x94(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0x3c(%rsp)
cmpq $0x0, 0xe8(%rsp)
je 0x9aea
movq 0xe8(%rsp), %rax
movslq 0x98(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
jmp 0x9af3
xorl %eax, %eax
movq %rax, 0x28(%rsp)
jmp 0x9af3
movl 0x3c(%rsp), %edx
movl 0x38(%rsp), %esi
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %r9
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0xa490
addl 0x98(%rsp), %eax
movl %eax, 0x98(%rsp)
movl 0x98(%rsp), %eax
addq $0xc8, %rsp
popq %rbx
popq %rbp
retq
nop