	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_venus_boot                     ## -- Begin function venus_boot
	.p2align	4, 0x90
_venus_boot:                            ## @venus_boot
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	movq	_CONFIG_QCOM_MDT_LOADER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	cmpq	$0, (%rbx)
	je	LBB0_5
## %bb.2:
	xorl	%eax, %eax
	callq	_qcom_scm_is_available
	testl	%eax, %eax
	je	LBB0_3
LBB0_5:
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	leaq	-32(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_venus_load_fw
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_3:
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	cmpq	$0, (%rbx)
	je	LBB0_9
## %bb.8:
	movq	_VENUS_PAS_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_qcom_scm_pas_auth_and_reset
	jmp	LBB0_10
LBB0_9:
	movl	-20(%rbp), %esi
	movq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_venus_boot_no_tz
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_QCOM_MDT_LOADER,4,2     ## @CONFIG_QCOM_MDT_LOADER
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fail to load video firmware\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VENUS_PAS_ID,4,2               ## @VENUS_PAS_ID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_venus_boot                     ; -- Begin function venus_boot
	.p2align	2
_venus_boot:                            ; @venus_boot
	.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	x19, x0
	ldr	x20, [x0, #16]
Lloh0:
	adrp	x8, _CONFIG_QCOM_MDT_LOADER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_QCOM_MDT_LOADER@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	w0, LBB0_5
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_3
; %bb.2:
	bl	_qcom_scm_is_available
	cbz	w0, LBB0_5
LBB0_3:
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x3, sp
	mov	x0, x19
	bl	_venus_load_fw
	cbz	w0, LBB0_8
; %bb.4:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_8:
	ldr	x8, [x19]
	cbz	x8, LBB0_10
; %bb.9:
Lloh9:
	adrp	x8, _VENUS_PAS_ID@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VENUS_PAS_ID@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_qcom_scm_pas_auth_and_reset
	b	LBB0_7
LBB0_10:
	ldr	w1, [sp, #12]
	ldr	x2, [sp]
	mov	x0, x19
	bl	_venus_boot_no_tz
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_QCOM_MDT_LOADER,4,2     ; @CONFIG_QCOM_MDT_LOADER
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fail to load video firmware\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VENUS_PAS_ID,4,2               ; @VENUS_PAS_ID
.subsections_via_symbols
