	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvt_hw_detect
_nvt_hw_detect:                         ## @nvt_hw_detect
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	callq	_nvt_efm_enable
	movq	_CR_CHIP_ID_HI@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_nvt_cr_read
	movl	%eax, %r14d
	cmpl	$255, %eax
	jne	LBB0_2
## %bb.1:
	movq	_CR_EFIR2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r13)
	movq	_CR_EFDR2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r13)
	movq	%r13, %rdi
	callq	_nvt_efm_enable
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_nvt_cr_read
	movl	%eax, %r14d
LBB0_2:
	movq	_CR_CHIP_ID_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_nvt_cr_read
	movl	%eax, %r15d
	movq	_chip_id@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_nvt_dbg
	movq	_CHIP_ID_HIGH@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_5
## %bb.3:
	movq	_CHIP_ID_LOW@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	cmpl	(%rax), %r15d
	je	LBB0_6
## %bb.4:
	movq	_CHIP_ID_LOW2@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_6
LBB0_5:
	movq	_KERN_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	callq	_nvt_pr
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_6:
	movq	%r13, %rdi
	callq	_nvt_efm_disable
	leaq	8(%r13), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movl	%r14d, (%r13)
	movl	%r15d, 4(%r13)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CR_CHIP_ID_HI,4,2              ## @CR_CHIP_ID_HI
	.comm	_CR_EFIR2,4,2                   ## @CR_EFIR2
	.comm	_CR_EFDR2,4,2                   ## @CR_EFDR2
	.comm	_CR_CHIP_ID_LO,4,2              ## @CR_CHIP_ID_LO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: chip id: 0x%02x 0x%02x"

	.comm	_chip_id,4,2                    ## @chip_id
	.comm	_CHIP_ID_HIGH,4,2               ## @CHIP_ID_HIGH
	.comm	_CHIP_ID_LOW,4,2                ## @CHIP_ID_LOW
	.comm	_CHIP_ID_LOW2,4,2               ## @CHIP_ID_LOW2
	.comm	_KERN_ERR,4,2                   ## @KERN_ERR
L_.str.1:                               ## @.str.1
	.asciz	"%s: unsupported chip, id: 0x%02x 0x%02x"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_nvt_hw_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvt_hw_detect
_nvt_hw_detect:                         ; @nvt_hw_detect
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	bl	_nvt_efm_enable
Lloh0:
	adrp	x21, _CR_CHIP_ID_HI@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CR_CHIP_ID_HI@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_nvt_cr_read
	mov	x20, x0
	cmp	w0, #255
	b.ne	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _CR_EFIR2@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CR_EFIR2@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _CR_EFDR2@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CR_EFDR2@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #12]
	mov	x0, x19
	bl	_nvt_efm_enable
	ldr	w1, [x21]
	mov	x0, x19
	bl	_nvt_cr_read
	mov	x20, x0
LBB0_2:
Lloh8:
	adrp	x8, _CR_CHIP_ID_LO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CR_CHIP_ID_LO@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_nvt_cr_read
	mov	x21, x0
Lloh11:
	adrp	x22, _chip_id@GOTPAGE
Lloh12:
	ldr	x22, [x22, _chip_id@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x21
	bl	_nvt_dbg
Lloh15:
	adrp	x8, _CHIP_ID_HIGH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CHIP_ID_HIGH@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_5
; %bb.3:
Lloh18:
	adrp	x8, _CHIP_ID_LOW@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CHIP_ID_LOW@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _CHIP_ID_LOW2@GOTPAGE
Lloh22:
	ldr	x9, [x9, _CHIP_ID_LOW2@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	cmp	w21, w8
	ccmp	w21, w9, #4, ne
	b.ne	LBB0_5
; %bb.4:
	mov	w22, #0
	b	LBB0_6
LBB0_5:
Lloh24:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	ldr	w2, [x22]
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x20
	mov	x4, x21
	bl	_nvt_pr
Lloh29:
	adrp	x8, _ENODEV@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_6:
	mov	x0, x19
	bl	_nvt_efm_disable
	add	x23, x19, #8
	mov	x0, x23
	bl	_spin_lock_irqsave
	stp	w20, w21, [x19]
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_CR_CHIP_ID_HI,4,2              ; @CR_CHIP_ID_HI
	.comm	_CR_EFIR2,4,2                   ; @CR_EFIR2
	.comm	_CR_EFDR2,4,2                   ; @CR_EFDR2
	.comm	_CR_CHIP_ID_LO,4,2              ; @CR_CHIP_ID_LO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: chip id: 0x%02x 0x%02x"

	.comm	_chip_id,4,2                    ; @chip_id
	.comm	_CHIP_ID_HIGH,4,2               ; @CHIP_ID_HIGH
	.comm	_CHIP_ID_LOW,4,2                ; @CHIP_ID_LOW
	.comm	_CHIP_ID_LOW2,4,2               ; @CHIP_ID_LOW2
	.comm	_KERN_ERR,4,2                   ; @KERN_ERR
l_.str.1:                               ; @.str.1
	.asciz	"%s: unsupported chip, id: 0x%02x 0x%02x"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_nvt_hw_detect
.subsections_via_symbols
