	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_saa7134_s_std                  ## -- Begin function saa7134_s_std
	.p2align	4, 0x90
_saa7134_s_std:                         ## @saa7134_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	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	_video_drvdata
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_is_empress
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	cmpq	$0, 8(%r15)
	je	LBB0_4
## %bb.2:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_4:
	movq	_TVNORMS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	movl	$0, %edx
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	_tvnorms@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%ebx, (%rsi,%rdx,4)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_6
	jmp	LBB0_10
LBB0_8:
	cmpl	%eax, %edx
	cmovnel	%edx, %ecx
	jne	LBB0_13
## %bb.9:
	testl	%eax, %eax
	je	LBB0_13
LBB0_10:
	movq	_tvnorms@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	testl	%ebx, (%rdx,%rcx,4)
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_11
	jmp	LBB0_14
LBB0_13:
	cmpl	%eax, %ecx
	jne	LBB0_15
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_38:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	_V4L2_STD_SECAM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%ebx, %edx
	je	LBB0_30
## %bb.16:
	movq	_secam@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movb	(%rsi), %bl
	cmpb	$75, %bl
	jle	LBB0_17
## %bb.20:
	cmpb	$108, %bl
	je	LBB0_23
## %bb.21:
	cmpb	$100, %bl
	je	LBB0_19
## %bb.22:
	cmpb	$76, %bl
	jne	LBB0_27
LBB0_23:
	movb	1(%rsi), %cl
	orb	$32, %cl
	cmpb	$99, %cl
	jne	LBB0_25
## %bb.24:
	movq	_V4L2_STD_SECAM_LC@GOTPCREL(%rip), %rcx
	jmp	LBB0_26
LBB0_17:
	cmpb	$45, %bl
	je	LBB0_30
## %bb.18:
	cmpb	$68, %bl
	jne	LBB0_27
LBB0_19:
	movq	_V4L2_STD_SECAM_DK@GOTPCREL(%rip), %rcx
	jmp	LBB0_26
LBB0_25:
	movq	_V4L2_STD_SECAM_L@GOTPCREL(%rip), %rcx
LBB0_26:
	movl	(%rcx), %edx
LBB0_27:
	testq	%rax, %rax
	je	LBB0_28
## %bb.33:
	movq	_tvnorms@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_34:                                ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %edi
	cmpl	(%rsi,%rdi,4), %edx
	je	LBB0_29
## %bb.35:                              ##   in Loop: Header=BB0_34 Depth=1
	incl	%ecx
	cmpl	%ecx, %eax
	jne	LBB0_34
	jmp	LBB0_14
LBB0_28:
	xorl	%ecx, %ecx
LBB0_29:
	cmpl	%eax, %ecx
	je	LBB0_14
LBB0_30:
	movl	%ecx, %ebx
	movq	%r12, %rdi
	callq	_is_empress
	testq	%rax, %rax
	jne	LBB0_36
## %bb.31:
	cmpq	%r14, 8(%r15)
	je	LBB0_32
LBB0_36:
	movq	_tvnorms@GOTPCREL(%rip), %rax
	shlq	$2, %rbx
	addq	(%rax), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_set_tvnorm
LBB0_37:
	movq	%r15, %rdi
	callq	_saa7134_tvaudio_do_scan
	xorl	%eax, %eax
	jmp	LBB0_38
LBB0_32:
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	_stop_preview
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	_tvnorms@GOTPCREL(%rip), %rax
	shlq	$2, %rbx
	addq	(%rax), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_set_tvnorm
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	_start_preview
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_37
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_TVNORMS,4,2                    ## @TVNORMS
	.comm	_tvnorms,8,3                    ## @tvnorms
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_STD_SECAM,4,2             ## @V4L2_STD_SECAM
	.comm	_secam,8,3                      ## @secam
	.comm	_V4L2_STD_SECAM_LC,4,2          ## @V4L2_STD_SECAM_LC
	.comm	_V4L2_STD_SECAM_L,4,2           ## @V4L2_STD_SECAM_L
	.comm	_V4L2_STD_SECAM_DK,4,2          ## @V4L2_STD_SECAM_DK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_saa7134_s_std                  ; -- Begin function saa7134_s_std
	.p2align	2
_saa7134_s_std:                         ; @saa7134_s_std
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x2
	mov	x20, x1
	mov	x21, x0
	bl	_video_drvdata
	mov	x19, x0
	mov	x0, x21
	bl	_is_empress
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_15
LBB0_3:
Lloh2:
	adrp	x8, _TVNORMS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TVNORMS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x23, _tvnorms@GOTPAGE
