	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tvp514x_s_std
_tvp514x_s_std:                         ## @tvp514x_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	%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	%esi, %r12d
	movq	%rdi, %r14
	callq	_to_decoder
	movq	%rax, %r15
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.6:
	movq	8(%r15), %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	testl	%r12d, (%rcx)
	jne	LBB0_2
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	addq	$12, %rcx
	cmpq	%rbx, %rax
	jne	LBB0_7
	jmp	LBB0_9
LBB0_1:
	xorl	%ebx, %ebx
LBB0_2:
	cmpl	%eax, %ebx
	je	LBB0_9
## %bb.3:
	movq	_STD_INVALID@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_9
## %bb.4:
	movq	_REG_VIDEO_STD@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movq	8(%r15), %rax
	movl	%ebx, %ecx
	leaq	(%rcx,%rcx,2), %r13
	movl	8(%rax,%r13,4), %edx
	movq	%r14, %rdi
	callq	_tvp514x_write_reg
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	movl	%ebx, 4(%r15)
	movq	8(%r15), %rax
	movq	16(%r15), %rcx
	movl	8(%rax,%r13,4), %edx
	movq	(%r12), %rsi
	movl	%edx, (%rcx,%rsi,4)
	movq	_debug@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	4(%rax,%r13,4), %r8d
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_v4l2_dbg
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STD_INVALID,4,2                ## @STD_INVALID
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_REG_VIDEO_STD,8,3              ## @REG_VIDEO_STD
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Standard set to: %s\n"

	.no_dead_strip	_tvp514x_s_std
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tvp514x_s_std
_tvp514x_s_std:                         ; @tvp514x_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	x21, x1
	mov	x19, x0
	bl	_to_decoder
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x22, #0
	ldr	x9, [x20, #8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9]
	tst	w10, w21
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	add	x9, x9, #12
	cmp	x8, x22
	b.ne	LBB0_2
	b	LBB0_6
LBB0_4:
	mov	w22, #0
LBB0_5:
Lloh0:
	adrp	x9, _STD_INVALID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STD_INVALID@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w22, w8
	ccmp	w22, w9, #4, ne
	b.ne	LBB0_7
LBB0_6:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_7:
Lloh6:
	adrp	x21, _REG_VIDEO_STD@GOTPAGE
Lloh7:
	ldr	x21, [x21, _REG_VIDEO_STD@GOTPAGEOFF]
	ldr	x1, [x21]
	ldr	x8, [x20, #8]
	mov	w9, #12
	umaddl	x8, w22, w9, x8
	ldr	w2, [x8, #8]
	mov	x0, x19
	bl	_tvp514x_write_reg
	cbnz	w0, LBB0_9
; %bb.8:
	mov	w8, w22
	str	w22, [x20, #4]
	mov	w9, #12
	ldp	x10, x11, [x20, #8]
	madd	x8, x8, x9, x10
	ldr	x9, [x21]
	ldp	w4, w10, [x8, #4]
	str	w10, [x11, x9, lsl #2]
Lloh8:
	adrp	x8, _debug@GOTPAGE
Lloh9:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x3, l_.str@PAGE
Lloh12:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
	mov	w0, #0
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_STD_INVALID,4,2                ; @STD_INVALID
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_REG_VIDEO_STD,8,3              ; @REG_VIDEO_STD
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Standard set to: %s\n"

	.no_dead_strip	_tvp514x_s_std
.subsections_via_symbols
