// File: /workspace/github_c_makefile_star2_O0/LemonBoy[P]autobahn/xdiff/xutils.c
// Function: xdl_emit_hunk_hdr
int xdl_emit_hunk_hdr(long s1, long c1, long s2, long c2,
		      const char *func, long funclen, xdemitcb_t *ecb) {
	int nb = 0;
	mmbuffer_t mb;
	char buf[128];

	memcpy(buf, "@@ -", 4);
	nb += 4;

	nb += xdl_num_out(buf + nb, c1 ? s1: s1 - 1);

	if (c1 != 1) {
		memcpy(buf + nb, ",", 1);
		nb += 1;

		nb += xdl_num_out(buf + nb, c1);
	}

	memcpy(buf + nb, " +", 2);
	nb += 2;

	nb += xdl_num_out(buf + nb, c2 ? s2: s2 - 1);

	if (c2 != 1) {
		memcpy(buf + nb, ",", 1);
		nb += 1;

		nb += xdl_num_out(buf + nb, c2);
	}

	memcpy(buf + nb, " @@", 3);
	nb += 3;
	if (func && funclen) {
		buf[nb++] = ' ';
		if (funclen > sizeof(buf) - nb - 1)
			funclen = sizeof(buf) - nb - 1;
		memcpy(buf + nb, func, funclen);
		nb += funclen;
	}
	buf[nb++] = '\n';

	mb.ptr = buf;
	mb.size = nb;
	if (ecb->outf(ecb->priv, &mb, 1) < 0)
		return -1;

	return 0;
}

// Assembly:
subq $0xf8, %rsp
movq 0x100(%rsp), %rax
movq %rdi, 0xe8(%rsp)
movq %rsi, 0xe0(%rsp)
movq %rdx, 0xd8(%rsp)
movq %rcx, 0xd0(%rsp)
movq %r8, 0xc8(%rsp)
movq %r9, 0xc0(%rsp)
movl $0x0, 0xbc(%rsp)
movl 0x452e(%rip), %eax      # 0xc12e
movl %eax, 0x20(%rsp)
movl 0xbc(%rsp), %eax
addl $0x4, %eax
movl %eax, 0xbc(%rsp)
leaq 0x20(%rsp), %rax
movslq 0xbc(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0xe0(%rsp)
je 0x7c44
movq 0xe8(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x7c55
movq 0xe8(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x7a70
addl 0xbc(%rsp), %eax
movl %eax, 0xbc(%rsp)
cmpq $0x1, 0xe0(%rsp)
je 0x7ccb
movslq 0xbc(%rsp), %rax
movb 0x44a8(%rip), %cl       # 0xc133
movb %cl, 0x20(%rsp,%rax)
movl 0xbc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xbc(%rsp)
leaq 0x20(%rsp), %rdi
movslq 0xbc(%rsp), %rax
addq %rax, %rdi
movq 0xe0(%rsp), %rsi
callq 0x7a70
addl 0xbc(%rsp), %eax
movl %eax, 0xbc(%rsp)
movslq 0xbc(%rsp), %rax
movw 0x445b(%rip), %cx       # 0xc135
movw %cx, 0x20(%rsp,%rax)
movl 0xbc(%rsp), %eax
addl $0x2, %eax
movl %eax, 0xbc(%rsp)
leaq 0x20(%rsp), %rax
movslq 0xbc(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0xd0(%rsp)
je 0x7d1e
movq 0xd8(%rsp), %rax
movq %rax, (%rsp)
jmp 0x7d2e
movq 0xd8(%rsp), %rax
subq $0x1, %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x7a70
addl 0xbc(%rsp), %eax
movl %eax, 0xbc(%rsp)
cmpq $0x1, 0xd0(%rsp)
je 0x7da3
movslq 0xbc(%rsp), %rax
movb 0x43d0(%rip), %cl       # 0xc133
movb %cl, 0x20(%rsp,%rax)
movl 0xbc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xbc(%rsp)
leaq 0x20(%rsp), %rdi
movslq 0xbc(%rsp), %rax
addq %rax, %rdi
movq 0xd0(%rsp), %rsi
callq 0x7a70
addl 0xbc(%rsp), %eax
movl %eax, 0xbc(%rsp)
movslq 0xbc(%rsp), %rax
movw 0x4386(%rip), %cx       # 0xc138
movw %cx, 0x20(%rsp,%rax)
movb 0x437d(%rip), %cl       # 0xc13a
movb %cl, 0x22(%rsp,%rax)
movl 0xbc(%rsp), %eax
addl $0x3, %eax
movl %eax, 0xbc(%rsp)
cmpq $0x0, 0xc8(%rsp)
je 0x7e86
cmpq $0x0, 0xc0(%rsp)
je 0x7e86
movl 0xbc(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0xbc(%rsp)
cltq
movb $0x20, 0x20(%rsp,%rax)
movq 0xc0(%rsp), %rax
movslq 0xbc(%rsp), %rdx
movl $0x80, %ecx
subq %rdx, %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jbe 0x7e47
movslq 0xbc(%rsp), %rcx
movl $0x80, %eax
subq %rcx, %rax
subq $0x1, %rax
movq %rax, 0xc0(%rsp)
leaq 0x20(%rsp), %rdi
movslq 0xbc(%rsp), %rax
addq %rax, %rdi
movq 0xc8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
callq 0x10e0
movq 0xc0(%rsp), %rcx
movslq 0xbc(%rsp), %rax
addq %rcx, %rax
movl %eax, 0xbc(%rsp)
movl 0xbc(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0xbc(%rsp)
cltq
movb $0xa, 0x20(%rsp,%rax)
leaq 0x20(%rsp), %rax
movq %rax, 0xa8(%rsp)
movslq 0xbc(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x100(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x100(%rsp), %rcx
movq (%rcx), %rdi
leaq 0xa8(%rsp), %rsi
movl $0x1, %edx
callq *%rax
cmpl $0x0, %eax
jge 0x7ef5
movl $0xffffffff, 0xf4(%rsp) # imm = 0xFFFFFFFF
jmp 0x7f00
movl $0x0, 0xf4(%rsp)
movl 0xf4(%rsp), %eax
addq $0xf8, %rsp
retq
nop