	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda1997x_irq_audio
_tda1997x_irq_audio:                    ## @tda1997x_irq_audio
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	leaq	20(%rdi), %r15
	movq	_REG_INT_FLG_CLR_AUDIO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_io_read
	movl	%eax, %r12d
	movl	(%rbx), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_io_write
	movq	_MASK_ERROR_FIFO_PT@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_MASK_MUTE_FLG@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_4
LBB0_2:
	movq	_REG_SUS_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_io_read
	movq	_MASK_SUS_STATUS@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_LAST_STATE_REACHED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.3:
	movq	_REG_HDMI_INFO_RST@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_io_read
	movl	%eax, %ebx
	movq	_MASK_SR_FIFO_FIFO_CTRL@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_io_write
	movq	_MASK_SR_FIFO_FIFO_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	%ebx, %edx
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_io_write
	movq	_MASK_CH_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r12d
LBB0_4:
	movq	_MASK_AUDIO_FREQ_FLG@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_REG_AUDIO_FREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_io_read
                                        ## kill: def $eax killed $eax def $rax
	andl	$7, %eax
	leaq	_tda1997x_irq_audio.freq(%rip), %rcx
	movl	(%rcx,%rax,4), %edx
	movl	%edx, (%r14)
	movl	16(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_v4l_info
LBB0_6:
	movq	_MASK_AUDIO_FLG@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_17
## %bb.7:
	movq	_REG_AUDIO_FLAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_io_read
	movl	%eax, %ebx
	movq	_AUDCFG_TYPE_DST@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_BIT
	testl	%ebx, %eax
	je	LBB0_9
## %bb.8:
	movq	(%r15), %rax
	movq	%rax, 8(%r14)
LBB0_9:
	movq	_AUDCFG_TYPE_OBA@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_BIT
	testl	%ebx, %eax
	je	LBB0_11
## %bb.10:
	movq	(%r15), %rax
	movq	%rax, 8(%r14)
LBB0_11:
	movq	_AUDCFG_TYPE_HBR@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_BIT
	testl	%ebx, %eax
	je	LBB0_13
## %bb.12:
	movq	(%r15), %rax
	movq	%rax, 8(%r14)
LBB0_13:
	movq	_AUDCFG_TYPE_PCM@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_BIT
	testl	%ebx, %eax
	je	LBB0_14
## %bb.15:
	movq	(%r15), %rax
	movq	%rax, 8(%r14)
	jmp	LBB0_16
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	8(%r14), %rax
LBB0_16:
	movl	16(%r14), %edi
	movq	_audtype_names@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %edx
	leaq	L_.str.1(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_v4l_info                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_INT_FLG_CLR_AUDIO,4,2      ## @REG_INT_FLG_CLR_AUDIO
	.comm	_MASK_ERROR_FIFO_PT,4,2         ## @MASK_ERROR_FIFO_PT
	.comm	_MASK_MUTE_FLG,4,2              ## @MASK_MUTE_FLG
	.comm	_REG_SUS_STATUS,4,2             ## @REG_SUS_STATUS
	.comm	_MASK_SUS_STATUS,4,2            ## @MASK_SUS_STATUS
	.comm	_LAST_STATE_REACHED,4,2         ## @LAST_STATE_REACHED
	.comm	_REG_HDMI_INFO_RST,4,2          ## @REG_HDMI_INFO_RST
	.comm	_MASK_SR_FIFO_FIFO_CTRL,4,2     ## @MASK_SR_FIFO_FIFO_CTRL
	.comm	_MASK_CH_STATE,4,2              ## @MASK_CH_STATE
	.comm	_MASK_AUDIO_FREQ_FLG,4,2        ## @MASK_AUDIO_FREQ_FLG
	.section	__TEXT,__const
	.p2align	4                               ## @tda1997x_irq_audio.freq
_tda1997x_irq_audio.freq:
	.long	0                               ## 0x0
	.long	32000                           ## 0x7d00
	.long	44100                           ## 0xac44
	.long	48000                           ## 0xbb80
	.long	88200                           ## 0x15888
	.long	96000                           ## 0x17700
	.long	176400                          ## 0x2b110
	.long	192000                          ## 0x2ee00

	.comm	_REG_AUDIO_FREQ,4,2             ## @REG_AUDIO_FREQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Audio Frequency Change: %dHz\n"

	.comm	_MASK_AUDIO_FLG,4,2             ## @MASK_AUDIO_FLG
	.comm	_REG_AUDIO_FLAGS,4,2            ## @REG_AUDIO_FLAGS
	.comm	_AUDCFG_TYPE_DST,8,3            ## @AUDCFG_TYPE_DST
	.comm	_AUDCFG_TYPE_OBA,8,3            ## @AUDCFG_TYPE_OBA
	.comm	_AUDCFG_TYPE_HBR,8,3            ## @AUDCFG_TYPE_HBR
	.comm	_AUDCFG_TYPE_PCM,8,3            ## @AUDCFG_TYPE_PCM
L_.str.1:                               ## @.str.1
	.asciz	"Audio Type: %s\n"

	.comm	_audtype_names,8,3              ## @audtype_names
	.no_dead_strip	_tda1997x_irq_audio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda1997x_irq_audio
_tda1997x_irq_audio:                    ; @tda1997x_irq_audio
	.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, x0
	add	x20, x0, #20
Lloh0:
	adrp	x22, _REG_INT_FLG_CLR_AUDIO@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REG_INT_FLG_CLR_AUDIO@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_io_read
	mov	x21, x0
	ldr	w1, [x22]
	mov	x0, x20
	mov	x2, x21
	bl	_io_write
Lloh2:
	adrp	x8, _MASK_ERROR_FIFO_PT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MASK_ERROR_FIFO_PT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w21
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _MASK_MUTE_FLG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MASK_MUTE_FLG@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_4
LBB0_2:
Lloh8:
	adrp	x8, _REG_SUS_STATUS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_SUS_STATUS@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_io_read
Lloh11:
	adrp	x8, _MASK_SUS_STATUS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MASK_SUS_STATUS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh14:
	adrp	x9, _LAST_STATE_REACHED@GOTPAGE
Lloh15:
	ldr	x9, [x9, _LAST_STATE_REACHED@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.3:
Lloh17:
	adrp	x23, _REG_HDMI_INFO_RST@GOTPAGE
Lloh18:
	ldr	x23, [x23, _REG_HDMI_INFO_RST@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_io_read
Lloh19:
	adrp	x24, _MASK_SR_FIFO_FIFO_CTRL@GOTPAGE
Lloh20:
	ldr	x24, [x24, _MASK_SR_FIFO_FIFO_CTRL@GOTPAGEOFF]
	ldr	w8, [x24]
	orr	w22, w8, w0
	ldr	w1, [x23]
	mov	x0, x20
	mov	x2, x22
	bl	_io_write
	ldr	w8, [x24]
	bic	w2, w22, w8
	ldr	w1, [x23]
	mov	x0, x20
	bl	_io_write
Lloh21:
	adrp	x8, _MASK_CH_STATE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MASK_CH_STATE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	bic	w21, w21, w8
LBB0_4:
Lloh24:
	adrp	x8, _MASK_AUDIO_FREQ_FLG@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MASK_AUDIO_FREQ_FLG@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_6
; %bb.5:
Lloh27:
	adrp	x8, _REG_AUDIO_FREQ@GOTPAGE
Lloh28:
	ldr	x8, [x8, _REG_AUDIO_FREQ@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_io_read
	and	w8, w0, #0x7
Lloh30:
	adrp	x9, _tda1997x_irq_audio.freq@PAGE
Lloh31:
	add	x9, x9, _tda1997x_irq_audio.freq@PAGEOFF
	ldr	w2, [x9, w8, uxtw #2]
	str	w2, [x19]
	ldr	w0, [x19, #16]
Lloh32:
	adrp	x1, l_.str@PAGE
Lloh33:
	add	x1, x1, l_.str@PAGEOFF
	bl	_v4l_info
LBB0_6:
Lloh34:
	adrp	x8, _MASK_AUDIO_FLG@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MASK_AUDIO_FLG@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_15
; %bb.7:
Lloh37:
	adrp	x8, _REG_AUDIO_FLAGS@GOTPAGE
Lloh38:
	ldr	x8, [x8, _REG_AUDIO_FLAGS@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_io_read
	mov	x20, x0
Lloh40:
	adrp	x21, _AUDCFG_TYPE_DST@GOTPAGE
Lloh41:
	ldr	x21, [x21, _AUDCFG_TYPE_DST@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_BIT
	tst	w0, w20
	b.eq	LBB0_9
; %bb.8:
	ldr	x8, [x21]
	str	x8, [x19, #8]
LBB0_9:
Lloh42:
	adrp	x21, _AUDCFG_TYPE_OBA@GOTPAGE
Lloh43:
	ldr	x21, [x21, _AUDCFG_TYPE_OBA@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_BIT
	tst	w0, w20
	b.eq	LBB0_11
; %bb.10:
	ldr	x8, [x21]
	str	x8, [x19, #8]
LBB0_11:
Lloh44:
	adrp	x21, _AUDCFG_TYPE_HBR@GOTPAGE
Lloh45:
	ldr	x21, [x21, _AUDCFG_TYPE_HBR@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_BIT
	tst	w0, w20
	b.eq	LBB0_13
; %bb.12:
	ldr	x8, [x21]
	str	x8, [x19, #8]
LBB0_13:
Lloh46:
	adrp	x21, _AUDCFG_TYPE_PCM@GOTPAGE
Lloh47:
	ldr	x21, [x21, _AUDCFG_TYPE_PCM@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_BIT
	tst	w0, w20
	b.eq	LBB0_16
; %bb.14:
	ldr	x8, [x21]
	str	x8, [x19, #8]
	b	LBB0_17
LBB0_15:
	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_16:
	ldr	x8, [x19, #8]
LBB0_17:
Lloh48:
	adrp	x9, _audtype_names@GOTPAGE
Lloh49:
	ldr	x9, [x9, _audtype_names@GOTPAGEOFF]
Lloh50:
	ldr	x9, [x9]
	ldr	w2, [x9, x8, lsl #2]
	ldr	w0, [x19, #16]
Lloh51:
	adrp	x1, l_.str.1@PAGE
Lloh52:
	add	x1, x1, l_.str.1@PAGEOFF
	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	_v4l_info
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_INT_FLG_CLR_AUDIO,4,2      ; @REG_INT_FLG_CLR_AUDIO
	.comm	_MASK_ERROR_FIFO_PT,4,2         ; @MASK_ERROR_FIFO_PT
	.comm	_MASK_MUTE_FLG,4,2              ; @MASK_MUTE_FLG
	.comm	_REG_SUS_STATUS,4,2             ; @REG_SUS_STATUS
	.comm	_MASK_SUS_STATUS,4,2            ; @MASK_SUS_STATUS
	.comm	_LAST_STATE_REACHED,4,2         ; @LAST_STATE_REACHED
	.comm	_REG_HDMI_INFO_RST,4,2          ; @REG_HDMI_INFO_RST
	.comm	_MASK_SR_FIFO_FIFO_CTRL,4,2     ; @MASK_SR_FIFO_FIFO_CTRL
	.comm	_MASK_CH_STATE,4,2              ; @MASK_CH_STATE
	.comm	_MASK_AUDIO_FREQ_FLG,4,2        ; @MASK_AUDIO_FREQ_FLG
	.section	__TEXT,__const
	.p2align	2                               ; @tda1997x_irq_audio.freq
_tda1997x_irq_audio.freq:
	.long	0                               ; 0x0
	.long	32000                           ; 0x7d00
	.long	44100                           ; 0xac44
	.long	48000                           ; 0xbb80
	.long	88200                           ; 0x15888
	.long	96000                           ; 0x17700
	.long	176400                          ; 0x2b110
	.long	192000                          ; 0x2ee00

	.comm	_REG_AUDIO_FREQ,4,2             ; @REG_AUDIO_FREQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Audio Frequency Change: %dHz\n"

	.comm	_MASK_AUDIO_FLG,4,2             ; @MASK_AUDIO_FLG
	.comm	_REG_AUDIO_FLAGS,4,2            ; @REG_AUDIO_FLAGS
	.comm	_AUDCFG_TYPE_DST,8,3            ; @AUDCFG_TYPE_DST
	.comm	_AUDCFG_TYPE_OBA,8,3            ; @AUDCFG_TYPE_OBA
	.comm	_AUDCFG_TYPE_HBR,8,3            ; @AUDCFG_TYPE_HBR
	.comm	_AUDCFG_TYPE_PCM,8,3            ; @AUDCFG_TYPE_PCM
l_.str.1:                               ; @.str.1
	.asciz	"Audio Type: %s\n"

	.comm	_audtype_names,8,3              ; @audtype_names
	.no_dead_strip	_tda1997x_irq_audio
.subsections_via_symbols
