	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tvp514x_query_current_std
_tvp514x_query_current_std:             ## @tvp514x_query_current_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_REG_VIDEO_STD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_tvp514x_read_reg
	movq	_VIDEO_STD_MASK@GOTPCREL(%rip), %r14
	andl	(%r14), %eax
	movq	_VIDEO_STD_AUTO_SWITCH_BIT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movq	_REG_VIDEO_STD_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_tvp514x_read_reg
	andl	(%r14), %eax
LBB0_2:
	cmpl	$128, %eax
	jne	LBB0_3
## %bb.4:
	movq	_STD_PAL_BDGHIN@GOTPCREL(%rip), %rcx
	cmpl	$129, %eax
	je	LBB0_6
	jmp	LBB0_7
LBB0_3:
	movq	_STD_INVALID@GOTPCREL(%rip), %rcx
	cmpl	$129, %eax
	jne	LBB0_7
LBB0_6:
	movq	_STD_NTSC_MJ@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rcx), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_VIDEO_STD,4,2              ## @REG_VIDEO_STD
	.comm	_VIDEO_STD_MASK,4,2             ## @VIDEO_STD_MASK
	.comm	_VIDEO_STD_AUTO_SWITCH_BIT,4,2  ## @VIDEO_STD_AUTO_SWITCH_BIT
	.comm	_REG_VIDEO_STD_STATUS,4,2       ## @REG_VIDEO_STD_STATUS
	.comm	_STD_NTSC_MJ,4,2                ## @STD_NTSC_MJ
	.comm	_STD_PAL_BDGHIN,4,2             ## @STD_PAL_BDGHIN
	.comm	_STD_INVALID,4,2                ## @STD_INVALID
	.no_dead_strip	_tvp514x_query_current_std
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tvp514x_query_current_std
_tvp514x_query_current_std:             ; @tvp514x_query_current_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	x19, x0
Lloh0:
	adrp	x8, _REG_VIDEO_STD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_VIDEO_STD@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_tvp514x_read_reg
Lloh3:
	adrp	x20, _VIDEO_STD_MASK@GOTPAGE
Lloh4:
	ldr	x20, [x20, _VIDEO_STD_MASK@GOTPAGEOFF]
	ldr	w8, [x20]
	and	w8, w8, w0
Lloh5:
	adrp	x9, _VIDEO_STD_AUTO_SWITCH_BIT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VIDEO_STD_AUTO_SWITCH_BIT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _REG_VIDEO_STD_STATUS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_VIDEO_STD_STATUS@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tvp514x_read_reg
	ldr	w8, [x20]
	and	w8, w8, w0
LBB0_2:
Lloh11:
	adrp	x9, _STD_NTSC_MJ@GOTPAGE
Lloh12:
	ldr	x9, [x9, _STD_NTSC_MJ@GOTPAGEOFF]
Lloh13:
	adrp	x10, _STD_PAL_BDGHIN@GOTPAGE
Lloh14:
	ldr	x10, [x10, _STD_PAL_BDGHIN@GOTPAGEOFF]
Lloh15:
	adrp	x11, _STD_INVALID@GOTPAGE
Lloh16:
	ldr	x11, [x11, _STD_INVALID@GOTPAGEOFF]
	cmp	w8, #128
	csel	x10, x10, x11, eq
	cmp	w8, #129
	csel	x8, x9, x10, eq
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_VIDEO_STD,4,2              ; @REG_VIDEO_STD
	.comm	_VIDEO_STD_MASK,4,2             ; @VIDEO_STD_MASK
	.comm	_VIDEO_STD_AUTO_SWITCH_BIT,4,2  ; @VIDEO_STD_AUTO_SWITCH_BIT
	.comm	_REG_VIDEO_STD_STATUS,4,2       ; @REG_VIDEO_STD_STATUS
	.comm	_STD_NTSC_MJ,4,2                ; @STD_NTSC_MJ
	.comm	_STD_PAL_BDGHIN,4,2             ; @STD_PAL_BDGHIN
	.comm	_STD_INVALID,4,2                ; @STD_INVALID
	.no_dead_strip	_tvp514x_query_current_std
.subsections_via_symbols
