	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decoder_set_norm
_decoder_set_norm:                      ## @decoder_set_norm
	.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	%esi, %ebx
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rsi
	movl	$4, %edi
	movl	%ebx, %edx
	callq	_PDEBUG
	cmpl	$128, (%r12)
	jne	LBB0_7
## %bb.1:
	movq	_VIDEO_MODE_NTSC@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	movl	$64, %edx
	movl	$0, %r15d
	cmpl	%ebx, (%rax)
	je	LBB0_6
## %bb.2:
	movq	_VIDEO_MODE_PAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	cmpl	%ebx, (%rax)
	jne	LBB0_4
## %bb.3:
	xorl	%edx, %edx
	jmp	LBB0_6
LBB0_4:
	movq	_VIDEO_MODE_AUTO@GOTPCREL(%rip), %rax
	movl	$128, %edx
	cmpl	%ebx, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_VIDEO_MODE_SECAM@GOTPCREL(%rip), %rax
	movl	$80, %r15d
	movl	$0, %edx
	cmpl	%ebx, (%rax)
	jne	LBB0_7
LBB0_6:
	movq	%r12, %rdi
	movl	$8, %esi
	movl	$192, %ecx
	callq	_i2c_w_mask
	movq	%r12, %rdi
	movl	$14, %esi
	movl	%r15d, %edx
	movl	$112, %ecx
	callq	_i2c_w_mask
	jmp	LBB0_8
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d"

	.comm	_VIDEO_MODE_NTSC,4,2            ## @VIDEO_MODE_NTSC
	.comm	_VIDEO_MODE_PAL,4,2             ## @VIDEO_MODE_PAL
	.comm	_VIDEO_MODE_AUTO,4,2            ## @VIDEO_MODE_AUTO
	.comm	_VIDEO_MODE_SECAM,4,2           ## @VIDEO_MODE_SECAM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_decoder_set_norm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decoder_set_norm
_decoder_set_norm:                      ; @decoder_set_norm
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #4
	mov	x2, x20
	bl	_PDEBUG
	ldr	w8, [x19]
	cmp	w8, #128
	b.ne	LBB0_10
; %bb.1:
Lloh2:
	adrp	x8, _VIDEO_MODE_NTSC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VIDEO_MODE_NTSC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_3
; %bb.2:
	mov	w20, #0
	mov	w2, #64
	b	LBB0_9
LBB0_3:
Lloh5:
	adrp	x8, _VIDEO_MODE_PAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VIDEO_MODE_PAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_5
; %bb.4:
	mov	w2, #0
	mov	w20, #0
	b	LBB0_9
LBB0_5:
Lloh8:
	adrp	x8, _VIDEO_MODE_AUTO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VIDEO_MODE_AUTO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_7
; %bb.6:
	mov	w20, #0
	mov	w2, #128
	b	LBB0_9
LBB0_7:
Lloh11:
	adrp	x8, _VIDEO_MODE_SECAM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VIDEO_MODE_SECAM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_10
; %bb.8:
	mov	w2, #0
	mov	w20, #80
LBB0_9:
	mov	x0, x19
	mov	w1, #8
	mov	w3, #192
	bl	_i2c_w_mask
	mov	x0, x19
	mov	w1, #14
	mov	x2, x20
	mov	w3, #112
	bl	_i2c_w_mask
	mov	w0, #0
	b	LBB0_11
LBB0_10:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d"

	.comm	_VIDEO_MODE_NTSC,4,2            ; @VIDEO_MODE_NTSC
	.comm	_VIDEO_MODE_PAL,4,2             ; @VIDEO_MODE_PAL
	.comm	_VIDEO_MODE_AUTO,4,2            ; @VIDEO_MODE_AUTO
	.comm	_VIDEO_MODE_SECAM,4,2           ; @VIDEO_MODE_SECAM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_decoder_set_norm
.subsections_via_symbols
