	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function camif_prepare_addr
_camif_prepare_addr:                    ## @camif_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_1
## %bb.2:
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	12(%rdi), %r15d
	imull	8(%rdi), %r15d
	movq	(%rdi), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_pr_debug
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_vb2_dma_contig_plane_dma_addr
	movl	%eax, 8(%r14)
	movq	(%rbx), %rcx
	movl	(%rcx), %edx
	cmpl	$3, %edx
	je	LBB0_6
## %bb.3:
	cmpl	$2, %edx
	je	LBB0_8
## %bb.4:
	cmpl	$1, %edx
	jne	LBB0_1
## %bb.5:
	movq	$0, (%r14)
	jmp	LBB0_9
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_8:
	addl	%r15d, %eax
	movl	%eax, (%r14)
	movl	$0, 4(%r14)
	jmp	LBB0_9
LBB0_6:
	addl	%r15d, %eax
	movl	%eax, (%r14)
	movl	4(%rcx), %edx
	movq	_IMG_FMT_YCBCR422P@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	sete	%bl
	movb	$2, %cl
	subb	%bl, %cl
	sarl	%cl, %r15d
	addl	%eax, %r15d
	movl	%r15d, 4(%r14)
	movq	_IMG_FMT_YCRCB420@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	jne	LBB0_9
## %bb.7:
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_swap
LBB0_9:
	leaq	8(%r14), %rsi
	leaq	4(%r14), %rcx
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_pr_debug
LBB0_10:
	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	"colplanes: %d, pix_size: %u\n"

	.comm	_IMG_FMT_YCBCR422P,4,2          ## @IMG_FMT_YCBCR422P
	.comm	_IMG_FMT_YCRCB420,4,2           ## @IMG_FMT_YCRCB420
L_.str.1:                               ## @.str.1
	.asciz	"DMA address: y: %pad  cb: %pad cr: %pad\n"

	.no_dead_strip	_camif_prepare_addr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function camif_prepare_addr
_camif_prepare_addr:                    ; @camif_prepare_addr
	.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
	cbz	x1, LBB0_5
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldp	w8, w9, [x0, #8]
	mul	w22, w9, w8
	ldr	x8, [x0]
	ldr	w1, [x8]
	str	x22, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	mov	x0, x20
	mov	w1, #0
	bl	_vb2_dma_contig_plane_dma_addr
	mov	x20, x19
	str	w0, [x20, #8]!
	ldr	x8, [x21]
	ldr	w9, [x8]
	cmp	w9, #3
	b.eq	LBB0_7
; %bb.2:
	cmp	w9, #2
	b.eq	LBB0_6
; %bb.3:
	cmp	w9, #1
	b.ne	LBB0_5
; %bb.4:
	str	xzr, [x19]
	b	LBB0_9
LBB0_5:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_6:
	add	w8, w0, w22
	stp	w8, wzr, [x19]
	b	LBB0_9
LBB0_7:
	add	w0, w0, w22
	str	w0, [x19]
Lloh5:
	adrp	x9, _IMG_FMT_YCBCR422P@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IMG_FMT_YCBCR422P@GOTPAGEOFF]
	ldr	w8, [x8, #4]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	mov	w9, #1
	cinc	w9, w9, ne
	asr	w9, w22, w9
	add	w1, w0, w9
	str	w1, [x19, #4]
Lloh8:
	adrp	x9, _IMG_FMT_YCRCB420@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IMG_FMT_YCRCB420@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.8:
	bl	_swap
LBB0_9:
	add	x8, x19, #4
	stp	x19, x8, [sp]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_pr_debug
	mov	w0, #0
LBB0_10:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"colplanes: %d, pix_size: %u\n"

	.comm	_IMG_FMT_YCBCR422P,4,2          ; @IMG_FMT_YCBCR422P
	.comm	_IMG_FMT_YCRCB420,4,2           ; @IMG_FMT_YCRCB420
l_.str.1:                               ; @.str.1
	.asciz	"DMA address: y: %pad  cb: %pad cr: %pad\n"

	.no_dead_strip	_camif_prepare_addr
.subsections_via_symbols
