	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atahpa_set_max
_atahpa_set_max:                        ## @atahpa_set_max
	.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	%r8d, %eax
	movq	%rcx, %r15
	movl	%edx, %r12d
	movl	%esi, %edx
	movl	16(%rbp), %r10d
	testl	%r8d, %r8d
	movq	_AP_EXTEND@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	cmovel	%eax, %r8d
	movq	_ATA_SET_MAX_ADDRESS48@GOTPCREL(%rip), %rcx
	cmoveq	_ATA_SET_MAX_ADDRESS@GOTPCREL(%rip), %rcx
	movq	_AP_PROTO_NON_DATA@GOTPCREL(%rip), %rsi
	orl	(%rsi), %r8d
	movl	(%rcx), %r11d
	xorl	%ebx, %ebx
	subq	$1, %r9
	cmovaeq	%r9, %rbx
	movq	_CAM_DIR_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_AP_FLAG_CHK_COND@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r9d
	movq	_MSG_SIMPLE_Q_TAG@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r13d
	testl	%r12d, %r12d
	movl	$1000, %r14d                    ## imm = 0x3E8
	cmovnel	%r12d, %r14d
	movq	_ATA_HPA_FEAT_MAX_ADDR@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r12d
	subq	$8, %rsp
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	pushq	%rax
	pushq	%r14
	pushq	$0
	pushq	$0
	pushq	%r10
	pushq	%rbx
	pushq	%r12
	pushq	%r11
	pushq	%r13
	callq	_ata_do_cmd
	addq	$80, %rsp
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_atahpa_proc_resp               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AP_PROTO_NON_DATA,4,2          ## @AP_PROTO_NON_DATA
	.comm	_ATA_SET_MAX_ADDRESS48,4,2      ## @ATA_SET_MAX_ADDRESS48
	.comm	_AP_EXTEND,4,2                  ## @AP_EXTEND
	.comm	_ATA_SET_MAX_ADDRESS,4,2        ## @ATA_SET_MAX_ADDRESS
	.comm	_CAM_DIR_NONE,4,2               ## @CAM_DIR_NONE
	.comm	_AP_FLAG_CHK_COND,4,2           ## @AP_FLAG_CHK_COND
	.comm	_MSG_SIMPLE_Q_TAG,4,2           ## @MSG_SIMPLE_Q_TAG
	.comm	_ATA_HPA_FEAT_MAX_ADDR,4,2      ## @ATA_HPA_FEAT_MAX_ADDR
	.no_dead_strip	_atahpa_set_max
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atahpa_set_max
_atahpa_set_max:                        ; @atahpa_set_max
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x3
	mov	x8, x1
	mov	x20, x0
Lloh0:
	adrp	x9, _AP_PROTO_NON_DATA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AP_PROTO_NON_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _AP_EXTEND@GOTPAGE
Lloh4:
	ldr	x10, [x10, _AP_EXTEND@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w4, #0
	csel	w10, wzr, w10, eq
	orr	w9, w10, w9
Lloh6:
	adrp	x10, _ATA_SET_MAX_ADDRESS@GOTPAGE
Lloh7:
	ldr	x10, [x10, _ATA_SET_MAX_ADDRESS@GOTPAGEOFF]
Lloh8:
	adrp	x11, _ATA_SET_MAX_ADDRESS48@GOTPAGE
Lloh9:
	ldr	x11, [x11, _ATA_SET_MAX_ADDRESS48@GOTPAGEOFF]
	csel	x10, x10, x11, eq
	ldr	w7, [x10]
	sub	x10, x5, #1
	cmp	x5, #0
	csel	x11, xzr, x10, eq
Lloh10:
	adrp	x10, _CAM_DIR_NONE@GOTPAGE
Lloh11:
	ldr	x10, [x10, _CAM_DIR_NONE@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x10]
Lloh13:
	adrp	x10, _AP_FLAG_CHK_COND@GOTPAGE
Lloh14:
	ldr	x10, [x10, _AP_FLAG_CHK_COND@GOTPAGEOFF]
Lloh15:
	ldr	w5, [x10]
Lloh16:
	adrp	x10, _MSG_SIMPLE_Q_TAG@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MSG_SIMPLE_Q_TAG@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
Lloh19:
	adrp	x12, _ATA_HPA_FEAT_MAX_ADDR@GOTPAGE
Lloh20:
	ldr	x12, [x12, _ATA_HPA_FEAT_MAX_ADDR@GOTPAGEOFF]
Lloh21:
	ldr	w12, [x12]
	mov	w13, #1000
	cmp	w2, #0
	csel	w13, w13, w2, eq
	stp	w13, w4, [sp, #36]
	str	wzr, [sp, #32]
	str	xzr, [sp, #24]
	str	w6, [sp, #16]
	str	x11, [sp, #8]
	str	w12, [sp]
	mov	x1, x19
	mov	x2, x8
	mov	x4, x9
	mov	x6, x10
	bl	_ata_do_cmd
	cbz	w0, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_2:
	mov	x0, x20
	mov	x1, x19
	mov	x2, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_atahpa_proc_resp
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AP_PROTO_NON_DATA,4,2          ; @AP_PROTO_NON_DATA
	.comm	_ATA_SET_MAX_ADDRESS48,4,2      ; @ATA_SET_MAX_ADDRESS48
	.comm	_AP_EXTEND,4,2                  ; @AP_EXTEND
	.comm	_ATA_SET_MAX_ADDRESS,4,2        ; @ATA_SET_MAX_ADDRESS
	.comm	_CAM_DIR_NONE,4,2               ; @CAM_DIR_NONE
	.comm	_AP_FLAG_CHK_COND,4,2           ; @AP_FLAG_CHK_COND
	.comm	_MSG_SIMPLE_Q_TAG,4,2           ; @MSG_SIMPLE_Q_TAG
	.comm	_ATA_HPA_FEAT_MAX_ADDR,4,2      ; @ATA_HPA_FEAT_MAX_ADDR
	.no_dead_strip	_atahpa_set_max
.subsections_via_symbols
