	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_xfer_mask2mode             ## -- Begin function ata_xfer_mask2mode
	.p2align	4, 0x90
_ata_xfer_mask2mode:                    ## @ata_xfer_mask2mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	callq	_fls
	movq	_ata_xfer_tbl@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movl	(%rdx), %esi
	movl	$255, %ecx
	testl	%esi, %esi
	js	LBB0_6
## %bb.1:
	addq	$12, %rdx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rdx), %esi
	addq	$12, %rdx
	testl	%esi, %esi
	js	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%esi, %eax
	jle	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-8(%rdx), %edi
	addl	%esi, %edi
	cmpl	%edi, %eax
	jg	LBB0_5
## %bb.4:
	notl	%esi
	addl	%esi, %eax
	addl	-4(%rdx), %eax
	movl	%eax, %ecx
LBB0_6:
	movl	%ecx, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ata_xfer_tbl,8,3               ## @ata_xfer_tbl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_xfer_mask2mode             ; -- Begin function ata_xfer_mask2mode
	.p2align	2
_ata_xfer_mask2mode:                    ; @ata_xfer_mask2mode
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	bl	_fls
Lloh0:
	adrp	x8, _ata_xfer_tbl@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ata_xfer_tbl@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	ldr	w8, [x9]
	tbnz	w8, #31, LBB0_6
; %bb.1:
	add	x9, x9, #8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x9, #4]
	add	x9, x9, #12
	tbnz	w8, #31, LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w0, w8
	b.le	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	w10, [x9, #-4]
	add	w10, w10, w8
	cmp	w0, w10
	b.gt	LBB0_2
; %bb.5:
	ldr	w9, [x9]
	mvn	w8, w8
	add	w8, w0, w8
	add	w0, w8, w9
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	w0, #255
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ata_xfer_tbl,8,3               ; @ata_xfer_tbl
.subsections_via_symbols
