	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___drm_mode_object_find         ## -- Begin function __drm_mode_object_find
	.p2align	4, 0x90
___drm_mode_object_find:                ## @__drm_mode_object_find
	.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	%rcx, %r13
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_mutex_lock
	leaq	4(%r14), %rdi
	movq	%r12, %rsi
	callq	_idr_find
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %rbx
	movq	_DRM_MODE_OBJECT_ANY@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	je	LBB0_3
## %bb.2:
	cmpq	%r13, (%rbx)
	jne	LBB0_11
LBB0_3:
	cmpq	%r12, 8(%rbx)
	jne	LBB0_11
## %bb.4:
	movq	(%rbx), %rdi
	callq	_drm_mode_object_lease_required
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	8(%rbx), %rsi
	movq	%r15, %rdi
	callq	__drm_lease_held
	testl	%eax, %eax
	je	LBB0_11
LBB0_6:
	cmpq	$0, 24(%rbx)
	je	LBB0_12
## %bb.7:
	leaq	16(%rbx), %rdi
	callq	_kref_get_unless_zero
	xorl	%ecx, %ecx
	testl	%eax, %eax
	cmoveq	%rcx, %rbx
	jmp	LBB0_12
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_OBJECT_ANY,8,3        ## @DRM_MODE_OBJECT_ANY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___drm_mode_object_find         ; -- Begin function __drm_mode_object_find
	.p2align	2
___drm_mode_object_find:                ; @__drm_mode_object_find
	.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, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	bl	_mutex_lock
	add	x0, x19, #4
	mov	x1, x22
	bl	_idr_find
	mov	x20, x0
	cbz	x0, LBB0_9
; %bb.1:
Lloh0:
	adrp	x8, _DRM_MODE_OBJECT_ANY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_MODE_OBJECT_ANY@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x23
	b.eq	LBB0_3
; %bb.2:
	ldr	x8, [x20]
	cmp	x8, x23
	b.ne	LBB0_8
LBB0_3:
	ldr	x8, [x20, #8]
	cmp	x8, x22
	b.ne	LBB0_8
; %bb.4:
	ldr	x0, [x20]
	bl	_drm_mode_object_lease_required
	cbz	x0, LBB0_6
; %bb.5:
	ldr	x1, [x20, #8]
	mov	x0, x21
	bl	__drm_lease_held
	cbz	w0, LBB0_8
LBB0_6:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_9
; %bb.7:
	add	x0, x20, #16
	bl	_kref_get_unless_zero
	cmp	w0, #0
	csel	x20, xzr, x20, eq
	b	LBB0_9
LBB0_8:
	mov	x20, #0
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_OBJECT_ANY,8,3        ; @DRM_MODE_OBJECT_ANY
.subsections_via_symbols
