	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gsc_prepare_addr               ## -- Begin function gsc_prepare_addr
	.p2align	4, 0x90
_gsc_prepare_addr:                      ## @gsc_prepare_addr
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%rdx, %rbx
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.3:
	movq	%rcx, %r14
	movq	%rsi, %r12
	movslq	(%rbx), %rax
	movslq	4(%rbx), %r15
	imulq	%rax, %r15
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edx
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_pr_debug
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_vb2_dma_contig_plane_dma_addr
	movq	%rax, 16(%r14)
	movq	8(%rbx), %rcx
	movl	(%rcx), %edx
	cmpl	$1, %edx
	jne	LBB0_14
## %bb.4:
	movl	4(%rcx), %edx
	cmpl	$3, %edx
	je	LBB0_9
## %bb.5:
	cmpl	$2, %edx
	je	LBB0_8
## %bb.6:
	cmpl	$1, %edx
	jne	LBB0_13
## %bb.7:
	movl	$0, (%r14)
	movq	$0, 8(%r14)
	jmp	LBB0_17
LBB0_14:
	jle	LBB0_17
## %bb.15:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_vb2_dma_contig_plane_dma_addr
	movl	%eax, (%r14)
	movq	8(%rbx), %rcx
	cmpl	$3, (%rcx)
	jne	LBB0_17
## %bb.16:
	movq	%r12, %rdi
	movl	$2, %esi
	callq	_vb2_dma_contig_plane_dma_addr
	movq	%rax, 8(%r14)
	movq	8(%rbx), %rcx
	jmp	LBB0_17
LBB0_8:
	addl	%r15d, %eax
	movl	%eax, (%r14)
	movq	$0, 8(%r14)
	jmp	LBB0_17
LBB0_9:
	addl	%r15d, %eax
	movl	%eax, (%r14)
	movq	_GSC_YUV420@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	16(%rcx), %edx
	jne	LBB0_12
## %bb.10:
	sarl	$2, %r15d
	jmp	LBB0_11
LBB0_13:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_12:
	sarl	%r15d
LBB0_11:
	addl	%eax, %r15d
	movslq	%r15d, %rax
	movq	%rax, 8(%r14)
LBB0_17:
	leaq	16(%r14), %r15
	movq	8(%rcx), %rax
	movq	_V4L2_PIX_FMT_VYUY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_21
## %bb.18:
	movq	_V4L2_PIX_FMT_YVYU@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_21
## %bb.19:
	movq	_V4L2_PIX_FMT_YVU420@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_21
## %bb.20:
	movq	_V4L2_PIX_FMT_YVU420M@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_22
LBB0_21:
	movl	(%r14), %edi
	movq	8(%r14), %rsi
	callq	_swap
LBB0_22:
	leaq	8(%r14), %rcx
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r15d, %esi
	movq	%r14, %rdx
	xorl	%r8d, %r8d
	xorl	%eax, %eax
	callq	_pr_debug
LBB0_23:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"num_planes= %d, num_comp= %d, pix_size= %d"

	.comm	_GSC_YUV420,4,2                 ## @GSC_YUV420
L_.str.1:                               ## @.str.1
	.asciz	"Invalid the number of color planes"

	.comm	_V4L2_PIX_FMT_VYUY,8,3          ## @V4L2_PIX_FMT_VYUY
	.comm	_V4L2_PIX_FMT_YVYU,8,3          ## @V4L2_PIX_FMT_YVYU
	.comm	_V4L2_PIX_FMT_YVU420,8,3        ## @V4L2_PIX_FMT_YVU420
	.comm	_V4L2_PIX_FMT_YVU420M,8,3       ## @V4L2_PIX_FMT_YVU420M
L_.str.2:                               ## @.str.2
	.asciz	"ADDR: y= %pad  cb= %pad cr= %pad ret= %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gsc_prepare_addr               ; -- Begin function gsc_prepare_addr
	.p2align	2
_gsc_prepare_addr:                      ; @gsc_prepare_addr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	cbz	x1, LBB0_14
; %bb.1:
	mov	x21, x2
	cbz	x2, LBB0_14
