	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s5p_mfc_load_firmware          ## -- Begin function s5p_mfc_load_firmware
	.p2align	4, 0x90
_s5p_mfc_load_firmware:                 ## @s5p_mfc_load_firmware
	.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, %r14
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_mfc_debug_enter
	cmpl	$0, (%r14)
	jne	LBB0_12
## %bb.1:
	negl	%r13d
	movq	_MFC_FW_MAX_VERSIONS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	testl	%r12d, %r12d
	jle	LBB0_9
## %bb.2:
	leaq	-48(%rbp), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	1(%rbx), %rax
	movq	%rbx, %r12
	cmpq	$1, %rax
	jbe	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-1(%r12), %rbx
	movq	32(%r14), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	movl	(%rax,%rcx,4), %esi
	testl	%esi, %esi
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	24(%r14), %rdx
	movq	%r15, %rdi
	callq	_request_firmware
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	decl	%r12d
	movl	%r12d, 4(%r14)
	jmp	LBB0_6
LBB0_9:
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.10:
	leaq	L_.str(%rip), %rdi
	callq	_mfc_err
	xorl	%r15d, %r15d
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_12
LBB0_6:
	movq	-48(%rbp), %rax
	movq	(%rax), %rdx
	cmpq	8(%r14), %rdx
	jle	LBB0_11
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	callq	_mfc_err
	movq	-48(%rbp), %rdi
	callq	_release_firmware
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_12
LBB0_11:
	movl	16(%r14), %edi
	movl	8(%rax), %esi
	callq	_memcpy
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_wmb
	movl	$1, (%r14)
	movq	-48(%rbp), %rdi
	callq	_release_firmware
	xorl	%eax, %eax
	callq	_mfc_debug_leave
LBB0_12:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MFC_FW_MAX_VERSIONS,4,2        ## @MFC_FW_MAX_VERSIONS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Firmware is not present in the /lib/firmware directory nor compiled in kernel\n"

L_.str.1:                               ## @.str.1
	.asciz	"MFC firmware is too big to be loaded\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s5p_mfc_load_firmware          ; -- Begin function s5p_mfc_load_firmware
	.p2align	2
_s5p_mfc_load_firmware:                 ; @s5p_mfc_load_firmware
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _EINVAL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _EINVAL@GOTPAGEOFF]
	ldr	w21, [x20]
	bl	_mfc_debug_enter
	ldr	w8, [x19]
	cbz	w8, LBB0_3
LBB0_1:
	mov	w0, #0
LBB0_2:
	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
	add	sp, sp, #64
	ret
LBB0_3:
	neg	w0, w21
Lloh2:
	adrp	x8, _MFC_FW_MAX_VERSIONS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MFC_FW_MAX_VERSIONS@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
	cmp	w21, #1
	b.ge	LBB0_7
LBB0_4:
	cbz	w0, LBB0_10
; %bb.5:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_mfc_err
	ldr	w8, [x20]
	neg	w0, w8
	b	LBB0_2
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x8, x22, #1
	mov	x21, x22
	cmp	x8, #1
	b.ls	LBB0_4
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	sub	x22, x21, #1
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	ldr	w1, [x8, w22, uxtw #2]
	cbz	w1, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x2, [x19, #24]
	add	x0, sp, #8
	bl	_request_firmware
	cbnz	w0, LBB0_6
; %bb.9:
	sub	w8, w21, #1
	str	w8, [x19, #4]
LBB0_10:
	ldr	x8, [sp, #8]
	ldr	x2, [x8]
	ldr	x9, [x19, #8]
	cmp	x2, x9
	b.le	LBB0_12
; %bb.11:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_mfc_err
	ldr	x0, [sp, #8]
	bl	_release_firmware
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_2
LBB0_12:
	ldr	w0, [x19, #16]
	ldr	w1, [x8, #8]
	bl	_memcpy
	bl	_wmb
	mov	w8, #1
	str	w8, [x19]
	ldr	x0, [sp, #8]
	bl	_release_firmware
	bl	_mfc_debug_leave
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MFC_FW_MAX_VERSIONS,4,2        ; @MFC_FW_MAX_VERSIONS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Firmware is not present in the /lib/firmware directory nor compiled in kernel\n"

l_.str.1:                               ; @.str.1
	.asciz	"MFC firmware is too big to be loaded\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
