	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda998x_get_audio_ports
_tda998x_get_audio_ports:               ## @tda998x_get_audio_ports
	.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	%rsi, %rax
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	leaq	-44(%rbp), %rdx
	movq	%rax, %rdi
	callq	_of_get_property
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_17
## %bb.1:
	movq	%rax, %rbx
	movl	-44(%rbp), %r12d
	sarl	$2, %r12d
	movl	%r12d, -44(%rbp)
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	addl	%eax, %eax
	cmpl	%eax, %r12d
	jg	LBB0_3
## %bb.2:
	movl	-44(%rbp), %eax
	testb	$1, %al
	jne	LBB0_3
## %bb.5:
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, -44(%rbp)
	cmpl	$2, %eax
	jl	LBB0_17
## %bb.6:
	movq	_AUDIO_ROUTE_I2S@GOTPCREL(%rip), %r13
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_3:
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_err
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_17:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r15
	movslq	-44(%rbp), %rax
	addq	$8, %rbx
	cmpq	%rax, %r15
	jge	LBB0_16
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_be32_to_cpup
	movl	%eax, %r12d
	leaq	4(%rbx), %rdi
	callq	_be32_to_cpup
	movq	%r13, %rcx
	cmpl	$129, %r12d
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$128, %r12d
	jne	LBB0_18
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_AUDIO_ROUTE_SPDIF@GOTPCREL(%rip), %rcx
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	(%rcx), %ecx
	movq	(%r14), %rdx
	cmpl	$0, (%rdx,%rcx,4)
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, (%rdx,%rcx,4)
	jmp	LBB0_15
LBB0_16:
	xorl	%r15d, %r15d
	jmp	LBB0_17
LBB0_13:
	movq	8(%r14), %rdi
	movq	_AUDIO_ROUTE_SPDIF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.6(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.4(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_4
LBB0_18:
	movq	8(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"audio-ports"

L_.str.1:                               ## @.str.1
	.asciz	"Bad number of elements in audio-ports dt-property\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AUDIO_ROUTE_I2S,4,2            ## @AUDIO_ROUTE_I2S
	.comm	_AUDIO_ROUTE_SPDIF,4,2          ## @AUDIO_ROUTE_SPDIF
L_.str.2:                               ## @.str.2
	.asciz	"Bad audio format %u\n"

L_.str.3:                               ## @.str.3
	.asciz	"invalid zero port config\n"

L_.str.4:                               ## @.str.4
	.asciz	"%s format already configured\n"

L_.str.5:                               ## @.str.5
	.asciz	"SPDIF"

L_.str.6:                               ## @.str.6
	.asciz	"I2S"

	.no_dead_strip	_tda998x_get_audio_ports
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda998x_get_audio_ports
_tda998x_get_audio_ports:               ; @tda998x_get_audio_ports
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x8, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	mov	x0, x8
	bl	_of_get_property
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	w8, [sp, #12]
	asr	w21, w8, #2
	str	w21, [sp, #12]
	ldr	x0, [x19]
	bl	_ARRAY_SIZE
	cmp	w21, w0, lsl #1
	b.gt	LBB0_5
; %bb.2:
	ldr	w8, [sp, #12]
	tbnz	w8, #0, LBB0_5
; %bb.3:
	cmp	w8, #0
	cinc	w9, w8, lt
	asr	w9, w9, #1
	str	w9, [sp, #12]
	cmp	w8, #2
	b.lt	LBB0_16
; %bb.4:
	mov	x23, #0
Lloh2:
	adrp	x25, _AUDIO_ROUTE_I2S@GOTPAGE
Lloh3:
	ldr	x25, [x25, _AUDIO_ROUTE_I2S@GOTPAGEOFF]
Lloh4:
	adrp	x24, _AUDIO_ROUTE_SPDIF@GOTPAGE
Lloh5:
	ldr	x24, [x24, _AUDIO_ROUTE_SPDIF@GOTPAGEOFF]
Lloh6:
	adrp	x21, l_.str.3@PAGE
Lloh7:
	add	x21, x21, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_5:
	ldr	x0, [x19, #8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	bl	_dev_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	x0, [x19, #8]
	mov	x1, x21
	bl	_dev_err
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [sp, #12]
	add	x20, x20, #8
	cmp	x23, x8
	b.ge	LBB0_16
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_be32_to_cpup
	mov	x22, x0
	add	x0, x20, #4
	bl	_be32_to_cpup
	mov	x8, x25
	cmp	w22, #129
	b.eq	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	w22, #128
	b.ne	LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x8, x24
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=1
	cbz	w0, LBB0_8
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x8]
	ldr	x9, [x19]
	ldr	w10, [x9, x8, lsl #2]
	cbnz	w10, LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=1
	str	w0, [x9, x8, lsl #2]
	b	LBB0_9
LBB0_16:
	mov	w0, #0
	b	LBB0_7
LBB0_17:
	ldr	x0, [x19, #8]
	ldr	w9, [x24]
Lloh13:
	adrp	x10, l_.str.6@PAGE
Lloh14:
	add	x10, x10, l_.str.6@PAGEOFF
Lloh15:
	adrp	x11, l_.str.5@PAGE
Lloh16:
	add	x11, x11, l_.str.5@PAGEOFF
	cmp	w8, w9
	csel	x8, x11, x10, eq
	str	x8, [sp]
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_6
LBB0_18:
	ldr	x0, [x19, #8]
	str	x22, [sp]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"audio-ports"

l_.str.1:                               ; @.str.1
	.asciz	"Bad number of elements in audio-ports dt-property\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AUDIO_ROUTE_I2S,4,2            ; @AUDIO_ROUTE_I2S
	.comm	_AUDIO_ROUTE_SPDIF,4,2          ; @AUDIO_ROUTE_SPDIF
l_.str.2:                               ; @.str.2
	.asciz	"Bad audio format %u\n"

l_.str.3:                               ; @.str.3
	.asciz	"invalid zero port config\n"

l_.str.4:                               ; @.str.4
	.asciz	"%s format already configured\n"

l_.str.5:                               ; @.str.5
	.asciz	"SPDIF"

l_.str.6:                               ; @.str.6
	.asciz	"I2S"

	.no_dead_strip	_tda998x_get_audio_ports
.subsections_via_symbols
