	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hva_hw_get_ip_version
_hva_hw_get_ip_version:                 ## @hva_hw_get_ip_version
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_hva_to_dev
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_pm_runtime_get_sync
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	_HVA_HIF_REG_VERSION@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_readl_relaxed
	movq	%rax, %rbx
	movq	_VERSION_ID_MASK@GOTPCREL(%rip), %rax
	andq	(%rax), %rbx
	movq	%r14, %rdi
	callq	_pm_runtime_put_autosuspend
	movq	_HVA_PREFIX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpq	$128, %rbx
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$128, %r15d
	movl	$128, %ecx
	movq	%r14, %rdi
	callq	_dev_dbg
	jmp	LBB0_5
LBB0_1:
	movq	_HVA_PREFIX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	_EFAULT@GOTPCREL(%rip), %rax
	subq	(%rax), %r15
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_HVA_VERSION_UNKNOWN@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
LBB0_5:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s     failed to get pm_runtime\n"

	.comm	_HVA_PREFIX,4,2                 ## @HVA_PREFIX
	.comm	_EFAULT,8,3                     ## @EFAULT
	.comm	_HVA_HIF_REG_VERSION,8,3        ## @HVA_HIF_REG_VERSION
	.comm	_VERSION_ID_MASK,8,3            ## @VERSION_ID_MASK
L_.str.1:                               ## @.str.1
	.asciz	"%s     IP hardware version 0x%lx\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s     unknown IP hardware version 0x%lx\n"

	.comm	_HVA_VERSION_UNKNOWN,8,3        ## @HVA_VERSION_UNKNOWN
	.no_dead_strip	_hva_hw_get_ip_version
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hva_hw_get_ip_version
_hva_hw_get_ip_version:                 ; @hva_hw_get_ip_version
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x0
	bl	_hva_to_dev
	mov	x19, x0
	bl	_pm_runtime_get_sync
	tbnz	x0, #63, LBB0_3
; %bb.1:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _HVA_HIF_REG_VERSION@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HVA_HIF_REG_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
Lloh3:
	adrp	x8, _VERSION_ID_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VERSION_ID_MASK@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	and	x20, x8, x0
	mov	x0, x19
	bl	_pm_runtime_put_autosuspend
Lloh6:
	adrp	x8, _HVA_PREFIX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HVA_PREFIX@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	cmp	x20, #128
	b.ne	LBB0_4
; %bb.2:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w3, #128
	bl	_dev_dbg
	b	LBB0_5
LBB0_3:
Lloh11:
	adrp	x8, _HVA_PREFIX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HVA_PREFIX@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	add	x0, x20, #8
	bl	_mutex_unlock
Lloh16:
	adrp	x8, _EFAULT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	neg	x20, x8
	b	LBB0_5
LBB0_4:
	str	x20, [sp]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh21:
	adrp	x8, _HVA_VERSION_UNKNOWN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _HVA_VERSION_UNKNOWN@GOTPAGEOFF]
Lloh23:
	ldr	x20, [x8]
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s     failed to get pm_runtime\n"

	.comm	_HVA_PREFIX,4,2                 ; @HVA_PREFIX
	.comm	_EFAULT,8,3                     ; @EFAULT
	.comm	_HVA_HIF_REG_VERSION,8,3        ; @HVA_HIF_REG_VERSION
	.comm	_VERSION_ID_MASK,8,3            ; @VERSION_ID_MASK
l_.str.1:                               ; @.str.1
	.asciz	"%s     IP hardware version 0x%lx\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s     unknown IP hardware version 0x%lx\n"

	.comm	_HVA_VERSION_UNKNOWN,8,3        ; @HVA_VERSION_UNKNOWN
	.no_dead_strip	_hva_hw_get_ip_version
.subsections_via_symbols
