	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s5p_mfc_alloc_firmware         ## -- Begin function s5p_mfc_alloc_firmware
	.p2align	4, 0x90
_s5p_mfc_alloc_firmware:                ## @s5p_mfc_alloc_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rdi)
	cmpq	$0, (%rdi)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_mfc_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_2:
	movq	_BANK_L_CTX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdi, %rdx
	callq	_s5p_mfc_alloc_priv_buf
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_mfc_err
	jmp	LBB0_5
LBB0_3:
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attempting to allocate firmware when it seems that it is already loaded\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BANK_L_CTX,4,2                 ## @BANK_L_CTX
L_.str.1:                               ## @.str.1
	.asciz	"Allocating bitprocessor buffer failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s5p_mfc_alloc_firmware         ; -- Begin function s5p_mfc_alloc_firmware
	.p2align	2
_s5p_mfc_alloc_firmware:                ; @s5p_mfc_alloc_firmware
	.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	x8, [x0, #16]
	ldr	x8, [x8]
	ldr	w8, [x8]
	str	w8, [x0, #8]
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_mfc_err
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_4
LBB0_2:
Lloh5:
	adrp	x8, _BANK_L_CTX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BANK_L_CTX@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x2, x0
	bl	_s5p_mfc_alloc_priv_buf
	mov	x19, x0
	cbz	w0, LBB0_4
; %bb.3:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_mfc_err
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attempting to allocate firmware when it seems that it is already loaded\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BANK_L_CTX,4,2                 ; @BANK_L_CTX
l_.str.1:                               ; @.str.1
	.asciz	"Allocating bitprocessor buffer failed\n"

.subsections_via_symbols
