	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa711x_querystd
_saa711x_querystd:                      ## @saa711x_querystd
	.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
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	_to_state
	movq	%rax, %rbx
	movq	_R_1F_STATUS_BYTE_2_VD_DEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_saa711x_read
	movl	%eax, %r15d
	movq	(%rbx), %rax
	movq	_SAA7115@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.1:
	movq	_R_1E_STATUS_BYTE_1_VD_DEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_saa711x_read
	movl	%eax, %ebx
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%r12, %rdx
	movl	%ebx, %r8d
	callq	_v4l2_dbg
	andl	$3, %ebx
	cmpl	$3, %ebx
	je	LBB0_7
## %bb.2:
	cmpl	$2, %ebx
	je	LBB0_6
## %bb.3:
	cmpl	$1, %ebx
	jne	LBB0_8
## %bb.4:
	movq	_V4L2_STD_NTSC@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_7:
	movq	_V4L2_STD_SECAM@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%r14), %eax
	andl	(%rcx), %eax
	jmp	LBB0_9
LBB0_6:
	movq	_V4L2_STD_PAL@GOTPCREL(%rip), %rcx
	movq	_V4L2_STD_PAL_N@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	_V4L2_STD_PAL_Nc@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_V4L2_STD_PAL_M@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_V4L2_STD_PAL_60@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	andl	(%r14), %eax
	jmp	LBB0_9
LBB0_8:
	movq	_V4L2_STD_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_9:
	movl	%eax, (%r14)
LBB0_10:
	movq	_debug@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	L_.str.1(%rip), %rcx
	movl	$1, %edi
	movq	%r12, %rdx
	movl	%r15d, %r8d
	callq	_v4l2_dbg
	testb	$64, %r15b
	jne	LBB0_11
## %bb.12:
	testb	$32, %r15b
	jne	LBB0_13
## %bb.14:
	movq	_V4L2_STD_625_50@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_11:
	movq	_V4L2_STD_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	jmp	LBB0_16
LBB0_13:
	movq	_V4L2_STD_525_60@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%r14), %r8d
	andl	(%rax), %r8d
LBB0_16:
	movl	%r8d, (%r14)
	movl	(%rbx), %esi
	leaq	L_.str.2(%rip), %rcx
	movl	$1, %edi
	movq	%r12, %rdx
	callq	_v4l2_dbg
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R_1F_STATUS_BYTE_2_VD_DEC,4,2  ## @R_1F_STATUS_BYTE_2_VD_DEC
	.comm	_SAA7115,8,3                    ## @SAA7115
	.comm	_R_1E_STATUS_BYTE_1_VD_DEC,4,2  ## @R_1E_STATUS_BYTE_1_VD_DEC
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Status byte 1 (0x1e)=0x%02x\n"

	.comm	_V4L2_STD_NTSC,4,2              ## @V4L2_STD_NTSC
	.comm	_V4L2_STD_PAL,4,2               ## @V4L2_STD_PAL
	.comm	_V4L2_STD_PAL_N,4,2             ## @V4L2_STD_PAL_N
	.comm	_V4L2_STD_PAL_Nc,4,2            ## @V4L2_STD_PAL_Nc
	.comm	_V4L2_STD_PAL_M,4,2             ## @V4L2_STD_PAL_M
	.comm	_V4L2_STD_PAL_60,4,2            ## @V4L2_STD_PAL_60
	.comm	_V4L2_STD_SECAM,4,2             ## @V4L2_STD_SECAM
	.comm	_V4L2_STD_UNKNOWN,4,2           ## @V4L2_STD_UNKNOWN
L_.str.1:                               ## @.str.1
	.asciz	"Status byte 2 (0x1f)=0x%02x\n"

	.comm	_V4L2_STD_525_60,4,2            ## @V4L2_STD_525_60
	.comm	_V4L2_STD_625_50,4,2            ## @V4L2_STD_625_50
L_.str.2:                               ## @.str.2
	.asciz	"detected std mask = %08Lx\n"

	.no_dead_strip	_saa711x_querystd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa711x_querystd
_saa711x_querystd:                      ; @saa711x_querystd
	.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	x20, x1
	mov	x19, x0
	bl	_to_state
	mov	x22, x0
Lloh0:
	adrp	x8, _R_1F_STATUS_BYTE_2_VD_DEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R_1F_STATUS_BYTE_2_VD_DEC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_saa711x_read
	mov	x21, x0
	ldr	x8, [x22]
Lloh3:
	adrp	x9, _SAA7115@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SAA7115@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x23, _debug@GOTPAGE
