	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qxl_alloc_surface_release_reserved ## -- Begin function qxl_alloc_surface_release_reserved
	.p2align	4, 0x90
_qxl_alloc_surface_release_reserved:    ## @qxl_alloc_surface_release_reserved
	.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	%rcx, %r12
	movq	%rdx, %rbx
	movq	%rdi, %r14
	movq	_QXL_RELEASE_SURFACE_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.1:
	movq	_QXL_SURFACE_CMD_DESTROY@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_5
## %bb.2:
	movq	%r14, %rdi
	movl	%edx, %esi
	movq	%r12, %rdx
	callq	_qxl_release_alloc
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	movq	8(%rbx), %rsi
	movq	(%r12), %rax
	movq	%rsi, 8(%rax)
	movq	(%rbx), %rax
	addq	$64, %rax
	movq	(%r12), %rdi
	movq	%rax, (%rdi)
	callq	_qxl_release_list_add
	movq	(%r12), %rsi
	movq	%r14, %rdi
	callq	_qxl_release_map
	movl	%r15d, (%rax)
	movq	(%r12), %rsi
	movq	%r14, %rdi
	movq	%rax, %rdx
	callq	_qxl_release_unmap
	xorl	%r15d, %r15d
LBB0_4:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	movl	$4, %esi
	movq	%r12, %rcx
	xorl	%r8d, %r8d
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_qxl_alloc_release_reserved     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_QXL_SURFACE_CMD_DESTROY,4,2    ## @QXL_SURFACE_CMD_DESTROY
	.comm	_QXL_RELEASE_SURFACE_CMD,4,2    ## @QXL_RELEASE_SURFACE_CMD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qxl_alloc_surface_release_reserved ; -- Begin function qxl_alloc_surface_release_reserved
	.p2align	2
_qxl_alloc_surface_release_reserved:    ; @qxl_alloc_surface_release_reserved
	.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	x19, x3
	mov	x22, x2
	mov	x20, x0
Lloh0:
	adrp	x8, _QXL_RELEASE_SURFACE_CMD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QXL_RELEASE_SURFACE_CMD@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	cbz	x22, LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _QXL_SURFACE_CMD_DESTROY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QXL_SURFACE_CMD_DESTROY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_5
; %bb.2:
	mov	x0, x20
	mov	x1, x2
	mov	x2, x19
	bl	_qxl_release_alloc
	mov	x21, x0
	tbnz	w0, #31, LBB0_4
; %bb.3:
	ldr	x8, [x19]
	ldp	x9, x1, [x22]
	str	x1, [x8, #8]
	add	x8, x9, #64
	ldr	x0, [x19]
	str	x8, [x0]
	bl	_qxl_release_list_add
	ldr	x1, [x19]
	mov	x0, x20
	bl	_qxl_release_map
	mov	x2, x0
	str	w21, [x0]
	ldr	x1, [x19]
	mov	x0, x20
	bl	_qxl_release_unmap
	mov	w21, #0
LBB0_4:
	mov	x0, x21
	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_5:
	mov	x0, x20
	mov	w1, #4
	mov	x3, x19
	mov	x4, #0
	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	_qxl_alloc_release_reserved
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_QXL_SURFACE_CMD_DESTROY,4,2    ; @QXL_SURFACE_CMD_DESTROY
	.comm	_QXL_RELEASE_SURFACE_CMD,4,2    ; @QXL_RELEASE_SURFACE_CMD
.subsections_via_symbols
