	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libworker_bg_done_cb           ## -- Begin function libworker_bg_done_cb
	.p2align	4, 0x90
_libworker_bg_done_cb:                  ## @libworker_bg_done_cb
	.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	%rdi, %r13
	cmpq	$0, 24(%rdi)
	movq	8(%rdi), %rdi
	jne	LBB0_2
## %bb.1:
	movq	24(%rdi), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
LBB0_2:
	cmpq	$0, 16(%rdi)
	je	LBB0_9
## %bb.3:
	movq	8(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_lock_basic_lock
	leaq	8(%rbx), %rdi
	movl	16(%r13), %esi
	callq	_rbtree_delete
	decl	4(%rbx)
	movq	%r13, %rdi
	callq	_context_query_delete
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_lock_basic_unlock              ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%r9d, %r14d
	movq	%r8, %r15
	movq	%rdx, %r12
	movl	%ecx, (%r13)
	testq	%rdx, %rdx
	jne	LBB0_6
## %bb.5:
	movq	(%rdi), %rax
	movq	(%rax), %r12
LBB0_6:
	testl	%esi, %esi
	je	LBB0_8
## %bb.7:
	movq	_BIT_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	_error_encode
	movq	8(%r13), %rdi
LBB0_8:
	movq	_UB_NOERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%r15, %r8
	movl	%r14d, %r9d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_add_bg_result                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BIT_RD,4,2                     ## @BIT_RD
	.comm	_UB_NOERROR,4,2                 ## @UB_NOERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libworker_bg_done_cb           ; -- Begin function libworker_bg_done_cb
	.p2align	2
_libworker_bg_done_cb:                  ; @libworker_bg_done_cb
	.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, x0
	ldr	x8, [x0, #24]
	ldr	x0, [x0, #8]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x0, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
LBB0_2:
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x20, [x0, #8]
	mov	x0, x20
	bl	_lock_basic_lock
	add	x0, x20, #8
	ldr	w1, [x19, #16]
	bl	_rbtree_delete
	ldr	w8, [x20, #4]
	sub	w8, w8, #1
	str	w8, [x20, #4]
	mov	x0, x19
	bl	_context_query_delete
	mov	x0, x20
	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	_lock_basic_unlock
LBB0_4:
	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	x20, x5
	mov	x21, x4
	mov	x22, x2
	str	w3, [x19]
	cbnz	x2, LBB0_7
; %bb.6:
	ldr	x8, [x0]
	ldr	x22, [x8]
LBB0_7:
	cbz	w1, LBB0_9
; %bb.8:
Lloh0:
	adrp	x8, _BIT_RD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BIT_RD@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	x0, x22
	mov	x2, #0
	mov	w3, #0
	mov	x5, #0
	bl	_error_encode
	ldr	x0, [x19, #8]
LBB0_9:
Lloh3:
	adrp	x8, _UB_NOERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UB_NOERROR@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x1, x19
	mov	x2, x22
	mov	x4, x21
	mov	x5, x20
	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	_add_bg_result
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_BIT_RD,4,2                     ; @BIT_RD
	.comm	_UB_NOERROR,4,2                 ; @UB_NOERROR
.subsections_via_symbols
