	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nx_update_dma_mask
_nx_update_dma_mask:                    ## @nx_update_dma_mask
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movq	_CRB_DMA_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_NXRD32
	xorl	%r13d, %r13d
	cmpl	$32, %eax
	jg	LBB0_10
## %bb.1:
	movl	%eax, %r12d
	movq	(%rbx), %rdi
	callq	_NX_IS_REVISION_P3
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	cmpl	$9, %r12d
	jg	LBB0_5
LBB0_3:
	movq	(%rbx), %rax
	movq	_NX_P2_C1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.4:
	cmpl	$4, %r12d
	jg	LBB0_10
LBB0_5:
	movl	(%r15), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	4(%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	addl	$32, %r12d
	movl	%r12d, %edi
	callq	_DMA_BIT_MASK
	movq	%r15, %rdi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %esi
	callq	_pci_set_dma_mask
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_6
LBB0_9:
	movq	%r15, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_pci_set_dma_mask
	movq	%r15, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_pci_set_consistent_dma_mask
	movl	%r14d, %r13d
	jmp	LBB0_10
LBB0_6:
	movq	(%rbx), %rdi
	callq	_NX_IS_REVISION_P3
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_pci_set_consistent_dma_mask
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_9
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_dev_info
LBB0_10:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CRB_DMA_SHIFT,4,2              ## @CRB_DMA_SHIFT
	.comm	_NX_P2_C1,8,3                   ## @NX_P2_C1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"using %d-bit dma mask\n"

	.no_dead_strip	_nx_update_dma_mask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nx_update_dma_mask
_nx_update_dma_mask:                    ; @nx_update_dma_mask
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x8, _CRB_DMA_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CRB_DMA_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_NXRD32
	cmp	w0, #32
	b.le	LBB0_2
LBB0_1:
	mov	w24, #0
	b	LBB0_6
LBB0_2:
	mov	x23, x0
	ldr	x0, [x20]
	bl	_NX_IS_REVISION_P3
	cmp	x0, #0
	ccmp	w23, #9, #4, ne
	b.gt	LBB0_4
; %bb.3:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _NX_P2_C1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NX_P2_C1@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	ccmp	w23, #4, #0, eq
	b.gt	LBB0_1
LBB0_4:
	ldp	w21, w22, [x19]
	add	w23, w23, #32
	mov	x0, x23
	bl	_DMA_BIT_MASK
	mov	x25, x0
	mov	x0, x19
	mov	x1, x25
	bl	_pci_set_dma_mask
	mov	x24, x0
	cbz	w0, LBB0_7
LBB0_5:
	mov	x0, x19
	mov	x1, x22
	bl	_pci_set_dma_mask
	mov	x0, x19
	mov	x1, x21
	bl	_pci_set_consistent_dma_mask
LBB0_6:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x0, [x20]
	bl	_NX_IS_REVISION_P3
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x19
	mov	x1, x25
	bl	_pci_set_consistent_dma_mask
	mov	x24, x0
	cbnz	w0, LBB0_5
LBB0_9:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_dev_info
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CRB_DMA_SHIFT,4,2              ; @CRB_DMA_SHIFT
	.comm	_NX_P2_C1,8,3                   ; @NX_P2_C1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"using %d-bit dma mask\n"

	.no_dead_strip	_nx_update_dma_mask
.subsections_via_symbols
