	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_id_xfermask                ## -- Begin function ata_id_xfermask
	.p2align	4, 0x90
_ata_id_xfermask:                       ## @ata_id_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_ATA_ID_FIELD_VALID@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	testb	$2, (%rdi,%rax,4)
	jne	LBB0_1
## %bb.2:
	movq	_ATA_ID_OLD_PIO_MODES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r14,%rax,4), %eax
	shrl	$8, %eax
	movzbl	%al, %ecx
	movl	$2, %edx
	shll	%cl, %edx
	decl	%edx
	cmpl	$5, %ecx
	movl	$1, %eax
	cmovbl	%edx, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_ATA_ID_PIO_MODES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r14,%rax,4), %eax
	andl	$3, %eax
	leal	7(,%rax,8), %eax
LBB0_3:
	movl	%eax, %r15d
	movq	_ATA_ID_MWDMA_MODES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r14,%rax,4), %ebx
	andl	$7, %ebx
	movq	%r14, %rdi
	callq	_ata_id_is_cfa
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_ATA_ID_CFA_MODES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r14,%rax,4), %eax
	movl	%eax, %ecx
	andl	$7, %ecx
	shrl	$3, %eax
	andl	$7, %eax
	movq	%r15, %rdx
	orq	$32, %rdx
	testl	%ecx, %ecx
	cmoveq	%r15, %rdx
	movq	%rdx, %r15
	orq	$64, %r15
	cmpl	$2, %ecx
	cmovbq	%rdx, %r15
	leaq	8(%rbx), %rcx
	testl	%eax, %eax
	cmoveq	%rbx, %rcx
	leaq	16(%rcx), %rbx
	cmpl	$2, %eax
	cmovbq	%rcx, %rbx
LBB0_5:
	movq	(%r12), %rax
	testb	$4, (%r14,%rax,4)
	jne	LBB0_7
## %bb.6:
	xorl	%edx, %edx
	jmp	LBB0_8
LBB0_7:
	movq	_ATA_ID_UDMA_MODES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movzbl	(%r14,%rax,4), %edx
LBB0_8:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ata_pack_xfermask              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_ID_FIELD_VALID,8,3         ## @ATA_ID_FIELD_VALID
	.comm	_ATA_ID_PIO_MODES,8,3           ## @ATA_ID_PIO_MODES
	.comm	_ATA_ID_OLD_PIO_MODES,8,3       ## @ATA_ID_OLD_PIO_MODES
	.comm	_ATA_ID_MWDMA_MODES,8,3         ## @ATA_ID_MWDMA_MODES
	.comm	_ATA_ID_CFA_MODES,8,3           ## @ATA_ID_CFA_MODES
	.comm	_ATA_ID_UDMA_MODES,8,3          ## @ATA_ID_UDMA_MODES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_id_xfermask                ; -- Begin function ata_id_xfermask
	.p2align	2
_ata_id_xfermask:                       ; @ata_id_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, x0
Lloh0:
	adrp	x22, _ATA_ID_FIELD_VALID@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ATA_ID_FIELD_VALID@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	w8, [x0, x8, lsl #2]
	tbnz	w8, #1, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _ATA_ID_OLD_PIO_MODES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ATA_ID_OLD_PIO_MODES@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	add	x8, x19, x8, lsl #2
	ldrb	w8, [x8, #1]
	mov	w9, #2
	lsl	w9, w9, w8
	sub	w9, w9, #1
	cmp	w8, #5
	csinc	w8, w9, wzr, lo
	b	LBB0_3
LBB0_2:
Lloh5:
	adrp	x8, _ATA_ID_PIO_MODES@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATA_ID_PIO_MODES@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	w9, [x19, x8, lsl #2]
	mov	w8, #7
	bfi	w8, w9, #3, #2
LBB0_3:
	mov	w20, w8
Lloh8:
	adrp	x8, _ATA_ID_MWDMA_MODES@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATA_ID_MWDMA_MODES@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	w8, [x19, x8, lsl #2]
	and	x21, x8, #0x7
	mov	x0, x19
	bl	_ata_id_is_cfa
	cbz	x0, LBB0_5
; %bb.4:
Lloh11:
	adrp	x8, _ATA_ID_CFA_MODES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ATA_ID_CFA_MODES@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	w8, [x19, x8, lsl #2]
	orr	x9, x20, #0x20
	ands	w10, w8, #0x7
	csel	x9, x20, x9, eq
	orr	x11, x9, #0x40
	cmp	w10, #1
	csel	x20, x11, x9, hi
	orr	x9, x21, #0x8
	mov	w10, #7
	ands	w8, w10, w8, lsr #3
	csel	x9, x21, x9, eq
	orr	x10, x9, #0x10
	cmp	w8, #1
	csel	x21, x10, x9, hi
LBB0_5:
	ldr	x8, [x22]
	ldr	w8, [x19, x8, lsl #2]
	tbnz	w8, #2, LBB0_7
; %bb.6:
	mov	x2, #0
	b	LBB0_8
LBB0_7:
Lloh14:
	adrp	x8, _ATA_ID_UDMA_MODES@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ATA_ID_UDMA_MODES@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	lsl	x8, x8, #2
	ldrb	w2, [x19, x8]
LBB0_8:
	mov	x0, x20
	mov	x1, x21
	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_pack_xfermask
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_ID_FIELD_VALID,8,3         ; @ATA_ID_FIELD_VALID
	.comm	_ATA_ID_PIO_MODES,8,3           ; @ATA_ID_PIO_MODES
	.comm	_ATA_ID_OLD_PIO_MODES,8,3       ; @ATA_ID_OLD_PIO_MODES
	.comm	_ATA_ID_MWDMA_MODES,8,3         ; @ATA_ID_MWDMA_MODES
	.comm	_ATA_ID_CFA_MODES,8,3           ; @ATA_ID_CFA_MODES
	.comm	_ATA_ID_UDMA_MODES,8,3          ; @ATA_ID_UDMA_MODES
.subsections_via_symbols
