	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reslist_cleanup
_reslist_cleanup:                       ## @reslist_cleanup
	.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	_APR_SUCCESS@GOTPCREL(%rip), %r12
	movq	(%r12), %r15
	movq	(%rdi), %rax
	testq	%rax, %rax
	jle	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_pop_resource
	movq	%rax, %rbx
	decq	8(%r14)
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_destroy_resource
	cmpq	(%r12), %rax
	cmovneq	%rax, %r15
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_free_container
	movq	(%r14), %rax
	testq	%rax, %rax
	jg	LBB0_1
LBB0_3:
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 8(%r14)
	sete	%dil
	callq	_assert
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APR_SUCCESS,8,3                ## @APR_SUCCESS
	.no_dead_strip	_reslist_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reslist_cleanup
_reslist_cleanup:                       ; @reslist_cleanup
	.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, _APR_SUCCESS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _APR_SUCCESS@GOTPAGEOFF]
	ldr	x19, [x22]
	ldr	x8, [x0]
	cmp	x8, #1
	b.lt	LBB0_2
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_pop_resource
	mov	x21, x0
	ldr	x8, [x20, #8]
	sub	x8, x8, #1
	str	x8, [x20, #8]
	mov	x0, x20
	mov	x1, x21
	bl	_destroy_resource
	ldr	x8, [x22]
	cmp	x0, x8
	csel	x19, x19, x0, eq
	mov	x0, x20
	mov	x1, x21
	bl	_free_container
	ldr	x8, [x20]
	cmp	x8, #0
	b.gt	LBB0_1
LBB0_2:
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x20, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_APR_SUCCESS,8,3                ; @APR_SUCCESS
	.no_dead_strip	_reslist_cleanup
.subsections_via_symbols
