// File: /workspace/github_c_makefile_star2_O1/Oric4ever[P]lcc65/6502/build/../src/main.c
// Function: bbinit
void bbinit(opt) char *opt; {
	if (strncmp(opt, "-a", 2) == 0) {
		if (ncalled == -1 && process(opt[2] ? &opt[2] : "prof.out") > 0)
			ncalled = 0;
	} else if ((strcmp(opt, "-b") == 0 || strcmp(opt, "-C") == 0) && YYlink == 0) {
		YYlink = genident(STATIC, array(unsignedtype, 0, 0), GLOBAL);
		attach((Apply)bbentry, (Generic)YYlink, &events.entry);
		attach((Apply)bbexit,  (Generic)YYlink, &events.returns);
		attach((Apply)bbfunc,  (Generic)YYlink, &events.exit);
		attach((Apply)bbvars,  (Generic)YYlink, &events.end);
		if (strcmp(opt, "-b") == 0) {
			YYcounts = genident(STATIC, array(unsignedtype, 0, 0), GLOBAL);
			maplist = append((Generic)alloc(sizeof(struct map)), maplist);
			((struct map *)maplist->x)->size = 0;
			attach((Apply)bbcall, (Generic)YYcounts, &events.calls);
			attach((Apply)bbincr, (Generic)YYcounts, &events.points);
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xf95c(%rip), %rsi      # 0x1fdf1
movl $0x2, %edx
callq 0x3050
testl %eax, %eax
je 0x105ce
leaq 0xf94f(%rip), %rsi      # 0x1fdfd
movq %rbx, %rdi
callq 0x3110
testl %eax, %eax
je 0x104d1
leaq 0xf93f(%rip), %rsi      # 0x1fe00
movq %rbx, %rdi
callq 0x3110
testl %eax, %eax
jne 0x105fd
cmpq $0x0, 0x1b55f(%rip)     # 0x2ba38
jne 0x105fd
leaq 0x21af2(%rip), %r14     # 0x31fd8
movq (%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x18a62
movl $0x51, %edi
movq %rax, %rsi
movl $0x3, %edx
callq 0x175a8
movq %rax, 0x1b52d(%rip)     # 0x2ba38
leaq 0x1bc(%rip), %rdi       # 0x106ce
leaq 0x1b4e7(%rip), %rdx     # 0x2ba00
movq %rax, %rsi
callq 0x10670
movq 0x1b510(%rip), %rsi     # 0x2ba38
leaq 0x2b9(%rip), %rdi       # 0x107e8
leaq 0x1b4da(%rip), %rdx     # 0x2ba10
callq 0x10670
movq 0x1b4f6(%rip), %rsi     # 0x2ba38
leaq 0x35b(%rip), %rdi       # 0x108a4
leaq 0x1b4b8(%rip), %rdx     # 0x2ba08
callq 0x10670
movq 0x1b4dc(%rip), %rsi     # 0x2ba38
leaq 0x3c4(%rip), %rdi       # 0x10927
leaq 0x1b4be(%rip), %rdx     # 0x2ba28
callq 0x10670
leaq 0xf887(%rip), %rsi      # 0x1fdfd
movq %rbx, %rdi
callq 0x3110
testl %eax, %eax
jne 0x105fd
movq (%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x18a62
movl $0x51, %edi
movq %rax, %rsi
movl $0x3, %edx
callq 0x175a8
movq %rax, 0x1b499(%rip)     # 0x2ba40
leaq 0x191c2(%rip), %rax     # 0x29770
movq (%rax), %rax
movl $0x328, (%rax)          # imm = 0x328
movq 0x8(%rax), %rdi
leaq 0x328(%rdi), %rcx
cmpq 0x10(%rax), %rcx
jae 0x10605
movq %rcx, 0x8(%rax)
jmp 0x10619
cmpl $-0x1, 0x1802b(%rip)    # 0x28600
jne 0x105fd
cmpb $0x0, 0x2(%rbx)
leaq 0x2(%rbx), %rax
leaq 0xf80e(%rip), %rdi      # 0x1fdf4
cmovneq %rax, %rdi
callq 0x11e8f
testl %eax, %eax
jle 0x105fd
movl $0x0, 0x18003(%rip)     # 0x28600
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x19164(%rip), %rsi     # 0x29770
movl $0x328, %edi            # imm = 0x328
callq 0x17978
movq %rax, %rdi
movq 0x1b428(%rip), %rsi     # 0x2ba48
callq 0x16aec
movq %rax, 0x1b41c(%rip)     # 0x2ba48
movq (%rax), %rax
movl $0x0, (%rax)
movq 0x1b404(%rip), %rsi     # 0x2ba40
leaq 0x4c7(%rip), %rdi       # 0x10b0a
leaq 0x1b3d6(%rip), %rdx     # 0x2ba20
callq 0x10670
movq 0x1b3ea(%rip), %rsi     # 0x2ba40
leaq 0x5a9(%rip), %rdi       # 0x10c06
leaq 0x1b3b4(%rip), %rdx     # 0x2ba18
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10670