	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hsw_dp_audio_config_update
_hsw_dp_audio_config_update:            ## @hsw_dp_audio_config_update
	.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
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_to_i915
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %ecx
	movq	(%rax), %rax
	movl	(%rax,%rcx,4), %esi
	jmp	LBB0_3
LBB0_1:
	xorl	%esi, %esi
LBB0_3:
	movl	(%r15), %r14d
	movq	%r15, %rdi
	callq	_audio_config_dp_get_n_m
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	(%r15), %esi
	movl	4(%r15), %edx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_6:
	movl	%r14d, %edi
	callq	_HSW_AUD_CFG
	movl	%eax, %edi
	callq	_I915_READ
	movq	_AUD_CONFIG_N_VALUE_INDEX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	orl	%ecx, %ebx
	movq	_AUD_CONFIG_N_PROG_ENABLE@GOTPCREL(%rip), %r12
	orl	(%r12), %ebx
	notl	%ebx
	andl	%eax, %ebx
	orl	%ecx, %ebx
	testq	%r15, %r15
	je	LBB0_8
## %bb.7:
	movq	_AUD_CONFIG_N_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	movl	4(%r15), %edi
	callq	_AUD_CONFIG_N
	orl	%ebx, %eax
	orl	(%r12), %eax
	movl	%eax, %ebx
LBB0_8:
	movl	%r14d, %edi
	callq	_HSW_AUD_CFG
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	%r14d, %edi
	callq	_HSW_AUD_M_CTS_ENABLE
	movl	%eax, %edi
	callq	_I915_READ
	movq	_AUD_CONFIG_M_MASK@GOTPCREL(%rip), %rdx
	movq	_AUD_M_CTS_M_VALUE_INDEX@GOTPCREL(%rip), %rsi
	movq	_AUD_M_CTS_M_PROG_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rsi), %ecx
	movl	(%rdx), %ebx
	orl	%ecx, %ebx
	notl	%ebx
	andl	%eax, %ebx
	testq	%r15, %r15
	je	LBB0_10
## %bb.9:
	orl	%ebx, %ecx
	orl	(%r15), %ecx
	movl	%ecx, %ebx
LBB0_10:
	movl	%r14d, %edi
	callq	_HSW_AUD_M_CTS_ENABLE
	movl	%eax, %edi
	movl	%ebx, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_WRITE                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"using Maud %u, Naud %u\n"

L_.str.1:                               ## @.str.1
	.asciz	"using automatic Maud, Naud\n"

	.comm	_AUD_CONFIG_N_VALUE_INDEX,4,2   ## @AUD_CONFIG_N_VALUE_INDEX
	.comm	_AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK,4,2 ## @AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK
	.comm	_AUD_CONFIG_N_PROG_ENABLE,4,2   ## @AUD_CONFIG_N_PROG_ENABLE
	.comm	_AUD_CONFIG_N_MASK,4,2          ## @AUD_CONFIG_N_MASK
	.comm	_AUD_CONFIG_M_MASK,4,2          ## @AUD_CONFIG_M_MASK
	.comm	_AUD_M_CTS_M_VALUE_INDEX,4,2    ## @AUD_M_CTS_M_VALUE_INDEX
	.comm	_AUD_M_CTS_M_PROG_ENABLE,4,2    ## @AUD_M_CTS_M_PROG_ENABLE
	.no_dead_strip	_hsw_dp_audio_config_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hsw_dp_audio_config_update
_hsw_dp_audio_config_update:            ; @hsw_dp_audio_config_update
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x0, #4]
	bl	_to_i915
	ldr	x8, [x0]
	ldr	w19, [x20]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w9, [x21]
	ldr	x8, [x8]
	ldr	w1, [x8, x9, lsl #2]
	b	LBB0_3
LBB0_2:
	mov	w1, #0
LBB0_3:
	mov	x0, x20
	bl	_audio_config_dp_get_n_m
	mov	x20, x0
	cbz	x0, LBB0_5
; %bb.4:
	ldp	w8, w9, [x20]
	stp	x8, x9, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
	bl	_DRM_DEBUG_KMS
	mov	x0, x19
	bl	_HSW_AUD_CFG
	bl	_I915_READ
Lloh4:
	adrp	x8, _AUD_CONFIG_N_VALUE_INDEX@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AUD_CONFIG_N_VALUE_INDEX@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w9, w9, w8
Lloh10:
	adrp	x22, _AUD_CONFIG_N_PROG_ENABLE@GOTPAGE
Lloh11:
	ldr	x22, [x22, _AUD_CONFIG_N_PROG_ENABLE@GOTPAGEOFF]
	ldr	w10, [x22]
	orr	w9, w9, w10
	bic	w9, w0, w9
	orr	w21, w9, w8
	cbz	x20, LBB0_8
; %bb.7:
Lloh12:
	adrp	x8, _AUD_CONFIG_N_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AUD_CONFIG_N_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	bic	w21, w21, w8
	ldr	w0, [x20, #4]
	bl	_AUD_CONFIG_N
	orr	w8, w0, w21
	ldr	w9, [x22]
	orr	w21, w8, w9
LBB0_8:
	mov	x0, x19
	bl	_HSW_AUD_CFG
	mov	x1, x21
	bl	_I915_WRITE
	mov	x0, x19
	bl	_HSW_AUD_M_CTS_ENABLE
	bl	_I915_READ
Lloh15:
	adrp	x8, _AUD_CONFIG_M_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AUD_CONFIG_M_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x8]
Lloh18:
	adrp	x8, _AUD_M_CTS_M_VALUE_INDEX@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AUD_M_CTS_M_VALUE_INDEX@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x10, _AUD_M_CTS_M_PROG_ENABLE@GOTPAGE
Lloh22:
	ldr	x10, [x10, _AUD_M_CTS_M_PROG_ENABLE@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	orr	w8, w10, w8
	orr	w9, w8, w9
	bic	w21, w0, w9
	cbz	x20, LBB0_10
; %bb.9:
	ldr	w9, [x20]
	orr	w8, w8, w21
	orr	w21, w8, w9
LBB0_10:
	mov	x0, x19
	bl	_HSW_AUD_M_CTS_ENABLE
	mov	x1, x21
	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
	add	sp, sp, #64
	b	_I915_WRITE
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"using Maud %u, Naud %u\n"

l_.str.1:                               ; @.str.1
	.asciz	"using automatic Maud, Naud\n"

	.comm	_AUD_CONFIG_N_VALUE_INDEX,4,2   ; @AUD_CONFIG_N_VALUE_INDEX
	.comm	_AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK,4,2 ; @AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK
	.comm	_AUD_CONFIG_N_PROG_ENABLE,4,2   ; @AUD_CONFIG_N_PROG_ENABLE
	.comm	_AUD_CONFIG_N_MASK,4,2          ; @AUD_CONFIG_N_MASK
	.comm	_AUD_CONFIG_M_MASK,4,2          ; @AUD_CONFIG_M_MASK
	.comm	_AUD_M_CTS_M_VALUE_INDEX,4,2    ; @AUD_M_CTS_M_VALUE_INDEX
	.comm	_AUD_M_CTS_M_PROG_ENABLE,4,2    ; @AUD_M_CTS_M_PROG_ENABLE
	.no_dead_strip	_hsw_dp_audio_config_update
.subsections_via_symbols
