	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function libworker_dobg
_libworker_dobg:                        ## @libworker_dobg
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	addq	$32, %rdi
	callq	_log_thread_set
	movl	4(%r14), %edi
	movl	16(%rbx), %esi
	movq	_libworker_handle_control_cmd@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rcx
	callq	_tube_setup_bg_listen
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	movl	(%r14), %edi
	movl	16(%rbx), %esi
	callq	_tube_setup_bg_write
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movl	16(%rbx), %edi
	callq	_comm_base_dispatch
	movq	_UB_LIBCMD_QUIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -20(%rbp)
	movl	$1, (%rbx)
	movq	8(%rbx), %rax
	movl	4(%rax), %edi
	callq	_tube_remove_bg_listen
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_tube_remove_bg_write
	movq	%rbx, %rdi
	callq	_libworker_delete
	movl	(%r14), %edi
	leaq	-20(%rbp), %rsi
	movl	$4, %edx
	xorl	%ecx, %ecx
	callq	_tube_write_msg
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
LBB0_7:
	callq	_log_err
LBB0_8:
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"libunbound bg worker init failed, nomem"

	.comm	_libworker_handle_control_cmd,4,2 ## @libworker_handle_control_cmd
L_.str.1:                               ## @.str.1
	.asciz	"libunbound bg worker init failed, no bglisten"

L_.str.2:                               ## @.str.2
	.asciz	"libunbound bg worker init failed, no bgwrite"

	.comm	_UB_LIBCMD_QUIT,4,2             ## @UB_LIBCMD_QUIT
	.no_dead_strip	_libworker_dobg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function libworker_dobg
_libworker_dobg:                        ; @libworker_dobg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x20, [x0, #8]
	add	x0, x0, #32
	bl	_log_thread_set
	ldr	w0, [x20, #4]
	ldr	w1, [x19, #16]
Lloh0:
	adrp	x8, _libworker_handle_control_cmd@GOTPAGE
Lloh1:
	ldr	x8, [x8, _libworker_handle_control_cmd@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x3, x19
	bl	_tube_setup_bg_listen
	cbz	w0, LBB0_5
; %bb.2:
	ldr	w0, [x20]
	ldr	w1, [x19, #16]
	bl	_tube_setup_bg_write
	cbz	w0, LBB0_6
; %bb.3:
	ldr	w0, [x19, #16]
	bl	_comm_base_dispatch
Lloh3:
	adrp	x8, _UB_LIBCMD_QUIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UB_LIBCMD_QUIT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #12]
	mov	w8, #1
	str	w8, [x19]
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #4]
	bl	_tube_remove_bg_listen
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_tube_remove_bg_write
	mov	x0, x19
	bl	_libworker_delete
	ldr	w0, [x20]
	add	x1, sp, #12
	mov	w2, #4
	mov	w3, #0
	bl	_tube_write_msg
	b	LBB0_8
LBB0_4:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_7:
	bl	_log_err
LBB0_8:
	mov	x0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"libunbound bg worker init failed, nomem"

	.comm	_libworker_handle_control_cmd,4,2 ; @libworker_handle_control_cmd
l_.str.1:                               ; @.str.1
	.asciz	"libunbound bg worker init failed, no bglisten"

l_.str.2:                               ; @.str.2
	.asciz	"libunbound bg worker init failed, no bgwrite"

	.comm	_UB_LIBCMD_QUIT,4,2             ; @UB_LIBCMD_QUIT
	.no_dead_strip	_libworker_dobg
.subsections_via_symbols
