	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv_mode_filter
_nv_mode_filter:                        ## @nv_mode_filter
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rax
	movq	(%rax), %r13
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movq	8(%r13), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	sarl	$16, %ecx
	cmpq	$0, (%r13)
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	cmovnel	%eax, %ecx
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movl	%ecx, %eax
	sarl	$8, %eax
	cmpq	$0, (%rdi)
	cmovnel	%ecx, %eax
	movl	%eax, %ecx
	notl	%ecx
	testb	$-64, %cl
	jne	LBB0_1
## %bb.2:
	andl	$7, %eax
	leaq	_nv_mode_filter.udma_mask_map(%rip), %rcx
	movl	(%rcx,%rax,4), %edx
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_ata_pack_xfermask
	movq	%rax, %r15
	jmp	LBB0_3
LBB0_1:
	xorl	%r15d, %r15d
LBB0_3:
	movq	%r13, %rdi
	callq	_ata_acpi_init_gtm
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_ata_acpi_gtm_xfermask
	movq	%rax, %r12
	movq	8(%rbx), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %r8d
	movl	(%rbx), %r9d
	leaq	L_.str(%rip), %rdx
	leaq	-80(%rbp), %rdi
	movl	$32, %esi
	callq	_snprintf
	jmp	LBB0_6
LBB0_4:
	xorl	%r12d, %r12d
LBB0_6:
	movq	%r12, %rax
	orq	%r15, %rax
	movq	_ATA_MASK_PIO@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	xorl	%ecx, %ecx
	testq	%rbx, %rax
	cmovneq	%rcx, %rbx
	movq	_ATA_MASK_MWDMA@GOTPCREL(%rip), %rdx
	movq	_ATA_MASK_UDMA@GOTPCREL(%rip), %rsi
	movq	(%rsi), %r14
	orq	(%rdx), %r14
	orq	%rax, %rbx
	testq	%r14, %rbx
	cmovneq	%rcx, %r14
	movq	_ATA_PIO4@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ATA_MWDMA2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$132, %edx
	callq	_ata_pack_xfermask
	orq	%rax, %rbx
	orq	%r14, %rbx
	movq	_KERN_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %r14
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	andq	%rcx, %r14
	leaq	-80(%rbp), %rax
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	movq	%rbx, %r8
	movq	%r14, %r9
	pushq	%rax
	pushq	%r12
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	pushq	%r15
	callq	_ata_port_printk
	addq	$32, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @nv_mode_filter.udma_mask_map
_nv_mode_filter.udma_mask_map:
	.long	132                             ## 0x84
	.long	133                             ## 0x85
	.long	134                             ## 0x86
	.long	0                               ## 0x0
	.long	131                             ## 0x83
	.long	130                             ## 0x82
	.long	129                             ## 0x81
	.long	128                             ## 0x80

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" (%u:%u:0x%x)"

	.comm	_ATA_MASK_PIO,8,3               ## @ATA_MASK_PIO
	.comm	_ATA_MASK_MWDMA,8,3             ## @ATA_MASK_MWDMA
	.comm	_ATA_MASK_UDMA,8,3              ## @ATA_MASK_UDMA
	.comm	_ATA_PIO4,4,2                   ## @ATA_PIO4
	.comm	_ATA_MWDMA2,4,2                 ## @ATA_MWDMA2
	.comm	_KERN_DEBUG,4,2                 ## @KERN_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"nv_mode_filter: 0x%lx&0x%lx->0x%lx, BIOS=0x%lx (0x%x) ACPI=0x%lx%s\n"

	.no_dead_strip	_nv_mode_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv_mode_filter
_nv_mode_filter:                        ; @nv_mode_filter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x23, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldp	x9, x8, [x0]
	ldr	x21, [x8]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #16]
	ldp	x10, x8, [x21]
	ldr	w20, [x8]
	asr	w8, w20, #16
	cmp	x10, #0
	csel	w8, w8, w20, eq
	asr	w10, w8, #8
	cmp	x9, #0
	csel	w8, w10, w8, eq
	mvn	w9, w8
	tst	w9, #0xc0
	b.ne	LBB0_2
; %bb.1:
	and	w8, w8, #0x7
Lloh3:
	adrp	x9, _nv_mode_filter.udma_mask_map@PAGE
Lloh4:
	add	x9, x9, _nv_mode_filter.udma_mask_map@PAGEOFF
	ldr	w2, [x9, w8, uxtw #2]
	mov	w0, #0
	mov	w1, #0
	bl	_ata_pack_xfermask
	mov	x22, x0
	b	LBB0_3
LBB0_2:
	mov	x22, #0
LBB0_3:
	mov	x0, x21
	bl	_ata_acpi_init_gtm
	cbz	x0, LBB0_5
; %bb.4:
	mov	x24, x0
	mov	x0, x23
	mov	x1, x24
	bl	_ata_acpi_gtm_xfermask
	mov	x23, x0
	ldr	x8, [x24, #8]
	ldp	w3, w4, [x8]
	ldr	w5, [x24]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #16
	mov	w1, #32
	bl	_snprintf
	b	LBB0_6
LBB0_5:
	mov	x23, #0
LBB0_6:
	orr	x8, x23, x22
Lloh7:
	adrp	x9, _ATA_MASK_PIO@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ATA_MASK_PIO@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	tst	x8, x9
	csel	x9, x9, xzr, eq
	orr	x24, x9, x8
Lloh10:
	adrp	x8, _ATA_MASK_MWDMA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ATA_MASK_MWDMA@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x9, _ATA_MASK_UDMA@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ATA_MASK_UDMA@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	orr	x8, x9, x8
	tst	x24, x8
	csel	x25, x8, xzr, eq
Lloh16:
	adrp	x8, _ATA_PIO4@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ATA_PIO4@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x8, _ATA_MWDMA2@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ATA_MWDMA2@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	w2, #132
	bl	_ata_pack_xfermask
	orr	x8, x0, x24
	orr	x4, x8, x25
Lloh22:
	adrp	x8, _KERN_DEBUG@GOTPAGE
Lloh23:
	ldr	x8, [x8, _KERN_DEBUG@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	and	x24, x4, x19
	add	x8, sp, #16
	stp	x23, x8, [sp]
Lloh25:
	adrp	x2, l_.str.1@PAGE
Lloh26:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x3, x19
	mov	x5, x24
	mov	x6, x22
	mov	x7, x20
	bl	_ata_port_printk
	ldr	x8, [sp, #56]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x24
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @nv_mode_filter.udma_mask_map
_nv_mode_filter.udma_mask_map:
	.long	132                             ; 0x84
	.long	133                             ; 0x85
	.long	134                             ; 0x86
	.long	0                               ; 0x0
	.long	131                             ; 0x83
	.long	130                             ; 0x82
	.long	129                             ; 0x81
	.long	128                             ; 0x80

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" (%u:%u:0x%x)"

	.comm	_ATA_MASK_PIO,8,3               ; @ATA_MASK_PIO
	.comm	_ATA_MASK_MWDMA,8,3             ; @ATA_MASK_MWDMA
	.comm	_ATA_MASK_UDMA,8,3              ; @ATA_MASK_UDMA
	.comm	_ATA_PIO4,4,2                   ; @ATA_PIO4
	.comm	_ATA_MWDMA2,4,2                 ; @ATA_MWDMA2
	.comm	_KERN_DEBUG,4,2                 ; @KERN_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"nv_mode_filter: 0x%lx&0x%lx->0x%lx, BIOS=0x%lx (0x%x) ACPI=0x%lx%s\n"

	.no_dead_strip	_nv_mode_filter
.subsections_via_symbols
