	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fdp1_buf_prepare_field
_fdp1_buf_prepare_field:                ## @fdp1_buf_prepare_field
	.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
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_to_fdp1_buffer
	movq	(%rax), %r13
	movl	%ebx, %r15d
	movl	(%r12), %edi
	callq	_V4L2_FIELD_HAS_BOTH
	movq	%r13, %r8
	cmpq	$1, %rax
	movl	$2, %eax
	sbbl	$0, %eax
	shlq	$5, %r15
	movq	%r12, 24(%r13,%r15)
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	leal	1(%rbx), %ecx
	xorl	%edx, %edx
	cmpl	%eax, %ecx
	sete	%dl
	movl	%edx, (%r13,%r15)
	leaq	4(%r12), %r13
	cmpl	$0, 4(%r12)
	je	LBB0_4
## %bb.1:
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	addq	%r8, %r15
	addq	$8, %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_vb2_dma_contig_plane_dma_addr
	movq	(%r15), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	movl	(%r13), %eax
	cmpq	%rax, %rbx
	jb	LBB0_2
## %bb.3:
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_4:
	xorl	%eax, %eax
LBB0_5:
	movl	(%r12), %edx
	leal	-128(%rdx), %ecx
	movl	%edx, %esi
	cmpl	$4, %ecx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	ja	LBB0_15
## %bb.6:
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%rcx,4), %rdi
	addq	%rsi, %rdi
	jmpq	*%rdi
LBB0_7:
	testl	%ebx, %ebx
	jne	LBB0_13
LBB0_12:
	movq	_V4L2_FIELD_TOP@GOTPCREL(%rip), %rsi
	jmp	LBB0_14
LBB0_9:
	testl	%ebx, %ebx
	jne	LBB0_12
LBB0_13:
	movq	_V4L2_FIELD_BOTTOM@GOTPCREL(%rip), %rsi
LBB0_14:
	movl	(%rsi), %esi
LBB0_15:
	movl	%esi, 16(%r8,%r15)
	testl	%ebx, %ebx
	je	LBB0_24
## %bb.16:
	addl	$-130, %edx
	cmpl	$3, %edx
	jae	LBB0_20
## %bb.17:
	testl	%eax, %eax
	je	LBB0_24
## %bb.18:
	movq	8(%r8,%r15), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	xorl	%edx, %edx
	testq	%rcx, %rcx
	setne	%dl
	movl	(%r14,%rdx,4), %edx
	addl	%edx, (%rax,%rcx,4)
	incq	%rcx
	movl	(%r13), %edx
	cmpq	%rdx, %rcx
	jb	LBB0_19
	jmp	LBB0_24
LBB0_20:
	cmpl	$2, %ecx
	jae	LBB0_24
## %bb.21:
	testl	%eax, %eax
	je	LBB0_24
## %bb.22:
	movq	8(%r8,%r15), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	xorl	%edx, %edx
	testq	%rcx, %rcx
	setne	%dl
	movl	(%r14,%rdx,4), %edx
	imull	8(%r14), %edx
	addl	%edx, (%rax,%rcx,4)
	incq	%rcx
	movl	(%r13), %edx
	cmpq	%rdx, %rcx
	jb	LBB0_23