Lloh7:
	ldr	x23, [x23, _debug@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.1:
Lloh8:
	adrp	x8, _R_1E_STATUS_BYTE_1_VD_DEC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _R_1E_STATUS_BYTE_1_VD_DEC@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_saa711x_read
	mov	x22, x0
	ldr	w1, [x23]
Lloh11:
	adrp	x3, l_.str@PAGE
Lloh12:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	mov	x4, x22
	bl	_v4l2_dbg
	and	w8, w22, #0x3
	cmp	w8, #3
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #2
	b.eq	LBB0_7
; %bb.3:
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.4:
Lloh13:
	adrp	x8, _V4L2_STD_NTSC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _V4L2_STD_NTSC@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh15:
	adrp	x8, _V4L2_STD_SECAM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _V4L2_STD_SECAM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	b	LBB0_8
LBB0_7:
Lloh17:
	adrp	x8, _V4L2_STD_PAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _V4L2_STD_PAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _V4L2_STD_PAL_N@GOTPAGE
Lloh21:
	ldr	x9, [x9, _V4L2_STD_PAL_N@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh23:
	adrp	x9, _V4L2_STD_PAL_Nc@GOTPAGE
Lloh24:
	ldr	x9, [x9, _V4L2_STD_PAL_Nc@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh26:
	adrp	x9, _V4L2_STD_PAL_M@GOTPAGE
Lloh27:
	ldr	x9, [x9, _V4L2_STD_PAL_M@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh29:
	adrp	x9, _V4L2_STD_PAL_60@GOTPAGE
Lloh30:
	ldr	x9, [x9, _V4L2_STD_PAL_60@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w8, w8, w9
LBB0_8:
	ldr	w9, [x20]
	and	w8, w9, w8
	b	LBB0_10
LBB0_9:
Lloh32:
	adrp	x8, _V4L2_STD_UNKNOWN@GOTPAGE
Lloh33:
	ldr	x8, [x8, _V4L2_STD_UNKNOWN@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
LBB0_10:
	str	w8, [x20]
LBB0_11:
	ldr	w1, [x23]
Lloh35:
	adrp	x3, l_.str.1@PAGE
Lloh36:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	mov	x4, x21
	bl	_v4l2_dbg
	tbnz	w21, #6, LBB0_14
; %bb.12:
	tbnz	w21, #5, LBB0_15
; %bb.13:
Lloh37:
	adrp	x8, _V4L2_STD_625_50@GOTPAGE
Lloh38:
	ldr	x8, [x8, _V4L2_STD_625_50@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
Lloh39:
	adrp	x8, _V4L2_STD_UNKNOWN@GOTPAGE
Lloh40:
	ldr	x8, [x8, _V4L2_STD_UNKNOWN@GOTPAGEOFF]
Lloh41:
	ldr	w4, [x8]
	b	LBB0_17
LBB0_15:
Lloh42:
	adrp	x8, _V4L2_STD_525_60@GOTPAGE
Lloh43:
	ldr	x8, [x8, _V4L2_STD_525_60@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	ldr	w9, [x20]
	and	w4, w9, w8
LBB0_17:
	str	w4, [x20]
	ldr	w1, [x23]
Lloh44:
	adrp	x3, l_.str.2@PAGE
Lloh45:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
	mov	w0, #0
	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
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_R_1F_STATUS_BYTE_2_VD_DEC,4,2  ; @R_1F_STATUS_BYTE_2_VD_DEC
	.comm	_SAA7115,8,3                    ; @SAA7115
	.comm	_R_1E_STATUS_BYTE_1_VD_DEC,4,2  ; @R_1E_STATUS_BYTE_1_VD_DEC
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Status byte 1 (0x1e)=0x%02x\n"

	.comm	_V4L2_STD_NTSC,4,2              ; @V4L2_STD_NTSC
	.comm	_V4L2_STD_PAL,4,2               ; @V4L2_STD_PAL
	.comm	_V4L2_STD_PAL_N,4,2             ; @V4L2_STD_PAL_N
	.comm	_V4L2_STD_PAL_Nc,4,2            ; @V4L2_STD_PAL_Nc
	.comm	_V4L2_STD_PAL_M,4,2             ; @V4L2_STD_PAL_M
	.comm	_V4L2_STD_PAL_60,4,2            ; @V4L2_STD_PAL_60
	.comm	_V4L2_STD_SECAM,4,2             ; @V4L2_STD_SECAM
	.comm	_V4L2_STD_UNKNOWN,4,2           ; @V4L2_STD_UNKNOWN
l_.str.1:                               ; @.str.1
	.asciz	"Status byte 2 (0x1f)=0x%02x\n"

	.comm	_V4L2_STD_525_60,4,2            ; @V4L2_STD_525_60
	.comm	_V4L2_STD_625_50,4,2            ; @V4L2_STD_625_50
l_.str.2:                               ; @.str.2
	.asciz	"detected std mask = %08Lx\n"

	.no_dead_strip	_saa711x_querystd
.subsections_via_symbols
