	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __bba_init
___bba_init:                            ## @__bba_init
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movq	_NETIF_DEBUG@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_LWIP_DEBUGF
	movq	_BBA_CMD_IRMASKALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edi
	callq	_bba_cmd_out8
	xorl	%eax, %eax
	callq	___bba_reset
	movl	$1, %edi
	callq	_bba_cmd_in8
	movl	%eax, 16(%r14)
	leaq	12(%r14), %rsi
	movl	$4, %edi
	movl	$2, %edx
	callq	_bba_cmd_outs
	movl	8(%r14), %esi
	movl	$5, %edi
	callq	_bba_cmd_out8
	movl	$88, %edi
	movl	$128, %esi
	callq	_bba_out8
	movl	$89, %edi
	xorl	%esi, %esi
	callq	_bba_out8
	movl	$90, %edi
	movl	$3, %esi
	callq	_bba_out8
	movl	$91, %edi
	movl	$131, %esi
	callq	_bba_out8
	movl	$92, %edi
	movl	$50, %esi
	callq	_bba_out8
	movl	$93, %edi
	movl	$254, %esi
	callq	_bba_out8
	movl	$94, %edi
	movl	$31, %esi
	callq	_bba_out8
	movl	$95, %edi
	movl	$31, %esi
	callq	_bba_out8
	movl	$100, %edi
	callq	_udelay
	xorl	%eax, %eax
	callq	___bba_recv_init
	movq	_BBA_NWAYC@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_bba_in8
	movl	%eax, %ebx
	andl	$192, %ebx
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_bba_out8
	movl	$100, %edi
	callq	_udelay
	leal	4(%rbx), %esi
	movl	(%r12), %edi
	callq	_bba_out8
	movl	$100, %edi
	callq	_udelay
	orl	$12, %ebx
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_bba_out8
	movl	$100, %edi
	callq	_udelay
	movq	_BBA_NAFR_PAR0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r14), %rax
	movq	(%rax), %rsi
	movl	$6, %edx
	callq	_bba_ins
	movl	(%r15), %edi
	movq	(%r14), %rax
	movq	(%rax), %rax
	movslq	20(%rax), %rsi
	callq	_LWIP_DEBUGF
	movq	_BBA_IR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$255, %esi
	callq	_bba_out8
	movq	_BBA_IMR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BBA_IMR_FIFOEIM@GOTPCREL(%rip), %rax
	movzbl	(%rax), %esi
	xorl	$255, %esi
	callq	_bba_out8
	movq	_BBA_CMD_IRMASKNONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edi
	callq	_bba_cmd_out8
	movq	_ERR_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_ERR_IF@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERR_IF,4,2                     ## @ERR_IF
	.comm	_NETIF_DEBUG,4,2                ## @NETIF_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"initializing BBA...\n"

	.comm	_BBA_CMD_IRMASKALL,4,2          ## @BBA_CMD_IRMASKALL
	.comm	_BBA_NWAYC,4,2                  ## @BBA_NWAYC
	.comm	_BBA_NAFR_PAR0,4,2              ## @BBA_NAFR_PAR0
	.comm	_BBA_IR,4,2                     ## @BBA_IR
	.comm	_BBA_IMR,4,2                    ## @BBA_IMR
	.comm	_BBA_IMR_FIFOEIM,4,2            ## @BBA_IMR_FIFOEIM
	.comm	_BBA_CMD_IRMASKNONE,4,2         ## @BBA_CMD_IRMASKNONE
	.comm	_ERR_OK,4,2                     ## @ERR_OK
	.no_dead_strip	___bba_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __bba_init
___bba_init:                            ; @__bba_init
	.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
	ldr	x20, [x0]
	cbz	x20, LBB0_2
; %bb.1:
Lloh0:
	adrp	x21, _NETIF_DEBUG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _NETIF_DEBUG@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_LWIP_DEBUGF
