	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_in_dtd
_add_in_dtd:                            ## @add_in_dtd
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	32(%rdi), %rax
	movq	40(%rdi), %r14
	movq	_Q_DATA_SRC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	movq	_port_data@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movslq	%esi, %r13
	movq	%r13, %rdx
	shlq	$4, %rdx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rcx,%rdx), %rcx
	movq	(%rax,%rcx,8), %r15
	movq	%r15, %rdi
	callq	_to_vb2_v4l2_buffer
	leaq	(%rbx,%rbx,2), %rbx
	shlq	$4, %rbx
	movq	40(%r14,%rbx), %rdx
	movl	(%rax), %eax
	movq	_V4L2_FIELD_BOTTOM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	sete	%r11b
	movq	_VPE_PORT_MV_IN@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_vpdma_misc_fmts@GOTPCREL(%rip), %rax
	movq	_VPDMA_DATA_FMT_MV@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$2, %rcx
	addq	(%rax), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movslq	(%r12), %rax
	movq	8(%r12), %rcx
	movl	(%rcx,%rax,4), %r9d
	movl	20(%r14,%rbx), %r13d
	movq	%r12, %rdi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-64(%rbp), %r8                  ## 8-byte Reload
LBB0_17:
	movq	_Q_DATA_FRAME_1D@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r13d, %eax
	je	LBB0_19
## %bb.18:
	movq	_VPDMA_DATA_FRAME_1D@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_19:
	movq	_Q_DATA_MODE_TILED@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r13d
	je	LBB0_21
## %bb.20:
	movq	_VPDMA_DATA_MODE_TILED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
LBB0_21:
	orl	%eax, %r13d
	movzbl	%r11b, %r10d
	leaq	(%r14,%rbx), %rcx
	addq	$28, %rcx
	movl	28(%r14,%rbx), %r11d
	movl	32(%r14,%rbx), %eax
	cmpl	$0, 8(%r15,%r8)
	je	LBB0_24
## %bb.22:
	movq	(%rdx), %rdx
	movq	_V4L2_PIX_FMT_NV12@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_24
## %bb.23:
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	sarl	%edx
	movl	%edx, %eax
LBB0_24:
	addq	$20, %rdi
	movl	24(%r14,%rbx), %esi
	movq	8(%r14,%rbx), %rdx
	movq	_VPE_LUMA@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rbx
	movl	(%rdx,%rbx,4), %edx
	movl	12(%r15,%r8), %r14d
	subq	$8, %rsp
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	pushq	$0
	pushq	$0
	pushq	%rax
	pushq	%r11
	pushq	%r13
	pushq	%r10
	pushq	%r14
	callq	_vpdma_add_in_dtd
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r15, %rdi
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	cmpq	$0, 16(%rdx)
	je	LBB0_3
## %bb.4:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	8(%r15,%rax), %esi
	jmp	LBB0_5
LBB0_3:
	xorl	%esi, %esi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_5:
	movq	8(%rdx), %rax
	movslq	%esi, %rcx
	movq	(%rax,%rcx,8), %r12
	cmpl	$1, (%r14,%rbx)
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	jne	LBB0_8
## %bb.6:
	testl	%esi, %esi
	je	LBB0_8
## %bb.7:
	movl	%r11d, %r13d
	xorl	%esi, %esi
	callq	_vb2_dma_contig_plane_dma_addr
	movl	%r13d, %r11d
	movq	8(%r14,%rbx), %rcx
	movl	16(%r14,%rbx), %r9d
	imull	(%rcx), %r9d
	jmp	LBB0_9
LBB0_8:
	movl	%r11d, %r13d
	callq	_vb2_dma_contig_plane_dma_addr
	movl	%r13d, %r11d
	xorl	%r9d, %r9d
LBB0_9:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	testl	%eax, %eax
	je	LBB0_25
## %bb.10:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	addl	%eax, %r9d
	movl	20(%r14,%rbx), %r13d
	movq	_Q_DATA_INTERLACED_SEQ_TB@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_11
