// File: /workspace/github_c_makefile_star2_O2/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
cmpb $0x2d, (%rdi)
jne 0xf492
movq %rdi, %rbx
cmpb $0x61, 0x1(%rdi)
jne 0xf3c7
cmpl $-0x1, 0x1926b(%rip)    # 0x28600
jne 0xf492
cmpb $0x0, 0x2(%rbx)
leaq 0x2(%rbx), %rax
leaq 0xeaf7(%rip), %rdi      # 0x1dea1
cmovneq %rax, %rdi
callq 0x10c65
testl %eax, %eax
jle 0xf492
andl $0x0, 0x1923e(%rip)     # 0x28600
jmp 0xf492
cmpb $0x62, 0x1(%rbx)
jne 0xf3d3
cmpb $0x0, 0x2(%rbx)
je 0xf3e7
cmpb $0x43, 0x1(%rbx)
jne 0xf492
cmpb $0x0, 0x2(%rbx)
jne 0xf492
cmpq $0x0, 0x1c649(%rip)     # 0x2ba38
jne 0xf492
leaq 0x22bdc(%rip), %r14     # 0x31fd8
movq (%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x17382
pushq $0x51
popq %rdi
pushq $0x3
popq %rdx
movq %rax, %rsi
callq 0x16090
movq %rax, 0x1c61b(%rip)     # 0x2ba38
leaq 0x182(%rip), %rdi       # 0xf5a6
leaq 0x1c5d5(%rip), %rdx     # 0x2ba00
movq %rax, %rsi
callq 0xf54a
movq 0x1c5fe(%rip), %rsi     # 0x2ba38
leaq 0x279(%rip), %rdi       # 0xf6ba
leaq 0x1c5c8(%rip), %rdx     # 0x2ba10
callq 0xf54a
movq 0x1c5e4(%rip), %rsi     # 0x2ba38
leaq 0x315(%rip), %rdi       # 0xf770
leaq 0x1c5a6(%rip), %rdx     # 0x2ba08
callq 0xf54a
movq 0x1c5ca(%rip), %rsi     # 0x2ba38
leaq 0x37a(%rip), %rdi       # 0xf7ef
leaq 0x1c5ac(%rip), %rdx     # 0x2ba28
callq 0xf54a
cmpb $0x2d, (%rbx)
jne 0xf492
cmpb $0x62, 0x1(%rbx)
jne 0xf492
cmpb $0x0, 0x2(%rbx)
je 0xf49a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x17382
pushq $0x51
popq %rdi
pushq $0x3
popq %rdx
movq %rax, %rsi
callq 0x16090
movq %rax, 0x1c585(%rip)     # 0x2ba40
leaq 0x1a2ae(%rip), %rax     # 0x29770
movq (%rax), %rax
movl $0x328, (%rax)          # imm = 0x328
movq 0x8(%rax), %rdi
leaq 0x328(%rdi), %rcx
cmpq 0x10(%rax), %rcx
jae 0xf4e2
movq %rcx, 0x8(%rax)
jmp 0xf4f6
leaq 0x1a287(%rip), %rsi     # 0x29770
movl $0x328, %edi            # imm = 0x328
callq 0x16438
movq %rax, %rdi
movq 0x1c54b(%rip), %rsi     # 0x2ba48
callq 0x156a0
movq %rax, 0x1c53f(%rip)     # 0x2ba48
movq (%rax), %rax
andl $0x0, (%rax)
movq 0x1c52a(%rip), %rsi     # 0x2ba40
leaq 0x488(%rip), %rdi       # 0xf9a5
leaq 0x1c4fc(%rip), %rdx     # 0x2ba20
callq 0xf54a
movq 0x1c510(%rip), %rsi     # 0x2ba40
leaq 0x55e(%rip), %rdi       # 0xfa95
leaq 0x1c4da(%rip), %rdx     # 0x2ba18
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xf54a