	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_global_item_ref            ## -- Begin function drm_global_item_ref
	.p2align	4, 0x90
_drm_global_item_ref:                   ## @drm_global_item_ref
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_glob@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	(%rdi), %rax
	leaq	(%rax,%rax,2), %rbx
	leaq	(,%rbx,8), %r12
	addq	%r13, %r12
	leaq	16(,%rbx,8), %r14
	addq	%r13, %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%r13,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_1
LBB0_6:
	incq	%rax
	movq	%rax, (%r12)
	movq	8(%r13,%rbx,8), %rax
	movq	%rax, 16(%r15)
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_1:
	movl	24(%r15), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	leaq	8(,%rbx,8), %rcx
	addq	%r13, %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, 8(%r13,%rbx,8)
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_3
LBB0_4:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	%rax, 16(%r15)
	movq	%r15, %rdi
	callq	*8(%r15)
	movl	%eax, %r12d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
LBB0_3:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
LBB0_7:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %rax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_glob,8,3                       ## @glob
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_global_item_ref            ; -- Begin function drm_global_item_ref
	.p2align	2
_drm_global_item_ref:                   ; @drm_global_item_ref
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
Lloh0:
	adrp	x8, _glob@GOTPAGE
Lloh1:
	ldr	x8, [x8, _glob@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	ldr	x23, [x0]
	mov	w8, #24
	madd	x24, x23, x8, x22
	add	x19, x24, #16
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x24]
	cbz	x8, LBB0_2
LBB0_1:
	add	x8, x8, #1
	str	x8, [x24]
	mov	w8, #24
	madd	x8, x23, x8, x22
	ldr	x8, [x8, #8]
	str	x8, [x20, #16]
	mov	x0, x19
	bl	_mutex_unlock
	mov	w21, #0
	b	LBB0_6
LBB0_2:
	ldr	w0, [x20, #24]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kzalloc
	mov	w8, #24
	madd	x25, x23, x8, x22
	str	x0, [x25, #8]!
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_5
LBB0_4:
	ldr	x8, [x25]
	str	x8, [x20, #16]
	ldr	x8, [x20, #8]
	mov	x0, x20
	blr	x8
	mov	x21, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
	str	xzr, [x25]
LBB0_6:
	mov	x0, x21
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x8, [x24]
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_glob,8,3                       ; @glob
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
