	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sky2_rx_map_skb
_sky2_rx_map_skb:                       ## @sky2_rx_map_skb
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	16(%rsi), %r14
	movl	8(%r14), %esi
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_pci_map_single
	movl	%eax, (%rbx)
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_pci_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_1
LBB0_8:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_net_ratelimit
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	(%r14), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_warn
LBB0_10:
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_13
LBB0_1:
	movq	_data_size@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_dma_unmap_len_set
	movq	%r14, %rdi
	callq	_skb_shinfo
	cmpl	$0, (%rax)
	jle	LBB0_12
## %bb.2:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	$-4, %r12
	xorl	%r15d, %r15d
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_skb_shinfo
	leaq	(,%r15,4), %rbx
	addq	8(%rax), %rbx
	movq	%rbx, %rdi
	callq	_skb_frag_size
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	%r14, %r13
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	xorl	%edx, %edx
	movl	%eax, %ecx
	callq	_skb_frag_dma_map
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx,%r15,4)
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_4
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movq	%r13, %rdi
	callq	_skb_shinfo
	movslq	(%rax), %rax
	addq	$4, %r12
	cmpq	%rax, %r15
	movq	%r13, %r14
	jl	LBB0_3
LBB0_12:
	xorl	%r15d, %r15d
LBB0_13:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	testl	%r15d, %r15d
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_7
## %bb.5:
	movl	$1, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movl	(%rax,%r12), %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_skb_shinfo
	movq	8(%rax), %rdi
	addq	%r12, %rdi
	callq	_skb_frag_size
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r13, %rdi
	movl	%ebx, %esi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_pci_unmap_page
	leaq	(%r15,%r14), %rax
	decq	%rax
	decq	%r14
	addq	$-4, %r12
	cmpq	$1, %rax
	jg	LBB0_6
LBB0_7:
	movq	%rbx, %rdi
	movl	(%rbx), %ebx
	movq	_data_size@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dma_unmap_len
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_pci_unmap_single
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.comm	_data_size,4,2                  ## @data_size
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: rx mapping error\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_sky2_rx_map_skb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sky2_rx_map_skb
_sky2_rx_map_skb:                       ; @sky2_rx_map_skb
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x20, [x1, #16]
	ldr	w1, [x20, #8]
Lloh0:
	adrp	x23, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
	ldr	w3, [x23]
	bl	_pci_map_single
	mov	x1, x0
	str	w0, [x21]
	mov	x0, x19
	bl	_pci_dma_mapping_error
	cbz	x0, LBB0_4
; %bb.1:
	bl	_net_ratelimit
	cbz	x0, LBB0_3
LBB0_2:
	ldr	x8, [x20]
	ldr	w2, [x8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
LBB0_3:
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_4:
Lloh7:
	adrp	x24, _data_size@GOTPAGE
Lloh8:
	ldr	x24, [x24, _data_size@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x21
	mov	x2, x22
	bl	_dma_unmap_len_set
	mov	x0, x20
	bl	_skb_shinfo
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x26, #0
	mov	w25, #1
Lloh9:
	adrp	x27, _DMA_FROM_DEVICE@GOTPAGE
Lloh10:
	ldr	x27, [x27, _DMA_FROM_DEVICE@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_skb_shinfo
	ldr	x8, [x0, #8]
	add	x22, x8, x26
	mov	x0, x22
	bl	_skb_frag_size
	mov	x3, x0
	ldr	w4, [x27]
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	bl	_skb_frag_dma_map
	mov	x1, x0
	ldr	x8, [x21, #8]
	str	w0, [x8, x26]
	mov	x0, x19
	bl	_dma_mapping_error
	cbnz	x0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	bl	_skb_shinfo
	ldrsw	x8, [x0]
	add	x9, x25, #1
	add	x26, x26, #4
	cmp	x25, x8
	mov	x25, x9
	b.lt	LBB0_6
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_10:
	cmp	w25, #1
	b.eq	LBB0_13
; %bb.11:
	sub	x26, x26, #4
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	w22, [x8, x26]
	mov	x0, x20
	bl	_skb_shinfo
	ldr	x8, [x0, #8]
	add	x0, x8, x26
	bl	_skb_frag_size
	mov	x2, x0
	ldr	w3, [x23]
	mov	x0, x19
	mov	x1, x22
	bl	_pci_unmap_page
	sub	x25, x25, #1
	sub	x26, x26, #4
	cmp	x25, #1
	b.gt	LBB0_12
LBB0_13:
	ldr	w22, [x21]
	ldr	w1, [x24]
	mov	x0, x21
	bl	_dma_unmap_len
	mov	x2, x0
	ldr	w3, [x23]
	mov	x0, x19
	mov	x1, x22
	bl	_pci_unmap_single
	bl	_net_ratelimit
	cbnz	x0, LBB0_2
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.comm	_data_size,4,2                  ; @data_size
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: rx mapping error\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_sky2_rx_map_skb
.subsections_via_symbols
