	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_drm_dp_aux_dev
_alloc_drm_dp_aux_dev:                  ## @alloc_drm_dp_aux_dev
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	%r14, 16(%rax)
	leaq	8(%rax), %rdi
	movl	$1, %esi
	callq	_atomic_set
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_kref_init
	movq	_aux_idr_mutex@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_DRM_AUX_MINORS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r12), %r8d
	movq	_aux_idr@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_idr_alloc
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_mutex_unlock
	testl	%r14d, %r14d
	js	LBB0_4
## %bb.5:
	movl	%r14d, (%rbx)
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_2
LBB0_4:
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r14d, %edi
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_aux_idr_mutex,4,2              ## @aux_idr_mutex
	.comm	_aux_idr,4,2                    ## @aux_idr
	.comm	_DRM_AUX_MINORS,4,2             ## @DRM_AUX_MINORS
	.no_dead_strip	_alloc_drm_dp_aux_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_drm_dp_aux_dev
_alloc_drm_dp_aux_dev:                  ; @alloc_drm_dp_aux_dev
	.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	x20, x0
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	str	x20, [x0, #16]
	add	x0, x0, #8
	mov	w1, #1
	bl	_atomic_set
	add	x0, x19, #4
	bl	_kref_init
Lloh2:
	adrp	x21, _aux_idr_mutex@GOTPAGE
Lloh3:
	ldr	x21, [x21, _aux_idr_mutex@GOTPAGEOFF]
	mov	x0, x21
	bl	_mutex_lock
Lloh4:
	adrp	x8, _DRM_AUX_MINORS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DRM_AUX_MINORS@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
	ldr	w4, [x22]
Lloh7:
	adrp	x0, _aux_idr@GOTPAGE
Lloh8:
	ldr	x0, [x0, _aux_idr@GOTPAGEOFF]
	mov	x1, x19
	mov	w2, #0
	bl	_idr_alloc
	mov	x20, x0
	mov	x0, x21
	bl	_mutex_unlock
	tbnz	w20, #31, LBB0_4
; %bb.2:
	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
	ret
LBB0_3:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_kfree
	mov	x0, x20
LBB0_5:
	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	_ERR_PTR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_aux_idr_mutex,4,2              ; @aux_idr_mutex
	.comm	_aux_idr,4,2                    ; @aux_idr
	.comm	_DRM_AUX_MINORS,4,2             ; @DRM_AUX_MINORS
	.no_dead_strip	_alloc_drm_dp_aux_dev
.subsections_via_symbols