Lloh6:
	ldr	x23, [x23, _tvnorms@GOTPAGEOFF]
	cbz	w8, LBB0_7
; %bb.4:
	mov	x9, #0
	ldr	x10, [x23]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, x9, lsl #2]
	cmp	w11, w22
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_5
	b	LBB0_10
LBB0_7:
	mov	w9, #0
LBB0_8:
	cmp	w9, w8
	csel	w9, w9, wzr, ne
	b.ne	LBB0_13
; %bb.9:
	cbz	w8, LBB0_13
LBB0_10:
	mov	x9, #0
	ldr	x10, [x23]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, x9, lsl #2]
	tst	w11, w22
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_11
	b	LBB0_14
LBB0_13:
	cmp	w9, w8
	b.ne	LBB0_17
LBB0_14:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_17:
Lloh9:
	adrp	x10, _V4L2_STD_SECAM@GOTPAGE
Lloh10:
	ldr	x10, [x10, _V4L2_STD_SECAM@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	tst	w10, w22
	b.eq	LBB0_34
; %bb.18:
Lloh12:
	adrp	x11, _secam@GOTPAGE
Lloh13:
	ldr	x11, [x11, _secam@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x11]
	ldrb	w12, [x11]
	cmp	w12, #75
	b.le	LBB0_24
; %bb.19:
	cmp	w12, #108
	b.eq	LBB0_22
; %bb.20:
	cmp	w12, #100
	b.eq	LBB0_26
; %bb.21:
	cmp	w12, #76
	b.ne	LBB0_29
LBB0_22:
	ldrb	w9, [x11, #1]
	orr	w9, w9, #0x20
	cmp	w9, #99
	b.ne	LBB0_27
; %bb.23:
Lloh15:
	adrp	x9, _V4L2_STD_SECAM_LC@GOTPAGE
Lloh16:
	ldr	x9, [x9, _V4L2_STD_SECAM_LC@GOTPAGEOFF]
	b	LBB0_28
LBB0_24:
	cmp	w12, #45
	b.eq	LBB0_34
; %bb.25:
	cmp	w12, #68
	b.ne	LBB0_29
LBB0_26:
Lloh17:
	adrp	x9, _V4L2_STD_SECAM_DK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _V4L2_STD_SECAM_DK@GOTPAGEOFF]
	b	LBB0_28
LBB0_27:
Lloh19:
	adrp	x9, _V4L2_STD_SECAM_L@GOTPAGE
Lloh20:
	ldr	x9, [x9, _V4L2_STD_SECAM_L@GOTPAGEOFF]
LBB0_28:
	ldr	w10, [x9]
LBB0_29:
	mov	w9, #0
	cbz	w8, LBB0_33
; %bb.30:
	ldr	x11, [x23]
LBB0_31:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11, w9, uxtw #2]
	cmp	w10, w12
	b.eq	LBB0_33
; %bb.32:                               ;   in Loop: Header=BB0_31 Depth=1
	add	w9, w9, #1
	cmp	w8, w9
	b.ne	LBB0_31
	b	LBB0_14
LBB0_33:
	cmp	w9, w8
	b.eq	LBB0_14
LBB0_34:
	mov	w22, w9
	mov	x0, x21
	bl	_is_empress
	cbnz	x0, LBB0_36
; %bb.35:
	ldr	x8, [x19, #8]
	cmp	x8, x20
	b.eq	LBB0_38
LBB0_36:
	ldr	x8, [x23]
	add	x1, x8, x22, lsl #2
	mov	x0, x19
	bl	_set_tvnorm
LBB0_37:
	mov	x0, x19
	bl	_saa7134_tvaudio_do_scan
	mov	w0, #0
	b	LBB0_16
LBB0_38:
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_stop_preview
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	ldr	x8, [x23]
	add	x1, x8, x22, lsl #2
	mov	x0, x19
	bl	_set_tvnorm
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_start_preview
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	b	LBB0_37
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_TVNORMS,4,2                    ; @TVNORMS
	.comm	_tvnorms,8,3                    ; @tvnorms
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_STD_SECAM,4,2             ; @V4L2_STD_SECAM
	.comm	_secam,8,3                      ; @secam
	.comm	_V4L2_STD_SECAM_LC,4,2          ; @V4L2_STD_SECAM_LC
	.comm	_V4L2_STD_SECAM_L,4,2           ; @V4L2_STD_SECAM_L
	.comm	_V4L2_STD_SECAM_DK,4,2          ; @V4L2_STD_SECAM_DK
.subsections_via_symbols
