	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bba_event_handler
_bba_event_handler:                     ## @bba_event_handler
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_gc_netif@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	(%rax), %r14
	movq	_EXI_CHANNEL_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EXI_DEVICE_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	_bba_event_handler(%rip), %rdx
	callq	_EXI_Lock
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	$3, %edi
	callq	_bba_cmd_in8
	movl	%eax, %r15d
	movq	_BBA_CMD_IRMASKALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edi
	callq	_bba_cmd_out8
	movq	_NETIF_DEBUG@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movslq	%r15d, %rbx
	movq	%rbx, %rsi
	callq	_LWIP_DEBUGF
	testb	$-128, %bl
	jne	LBB0_3
## %bb.4:
	testb	$64, %r15b
	jne	LBB0_5
## %bb.6:
	testb	$32, %r15b
	jne	LBB0_7
## %bb.9:
	testb	$16, %r15b
	jne	LBB0_10
## %bb.11:
	testb	$8, %r15b
	movq	_EXI_CHANNEL_0@GOTPCREL(%rip), %r14
	jne	LBB0_12
## %bb.13:
	movq	%rbx, %rdi
	callq	_LWIP_ERROR
	movq	(%r13), %rdi
	callq	_bba_interrupt
	jmp	LBB0_14
LBB0_1:
	movq	_NETIF_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	$1, %edi
	leaq	L_.str(%rip), %rsi
	callq	_LWIP_DEBUGF
	jmp	LBB0_16
LBB0_3:
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_LWIP_DEBUGF
	movq	(%r13), %rdi
	callq	_bba_interrupt
	movl	$3, %edi
	movl	$128, %esi
	jmp	LBB0_8
LBB0_5:
	movq	%rbx, %rdi
	callq	_LWIP_ERROR
	movq	(%r13), %rdi
	callq	___bba_init
	movl	$3, %edi
	movl	$64, %esi
	jmp	LBB0_8
LBB0_7:
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_LWIP_DEBUGF
	movl	$3, %edi
	movl	$32, %esi
	jmp	LBB0_8
LBB0_10:
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_LWIP_DEBUGF
	movl	(%r14), %esi
	movl	$5, %edi
	callq	_bba_cmd_out8
	leaq	-44(%rbp), %rsi
	movl	$8, %edi
	movl	$4, %edx
	callq	_bba_cmd_ins
	movl	-44(%rbp), %esi
	movq	%r14, %rdi
	callq	_bba_calc_response
	movl	%eax, -48(%rbp)
	leaq	-48(%rbp), %rsi
	movl	$9, %edi
	movl	$4, %edx
	callq	_bba_cmd_outs
	movl	$3, %edi
	movl	$16, %esi
LBB0_8:
	callq	_bba_cmd_out8
	movq	_BBA_CMD_IRMASKNONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edi
	callq	_bba_cmd_out8
	movq	_EXI_CHANNEL_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_15:
	callq	_EXI_Unlock
LBB0_16:
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	(%r12), %ebx
	movl	$11, %edi
	callq	_bba_cmd_in8
	movslq	%eax, %rsi
	movl	%ebx, %edi
	callq	_LWIP_DEBUGF
	movl	$3, %edi
	movl	$8, %esi
	callq	_bba_cmd_out8
LBB0_14:
	movq	_BBA_CMD_IRMASKNONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edi
	callq	_bba_cmd_out8
	movl	(%r14), %edi
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_gc_netif,8,3                   ## @gc_netif
	.comm	_EXI_CHANNEL_0,4,2              ## @EXI_CHANNEL_0
	.comm	_EXI_DEVICE_2,4,2               ## @EXI_DEVICE_2
	.comm	_NETIF_DEBUG,4,2                ## @NETIF_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bba_event_handler(exi locked)\n"

	.comm	_BBA_CMD_IRMASKALL,4,2          ## @BBA_CMD_IRMASKALL
	.comm	_BBA_CMD_IRMASKNONE,4,2         ## @BBA_CMD_IRMASKNONE
	.no_dead_strip	_bba_event_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bba_event_handler
