	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_vdi_set_field_order        ## -- Begin function ipu_vdi_set_field_order
	.p2align	4, 0x90
_ipu_vdi_set_field_order:               ## @ipu_vdi_set_field_order
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	addl	$-128, %edx
	cmpl	$6, %edx
	jae	LBB0_1
## %bb.2:
	movl	$52, %eax
	btl	%edx, %eax
	setb	%r15b
	jmp	LBB0_3
LBB0_1:
	movq	_V4L2_STD_525_60@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	sete	%r15b
LBB0_3:
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_VDI_C@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_ipu_vdi_read
	movq	_VDI_C_TOP_FIELD_MAN_1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_VDI_C_TOP_FIELD_AUTO_1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testb	%r15b, %r15b
	je	LBB0_4
## %bb.5:
	orl	%eax, %edx
	orl	%ecx, %edx
	movl	%edx, %eax
	jmp	LBB0_6
LBB0_4:
	orl	%edx, %ecx
	notl	%ecx
	andl	%ecx, %eax
LBB0_6:
	movl	(%r14), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ipu_vdi_write
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_STD_525_60,4,2            ## @V4L2_STD_525_60
	.comm	_VDI_C,4,2                      ## @VDI_C
	.comm	_VDI_C_TOP_FIELD_MAN_1,4,2      ## @VDI_C_TOP_FIELD_MAN_1
	.comm	_VDI_C_TOP_FIELD_AUTO_1,4,2     ## @VDI_C_TOP_FIELD_AUTO_1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_vdi_set_field_order        ; -- Begin function ipu_vdi_set_field_order
	.p2align	2
_ipu_vdi_set_field_order:               ; @ipu_vdi_set_field_order
	.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	x19, x0
	sub	w8, w2, #128
	cmp	w8, #6
	b.hs	LBB0_2
; %bb.1:
	mov	w9, #52
	lsr	w8, w9, w8
	and	w20, w8, #0x1
	b	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _V4L2_STD_525_60@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_STD_525_60@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w1
	cset	w20, eq
LBB0_3:
	mov	x0, x19
	bl	_spin_lock_irqsave
Lloh3:
	adrp	x21, _VDI_C@GOTPAGE
Lloh4:
	ldr	x21, [x21, _VDI_C@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_ipu_vdi_read
Lloh5:
	adrp	x8, _VDI_C_TOP_FIELD_MAN_1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VDI_C_TOP_FIELD_MAN_1@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _VDI_C_TOP_FIELD_AUTO_1@GOTPAGE
Lloh9:
	ldr	x9, [x9, _VDI_C_TOP_FIELD_AUTO_1@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w10, w8, w0
	orr	w10, w10, w9
	orr	w8, w9, w8
	bic	w8, w0, w8
	tst	w20, #0x1
	csel	w1, w10, w8, ne
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_STD_525_60,4,2            ; @V4L2_STD_525_60
	.comm	_VDI_C,4,2                      ; @VDI_C
	.comm	_VDI_C_TOP_FIELD_MAN_1,4,2      ; @VDI_C_TOP_FIELD_MAN_1
	.comm	_VDI_C_TOP_FIELD_AUTO_1,4,2     ; @VDI_C_TOP_FIELD_AUTO_1
.subsections_via_symbols
