	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function venus_boot_core
_venus_boot_core:                       ## @venus_boot_core
	.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, %r15
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_VIDC_CTRL_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_VIDC_CTRL_INIT_CTRL_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_venus_writel
	movq	_WRAPPER_INTR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WRAPPER_INTR_MASK_A2HVCODEC_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_venus_writel
	movq	_CPU_CS_SCIACMDARG3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_venus_writel
	xorl	%r12d, %r12d
	movq	_CPU_CS_SCIACMDARG0@GOTPCREL(%rip), %r13
	movq	_CPU_CS_SCIACMDARG0_ERROR_STATUS_MASK@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_venus_readl
	movl	%eax, %ebx
	movl	(%r14), %eax
	andl	%ebx, %eax
	cmpl	$4, %eax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	leal	1(%r12), %edx
	xorl	%ecx, %ecx
	testl	%ebx, %ebx
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$99, %r12d
	movl	%edx, %r12d
	jb	LBB0_1
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%r12d, %edx
LBB0_5:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rsi
	xorl	%eax, %eax
	subl	(%rsi), %eax
	cmpl	$100, %edx
	cmovbl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VIDC_CTRL_INIT,4,2             ## @VIDC_CTRL_INIT
	.comm	_VIDC_CTRL_INIT_CTRL_SHIFT,4,2  ## @VIDC_CTRL_INIT_CTRL_SHIFT
	.comm	_WRAPPER_INTR_MASK,4,2          ## @WRAPPER_INTR_MASK
	.comm	_WRAPPER_INTR_MASK_A2HVCODEC_MASK,4,2 ## @WRAPPER_INTR_MASK_A2HVCODEC_MASK
	.comm	_CPU_CS_SCIACMDARG3,4,2         ## @CPU_CS_SCIACMDARG3
	.comm	_CPU_CS_SCIACMDARG0,4,2         ## @CPU_CS_SCIACMDARG0
	.comm	_CPU_CS_SCIACMDARG0_ERROR_STATUS_MASK,4,2 ## @CPU_CS_SCIACMDARG0_ERROR_STATUS_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid setting for UC_REGION\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_venus_boot_core
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function venus_boot_core
_venus_boot_core:                       ; @venus_boot_core
	.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	x20, x0
	ldr	x8, [x0]
	ldr	x19, [x8]
Lloh0:
	adrp	x8, _VIDC_CTRL_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VIDC_CTRL_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _VIDC_CTRL_INIT_CTRL_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VIDC_CTRL_INIT_CTRL_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_BIT
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_venus_writel
Lloh6:
	adrp	x8, _WRAPPER_INTR_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WRAPPER_INTR_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _WRAPPER_INTR_MASK_A2HVCODEC_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WRAPPER_INTR_MASK_A2HVCODEC_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_venus_writel
Lloh12:
	adrp	x8, _CPU_CS_SCIACMDARG3@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CPU_CS_SCIACMDARG3@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_venus_writel
	mov	w22, #0
Lloh15:
	adrp	x23, _CPU_CS_SCIACMDARG0@GOTPAGE
Lloh16:
	ldr	x23, [x23, _CPU_CS_SCIACMDARG0@GOTPAGEOFF]
Lloh17:
	adrp	x24, _CPU_CS_SCIACMDARG0_ERROR_STATUS_MASK@GOTPAGE
Lloh18:
	ldr	x24, [x24, _CPU_CS_SCIACMDARG0_ERROR_STATUS_MASK@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x20
	bl	_venus_readl
	ldr	w8, [x24]
	and	w8, w8, w0
	cmp	w8, #4
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x21, x0
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	mov	w8, #0
	add	w9, w22, #1
	cbnz	w21, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w22, #99
	mov	x22, x9
	b.lo	LBB0_1
	b	LBB0_5
LBB0_4:
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w8, w8
	mov	x9, x22
LBB0_5:
Lloh24:
	adrp	x10, _ETIMEDOUT@GOTPAGE
Lloh25:
	ldr	x10, [x10, _ETIMEDOUT@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	cmp	w9, #99
	csneg	w0, w8, w10, ls
	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	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.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	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_VIDC_CTRL_INIT,4,2             ; @VIDC_CTRL_INIT
	.comm	_VIDC_CTRL_INIT_CTRL_SHIFT,4,2  ; @VIDC_CTRL_INIT_CTRL_SHIFT
	.comm	_WRAPPER_INTR_MASK,4,2          ; @WRAPPER_INTR_MASK
	.comm	_WRAPPER_INTR_MASK_A2HVCODEC_MASK,4,2 ; @WRAPPER_INTR_MASK_A2HVCODEC_MASK
	.comm	_CPU_CS_SCIACMDARG3,4,2         ; @CPU_CS_SCIACMDARG3
	.comm	_CPU_CS_SCIACMDARG0,4,2         ; @CPU_CS_SCIACMDARG0
	.comm	_CPU_CS_SCIACMDARG0_ERROR_STATUS_MASK,4,2 ; @CPU_CS_SCIACMDARG0_ERROR_STATUS_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid setting for UC_REGION\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_venus_boot_core
.subsections_via_symbols
