// File: /workspace/github_c_makefile_star2_O0/Oric4ever[P]lcc65/6502/build/../src/profio.c
// Function: gather
static int gather() {
	int i, nfiles, nfuncs, npoints;
	char *files[64];

	if ((nfiles = getd()) < 0)
		return 0;
	assert(nfiles < sizeof files/sizeof files[0]);
	for (i = 0; i < nfiles; i++) {
		if ((files[i] = getstr()) == 0)
			return -1;
		if (!findfile(files[i])) {
			struct file *new = (struct file *)alloc(sizeof *new);
			new->name = files[i];
			new->size = new->count = 0;
			new->counts = 0;
			new->funcs = 0;
			new->link = filelist;
			filelist = new;
		}
	}
	if ((nfuncs = getd()) < 0)
		return -1;
	for (i = 0; i < nfuncs; i++) {
		struct func *q;
		char *name, *file;
		int f, x, y, count;
		if ((name = getstr()) == 0 || (f = getd()) <= 0
		|| (x = getd()) < 0 || (y = getd()) < 0 || (count = getd()) < 0)
			return -1;
		q = afunction(name, files[f-1], x, y, count);
		if ((name = getstr()) == 0 || (file = getstr()) == 0
		|| (x = getd()) < 0 || (y = getd()) < 0)
			return -1;
		if (*name != '?')
			acaller(name, file, x, y, count, q);
	}
	if ((npoints = getd()) < 0)
		return -1;
	for (i = 0; i < npoints; i++) {
		int f, x, y, count;
		if ((f = getd()) < 0 || (x = getd()) < 0 || (y = getd()) < 0
		|| (count = getd()) < 0)
			return -1;
		if (f)
			apoint(i, files[f-1], x, y, count);
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
callq 0x1b860
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jge 0x1b424
movl $0x0, -0x4(%rbp)
jmp 0x1b7fd
movslq -0xc(%rbp), %rax
cmpq $0x40, %rax
jae 0x1b430
jmp 0x1b44f
leaq 0x15d04(%rip), %rdi     # 0x3113b
leaq 0x15d23(%rip), %rsi     # 0x31161
movl $0xcb, %edx
leaq 0x15d27(%rip), %rcx     # 0x31171
callq 0x30c0
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x1b5db
callq 0x1ba10
movslq -0x8(%rbp), %rcx
movq %rax, -0x220(%rbp,%rcx,8)
cmpq $0x0, %rax
jne 0x1b485
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1b7fd
movslq -0x8(%rbp), %rax
movq -0x220(%rbp,%rax,8), %rdi
callq 0x1b260
cmpq $0x0, %rax
jne 0x1b5cb
leaq 0x20199(%rip), %rax     # 0x3b640
movq (%rax), %rax
movl $0x28, (%rax)
leaq 0x20189(%rip), %rax     # 0x3b640
movq (%rax), %rax
movq 0x8(%rax), %rax
leaq 0x2017b(%rip), %rcx     # 0x3b640
movq (%rcx), %rcx
movslq (%rcx), %rcx
addq %rcx, %rax
leaq 0x2016b(%rip), %rcx     # 0x3b640
movq (%rcx), %rcx
cmpq 0x10(%rcx), %rax
jb 0x1b4ff
leaq 0x2015b(%rip), %rax     # 0x3b640
movq (%rax), %rax
movl (%rax), %edi
leaq 0x2014f(%rip), %rsi     # 0x3b640
callq 0x253d0
movq %rax, -0x268(%rbp)
jmp 0x1b54d
leaq 0x2013a(%rip), %rax     # 0x3b640
movq (%rax), %rax
movl (%rax), %edx
leaq 0x2012e(%rip), %rax     # 0x3b640
movq (%rax), %rax
movq 0x8(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x8(%rax)
leaq 0x20116(%rip), %rax     # 0x3b640
movq (%rax), %rax
movq 0x8(%rax), %rax
leaq 0x20108(%rip), %rcx     # 0x3b640
movq (%rcx), %rcx
movslq (%rcx), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x268(%rbp)
movq -0x268(%rbp), %rax
movq %rax, -0x228(%rbp)
movslq -0x8(%rbp), %rax
movq -0x220(%rbp,%rax,8), %rcx
movq -0x228(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x228(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x228(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x228(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x228(%rbp), %rax
movq $0x0, 0x20(%rax)
movq 0x2390d(%rip), %rcx     # 0x3eec0
movq -0x228(%rbp), %rax
movq %rcx, (%rax)
movq -0x228(%rbp), %rax
movq %rax, 0x238f5(%rip)     # 0x3eec0
jmp 0x1b5cd
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1b456
callq 0x1b860
movl %eax, -0x10(%rbp)
cmpl $0x0, %eax
jge 0x1b5f4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1b7fd
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x1b73a
callq 0x1ba10
movq %rax, -0x238(%rbp)
cmpq $0x0, %rax
je 0x1b659
callq 0x1b860
movl %eax, -0x244(%rbp)
cmpl $0x0, %eax
jle 0x1b659
callq 0x1b860
movl %eax, -0x248(%rbp)
cmpl $0x0, %eax
jl 0x1b659
callq 0x1b860
movl %eax, -0x24c(%rbp)
cmpl $0x0, %eax
jl 0x1b659
callq 0x1b860
movl %eax, -0x250(%rbp)
cmpl $0x0, %eax
jge 0x1b665
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1b7fd
movq -0x238(%rbp), %rdi
movl -0x244(%rbp), %eax
subl $0x1, %eax
cltq
movq -0x220(%rbp,%rax,8), %rsi
movl -0x248(%rbp), %edx
movl -0x24c(%rbp), %ecx
movl -0x250(%rbp), %r8d
callq 0x1bb40
movq %rax, -0x230(%rbp)
callq 0x1ba10
movq %rax, -0x238(%rbp)
cmpq $0x0, %rax
je 0x1b6e2
callq 0x1ba10
movq %rax, -0x240(%rbp)
cmpq $0x0, %rax
je 0x1b6e2
callq 0x1b860
movl %eax, -0x248(%rbp)
cmpl $0x0, %eax
jl 0x1b6e2
callq 0x1b860
movl %eax, -0x24c(%rbp)
cmpl $0x0, %eax
jge 0x1b6ee
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1b7fd
movq -0x238(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3f, %eax
je 0x1b72a
movq -0x238(%rbp), %rdi
movq -0x240(%rbp), %rsi
movl -0x248(%rbp), %edx
movl -0x24c(%rbp), %ecx
movl -0x250(%rbp), %r8d
movq -0x230(%rbp), %r9
callq 0x1bd50
jmp 0x1b72c
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1b5fb
callq 0x1b860
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jge 0x1b753
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1b7fd
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x1b7f6
callq 0x1b860
movl %eax, -0x254(%rbp)
cmpl $0x0, %eax
jl 0x1b7a6
callq 0x1b860
movl %eax, -0x258(%rbp)
cmpl $0x0, %eax
jl 0x1b7a6
callq 0x1b860
movl %eax, -0x25c(%rbp)
cmpl $0x0, %eax
jl 0x1b7a6
callq 0x1b860
movl %eax, -0x260(%rbp)
cmpl $0x0, %eax
jge 0x1b7af
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1b7fd
cmpl $0x0, -0x254(%rbp)
je 0x1b7e6
movl -0x8(%rbp), %edi
movl -0x254(%rbp), %eax
subl $0x1, %eax
cltq
movq -0x220(%rbp,%rax,8), %rsi
movl -0x258(%rbp), %edx
movl -0x25c(%rbp), %ecx
movl -0x260(%rbp), %r8d
callq 0x1bff0
jmp 0x1b7e8
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1b75a
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
nopl (%rax)