	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hpt3xx_maskproc
_hpt3xx_maskproc:                       ## @hpt3xx_maskproc
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	8(%rdi), %r12
	movl	4(%r12), %edi
	callq	_to_pci_dev
	movq	%rax, %r14
	movl	4(%r12), %edi
	callq	_hpt3xx_get_info
	movq	_IDE_DFLAG_NIEN_QUIRK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_4
## %bb.1:
	movq	(%rax), %rax
	movq	_HPT370@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_2
## %bb.5:
	movl	(%r12), %edi
	addq	$16, %rsp
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_disable_irq                    ## TAILCALL
LBB0_2:
	movl	$0, -36(%rbp)
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	movl	$90, %esi
	callq	_pci_read_config_byte
	movl	-36(%rbp), %eax
	movl	%eax, %ecx
	shrl	$4, %ecx
	andl	$1, %ecx
	cmpl	%r15d, %ecx
	je	LBB0_4
## %bb.3:
	xorl	%edx, %edx
	testl	%r15d, %r15d
	setne	%dl
	andl	$-17, %eax
	shll	$4, %edx
	orl	%eax, %edx
	movl	%edx, -36(%rbp)
	movq	%r14, %rdi
	movl	$90, %esi
	callq	_pci_write_config_byte
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_enable_irq                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IDE_DFLAG_NIEN_QUIRK,4,2       ## @IDE_DFLAG_NIEN_QUIRK
	.comm	_HPT370,8,3                     ## @HPT370
	.no_dead_strip	_hpt3xx_maskproc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hpt3xx_maskproc
_hpt3xx_maskproc:                       ; @hpt3xx_maskproc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x21, x0
	ldr	x22, [x0, #8]
	ldr	w0, [x22, #4]
	bl	_to_pci_dev
	mov	x20, x0
	ldr	w0, [x22, #4]
	bl	_hpt3xx_get_info
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _IDE_DFLAG_NIEN_QUIRK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IDE_DFLAG_NIEN_QUIRK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.1:
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _HPT370@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HPT370@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_4
; %bb.2:
	ldr	w0, [x22]
	cbz	w19, LBB0_7
; %bb.3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_disable_irq
LBB0_4:
	str	wzr, [sp, #12]
	add	x2, sp, #12
	mov	x0, x20
	mov	w1, #90
	bl	_pci_read_config_byte
	ldr	w2, [sp, #12]
	ubfx	w8, w2, #4, #1
	cmp	w8, w19
	b.eq	LBB0_6
; %bb.5:
	cmp	w19, #0
	cset	w8, ne
	bfi	w2, w8, #4, #1
	str	w2, [sp, #12]
	mov	x0, x20
	mov	w1, #90
	bl	_pci_write_config_byte
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_enable_irq
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IDE_DFLAG_NIEN_QUIRK,4,2       ; @IDE_DFLAG_NIEN_QUIRK
	.comm	_HPT370,8,3                     ; @HPT370
	.no_dead_strip	_hpt3xx_maskproc
.subsections_via_symbols
