	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tigon3_dma_hwbug_workaround
_tigon3_dma_hwbug_workaround:           ## @tigon3_dma_hwbug_workaround
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	(%rsi), %r13
	movq	%r14, %rdi
	callq	_tg3_asic_rev
	movq	_ASIC_REV_5701@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	jne	LBB0_1
## %bb.2:
	movq	8(%r13), %rbx
	andl	$3, %ebx
	movq	%r13, %rdi
	callq	_skb_headroom
	negq	%rbx
	addq	%rax, %rbx
	addq	$4, %rbx
	movq	%r13, %rdi
	callq	_skb_tailroom
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_skb_copy_expand
	jmp	LBB0_3
LBB0_1:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_skb_copy
LBB0_3:
	movq	%rax, %r12
	movl	$-1, %ebx
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	(%r14), %edi
	movq	8(%r12), %rsi
	movl	(%r12), %edx
	movq	_PCI_DMA_TODEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_pci_map_single
	movl	%eax, %r15d
	movl	(%r14), %edi
	movl	%eax, %esi
	callq	_pci_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movq	_TXD_FLAG_END@GOTPCREL(%rip), %rax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	orq	(%rax), %r14
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rax
	leaq	(%rax,%rcx,8), %rdi
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, (%rax,%rcx,8)
	movq	_mapping@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edx
	callq	_dma_unmap_addr_set
	movl	(%r12), %r8d
	movq	%rbx, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	%r15d, %ecx
	movq	%r14, %r9
	pushq	16(%rbp)
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	callq	_tg3_tx_frag_set
	addq	$16, %rsp
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	$-1, %edx
	callq	_tg3_tx_skb_unmap
	movl	$-1, %ebx
LBB0_8:
	movq	%r12, %rdi
	callq	_dev_kfree_skb
LBB0_9:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_10:
	movq	%r13, %rdi
	callq	_dev_kfree_skb
	movq	%r12, (%r15)
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ASIC_REV_5701,8,3              ## @ASIC_REV_5701
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_PCI_DMA_TODEVICE,4,2           ## @PCI_DMA_TODEVICE
	.comm	_TXD_FLAG_END,8,3               ## @TXD_FLAG_END
	.comm	_mapping,4,2                    ## @mapping
	.no_dead_strip	_tigon3_dma_hwbug_workaround
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tigon3_dma_hwbug_workaround
_tigon3_dma_hwbug_workaround:           ; @tigon3_dma_hwbug_workaround
	.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	x23, x6
	mov	x24, x5
	mov	x22, x4
	mov	x27, x3
	mov	x25, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x28, [x0, #8]
	ldr	x20, [x1]
	mov	x0, x28
	bl	_tg3_asic_rev
Lloh0:
	adrp	x8, _ASIC_REV_5701@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ASIC_REV_5701@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	str	x22, [sp, #8]                   ; 8-byte Folded Spill
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x20, #8]
	and	x22, x8, #0x3
	mov	x0, x20
	bl	_skb_headroom
	sub	x8, x0, x22
	add	x22, x8, #4
	mov	x0, x20
	bl	_skb_tailroom
	mov	x2, x0
Lloh3:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x22
	bl	_skb_copy_expand
	mov	x26, x0
	cbnz	x0, LBB0_3
	b	LBB0_7
LBB0_2:
Lloh6:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_skb_copy
	mov	x26, x0
	cbz	x0, LBB0_7
LBB0_3:
	ldr	w0, [x28]
	ldr	x1, [x26, #8]
	ldr	w2, [x26]
Lloh9:
	adrp	x8, _PCI_DMA_TODEVICE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCI_DMA_TODEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	bl	_pci_map_single
	mov	x22, x0
	ldr	w0, [x28]
	mov	x1, x22
	bl	_pci_dma_mapping_error
	cbnz	x0, LBB0_6
; %bb.4:
	mov	x28, x25
	ldr	x10, [x25]
Lloh12:
	adrp	x8, _TXD_FLAG_END@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TXD_FLAG_END@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	orr	x25, x8, x9
	ldr	x8, [x21]
	str	x10, [sp, #8]                   ; 8-byte Folded Spill
	add	x0, x8, x10, lsl #3
	str	x26, [x0]
Lloh15:
	adrp	x8, _mapping@GOTPAGE
Lloh16:
	ldr	x8, [x8, _mapping@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x2, x22
	bl	_dma_unmap_addr_set
	ldr	w4, [x26]
	mov	x0, x21
	mov	x1, x28
	mov	x2, x27
	mov	x3, x22
	mov	x5, x25
	mov	x6, x24
	mov	x7, x23
	bl	_tg3_tx_frag_set
	cbz	x0, LBB0_9
; %bb.5:
	mov	x0, x21
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	mov	w2, #-1
	bl	_tg3_tx_skb_unmap
LBB0_6:
	mov	x0, x26
	bl	_dev_kfree_skb
LBB0_7:
	mov	w21, #-1
LBB0_8:
	mov	x0, x20
	bl	_dev_kfree_skb
	str	x26, [x19]
	mov	x0, x21
	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
LBB0_9:
	mov	w21, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ASIC_REV_5701,8,3              ; @ASIC_REV_5701
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_PCI_DMA_TODEVICE,4,2           ; @PCI_DMA_TODEVICE
	.comm	_TXD_FLAG_END,8,3               ; @TXD_FLAG_END
	.comm	_mapping,4,2                    ; @mapping
	.no_dead_strip	_tigon3_dma_hwbug_workaround
.subsections_via_symbols
