	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function venus_run
_venus_run:                             ## @venus_run
	.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
	movq	8(%rdi), %rax
	movq	(%rax), %r14
	callq	_venus_set_registers
	movq	_UC_REGION_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	movq	%rbx, %rdi
	callq	_venus_writel
	movq	_UC_REGION_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SHARED_QSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_venus_writel
	movq	_CPU_CS_SCIACMDARG2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	movq	%rbx, %rdi
	callq	_venus_writel
	movq	_CPU_CS_SCIACMDARG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_venus_writel
	movl	(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	movq	_SFR_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_venus_writel
LBB0_2:
	movq	%rbx, %rdi
	callq	_venus_boot_core
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	callq	_venus_hwversion
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UC_REGION_ADDR,4,2             ## @UC_REGION_ADDR
	.comm	_UC_REGION_SIZE,4,2             ## @UC_REGION_SIZE
	.comm	_SHARED_QSIZE,4,2               ## @SHARED_QSIZE
	.comm	_CPU_CS_SCIACMDARG2,4,2         ## @CPU_CS_SCIACMDARG2
	.comm	_CPU_CS_SCIACMDARG1,4,2         ## @CPU_CS_SCIACMDARG1
	.comm	_SFR_ADDR,4,2                   ## @SFR_ADDR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to reset venus core\n"

	.no_dead_strip	_venus_run
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function venus_run
_venus_run:                             ; @venus_run
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x19, [x8]
	bl	_venus_set_registers
Lloh0:
	adrp	x8, _UC_REGION_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UC_REGION_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x20, #4]
	mov	x0, x20
	bl	_venus_writel
Lloh3:
	adrp	x8, _UC_REGION_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UC_REGION_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _SHARED_QSIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SHARED_QSIZE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_venus_writel
Lloh9:
	adrp	x8, _CPU_CS_SCIACMDARG2@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CPU_CS_SCIACMDARG2@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [x20, #4]
	mov	x0, x20
	bl	_venus_writel
Lloh12:
	adrp	x8, _CPU_CS_SCIACMDARG1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CPU_CS_SCIACMDARG1@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_venus_writel
	ldr	w2, [x20]
	cbz	w2, LBB0_2
; %bb.1:
Lloh15:
	adrp	x8, _SFR_ADDR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SFR_ADDR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_venus_writel
LBB0_2:
	mov	x0, x20
	bl	_venus_boot_core
	mov	x21, x0
	cbz	w0, LBB0_4
; %bb.3:
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_5
LBB0_4:
	mov	x0, x20
	bl	_venus_hwversion
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_UC_REGION_ADDR,4,2             ; @UC_REGION_ADDR
	.comm	_UC_REGION_SIZE,4,2             ; @UC_REGION_SIZE
	.comm	_SHARED_QSIZE,4,2               ; @SHARED_QSIZE
	.comm	_CPU_CS_SCIACMDARG2,4,2         ; @CPU_CS_SCIACMDARG2
	.comm	_CPU_CS_SCIACMDARG1,4,2         ; @CPU_CS_SCIACMDARG1
	.comm	_SFR_ADDR,4,2                   ; @SFR_ADDR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to reset venus core\n"

	.no_dead_strip	_venus_run
.subsections_via_symbols
