	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdlc_tx_done
_hdlc_tx_done:                          ## @hdlc_tx_done
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	8(%rdi), %r15
	movq	48(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_ioread16be
	movl	%eax, %r14d
	movq	_T_R_S@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%r15, 8(%r13)
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_2:
	xorl	%r12d, %r12d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%r13), %r15
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	-60(%rbp), %r12d                ## 4-byte Reload
	movq	%r15, %rdi
	callq	_ioread16be
	movl	%eax, %r14d
	incl	%ebx
	movq	_T_R_S@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	jne	LBB0_15
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_T_UN_S@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	incl	8(%rax)
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, -64(%rbp)                 ## 4-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	_T_CT_S@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	incl	4(%rax)
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r13), %rax
	movq	24(%r13), %rcx
	movq	(%rcx,%rax,8), %r15
	testq	%r15, %r15
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	addl	(%r15), %r12d
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	incl	(%rbx)
	movq	40(%r13), %r12
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	callq	_be32_to_cpu
	addq	%rax, %r12
	subq	32(%r13), %r12
	movq	(%r15), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	%r15, %rdi
	callq	_dev_consume_skb_irq
	movq	%rbx, %r15
	movq	(%r13), %rbx
	movq	24(%r13), %rax
	movq	$0, (%rax,%rbx,8)
	incq	%rbx
	movq	_TX_BD_RING_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_TX_RING_MOD_MASK
	cltq
	andq	%rbx, %rax
	movq	%r15, %rdi
	movq	%rax, (%r13)
	callq	_netif_queue_stopped
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_netif_wake_queue
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_T_W_S@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	movl	-64(%rbp), %ebx                 ## 4-byte Reload
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	addq	$8, %r15
	jmp	LBB0_14
LBB0_8:
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movl	-64(%rbp), %ebx                 ## 4-byte Reload
LBB0_15:
	movq	%r15, 8(%r13)
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_17
## %bb.16:
	movq	%r13, %rdi
	callq	_hdlc_tx_restart
LBB0_17:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	movl	%r12d, %edx
	callq	_netdev_completed_queue
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_T_R_S,4,2                      ## @T_R_S
	.comm	_T_UN_S,4,2                     ## @T_UN_S
	.comm	_T_CT_S,4,2                     ## @T_CT_S
	.comm	_TX_BD_RING_LEN,4,2             ## @TX_BD_RING_LEN
	.comm	_T_W_S,4,2                      ## @T_W_S
	.no_dead_strip	_hdlc_tx_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdlc_tx_done
_hdlc_tx_done:                          ; @hdlc_tx_done
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x0
	ldr	x19, [x0, #48]
	ldr	x23, [x0, #8]
	mov	x0, x23
	bl	_ioread16be
Lloh0:
	adrp	x27, _T_R_S@GOTPAGE
Lloh1:
	ldr	x27, [x27, _T_R_S@GOTPAGEOFF]
	ldr	w8, [x27]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	mov	w20, #0
	mov	w21, #0
	str	x23, [x22, #8]
	b	LBB0_16
LBB0_2:
	mov	x24, x0
	mov	w20, #0
	str	wzr, [sp, #12]                  ; 4-byte Folded Spill
	mov	w21, #0
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x23, [x22, #16]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w20, w20, w28
	mov	x0, x23
	bl	_ioread16be
	mov	x24, x0
	ldr	w8, [x27]
	add	w21, w21, #1
	tst	w8, w0
	b.ne	LBB0_14
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
Lloh2:
	adrp	x8, _T_UN_S@GOTPAGE
Lloh3:
	ldr	x8, [x8, _T_UN_S@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w24
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	mov	w8, #1
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh5:
	adrp	x8, _T_CT_S@GOTPAGE
Lloh6:
	ldr	x8, [x8, _T_CT_S@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w24
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
	mov	w8, #1
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x22, #24]
	ldr	x9, [x22]
	ldr	x25, [x8, x9, lsl #3]
	cbz	x25, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w28, [x25]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	ldr	x26, [x22, #40]
	ldr	w0, [x23, #4]
	bl	_be32_to_cpu
	ldr	x8, [x22, #32]
	add	x9, x0, x26
	sub	x0, x9, x8
	ldr	x2, [x25]
	mov	w1, #0
	bl	_memset
	mov	x0, x25
	bl	_dev_consume_skb_irq
	ldr	x8, [x22, #24]
	ldr	x9, [x22]
	str	xzr, [x8, x9, lsl #3]
	add	x25, x9, #1
Lloh8:
	adrp	x8, _TX_BD_RING_LEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TX_BD_RING_LEN@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_TX_RING_MOD_MASK
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	and	x8, x25, x8
	str	x8, [x22]
	mov	x0, x19
	bl	_netif_queue_stopped
	cbz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_netif_wake_queue
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh11:
	adrp	x8, _T_W_S@GOTPAGE
Lloh12:
	ldr	x8, [x8, _T_W_S@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w24
	b.ne	LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #8
	b	LBB0_4
LBB0_14:
	str	x23, [x22, #8]
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_16
; %bb.15:
	mov	x0, x22
	bl	_hdlc_tx_restart
LBB0_16:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_netdev_completed_queue
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_T_R_S,4,2                      ; @T_R_S
	.comm	_T_UN_S,4,2                     ; @T_UN_S
	.comm	_T_CT_S,4,2                     ; @T_CT_S
	.comm	_TX_BD_RING_LEN,4,2             ; @TX_BD_RING_LEN
	.comm	_T_W_S,4,2                      ; @T_W_S
	.no_dead_strip	_hdlc_tx_done
.subsections_via_symbols
