	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ilk_audio_codec_disable
_ilk_audio_codec_disable:               ## @ilk_audio_codec_disable
	.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, %r14
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_to_i915
	movq	%rax, %r12
	movl	(%r14), %edi
	callq	_to_intel_crtc
	movl	(%rax), %r13d
	movl	(%rbx), %r15d
	movl	%r15d, %edi
	callq	_port_name
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_pipe_name
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_DRM_DEBUG_KMS
	movq	_PORT_A@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	(%rax), %r15d
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_1
## %bb.10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r12, %rdi
	callq	_HAS_PCH_IBX
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	%r13d, %edi
	callq	_IBX_AUD_CFG
	movl	%eax, %r12d
	movq	_IBX_AUD_CNTL_ST2@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	movq	%r12, %rdi
	callq	_IS_VALLEYVIEW
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	callq	_IS_CHERRYVIEW
	testq	%rax, %rax
	je	LBB0_6
LBB0_5:
	movl	%r13d, %edi
	callq	_VLV_AUD_CFG
	movl	%eax, %r12d
	movq	_VLV_AUD_CNTL_ST2@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %r13d
	movl	%r12d, %edi
	callq	_I915_READ
	movq	_AUD_CONFIG_N_VALUE_INDEX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movq	_AUD_CONFIG_N_PROG_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_AUD_CONFIG_UPPER_N_MASK@GOTPCREL(%rip), %rax
	movq	_AUD_CONFIG_LOWER_N_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	orl	(%rax), %ebx
	notl	%ebx
	andl	%ecx, %ebx
	movq	%r14, %rdi
	callq	_intel_crtc_has_dp_encoder
	xorl	%esi, %esi
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_AUD_CONFIG_N_VALUE_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_9:
	orl	%ebx, %esi
	movl	%r12d, %edi
	callq	_I915_WRITE
	movl	%r15d, %edi
	callq	_IBX_ELD_VALID
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_I915_READ
	notl	%ebx
	andl	%eax, %ebx
	movl	%r13d, %edi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_WRITE                     ## TAILCALL
LBB0_6:
	movl	%r13d, %edi
	callq	_CPT_AUD_CFG
	movl	%eax, %r12d
	movq	_CPT_AUD_CNTRL_ST2@GOTPCREL(%rip), %rax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Disable audio codec on port %c, pipe %c\n"

	.comm	_PORT_A,4,2                     ## @PORT_A
	.comm	_IBX_AUD_CNTL_ST2,4,2           ## @IBX_AUD_CNTL_ST2
	.comm	_VLV_AUD_CNTL_ST2,4,2           ## @VLV_AUD_CNTL_ST2
	.comm	_CPT_AUD_CNTRL_ST2,4,2          ## @CPT_AUD_CNTRL_ST2
	.comm	_AUD_CONFIG_N_VALUE_INDEX,4,2   ## @AUD_CONFIG_N_VALUE_INDEX
	.comm	_AUD_CONFIG_N_PROG_ENABLE,4,2   ## @AUD_CONFIG_N_PROG_ENABLE
	.comm	_AUD_CONFIG_UPPER_N_MASK,4,2    ## @AUD_CONFIG_UPPER_N_MASK
	.comm	_AUD_CONFIG_LOWER_N_MASK,4,2    ## @AUD_CONFIG_LOWER_N_MASK
	.no_dead_strip	_ilk_audio_codec_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ilk_audio_codec_disable
_ilk_audio_codec_disable:               ; @ilk_audio_codec_disable
	.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	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #4]
	bl	_to_i915
	mov	x22, x0
	ldr	w0, [x20]
	bl	_to_intel_crtc
	ldr	w21, [x0]
	ldr	w19, [x19]
	mov	x0, x19
	bl	_port_name
	mov	x23, x0
	mov	x0, x21
	bl	_pipe_name
	mov	x2, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_DRM_DEBUG_KMS
Lloh2:
	adrp	x8, _PORT_A@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PORT_A@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w19, w8
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
	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_2:
	mov	x0, x22
	bl	_HAS_PCH_IBX
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_IBX_AUD_CFG
	mov	x21, x0
Lloh5:
	adrp	x8, _IBX_AUD_CNTL_ST2@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IBX_AUD_CNTL_ST2@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	mov	x0, x22
	bl	_IS_VALLEYVIEW
	cbnz	x0, LBB0_6
; %bb.5:
	mov	x0, x22
	bl	_IS_CHERRYVIEW
	cbz	x0, LBB0_8
LBB0_6:
	mov	x0, x21
	bl	_VLV_AUD_CFG
	mov	x21, x0
Lloh7:
	adrp	x8, _VLV_AUD_CNTL_ST2@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VLV_AUD_CNTL_ST2@GOTPAGEOFF]
LBB0_7:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_I915_READ
Lloh9:
	adrp	x23, _AUD_CONFIG_N_VALUE_INDEX@GOTPAGE
Lloh10:
	ldr	x23, [x23, _AUD_CONFIG_N_VALUE_INDEX@GOTPAGEOFF]
	ldr	w8, [x23]
	bic	w8, w0, w8
Lloh11:
	adrp	x9, _AUD_CONFIG_N_PROG_ENABLE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AUD_CONFIG_N_PROG_ENABLE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh14:
	adrp	x9, _AUD_CONFIG_UPPER_N_MASK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _AUD_CONFIG_UPPER_N_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _AUD_CONFIG_LOWER_N_MASK@GOTPAGE
Lloh18:
	ldr	x10, [x10, _AUD_CONFIG_LOWER_N_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bic	w24, w8, w9
	mov	x0, x20
	bl	_intel_crtc_has_dp_encoder
	ldr	w8, [x23]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w1, w8, w24
	mov	x0, x21
	bl	_I915_WRITE
	mov	x0, x19
	bl	_IBX_ELD_VALID
	mov	x19, x0
	mov	x0, x22
	bl	_I915_READ
	bic	w1, w0, w19
	mov	x0, 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	_I915_WRITE
LBB0_8:
	mov	x0, x21
	bl	_CPT_AUD_CFG
	mov	x21, x0
Lloh20:
	adrp	x8, _CPT_AUD_CNTRL_ST2@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CPT_AUD_CNTRL_ST2@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Disable audio codec on port %c, pipe %c\n"

	.comm	_PORT_A,4,2                     ; @PORT_A
	.comm	_IBX_AUD_CNTL_ST2,4,2           ; @IBX_AUD_CNTL_ST2
	.comm	_VLV_AUD_CNTL_ST2,4,2           ; @VLV_AUD_CNTL_ST2
	.comm	_CPT_AUD_CNTRL_ST2,4,2          ; @CPT_AUD_CNTRL_ST2
	.comm	_AUD_CONFIG_N_VALUE_INDEX,4,2   ; @AUD_CONFIG_N_VALUE_INDEX
	.comm	_AUD_CONFIG_N_PROG_ENABLE,4,2   ; @AUD_CONFIG_N_PROG_ENABLE
	.comm	_AUD_CONFIG_UPPER_N_MASK,4,2    ; @AUD_CONFIG_UPPER_N_MASK
	.comm	_AUD_CONFIG_LOWER_N_MASK,4,2    ; @AUD_CONFIG_LOWER_N_MASK
	.no_dead_strip	_ilk_audio_codec_disable
.subsections_via_symbols
