	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tvp5150_set_std
_tvp5150_set_std:                       ## @tvp5150_set_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_tvp5150
	movq	%rax, %r14
	movq	_V4L2_STD_NTSC_443@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_VIDEO_STD_NTSC_4_43_BIT@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_2:
	movq	_V4L2_STD_PAL_M@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_4
## %bb.3:
	movq	_VIDEO_STD_PAL_M_BIT@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_4:
	movq	_V4L2_STD_PAL_N@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_V4L2_STD_PAL_Nc@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_6
## %bb.7:
	movq	_V4L2_STD_NTSC@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_VIDEO_STD_NTSC_MJ_BIT@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_6:
	movq	_VIDEO_STD_PAL_COMBINATION_N_BIT@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %ebx
LBB0_14:
	movl	(%r15), %edi
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movl	$1, %esi
	movl	%ebx, %r8d
	callq	_dev_dbg_lvl
	movl	(%r14), %edi
	movq	_TVP5150_VIDEO_STD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_regmap_write
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_V4L2_STD_PAL@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_11
## %bb.10:
	movq	_VIDEO_STD_PAL_BDGHIN_BIT@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_V4L2_STD_SECAM@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	je	LBB0_14
## %bb.12:
	movq	_VIDEO_STD_SECAM_BIT@GOTPCREL(%rip), %rax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_STD_NTSC_443,4,2          ## @V4L2_STD_NTSC_443
	.comm	_VIDEO_STD_NTSC_4_43_BIT,4,2    ## @VIDEO_STD_NTSC_4_43_BIT
	.comm	_V4L2_STD_PAL_M,4,2             ## @V4L2_STD_PAL_M
	.comm	_VIDEO_STD_PAL_M_BIT,4,2        ## @VIDEO_STD_PAL_M_BIT
	.comm	_V4L2_STD_PAL_N,4,2             ## @V4L2_STD_PAL_N
	.comm	_V4L2_STD_PAL_Nc,4,2            ## @V4L2_STD_PAL_Nc
	.comm	_VIDEO_STD_PAL_COMBINATION_N_BIT,4,2 ## @VIDEO_STD_PAL_COMBINATION_N_BIT
	.comm	_V4L2_STD_NTSC,4,2              ## @V4L2_STD_NTSC
	.comm	_VIDEO_STD_NTSC_MJ_BIT,4,2      ## @VIDEO_STD_NTSC_MJ_BIT
	.comm	_V4L2_STD_PAL,4,2               ## @V4L2_STD_PAL
	.comm	_VIDEO_STD_PAL_BDGHIN_BIT,4,2   ## @VIDEO_STD_PAL_BDGHIN_BIT
	.comm	_V4L2_STD_SECAM,4,2             ## @V4L2_STD_SECAM
	.comm	_VIDEO_STD_SECAM_BIT,4,2        ## @VIDEO_STD_SECAM_BIT
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set video std register to %d.\n"

	.comm	_TVP5150_VIDEO_STD,4,2          ## @TVP5150_VIDEO_STD
	.no_dead_strip	_tvp5150_set_std
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tvp5150_set_std
_tvp5150_set_std:                       ; @tvp5150_set_std
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x20, x0
	bl	_to_tvp5150
	mov	x19, x0
Lloh0:
	adrp	x8, _V4L2_STD_NTSC_443@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_STD_NTSC_443@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _VIDEO_STD_NTSC_4_43_BIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VIDEO_STD_NTSC_4_43_BIT@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	b	LBB0_11
LBB0_2:
Lloh6:
	adrp	x8, _V4L2_STD_PAL_M@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_STD_PAL_M@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _VIDEO_STD_PAL_M_BIT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VIDEO_STD_PAL_M_BIT@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	b	LBB0_11
LBB0_4:
Lloh12:
	adrp	x8, _V4L2_STD_PAL_N@GOTPAGE
