	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __bba_link_tx
___bba_link_tx:                         ## @__bba_link_tx
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_BBA_MINPKTSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	(%rbx), %r13
	movq	%r13, %rdi
	callq	___bba_tx_stop
	movq	%r13, %rdi
	callq	___bba_exi_stop
	movq	(%r14), %rax
	movq	_BBA_TX_MAX_PACKET_SIZE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_LWP_GetSelf
	movslq	%eax, %rdi
	callq	_LWIP_ERROR
	movq	%r13, %rdi
	callq	___bba_tx_wake
	movq	%r13, %rdi
	callq	___bba_exi_wake
	movq	_ERR_PKTSIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	movq	%r13, %rdi
	callq	___linkstate
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_NETIF_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	xorl	%eax, %eax
	callq	_LWP_GetSelf
	movslq	%eax, %rsi
	movl	%r12d, %edi
	callq	_LWIP_DEBUGF
	movq	_BBA_TXFIFOCNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r14), %rsi
	callq	_bba_out12
	xorl	%eax, %eax
	callq	_bba_select
	movq	_BBA_WRTXFIFOD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_bba_outsregister
	movq	%r14, %rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	callq	_bba_outsdata_fast
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_5
## %bb.6:
	movq	(%r14), %rax
	movq	_BBA_MINPKTSIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rsi
	cmpq	%rsi, %rax
	jge	LBB0_8
## %bb.7:
	subl	%eax, %esi
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_bba_outsdata
LBB0_8:
	xorl	%eax, %eax
	callq	_bba_deselect
	movq	_BBA_NCRA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r14d, %edi
	callq	_bba_in8
	movq	_BBA_NCRA_ST0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movq	_BBA_NCRA_ST1@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	%r14d, %edi
	callq	_bba_out8
	movq	%r13, %rdi
	callq	___bba_exi_wake
	movq	_ERR_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_LWIP_ERROR
	movq	%r13, %rdi
	callq	___bba_tx_wake
	movq	%r13, %rdi
	callq	___bba_exi_wake
	movq	_ERR_ABRT@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_11
## %bb.10:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BBA_MINPKTSIZE,4,2             ## @BBA_MINPKTSIZE
	.comm	_BBA_TX_MAX_PACKET_SIZE,8,3     ## @BBA_TX_MAX_PACKET_SIZE
	.comm	_ERR_PKTSIZE,4,2                ## @ERR_PKTSIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"__bba_link_tx(error link state)\n"

	.comm	_ERR_ABRT,4,2                   ## @ERR_ABRT
	.comm	_NETIF_DEBUG,4,2                ## @NETIF_DEBUG
	.comm	_BBA_TXFIFOCNT,4,2              ## @BBA_TXFIFOCNT
	.comm	_BBA_WRTXFIFOD,4,2              ## @BBA_WRTXFIFOD
	.comm	_BBA_NCRA,4,2                   ## @BBA_NCRA
	.comm	_BBA_NCRA_ST0,4,2               ## @BBA_NCRA_ST0
	.comm	_BBA_NCRA_ST1,4,2               ## @BBA_NCRA_ST1
	.comm	_ERR_OK,4,2                     ## @ERR_OK
	.no_dead_strip	___bba_link_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __bba_link_tx
___bba_link_tx:                         ; @__bba_link_tx
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #16
	mov	x20, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x23, _BBA_MINPKTSIZE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _BBA_MINPKTSIZE@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	ldr	x19, [x0]
	mov	x0, x19
	bl	___bba_tx_stop
	mov	x0, x19
	bl	___bba_exi_stop
	ldr	x8, [x20]
Lloh7:
	adrp	x9, _BBA_TX_MAX_PACKET_SIZE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _BBA_TX_MAX_PACKET_SIZE@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_2
; %bb.1:
	bl	_LWP_GetSelf
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x0, w0
	bl	_LWIP_ERROR
	mov	x0, x19
	bl	___bba_tx_wake
	mov	x0, x19
	bl	___bba_exi_wake
Lloh10:
	adrp	x8, _ERR_PKTSIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ERR_PKTSIZE@GOTPAGEOFF]
	b	LBB0_9
LBB0_2:
	mov	x0, x19
	bl	___linkstate
	cbz	w0, LBB0_8
; %bb.3:
Lloh12:
	adrp	x8, _NETIF_DEBUG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NETIF_DEBUG@GOTPAGEOFF]
Lloh14:
	ldr	w22, [x8]
	bl	_LWP_GetSelf
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
	mov	x0, x22
	bl	_LWIP_DEBUGF
Lloh15:
	adrp	x8, _BBA_TXFIFOCNT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BBA_TXFIFOCNT@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldr	x1, [x20]
	bl	_bba_out12
	bl	_bba_select
Lloh18:
	adrp	x8, _BBA_WRTXFIFOD@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BBA_WRTXFIFOD@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_bba_outsregister
	mov	x22, x20
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w1, w0, [x22, #8]
	bl	_bba_outsdata_fast
	ldr	x22, [x22, #16]
	cbnz	x22, LBB0_4
; %bb.5:
	ldr	x8, [x20]
	ldrsw	x9, [x23]
	cmp	x8, x9
	b.ge	LBB0_7
; %bb.6:
	sub	w1, w9, w8
	mov	x0, x21
	bl	_bba_outsdata
LBB0_7:
	bl	_bba_deselect
Lloh21:
	adrp	x8, _BBA_NCRA@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BBA_NCRA@GOTPAGEOFF]
Lloh23:
	ldr	w20, [x8]
	mov	x0, x20
	bl	_bba_in8
Lloh24:
	adrp	x8, _BBA_NCRA_ST0@GOTPAGE
Lloh25:
	ldr	x8, [x8, _BBA_NCRA_ST0@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh27:
	adrp	x9, _BBA_NCRA_ST1@GOTPAGE
Lloh28:
	ldr	x9, [x9, _BBA_NCRA_ST1@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x20
	bl	_bba_out8
	mov	x0, x19
	bl	___bba_exi_wake
Lloh30:
	adrp	x8, _ERR_OK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ERR_OK@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh32:
	adrp	x0, l_.str.1@PAGE
Lloh33:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_LWIP_ERROR
	mov	x0, x19
	bl	___bba_tx_wake
	mov	x0, x19
	bl	___bba_exi_wake
Lloh34:
	adrp	x8, _ERR_ABRT@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ERR_ABRT@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	ldur	x8, [x29, #-56]
Lloh36:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh37:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_BBA_MINPKTSIZE,4,2             ; @BBA_MINPKTSIZE
	.comm	_BBA_TX_MAX_PACKET_SIZE,8,3     ; @BBA_TX_MAX_PACKET_SIZE
	.comm	_ERR_PKTSIZE,4,2                ; @ERR_PKTSIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"__bba_link_tx(error link state)\n"

	.comm	_ERR_ABRT,4,2                   ; @ERR_ABRT
	.comm	_NETIF_DEBUG,4,2                ; @NETIF_DEBUG
	.comm	_BBA_TXFIFOCNT,4,2              ; @BBA_TXFIFOCNT
	.comm	_BBA_WRTXFIFOD,4,2              ; @BBA_WRTXFIFOD
	.comm	_BBA_NCRA,4,2                   ; @BBA_NCRA
	.comm	_BBA_NCRA_ST0,4,2               ; @BBA_NCRA_ST0
	.comm	_BBA_NCRA_ST1,4,2               ; @BBA_NCRA_ST1
	.comm	_ERR_OK,4,2                     ; @ERR_OK
	.no_dead_strip	___bba_link_tx
.subsections_via_symbols
