	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sata_oxnas_port_start
_sata_oxnas_port_start:                 ## @sata_oxnas_port_start
	.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, %r14
	movq	32(%rdi), %rax
	movq	(%rax), %r15
	movq	8(%rax), %rbx
	leaq	L_.str(%rip), %rdi
	callq	_DPRINTK
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %r12
	movq	%r13, %rdx
	movq	24(%r14), %rax
	testq	%rax, %rax
	movq	_PORT_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	cmoveq	%rax, %rcx
	addq	40(%rbx), %rcx
	testq	%rax, %rax
	movq	%rcx, 40(%r12)
	movq	_DMA_CORESIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	cmoveq	%rax, %rcx
	addq	32(%rbx), %rcx
	testq	%rax, %rax
	movq	%rcx, 32(%r12)
	movq	_SGDMA_CORESIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	cmoveq	%rax, %rcx
	addq	24(%rbx), %rcx
	movq	%rcx, 24(%r12)
	movl	16(%rbx), %eax
	movl	%eax, 16(%r12)
	movq	_SATA_OXNAS_DMA_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	4(%rbx), %eax
	imull	%esi, %eax
	cmpl	%eax, (%rbx)
	jge	LBB0_2
## %bb.3:
	movl	(%rdx), %ecx
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_6
LBB0_5:
	movq	-48(%rbp), %rcx
	movq	%rcx, 8(%r12)
	movq	%rax, (%r12)
	movq	-48(%rbp), %rcx
	addq	$4, %rcx
	movq	%rcx, 16(%r14)
	addq	$4, %rax
	movq	%rax, 8(%r14)
	movq	%r12, (%r14)
	movq	%r14, %rdi
	callq	_sata_oxnas_post_reset_init
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	callq	_DPRINTK
	movq	24(%r14), %rax
	testq	%rax, %rax
	movslq	(%r13), %rsi
	movq	%rsi, %rdi
	cmoveq	%rax, %rdi
	addq	8(%rbx), %rdi
	movq	%rdi, -48(%rbp)
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_ioremap
	testq	%rax, %rax
	jne	LBB0_5
LBB0_6:
	movq	%r12, %rdi
	callq	_kfree
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ENTER\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PORT_SIZE,4,2                  ## @PORT_SIZE
	.comm	_DMA_CORESIZE,4,2               ## @DMA_CORESIZE
	.comm	_SGDMA_CORESIZE,4,2             ## @SGDMA_CORESIZE
	.comm	_SATA_OXNAS_DMA_SIZE,4,2        ## @SATA_OXNAS_DMA_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"using preallocated DMA\n"

	.no_dead_strip	_sata_oxnas_port_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sata_oxnas_port_start
_sata_oxnas_port_start:                 ; @sata_oxnas_port_start
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	ldr	x8, [x0, #32]
	ldp	x21, x22, [x8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINTK
Lloh2:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	x8, [x22, #40]
	ldr	x9, [x19, #24]
Lloh4:
	adrp	x10, _PORT_SIZE@GOTPAGE
Lloh5:
	ldr	x10, [x10, _PORT_SIZE@GOTPAGEOFF]
Lloh6:
	ldrsw	x10, [x10]
	cmp	x9, #0
	csel	x9, xzr, x10, eq
	add	x8, x9, x8
	str	x8, [x0, #40]
Lloh7:
	adrp	x8, _DMA_CORESIZE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DMA_CORESIZE@GOTPAGEOFF]
Lloh9:
	ldrsw	x8, [x8]
	csel	x8, xzr, x8, eq
	ldp	x10, x9, [x22, #24]
	add	x8, x8, x9
Lloh10:
	adrp	x9, _SGDMA_CORESIZE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SGDMA_CORESIZE@GOTPAGEOFF]
Lloh12:
	ldrsw	x9, [x9]
	csel	x9, xzr, x9, eq
	add	x9, x9, x10
	stp	x9, x8, [x0, #24]
	ldr	w8, [x22, #16]
Lloh13:
	adrp	x24, _SATA_OXNAS_DMA_SIZE@GOTPAGE
Lloh14:
	ldr	x24, [x24, _SATA_OXNAS_DMA_SIZE@GOTPAGEOFF]
	str	w8, [x0, #16]
	ldr	w1, [x24]
	ldp	w8, w9, [x22]
	mul	w9, w9, w1
	cmp	w8, w9
	b.ge	LBB0_4
; %bb.2:
	ldr	w3, [x23]
	add	x2, sp, #8
	mov	x0, x21
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_5
LBB0_3:
	ldr	x8, [sp, #8]
	stp	x0, x8, [x20]
	ldr	x8, [sp, #8]
	add	x9, x8, #4
	add	x8, x0, #4
	stp	x8, x9, [x19, #8]
	str	x20, [x19]
	mov	x0, x19
	bl	_sata_oxnas_post_reset_init
	mov	w0, #0
	b	LBB0_7
LBB0_4:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DPRINTK
	ldr	x8, [x22, #8]
	ldr	x9, [x19, #24]
	ldrsw	x1, [x24]
	cmp	x9, #0
	csel	x9, xzr, x1, eq
	add	x0, x8, x9
	str	x0, [sp, #8]
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_ioremap
	cbnz	x0, LBB0_3
LBB0_5:
	mov	x0, x20
	bl	_kfree
LBB0_6:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ENTER\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PORT_SIZE,4,2                  ; @PORT_SIZE
	.comm	_DMA_CORESIZE,4,2               ; @DMA_CORESIZE
	.comm	_SGDMA_CORESIZE,4,2             ; @SGDMA_CORESIZE
	.comm	_SATA_OXNAS_DMA_SIZE,4,2        ; @SATA_OXNAS_DMA_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"using preallocated DMA\n"

	.no_dead_strip	_sata_oxnas_port_start
.subsections_via_symbols
