	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_dev_init_params
_ata_dev_init_params:                   ## @ata_dev_init_params
	.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
	movl	%esi, %ebx
	leal	-17(%rbx), %eax
	cmpl	$-16, %eax
	jb	LBB0_2
## %bb.1:
	movl	%edx, %r15d
	leal	-256(%r15), %eax
	cmpl	$-256, %eax
	jbe	LBB0_2
## %bb.3:
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_DPRINTK
	leaq	-64(%rbp), %r12
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_ata_tf_init
	movq	_ATA_CMD_INIT_DEV_PARAMS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	_ATA_TFLAG_ISADDR@GOTPCREL(%rip), %rax
	movq	_ATA_TFLAG_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, -64(%rbp)
	movq	_ATA_PROT_NODATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	%r15d, -60(%rbp)
	decl	%ebx
	andl	$15, %ebx
	orl	%ebx, -56(%rbp)
	movq	_DMA_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$0, (%rsp)
	movq	%r14, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_ata_exec_internal
	movl	%eax, %ebx
	movq	_AC_ERR_DEV@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_5
## %bb.4:
	movq	_ATA_ABORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -52(%rbp)
	cmovel	%ebx, %r13d
	movl	%r13d, %ebx
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DPRINTK
	jmp	LBB0_6
LBB0_2:
	movq	_AC_ERR_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AC_ERR_INVALID,4,2             ## @AC_ERR_INVALID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"init dev params \n"

	.comm	_ATA_CMD_INIT_DEV_PARAMS,4,2    ## @ATA_CMD_INIT_DEV_PARAMS
	.comm	_ATA_TFLAG_ISADDR,4,2           ## @ATA_TFLAG_ISADDR
	.comm	_ATA_TFLAG_DEVICE,4,2           ## @ATA_TFLAG_DEVICE
	.comm	_ATA_PROT_NODATA,4,2            ## @ATA_PROT_NODATA
	.comm	_DMA_NONE,4,2                   ## @DMA_NONE
	.comm	_AC_ERR_DEV,4,2                 ## @AC_ERR_DEV
	.comm	_ATA_ABORTED,4,2                ## @ATA_ABORTED
L_.str.1:                               ## @.str.1
	.asciz	"EXIT, err_mask=%x\n"

	.no_dead_strip	_ata_dev_init_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_dev_init_params
_ata_dev_init_params:                   ; @ata_dev_init_params
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	sub	w8, w1, #17
	cmn	w8, #16
	b.lo	LBB0_5
; %bb.1:
	mov	x20, x2
	sub	w8, w2, #256
	cmn	w8, #256
	b.ls	LBB0_5
; %bb.2:
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINTK
	add	x1, sp, #8
	mov	x0, x19
	bl	_ata_tf_init
Lloh2:
	adrp	x8, _ATA_CMD_INIT_DEV_PARAMS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ATA_CMD_INIT_DEV_PARAMS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #28]
Lloh5:
	adrp	x8, _ATA_TFLAG_ISADDR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATA_TFLAG_ISADDR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _ATA_TFLAG_DEVICE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ATA_TFLAG_DEVICE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh11:
	adrp	x9, _ATA_PROT_NODATA@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ATA_PROT_NODATA@GOTPAGEOFF]
	ldr	w10, [sp, #8]
	ldr	w11, [sp, #16]
	orr	w8, w8, w10
Lloh13:
	ldr	w9, [x9]
	stp	w8, w20, [sp, #8]
	sub	w8, w21, #1
	and	w8, w8, #0xf
	orr	w8, w11, w8
	str	w9, [sp, #24]
	str	w8, [sp, #16]
Lloh14:
	adrp	x8, _DMA_NONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DMA_NONE@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, #0
	mov	x4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_ata_exec_internal
	mov	x19, x0
Lloh17:
	adrp	x8, _AC_ERR_DEV@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AC_ERR_DEV@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.3:
	ldr	w8, [sp, #20]
Lloh20:
	adrp	x9, _ATA_ABORTED@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ATA_ABORTED@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	csel	w19, w19, wzr, eq
LBB0_4:
	str	x19, [sp]
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DPRINTK
	b	LBB0_6
LBB0_5:
Lloh25:
	adrp	x8, _AC_ERR_INVALID@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AC_ERR_INVALID@GOTPAGEOFF]
Lloh27:
	ldr	w19, [x8]
LBB0_6:
	mov	x0, x19
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_AC_ERR_INVALID,4,2             ; @AC_ERR_INVALID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"init dev params \n"

	.comm	_ATA_CMD_INIT_DEV_PARAMS,4,2    ; @ATA_CMD_INIT_DEV_PARAMS
	.comm	_ATA_TFLAG_ISADDR,4,2           ; @ATA_TFLAG_ISADDR
	.comm	_ATA_TFLAG_DEVICE,4,2           ; @ATA_TFLAG_DEVICE
	.comm	_ATA_PROT_NODATA,4,2            ; @ATA_PROT_NODATA
	.comm	_DMA_NONE,4,2                   ; @DMA_NONE
	.comm	_AC_ERR_DEV,4,2                 ; @AC_ERR_DEV
	.comm	_ATA_ABORTED,4,2                ; @ATA_ABORTED
l_.str.1:                               ; @.str.1
	.asciz	"EXIT, err_mask=%x\n"

	.no_dead_strip	_ata_dev_init_params
.subsections_via_symbols
