	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pata_at91_set_piomode
_pata_at91_set_piomode:                 ## @pata_at91_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rax
	movq	%rdi, %rbx
	movq	8(%rdi), %rcx
	movq	(%rcx), %r14
	movl	(%rsi), %esi
	leaq	-24(%rbp), %rdx
	movq	%rax, %rdi
	movl	$1000, %ecx                     ## imm = 0x3E8
	xorl	%r8d, %r8d
	callq	_ata_timing_compute
	movl	(%rbx), %edi
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
	movl	(%rbx), %edi
	movq	_initial_timing@GOTPCREL(%rip), %rdx
	jmp	LBB0_3
LBB0_2:
	leaq	-24(%rbp), %rdx
LBB0_3:
	movq	%r14, %rsi
	callq	_set_smc_timing
	movq	%r14, %rdi
	callq	_set_smc_mode
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to compute ATA timing %d, \t\t\t\tset PIO_0 timing\n"

	.comm	_initial_timing,4,2             ## @initial_timing
	.no_dead_strip	_pata_at91_set_piomode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pata_at91_set_piomode
_pata_at91_set_piomode:                 ; @pata_at91_set_piomode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x8, x1
	mov	x20, x0
	ldr	x9, [x0, #8]
	ldr	x19, [x9]
	ldr	w1, [x1]
	add	x2, sp, #8
	mov	x0, x8
	mov	w3, #1000
	mov	w4, #0
	bl	_ata_timing_compute
	mov	x2, x0
	ldr	w0, [x20]
	cbz	w2, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	ldr	w0, [x20]
Lloh2:
	adrp	x2, _initial_timing@GOTPAGE
Lloh3:
	ldr	x2, [x2, _initial_timing@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
	add	x2, sp, #8
LBB0_3:
	mov	x1, x19
	bl	_set_smc_timing
	mov	x0, x19
	bl	_set_smc_mode
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to compute ATA timing %d, \t\t\t\tset PIO_0 timing\n"

	.comm	_initial_timing,4,2             ; @initial_timing
	.no_dead_strip	_pata_at91_set_piomode
.subsections_via_symbols
