	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acr_r352_load_blobs            ## -- Begin function acr_r352_load_blobs
	.p2align	4, 0x90
_acr_r352_load_blobs:                   ## @acr_r352_load_blobs
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%eax, %eax
	cmpl	$0, (%rdi)
	jne	LBB0_14
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_acr_r352_prepare_ls_blob
	testl	%eax, %eax
	jne	LBB0_14
## %bb.2:
	cmpl	$0, 44(%rbx)
	je	LBB0_3
LBB0_4:
	cmpq	$0, (%r14)
	je	LBB0_5
LBB0_6:
	addq	$8, %r14
	cmpq	$0, 8(%rbx)
	je	LBB0_7
LBB0_13:
	movl	$1, (%rbx)
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_nvkm_debug
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_3:
	leaq	44(%rbx), %rcx
	leaq	40(%rbx), %r8
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$1, %r9d
	callq	_acr_r352_prepare_hs_blob
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_4
LBB0_5:
	leaq	36(%rbx), %rcx
	leaq	32(%rbx), %r8
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%r9d, %r9d
	callq	_acr_r352_prepare_hs_blob
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_6
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_nvkm_acr_load_firmware
	movq	%rax, 8(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	8(%rbx), %rdi
	callq	_PTR_ERR
	movq	$0, 8(%rbx)
LBB0_14:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	movq	24(%rbx), %rax
	movq	_NVKM_SECBOOT_FALCON_PMU@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.12:
	movq	8(%rbx), %rax
	movq	%rax, 16(%rbx)
	jmp	LBB0_13
LBB0_10:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_nvkm_acr_load_firmware
	movq	%rax, 16(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	16(%rbx), %rdi
	callq	_PTR_ERR
	movq	$0, 16(%rbx)
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"acr/ucode_load"

L_.str.1:                               ## @.str.1
	.asciz	"acr/ucode_unload"

L_.str.2:                               ## @.str.2
	.asciz	"acr/bl"

	.comm	_NVKM_SECBOOT_FALCON_PMU,8,3    ## @NVKM_SECBOOT_FALCON_PMU
L_.str.3:                               ## @.str.3
	.asciz	"acr/unload_bl"

L_.str.4:                               ## @.str.4
	.asciz	"LS blob successfully created\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acr_r352_load_blobs            ; -- Begin function acr_r352_load_blobs
	.p2align	2
_acr_r352_load_blobs:                   ; @acr_r352_load_blobs
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0]
	cbz	w8, LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	mov	x20, x1
	mov	x19, x0
	bl	_acr_r352_prepare_ls_blob
	cbz	w0, LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x3, x19
	ldr	w8, [x3, #44]!
	cbz	w8, LBB0_8
LBB0_5:
	ldr	x8, [x20]
	cbz	x8, LBB0_9
LBB0_6:
	add	x20, x20, #8
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_10
LBB0_7:
	mov	w8, #1
	str	w8, [x19]
Lloh0:
	adrp	x1, l_.str.4@PAGE
Lloh1:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_nvkm_debug
	b	LBB0_1
LBB0_8:
	add	x4, x19, #40
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	mov	w5, #1
	bl	_acr_r352_prepare_hs_blob
	cbnz	w0, LBB0_3
	b	LBB0_5
LBB0_9:
	add	x3, x19, #36
	add	x4, x19, #32
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	mov	w5, #0
	bl	_acr_r352_prepare_hs_blob
	cbnz	w0, LBB0_3
	b	LBB0_6
LBB0_10:
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	w2, #0
	bl	_nvkm_acr_load_firmware
	str	x0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.11:
	ldr	x0, [x19, #8]
	bl	_PTR_ERR
	str	xzr, [x19, #8]
	b	LBB0_3
LBB0_12:
	ldr	x8, [x19, #24]
Lloh8:
	adrp	x9, _NVKM_SECBOOT_FALCON_PMU@GOTPAGE
Lloh9:
	ldr	x9, [x9, _NVKM_SECBOOT_FALCON_PMU@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.13:
	ldr	x8, [x19, #8]
	str	x8, [x19, #16]
	b	LBB0_7
LBB0_14:
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	w2, #0
	bl	_nvkm_acr_load_firmware
	str	x0, [x19, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.15:
	ldr	x0, [x19, #16]
	bl	_PTR_ERR
	str	xzr, [x19, #16]
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"acr/ucode_load"

l_.str.1:                               ; @.str.1
	.asciz	"acr/ucode_unload"

l_.str.2:                               ; @.str.2
	.asciz	"acr/bl"

	.comm	_NVKM_SECBOOT_FALCON_PMU,8,3    ; @NVKM_SECBOOT_FALCON_PMU
l_.str.3:                               ; @.str.3
	.asciz	"acr/unload_bl"

l_.str.4:                               ; @.str.4
	.asciz	"LS blob successfully created\n"

.subsections_via_symbols
