	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipu_csi_set_bt_interlaced_codes
_ipu_csi_set_bt_interlaced_codes:       ## @ipu_csi_set_bt_interlaced_codes
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, %r14
	movq	%rdi, %r15
	movl	(%rsi), %edi
	movl	%ecx, %esi
	callq	_ipu_csi_translate_field
	movl	%eax, %r12d
	movl	(%r14), %edi
	movl	%ebx, %esi
	callq	_ipu_csi_translate_field
	movl	%eax, %r13d
	movl	%r12d, %edi
	callq	_V4L2_FIELD_IS_SEQUENTIAL
	movl	$853983, %r14d                  ## imm = 0xD07DF
	movl	$263574, %ebx                   ## imm = 0x40596
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movl	%r13d, %edi
	callq	_V4L2_FIELD_IS_SEQUENTIAL
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	cmpl	%r13d, %r12d
	je	LBB0_4
## %bb.3:
	movq	(%r15), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movl	$263574, %r14d                  ## imm = 0x40596
	movl	$853983, %ebx                   ## imm = 0xD07DF
LBB0_4:
	movq	_CSI_CCIR_ERR_DET_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_CSI_CCIR_CODE_1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_ipu_csi_write
	movq	_CSI_CCIR_CODE_2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_ipu_csi_write
	movq	_CSI_CCIR_CODE_3@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$16711680, %esi                 ## imm = 0xFF0000
	callq	_ipu_csi_write
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CSI_CCIR_ERR_DET_EN,4,2        ## @CSI_CCIR_ERR_DET_EN
	.comm	_CSI_CCIR_CODE_1,4,2            ## @CSI_CCIR_CODE_1
	.comm	_CSI_CCIR_CODE_2,4,2            ## @CSI_CCIR_CODE_2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"capture field swap\n"

	.comm	_CSI_CCIR_CODE_3,4,2            ## @CSI_CCIR_CODE_3
	.no_dead_strip	_ipu_csi_set_bt_interlaced_codes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipu_csi_set_bt_interlaced_codes
_ipu_csi_set_bt_interlaced_codes:       ; @ipu_csi_set_bt_interlaced_codes
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x3
	mov	x23, x2
	mov	x19, x0
	mov	w20, #1430
	movk	w20, #4, lsl #16
	ldr	w0, [x1]
	mov	x1, x3
	bl	_ipu_csi_translate_field
	mov	x21, x0
	ldr	w0, [x23]
	mov	x1, x22
	bl	_ipu_csi_translate_field
	mov	x22, x0
	mov	x0, x21
	bl	_V4L2_FIELD_IS_SEQUENTIAL
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_V4L2_FIELD_IS_SEQUENTIAL
	cmp	x0, #0
	ccmp	w21, w22, #4, ne
	b.ne	LBB0_3
LBB0_2:
	mov	w8, #1430
	movk	w8, #4, lsl #16
	mov	w20, #2015
	movk	w20, #13, lsl #16
	b	LBB0_4
LBB0_3:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	w8, #2015
	movk	w8, #13, lsl #16
LBB0_4:
Lloh2:
	adrp	x9, _CSI_CCIR_ERR_DET_EN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CSI_CCIR_ERR_DET_EN@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh5:
	adrp	x8, _CSI_CCIR_CODE_1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CSI_CCIR_CODE_1@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ipu_csi_write
Lloh8:
	adrp	x8, _CSI_CCIR_CODE_2@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CSI_CCIR_CODE_2@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_ipu_csi_write
Lloh11:
	adrp	x8, _CSI_CCIR_CODE_3@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CSI_CCIR_CODE_3@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #16711680
	bl	_ipu_csi_write
	mov	w0, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_CSI_CCIR_ERR_DET_EN,4,2        ; @CSI_CCIR_ERR_DET_EN
	.comm	_CSI_CCIR_CODE_1,4,2            ; @CSI_CCIR_CODE_1
	.comm	_CSI_CCIR_CODE_2,4,2            ; @CSI_CCIR_CODE_2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"capture field swap\n"

	.comm	_CSI_CCIR_CODE_3,4,2            ; @CSI_CCIR_CODE_3
	.no_dead_strip	_ipu_csi_set_bt_interlaced_codes
.subsections_via_symbols
