	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_hdmi_prepare
_dw_hdmi_prepare:                       ## @dw_hdmi_prepare
	.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
	movq	8(%rdi), %rbx
	movq	16(%rdi), %r15
	movl	(%rbx), %eax
	cmpl	$26, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$10, %eax
	jne	LBB0_3
## %bb.2:
	movq	_HDMI_AHB_DMA_CONF0_BURST_MODE@GOTPCREL(%rip), %rax
	movq	_HDMI_AHB_DMA_CONF0_INCR4@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	orl	(%rax), %r12d
	xorl	%eax, %eax
	cmpl	$2, (%r15)
	sete	%al
	leal	(%rax,%rax), %r13d
	addl	$124, %r13d
	jmp	LBB0_5
LBB0_4:
	movq	_HDMI_AHB_DMA_CONF0_BURST_MODE@GOTPCREL(%rip), %rax
	movq	_HDMI_AHB_DMA_CONF0_INCR8@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	orl	(%rax), %r12d
	movl	$128, %r13d
LBB0_5:
	movl	48(%rbx), %edi
	movl	16(%r15), %esi
	callq	_dw_hdmi_set_sample_rate
	movl	%r13d, %eax
	shll	$5, %eax
	movl	%eax, 12(%r15)
	movq	_HDMI_AHB_DMA_CONF0_EN_HLOCK@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	_default_hdmi_channel_config@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%r15), %rcx
	movl	-16(%rax,%rcx,8), %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	-12(%rax,%rcx,8), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_HDMI_AHB_DMA_THRSLD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	56(%rbx), %rsi
	movl	%r13d, %edi
	callq	_writeb_relaxed
	movq	_HDMI_AHB_DMA_CONF0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	56(%rbx), %rsi
	movl	%r12d, %edi
	callq	_writeb_relaxed
	movq	_HDMI_AHB_DMA_CONF1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	56(%rbx), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_writeb_relaxed
	movl	48(%rbx), %edi
	movl	(%r15), %esi
	callq	_dw_hdmi_set_channel_count
	movl	48(%rbx), %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_dw_hdmi_set_channel_allocation
	movl	4(%r15), %eax
	cmpl	$129, %eax
	je	LBB0_6
## %bb.7:
	cmpl	$128, %eax
	jne	LBB0_10
## %bb.8:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_dw_hdmi_create_cs
	movq	_dw_hdmi_reformat_s24@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_6:
	movq	_dw_hdmi_reformat_iec958@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
LBB0_10:
	movq	$0, 32(%rbx)
	movl	(%r15), %eax
	movl	%eax, 4(%rbx)
	movl	8(%r15), %eax
	movl	%eax, 24(%rbx)
	movl	4(%r14), %eax
	movl	%eax, 20(%rbx)
	movl	(%r14), %eax
	movl	%eax, 16(%rbx)
	movq	%r14, %rdi
	callq	_snd_pcm_lib_period_bytes
	movl	%eax, 12(%rbx)
	movq	%r14, %rdi
	callq	_snd_pcm_lib_buffer_bytes
	movl	%eax, 8(%rbx)
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDMI_AHB_DMA_CONF0_BURST_MODE,4,2 ## @HDMI_AHB_DMA_CONF0_BURST_MODE
	.comm	_HDMI_AHB_DMA_CONF0_INCR4,4,2   ## @HDMI_AHB_DMA_CONF0_INCR4
	.comm	_HDMI_AHB_DMA_CONF0_INCR8,4,2   ## @HDMI_AHB_DMA_CONF0_INCR8
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HDMI_AHB_DMA_CONF0_EN_HLOCK,4,2 ## @HDMI_AHB_DMA_CONF0_EN_HLOCK
	.comm	_default_hdmi_channel_config,8,3 ## @default_hdmi_channel_config
	.comm	_HDMI_AHB_DMA_THRSLD,8,3        ## @HDMI_AHB_DMA_THRSLD
	.comm	_HDMI_AHB_DMA_CONF0,8,3         ## @HDMI_AHB_DMA_CONF0
	.comm	_HDMI_AHB_DMA_CONF1,8,3         ## @HDMI_AHB_DMA_CONF1
	.comm	_dw_hdmi_reformat_iec958,4,2    ## @dw_hdmi_reformat_iec958
	.comm	_dw_hdmi_reformat_s24,4,2       ## @dw_hdmi_reformat_s24
	.no_dead_strip	_dw_hdmi_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_hdmi_prepare
