	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libworker_bg                   ## -- Begin function libworker_bg
	.p2align	4, 0x90
_libworker_bg:                          ## @libworker_bg
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	leaq	12(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_lock_basic_lock
	movq	24(%r14), %r15
	movq	%rbx, %rdi
	callq	_lock_basic_unlock
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_libworker_setup
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	$1, (%rax)
	addq	$16, %r14
	movq	_libworker_dobg@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	movq	%rax, %rdx
	callq	_ub_thread_create
	movq	_UB_NOERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_UB_FORKFAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_UB_NOMEM@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UB_NOMEM,4,2                   ## @UB_NOMEM
	.comm	_UB_FORKFAIL,4,2                ## @UB_FORKFAIL
	.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                   ; -- Begin function libworker_bg
	.p2align	2
_libworker_bg:                          ; @libworker_bg
	.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
	add	x20, x0, #12
	mov	x0, x20
	bl	_lock_basic_lock
	ldr	x21, [x19, #24]
	mov	x0, x20
	bl	_lock_basic_unlock
	cbz	x21, LBB0_3
; %bb.1:
	mov	w20, #1
	mov	x0, x19
	mov	w1, #1
	mov	x2, #0
	bl	_libworker_setup
	cbz	x0, LBB0_4
; %bb.2:
	mov	x2, x0
	str	w20, [x0]
	add	x0, x19, #16
Lloh0:
	adrp	x1, _libworker_dobg@GOTPAGE
Lloh1:
	ldr	x1, [x1, _libworker_dobg@GOTPAGEOFF]
	bl	_ub_thread_create
Lloh2:
	adrp	x8, _UB_NOERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _UB_NOERROR@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
Lloh4:
	adrp	x8, _UB_FORKFAIL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _UB_FORKFAIL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _UB_NOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UB_NOMEM@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_UB_NOMEM,4,2                   ; @UB_NOMEM
	.comm	_UB_FORKFAIL,4,2                ; @UB_FORKFAIL
	.comm	_UB_NOERROR,4,2                 ; @UB_NOERROR
.subsections_via_symbols
