	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv7180_set_field_mode
_adv7180_set_field_mode:                ## @adv7180_set_field_mode
	.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
	movq	8(%rdi), %rax
	movl	(%rax), %eax
	movq	_ADV7180_FLAG_I2P@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	xorl	%ecx, %ecx
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	cmpq	%rdx, %rdi
	setne	%r15b
	sete	%r14b
	movq	_ADV7180_FLAG_MIPI_CSI2@GOTPCREL(%rip), %r8
	movl	$112, %esi
	cmovnel	%esi, %ecx
	shll	$7, %r15d
	shll	$7, %r14d
	testl	%eax, (%r8)
	je	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	cmpq	%rdx, %rdi
	sete	%al
	movl	$88, %edx
	cmovel	%esi, %edx
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movl	%eax, %r12d
	leal	40(,%rax,8), %edx
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%r14d, -64(%rbp)                ## 4-byte Spill
	movl	%eax, %r14d
	leal	48(,%rax,8), %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	leal	24(,%rax,8), %edx
	movl	%eax, %r13d
	shll	$5, %r13d
	addl	$48, %r13d
	shll	$6, %r12d
	addl	$64, %r12d
	shll	$4, %r14d
	leal	32(%r14), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	addl	$24, %r14d
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	callq	_adv7180_csi_write
	movq	%rbx, %rdi
	movl	$2, %esi
	movl	%r14d, %edx
	movl	-64(%rbp), %r14d                ## 4-byte Reload
	callq	_adv7180_csi_write
	movq	%rbx, %rdi
	movl	$3, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_adv7180_csi_write
	movq	%rbx, %rdi
	movl	$4, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_adv7180_csi_write
	movq	%rbx, %rdi
	movl	$5, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_adv7180_csi_write
	movq	%rbx, %rdi
	movl	$6, %esi
	movl	%r12d, %edx
	callq	_adv7180_csi_write
	movq	%rbx, %rdi
	movl	$7, %esi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	callq	_adv7180_csi_write
	movq	%rbx, %rdi
	movl	$8, %esi
	movl	%r13d, %edx
	callq	_adv7180_csi_write
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
LBB0_3:
	movq	%rbx, %rdi
	movl	$163, %esi
	movl	%ecx, %edx
	callq	_adv7180_vpp_write
	movq	%rbx, %rdi
	movl	$91, %esi
	movl	%r15d, %edx
	callq	_adv7180_vpp_write
	movq	%rbx, %rdi
	movl	$85, %esi
	movl	%r14d, %edx
	callq	_adv7180_vpp_write
LBB0_4:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADV7180_FLAG_I2P,4,2           ## @ADV7180_FLAG_I2P
	.comm	_V4L2_FIELD_NONE,8,3            ## @V4L2_FIELD_NONE
	.comm	_ADV7180_FLAG_MIPI_CSI2,4,2     ## @ADV7180_FLAG_MIPI_CSI2
	.no_dead_strip	_adv7180_set_field_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv7180_set_field_mode
_adv7180_set_field_mode:                ; @adv7180_set_field_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _ADV7180_FLAG_I2P@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ADV7180_FLAG_I2P@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x9, [x0]
Lloh3:
	adrp	x10, _V4L2_FIELD_NONE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	cset	w12, ne
	cset	w13, eq
Lloh6:
	adrp	x11, _ADV7180_FLAG_MIPI_CSI2@GOTPAGE
Lloh7:
	ldr	x11, [x11, _ADV7180_FLAG_MIPI_CSI2@GOTPAGEOFF]
Lloh8:
	ldr	w14, [x11]
	mov	w11, #112
	csel	w22, wzr, w11, eq
	lsl	w21, w12, #7
	lsl	w20, w13, #7
	and	w8, w14, w8
	cbz	w8, LBB0_3
; %bb.2:
	cmp	x9, x10
	mov	w8, #48
	mov	w9, #80
	csel	w9, w9, w8, eq
	str	w9, [sp, #12]                   ; 4-byte Folded Spill
	mov	w9, #88
	csel	w24, w11, w9, eq
	mov	w9, #64
	mov	w10, #128
	csel	w25, w10, w9, eq
	mov	w9, #40
	csel	w26, w8, w9, eq
	mov	w10, #32
	csel	w27, w8, w10, eq
	mov	w11, #56
	csel	w28, w11, w8, eq
	mov	w8, #24
	csel	w23, w9, w8, eq
	csel	w2, w10, w8, eq
	mov	x0, x19
	mov	w1, #1
	bl	_adv7180_csi_write
	mov	x0, x19
	mov	w1, #2
	mov	x2, x23
	bl	_adv7180_csi_write
	mov	x0, x19
	mov	w1, #3
	mov	x2, x28
	bl	_adv7180_csi_write
	mov	x0, x19
	mov	w1, #4
	mov	x2, x27
	bl	_adv7180_csi_write
	mov	x0, x19
	mov	w1, #5
	mov	x2, x26
	bl	_adv7180_csi_write
	mov	x0, x19
	mov	w1, #6
	mov	x2, x25
	bl	_adv7180_csi_write
	mov	x0, x19
	mov	w1, #7
	mov	x2, x24
	bl	_adv7180_csi_write
	mov	x0, x19
	mov	w1, #8
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
	bl	_adv7180_csi_write
LBB0_3:
	mov	x0, x19
	mov	w1, #163
	mov	x2, x22
	bl	_adv7180_vpp_write
	mov	x0, x19
	mov	w1, #91
	mov	x2, x21
	bl	_adv7180_vpp_write
	mov	x0, x19
	mov	w1, #85
	mov	x2, x20
	bl	_adv7180_vpp_write
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ADV7180_FLAG_I2P,4,2           ; @ADV7180_FLAG_I2P
	.comm	_V4L2_FIELD_NONE,8,3            ; @V4L2_FIELD_NONE
	.comm	_ADV7180_FLAG_MIPI_CSI2,4,2     ; @ADV7180_FLAG_MIPI_CSI2
	.no_dead_strip	_adv7180_set_field_mode
.subsections_via_symbols
