	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_vdi_setup                  ## -- Begin function ipu_vdi_setup
	.p2align	4, 0x90
_ipu_vdi_setup:                         ## @ipu_vdi_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_spin_lock_irqsave
	shll	$16, %ebx
	addl	$-65536, %ebx                   ## imm = 0xFFFF0000
	decl	%r12d
	orl	%ebx, %r12d
	movslq	%r12d, %rsi
	movq	_VDI_FSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_ipu_vdi_write
	movq	_MEDIA_BUS_FMT_UYVY8_2X8@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_MEDIA_BUS_FMT_UYVY8_1X16@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_MEDIA_BUS_FMT_YUYV8_2X8@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdi
	movq	_MEDIA_BUS_FMT_YUYV8_1X16@GOTPCREL(%rip), %rbx
	movq	_VDI_C_CH_422@GOTPCREL(%rip), %rdx
	movq	%rdx, %rsi
	cmpq	%r15, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	_VDI_C_CH_420@GOTPCREL(%rip), %rsi
LBB0_2:
	cmpq	%r15, %rdi
	cmoveq	%rdx, %rsi
	cmpq	%r15, %rcx
	cmoveq	%rdx, %rsi
	cmpq	%r15, %rax
	cmoveq	%rdx, %rsi
	movq	(%rsi), %rbx
	movq	_VDI_C@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_ipu_vdi_read
	movq	_VDI_C_BURST_SIZE2_4@GOTPCREL(%rip), %rcx
	movq	_VDI_C_BURST_SIZE1_4@GOTPCREL(%rip), %rdx
	movq	_VDI_C_VWM1_CLR_2@GOTPCREL(%rip), %rsi
	movq	_VDI_C_BURST_SIZE3_4@GOTPCREL(%rip), %rdi
	orq	%rax, %rbx
	orq	(%rcx), %rbx
	orq	(%rdx), %rbx
	orq	(%rsi), %rbx
	orq	(%rdi), %rbx
	movq	_VDI_C_VWM3_CLR_2@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movl	(%r15), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ipu_vdi_write
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VDI_FSIZE,4,2                  ## @VDI_FSIZE
	.comm	_MEDIA_BUS_FMT_UYVY8_2X8,8,3    ## @MEDIA_BUS_FMT_UYVY8_2X8
	.comm	_MEDIA_BUS_FMT_UYVY8_1X16,8,3   ## @MEDIA_BUS_FMT_UYVY8_1X16
	.comm	_MEDIA_BUS_FMT_YUYV8_2X8,8,3    ## @MEDIA_BUS_FMT_YUYV8_2X8
	.comm	_MEDIA_BUS_FMT_YUYV8_1X16,8,3   ## @MEDIA_BUS_FMT_YUYV8_1X16
	.comm	_VDI_C_CH_422,8,3               ## @VDI_C_CH_422
	.comm	_VDI_C_CH_420,8,3               ## @VDI_C_CH_420
	.comm	_VDI_C,4,2                      ## @VDI_C
	.comm	_VDI_C_BURST_SIZE2_4,8,3        ## @VDI_C_BURST_SIZE2_4
	.comm	_VDI_C_BURST_SIZE1_4,8,3        ## @VDI_C_BURST_SIZE1_4
	.comm	_VDI_C_VWM1_CLR_2,8,3           ## @VDI_C_VWM1_CLR_2
	.comm	_VDI_C_BURST_SIZE3_4,8,3        ## @VDI_C_BURST_SIZE3_4
	.comm	_VDI_C_VWM3_CLR_2,8,3           ## @VDI_C_VWM3_CLR_2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_vdi_setup                  ; -- Begin function ipu_vdi_setup
	.p2align	2
_ipu_vdi_setup:                         ; @ipu_vdi_setup
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_spin_lock_irqsave
	lsl	w8, w20, #16
	sub	w8, w8, #16, lsl #12            ; =65536
	sub	w9, w21, #1
	orr	w8, w8, w9
	sxtw	x1, w8
Lloh0:
	adrp	x8, _VDI_FSIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VDI_FSIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ipu_vdi_write
Lloh3:
	adrp	x8, _MEDIA_BUS_FMT_UYVY8_2X8@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MEDIA_BUS_FMT_UYVY8_2X8@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _MEDIA_BUS_FMT_UYVY8_1X16@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MEDIA_BUS_FMT_UYVY8_1X16@GOTPAGEOFF]