## %bb.12:
	leaq	(%r15,%r8), %rax
	movl	16(%rdi), %ecx
	addl	(%rax), %ecx
	testb	$1, %cl
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	jne	LBB0_14
## %bb.13:
	xorl	%r11d, %r11d
	jmp	LBB0_17
LBB0_25:
	movl	24(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vpe_err                        ## TAILCALL
LBB0_11:
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_14:
	movl	16(%r14,%rbx), %eax
	movq	%rdx, %r10
	movq	(%rdx), %rdx
	movq	_V4L2_PIX_FMT_NV12@GOTPCREL(%rip), %rsi
	movl	$1, %ecx
	cmpq	(%rsi), %rdx
	je	LBB0_16
## %bb.15:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %ecx
	sarl	$3, %ecx
LBB0_16:
	xorl	%edx, %edx
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	setne	%dl
	leal	(%rdx,%rdx), %esi
	addl	$2, %esi
	cltd
	idivl	%esi
	imull	%ecx, %eax
	imull	24(%r14,%rbx), %eax
	addl	%eax, %r9d
	movb	$1, %r11b
	movq	%r10, %rdx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_Q_DATA_SRC,8,3                 ## @Q_DATA_SRC
	.comm	_port_data,8,3                  ## @port_data
	.comm	_V4L2_FIELD_BOTTOM,4,2          ## @V4L2_FIELD_BOTTOM
	.comm	_VPE_PORT_MV_IN,4,2             ## @VPE_PORT_MV_IN
	.comm	_vpdma_misc_fmts,8,3            ## @vpdma_misc_fmts
	.comm	_VPDMA_DATA_FMT_MV,8,3          ## @VPDMA_DATA_FMT_MV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"acquiring output buffer(%d) dma_addr failed\n"

	.comm	_Q_DATA_INTERLACED_SEQ_TB,4,2   ## @Q_DATA_INTERLACED_SEQ_TB
	.comm	_V4L2_PIX_FMT_NV12,8,3          ## @V4L2_PIX_FMT_NV12
	.comm	_Q_DATA_FRAME_1D,4,2            ## @Q_DATA_FRAME_1D
	.comm	_VPDMA_DATA_FRAME_1D,4,2        ## @VPDMA_DATA_FRAME_1D
	.comm	_Q_DATA_MODE_TILED,4,2          ## @Q_DATA_MODE_TILED
	.comm	_VPDMA_DATA_MODE_TILED,4,2      ## @VPDMA_DATA_MODE_TILED
	.comm	_VPE_LUMA,8,3                   ## @VPE_LUMA
	.no_dead_strip	_add_in_dtd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_in_dtd
_add_in_dtd:                            ; @add_in_dtd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _Q_DATA_SRC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Q_DATA_SRC@GOTPAGEOFF]
Lloh2:
	ldr	x25, [x8]
Lloh3:
	adrp	x8, _port_data@GOTPAGE
Lloh4:
	ldr	x8, [x8, _port_data@GOTPAGEOFF]
