	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdmi_setup_stream
_hdmi_setup_stream:                     ## @hdmi_setup_stream
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r13
	cmpl	$-2138691577, (%rdi)            ## imm = 0x80862807
	jne	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	callq	_haswell_verify_pin_D0
LBB0_2:
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_snd_hda_query_pin_caps
	movq	_AC_PINCAP_HBR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.4:
	movq	_AC_VERB_GET_PIN_WIDGET_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_snd_hda_codec_read
	movl	%eax, %r15d
	movq	_AC_PINCTL_EPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	notl	%r14d
	andl	%r15d, %r14d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_is_hbr_format
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:
	movq	_AC_PINCTL_EPT_NATIVE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	xorl	%r15d, %r15d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_9
LBB0_5:
	movq	_AC_PINCTL_EPT_HBR@GOTPCREL(%rip), %rax
LBB0_7:
	orl	(%rax), %r14d
	cmpl	%r14d, %r15d
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_snd_printdd
	cmpl	%r14d, %r15d
	je	LBB0_9
## %bb.8:
	movq	_AC_VERB_SET_PIN_WIDGET_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	movl	%r14d, %r8d
	callq	_snd_hda_codec_write
	movl	%r14d, %r15d
LBB0_9:
	movl	%ebx, %edi
	callq	_is_hbr_format
	testl	%r15d, %r15d
	jne	LBB0_12
## %bb.10:
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_snd_printdd
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_12:
	movl	%ebx, %r8d
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	callq	_snd_hda_codec_setup_stream
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AC_PINCAP_HBR,4,2              ## @AC_PINCAP_HBR
	.comm	_AC_VERB_GET_PIN_WIDGET_CONTROL,4,2 ## @AC_VERB_GET_PIN_WIDGET_CONTROL
	.comm	_AC_PINCTL_EPT,4,2              ## @AC_PINCTL_EPT
	.comm	_AC_PINCTL_EPT_HBR,4,2          ## @AC_PINCTL_EPT_HBR
	.comm	_AC_PINCTL_EPT_NATIVE,4,2       ## @AC_PINCTL_EPT_NATIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hdmi_setup_stream: NID=0x%x, %spinctl=0x%x\n"

L_.str.1:                               ## @.str.1
	.space	1

L_.str.2:                               ## @.str.2
	.asciz	"new-"

	.comm	_AC_VERB_SET_PIN_WIDGET_CONTROL,4,2 ## @AC_VERB_SET_PIN_WIDGET_CONTROL
L_.str.3:                               ## @.str.3
	.asciz	"hdmi_setup_stream: HBR is not supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_hdmi_setup_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdmi_setup_stream
_hdmi_setup_stream:                     ; @hdmi_setup_stream
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x4
	mov	x20, x3
	mov	x23, x2
	mov	x21, x1
	mov	x22, x0
	ldr	w8, [x0]
	mov	w9, #10247
	movk	w9, #32902, lsl #16
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_haswell_verify_pin_D0
LBB0_2:
	mov	x0, x22
	mov	x1, x23
	bl	_snd_hda_query_pin_caps
Lloh0:
	adrp	x8, _AC_PINCAP_HBR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AC_PINCAP_HBR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.3:
Lloh3:
	adrp	x8, _AC_VERB_GET_PIN_WIDGET_CONTROL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AC_VERB_GET_PIN_WIDGET_CONTROL@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x22
	mov	x1, x23
	mov	w2, #0
	mov	w4, #0
	bl	_snd_hda_codec_read
	mov	x24, x0
Lloh6:
	adrp	x8, _AC_PINCTL_EPT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AC_PINCTL_EPT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	bic	w25, w0, w8
	mov	x0, x19
	bl	_is_hbr_format
Lloh9:
	adrp	x8, _AC_PINCTL_EPT_NATIVE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AC_PINCTL_EPT_NATIVE@GOTPAGEOFF]
Lloh11:
	adrp	x9, _AC_PINCTL_EPT_HBR@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AC_PINCTL_EPT_HBR@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	orr	w25, w8, w25
Lloh13:
	adrp	x8, l_.str.2@PAGE
Lloh14:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh15:
	adrp	x9, l_.str.1@PAGE
Lloh16:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w24, w25
	csel	x8, x9, x8, eq
	stp	x8, x25, [sp, #8]
	str	x23, [sp]
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_snd_printdd
	cmp	w24, w25
	b.eq	LBB0_6
; %bb.4:
Lloh19:
	adrp	x8, _AC_VERB_SET_PIN_WIDGET_CONTROL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AC_VERB_SET_PIN_WIDGET_CONTROL@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x8]
	mov	x0, x22
	mov	x1, x23
	mov	w2, #0
	mov	x4, x25
	bl	_snd_hda_codec_write
	mov	x24, x25
	b	LBB0_6
LBB0_5:
	mov	w24, #0
LBB0_6:
	mov	x0, x19
	bl	_is_hbr_format
	cbnz	w24, LBB0_9
; %bb.7:
	cbz	x0, LBB0_9
; %bb.8:
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_snd_printdd
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	w3, #0
	mov	x4, x19
	bl	_snd_hda_codec_setup_stream
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AC_PINCAP_HBR,4,2              ; @AC_PINCAP_HBR
	.comm	_AC_VERB_GET_PIN_WIDGET_CONTROL,4,2 ; @AC_VERB_GET_PIN_WIDGET_CONTROL
	.comm	_AC_PINCTL_EPT,4,2              ; @AC_PINCTL_EPT
	.comm	_AC_PINCTL_EPT_HBR,4,2          ; @AC_PINCTL_EPT_HBR
	.comm	_AC_PINCTL_EPT_NATIVE,4,2       ; @AC_PINCTL_EPT_NATIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hdmi_setup_stream: NID=0x%x, %spinctl=0x%x\n"

l_.str.1:                               ; @.str.1
	.space	1

l_.str.2:                               ; @.str.2
	.asciz	"new-"

	.comm	_AC_VERB_SET_PIN_WIDGET_CONTROL,4,2 ; @AC_VERB_SET_PIN_WIDGET_CONTROL
l_.str.3:                               ; @.str.3
	.asciz	"hdmi_setup_stream: HBR is not supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_hdmi_setup_stream
.subsections_via_symbols
