	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ub_resolve                     ## -- Begin function ub_resolve
	.p2align	4, 0x90
_ub_resolve:                            ## @ub_resolve
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	$0, (%r8)
	callq	_lock_basic_lock
	cmpl	$0, 8(%rbx)
	je	LBB0_1
LBB0_4:
	movq	%rbx, %rdi
	callq	_lock_basic_unlock
	movq	$0, (%rsp)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	movl	%r15d, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_context_new
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r15
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_libworker_fg
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_lock_basic_lock
	leaq	4(%rbx), %rdi
	movl	(%r15), %esi
	callq	_rbtree_delete
	movq	%r15, %rdi
	callq	_context_query_delete
	jmp	LBB0_3
LBB0_1:
	movq	%rbx, %rdi
	callq	_context_finalize
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %r12d
LBB0_3:
	movq	%rbx, %rdi
	callq	_lock_basic_unlock
	jmp	LBB0_10
LBB0_5:
	movq	_UB_NOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	8(%r15), %rax
	movq	16(%r15), %rcx
	movq	%rcx, 8(%rax)
	movl	24(%r15), %ecx
	movl	%ecx, (%rax)
	movq	$0, 16(%r15)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	$0, 8(%r15)
	movq	%rbx, %rdi
	callq	_lock_basic_lock
	leaq	4(%rbx), %rdi
	movl	(%r15), %esi
	callq	_rbtree_delete
	movq	%r15, %rdi
	callq	_context_query_delete
	movq	%rbx, %rdi
	callq	_lock_basic_unlock
	movq	_UB_NOERROR@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %r12d
LBB0_10:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UB_NOMEM,4,2                   ## @UB_NOMEM
	.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	_ub_resolve                     ; -- Begin function ub_resolve
	.p2align	2
_ub_resolve:                            ; @ub_resolve
	.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	x20, x4
	mov	x21, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	str	xzr, [x4]
	bl	_lock_basic_lock
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_4
LBB0_1:
	mov	x0, x19
	bl	_lock_basic_unlock
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	mov	x3, x21
	mov	x4, #0
	mov	x5, #0
	mov	x6, #0
	bl	_context_new
	cbz	x0, LBB0_7
; %bb.2:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_libworker_fg
	cbz	w0, LBB0_8
; %bb.3:
	mov	x22, x0
	mov	x0, x19
	bl	_lock_basic_lock
	add	x0, x19, #4
	ldr	w1, [x21]
	bl	_rbtree_delete
	mov	x0, x21
	bl	_context_query_delete
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_context_finalize
	cbz	w0, LBB0_1
; %bb.5:
	mov	x22, x0
LBB0_6:
	mov	x0, x19
	bl	_lock_basic_unlock
	b	LBB0_10
LBB0_7:
Lloh0:
	adrp	x8, _UB_NOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UB_NOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
	ldp	x9, x8, [x21, #8]
	str	x8, [x9, #8]
	ldr	x8, [x21, #24]
	str	w8, [x9]
	str	xzr, [x21, #16]
	str	x9, [x20]
	str	xzr, [x21, #8]
	mov	x0, x19
	bl	_lock_basic_lock
	add	x0, x19, #4
	ldr	w1, [x21]
	bl	_rbtree_delete
	mov	x0, x21
	bl	_context_query_delete
	mov	x0, x19
	bl	_lock_basic_unlock
Lloh2:
	adrp	x8, _UB_NOERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _UB_NOERROR@GOTPAGEOFF]
LBB0_9:
	ldr	w22, [x8]
LBB0_10:
	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 AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_UB_NOMEM,4,2                   ; @UB_NOMEM
	.comm	_UB_NOERROR,4,2                 ; @UB_NOERROR
.subsections_via_symbols
