	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns3_nic_maybe_stop_tx
_hns3_nic_maybe_stop_tx:                ## @hns3_nic_maybe_stop_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, %r15
	movq	%rdi, %r14
	movq	(%rsi), %r12
	movq	%r12, %rdi
	callq	_hns3_nic_bd_num
	movl	%eax, %ebx
	movq	_HNS3_MAX_BD_NUM_NORMAL@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	(%rax), %ebx
	seta	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%r12, %rdi
	callq	_skb_is_gso
	movq	_HNS3_MAX_BD_NUM_TSO@GOTPCREL(%rip), %rcx
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	cmpl	(%rcx), %ebx
	ja	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_hns3_skb_need_linearized
	testl	%eax, %eax
	je	LBB0_11
LBB0_4:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_skb_copy
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_dev_kfree_skb_any
	movq	%r13, (%r15)
	movq	%r13, %rdi
	callq	_hns3_nic_bd_num
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_skb_is_gso
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_HNS3_MAX_BD_NUM_TSO@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	ja	LBB0_5
LBB0_8:
	movq	%r13, %rdi
	callq	_skb_is_gso
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	_HNS3_MAX_BD_NUM_NORMAL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jbe	LBB0_10
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	movq	%r14, %rdi
	callq	_u64_stats_update_begin
	incl	4(%r14)
	movq	%r14, %rdi
	callq	_u64_stats_update_end
LBB0_11:
	movq	%r14, %rdi
	callq	_ring_space
	xorl	%edi, %edi
	cmpl	%ebx, %eax
	setb	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_13:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HNS3_MAX_BD_NUM_NORMAL,4,2     ## @HNS3_MAX_BD_NUM_NORMAL
	.comm	_HNS3_MAX_BD_NUM_TSO,4,2        ## @HNS3_MAX_BD_NUM_TSO
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_hns3_nic_maybe_stop_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns3_nic_maybe_stop_tx
_hns3_nic_maybe_stop_tx:                ; @hns3_nic_maybe_stop_tx
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x1]
	mov	x0, x22
	bl	_hns3_nic_bd_num
	mov	x20, x0
Lloh0:
	adrp	x24, _HNS3_MAX_BD_NUM_NORMAL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _HNS3_MAX_BD_NUM_NORMAL@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w0, w8
	cset	w0, hi
	bl	_unlikely
	cbz	x0, LBB0_7
; %bb.1:
	mov	x0, x22
	bl	_skb_is_gso
Lloh2:
	adrp	x25, _HNS3_MAX_BD_NUM_TSO@GOTPAGE
Lloh3:
	ldr	x25, [x25, _HNS3_MAX_BD_NUM_TSO@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	x0, #0
	ccmp	w20, w8, #2, ne
	b.hi	LBB0_3
; %bb.2:
	mov	x0, x22
	bl	_hns3_skb_need_linearized
	cbz	w0, LBB0_7
LBB0_3:
Lloh4:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_skb_copy
	cbz	x0, LBB0_9
; %bb.4:
	mov	x23, x0
	mov	x0, x22
	bl	_dev_kfree_skb_any
	str	x23, [x21]
	mov	x0, x23
	bl	_hns3_nic_bd_num
	mov	x20, x0
	mov	x0, x23
	bl	_skb_is_gso
	ldr	w8, [x25]
	cmp	x0, #0
	ccmp	w20, w8, #0, ne
	b.hi	LBB0_9
; %bb.5:
	mov	x0, x23
	bl	_skb_is_gso
	ldr	w8, [x24]
	cmp	x0, #0
	ccmp	w20, w8, #0, eq
	b.hi	LBB0_9
; %bb.6:
	mov	x0, x19
	bl	_u64_stats_update_begin
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_u64_stats_update_end
LBB0_7:
	mov	x0, x19
	bl	_ring_space
	cmp	w0, w20
	cset	w0, lo
	bl	_unlikely
	cbz	x0, LBB0_11
; %bb.8:
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_11:
	mov	x0, x20
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_HNS3_MAX_BD_NUM_NORMAL,4,2     ; @HNS3_MAX_BD_NUM_NORMAL
	.comm	_HNS3_MAX_BD_NUM_TSO,4,2        ; @HNS3_MAX_BD_NUM_TSO
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_hns3_nic_maybe_stop_tx
.subsections_via_symbols
