	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_modeset_lock_all           ## -- Begin function drm_modeset_lock_all
	.p2align	4, 0x90
_drm_modeset_lock_all:                  ## @drm_modeset_lock_all
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movq	___GFP_NOFAIL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	4(%r14), %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_drm_modeset_acquire_init
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_drm_modeset_lock_all_ctx
	testl	%eax, %eax
	jns	LBB0_5
## %bb.2:
	movq	_EDEADLK@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	addl	(%r15), %eax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_drm_modeset_backoff
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_drm_modeset_lock_all_ctx
	testl	%eax, %eax
	js	LBB0_3
LBB0_5:
	movq	%rbx, %rdi
	callq	_ww_acquire_done
	movl	(%r14), %edi
	callq	_WARN_ON
	movl	%ebx, (%r14)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_drm_warn_on_modeset_not_all_locked ## TAILCALL
LBB0_7:
	movq	%rbx, %rdi
	callq	_drm_modeset_acquire_fini
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	___GFP_NOFAIL,4,2               ## @__GFP_NOFAIL
	.comm	_EDEADLK,4,2                    ## @EDEADLK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_modeset_lock_all           ; -- Begin function drm_modeset_lock_all
	.p2align	2
_drm_modeset_lock_all:                  ; @drm_modeset_lock_all
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, ___GFP_NOFAIL@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___GFP_NOFAIL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	w0, #4
	bl	_kzalloc
	mov	x20, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	add	x0, x19, #4
	bl	_mutex_lock
	mov	x0, x20
	mov	w1, #0
	bl	_drm_modeset_acquire_init
	mov	x0, x19
	mov	x1, x20
	bl	_drm_modeset_lock_all_ctx
	tbz	w0, #31, LBB0_6
; %bb.3:
Lloh6:
	adrp	x21, _EDEADLK@GOTPAGE
Lloh7:
	ldr	x21, [x21, _EDEADLK@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21]
	cmn	w0, w8
	b.ne	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_drm_modeset_backoff
	mov	x0, x19
	mov	x1, x20
	bl	_drm_modeset_lock_all_ctx
	tbnz	w0, #31, LBB0_4
LBB0_6:
	mov	x0, x20
	bl	_ww_acquire_done
	ldr	w0, [x19]
	bl	_WARN_ON
	str	w20, [x19]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_drm_warn_on_modeset_not_all_locked
LBB0_7:
	mov	x0, x20
	bl	_drm_modeset_acquire_fini
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_kfree
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	___GFP_NOFAIL,4,2               ; @__GFP_NOFAIL
	.comm	_EDEADLK,4,2                    ; @EDEADLK
.subsections_via_symbols