LBB0_24:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%esi, %esi
	cmpl	$576, 12(%r14)                  ## imm = 0x240
	setl	%sil
	cmpl	%ebx, %esi
	jne	LBB0_13
	jmp	LBB0_12
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_9
	.long	L0_0_set_7
	.long	L0_0_set_9
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_V4L2_FIELD_TOP,8,3             ## @V4L2_FIELD_TOP
	.comm	_V4L2_FIELD_BOTTOM,8,3          ## @V4L2_FIELD_BOTTOM
	.no_dead_strip	_fdp1_buf_prepare_field
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fdp1_buf_prepare_field
_fdp1_buf_prepare_field:                ; @fdp1_buf_prepare_field
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	mov	x0, x1
	bl	_to_fdp1_buffer
	ldr	x24, [x0]
	mov	w25, w21
	ldr	w0, [x22]
	bl	_V4L2_FIELD_HAS_BOTH
	cmp	x0, #0
	mov	w8, #1
	cinc	w9, w8, ne
	add	x8, x24, x25, lsl #5
	str	x22, [x8, #24]
	add	w10, w21, #1
	cmp	w10, w9
	cset	w9, eq
	str	w9, [x8]
	mov	x20, x22
	ldr	w9, [x20, #4]!
	cbz	w9, LBB0_3
; %bb.1:
	mov	x23, #0
	add	x26, x8, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_vb2_dma_contig_plane_dma_addr
	ldr	x8, [x26]
	str	w0, [x8, x23, lsl #2]
	add	x23, x23, #1
	ldr	w8, [x20]
	cmp	x23, x8
	b.lo	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	w8, #0
LBB0_4:
	ldr	w10, [x22]
	sub	w9, w10, #128
	cmp	w9, #4
	b.hi	LBB0_20
; %bb.5:
Lloh0:
	adrp	x11, lJTI0_0@PAGE
Lloh1:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_6
	ldrb	w13, [x11, x9]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_6:
Lloh2:
	adrp	x11, _V4L2_FIELD_BOTTOM@GOTPAGE
Lloh3:
	ldr	x11, [x11, _V4L2_FIELD_BOTTOM@GOTPAGEOFF]
Lloh4:
	adrp	x12, _V4L2_FIELD_TOP@GOTPAGE
Lloh5:
	ldr	x12, [x12, _V4L2_FIELD_TOP@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh6:
	adrp	x11, _V4L2_FIELD_TOP@GOTPAGE
Lloh7:
	ldr	x11, [x11, _V4L2_FIELD_TOP@GOTPAGEOFF]
Lloh8:
	adrp	x12, _V4L2_FIELD_BOTTOM@GOTPAGE
Lloh9:
	ldr	x12, [x12, _V4L2_FIELD_BOTTOM@GOTPAGEOFF]
LBB0_8:
	cmp	w21, #0
	csel	x11, x12, x11, eq
LBB0_9:
	ldr	w11, [x11]
LBB0_10:
	add	x12, x24, x25, lsl #5
	str	w11, [x12, #16]
	cbz	w21, LBB0_19
; %bb.11:
	sub	w10, w10, #130
	cmp	w10, #3
	b.hs	LBB0_15
; %bb.12:
	cbz	w8, LBB0_19
; %bb.13:
	mov	x8, #0
	add	x9, x24, x25, lsl #5
	ldr	x9, [x9, #8]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	cmp	x8, #0
	cset	w10, ne
	ldr	w10, [x19, w10, uxtw #2]
	lsl	x11, x8, #2
	ldr	w12, [x9, x11]
	add	w10, w12, w10
	str	w10, [x9, x11]
	add	x8, x8, #1
	ldr	w10, [x20]
	cmp	x8, x10
	b.lo	LBB0_14
	b	LBB0_19
LBB0_15:
	cmp	w9, #2
	b.hs	LBB0_19
; %bb.16:
	cbz	w8, LBB0_19
; %bb.17:
	mov	x8, #0
	add	x9, x24, x25, lsl #5
	ldr	x9, [x9, #8]
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x19, #8]
	cmp	x8, #0
	cset	w11, ne
	ldr	w11, [x19, w11, uxtw #2]
	lsl	x12, x8, #2
	ldr	w13, [x9, x12]
	madd	w10, w11, w10, w13
	str	w10, [x9, x12]
	add	x8, x8, #1
	ldr	w10, [x20]
	cmp	x8, x10
	b.lo	LBB0_18
LBB0_19:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_20:
	mov	x11, x10
	b	LBB0_10
LBB0_21:
	ldr	w11, [x19, #12]
	cmp	w11, #576
Lloh10:
	adrp	x11, _V4L2_FIELD_TOP@GOTPAGE
Lloh11:
	ldr	x11, [x11, _V4L2_FIELD_TOP@GOTPAGEOFF]
	cset	w12, lt
Lloh12:
	adrp	x13, _V4L2_FIELD_BOTTOM@GOTPAGE
Lloh13:
	ldr	x13, [x13, _V4L2_FIELD_BOTTOM@GOTPAGEOFF]
	cmp	w12, w21
	csel	x11, x11, x13, eq
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_7-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_7-LBB0_6)>>2
	.byte	(LBB0_21-LBB0_6)>>2
                                        ; -- End function
	.comm	_V4L2_FIELD_TOP,8,3             ; @V4L2_FIELD_TOP
	.comm	_V4L2_FIELD_BOTTOM,8,3          ; @V4L2_FIELD_BOTTOM
	.no_dead_strip	_fdp1_buf_prepare_field
.subsections_via_symbols
