	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5p_mfc_queue_setup
_s5p_mfc_queue_setup:                   ## @s5p_mfc_queue_setup
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r13
	movl	4(%rdi), %edi
	callq	_fh_to_ctx
	movq	%rax, %rbx
	movq	(%rax), %rsi
	movq	24(%rax), %rdi
	movq	_MFCINST_INIT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_11
## %bb.1:
	movl	(%r13), %eax
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.2:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	$1, (%r14)
	movl	(%r12), %edx
	testl	%edx, %edx
	jne	LBB0_4
## %bb.3:
	movl	$1, (%r12)
	movl	$1, %edx
	jmp	LBB0_4
LBB0_11:
	movq	_MFCINST_HEAD_PARSED@GOTPCREL(%rip), %rax
	movl	(%r13), %edx
	cmpq	(%rax), %rsi
	jne	LBB0_18
## %bb.12:
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_18
## %bb.13:
	movl	$2, (%r14)
	movl	(%r12), %ecx
	movl	8(%rbx), %edx
	cmpl	%edx, %ecx
	jae	LBB0_14
## %bb.15:
	movl	%edx, (%r12)
	movl	8(%rbx), %eax
	jmp	LBB0_16
LBB0_18:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_mfc_err
	jmp	LBB0_23
LBB0_14:
	movl	%edx, %eax
	movl	%ecx, %edx
LBB0_16:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	_MFC_MAX_EXTRA_DPB@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	cmpl	%eax, %edx
	jbe	LBB0_4
## %bb.17:
	movl	%eax, (%r12)
	movl	%eax, %edx
LBB0_4:
	movq	_MFC_MAX_BUFFERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jbe	LBB0_6
## %bb.5:
	movl	%eax, (%r12)
	movl	%eax, %edx
LBB0_6:
	movl	(%r14), %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	$2, %edi
	callq	_mfc_debug
	movq	(%rbx), %rax
	movq	_MFCINST_HEAD_PARSED@GOTPCREL(%rip), %rdx
	movl	(%r13), %ecx
	cmpq	(%rdx), %rax
	jne	LBB0_19
## %bb.7:
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_19
## %bb.8:
	movl	12(%rbx), %eax
	movl	%eax, (%r15)
	movl	16(%rbx), %eax
	movl	%eax, 4(%r15)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_IS_MFCV6_PLUS
	movq	24(%rbx), %rcx
	movq	(%rcx), %rdx
	movq	_BANK_L_CTX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, %rsi
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	_BANK_R_CTX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
LBB0_10:
	movq	(%rdx,%rsi,8), %rax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, (%rdx)
	movq	24(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax,%rcx,8), %rax
	movq	%rax, 8(%rdx)
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_19:
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_22
## %bb.20:
	movq	_MFCINST_INIT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_22
## %bb.21:
	movl	20(%rbx), %eax
	movl	%eax, (%r15)
	movq	24(%rbx), %rax
	movq	(%rax), %rax
	movq	_BANK_L_CTX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_22:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_mfc_err
LBB0_23:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_24:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MFCINST_INIT,8,3               ## @MFCINST_INIT
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_MFC_MAX_BUFFERS,4,2            ## @MFC_MAX_BUFFERS
	.comm	_MFCINST_HEAD_PARSED,8,3        ## @MFCINST_HEAD_PARSED
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_MFC_MAX_EXTRA_DPB,4,2          ## @MFC_MAX_EXTRA_DPB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"State seems invalid. State = %d, vq->type = %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Buffer count=%d, plane count=%d\n"

	.comm	_BANK_L_CTX,8,3                 ## @BANK_L_CTX
	.comm	_BANK_R_CTX,8,3                 ## @BANK_R_CTX
L_.str.2:                               ## @.str.2
	.asciz	"This video node is dedicated to decoding. Decoding not initialized\n"

	.no_dead_strip	_s5p_mfc_queue_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5p_mfc_queue_setup
