	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_audio_detect            ## -- Begin function radeon_audio_detect
	.p2align	4, 0x90
_radeon_audio_detect:                   ## @radeon_audio_detect
	.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	%edx, %r13d
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %rbx
	movq	%rsi, %rdi
	callq	_to_radeon_encoder
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_radeon_audio_chipset_supported
	testl	%eax, %eax
	je	LBB0_15
## %bb.1:
	movq	%r15, %rdi
	callq	_radeon_encoder_is_digital
	testl	%eax, %eax
	je	LBB0_15
## %bb.2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %r12
	movq	_connector_status_connected@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_13
## %bb.3:
	movq	(%r14), %rax
	movq	_DRM_MODE_CONNECTOR_DisplayPort@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.4:
	movq	%r14, %rdi
	callq	_to_radeon_connector
	movq	%rax, %rdi
	callq	_radeon_dp_getsinktype
	movq	_CONNECTOR_OBJECT_ID_DISPLAYPORT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_6
## %bb.5:
	leaq	4(%rbx), %rax
	jmp	LBB0_8
LBB0_13:
	movq	(%r12), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_14
LBB0_7:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_8
LBB0_6:
	movq	%rbx, %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, (%rcx)
	movq	%r14, %rdi
	callq	_radeon_connector_edid
	movl	%eax, %edi
	callq	_drm_detect_monitor_audio
	movq	(%r12), %rsi
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	testq	%rsi, %rsi
	jne	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	callq	_radeon_audio_get_pin
	movq	%rax, %rsi
	movq	%rax, (%r12)
LBB0_11:
	movq	%rbx, %rdi
	movl	$15, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_radeon_audio_enable            ## TAILCALL
LBB0_12:
	movq	%rbx, %rdi
LBB0_14:
	xorl	%edx, %edx
	callq	_radeon_audio_enable
	movq	$0, (%r12)
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_connector_status_connected,4,2 ## @connector_status_connected
	.comm	_DRM_MODE_CONNECTOR_DisplayPort,8,3 ## @DRM_MODE_CONNECTOR_DisplayPort
	.comm	_CONNECTOR_OBJECT_ID_DISPLAYPORT,8,3 ## @CONNECTOR_OBJECT_ID_DISPLAYPORT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_audio_detect            ; -- Begin function radeon_audio_detect
	.p2align	2
_radeon_audio_detect:                   ; @radeon_audio_detect
	.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	x23, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0, #8]
	ldr	x19, [x8]
	mov	x0, x1
	bl	_to_radeon_encoder
	mov	x22, x0
	mov	x0, x19
	bl	_radeon_audio_chipset_supported
	cbz	w0, LBB0_12
; %bb.1:
	mov	x0, x20
	bl	_radeon_encoder_is_digital
	cbz	w0, LBB0_12
; %bb.2:
	ldr	x24, [x22, #8]
Lloh0:
	adrp	x8, _connector_status_connected@GOTPAGE
Lloh1:
	ldr	x8, [x8, _connector_status_connected@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w23
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x21]
Lloh3:
	adrp	x9, _DRM_MODE_CONNECTOR_DisplayPort@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRM_MODE_CONNECTOR_DisplayPort@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	mov	x0, x21
	bl	_to_radeon_connector
	bl	_radeon_dp_getsinktype
Lloh6:
	adrp	x8, _CONNECTOR_OBJECT_ID_DISPLAYPORT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CONNECTOR_OBJECT_ID_DISPLAYPORT@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	add	x9, x19, #4
	cmp	x0, x8
	csel	x8, x19, x9, ne
	b	LBB0_7
LBB0_5:
	ldr	x1, [x24]
	b	LBB0_11
LBB0_6:
	mov	x8, x19
LBB0_7:
	ldr	w8, [x8]
	str	w8, [x22]
	mov	x0, x21
	bl	_radeon_connector_edid
	bl	_drm_detect_monitor_audio
	ldr	x1, [x24]
	cbz	x0, LBB0_11
; %bb.8:
	cbnz	x1, LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_radeon_audio_get_pin
	mov	x1, x0
	str	x0, [x24]
LBB0_10:
	mov	x0, x19
	mov	w2, #15
	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	_radeon_audio_enable
LBB0_11:
	mov	x0, x19
	mov	w2, #0
	bl	_radeon_audio_enable
	str	xzr, [x24]
LBB0_12:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_connector_status_connected,4,2 ; @connector_status_connected
	.comm	_DRM_MODE_CONNECTOR_DisplayPort,8,3 ; @DRM_MODE_CONNECTOR_DisplayPort
	.comm	_CONNECTOR_OBJECT_ID_DISPLAYPORT,8,3 ; @CONNECTOR_OBJECT_ID_DISPLAYPORT
.subsections_via_symbols
