	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qxl_release_alloc
_qxl_release_alloc:                     ## @qxl_release_alloc
	.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	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	$48, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	$0, 16(%rax)
	movl	%r12d, (%rax)
	movq	%rax, %rdi
	addq	$24, %rdi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rax)
	callq	_INIT_LIST_HEAD
	movl	(%r13), %edi
	callq	_idr_preload
	movq	%r15, %rdi
	callq	_spin_lock
	leaq	16(%r15), %rdi
	movq	_GFP_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_idr_alloc
	movl	%eax, %r12d
	movq	8(%r15), %rax
	incq	%rax
	movq	%rax, 8(%r15)
	movq	%rax, 8(%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock
	xorl	%eax, %eax
	callq	_idr_preload_end
	testl	%r12d, %r12d
	js	LBB0_3
## %bb.4:
	movq	%rbx, (%r14)
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	callq	_DRM_DEBUG_DRIVER
	movl	%r12d, 4(%rbx)
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_5
LBB0_3:
	movq	%rbx, %rdi
	callq	_kfree
	movq	$0, (%r14)
LBB0_5:
	movl	%r12d, %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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of memory\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_NOWAIT,4,2                 ## @GFP_NOWAIT
L_.str.1:                               ## @.str.1
	.asciz	"allocated release %d\n"

	.no_dead_strip	_qxl_release_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qxl_release_alloc
_qxl_release_alloc:                     ; @qxl_release_alloc
	.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	x19, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #48
	bl	_kmalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	str	xzr, [x0, #16]
	str	w22, [x0], #24
	stp	xzr, xzr, [x20, #32]
	bl	_INIT_LIST_HEAD
	ldr	w0, [x23]
	bl	_idr_preload
	mov	x0, x21
	bl	_spin_lock
	add	x0, x21, #16
Lloh2:
	adrp	x8, _GFP_NOWAIT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_NOWAIT@GOTPAGEOFF]
Lloh4:
	ldr	w4, [x8]
	mov	x1, x20
	mov	w2, #1
	mov	w3, #0
	bl	_idr_alloc
	mov	x22, x0
	ldr	x8, [x21, #8]
	add	x8, x8, #1
	str	x8, [x21, #8]
	str	x8, [x20, #8]
	mov	x0, x21
	bl	_spin_unlock
	bl	_idr_preload_end
	tbnz	w22, #31, LBB0_4
; %bb.2:
	str	x20, [x19]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_DRM_DEBUG_DRIVER
	str	w22, [x20, #4]
	b	LBB0_5
LBB0_3:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_5
LBB0_4:
	mov	x0, x20
	bl	_kfree
	str	xzr, [x19]
LBB0_5:
	mov	x0, x22
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of memory\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_NOWAIT,4,2                 ; @GFP_NOWAIT
l_.str.1:                               ; @.str.1
	.asciz	"allocated release %d\n"

	.no_dead_strip	_qxl_release_alloc
.subsections_via_symbols
