// File: /workspace/github_c_makefile_star2_O3/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 0x104a2
movq %rdi, %rbx
cmpb $0x61, 0x1(%rdi)
jne 0x103d3
cmpl $-0x1, 0x19262(%rip)    # 0x29600
jne 0x104a2
cmpb $0x0, 0x2(%rbx)
leaq 0x2(%rbx), %rax
leaq 0xfaee(%rip), %rdi      # 0x1fea1
cmovneq %rax, %rdi
callq 0x11d11
testl %eax, %eax
jle 0x104a2
movl $0x0, 0x19232(%rip)     # 0x29600
jmp 0x104a2
cmpb $0x62, 0x1(%rbx)
jne 0x103df
cmpb $0x0, 0x2(%rbx)
je 0x103f3
cmpb $0x43, 0x1(%rbx)
jne 0x104a2
cmpb $0x0, 0x2(%rbx)
jne 0x104a2
cmpq $0x0, 0x1c63d(%rip)     # 0x2ca38
jne 0x104a2
leaq 0x22bd0(%rip), %r14     # 0x32fd8
movq (%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x188ea
movl $0x51, %edi
movq %rax, %rsi
movl $0x3, %edx
callq 0x17456
movq %rax, 0x1c60b(%rip)     # 0x2ca38
leaq 0x18b(%rip), %rdi       # 0x105bf
leaq 0x1c5c5(%rip), %rdx     # 0x2ca00
movq %rax, %rsi
callq 0x10561
movq 0x1c5ee(%rip), %rsi     # 0x2ca38
leaq 0x286(%rip), %rdi       # 0x106d7
leaq 0x1c5b8(%rip), %rdx     # 0x2ca10
callq 0x10561
movq 0x1c5d4(%rip), %rsi     # 0x2ca38
leaq 0x326(%rip), %rdi       # 0x10791
leaq 0x1c596(%rip), %rdx     # 0x2ca08
callq 0x10561
movq 0x1c5ba(%rip), %rsi     # 0x2ca38
leaq 0x38f(%rip), %rdi       # 0x10814
leaq 0x1c59c(%rip), %rdx     # 0x2ca28
callq 0x10561
cmpb $0x2d, (%rbx)
jne 0x104a2
cmpb $0x62, 0x1(%rbx)
jne 0x104a2
cmpb $0x0, 0x2(%rbx)
je 0x104aa
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x188ea
movl $0x51, %edi
movq %rax, %rsi
movl $0x3, %edx
callq 0x17456
movq %rax, 0x1c571(%rip)     # 0x2ca40
leaq 0x1a29a(%rip), %rax     # 0x2a770
movq (%rax), %rax
movl $0x328, (%rax)          # imm = 0x328
movq 0x8(%rax), %rdi
leaq 0x328(%rdi), %rcx
cmpq 0x10(%rax), %rcx
jae 0x104f6
movq %rcx, 0x8(%rax)
jmp 0x1050a
leaq 0x1a273(%rip), %rsi     # 0x2a770
movl $0x328, %edi            # imm = 0x328
callq 0x17800
movq %rax, %rdi
movq 0x1c537(%rip), %rsi     # 0x2ca48
callq 0x16a18
movq %rax, 0x1c52b(%rip)     # 0x2ca48
movq (%rax), %rax
movl $0x0, (%rax)
movq 0x1c513(%rip), %rsi     # 0x2ca40
leaq 0x4c3(%rip), %rdi       # 0x109f7
leaq 0x1c4e5(%rip), %rdx     # 0x2ca20
callq 0x10561
movq 0x1c4f9(%rip), %rsi     # 0x2ca40
leaq 0x5a3(%rip), %rdi       # 0x10af1
leaq 0x1c4c3(%rip), %rdx     # 0x2ca18
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10561