_bba_event_handler:                     ; @bba_event_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x23, _gc_netif@GOTPAGE
Lloh1:
	ldr	x23, [x23, _gc_netif@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x19, [x8]
Lloh2:
	adrp	x22, _EXI_CHANNEL_0@GOTPAGE
Lloh3:
	ldr	x22, [x22, _EXI_CHANNEL_0@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh4:
	adrp	x8, _EXI_DEVICE_2@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EXI_DEVICE_2@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x2, _bba_event_handler@PAGE
Lloh8:
	add	x2, x2, _bba_event_handler@PAGEOFF
	bl	_EXI_Lock
	cbz	x0, LBB0_7
; %bb.1:
	mov	w0, #3
	bl	_bba_cmd_in8
	mov	x21, x0
Lloh9:
	adrp	x8, _BBA_CMD_IRMASKALL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BBA_CMD_IRMASKALL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w0, #2
	bl	_bba_cmd_out8
Lloh12:
	adrp	x24, _NETIF_DEBUG@GOTPAGE
Lloh13:
	ldr	x24, [x24, _NETIF_DEBUG@GOTPAGEOFF]
	ldr	w0, [x24]
	sxtw	x20, w21
	mov	x1, x20
	bl	_LWIP_DEBUGF
	tbnz	w21, #7, LBB0_8
; %bb.2:
	tbnz	w20, #6, LBB0_9
; %bb.3:
	tbnz	w20, #5, LBB0_10
; %bb.4:
	tbnz	w20, #4, LBB0_11
; %bb.5:
	tbnz	w20, #3, LBB0_12
; %bb.6:
	mov	x0, x20
	bl	_LWIP_ERROR
	ldr	x0, [x23]
	bl	_bba_interrupt
	b	LBB0_14
LBB0_7:
Lloh14:
	adrp	x8, _NETIF_DEBUG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NETIF_DEBUG@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	orr	w0, w8, #0x1
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_LWIP_DEBUGF
	b	LBB0_15
LBB0_8:
	ldr	w0, [x24]
	mov	x1, x20
	bl	_LWIP_DEBUGF
	ldr	x0, [x23]
	bl	_bba_interrupt
	mov	w0, #3
	mov	w1, #128
	b	LBB0_13
LBB0_9:
	mov	x0, x20
	bl	_LWIP_ERROR
	ldr	x0, [x23]
	bl	___bba_init
	mov	w0, #3
	mov	w1, #64
	b	LBB0_13
LBB0_10:
	ldr	w0, [x24]
	mov	x1, x20
	bl	_LWIP_DEBUGF
	mov	w0, #3
	mov	w1, #32
	b	LBB0_13
LBB0_11:
	ldr	w0, [x24]
	mov	x1, x20
	bl	_LWIP_DEBUGF
	ldr	w1, [x19]
	mov	w0, #5
	bl	_bba_cmd_out8
	add	x1, sp, #8
	mov	w0, #8
	mov	w2, #4
	bl	_bba_cmd_ins
	ldr	w1, [sp, #8]
	mov	x0, x19
	bl	_bba_calc_response
	str	w0, [sp, #12]
	add	x1, sp, #12
	mov	w0, #9
	mov	w2, #4
	bl	_bba_cmd_outs
	mov	w0, #3
	mov	w1, #16
	b	LBB0_13
LBB0_12:
	ldr	w19, [x24]
	mov	w0, #11
	bl	_bba_cmd_in8
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
	mov	x0, x19
	bl	_LWIP_DEBUGF
	mov	w0, #3
	mov	w1, #8
LBB0_13:
	bl	_bba_cmd_out8
LBB0_14:
Lloh19:
	adrp	x8, _BBA_CMD_IRMASKNONE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BBA_CMD_IRMASKNONE@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	w0, #2
	bl	_bba_cmd_out8
	ldr	w0, [x22]
	bl	_EXI_Unlock
LBB0_15:
	mov	w0, #1
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_gc_netif,8,3                   ; @gc_netif
	.comm	_EXI_CHANNEL_0,4,2              ; @EXI_CHANNEL_0
	.comm	_EXI_DEVICE_2,4,2               ; @EXI_DEVICE_2
	.comm	_NETIF_DEBUG,4,2                ; @NETIF_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bba_event_handler(exi locked)\n"

	.comm	_BBA_CMD_IRMASKALL,4,2          ; @BBA_CMD_IRMASKALL
	.comm	_BBA_CMD_IRMASKNONE,4,2         ; @BBA_CMD_IRMASKNONE
	.no_dead_strip	_bba_event_handler
.subsections_via_symbols
