	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa7110_s_std
_saa7110_s_std:                         ## @saa7110_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_to_saa7110
	xorl	%r14d, %r14d
	cmpl	%ebx, (%rax)
	je	LBB0_9
## %bb.1:
	movl	%ebx, (%rax)
	movq	_V4L2_STD_NTSC@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.2:
	movq	%r15, %rdi
	movl	$13, %esi
	movl	$134, %edx
	callq	_saa7110_write
	movq	%r15, %rdi
	movl	$15, %esi
	movl	$80, %edx
	callq	_saa7110_write
	movq	%r15, %rdi
	movl	$17, %esi
	movl	$44, %edx
	callq	_saa7110_write
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	jmp	LBB0_3
LBB0_4:
	movq	_V4L2_STD_PAL@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	movl	$13, %esi
	movl	$134, %edx
	callq	_saa7110_write
	movq	%r15, %rdi
	movl	$15, %esi
	movl	$16, %edx
	callq	_saa7110_write
	movq	%r15, %rdi
	movl	$17, %esi
	movl	$89, %edx
	callq	_saa7110_write
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rcx
	jmp	LBB0_3
LBB0_6:
	movq	_V4L2_STD_SECAM@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	movl	$13, %esi
	movl	$135, %edx
	callq	_saa7110_write
	movq	%r15, %rdi
	movl	$15, %esi
	movl	$16, %edx
	callq	_saa7110_write
	movq	%r15, %rdi
	movl	$17, %esi
	movl	$89, %edx
	callq	_saa7110_write
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rcx
LBB0_3:
	movl	$1, %edi
	movq	%r15, %rdx
	callq	_v4l2_dbg
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_STD_NTSC,4,2              ## @V4L2_STD_NTSC
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"switched to NTSC\n"

	.comm	_V4L2_STD_PAL,4,2               ## @V4L2_STD_PAL
L_.str.1:                               ## @.str.1
	.asciz	"switched to PAL\n"

	.comm	_V4L2_STD_SECAM,4,2             ## @V4L2_STD_SECAM
L_.str.2:                               ## @.str.2
	.asciz	"switched to SECAM\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_saa7110_s_std
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa7110_s_std
_saa7110_s_std:                         ; @saa7110_s_std
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_to_saa7110
	ldr	w8, [x0]
	cmp	w8, w20
	b.eq	LBB0_8
; %bb.1:
	str	w20, [x0]
Lloh0:
	adrp	x8, _V4L2_STD_NTSC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_STD_NTSC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w1, #13
	mov	w2, #134
	bl	_saa7110_write
	mov	x0, x19
	mov	w1, #15
	mov	w2, #80
	bl	_saa7110_write
	mov	x0, x19
	mov	w1, #17
	mov	w2, #44
	bl	_saa7110_write
Lloh3:
	adrp	x8, _debug@GOTPAGE
Lloh4:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	b	LBB0_7
LBB0_3:
Lloh8:
	adrp	x8, _V4L2_STD_PAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V4L2_STD_PAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	mov	w1, #13
	mov	w2, #134
	bl	_saa7110_write
	mov	x0, x19
	mov	w1, #15
	mov	w2, #16
	bl	_saa7110_write
	mov	x0, x19
	mov	w1, #17
	mov	w2, #89
	bl	_saa7110_write
Lloh11:
	adrp	x8, _debug@GOTPAGE
Lloh12:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x3, l_.str.1@PAGE
Lloh15:
	add	x3, x3, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_5:
Lloh16:
	adrp	x8, _V4L2_STD_SECAM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _V4L2_STD_SECAM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_10
; %bb.6:
	mov	x0, x19
	mov	w1, #13
	mov	w2, #135
	bl	_saa7110_write
	mov	x0, x19
	mov	w1, #15
	mov	w2, #16
	bl	_saa7110_write
	mov	x0, x19
	mov	w1, #17
	mov	w2, #89
	bl	_saa7110_write
Lloh19:
	adrp	x8, _debug@GOTPAGE
Lloh20:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x3, l_.str.2@PAGE
Lloh23:
	add	x3, x3, l_.str.2@PAGEOFF
LBB0_7:
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_STD_NTSC,4,2              ; @V4L2_STD_NTSC
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"switched to NTSC\n"

	.comm	_V4L2_STD_PAL,4,2               ; @V4L2_STD_PAL
l_.str.1:                               ; @.str.1
	.asciz	"switched to PAL\n"

	.comm	_V4L2_STD_SECAM,4,2             ; @V4L2_STD_SECAM
l_.str.2:                               ; @.str.2
	.asciz	"switched to SECAM\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_saa7110_s_std
.subsections_via_symbols
