	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda9874a_setaudmode
_tda9874a_setaudmode:                   ## @tda9874a_setaudmode
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_tda9874a_mode@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %rax
	movq	_MAXREGS@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	_tda9874a_NCONR@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edx
	movl	%edx, %edi
	orl	$1, %edi
	andl	$254, %edx
	testb	$32, -8(%rax,%rcx,4)
	cmovel	%edi, %edx
	movl	%edx, (%rsi)
	movq	_TDA9874A_NCONR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_chip_write
LBB0_2:
	leaq	8(%rbx), %rdi
	movq	_tda9874a_dic@GOTPCREL(%rip), %rax
	cmpl	$17, (%rax)
	jne	LBB0_10
## %bb.3:
	movq	(%r14), %rsi
	xorl	%edx, %edx
	testq	%rsi, %rsi
	setne	%al
	leal	-128(%r15), %ecx
	cmpl	$4, %ecx
	ja	LBB0_9
## %bb.4:
	movq	%rdi, %r14
	movb	%al, %dl
	leal	(%rdx,%rdx), %r13d
	addl	$128, %r13d
	movl	$128, %r12d
	leaq	LJTI0_1(%rip), %rax
	movslq	(%rax,%rcx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_5:
	xorl	%eax, %eax
	testq	%rsi, %rsi
	setne	%al
	leal	(%rax,%rax), %r13d
	addl	$129, %r13d
	movl	$160, %r12d
	jmp	LBB0_7
LBB0_10:
	leal	-128(%r15), %eax
	cmpl	$4, %eax
	ja	LBB0_9
## %bb.11:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	$16, %r12d
	xorl	%r13d, %r13d
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_12:
	xorl	%r12d, %r12d
	cmpq	$0, (%r14)
	je	LBB0_14
## %bb.13:
	xorl	%r13d, %r13d
	jmp	LBB0_18
LBB0_6:
	xorl	%r12d, %r12d
LBB0_7:
	movq	_TDA9874A_AOSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_chip_write
	movq	_TDA9874A_MDACOSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_chip_write
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, (%rsp)
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%r14, %rdx
	movl	%r15d, %r8d
	movl	%r12d, %r9d
	jmp	LBB0_8
LBB0_15:
	movl	$32, %r12d
	jmp	LBB0_17
LBB0_16:
	xorl	%r12d, %r12d
LBB0_17:
	movl	$2, %r13d
LBB0_18:
	movq	_TDA9874A_FMMR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_chip_write
	movq	_TDA9874A_AOSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_chip_write
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, (%rsp)
	leaq	L_.str.1(%rip), %rcx
	movl	$1, %edi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%r15d, %r8d
	movl	%r13d, %r9d
LBB0_8:
	callq	_v4l2_dbg
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_tda9874a_ESP@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	cmpl	$1, (%rax)
	sete	%r13b
	orl	$4, %r13d
	jmp	LBB0_18
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_18
	.long	L0_0_set_15
	.long	L0_0_set_16
	.long	L0_0_set_17
.set L0_1_set_7, LBB0_7-LJTI0_1
.set L0_1_set_5, LBB0_5-LJTI0_1
.set L0_1_set_6, LBB0_6-LJTI0_1
LJTI0_1:
	.long	L0_1_set_7
	.long	L0_1_set_7
	.long	L0_1_set_5
	.long	L0_1_set_6
	.long	L0_1_set_7
	.end_data_region
                                        ## -- End function
	.comm	_tda9874a_mode,8,3              ## @tda9874a_mode
	.comm	_MAXREGS,4,2                    ## @MAXREGS
	.comm	_tda9874a_NCONR,4,2             ## @tda9874a_NCONR
	.comm	_TDA9874A_NCONR,4,2             ## @TDA9874A_NCONR
	.comm	_tda9874a_dic,4,2               ## @tda9874a_dic
	.comm	_TDA9874A_AOSR,4,2              ## @TDA9874A_AOSR
	.comm	_TDA9874A_MDACOSR,4,2           ## @TDA9874A_MDACOSR
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tda9874a_setaudmode(): req. mode %d; AOSR=0x%X, MDACOSR=0x%X.\n"

	.comm	_tda9874a_ESP,4,2               ## @tda9874a_ESP
	.comm	_TDA9874A_FMMR,4,2              ## @TDA9874A_FMMR
L_.str.1:                               ## @.str.1
	.asciz	"tda9874a_setaudmode(): req. mode %d; FMMR=0x%X, AOSR=0x%X.\n"

	.no_dead_strip	_tda9874a_setaudmode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda9874a_setaudmode
_tda9874a_setaudmode:                   ; @tda9874a_setaudmode
	.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	x19, x1
	mov	x21, x0
	add	x20, x0, #8
Lloh0:
	adrp	x24, _tda9874a_mode@GOTPAGE
Lloh1:
	ldr	x24, [x24, _tda9874a_mode@GOTPAGEOFF]
	ldr	x8, [x24]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _MAXREGS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAXREGS@GOTPAGEOFF]
