	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hpt372_set_piomode
_hpt372_set_piomode:                    ## @hpt372_set_piomode
	.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	%rsi, %r15
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r13
	movl	(%r12), %eax
	leal	(%rax,%rax), %ecx
	addl	(%r15), %ecx
	leal	64(,%rcx,4), %r14d
	leal	81(,%rax,4), %ebx
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_pci_read_config_byte
	movl	-44(%rbp), %edx
	andl	$-8, %edx
	movl	%edx, -44(%rbp)
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_pci_write_config_byte
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_pci_read_config_dword
	movl	4(%r15), %esi
	movq	%r12, %rdi
	callq	_hpt37x_find_mode
	movl	%eax, %ebx
	movl	4(%r15), %esi
	leaq	L_.str(%rip), %rdi
	movl	%eax, %edx
	callq	_printk
	andl	$-809238529, %ebx               ## imm = 0xCFC3FFFF
	movl	$809238528, %edx                ## imm = 0x303C0000
	andl	-48(%rbp), %edx
	movl	%edx, -48(%rbp)
	orl	%ebx, %edx
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_pci_write_config_dword
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Find mode for %d reports %X\n"

	.no_dead_strip	_hpt372_set_piomode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hpt372_set_piomode
_hpt372_set_piomode:                    ; @hpt372_set_piomode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x21, x0
	ldr	w8, [x19]
	ldr	w9, [x20]
	add	w8, w8, w9, lsl #1
	lsl	w8, w8, #2
	add	w22, w8, #64
	lsl	w8, w9, #2
	add	w23, w8, #81
	add	x2, sp, #8
	mov	x1, x23
	bl	_pci_read_config_byte
	ldr	w8, [sp, #8]
	and	w2, w8, #0xfffffff8
	str	w2, [sp, #8]
	mov	x0, x21
	mov	x1, x23
	bl	_pci_write_config_byte
	add	x2, sp, #12
	mov	x0, x21
	mov	x1, x22
	bl	_pci_read_config_dword
	ldr	w1, [x19, #4]
	mov	x0, x20
	bl	_hpt37x_find_mode
	mov	x20, x0
	ldr	w1, [x19, #4]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_printk
	mov	w8, #-809238529
	and	w8, w20, w8
	ldr	w9, [sp, #12]
	mov	w10, #809238528
	and	w9, w9, w10
	str	w9, [sp, #12]
	orr	w2, w9, w8
	mov	x0, x21
	mov	x1, x22
	bl	_pci_write_config_dword
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Find mode for %d reports %X\n"

	.no_dead_strip	_hpt372_set_piomode
.subsections_via_symbols