; %bb.2:
	mov	x19, x3
	mov	x22, x1
	ldpsw	x8, x9, [x21]
	mul	x23, x9, x8
	ldr	x8, [x21, #8]
	ldp	w1, w8, [x8]
	stp	x8, x23, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	mov	x0, x22
	mov	w1, #0
	bl	_vb2_dma_contig_plane_dma_addr
	mov	x20, x19
	str	x0, [x20, #16]!
	ldr	x8, [x21, #8]
	ldr	w9, [x8]
	cmp	w9, #1
	b.ne	LBB0_7
; %bb.3:
	ldr	w9, [x8, #4]
	cmp	w9, #3
	b.eq	LBB0_11
; %bb.4:
	cmp	w9, #2
	b.eq	LBB0_10
; %bb.5:
	cmp	w9, #1
	b.ne	LBB0_13
; %bb.6:
	str	wzr, [x19]
	str	xzr, [x19, #8]
	b	LBB0_17
LBB0_7:
	cmp	w9, #2
	b.lt	LBB0_17
; %bb.8:
	mov	x0, x22
	mov	w1, #1
	bl	_vb2_dma_contig_plane_dma_addr
	str	w0, [x19]
	ldr	x8, [x21, #8]
	ldr	w9, [x8]
	cmp	w9, #3
	b.ne	LBB0_17
; %bb.9:
	mov	x0, x22
	mov	w1, #2
	bl	_vb2_dma_contig_plane_dma_addr
	str	x0, [x19, #8]
	ldr	x8, [x21, #8]
	b	LBB0_17
LBB0_10:
	add	w9, w0, w23
	str	w9, [x19]
	str	xzr, [x19, #8]
	b	LBB0_17
LBB0_11:
	add	w9, w0, w23
	str	w9, [x19]
Lloh2:
	adrp	x10, _GSC_YUV420@GOTPAGE
Lloh3:
	ldr	x10, [x10, _GSC_YUV420@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	ldr	w11, [x8, #16]
	cmp	w10, w11
	b.ne	LBB0_15
; %bb.12:
	add	w9, w9, w23, asr #2
	b	LBB0_16
LBB0_13:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
LBB0_14:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_20
LBB0_15:
	add	w9, w9, w23, asr #1
LBB0_16:
	sxtw	x9, w9
	str	x9, [x19, #8]
LBB0_17:
	ldr	x8, [x8, #8]
Lloh10:
	adrp	x9, _V4L2_PIX_FMT_VYUY@GOTPAGE
Lloh11:
	ldr	x9, [x9, _V4L2_PIX_FMT_VYUY@GOTPAGEOFF]
Lloh12:
	adrp	x10, _V4L2_PIX_FMT_YVYU@GOTPAGE
Lloh13:
	ldr	x10, [x10, _V4L2_PIX_FMT_YVYU@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
Lloh15:
	ldr	x10, [x10]
Lloh16:
	adrp	x11, _V4L2_PIX_FMT_YVU420@GOTPAGE
Lloh17:
	ldr	x11, [x11, _V4L2_PIX_FMT_YVU420@GOTPAGEOFF]
Lloh18:
	adrp	x12, _V4L2_PIX_FMT_YVU420M@GOTPAGE
Lloh19:
	ldr	x12, [x12, _V4L2_PIX_FMT_YVU420M@GOTPAGEOFF]
Lloh20:
	ldr	x11, [x11]
Lloh21:
	ldr	x12, [x12]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	ccmp	x8, x12, #4, ne
	b.ne	LBB0_19
; %bb.18:
	ldr	w0, [x19]
	ldr	x1, [x19, #8]
	bl	_swap
LBB0_19:
	add	x8, x19, #8
	stp	x8, xzr, [sp, #8]
	str	x19, [sp]
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_pr_debug
	mov	w0, #0
LBB0_20:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"num_planes= %d, num_comp= %d, pix_size= %d"

	.comm	_GSC_YUV420,4,2                 ; @GSC_YUV420
l_.str.1:                               ; @.str.1
	.asciz	"Invalid the number of color planes"

	.comm	_V4L2_PIX_FMT_VYUY,8,3          ; @V4L2_PIX_FMT_VYUY
	.comm	_V4L2_PIX_FMT_YVYU,8,3          ; @V4L2_PIX_FMT_YVYU
	.comm	_V4L2_PIX_FMT_YVU420,8,3        ; @V4L2_PIX_FMT_YVU420
	.comm	_V4L2_PIX_FMT_YVU420M,8,3       ; @V4L2_PIX_FMT_YVU420M
l_.str.2:                               ; @.str.2
	.asciz	"ADDR: y= %pad  cb= %pad cr= %pad ret= %d"

.subsections_via_symbols
