	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acr_r367_ls_ucode_img_load     ## -- Begin function acr_r367_ls_ucode_img_load
	.p2align	4, 0x90
_acr_r367_ls_ucode_img_load:            ## @acr_r367_ls_ucode_img_load
	.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
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movl	%edx, %r13d
	movq	(%rax,%r13,8), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movq	%rax, %rbx
	movl	%r14d, (%rax)
	movl	16(%r15), %esi
	movq	%r12, %rdi
	movq	%rax, %rdx
	callq	*(%r15)
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movq	8(%r15), %rax
	movl	%r12d, %ecx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 28(%rbx)
	cmpl	$4, 4(%rbx)
	jne	LBB0_7
## %bb.8:
	movq	%rbx, %rdi
	addq	$24, %rdi
	movq	8(%rbx), %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	%r14d, 24(%rbx)
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	movq	16(%rbx), %rdi
	callq	_kfree
	movq	8(%rbx), %rdi
	callq	_kfree
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r12d, %edi
	jmp	LBB0_3
LBB0_7:
	movq	_nvkm_secboot_falcon_name@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r13,4), %edx
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_nvkm_error
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid signature size for %s falcon!\n"

	.comm	_nvkm_secboot_falcon_name,8,3   ## @nvkm_secboot_falcon_name
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acr_r367_ls_ucode_img_load     ; -- Begin function acr_r367_ls_ucode_img_load
	.p2align	2
_acr_r367_ls_ucode_img_load:            ; @acr_r367_ls_ucode_img_load
	.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	x19, x2
	mov	x22, x1
	ldp	x8, x21, [x0]
	ldr	x8, [x8]
	ldr	x23, [x8, w2, uxtw #3]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	str	w19, [x0]
	ldr	x8, [x23]
	ldr	w1, [x23, #16]
	mov	x0, x22
	mov	x2, x20
	blr	x8
	mov	x22, x0
	tbnz	w0, #31, LBB0_5
; %bb.2:
	ldr	x8, [x23, #8]
	ldr	w8, [x8, w22, uxtw #2]
	str	w8, [x20, #28]
	ldr	w8, [x20, #4]
	cmp	w8, #4
	b.ne	LBB0_6
; %bb.3:
	add	x0, x20, #24
	ldr	x1, [x20, #8]
	mov	w2, #4
	bl	_memcpy
	str	w19, [x20, #24]
	mov	x0, x20
	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
LBB0_4:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	ldr	x0, [x20, #16]
	bl	_kfree
	ldr	x0, [x20, #8]
	bl	_kfree
	mov	x0, x20
	bl	_kfree
	mov	x0, x22
	b	LBB0_8
LBB0_6:
	mov	w8, w19
Lloh5:
	adrp	x9, _nvkm_secboot_falcon_name@GOTPAGE
Lloh6:
	ldr	x9, [x9, _nvkm_secboot_falcon_name@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ldr	w2, [x9, x8, lsl #2]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_nvkm_error
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	b	_ERR_PTR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid signature size for %s falcon!\n"

	.comm	_nvkm_secboot_falcon_name,8,3   ; @nvkm_secboot_falcon_name
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