_s5p_mfc_queue_setup:                   ; @s5p_mfc_queue_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x21, x3
	mov	x24, x2
	mov	x25, x1
	mov	x23, x0
	ldr	w0, [x0, #4]
	bl	_fh_to_ctx
	mov	x20, x0
	ldr	x22, [x0, #24]
	ldr	x8, [x0]
Lloh0:
	adrp	x26, _MFCINST_INIT@GOTPAGE
Lloh1:
	ldr	x26, [x26, _MFCINST_INIT@GOTPAGEOFF]
	ldr	x9, [x26]
Lloh2:
	adrp	x28, _MFCINST_HEAD_PARSED@GOTPAGE
Lloh3:
	ldr	x28, [x28, _MFCINST_HEAD_PARSED@GOTPAGEOFF]
Lloh4:
	adrp	x27, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGE
Lloh5:
	ldr	x27, [x27, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	w9, [x23]
Lloh6:
	adrp	x10, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_4
; %bb.2:
	mov	w8, #1
	str	w8, [x24]
	ldr	w2, [x25]
	cbnz	w2, LBB0_11
; %bb.3:
	str	w8, [x25]
	mov	w2, #1
	b	LBB0_11
LBB0_4:
	ldr	x10, [x28]
	ldr	w9, [x23]
	ldr	w11, [x27]
	cmp	x8, x10
	ccmp	w9, w11, #0, eq
	b.eq	LBB0_6
; %bb.5:
	stp	x8, x9, [sp]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_19
LBB0_6:
	mov	w8, #2
	str	w8, [x24]
	ldr	w9, [x25]
	ldr	w2, [x20, #8]
	cmp	w9, w2
	b.hs	LBB0_8
; %bb.7:
	str	w2, [x25]
	ldr	w8, [x20, #8]
	b	LBB0_9
LBB0_8:
	mov	x8, x2
	mov	x2, x9
LBB0_9:
Lloh11:
	adrp	x9, _MFC_MAX_EXTRA_DPB@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MFC_MAX_EXTRA_DPB@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	add	w8, w9, w8
	cmp	w2, w8
	b.ls	LBB0_11
; %bb.10:
	str	w8, [x25]
	mov	x2, x8
LBB0_11:
Lloh14:
	adrp	x8, _MFC_MAX_BUFFERS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MFC_MAX_BUFFERS@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ls	LBB0_13
; %bb.12:
	str	w8, [x25]
	mov	x2, x8
LBB0_13:
	ldr	w3, [x24]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #2
	bl	_mfc_debug
	ldr	x8, [x20]
	ldr	x10, [x28]
	ldr	w9, [x23]
	ldr	w11, [x27]
	cmp	x8, x10
	ccmp	w9, w11, #0, eq
	b.eq	LBB0_17
; %bb.14:
Lloh19:
	adrp	x10, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh20:
	ldr	x10, [x10, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_18
; %bb.15:
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.16:
	mov	w0, #0
	ldr	w8, [x20, #20]
	str	w8, [x21]
	ldr	x8, [x20, #24]
	ldr	x8, [x8]
Lloh22:
	adrp	x9, _BANK_L_CTX@GOTPAGE
Lloh23:
	ldr	x9, [x9, _BANK_L_CTX@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	str	x8, [x19]
	b	LBB0_20
LBB0_17:
	ldr	w8, [x20, #12]
	str	w8, [x21]
	ldr	w8, [x20, #16]
	str	w8, [x21, #4]
	mov	x0, x22
	bl	_IS_MFCV6_PLUS
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x20, #24]
	ldr	x9, [x9]
Lloh25:
	adrp	x10, _BANK_R_CTX@GOTPAGE
Lloh26:
	ldr	x10, [x10, _BANK_R_CTX@GOTPAGEOFF]
Lloh27:
	adrp	x11, _BANK_L_CTX@GOTPAGE
Lloh28:
	ldr	x11, [x11, _BANK_L_CTX@GOTPAGEOFF]
Lloh29:
	ldr	x10, [x10]
Lloh30:
	ldr	x11, [x11]
	cmp	x8, #0
	csel	x8, x10, x11, eq
	ldr	x8, [x9, x8, lsl #3]
	str	x8, [x19]
	ldr	x8, [x20, #24]
	ldr	x8, [x8]
	ldr	x8, [x8, x11, lsl #3]
	str	x8, [x19, #8]
	b	LBB0_20
LBB0_18:
Lloh31:
	adrp	x0, l_.str.2@PAGE
Lloh32:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_19:
	bl	_mfc_err
Lloh33:
	adrp	x8, _EINVAL@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh29
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_MFCINST_INIT,8,3               ; @MFCINST_INIT
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_MFC_MAX_BUFFERS,4,2            ; @MFC_MAX_BUFFERS
	.comm	_MFCINST_HEAD_PARSED,8,3        ; @MFCINST_HEAD_PARSED
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_MFC_MAX_EXTRA_DPB,4,2          ; @MFC_MAX_EXTRA_DPB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"State seems invalid. State = %d, vq->type = %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Buffer count=%d, plane count=%d\n"

	.comm	_BANK_L_CTX,8,3                 ; @BANK_L_CTX
	.comm	_BANK_R_CTX,8,3                 ; @BANK_R_CTX
l_.str.2:                               ; @.str.2
	.asciz	"This video node is dedicated to decoding. Decoding not initialized\n"

	.no_dead_strip	_s5p_mfc_queue_setup
.subsections_via_symbols