Lloh8:
	adrp	x10, _MEDIA_BUS_FMT_YUYV8_2X8@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MEDIA_BUS_FMT_YUYV8_2X8@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	ldr	x10, [x10]
Lloh12:
	adrp	x11, _MEDIA_BUS_FMT_YUYV8_1X16@GOTPAGE
Lloh13:
	ldr	x11, [x11, _MEDIA_BUS_FMT_YUYV8_1X16@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x11]
	cmp	x11, x22
	ccmp	x10, x22, #4, ne
	ccmp	x9, x22, #4, ne
Lloh15:
	adrp	x9, _VDI_C_CH_422@GOTPAGE
Lloh16:
	ldr	x9, [x9, _VDI_C_CH_422@GOTPAGEOFF]
Lloh17:
	adrp	x10, _VDI_C_CH_420@GOTPAGE
Lloh18:
	ldr	x10, [x10, _VDI_C_CH_420@GOTPAGEOFF]
	ccmp	x8, x22, #4, ne
	csel	x8, x9, x10, eq
	ldr	x20, [x8]
Lloh19:
	adrp	x21, _VDI_C@GOTPAGE
Lloh20:
	ldr	x21, [x21, _VDI_C@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_ipu_vdi_read
Lloh21:
	adrp	x8, _VDI_C_BURST_SIZE2_4@GOTPAGE
Lloh22:
	ldr	x8, [x8, _VDI_C_BURST_SIZE2_4@GOTPAGEOFF]
Lloh23:
	adrp	x9, _VDI_C_BURST_SIZE1_4@GOTPAGE
Lloh24:
	ldr	x9, [x9, _VDI_C_BURST_SIZE1_4@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
Lloh26:
	ldr	x9, [x9]
Lloh27:
	adrp	x10, _VDI_C_VWM1_CLR_2@GOTPAGE
Lloh28:
	ldr	x10, [x10, _VDI_C_VWM1_CLR_2@GOTPAGEOFF]
Lloh29:
	adrp	x11, _VDI_C_BURST_SIZE3_4@GOTPAGE
Lloh30:
	ldr	x11, [x11, _VDI_C_BURST_SIZE3_4@GOTPAGEOFF]
Lloh31:
	ldr	x10, [x10]
Lloh32:
	ldr	x11, [x11]
Lloh33:
	adrp	x12, _VDI_C_VWM3_CLR_2@GOTPAGE
Lloh34:
	ldr	x12, [x12, _VDI_C_VWM3_CLR_2@GOTPAGEOFF]
Lloh35:
	ldr	x12, [x12]
	orr	x13, x0, x20
	orr	x8, x13, x8
	orr	x8, x8, x9
	orr	x8, x8, x10
	orr	x8, x8, x11
	orr	x1, x8, x12
	ldr	w2, [x21]
	mov	x0, x19
	bl	_ipu_vdi_write
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh31
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh25
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VDI_FSIZE,4,2                  ; @VDI_FSIZE
	.comm	_MEDIA_BUS_FMT_UYVY8_2X8,8,3    ; @MEDIA_BUS_FMT_UYVY8_2X8
	.comm	_MEDIA_BUS_FMT_UYVY8_1X16,8,3   ; @MEDIA_BUS_FMT_UYVY8_1X16
	.comm	_MEDIA_BUS_FMT_YUYV8_2X8,8,3    ; @MEDIA_BUS_FMT_YUYV8_2X8
	.comm	_MEDIA_BUS_FMT_YUYV8_1X16,8,3   ; @MEDIA_BUS_FMT_YUYV8_1X16
	.comm	_VDI_C_CH_422,8,3               ; @VDI_C_CH_422
	.comm	_VDI_C_CH_420,8,3               ; @VDI_C_CH_420
	.comm	_VDI_C,4,2                      ; @VDI_C
	.comm	_VDI_C_BURST_SIZE2_4,8,3        ; @VDI_C_BURST_SIZE2_4
	.comm	_VDI_C_BURST_SIZE1_4,8,3        ; @VDI_C_BURST_SIZE1_4
	.comm	_VDI_C_VWM1_CLR_2,8,3           ; @VDI_C_VWM1_CLR_2
	.comm	_VDI_C_BURST_SIZE3_4,8,3        ; @VDI_C_BURST_SIZE3_4
	.comm	_VDI_C_VWM3_CLR_2,8,3           ; @VDI_C_VWM3_CLR_2
.subsections_via_symbols
