	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acr_r352_shutdown
_acr_r352_shutdown:                     ## @acr_r352_shutdown
	.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	%rsi, %rbx
	movq	%rdi, %r14
	cmpq	$0, 8(%rdi)
	je	LBB0_7
## %bb.1:
	cmpl	$0, (%rbx)
	je	LBB0_7
## %bb.2:
	leaq	16(%rbx), %r15
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_nvkm_debug
	movq	8(%rbx), %rax
	movq	8(%r14), %rsi
	movl	4(%rbx), %edx
	movq	%rbx, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	js	LBB0_11
## %bb.3:
	je	LBB0_6
## %bb.4:
	cmpl	$29, %eax
	jne	LBB0_5
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_nvkm_debug
LBB0_7:
	movq	_NVKM_SECBOOT_FALCON_END@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_10
## %bb.8:
	movq	(%r14), %rcx
	xorl	%edx, %edx
	movq	_NON_SECURE@GOTPCREL(%rip), %rsi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rsi), %edi
	movl	%edi, (%rcx,%rdx,4)
	incq	%rdx
	movslq	(%rax), %rdi
	cmpq	%rdi, %rdx
	jl	LBB0_9
LBB0_10:
	movl	$0, (%rbx)
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_nvkm_error
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"running HS unload blob\n"

L_.str.1:                               ## @.str.1
	.asciz	"HS unload failed, ret 0x%08x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"HS unload blob completed\n"

	.comm	_NVKM_SECBOOT_FALCON_END,4,2    ## @NVKM_SECBOOT_FALCON_END
	.comm	_NON_SECURE,4,2                 ## @NON_SECURE
	.no_dead_strip	_acr_r352_shutdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acr_r352_shutdown
_acr_r352_shutdown:                     ; @acr_r352_shutdown
	.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	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	w8, [x19]
	cbz	w8, LBB0_5
; %bb.2:
	add	x21, x19, #16
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_nvkm_debug
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x1, [x20, #8]
	ldr	w2, [x19, #4]
	mov	x0, x19
	blr	x8
	mov	x2, x0
	tbnz	w0, #31, LBB0_9
; %bb.3:
	cmp	w2, #0
	ccmp	w2, #29, #4, ne
	b.ne	LBB0_10
; %bb.4:
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_nvkm_debug
LBB0_5:
Lloh4:
	adrp	x8, _NVKM_SECBOOT_FALCON_END@GOTPAGE
Lloh5:
	ldr	x8, [x8, _NVKM_SECBOOT_FALCON_END@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x9, #0
	ldr	x10, [x20]
Lloh6:
	adrp	x11, _NON_SECURE@GOTPAGE
Lloh7:
	ldr	x11, [x11, _NON_SECURE@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11]
	str	w12, [x10, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x12, [x8]
	cmp	x9, x12
	b.lt	LBB0_7
LBB0_8:
	mov	w2, #0
	str	wzr, [x19]
LBB0_9:
	mov	x0, x2
	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
LBB0_10:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_nvkm_error
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w2, w8
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"running HS unload blob\n"

l_.str.1:                               ; @.str.1
	.asciz	"HS unload failed, ret 0x%08x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"HS unload blob completed\n"

	.comm	_NVKM_SECBOOT_FALCON_END,4,2    ; @NVKM_SECBOOT_FALCON_END
	.comm	_NON_SECURE,4,2                 ; @NON_SECURE
	.no_dead_strip	_acr_r352_shutdown
.subsections_via_symbols