_dw_hdmi_prepare:                       ; @dw_hdmi_prepare
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
	ldp	x19, x21, [x0, #8]
	ldr	w8, [x19]
	cmp	w8, #26
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #10
	b.ne	LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _HDMI_AHB_DMA_CONF0_BURST_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDMI_AHB_DMA_CONF0_BURST_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _HDMI_AHB_DMA_CONF0_INCR4@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HDMI_AHB_DMA_CONF0_INCR4@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w23, w9, w8
	ldr	w8, [x21]
	mov	w9, #124
	mov	w10, #126
	cmp	w8, #2
	csel	w22, w10, w9, eq
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _HDMI_AHB_DMA_CONF0_BURST_MODE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HDMI_AHB_DMA_CONF0_BURST_MODE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _HDMI_AHB_DMA_CONF0_INCR8@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HDMI_AHB_DMA_CONF0_INCR8@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w23, w9, w8
	mov	w22, #128
LBB0_4:
	ldr	w0, [x19, #48]
	ldr	w1, [x21, #16]
	bl	_dw_hdmi_set_sample_rate
	lsl	w8, w22, #5
	str	w8, [x21, #12]
Lloh12:
	adrp	x8, _HDMI_AHB_DMA_CONF0_EN_HLOCK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HDMI_AHB_DMA_CONF0_EN_HLOCK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w23, w8, w23
Lloh15:
	adrp	x8, _default_hdmi_channel_config@GOTPAGE
Lloh16:
	ldr	x8, [x8, _default_hdmi_channel_config@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	ldrsw	x9, [x21]
	add	x8, x8, x9, lsl #3
	ldp	w24, w25, [x8, #-16]
	ldr	x8, [x19, #56]
Lloh18:
	adrp	x9, _HDMI_AHB_DMA_THRSLD@GOTPAGE
Lloh19:
	ldr	x9, [x9, _HDMI_AHB_DMA_THRSLD@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x22
	bl	_writeb_relaxed
	ldr	x8, [x19, #56]
Lloh21:
	adrp	x9, _HDMI_AHB_DMA_CONF0@GOTPAGE
Lloh22:
	ldr	x9, [x9, _HDMI_AHB_DMA_CONF0@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x23
	bl	_writeb_relaxed
	ldr	x8, [x19, #56]
Lloh24:
	adrp	x9, _HDMI_AHB_DMA_CONF1@GOTPAGE
Lloh25:
	ldr	x9, [x9, _HDMI_AHB_DMA_CONF1@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x24
	bl	_writeb_relaxed
	ldr	w0, [x19, #48]
	ldr	w1, [x21]
	bl	_dw_hdmi_set_channel_count
	ldr	w0, [x19, #48]
	mov	x1, x25
	bl	_dw_hdmi_set_channel_allocation
	ldr	w8, [x21, #4]
	cmp	w8, #129
	b.eq	LBB0_8
; %bb.5:
	cmp	w8, #128
	b.ne	LBB0_10
; %bb.6:
	mov	x0, x19
	mov	x1, x21
	bl	_dw_hdmi_create_cs
Lloh27:
	adrp	x8, _dw_hdmi_reformat_s24@GOTPAGE
Lloh28:
	ldr	x8, [x8, _dw_hdmi_reformat_s24@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh29:
	adrp	x8, _EINVAL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_8:
Lloh32:
	adrp	x8, _dw_hdmi_reformat_iec958@GOTPAGE
Lloh33:
	ldr	x8, [x8, _dw_hdmi_reformat_iec958@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	str	w8, [x19, #40]
LBB0_10:
	str	xzr, [x19, #32]
	ldr	w8, [x21]
	str	w8, [x19, #4]
	ldr	w8, [x21, #8]
	str	w8, [x19, #24]
	ldr	d0, [x20]
	str	d0, [x19, #16]
	mov	x0, x20
	bl	_snd_pcm_lib_period_bytes
	str	w0, [x19, #12]
	mov	x0, x20
	bl	_snd_pcm_lib_buffer_bytes
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #8]
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_HDMI_AHB_DMA_CONF0_BURST_MODE,4,2 ; @HDMI_AHB_DMA_CONF0_BURST_MODE
	.comm	_HDMI_AHB_DMA_CONF0_INCR4,4,2   ; @HDMI_AHB_DMA_CONF0_INCR4
	.comm	_HDMI_AHB_DMA_CONF0_INCR8,4,2   ; @HDMI_AHB_DMA_CONF0_INCR8
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HDMI_AHB_DMA_CONF0_EN_HLOCK,4,2 ; @HDMI_AHB_DMA_CONF0_EN_HLOCK
	.comm	_default_hdmi_channel_config,8,3 ; @default_hdmi_channel_config
	.comm	_HDMI_AHB_DMA_THRSLD,8,3        ; @HDMI_AHB_DMA_THRSLD
	.comm	_HDMI_AHB_DMA_CONF0,8,3         ; @HDMI_AHB_DMA_CONF0
	.comm	_HDMI_AHB_DMA_CONF1,8,3         ; @HDMI_AHB_DMA_CONF1
	.comm	_dw_hdmi_reformat_iec958,4,2    ; @dw_hdmi_reformat_iec958
	.comm	_dw_hdmi_reformat_s24,4,2       ; @dw_hdmi_reformat_s24
	.no_dead_strip	_dw_hdmi_prepare
.subsections_via_symbols
