// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x183b2(%rip), %rsi     # 0x30de9
movl $0x2, %edx
callq 0x3050
cmpl $0x0, %eax
jne 0x18a94
cmpl $-0x1, 0x210c3(%rip)    # 0x39b10
jne 0x18a8f
movq -0x8(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
je 0x18a6a
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
jmp 0x18a77
leaq 0x1837b(%rip), %rax     # 0x30dec
movq %rax, -0x10(%rbp)
jmp 0x18a77
movq -0x10(%rbp), %rdi
callq 0x1b350
cmpl $0x0, %eax
jle 0x18a8f
movl $0x0, 0x21081(%rip)     # 0x39b10
jmp 0x18cc3
movq -0x8(%rbp), %rdi
leaq 0x18356(%rip), %rsi     # 0x30df5
callq 0x30f0
cmpl $0x0, %eax
je 0x18ac2
movq -0x8(%rbp), %rdi
leaq 0x18344(%rip), %rsi     # 0x30df8
callq 0x30f0
cmpl $0x0, %eax
jne 0x18cc1
cmpq $0x0, 0x2513e(%rip)     # 0x3dc08
jne 0x18cc1
leaq 0x2b761(%rip), %rax     # 0x44238
movq (%rax), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x27160
movq %rax, %rsi
movl $0x51, %edi
movl $0x3, %edx
callq 0x24b00
movq %rax, 0x2510c(%rip)     # 0x3dc08
movq 0x25105(%rip), %rsi     # 0x3dc08
leaq 0x2c6(%rip), %rdi       # 0x18dd0
leaq 0x250bf(%rip), %rdx     # 0x3dbd0
callq 0x18cd0
movq 0x250eb(%rip), %rsi     # 0x3dc08
leaq 0x3ec(%rip), %rdi       # 0x18f10
leaq 0x250a5(%rip), %rdx     # 0x3dbd0
addq $0x10, %rdx
callq 0x18cd0
movq 0x250cd(%rip), %rsi     # 0x3dc08
leaq 0x4ae(%rip), %rdi       # 0x18ff0
leaq 0x25087(%rip), %rdx     # 0x3dbd0
addq $0x8, %rdx
callq 0x18cd0
movq 0x250af(%rip), %rsi     # 0x3dc08
leaq 0x570(%rip), %rdi       # 0x190d0
leaq 0x25069(%rip), %rdx     # 0x3dbd0
addq $0x28, %rdx
callq 0x18cd0
movq -0x8(%rbp), %rdi
leaq 0x1827a(%rip), %rsi     # 0x30df5
callq 0x30f0
cmpl $0x0, %eax
jne 0x18cbf
leaq 0x2b6a8(%rip), %rax     # 0x44238
movq (%rax), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x27160
movq %rax, %rsi
movl $0x51, %edi
movl $0x3, %edx
callq 0x24b00
movq %rax, 0x2505b(%rip)     # 0x3dc10
leaq 0x22a84(%rip), %rax     # 0x3b640
movq (%rax), %rax
movl $0x328, (%rax)          # imm = 0x328
leaq 0x22a74(%rip), %rax     # 0x3b640
movq (%rax), %rax
movq 0x8(%rax), %rax
leaq 0x22a66(%rip), %rcx     # 0x3b640
movq (%rcx), %rcx
movslq (%rcx), %rcx
addq %rcx, %rax
leaq 0x22a56(%rip), %rcx     # 0x3b640
movq (%rcx), %rcx
cmpq 0x10(%rcx), %rax
jb 0x18c11
leaq 0x22a46(%rip), %rax     # 0x3b640
movq (%rax), %rax
movl (%rax), %edi
leaq 0x22a3a(%rip), %rsi     # 0x3b640
callq 0x253d0
movq %rax, -0x18(%rbp)
jmp 0x18c5c
leaq 0x22a28(%rip), %rax     # 0x3b640
movq (%rax), %rax
movl (%rax), %edx
leaq 0x22a1c(%rip), %rax     # 0x3b640
movq (%rax), %rax
movq 0x8(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x8(%rax)
leaq 0x22a04(%rip), %rax     # 0x3b640
movq (%rax), %rax
movq 0x8(%rax), %rax
leaq 0x229f6(%rip), %rcx     # 0x3b640
movq (%rcx), %rcx
movslq (%rcx), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq 0x24fb1(%rip), %rsi     # 0x3dc18
callq 0x23500
movq %rax, 0x24fa5(%rip)     # 0x3dc18
movq 0x24f9e(%rip), %rax     # 0x3dc18
movq (%rax), %rax
movl $0x0, (%rax)
movq 0x24f86(%rip), %rsi     # 0x3dc10
leaq 0x68f(%rip), %rdi       # 0x19320
leaq 0x24f38(%rip), %rdx     # 0x3dbd0
addq $0x20, %rdx
callq 0x18cd0
movq 0x24f68(%rip), %rsi     # 0x3dc10
leaq 0x7d1(%rip), %rdi       # 0x19480
leaq 0x24f1a(%rip), %rdx     # 0x3dbd0
addq $0x18, %rdx
callq 0x18cd0
jmp 0x18cc1
jmp 0x18cc3
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)