Lloh4:
	adrp	x8, _BBA_CMD_IRMASKALL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _BBA_CMD_IRMASKALL@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w0, #2
	bl	_bba_cmd_out8
	bl	___bba_reset
	mov	w0, #1
	bl	_bba_cmd_in8
	str	w0, [x20, #16]
	add	x1, x20, #12
	mov	w0, #4
	mov	w2, #2
	bl	_bba_cmd_outs
	ldr	w1, [x20, #8]
	mov	w0, #5
	bl	_bba_cmd_out8
	mov	w0, #88
	mov	w1, #128
	bl	_bba_out8
	mov	w0, #89
	mov	w1, #0
	bl	_bba_out8
	mov	w0, #90
	mov	w1, #3
	bl	_bba_out8
	mov	w0, #91
	mov	w1, #131
	bl	_bba_out8
	mov	w0, #92
	mov	w1, #50
	bl	_bba_out8
	mov	w0, #93
	mov	w1, #254
	bl	_bba_out8
	mov	w0, #94
	mov	w1, #31
	bl	_bba_out8
	mov	w0, #95
	mov	w1, #31
	bl	_bba_out8
	mov	w0, #100
	bl	_udelay
	bl	___bba_recv_init
Lloh7:
	adrp	x22, _BBA_NWAYC@GOTPAGE
Lloh8:
	ldr	x22, [x22, _BBA_NWAYC@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_bba_in8
	and	w19, w0, #0xc0
	ldr	w0, [x22]
	mov	x1, x19
	bl	_bba_out8
	mov	w0, #100
	bl	_udelay
	orr	w1, w19, #0x4
	ldr	w0, [x22]
	bl	_bba_out8
	mov	w0, #100
	bl	_udelay
	orr	w1, w19, #0xc
	ldr	w0, [x22]
	bl	_bba_out8
	mov	w0, #100
	bl	_udelay
Lloh9:
	adrp	x8, _BBA_NAFR_PAR0@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BBA_NAFR_PAR0@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	x8, [x20]
	ldr	x1, [x8]
	mov	w2, #6
	bl	_bba_ins
	ldr	w0, [x21]
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldrsw	x1, [x8, #20]
	bl	_LWIP_DEBUGF
Lloh12:
	adrp	x8, _BBA_IR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BBA_IR@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	mov	w1, #255
	bl	_bba_out8
Lloh15:
	adrp	x8, _BBA_IMR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BBA_IMR@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x8, _BBA_IMR_FIFOEIM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BBA_IMR_FIFOEIM@GOTPAGEOFF]
	ldrb	w8, [x8]
	eor	w1, w8, #0xff
	bl	_bba_out8
Lloh20:
	adrp	x8, _BBA_CMD_IRMASKNONE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BBA_CMD_IRMASKNONE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	w0, #2
	bl	_bba_cmd_out8
Lloh23:
	adrp	x8, _ERR_OK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ERR_OK@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh25:
	adrp	x8, _ERR_IF@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ERR_IF@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	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	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ERR_IF,4,2                     ; @ERR_IF
	.comm	_NETIF_DEBUG,4,2                ; @NETIF_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"initializing BBA...\n"

	.comm	_BBA_CMD_IRMASKALL,4,2          ; @BBA_CMD_IRMASKALL
	.comm	_BBA_NWAYC,4,2                  ; @BBA_NWAYC
	.comm	_BBA_NAFR_PAR0,4,2              ; @BBA_NAFR_PAR0
	.comm	_BBA_IR,4,2                     ; @BBA_IR
	.comm	_BBA_IMR,4,2                    ; @BBA_IMR
	.comm	_BBA_IMR_FIFOEIM,4,2            ; @BBA_IMR_FIFOEIM
	.comm	_BBA_CMD_IRMASKNONE,4,2         ; @BBA_CMD_IRMASKNONE
	.comm	_ERR_OK,4,2                     ; @ERR_OK
	.no_dead_strip	___bba_init
.subsections_via_symbols
