	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_acpi_gtm_xfermask          ## -- Begin function ata_acpi_gtm_xfermask
	.p2align	4, 0x90
_ata_acpi_gtm_xfermask:                 ## @ata_acpi_gtm_xfermask
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movl	(%rsi), %eax
	shll	$27, %eax
	sarl	$31, %eax
	andl	(%rdi), %eax
	movq	_ATA_SHIFT_PIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	8(%rsi), %rcx
	movslq	%eax, %r15
	movl	4(%rcx,%r15,8), %esi
	callq	_ata_timing_cycle2mode
	movl	%eax, %edi
	callq	_ata_xfer_mode2mask
	movq	%rax, %r14
	movl	(%rbx), %eax
	leal	(%r15,%r15), %ecx
	btl	%ecx, %eax
	jb	LBB0_1
## %bb.2:
	movq	_ATA_SHIFT_MWDMA@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_ATA_SHIFT_UDMA@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edi
	movq	8(%rbx), %rax
	movl	(%rax,%r15,8), %esi
	callq	_ata_timing_cycle2mode
	movl	%eax, %edi
	callq	_ata_xfer_mode2mask
	orq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_SHIFT_PIO,4,2              ## @ATA_SHIFT_PIO
	.comm	_ATA_SHIFT_MWDMA,4,2            ## @ATA_SHIFT_MWDMA
	.comm	_ATA_SHIFT_UDMA,4,2             ## @ATA_SHIFT_UDMA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_acpi_gtm_xfermask          ; -- Begin function ata_acpi_gtm_xfermask
	.p2align	2
_ata_acpi_gtm_xfermask:                 ; @ata_acpi_gtm_xfermask
	.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	x19, x1
	ldr	w8, [x0]
	ldr	w9, [x1]
	lsl	w9, w9, #27
Lloh0:
	adrp	x10, _ATA_SHIFT_PIO@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ATA_SHIFT_PIO@GOTPAGEOFF]
	and	w21, w8, w9, asr #31
Lloh2:
	ldr	w0, [x10]
	ldr	x8, [x1, #8]
	sbfiz	x22, x21, #3, #32
	add	x8, x8, x22
	ldr	w1, [x8, #4]
	bl	_ata_timing_cycle2mode
	bl	_ata_xfer_mode2mask
	mov	x20, x0
	ldr	w8, [x19]
	lsl	w9, w21, #1
Lloh3:
	adrp	x10, _ATA_SHIFT_MWDMA@GOTPAGE
Lloh4:
	ldr	x10, [x10, _ATA_SHIFT_MWDMA@GOTPAGEOFF]
Lloh5:
	adrp	x11, _ATA_SHIFT_UDMA@GOTPAGE
Lloh6:
	ldr	x11, [x11, _ATA_SHIFT_UDMA@GOTPAGEOFF]
	lsr	w8, w8, w9
	tst	w8, #0x1
	csel	x8, x10, x11, eq
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x22]
	bl	_ata_timing_cycle2mode
	bl	_ata_xfer_mode2mask
	orr	x0, x0, 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
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_SHIFT_PIO,4,2              ; @ATA_SHIFT_PIO
	.comm	_ATA_SHIFT_MWDMA,4,2            ; @ATA_SHIFT_MWDMA
	.comm	_ATA_SHIFT_UDMA,4,2             ; @ATA_SHIFT_UDMA
.subsections_via_symbols
