	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function remove_qp_ok
_remove_qp_ok:                          ## @remove_qp_ok
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_RES_QP_BUSY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.1:
	leaq	8(%rbx), %rdi
	callq	_atomic_read
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movq	(%rbx), %r14
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_atomic_read
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_pr_err
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	leaq	12(%rbx), %rdi
	callq	_list_empty
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	(%rbx), %rcx
	movq	_RES_QP_RESERVED@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_7
## %bb.5:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_RES_QP_BUSY,8,3                ## @RES_QP_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"resource tracker: fail to remove qp, state %d, ref_count %d\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_RES_QP_RESERVED,8,3            ## @RES_QP_RESERVED
	.comm	_EPERM,4,2                      ## @EPERM
	.no_dead_strip	_remove_qp_ok
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function remove_qp_ok
_remove_qp_ok:                          ; @remove_qp_ok
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _RES_QP_BUSY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RES_QP_BUSY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	add	x0, x19, #8
	bl	_atomic_read
	cbz	x0, LBB0_5
LBB0_2:
	ldr	x20, [x19], #8
	mov	x0, x19
	bl	_atomic_read
	mov	x2, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_err
Lloh5:
	adrp	x8, _EBUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	add	x0, x19, #12
	bl	_list_empty
	cbz	w0, LBB0_2
; %bb.6:
	ldr	x8, [x19]
Lloh7:
	adrp	x9, _RES_QP_RESERVED@GOTPAGE
Lloh8:
	ldr	x9, [x9, _RES_QP_RESERVED@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	mov	w0, #0
	b	LBB0_4
LBB0_8:
Lloh10:
	adrp	x8, _EPERM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_RES_QP_BUSY,8,3                ; @RES_QP_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"resource tracker: fail to remove qp, state %d, ref_count %d\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_RES_QP_RESERVED,8,3            ; @RES_QP_RESERVED
	.comm	_EPERM,4,2                      ; @EPERM
	.no_dead_strip	_remove_qp_ok
.subsections_via_symbols
