	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pacpi_set_dmamode
_pacpi_set_dmamode:                     ## @pacpi_set_dmamode
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movl	(%r15), %ebx
	shll	$27, %ebx
	sarl	$31, %ebx
	andl	(%rsi), %ebx
	movq	8(%rsi), %rdi
	callq	_ata_timing_find_mode
	movq	8(%r12), %rcx
	movq	_XFER_UDMA_0@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jge	LBB0_1
## %bb.2:
	movl	(%rax), %eax
	movq	8(%r15), %rcx
	movslq	%ebx, %rdx
	movl	%eax, (%rcx,%rdx,4)
	addl	%ebx, %ebx
	movl	(%r15), %eax
	btrl	%ebx, %eax
	jmp	LBB0_3
LBB0_1:
	movl	4(%rax), %eax
	movq	8(%r15), %rcx
	movslq	%ebx, %rdx
	movl	%eax, (%rcx,%rdx,4)
	addl	%edx, %edx
	movl	(%r15), %eax
	btsl	%edx, %eax
LBB0_3:
	movl	%eax, (%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ata_acpi_stm
	movq	%r14, %rdi
	movq	%r15, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ata_acpi_gtm                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_XFER_UDMA_0,8,3                ## @XFER_UDMA_0
	.no_dead_strip	_pacpi_set_dmamode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pacpi_set_dmamode
_pacpi_set_dmamode:                     ; @pacpi_set_dmamode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x1]
	ldr	x20, [x0]
	ldr	w9, [x20]
	lsl	w9, w9, #27
	and	w22, w8, w9, asr #31
	ldr	x0, [x1, #8]
	bl	_ata_timing_find_mode
	ldr	x8, [x21, #8]
Lloh0:
	adrp	x9, _XFER_UDMA_0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XFER_UDMA_0@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_2
; %bb.1:
	ldr	w8, [x0]
	ldr	x9, [x20, #8]
	str	w8, [x9, w22, sxtw #2]
	lsl	w8, w22, #1
	mov	w9, #1
	lsl	w8, w9, w8
	ldr	w9, [x20]
	bic	w8, w9, w8
	b	LBB0_3
LBB0_2:
	ldr	w8, [x0, #4]
	ldr	x9, [x20, #8]
	str	w8, [x9, w22, sxtw #2]
	lsl	w8, w22, #1
	mov	w9, #1
	lsl	w8, w9, w8
	ldr	w9, [x20]
	orr	w8, w9, w8
LBB0_3:
	str	w8, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	_ata_acpi_stm
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ata_acpi_gtm
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_XFER_UDMA_0,8,3                ; @XFER_UDMA_0
	.no_dead_strip	_pacpi_set_dmamode
.subsections_via_symbols
