	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_hwif_hpt366
_init_hwif_hpt366:                      ## @init_hwif_hpt366
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	32(%rdi), %edi
	callq	_hpt3xx_get_info
	movq	(%rax), %rcx
	xorl	%edx, %edx
	cmpq	$0, 24(%rbx)
	setne	%dl
	leal	80(,%rdx,4), %edx
	movl	%edx, (%rbx)
	movq	_HPT372N@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jl	LBB0_4
## %bb.1:
	cmpq	$0, 16(%rax)
	je	LBB0_4
## %bb.2:
	cmpl	$65, 8(%rax)
	jg	LBB0_4
## %bb.3:
	movq	_IDE_HFLAG_SERIALIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%rbx), %rcx
	orl	%eax, (%rcx)
	movq	_hpt3xxn_rw_disk@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rbx)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HPT372N,8,3                    ## @HPT372N
	.comm	_IDE_HFLAG_SERIALIZE,4,2        ## @IDE_HFLAG_SERIALIZE
	.comm	_hpt3xxn_rw_disk,4,2            ## @hpt3xxn_rw_disk
	.no_dead_strip	_init_hwif_hpt366
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_hwif_hpt366
_init_hwif_hpt366:                      ; @init_hwif_hpt366
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #32]
	bl	_hpt3xx_get_info
	ldr	x8, [x0]
	ldr	x9, [x19, #24]
	cmp	x9, #0
	mov	w9, #84
	mov	w10, #80
	csel	w9, w10, w9, eq
	str	w9, [x19]
Lloh0:
	adrp	x9, _HPT372N@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HPT372N@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_4
; %bb.1:
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w8, [x0, #8]
	cmp	w8, #65
	b.gt	LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _IDE_HFLAG_SERIALIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IDE_HFLAG_SERIALIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x9, [x19, #16]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
Lloh6:
	adrp	x8, _hpt3xxn_rw_disk@GOTPAGE
Lloh7:
	ldr	x8, [x8, _hpt3xxn_rw_disk@GOTPAGEOFF]
	str	x8, [x19, #8]
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_HPT372N,8,3                    ; @HPT372N
	.comm	_IDE_HFLAG_SERIALIZE,4,2        ; @IDE_HFLAG_SERIALIZE
	.comm	_hpt3xxn_rw_disk,4,2            ; @hpt3xxn_rw_disk
	.no_dead_strip	_init_hwif_hpt366
.subsections_via_symbols
