	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_hpd_irq
_handle_hpd_irq:                        ## @handle_hpd_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	16(%rdi), %r15
	movq	_dc_connection_none@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movl	%eax, -44(%rbp)
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpl	$0, (%rbx)
	je	LBB0_2
## %bb.1:
	movl	$0, (%rbx)
LBB0_2:
	leaq	8(%rbx), %r12
	movl	24(%rbx), %edi
	leaq	-44(%rbp), %rsi
	callq	_dc_link_detect_sink
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	cmpq	$0, (%r12)
	jne	LBB0_5
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	cmpq	$0, (%r12)
	je	LBB0_7
LBB0_5:
	movl	-44(%rbp), %eax
	cmpl	(%r13), %eax
	jne	LBB0_7
## %bb.6:
	movl	24(%rbx), %edi
	callq	_emulated_link_detect
	jmp	LBB0_9
LBB0_7:
	movl	24(%rbx), %edi
	movq	_DETECT_REASON_HPD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dc_link_detect
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	%rbx, %rdi
	callq	_amdgpu_dm_update_connector_after_detect
LBB0_9:
	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	8(%rbx), %rax
	movq	_DRM_FORCE_UNSPECIFIED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	callq	_drm_kms_helper_hotplug_event
LBB0_11:
	movq	%r14, %rdi
	callq	_mutex_unlock
	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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"KMS: Failed to detect connector\n"

	.comm	_DRM_FORCE_UNSPECIFIED,8,3      ## @DRM_FORCE_UNSPECIFIED
	.comm	_DETECT_REASON_HPD,4,2          ## @DETECT_REASON_HPD
	.no_dead_strip	_handle_hpd_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_irq
_handle_hpd_irq:                        ; @handle_hpd_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	x21, x0
	ldr	x20, [x0, #16]
Lloh0:
	adrp	x23, _dc_connection_none@GOTPAGE
Lloh1:
	ldr	x23, [x23, _dc_connection_none@GOTPAGEOFF]
	ldr	w8, [x23]
	str	w8, [sp, #12]
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x21]
	cbz	w8, LBB0_2
; %bb.1:
	str	wzr, [x21]
LBB0_2:
	add	x22, x21, #8
	ldr	w0, [x21, #24]
	add	x1, sp, #12
	bl	_dc_link_detect_sink
	cbz	w0, LBB0_4
; %bb.3:
	ldr	x8, [x22]
	cbnz	x8, LBB0_5
	b	LBB0_7
LBB0_4:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	ldr	x8, [x22]
	cbz	x8, LBB0_7
LBB0_5:
	ldr	w8, [sp, #12]
	ldr	w9, [x23]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.6:
	ldr	w0, [x21, #24]
	bl	_emulated_link_detect
	b	LBB0_9
LBB0_7:
	ldr	w0, [x21, #24]
Lloh4:
	adrp	x8, _DETECT_REASON_HPD@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DETECT_REASON_HPD@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_dc_link_detect
	cbz	x0, LBB0_11
; %bb.8:
	mov	x0, x21
	bl	_amdgpu_dm_update_connector_after_detect
LBB0_9:
	mov	x0, x20
	bl	_drm_modeset_lock_all
	mov	x0, x20
	mov	x1, x22
	bl	_dm_restore_drm_connector_state
	mov	x0, x20
	bl	_drm_modeset_unlock_all
	ldr	x8, [x21, #8]
Lloh7:
	adrp	x9, _DRM_FORCE_UNSPECIFIED@GOTPAGE
Lloh8:
	ldr	x9, [x9, _DRM_FORCE_UNSPECIFIED@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_drm_kms_helper_hotplug_event
LBB0_11:
	mov	x0, x19
	bl	_mutex_unlock
	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	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_dc_connection_none,4,2         ; @dc_connection_none
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"KMS: Failed to detect connector\n"

	.comm	_DRM_FORCE_UNSPECIFIED,8,3      ; @DRM_FORCE_UNSPECIFIED
	.comm	_DETECT_REASON_HPD,4,2          ; @DETECT_REASON_HPD
	.no_dead_strip	_handle_hpd_irq
.subsections_via_symbols
