	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rocker_dma_ring_bufs_alloc
_rocker_dma_ring_bufs_alloc:            ## @rocker_dma_ring_bufs_alloc
	.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
	cmpl	$0, (%rsi)
	jle	LBB0_11
## %bb.1:
	movq	%rcx, %r13
	movq	%rsi, %r14
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	16(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_GFP_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r13, %rdi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	movq	%r13, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_pci_map_single
	movl	%eax, %r14d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_pci_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_5
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15), %rdi
	movq	%rbx, (%rax,%r15)
	movq	%r13, 8(%rax,%r15)
	movq	_mapaddr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_dma_unmap_addr_set
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r14d, 8(%rax,%r15)
	movq	%r13, (%rax,%r15)
	incq	%r12
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movslq	(%r14), %rax
	addq	$16, %r15
	cmpq	%rax, %r12
	jl	LBB0_2
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_3:
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_5:
	movq	%rbx, %rdi
	callq	_kfree
	movq	_EIO@GOTPCREL(%rip), %rcx
	movl	-44(%rbp), %r13d                ## 4-byte Reload
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testl	%r12d, %r12d
	je	LBB0_12
## %bb.7:
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	addq	$-16, %r15
	incq	%r12
	movq	_mapaddr@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rbx
	leaq	(%rbx,%r15), %rdi
	movl	(%r14), %esi
	callq	_dma_unmap_addr
	movq	8(%rbx,%r15), %rdx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	movl	%r13d, %ecx
	callq	_pci_unmap_single
	movq	(%rbx,%r15), %rdi
	callq	_kfree
	decq	%r12
	addq	$-16, %r15
	cmpq	$1, %r12
	ja	LBB0_8
## %bb.9:
	movl	-56(%rbp), %eax                 ## 4-byte Reload
LBB0_12:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ## @GFP_DMA
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EIO,4,2                        ## @EIO
	.comm	_mapaddr,4,2                    ## @mapaddr
	.no_dead_strip	_rocker_dma_ring_bufs_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rocker_dma_ring_bufs_alloc
_rocker_dma_ring_bufs_alloc:            ; @rocker_dma_ring_bufs_alloc
	.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
	ldr	w8, [x1]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, x3
	mov	x20, x1
	str	w2, [sp, #12]                   ; 4-byte Folded Spill
	mov	x27, #0
	mov	x26, #0
	ldr	x21, [x0]
Lloh0:
	adrp	x19, _mapaddr@GOTPAGE
Lloh1:
	ldr	x19, [x19, _mapaddr@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x25, x28, [x20, #8]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _GFP_DMA@GOTPAGE
Lloh6:
	ldr	x9, [x9, _GFP_DMA@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x22
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x23, x0
	mov	x0, x21
	mov	x1, x23
	mov	x2, x22
	ldr	w3, [sp, #12]                   ; 4-byte Folded Reload
	bl	_pci_map_single
	mov	x24, x0
	mov	x0, x21
	mov	x1, x24
	bl	_pci_dma_mapping_error
	cbnz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x0, x25, x27
	add	x8, x25, x27
	stp	x23, x22, [x8]
	ldr	w1, [x19]
	mov	x2, x24
	bl	_dma_unmap_addr_set
	add	x8, x28, x27
	str	w24, [x8, #8]
	str	x22, [x8]
	add	x26, x26, #1
	ldrsw	x8, [x20]
	add	x27, x27, #16
	cmp	x26, x8
	b.lt	LBB0_2
LBB0_5:
	mov	w22, #0
	b	LBB0_11
LBB0_6:
	mov	x25, x19
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	mov	x0, x23
	bl	_kfree
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	mov	x25, x19
LBB0_8:
	ldr	w8, [x8]
	neg	w22, w8
	cbz	w26, LBB0_11
; %bb.9:
	sub	x24, x27, #16
	add	x26, x26, #1
	ldr	w19, [sp, #12]                  ; 4-byte Folded Reload
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x23, x8, x24
	ldr	w1, [x25]
	mov	x0, x23
	bl	_dma_unmap_addr
	mov	x1, x0
	ldr	x2, [x23, #8]
	mov	x0, x21
	mov	x3, x19
	bl	_pci_unmap_single
	ldr	x0, [x23]
	bl	_kfree
	sub	x26, x26, #1
	sub	x24, x24, #16
	cmp	x26, #1
	b.hi	LBB0_10
LBB0_11:
	mov	x0, x22
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ; @GFP_DMA
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EIO,4,2                        ; @EIO
	.comm	_mapaddr,4,2                    ; @mapaddr
	.no_dead_strip	_rocker_dma_ring_bufs_alloc
.subsections_via_symbols
