	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdmi_add_cvt
_hdmi_add_cvt:                          ## @hdmi_add_cvt
	.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, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %r12
	callq	_get_wcaps
	movl	%eax, %edi
	callq	_get_wcaps_channels
	movl	%eax, %r15d
	leaq	16(%r12), %rdi
	callq	_snd_array_new
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, 24(%rax)
	movl	$2, (%rax)
	cmpl	$16, %r15d
	ja	LBB0_4
## %bb.3:
	movl	%r15d, 4(%rax)
LBB0_4:
	leaq	16(%rax), %rdx
	leaq	12(%rax), %rcx
	addq	$8, %rax
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%rax, %r8
	callq	_snd_hda_query_supported_pcm
	testl	%eax, %eax
	js	LBB0_9
## %bb.5:
	movq	(%r12), %rbx
	movq	8(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpq	%rax, %rbx
	jae	LBB0_6
## %bb.7:
	movq	(%r12), %rax
	movq	8(%r12), %rcx
	movq	%r14, (%rcx,%rax,8)
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_6:
	movq	(%r12), %rax
LBB0_8:
	incq	%rax
	movq	%rax, (%r12)
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_hdmi_add_cvt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdmi_add_cvt
_hdmi_add_cvt:                          ; @hdmi_add_cvt
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x1
	mov	x20, x0
	ldr	x22, [x0]
	bl	_get_wcaps
	bl	_get_wcaps_channels
	mov	x21, x0
	add	x0, x22, #16
	bl	_snd_array_new
	cbz	x0, LBB0_6
; %bb.1:
	str	x19, [x0, #24]
	mov	w8, #2
	str	w8, [x0]
	cmp	w21, #16
	b.hi	LBB0_3
; %bb.2:
	str	w21, [x0, #4]
LBB0_3:
	add	x2, x0, #16
	add	x3, x0, #12
	add	x4, x0, #8
	mov	x0, x20
	mov	x1, x19
	bl	_snd_hda_query_supported_pcm
	tbnz	w0, #31, LBB0_9
; %bb.4:
	ldp	x20, x0, [x22]
	bl	_ARRAY_SIZE
	cmp	x20, x0
	b.hs	LBB0_7
; %bb.5:
	ldp	x8, x9, [x22]
	str	x19, [x9, x8, lsl #3]
	b	LBB0_8
LBB0_6:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_7:
	ldr	x8, [x22]
LBB0_8:
	mov	w0, #0
	add	x8, x8, #1
	str	x8, [x22]
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_hdmi_add_cvt
.subsections_via_symbols