Lloh13:
	ldr	x8, [x8, _V4L2_STD_PAL_N@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _V4L2_STD_PAL_Nc@GOTPAGE
Lloh16:
	ldr	x9, [x9, _V4L2_STD_PAL_Nc@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, w21
	ccmp	w9, w21, #4, ne
	b.ne	LBB0_6
; %bb.5:
Lloh18:
	adrp	x8, _VIDEO_STD_PAL_COMBINATION_N_BIT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VIDEO_STD_PAL_COMBINATION_N_BIT@GOTPAGEOFF]
Lloh20:
	ldr	w21, [x8]
	b	LBB0_11
LBB0_6:
Lloh21:
	adrp	x8, _V4L2_STD_NTSC@GOTPAGE
Lloh22:
	ldr	x8, [x8, _V4L2_STD_NTSC@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_8
; %bb.7:
Lloh24:
	adrp	x8, _VIDEO_STD_NTSC_MJ_BIT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _VIDEO_STD_NTSC_MJ_BIT@GOTPAGEOFF]
Lloh26:
	ldr	w21, [x8]
	b	LBB0_11
LBB0_8:
Lloh27:
	adrp	x8, _V4L2_STD_PAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _V4L2_STD_PAL@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_10
; %bb.9:
Lloh30:
	adrp	x8, _VIDEO_STD_PAL_BDGHIN_BIT@GOTPAGE
Lloh31:
	ldr	x8, [x8, _VIDEO_STD_PAL_BDGHIN_BIT@GOTPAGEOFF]
Lloh32:
	ldr	w21, [x8]
	b	LBB0_11
LBB0_10:
Lloh33:
	adrp	x8, _V4L2_STD_SECAM@GOTPAGE
Lloh34:
	ldr	x8, [x8, _V4L2_STD_SECAM@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
Lloh36:
	adrp	x9, _VIDEO_STD_SECAM_BIT@GOTPAGE
Lloh37:
	ldr	x9, [x9, _VIDEO_STD_SECAM_BIT@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	tst	w8, w21
	csel	w21, wzr, w9, eq
LBB0_11:
	ldr	w0, [x20]
Lloh39:
	adrp	x8, _debug@GOTPAGE
Lloh40:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh41:
	ldr	w2, [x8]
Lloh42:
	adrp	x3, l_.str@PAGE
Lloh43:
	add	x3, x3, l_.str@PAGEOFF
	mov	w1, #1
	mov	x4, x21
	bl	_dev_dbg_lvl
	ldr	w0, [x19]
Lloh44:
	adrp	x8, _TVP5150_VIDEO_STD@GOTPAGE
Lloh45:
	ldr	x8, [x8, _TVP5150_VIDEO_STD@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_regmap_write
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_STD_NTSC_443,4,2          ; @V4L2_STD_NTSC_443
	.comm	_VIDEO_STD_NTSC_4_43_BIT,4,2    ; @VIDEO_STD_NTSC_4_43_BIT
	.comm	_V4L2_STD_PAL_M,4,2             ; @V4L2_STD_PAL_M
	.comm	_VIDEO_STD_PAL_M_BIT,4,2        ; @VIDEO_STD_PAL_M_BIT
	.comm	_V4L2_STD_PAL_N,4,2             ; @V4L2_STD_PAL_N
	.comm	_V4L2_STD_PAL_Nc,4,2            ; @V4L2_STD_PAL_Nc
	.comm	_VIDEO_STD_PAL_COMBINATION_N_BIT,4,2 ; @VIDEO_STD_PAL_COMBINATION_N_BIT
	.comm	_V4L2_STD_NTSC,4,2              ; @V4L2_STD_NTSC
	.comm	_VIDEO_STD_NTSC_MJ_BIT,4,2      ; @VIDEO_STD_NTSC_MJ_BIT
	.comm	_V4L2_STD_PAL,4,2               ; @V4L2_STD_PAL
	.comm	_VIDEO_STD_PAL_BDGHIN_BIT,4,2   ; @VIDEO_STD_PAL_BDGHIN_BIT
	.comm	_V4L2_STD_SECAM,4,2             ; @V4L2_STD_SECAM
	.comm	_VIDEO_STD_SECAM_BIT,4,2        ; @VIDEO_STD_SECAM_BIT
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set video std register to %d.\n"

	.comm	_TVP5150_VIDEO_STD,4,2          ; @TVP5150_VIDEO_STD
	.no_dead_strip	_tvp5150_set_std
.subsections_via_symbols
