	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atiixp_set_pio_mode
_atiixp_set_pio_mode:                   ## @atiixp_set_pio_mode
	.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
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r12
	movb	(%r13), %bl
	shlb	$3, %bl
	movq	_atiixp_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	_ATIIXP_IDE_PIO_MODE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	callq	_pci_read_config_word
	movb	(%r13), %cl
	shlb	$2, %cl
	movl	$7, %eax
	shll	%cl, %eax
	notl	%eax
	andl	-48(%rbp), %eax
	movl	%r15d, %edx
	shll	%cl, %edx
	orl	%eax, %edx
	movl	%edx, -48(%rbp)
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_pci_write_config_word
	movq	_ATIIXP_IDE_PIO_TIMING@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	callq	_pci_read_config_dword
	xorb	$8, %bl
	movl	$255, %eax
	movl	%ebx, %ecx
	shll	%cl, %eax
	notl	%eax
	andl	-44(%rbp), %eax
	movl	%eax, -44(%rbp)
	movq	_pio_timing@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%r15d, %rsi
	movl	(%rcx,%rsi,8), %edx
	movl	4(%rcx,%rsi,8), %esi
	movl	%ebx, %ecx
	shll	%cl, %edx
	orb	$4, %bl
	movl	%ebx, %ecx
	shll	%cl, %esi
	orl	%eax, %edx
	orl	%esi, %edx
	movl	%edx, -44(%rbp)
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_pci_write_config_dword
	movq	_atiixp_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_atiixp_lock,4,2                ## @atiixp_lock
	.comm	_ATIIXP_IDE_PIO_MODE,4,2        ## @ATIIXP_IDE_PIO_MODE
	.comm	_ATIIXP_IDE_PIO_TIMING,4,2      ## @ATIIXP_IDE_PIO_TIMING
	.comm	_pio_timing,8,3                 ## @pio_timing
	.no_dead_strip	_atiixp_set_pio_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atiixp_set_pio_mode
_atiixp_set_pio_mode:                   ; @atiixp_set_pio_mode
	.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	x21, x1
	mov	x22, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x20, x0
	ldr	w8, [x22]
	lsl	w8, w8, #3
	eor	w23, w8, #0x8
Lloh0:
	adrp	x19, _atiixp_lock@GOTPAGE
Lloh1:
	ldr	x19, [x19, _atiixp_lock@GOTPAGEOFF]
	mov	x0, x19
	bl	_spin_lock_irqsave
Lloh2:
	adrp	x24, _ATIIXP_IDE_PIO_MODE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _ATIIXP_IDE_PIO_MODE@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x2, sp, #8
	mov	x0, x20
	bl	_pci_read_config_word
	ldr	w8, [x22]
	lsl	w8, w8, #2
	mov	w9, #7
	lsl	w9, w9, w8
	ldr	w10, [sp, #8]
	bic	w9, w10, w9
	lsl	w8, w21, w8
	orr	w2, w9, w8
	str	w2, [sp, #8]
	ldr	w1, [x24]
	mov	x0, x20
	bl	_pci_write_config_word
Lloh4:
	adrp	x22, _ATIIXP_IDE_PIO_TIMING@GOTPAGE
Lloh5:
	ldr	x22, [x22, _ATIIXP_IDE_PIO_TIMING@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_dword
	mov	w8, #255
	lsl	w8, w8, w23
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
Lloh6:
	adrp	x9, _pio_timing@GOTPAGE
Lloh7:
	ldr	x9, [x9, _pio_timing@GOTPAGEOFF]
	str	w8, [sp, #12]
Lloh8:
	ldr	x9, [x9]
	add	x9, x9, w21, sxtw #3
	ldp	w10, w9, [x9]
	lsl	w10, w10, w23
	orr	w11, w23, #0x4
	lsl	w9, w9, w11
	orr	w8, w10, w8
	orr	w2, w8, w9
	str	w2, [sp, #12]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_pci_write_config_dword
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_atiixp_lock,4,2                ; @atiixp_lock
	.comm	_ATIIXP_IDE_PIO_MODE,4,2        ; @ATIIXP_IDE_PIO_MODE
	.comm	_ATIIXP_IDE_PIO_TIMING,4,2      ; @ATIIXP_IDE_PIO_TIMING
	.comm	_pio_timing,8,3                 ; @pio_timing
	.no_dead_strip	_atiixp_set_pio_mode
.subsections_via_symbols
