	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_s_std
_vidioc_s_std:                          ## @vidioc_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	%edx, %r15d
	movq	(%rdi), %rax
	movq	(%rax), %r14
	movq	_cx231xx_tvnorms@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	testl	%r15d, (%rdi,%rbx,4)
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	cmpq	%rax, %rbx
	jb	LBB0_1
LBB0_3:
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jne	LBB0_5
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_5:
	movq	(%r12), %rax
	movl	%ebx, %ecx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 12(%r14)
	xorl	%ecx, %ecx
	testl	$45056, %eax                    ## imm = 0xB000
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rsi
	cmoveq	%rax, %rsi
	movl	$576, %eax                      ## imm = 0x240
	movl	$480, %r13d                     ## imm = 0x1E0
	cmovel	%eax, %r13d
	movq	%r14, %r12
	movq	_V4L2_STD_NTSC@GOTPCREL(%rip), %r14
	cmoveq	_V4L2_STD_PAL_B@GOTPCREL(%rip), %r14
	sete	%cl
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	xorl	%r15d, %r15d
	movl	$3, %edi
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r14), %eax
	movl	%eax, (%r12)
	movl	%r13d, 8(%r12)
	leaq	4(%r12), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_cx2341x_handler_set_50hz
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_std@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r12), %ecx
	movq	%r12, %rdi
	callq	_call_all
	movq	%r12, %rdi
	callq	_cx231xx_do_mode_ctrl_overrides
	leaq	L_.str.2(%rip), %rsi
	movl	$3, %edi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dprintk
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cx231xx_tvnorms,8,3            ## @cx231xx_tvnorms
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"encodernorm set to NTSC\n"

	.comm	_V4L2_STD_NTSC,4,2              ## @V4L2_STD_NTSC
L_.str.1:                               ## @.str.1
	.asciz	"encodernorm set to PAL\n"

	.comm	_V4L2_STD_PAL_B,4,2             ## @V4L2_STD_PAL_B
	.comm	_video,4,2                      ## @video
	.comm	_s_std,4,2                      ## @s_std
L_.str.2:                               ## @.str.2
	.asciz	"exit vidioc_s_std() i=0x%x\n"

	.no_dead_strip	_vidioc_s_std
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_s_std
_vidioc_s_std:                          ; @vidioc_s_std
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x2
	ldr	x8, [x0]
	ldr	x19, [x8]
Lloh0:
	adrp	x22, _cx231xx_tvnorms@GOTPAGE
Lloh1:
	ldr	x22, [x22, _cx231xx_tvnorms@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_4
; %bb.1:
	mov	x21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	ldr	w8, [x0, x21, lsl #2]
	tst	w8, w20
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x21, #1
	bl	_ARRAY_SIZE
	cmp	x21, w0, uxtw
	b.lo	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w21, #0
LBB0_5:
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w21, w0
	b.ne	LBB0_7
; %bb.6:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_7:
	ldr	x8, [x22]
	ldr	w8, [x8, w21, uxtw #2]
	str	w8, [x19, #12]
	mov	w9, #45056
	tst	w8, w9
	cset	w20, eq
Lloh5:
	adrp	x8, l_.str@PAGE
Lloh6:
	add	x8, x8, l_.str@PAGEOFF
Lloh7:
	adrp	x9, l_.str.1@PAGE
Lloh8:
	add	x9, x9, l_.str.1@PAGEOFF
	csel	x1, x9, x8, eq
	mov	w8, #480
	mov	w9, #576
	csel	w22, w9, w8, eq
Lloh9:
	adrp	x8, _V4L2_STD_PAL_B@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V4L2_STD_PAL_B@GOTPAGEOFF]
Lloh11:
	adrp	x9, _V4L2_STD_NTSC@GOTPAGE
Lloh12:
	ldr	x9, [x9, _V4L2_STD_NTSC@GOTPAGEOFF]
	csel	x23, x8, x9, eq
	mov	w0, #3
	bl	_dprintk
	ldr	w8, [x23]
	str	w8, [x19]
	str	w22, [x19, #8]
	add	x0, x19, #4
	mov	x1, x20
	bl	_cx2341x_handler_set_50hz
Lloh13:
	adrp	x8, _video@GOTPAGE
Lloh14:
	ldr	x8, [x8, _video@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _s_std@GOTPAGE
Lloh17:
	ldr	x8, [x8, _s_std@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	ldr	w3, [x19]
	mov	x0, x19
	bl	_call_all
	mov	x0, x19
	bl	_cx231xx_do_mode_ctrl_overrides
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	str	x21, [sp]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #3
	bl	_dprintk
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_cx231xx_tvnorms,8,3            ; @cx231xx_tvnorms
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"encodernorm set to NTSC\n"

	.comm	_V4L2_STD_NTSC,4,2              ; @V4L2_STD_NTSC
l_.str.1:                               ; @.str.1
	.asciz	"encodernorm set to PAL\n"

	.comm	_V4L2_STD_PAL_B,4,2             ; @V4L2_STD_PAL_B
	.comm	_video,4,2                      ; @video
	.comm	_s_std,4,2                      ; @s_std
l_.str.2:                               ; @.str.2
	.asciz	"exit vidioc_s_std() i=0x%x\n"

	.no_dead_strip	_vidioc_s_std
.subsections_via_symbols
