	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv7183_s_std
_adv7183_s_std:                         ## @adv7183_s_std
	.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	%esi, %r14d
	movq	%rdi, %rbx
	callq	_to_adv7183
	movq	%rax, %r15
	movq	_ADV7183_IN_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_adv7183_read
	movq	_V4L2_STD_PAL_60@GOTPCREL(%rip), %rdx
	movl	$96, %ecx
	cmpl	%r14d, (%rdx)
	je	LBB0_9
## %bb.1:
	movq	_V4L2_STD_NTSC_443@GOTPCREL(%rip), %rdx
	movl	$112, %ecx
	cmpl	%r14d, (%rdx)
	je	LBB0_9
## %bb.2:
	movq	_V4L2_STD_PAL_N@GOTPCREL(%rip), %rdx
	movl	$144, %ecx
	cmpl	%r14d, (%rdx)
	je	LBB0_9
## %bb.3:
	movq	_V4L2_STD_PAL_M@GOTPCREL(%rip), %rdx
	movl	$160, %ecx
	cmpl	%r14d, (%rdx)
	je	LBB0_9
## %bb.4:
	movq	_V4L2_STD_PAL_Nc@GOTPCREL(%rip), %rdx
	movl	$192, %ecx
	cmpl	%r14d, (%rdx)
	je	LBB0_9
## %bb.5:
	movq	_V4L2_STD_PAL@GOTPCREL(%rip), %rdx
	movl	$128, %ecx
	testl	%r14d, (%rdx)
	jne	LBB0_9
## %bb.6:
	movq	_V4L2_STD_NTSC@GOTPCREL(%rip), %rdx
	movl	$80, %ecx
	testl	%r14d, (%rdx)
	jne	LBB0_9
## %bb.7:
	movq	_V4L2_STD_SECAM@GOTPCREL(%rip), %rdx
	movl	$224, %ecx
	testl	%r14d, (%rdx)
	je	LBB0_8
LBB0_9:
	andl	$15, %eax
	orl	%ecx, %eax
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_adv7183_write
	movl	%r14d, (%r15)
	xorl	%eax, %eax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ADV7183_IN_CTRL,4,2            ## @ADV7183_IN_CTRL
	.comm	_V4L2_STD_PAL_60,4,2            ## @V4L2_STD_PAL_60
	.comm	_V4L2_STD_NTSC_443,4,2          ## @V4L2_STD_NTSC_443
	.comm	_V4L2_STD_PAL_N,4,2             ## @V4L2_STD_PAL_N
	.comm	_V4L2_STD_PAL_M,4,2             ## @V4L2_STD_PAL_M
	.comm	_V4L2_STD_PAL_Nc,4,2            ## @V4L2_STD_PAL_Nc
	.comm	_V4L2_STD_PAL,4,2               ## @V4L2_STD_PAL
	.comm	_V4L2_STD_NTSC,4,2              ## @V4L2_STD_NTSC
	.comm	_V4L2_STD_SECAM,4,2             ## @V4L2_STD_SECAM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_adv7183_s_std
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv7183_s_std
_adv7183_s_std:                         ; @adv7183_s_std
	.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, x1
	mov	x20, x0
	bl	_to_adv7183
	mov	x21, x0
Lloh0:
	adrp	x22, _ADV7183_IN_CTRL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ADV7183_IN_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_adv7183_read
Lloh2:
	adrp	x8, _V4L2_STD_PAL_60@GOTPAGE
Lloh3:
	ldr	x8, [x8, _V4L2_STD_PAL_60@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_2
; %bb.1:
	mov	w8, #96
	b	LBB0_16
LBB0_2:
Lloh5:
	adrp	x8, _V4L2_STD_NTSC_443@GOTPAGE
Lloh6:
	ldr	x8, [x8, _V4L2_STD_NTSC_443@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_4
; %bb.3:
	mov	w8, #112
	b	LBB0_16
LBB0_4:
Lloh8:
	adrp	x8, _V4L2_STD_PAL_N@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V4L2_STD_PAL_N@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_6
; %bb.5:
	mov	w8, #144
	b	LBB0_16
LBB0_6:
Lloh11:
	adrp	x8, _V4L2_STD_PAL_M@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_STD_PAL_M@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_8
; %bb.7:
	mov	w8, #160
	b	LBB0_16
LBB0_8:
Lloh14:
	adrp	x8, _V4L2_STD_PAL_Nc@GOTPAGE
Lloh15:
	ldr	x8, [x8, _V4L2_STD_PAL_Nc@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_10
; %bb.9:
	mov	w8, #192
	b	LBB0_16
LBB0_10:
Lloh17:
	adrp	x8, _V4L2_STD_PAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _V4L2_STD_PAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_12
; %bb.11:
	mov	w8, #128
	b	LBB0_16
LBB0_12:
Lloh20:
	adrp	x8, _V4L2_STD_NTSC@GOTPAGE
Lloh21:
	ldr	x8, [x8, _V4L2_STD_NTSC@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_14
; %bb.13:
	mov	w8, #80
	b	LBB0_16
LBB0_14:
Lloh23:
	adrp	x8, _V4L2_STD_SECAM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _V4L2_STD_SECAM@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_18
; %bb.15:
	mov	w8, #224
LBB0_16:
	and	w9, w0, #0xf
	orr	w2, w9, w8
	ldr	w1, [x22]
	mov	x0, x20
	bl	_adv7183_write
	mov	w0, #0
	str	w19, [x21]
LBB0_17:
	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
	ret
LBB0_18:
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ADV7183_IN_CTRL,4,2            ; @ADV7183_IN_CTRL
	.comm	_V4L2_STD_PAL_60,4,2            ; @V4L2_STD_PAL_60
	.comm	_V4L2_STD_NTSC_443,4,2          ; @V4L2_STD_NTSC_443
	.comm	_V4L2_STD_PAL_N,4,2             ; @V4L2_STD_PAL_N
	.comm	_V4L2_STD_PAL_M,4,2             ; @V4L2_STD_PAL_M
	.comm	_V4L2_STD_PAL_Nc,4,2            ; @V4L2_STD_PAL_Nc
	.comm	_V4L2_STD_PAL,4,2               ; @V4L2_STD_PAL
	.comm	_V4L2_STD_NTSC,4,2              ; @V4L2_STD_NTSC
	.comm	_V4L2_STD_SECAM,4,2             ; @V4L2_STD_SECAM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_adv7183_s_std
.subsections_via_symbols