Lloh4:
	ldrsw	x9, [x9]
	add	x8, x8, x9, lsl #2
	ldur	w8, [x8, #-8]
Lloh5:
	adrp	x9, _tda9874a_NCONR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _tda9874a_NCONR@GOTPAGEOFF]
	ldr	w10, [x9]
	orr	w11, w10, #0x1
	and	w10, w10, #0xfe
	tst	w8, #0x20
	csel	w2, w11, w10, eq
	str	w2, [x9]
Lloh7:
	adrp	x8, _TDA9874A_NCONR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TDA9874A_NCONR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_chip_write
LBB0_2:
Lloh10:
	adrp	x8, _tda9874a_dic@GOTPAGE
Lloh11:
	ldr	x8, [x8, _tda9874a_dic@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w8, #17
	b.ne	LBB0_6
; %bb.3:
	ldr	x8, [x24]
	cmp	x8, #0
	mov	w9, #130
	mov	w23, #128
	csel	w22, w23, w9, eq
	sub	w9, w19, #128
	cmp	w9, #4
	b.hi	LBB0_10
; %bb.4:
Lloh13:
	adrp	x10, lJTI0_1@PAGE
Lloh14:
	add	x10, x10, lJTI0_1@PAGEOFF
	adr	x11, LBB0_5
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_5:
	cmp	x8, #0
	mov	w8, #131
	mov	w9, #129
	csel	w22, w9, w8, eq
	mov	w23, #160
	b	LBB0_12
LBB0_6:
	sub	w8, w19, #128
	cmp	w8, #4
	b.hi	LBB0_10
; %bb.7:
	mov	w23, #0
	mov	w22, #16
Lloh15:
	adrp	x9, lJTI0_0@PAGE
Lloh16:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_8
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_8:
	ldr	x8, [x24]
	cbz	x8, LBB0_19
; %bb.9:
	mov	w23, #0
	mov	w22, #0
	b	LBB0_17
LBB0_10:
	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
LBB0_11:
	mov	w23, #0
LBB0_12:
Lloh17:
	adrp	x8, _TDA9874A_AOSR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TDA9874A_AOSR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x23
	bl	_chip_write
Lloh20:
	adrp	x8, _TDA9874A_MDACOSR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TDA9874A_MDACOSR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x22
	bl	_chip_write
Lloh23:
	adrp	x8, _debug@GOTPAGE
Lloh24:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x3, l_.str@PAGE
Lloh27:
	add	x3, x3, l_.str@PAGEOFF
	b	LBB0_18
LBB0_13:
	mov	w22, #32
	b	LBB0_16
LBB0_14:
	mov	w22, #0
	b	LBB0_16
LBB0_15:
	mov	w22, #16
LBB0_16:
	mov	w23, #2
LBB0_17:
Lloh28:
	adrp	x8, _TDA9874A_FMMR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _TDA9874A_FMMR@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x23
	bl	_chip_write
Lloh31:
	adrp	x8, _TDA9874A_AOSR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _TDA9874A_AOSR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x22
	bl	_chip_write
Lloh34:
	adrp	x8, _debug@GOTPAGE
Lloh35:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
Lloh37:
	adrp	x3, l_.str.1@PAGE
Lloh38:
	add	x3, x3, l_.str.1@PAGEOFF
LBB0_18:
	mov	w0, #1
	mov	x2, x20
	mov	x4, x19
	mov	x5, x23
	mov	x6, x22
	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
	b	_v4l2_dbg
LBB0_19:
	mov	w22, #0
Lloh39:
	adrp	x8, _tda9874a_ESP@GOTPAGE
Lloh40:
	ldr	x8, [x8, _tda9874a_ESP@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	cmp	w8, #1
	mov	w8, #4
	cinc	w23, w8, eq
	b	LBB0_17
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_17-LBB0_8)>>2
	.byte	(LBB0_13-LBB0_8)>>2
	.byte	(LBB0_14-LBB0_8)>>2
	.byte	(LBB0_15-LBB0_8)>>2
lJTI0_1:
	.byte	(LBB0_12-LBB0_5)>>2
	.byte	(LBB0_12-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_11-LBB0_5)>>2
	.byte	(LBB0_12-LBB0_5)>>2
                                        ; -- End function
	.comm	_tda9874a_mode,8,3              ; @tda9874a_mode
	.comm	_MAXREGS,4,2                    ; @MAXREGS
	.comm	_tda9874a_NCONR,4,2             ; @tda9874a_NCONR
	.comm	_TDA9874A_NCONR,4,2             ; @TDA9874A_NCONR
	.comm	_tda9874a_dic,4,2               ; @tda9874a_dic
	.comm	_TDA9874A_AOSR,4,2              ; @TDA9874A_AOSR
	.comm	_TDA9874A_MDACOSR,4,2           ; @TDA9874A_MDACOSR
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tda9874a_setaudmode(): req. mode %d; AOSR=0x%X, MDACOSR=0x%X.\n"

	.comm	_tda9874a_ESP,4,2               ; @tda9874a_ESP
	.comm	_TDA9874A_FMMR,4,2              ; @TDA9874A_FMMR
l_.str.1:                               ; @.str.1
	.asciz	"tda9874a_setaudmode(): req. mode %d; FMMR=0x%X, AOSR=0x%X.\n"

	.no_dead_strip	_tda9874a_setaudmode
.subsections_via_symbols