Lloh5:
	ldr	x27, [x8]
	sxtw	x23, w22
	ldp	x8, x26, [x0, #32]
	add	x28, x27, w1, sxtw #4
	ldr	x9, [x28]
	ldr	x24, [x8, x9, lsl #3]
	mov	x0, x24
	bl	_to_vb2_v4l2_buffer
	mov	w8, #48
	madd	x8, x25, x8, x26
	ldr	x20, [x8, #40]
	ldr	w8, [x0]
Lloh6:
	adrp	x9, _V4L2_FIELD_BOTTOM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_FIELD_BOTTOM@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w7, eq
Lloh9:
	adrp	x8, _VPE_PORT_MV_IN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VPE_PORT_MV_IN@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_2
; %bb.1:
Lloh12:
	adrp	x8, _vpdma_misc_fmts@GOTPAGE
Lloh13:
	ldr	x8, [x8, _vpdma_misc_fmts@GOTPAGEOFF]
	ldrsw	x9, [x19]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x10, _VPDMA_DATA_FMT_MV@GOTPAGE
Lloh16:
	ldr	x10, [x10, _VPDMA_DATA_FMT_MV@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	add	x4, x8, x10, lsl #2
	ldr	x8, [x19, #8]
	ldr	w5, [x8, x9, lsl #2]
	mov	w8, #48
	madd	x8, x25, x8, x26
	ldr	w8, [x8, #20]
	b	LBB0_18
LBB0_2:
	ldr	x8, [x20, #16]
	str	x23, [sp, #24]                  ; 8-byte Folded Spill
	str	w7, [sp, #20]                   ; 4-byte Folded Spill
	cbz	x8, LBB0_4
; %bb.3:
	add	x8, x27, x23, lsl #4
	ldr	w23, [x8, #8]
	b	LBB0_5
LBB0_4:
	mov	w23, #0
LBB0_5:
	ldr	x8, [x20, #8]
	ldr	x21, [x8, w23, sxtw #3]
	mov	w8, #48
	mul	x8, x25, x8
	ldr	w8, [x26, x8]
	cmp	w8, #1
	mov	x0, x24
	ccmp	w23, #0, #4, eq
	b.ne	LBB0_10
; %bb.6:
	mov	x1, x23
	bl	_vb2_dma_contig_plane_dma_addr
	mov	w8, #0
	cbz	w0, LBB0_11
LBB0_7:
	add	w5, w8, w0
	mov	w8, #48
	madd	x8, x25, x8, x26
	ldr	w8, [x8, #20]
Lloh18:
	adrp	x9, _Q_DATA_INTERLACED_SEQ_TB@GOTPAGE
Lloh19:
	ldr	x9, [x9, _Q_DATA_INTERLACED_SEQ_TB@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.8:
	ldr	w9, [x28]
	ldr	w10, [x19, #16]
	add	w9, w10, w9
	mov	x4, x21
	tbnz	w9, #0, LBB0_13
; %bb.9:
	mov	w7, #0
	b	LBB0_17
LBB0_10:
	mov	w1, #0
	bl	_vb2_dma_contig_plane_dma_addr
	mov	w8, #48
	madd	x8, x25, x8, x26
	ldr	x9, [x8, #8]
	ldr	w9, [x9]
	ldr	w8, [x8, #16]
	mul	w8, w8, w9
	cbnz	w0, LBB0_7
LBB0_11:
	ldr	w0, [x19, #24]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_vpe_err
LBB0_12:
	ldr	x23, [sp, #24]                  ; 8-byte Folded Reload
	mov	x4, x21
	ldr	w7, [sp, #20]                   ; 4-byte Folded Reload
	b	LBB0_18
LBB0_13:
	mov	w9, #48
	madd	x9, x25, x9, x26
	ldr	w9, [x9, #16]
	ldr	x10, [x20]
Lloh23:
	adrp	x11, _V4L2_PIX_FMT_NV12@GOTPAGE
Lloh24:
	ldr	x11, [x11, _V4L2_PIX_FMT_NV12@GOTPAGEOFF]
Lloh25:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_15
; %bb.14:
	mov	w10, #1
	b	LBB0_16
LBB0_15:
	ldr	w10, [x4]
	asr	w10, w10, #3
LBB0_16:
	mov	w11, #2
	mov	w12, #4
	cmp	w23, #0
	csel	w11, w12, w11, ne
	sdiv	w9, w9, w11
	mov	w11, #48
	madd	x11, x25, x11, x26
	ldr	w11, [x11, #24]
	mul	w9, w9, w10
	madd	w5, w9, w11, w5
	mov	w7, #1
LBB0_17:
	ldr	x23, [sp, #24]                  ; 8-byte Folded Reload
LBB0_18:
Lloh26:
	adrp	x9, _Q_DATA_FRAME_1D@GOTPAGE
Lloh27:
	ldr	x9, [x9, _Q_DATA_FRAME_1D@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
Lloh29:
	adrp	x10, _VPDMA_DATA_FRAME_1D@GOTPAGE
Lloh30:
	ldr	x10, [x10, _VPDMA_DATA_FRAME_1D@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w9, wzr, w10, eq
Lloh32:
	adrp	x10, _Q_DATA_MODE_TILED@GOTPAGE
Lloh33:
	ldr	x10, [x10, _Q_DATA_MODE_TILED@GOTPAGEOFF]
Lloh34:
	adrp	x11, _VPDMA_DATA_MODE_TILED@GOTPAGE
Lloh35:
	ldr	x11, [x11, _VPDMA_DATA_MODE_TILED@GOTPAGEOFF]
Lloh36:
	ldr	w10, [x10]
Lloh37:
	ldr	w11, [x11]
	tst	w10, w8
	csel	w8, wzr, w11, eq
	orr	w8, w8, w9
	mov	w9, #48
	madd	x3, x25, x9, x26
	ldp	w9, w10, [x3, #28]!
	add	x11, x27, x23, lsl #4
	ldr	w12, [x11, #8]
	cbz	w12, LBB0_20
; %bb.19:
	ldr	x12, [x20]
Lloh38:
	adrp	x13, _V4L2_PIX_FMT_NV12@GOTPAGE
Lloh39:
	ldr	x13, [x13, _V4L2_PIX_FMT_NV12@GOTPAGEOFF]
Lloh40:
	ldr	x13, [x13]
	cmp	w10, #0
	cinc	w14, w10, lt
	asr	w14, w14, #1
	cmp	x12, x13
	csel	w10, w10, w14, ne
LBB0_20:
	add	x0, x19, #20
	mov	w12, #48
	madd	x12, x25, x12, x26
	ldr	w1, [x12, #24]
	ldr	x12, [x12, #8]
Lloh41:
	adrp	x13, _VPE_LUMA@GOTPAGE
Lloh42:
	ldr	x13, [x13, _VPE_LUMA@GOTPAGEOFF]
Lloh43:
	ldr	x13, [x13]
	ldr	w2, [x12, x13, lsl #2]
	ldr	w6, [x11, #12]
	stur	xzr, [sp, #12]
	stp	w9, w10, [sp, #4]
	str	w8, [sp]
	bl	_vpdma_add_in_dtd
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh36
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_Q_DATA_SRC,8,3                 ; @Q_DATA_SRC
	.comm	_port_data,8,3                  ; @port_data
	.comm	_V4L2_FIELD_BOTTOM,4,2          ; @V4L2_FIELD_BOTTOM
	.comm	_VPE_PORT_MV_IN,4,2             ; @VPE_PORT_MV_IN
	.comm	_vpdma_misc_fmts,8,3            ; @vpdma_misc_fmts
	.comm	_VPDMA_DATA_FMT_MV,8,3          ; @VPDMA_DATA_FMT_MV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"acquiring output buffer(%d) dma_addr failed\n"

	.comm	_Q_DATA_INTERLACED_SEQ_TB,4,2   ; @Q_DATA_INTERLACED_SEQ_TB
	.comm	_V4L2_PIX_FMT_NV12,8,3          ; @V4L2_PIX_FMT_NV12
	.comm	_Q_DATA_FRAME_1D,4,2            ; @Q_DATA_FRAME_1D
	.comm	_VPDMA_DATA_FRAME_1D,4,2        ; @VPDMA_DATA_FRAME_1D
	.comm	_Q_DATA_MODE_TILED,4,2          ; @Q_DATA_MODE_TILED
	.comm	_VPDMA_DATA_MODE_TILED,4,2      ; @VPDMA_DATA_MODE_TILED
	.comm	_VPE_LUMA,8,3                   ; @VPE_LUMA
	.no_dead_strip	_add_in_dtd
.subsections_via_symbols
