	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5p_mfc_close_inst_cmd_v5
_s5p_mfc_close_inst_cmd_v5:             ## @s5p_mfc_close_inst_cmd_v5
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_MFCINST_FREE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_4
LBB0_2:
	movq	16(%r14), %r15
	movl	8(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	$2, %edi
	callq	_mfc_debug
	movl	12(%r14), %eax
	movl	%eax, (%r15)
	leaq	-40(%rbp), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	8(%r14), %eax
	movq	-40(%rbp), %rcx
	movl	%eax, (%rcx)
	movq	_S5P_FIMV_H2R_CMD_CLOSE_INSTANCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_s5p_mfc_cmd_host2risc_v5
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
LBB0_4:
	callq	_mfc_err
	movq	_MFCINST_ERROR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MFCINST_FREE,8,3               ## @MFCINST_FREE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Instance already returned\n"

	.comm	_MFCINST_ERROR,8,3              ## @MFCINST_ERROR
	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Returning instance number %d\n"

	.comm	_S5P_FIMV_H2R_CMD_CLOSE_INSTANCE,4,2 ## @S5P_FIMV_H2R_CMD_CLOSE_INSTANCE
L_.str.2:                               ## @.str.2
	.asciz	"Failed to return an instance\n"

	.no_dead_strip	_s5p_mfc_close_inst_cmd_v5
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5p_mfc_close_inst_cmd_v5
_s5p_mfc_close_inst_cmd_v5:             ; @s5p_mfc_close_inst_cmd_v5
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MFCINST_FREE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MFCINST_FREE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	x20, [x19, #16]
	ldr	w2, [x19, #8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #2
	bl	_mfc_debug
	ldr	w8, [x19, #12]
	str	w8, [x20]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	w8, [x19, #8]
	ldr	x9, [sp, #8]
	str	w8, [x9]
Lloh7:
	adrp	x8, _S5P_FIMV_H2R_CMD_CLOSE_INSTANCE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _S5P_FIMV_H2R_CMD_CLOSE_INSTANCE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_s5p_mfc_cmd_host2risc_v5
	cbz	w0, LBB0_5
; %bb.3:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_4:
	bl	_mfc_err
Lloh12:
	adrp	x8, _MFCINST_ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MFCINST_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MFCINST_FREE,8,3               ; @MFCINST_FREE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Instance already returned\n"

	.comm	_MFCINST_ERROR,8,3              ; @MFCINST_ERROR
	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Returning instance number %d\n"

	.comm	_S5P_FIMV_H2R_CMD_CLOSE_INSTANCE,4,2 ; @S5P_FIMV_H2R_CMD_CLOSE_INSTANCE
l_.str.2:                               ; @.str.2
	.asciz	"Failed to return an instance\n"

	.no_dead_strip	_s5p_mfc_close_inst_cmd_v5
.subsections_via_symbols
