	.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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_to_state
	movq	_V4L2_STD_ALL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%r14)
	movq	(%rax), %rax
	movq	_V4L2_IDENT_SAA7115@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.4:
	movq	_R_1E_STATUS_BYTE_1_VD_DEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_saa711x_read
	andl	$3, %eax
	cmpl	$3, %eax
	je	LBB0_9
## %bb.5:
	cmpl	$2, %eax
	je	LBB0_8
## %bb.6:
	cmpl	$1, %eax
	jne	LBB0_11
## %bb.7:
	movq	_V4L2_STD_NTSC@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_1:
	movq	_R_1F_STATUS_BYTE_2_VD_DEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_saa711x_read
	testb	$32, %al
	jne	LBB0_2
## %bb.3:
	movq	_V4L2_STD_625_50@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_2:
	movq	_V4L2_STD_525_60@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_V4L2_STD_SECAM@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_V4L2_STD_PAL@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	movl	%eax, (%r14)
LBB0_11:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_STD_ALL,4,2               ## @V4L2_STD_ALL
	.comm	_V4L2_IDENT_SAA7115,8,3         ## @V4L2_IDENT_SAA7115
	.comm	_R_1F_STATUS_BYTE_2_VD_DEC,4,2  ## @R_1F_STATUS_BYTE_2_VD_DEC
	.comm	_V4L2_STD_525_60,4,2            ## @V4L2_STD_525_60
	.comm	_V4L2_STD_625_50,4,2            ## @V4L2_STD_625_50
	.comm	_R_1E_STATUS_BYTE_1_VD_DEC,4,2  ## @R_1E_STATUS_BYTE_1_VD_DEC
	.comm	_V4L2_STD_NTSC,4,2              ## @V4L2_STD_NTSC
	.comm	_V4L2_STD_PAL,4,2               ## @V4L2_STD_PAL
	.comm	_V4L2_STD_SECAM,4,2             ## @V4L2_STD_SECAM
	.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	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	x19, x1
	mov	x20, x0
	bl	_to_state
Lloh0:
	adrp	x8, _V4L2_STD_ALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_STD_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _V4L2_IDENT_SAA7115@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_IDENT_SAA7115@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
Lloh6:
	adrp	x8, _R_1E_STATUS_BYTE_1_VD_DEC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R_1E_STATUS_BYTE_1_VD_DEC@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_saa711x_read
	and	w8, w0, #0x3
	cmp	w8, #3
	b.eq	LBB0_6
; %bb.2:
	cmp	w8, #2
	b.eq	LBB0_7
; %bb.3:
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.4:
Lloh9:
	adrp	x8, _V4L2_STD_NTSC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V4L2_STD_NTSC@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
Lloh11:
	adrp	x8, _R_1F_STATUS_BYTE_2_VD_DEC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _R_1F_STATUS_BYTE_2_VD_DEC@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_saa711x_read
Lloh14:
	adrp	x8, _V4L2_STD_625_50@GOTPAGE
Lloh15:
	ldr	x8, [x8, _V4L2_STD_625_50@GOTPAGEOFF]
Lloh16:
	adrp	x9, _V4L2_STD_525_60@GOTPAGE
Lloh17:
	ldr	x9, [x9, _V4L2_STD_525_60@GOTPAGEOFF]
	tst	w0, #0x20
	csel	x8, x8, x9, eq
	b	LBB0_8
LBB0_6:
Lloh18:
	adrp	x8, _V4L2_STD_SECAM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _V4L2_STD_SECAM@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh20:
	adrp	x8, _V4L2_STD_PAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _V4L2_STD_PAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_9:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_STD_ALL,4,2               ; @V4L2_STD_ALL
	.comm	_V4L2_IDENT_SAA7115,8,3         ; @V4L2_IDENT_SAA7115
	.comm	_R_1F_STATUS_BYTE_2_VD_DEC,4,2  ; @R_1F_STATUS_BYTE_2_VD_DEC
	.comm	_V4L2_STD_525_60,4,2            ; @V4L2_STD_525_60
	.comm	_V4L2_STD_625_50,4,2            ; @V4L2_STD_625_50
	.comm	_R_1E_STATUS_BYTE_1_VD_DEC,4,2  ; @R_1E_STATUS_BYTE_1_VD_DEC
	.comm	_V4L2_STD_NTSC,4,2              ; @V4L2_STD_NTSC
	.comm	_V4L2_STD_PAL,4,2               ; @V4L2_STD_PAL
	.comm	_V4L2_STD_SECAM,4,2             ; @V4L2_STD_SECAM
	.no_dead_strip	_saa711x_querystd
.subsections_via_symbols
