	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdmi_setup_audio_infoframe
_hdmi_setup_audio_infoframe:            ## @hdmi_setup_audio_infoframe
	.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
	movq	%rcx, %r13
	movl	%edx, %ebx
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	callq	_get_pin
	cmpl	$0, 8(%rax)
	je	LBB0_11
## %bb.1:
	movq	%rax, %r14
	movl	12(%rax), %r12d
	movq	(%r13), %rax
	movl	(%rax), %r13d
	movq	%r14, %rdi
	addq	$4, %rdi
	movl	%r13d, %esi
	callq	_hdmi_channel_allocation
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	-64(%rbp), %rdi
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	movl	4(%r14), %eax
	cmpl	$1, %eax
	je	LBB0_5
## %bb.2:
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movabsq	$4294967428, %rax               ## imm = 0x100000084
	movq	%rax, -64(%rbp)
	movl	$10, -56(%rbp)
	leal	-1(%r13), %eax
	movl	%eax, -52(%rbp)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -48(%rbp)
	leaq	-64(%rbp), %rdi
	callq	_hdmi_checksum_audio_infoframe
	movl	-64(%rbp), %edx
	jmp	LBB0_6
LBB0_5:
	movabsq	$115964117124, %rax             ## imm = 0x1B00000084
	movq	%rax, -64(%rbp)
	movl	$68, -56(%rbp)
	leal	-1(%r13), %eax
	movl	%eax, -52(%rbp)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -48(%rbp)
	movl	$132, %edx
LBB0_6:
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	$20, %ecx
	callq	_hdmi_infoframe_uptodate
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	cmpl	%ebx, (%r14)
	je	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_hdmi_setup_channel_mapping
	jmp	LBB0_10
LBB0_4:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_snd_printd
	jmp	LBB0_11
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	callq	_snd_printdd
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_hdmi_setup_channel_mapping
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_hdmi_stop_infoframe_trans
	movl	-64(%rbp), %edx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	$20, %ecx
	callq	_hdmi_fill_audio_infoframe
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_hdmi_start_infoframe_trans
LBB0_10:
	movl	%ebx, (%r14)
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HDMI: unknown connection type at pin %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"hdmi_setup_audio_infoframe: pin=%d channels=%d\n"

	.no_dead_strip	_hdmi_setup_audio_infoframe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function hdmi_setup_audio_infoframe
lCPI0_0:
	.long	132                             ; 0x84
	.long	27                              ; 0x1b
lCPI0_1:
	.long	132                             ; 0x84
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_hdmi_setup_audio_infoframe:            ; @hdmi_setup_audio_infoframe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x23, x3
	mov	x19, x2
	mov	x21, x0
	ldr	x0, [x0]
	bl	_get_pin
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_11
; %bb.1:
	mov	x20, x0
	ldr	w22, [x0, #12]
	ldr	x8, [x23]
	ldr	w24, [x8]
	add	x0, x0, #4
	mov	x1, x24
	bl	_hdmi_channel_allocation
	mov	x23, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #20
	bl	_memset
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.eq	LBB0_4
; %bb.2:
	cbnz	w8, LBB0_8
; %bb.3:
Lloh0:
	adrp	x8, lCPI0_1@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [sp, #8]
	mov	w8, #10
	sub	w9, w24, #1
	stp	w8, w9, [sp, #16]
	str	w23, [sp, #24]
	add	x0, sp, #8
	bl	_hdmi_checksum_audio_infoframe
	ldr	w2, [sp, #8]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, lCPI0_0@PAGE
Lloh3:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #8]
	mov	w8, #68
	sub	w9, w24, #1
	stp	w8, w9, [sp, #16]
	str	w23, [sp, #24]
	mov	w2, #132
LBB0_5:
	mov	x0, x21
	mov	x1, x22
	mov	w3, #20
	bl	_hdmi_infoframe_uptodate
	cbz	w0, LBB0_9
; %bb.6:
	ldr	w8, [x20]
	cmp	w8, w19
	b.eq	LBB0_10
; %bb.7:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	mov	x3, x23
	bl	_hdmi_setup_channel_mapping
	b	LBB0_10
LBB0_8:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_snd_printd
	b	LBB0_11
LBB0_9:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	mov	x2, x24
	bl	_snd_printdd
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	mov	x3, x23
	bl	_hdmi_setup_channel_mapping
	mov	x0, x21
	mov	x1, x22
	bl	_hdmi_stop_infoframe_trans
	ldr	w2, [sp, #8]
	mov	x0, x21
	mov	x1, x22
	mov	w3, #20
	bl	_hdmi_fill_audio_infoframe
	mov	x0, x21
	mov	x1, x22
	bl	_hdmi_start_infoframe_trans
LBB0_10:
	str	w19, [x20]
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HDMI: unknown connection type at pin %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"hdmi_setup_audio_infoframe: pin=%d channels=%d\n"

	.no_dead_strip	_hdmi_setup_audio_infoframe
.subsections_via_symbols
