	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atahpa_unlock
_atahpa_unlock:                         ## @atahpa_unlock
	.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	%r9, %r10
	movl	%r8d, %r11d
	movl	%edx, %eax
	movl	%esi, %edx
	movq	_AP_PROTO_PIO_OUT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	testl	%r11d, %r11d
	jne	LBB0_1
## %bb.2:
	movq	_ATA_SET_MAX_ADDRESS@GOTPCREL(%rip), %rsi
	jmp	LBB0_3
LBB0_1:
	movq	_ATA_SET_MAX_ADDRESS48@GOTPCREL(%rip), %rsi
LBB0_3:
	movl	(%rsi), %r14d
	movq	_CAM_DIR_OUT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r13d
	movq	_AP_FLAG_BYT_BLOK_BLOCKS@GOTPCREL(%rip), %r15
	movq	_AP_FLAG_TLEN_SECT_CNT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r9d
	orl	(%r15), %r9d
	movq	_MSG_SIMPLE_Q_TAG@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r15d
	movq	_ATA_HPA_FEAT_UNLOCK@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r12d
	testl	%eax, %eax
	movl	$1000, %ebx                     ## imm = 0x3E8
	cmovnel	%eax, %ebx
	subq	$8, %rsp
	movq	%rcx, %rsi
	movl	%r13d, %ecx
	pushq	%r11
	pushq	%rbx
	pushq	$4
	pushq	%r10
	pushq	$0
	pushq	$0
	pushq	%r12
	pushq	%r14
	pushq	%r15
	callq	_ata_do_cmd
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AP_PROTO_PIO_OUT,4,2           ## @AP_PROTO_PIO_OUT
	.comm	_ATA_SET_MAX_ADDRESS48,4,2      ## @ATA_SET_MAX_ADDRESS48
	.comm	_ATA_SET_MAX_ADDRESS,4,2        ## @ATA_SET_MAX_ADDRESS
	.comm	_CAM_DIR_OUT,4,2                ## @CAM_DIR_OUT
	.comm	_AP_FLAG_BYT_BLOK_BLOCKS,4,2    ## @AP_FLAG_BYT_BLOK_BLOCKS
	.comm	_AP_FLAG_TLEN_SECT_CNT,4,2      ## @AP_FLAG_TLEN_SECT_CNT
	.comm	_MSG_SIMPLE_Q_TAG,4,2           ## @MSG_SIMPLE_Q_TAG
	.comm	_ATA_HPA_FEAT_UNLOCK,4,2        ## @ATA_HPA_FEAT_UNLOCK
	.no_dead_strip	_atahpa_unlock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atahpa_unlock
_atahpa_unlock:                         ; @atahpa_unlock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x10, x3
	mov	x8, x1
Lloh0:
	adrp	x9, _AP_PROTO_PIO_OUT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AP_PROTO_PIO_OUT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x11, _ATA_SET_MAX_ADDRESS48@GOTPAGE
Lloh4:
	ldr	x11, [x11, _ATA_SET_MAX_ADDRESS48@GOTPAGEOFF]
Lloh5:
	adrp	x12, _ATA_SET_MAX_ADDRESS@GOTPAGE
Lloh6:
	ldr	x12, [x12, _ATA_SET_MAX_ADDRESS@GOTPAGEOFF]
	cmp	w4, #0
	csel	x11, x12, x11, eq
Lloh7:
	adrp	x12, _CAM_DIR_OUT@GOTPAGE
Lloh8:
	ldr	x12, [x12, _CAM_DIR_OUT@GOTPAGEOFF]
	ldr	w7, [x11]
Lloh9:
	ldr	w3, [x12]
Lloh10:
	adrp	x11, _AP_FLAG_BYT_BLOK_BLOCKS@GOTPAGE
Lloh11:
	ldr	x11, [x11, _AP_FLAG_BYT_BLOK_BLOCKS@GOTPAGEOFF]
Lloh12:
	adrp	x12, _AP_FLAG_TLEN_SECT_CNT@GOTPAGE
Lloh13:
	ldr	x12, [x12, _AP_FLAG_TLEN_SECT_CNT@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
Lloh15:
	ldr	w12, [x12]
	orr	w11, w12, w11
Lloh16:
	adrp	x12, _MSG_SIMPLE_Q_TAG@GOTPAGE
Lloh17:
	ldr	x12, [x12, _MSG_SIMPLE_Q_TAG@GOTPAGEOFF]
Lloh18:
	ldr	w6, [x12]
Lloh19:
	adrp	x12, _ATA_HPA_FEAT_UNLOCK@GOTPAGE
Lloh20:
	ldr	x12, [x12, _ATA_HPA_FEAT_UNLOCK@GOTPAGEOFF]
Lloh21:
	ldr	w12, [x12]
	mov	w13, #1000
	cmp	w2, #0
	csel	w13, w13, w2, eq
	stp	w13, w4, [sp, #28]
	mov	w14, #4
	str	w14, [sp, #24]
	str	x5, [sp, #16]
	stur	xzr, [sp, #4]
	str	w12, [sp]
	mov	x1, x10
	mov	x2, x8
	mov	x4, x9
	mov	x5, x11
	bl	_ata_do_cmd
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AP_PROTO_PIO_OUT,4,2           ; @AP_PROTO_PIO_OUT
	.comm	_ATA_SET_MAX_ADDRESS48,4,2      ; @ATA_SET_MAX_ADDRESS48
	.comm	_ATA_SET_MAX_ADDRESS,4,2        ; @ATA_SET_MAX_ADDRESS
	.comm	_CAM_DIR_OUT,4,2                ; @CAM_DIR_OUT
	.comm	_AP_FLAG_BYT_BLOK_BLOCKS,4,2    ; @AP_FLAG_BYT_BLOK_BLOCKS
	.comm	_AP_FLAG_TLEN_SECT_CNT,4,2      ; @AP_FLAG_TLEN_SECT_CNT
	.comm	_MSG_SIMPLE_Q_TAG,4,2           ; @MSG_SIMPLE_Q_TAG
	.comm	_ATA_HPA_FEAT_UNLOCK,4,2        ; @ATA_HPA_FEAT_UNLOCK
	.no_dead_strip	_atahpa_unlock
.subsections_via_symbols
