	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PBI_BB_Frame                   ## -- Begin function PBI_BB_Frame
	.p2align	4, 0x90
_PBI_BB_Frame:                          ## @PBI_BB_Frame
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_buttondown@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_4
## %bb.1:
	movb	_PBI_BB_Frame.count(%rip), %bl
	cmpb	$1, %bl
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_printf
	movl	%eax, %edi
	callq	_D
	movq	_BB_BUTTON_IRQ_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	_PBI_IRQ@GOTPCREL(%rip), %rcx
	andl	%eax, (%rcx)
	movq	_POKEY_OFFSET_IRQEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_POKEY_IRQEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_POKEY_PutByte
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_3:
	xorb	$1, %bl
	movb	%bl, _PBI_BB_Frame.count(%rip)
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_PBI_BB_Frame.count,1,2 ## @PBI_BB_Frame.count
	.comm	_buttondown,8,3                 ## @buttondown
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"blackbox button up\n"

	.comm	_BB_BUTTON_IRQ_MASK,4,2         ## @BB_BUTTON_IRQ_MASK
	.comm	_PBI_IRQ,4,2                    ## @PBI_IRQ
	.comm	_POKEY_OFFSET_IRQEN,4,2         ## @POKEY_OFFSET_IRQEN
	.comm	_POKEY_IRQEN,4,2                ## @POKEY_IRQEN
	.comm	_FALSE,8,3                      ## @FALSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PBI_BB_Frame                   ; -- Begin function PBI_BB_Frame
	.p2align	2
_PBI_BB_Frame:                          ; @PBI_BB_Frame
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x19, _buttondown@GOTPAGE
Lloh1:
	ldr	x19, [x19, _buttondown@GOTPAGEOFF]
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.1:
	adrp	x20, _PBI_BB_Frame.count@PAGE
	ldrb	w21, [x20, _PBI_BB_Frame.count@PAGEOFF]
	cmp	w21, #1
	b.ne	LBB0_3
; %bb.2:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	bl	_D
Lloh4:
	adrp	x8, _BB_BUTTON_IRQ_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _BB_BUTTON_IRQ_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _PBI_IRQ@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PBI_IRQ@GOTPAGEOFF]
	ldr	w10, [x9]
	bic	w8, w10, w8
	str	w8, [x9]
Lloh9:
	adrp	x8, _POKEY_OFFSET_IRQEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _POKEY_OFFSET_IRQEN@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _POKEY_IRQEN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _POKEY_IRQEN@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_POKEY_PutByte
Lloh15:
	adrp	x8, _FALSE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_3:
	eor	w8, w21, #0x1
	strb	w8, [x20, _PBI_BB_Frame.count@PAGEOFF]
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_PBI_BB_Frame.count,1,2 ; @PBI_BB_Frame.count
	.comm	_buttondown,8,3                 ; @buttondown
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"blackbox button up\n"

	.comm	_BB_BUTTON_IRQ_MASK,4,2         ; @BB_BUTTON_IRQ_MASK
	.comm	_PBI_IRQ,4,2                    ; @PBI_IRQ
	.comm	_POKEY_OFFSET_IRQEN,4,2         ; @POKEY_OFFSET_IRQEN
	.comm	_POKEY_IRQEN,4,2                ; @POKEY_IRQEN
	.comm	_FALSE,8,3                      ; @FALSE
.subsections_via_symbols
