	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_fb_helper_hotplug_event    ## -- Begin function drm_fb_helper_hotplug_event
	.p2align	4, 0x90
_drm_fb_helper_hotplug_event:           ## @drm_fb_helper_hotplug_event
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	movq	_drm_fbdev_emulation@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_7
## %bb.2:
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpq	$0, 40(%rbx)
	je	LBB0_3
## %bb.8:
	movl	32(%rbx), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	___drm_fb_helper_initial_config_and_unlock ## TAILCALL
LBB0_3:
	cmpq	$0, 16(%rbx)
	je	LBB0_5
## %bb.4:
	movl	28(%rbx), %edi
	callq	_drm_master_internal_acquire
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	28(%rbx), %edi
	callq	_drm_master_internal_release
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	leaq	24(%rbx), %rdi
	movq	16(%rbx), %rax
	movl	(%rax), %edx
	movl	4(%rax), %esi
	callq	_drm_client_modeset_probe
	movq	%rbx, %rdi
	callq	_drm_setup_crtcs_fb
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	4(%rbx), %edi
	callq	_drm_fb_helper_set_par
	jmp	LBB0_7
LBB0_5:
	movl	$1, (%rbx)
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_7:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_drm_fbdev_emulation,4,2        ## @drm_fbdev_emulation
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_fb_helper_hotplug_event    ; -- Begin function drm_fb_helper_hotplug_event
	.p2align	2
_drm_fb_helper_hotplug_event:           ; @drm_fb_helper_hotplug_event
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_8
; %bb.1:
Lloh0:
	adrp	x8, _drm_fbdev_emulation@GOTPAGE
Lloh1:
	ldr	x8, [x8, _drm_fbdev_emulation@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_8
; %bb.2:
	mov	x19, x0
	add	x20, x0, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w1, [x19, #32]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	___drm_fb_helper_initial_config_and_unlock
LBB0_4:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_7
; %bb.5:
	ldr	w0, [x19, #28]
	bl	_drm_master_internal_acquire
	cbz	w0, LBB0_7
; %bb.6:
	ldr	w0, [x19, #28]
	bl	_drm_master_internal_release
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	add	x0, x19, #24
	ldr	x8, [x19, #16]
	ldp	w2, w1, [x8]
	bl	_drm_client_modeset_probe
	mov	x0, x19
	bl	_drm_setup_crtcs_fb
	mov	x0, x20
	bl	_mutex_unlock
	ldr	w0, [x19, #4]
	bl	_drm_fb_helper_set_par
	b	LBB0_8
LBB0_7:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x20
	bl	_mutex_unlock
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_drm_fbdev_emulation,4,2        ; @drm_fbdev_emulation
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

.subsections_via_symbols
