	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rocker_dma_rings_init
_rocker_dma_rings_init:                 ## @rocker_dma_rings_init
	.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	%rdi, %rbx
	movq	16(%rdi), %r15
	movq	_ROCKER_DMA_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ROCKER_DMA_CMD_DEFAULT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rdi, %rcx
	callq	_rocker_dma_ring_create
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_13
LBB0_2:
	leaq	8(%rbx), %rdi
	callq	_spin_lock_init
	movq	_PCI_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_rocker_dma_ring_bufs_alloc
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_12
LBB0_4:
	movq	%rbx, %rdi
	callq	_rocker_dma_cmd_ring_waits_alloc
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_11
LBB0_6:
	movq	_ROCKER_DMA_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ROCKER_DMA_EVENT_DEFAULT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	4(%rbx), %rcx
	movq	%rbx, %rdi
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	callq	_rocker_dma_ring_create
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r14d
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_10
LBB0_8:
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r12), %ecx
	movq	%rbx, %rdi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_rocker_dma_ring_bufs_alloc
	testl	%eax, %eax
	je	LBB0_14
## %bb.9:
	movl	%eax, %r14d
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_rocker_dma_ring_destroy
LBB0_10:
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_rocker_dma_ring_bufs_free
LBB0_11:
	movq	%rbx, %rdi
	callq	_rocker_dma_cmd_ring_waits_free
LBB0_12:
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_rocker_dma_ring_destroy
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_rocker_dma_ring_pass_to_producer
	xorl	%r14d, %r14d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ROCKER_DMA_CMD,4,2             ## @ROCKER_DMA_CMD
	.comm	_ROCKER_DMA_CMD_DEFAULT_SIZE,4,2 ## @ROCKER_DMA_CMD_DEFAULT_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to create command dma ring\n"

	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ## @PCI_DMA_BIDIRECTIONAL
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"failed to alloc command dma ring buffers\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to alloc command dma ring waits\n"

	.comm	_ROCKER_DMA_EVENT,4,2           ## @ROCKER_DMA_EVENT
	.comm	_ROCKER_DMA_EVENT_DEFAULT_SIZE,4,2 ## @ROCKER_DMA_EVENT_DEFAULT_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"failed to create event dma ring\n"

	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
L_.str.4:                               ## @.str.4
	.asciz	"failed to alloc event dma ring buffers\n"

	.no_dead_strip	_rocker_dma_rings_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rocker_dma_rings_init
_rocker_dma_rings_init:                 ; @rocker_dma_rings_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x21, [x0, #16]
Lloh0:
	adrp	x8, _ROCKER_DMA_CMD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ROCKER_DMA_CMD@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _ROCKER_DMA_CMD_DEFAULT_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ROCKER_DMA_CMD_DEFAULT_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x3, x0
	bl	_rocker_dma_ring_create
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_13
LBB0_2:
	add	x0, x19, #8
	bl	_spin_lock_init
Lloh8:
	adrp	x23, _PCI_DMA_BIDIRECTIONAL@GOTPAGE
Lloh9:
	ldr	x23, [x23, _PCI_DMA_BIDIRECTIONAL@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh10:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh11:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x19
	bl	_rocker_dma_ring_bufs_alloc
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_12
LBB0_4:
	mov	x0, x19
	bl	_rocker_dma_cmd_ring_waits_alloc
	cbz	w0, LBB0_6
; %bb.5:
	mov	x20, x0
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_11
LBB0_6:
Lloh16:
	adrp	x8, _ROCKER_DMA_EVENT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ROCKER_DMA_EVENT@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x8, _ROCKER_DMA_EVENT_DEFAULT_SIZE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ROCKER_DMA_EVENT_DEFAULT_SIZE@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	add	x22, x19, #4
	mov	x0, x19
	mov	x3, x22
	bl	_rocker_dma_ring_create
	cbz	w0, LBB0_8
; %bb.7:
	mov	x20, x0
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_10
LBB0_8:
Lloh24:
	adrp	x8, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x22
	bl	_rocker_dma_ring_bufs_alloc
	mov	x20, x0
	cbz	w0, LBB0_14
; %bb.9:
Lloh27:
	adrp	x1, l_.str.4@PAGE
Lloh28:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	mov	x0, x19
	mov	x1, x22
	bl	_rocker_dma_ring_destroy
LBB0_10:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x19
	bl	_rocker_dma_ring_bufs_free
LBB0_11:
	mov	x0, x19
	bl	_rocker_dma_cmd_ring_waits_free
LBB0_12:
	mov	x0, x19
	mov	x1, x19
	bl	_rocker_dma_ring_destroy
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	x0, x19
	mov	x1, x22
	bl	_rocker_dma_ring_pass_to_producer
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ROCKER_DMA_CMD,4,2             ; @ROCKER_DMA_CMD
	.comm	_ROCKER_DMA_CMD_DEFAULT_SIZE,4,2 ; @ROCKER_DMA_CMD_DEFAULT_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to create command dma ring\n"

	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ; @PCI_DMA_BIDIRECTIONAL
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"failed to alloc command dma ring buffers\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to alloc command dma ring waits\n"

	.comm	_ROCKER_DMA_EVENT,4,2           ; @ROCKER_DMA_EVENT
	.comm	_ROCKER_DMA_EVENT_DEFAULT_SIZE,4,2 ; @ROCKER_DMA_EVENT_DEFAULT_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"failed to create event dma ring\n"

	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
l_.str.4:                               ; @.str.4
	.asciz	"failed to alloc event dma ring buffers\n"

	.no_dead_strip	_rocker_dma_rings_init
.subsections_via_symbols
