	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_hpd_rx_irq
_handle_hpd_rx_irq:                     ## @handle_hpd_rx_irq
	.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	%rdi, %rbx
	movq	24(%rdi), %r15
	movq	40(%rdi), %r14
	movl	32(%rdi), %r12d
	movq	_dc_connection_none@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	(%r14), %rax
	movq	_dc_connection_mst_branch@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	leaq	4(%rbx), %rdi
	callq	_mutex_lock
LBB0_2:
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_dc_link_handle_hpd_rx_irq
	testq	%rax, %rax
	je	LBB0_13
## %bb.3:
	testl	%r12d, %r12d
	jne	LBB0_13
## %bb.4:
	leaq	16(%rbx), %r12
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_dc_link_detect_sink
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	cmpq	$0, (%r12)
	jne	LBB0_7
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	cmpq	$0, (%r12)
	je	LBB0_9
LBB0_7:
	movl	-44(%rbp), %eax
	cmpl	(%r13), %eax
	jne	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_emulated_link_detect
	jmp	LBB0_10
LBB0_9:
	movq	_DETECT_REASON_HPDRX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_dc_link_detect
	testq	%rax, %rax
	je	LBB0_13
LBB0_10:
	cmpl	$0, (%rbx)
	je	LBB0_12
## %bb.11:
	movl	$0, (%rbx)
LBB0_12:
	movq	%rbx, %rdi
	callq	_amdgpu_dm_update_connector_after_detect
	movq	%r15, %rdi
	callq	_drm_modeset_lock_all
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_dm_restore_drm_connector_state
	movq	%r15, %rdi
	callq	_drm_modeset_unlock_all
	movq	%r15, %rdi
	callq	_drm_kms_helper_hotplug_event
LBB0_13:
	movq	8(%r14), %rax
	movq	_LANE_COUNT_UNKNOWN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	_dc_connection_mst_branch@GOTPCREL(%rip), %r15
	jne	LBB0_15
## %bb.14:
	movq	(%r14), %rax
	movq	(%r15), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_16
LBB0_15:
	movq	%rbx, %rdi
	callq	_dm_handle_hpd_rx_irq
	movq	(%r14), %rax
	movq	(%r15), %rcx
LBB0_16:
	cmpq	%rcx, %rax
	je	LBB0_18
## %bb.17:
	leaq	8(%rbx), %rdi
	callq	_drm_dp_cec_irq
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dc_connection_none,4,2         ## @dc_connection_none
	.comm	_dc_connection_mst_branch,8,3   ## @dc_connection_mst_branch
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"KMS: Failed to detect connector\n"

	.comm	_DETECT_REASON_HPDRX,4,2        ## @DETECT_REASON_HPDRX
	.comm	_LANE_COUNT_UNKNOWN,8,3         ## @LANE_COUNT_UNKNOWN
	.no_dead_strip	_handle_hpd_rx_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_hpd_rx_irq
_handle_hpd_rx_irq:                     ; @handle_hpd_rx_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	ldr	x21, [x0, #24]
	ldr	x20, [x0, #40]
	ldr	w22, [x0, #32]
Lloh0:
	adrp	x24, _dc_connection_none@GOTPAGE
Lloh1:
	ldr	x24, [x24, _dc_connection_none@GOTPAGEOFF]
	ldr	w8, [x24]
	str	w8, [sp, #12]
	ldr	x8, [x20]
Lloh2:
	adrp	x23, _dc_connection_mst_branch@GOTPAGE
Lloh3:
	ldr	x23, [x23, _dc_connection_mst_branch@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	add	x0, x19, #4
	bl	_mutex_lock
LBB0_2:
	mov	x0, x20
	mov	x1, #0
	mov	x2, #0
	bl	_dc_link_handle_hpd_rx_irq
	cmp	x0, #0
	ccmp	w22, #0, #0, ne
	b.ne	LBB0_12
; %bb.3:
	add	x22, x19, #16
	add	x1, sp, #12
	mov	x0, x20
	bl	_dc_link_detect_sink
	cbz	w0, LBB0_5
; %bb.4:
	ldr	x8, [x22]
	cbnz	x8, LBB0_6
	b	LBB0_8
LBB0_5:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	ldr	x8, [x22]
	cbz	x8, LBB0_8
LBB0_6:
	ldr	w8, [sp, #12]
	ldr	w9, [x24]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_emulated_link_detect
	b	LBB0_9
LBB0_8:
Lloh6:
	adrp	x8, _DETECT_REASON_HPDRX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DETECT_REASON_HPDRX@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_dc_link_detect
	cbz	x0, LBB0_12
LBB0_9:
	ldr	w8, [x19]
	cbz	w8, LBB0_11
; %bb.10:
	str	wzr, [x19]
LBB0_11:
	mov	x0, x19
	bl	_amdgpu_dm_update_connector_after_detect
	mov	x0, x21
	bl	_drm_modeset_lock_all
	mov	x0, x21
	mov	x1, x22
	bl	_dm_restore_drm_connector_state
	mov	x0, x21
	bl	_drm_modeset_unlock_all
	mov	x0, x21
	bl	_drm_kms_helper_hotplug_event
LBB0_12:
	ldr	x8, [x20, #8]
Lloh9:
	adrp	x9, _LANE_COUNT_UNKNOWN@GOTPAGE
Lloh10:
	ldr	x9, [x9, _LANE_COUNT_UNKNOWN@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.13:
	ldr	x8, [x20]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_15
LBB0_14:
	mov	x0, x19
	bl	_dm_handle_hpd_rx_irq
	ldr	x8, [x20]
	ldr	x9, [x23]
LBB0_15:
	cmp	x8, x9
	b.eq	LBB0_17
; %bb.16:
	add	x0, x19, #8
	bl	_drm_dp_cec_irq
	add	x0, x19, #4
	bl	_mutex_unlock
LBB0_17:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_dc_connection_none,4,2         ; @dc_connection_none
	.comm	_dc_connection_mst_branch,8,3   ; @dc_connection_mst_branch
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"KMS: Failed to detect connector\n"

	.comm	_DETECT_REASON_HPDRX,4,2        ; @DETECT_REASON_HPDRX
	.comm	_LANE_COUNT_UNKNOWN,8,3         ; @LANE_COUNT_UNKNOWN
	.no_dead_strip	_handle_hpd_rx_irq
.subsections_via_symbols
