	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___drm_mode_object_add          ## -- Begin function __drm_mode_object_add
	.p2align	4, 0x90
___drm_mode_object_add:                 ## @__drm_mode_object_add
	.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	%r8, %r15
	movl	%ecx, %r13d
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	16(%rdi), %rax
	xorl	%edi, %edi
	cmpl	$0, (%rax)
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	jne	LBB0_3
## %bb.1:
	cmpq	$0, 8(%r12)
	je	LBB0_3
## %bb.2:
	xorl	%edi, %edi
	testq	%r15, %r15
	sete	%dil
LBB0_3:
	callq	_WARN_ON
	movq	%r12, %rdi
	callq	_mutex_lock
	leaq	4(%r12), %rdi
	xorl	%eax, %eax
	testl	%r13d, %r13d
	movq	%r14, %rsi
	cmoveq	%rax, %rsi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_idr_alloc
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_6
## %bb.4:
	movl	%ebx, (%r14)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 20(%r14)
	testq	%r15, %r15
	je	LBB0_6
## %bb.5:
	movq	%r15, 8(%r14)
	addq	$16, %r14
	movq	%r14, %rdi
	callq	_kref_init
LBB0_6:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	sarl	$31, %eax
	andl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___drm_mode_object_add          ; -- Begin function __drm_mode_object_add
	.p2align	2
___drm_mode_object_add:                 ; @__drm_mode_object_add
	.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	x20, x4
	mov	x23, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	w8, [x8]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #8]
	cmp	x20, #0
	cset	w9, eq
	cmp	x8, #0
	csel	w0, wzr, w9, eq
LBB0_3:
	bl	_WARN_ON
	mov	x0, x19
	bl	_mutex_lock
	add	x0, x19, #4
	cmp	w23, #0
	csel	x1, xzr, x21, eq
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	w2, #1
	mov	w3, #0
	bl	_idr_alloc
	mov	x23, x0
	tbnz	w0, #31, LBB0_6
; %bb.4:
	str	w23, [x21]
	str	w22, [x21, #20]
	cbz	x20, LBB0_6
; %bb.5:
	str	x20, [x21, #8]
	add	x0, x21, #16
	bl	_kref_init
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
	cmp	w23, #0
	csel	w0, w23, wzr, lt
	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	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
.subsections_via_symbols
