	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_newq
_handle_newq:                           ## @handle_newq
	.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
	subq	$96, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	cmpq	$0, 24(%rdi)
	movq	16(%rdi), %rdi
	je	LBB0_2
## %bb.1:
	addq	$12, %rdi
	callq	_lock_basic_lock
	movq	16(%r12), %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_context_lookup_new_query
	movq	%rax, %r14
	movq	16(%r12), %rdi
	addq	$12, %rdi
	callq	_lock_basic_unlock
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_context_deserialize_new_query
	movq	%rax, %r14
LBB0_3:
	movq	%rbx, %rdi
	callq	_free
	testq	%r14, %r14
	je	LBB0_15
## %bb.4:
	leaq	-48(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_setup_qinfo_edns
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	_BIT_RD@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	(%r12), %rax
	movq	(%rax), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_sldns_buffer_write_u16_at
	movq	(%r12), %rax
	movq	(%rax), %rdi
	movl	$2, %esi
	movq	%r15, %rdx
	callq	_sldns_buffer_write_u16_at
	movq	16(%r12), %rax
	movl	8(%rax), %edi
	movq	(%r12), %rax
	movq	8(%r12), %rsi
	movq	(%rax), %r8
	movl	4(%rsi), %r9d
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	movq	$0, 72(%rsp)
	movl	$0, 64(%rsp)
	movq	$0, 56(%rsp)
	movl	$0, 48(%rsp)
	movq	$0, 40(%rsp)
	movl	$0, 32(%rsp)
	movq	$0, 24(%rsp)
	movl	$0, 16(%rsp)
	leaq	-48(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	callq	_local_zones_answer
	testq	%rax, %rax
	je	LBB0_8
LBB0_7:
	movq	8(%r12), %rax
	movl	4(%rax), %edi
	callq	_regional_free_all
	movq	_sec_status_insecure@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	movq	(%r12), %rax
	movq	(%rax), %rdx
	movq	_UB_NOERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%r14, %rsi
LBB0_12:
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_add_bg_result
LBB0_13:
	movq	-48(%rbp), %rdi
	callq	_free
	jmp	LBB0_14
LBB0_15:
	leaq	L_.str(%rip), %rdi
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_log_err                        ## TAILCALL
LBB0_5:
	movq	_UB_SYNTAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_add_bg_result
LBB0_14:
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	16(%r12), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	movq	(%r12), %rax
	movq	8(%r12), %rsi
	movq	(%rax), %r9
	movl	4(%rsi), %eax
	movl	%eax, (%rsp)
	leaq	-48(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	xorl	%r8d, %r8d
	callq	_auth_zones_answer
	testq	%rax, %rax
	jne	LBB0_7
LBB0_10:
	movq	%r12, (%r14)
	movq	(%r12), %rax
	movq	8(%r12), %rcx
	movl	(%rcx), %edi
	movq	(%rax), %r8
	movq	_libworker_bg_done_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r14, 8(%rsp)
	movl	%eax, (%rsp)
	leaq	-48(%rbp), %rsi
	leaq	-40(%rbp), %rcx
	movq	%r15, %rdx
	xorl	%r9d, %r9d
	callq	_mesh_new_callback
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	movq	_UB_NOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to deserialize newq"

	.comm	_UB_SYNTAX,4,2                  ## @UB_SYNTAX
	.comm	_BIT_RD,8,3                     ## @BIT_RD
	.comm	_sec_status_insecure,8,3        ## @sec_status_insecure
	.comm	_UB_NOERROR,4,2                 ## @UB_NOERROR
	.comm	_libworker_bg_done_cb,4,2       ## @libworker_bg_done_cb
	.comm	_UB_NOMEM,4,2                   ## @UB_NOMEM
	.no_dead_strip	_handle_newq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_newq
_handle_newq:                           ; @handle_newq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x2
	mov	x21, x1
	mov	x19, x0
	ldp	x0, x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	add	x0, x0, #12
	bl	_lock_basic_lock
	ldr	x0, [x19, #16]
	mov	x1, x21
	mov	x2, x20
	bl	_context_lookup_new_query
	mov	x20, x0
	ldr	x8, [x19, #16]
	add	x0, x8, #12
	bl	_lock_basic_unlock
	b	LBB0_3
LBB0_2:
	mov	x1, x21
	mov	x2, x20
	bl	_context_deserialize_new_query
	mov	x20, x0
LBB0_3:
	mov	x0, x21
	bl	_free
	cbz	x20, LBB0_9
; %bb.4:
	sub	x2, x29, #40
	sub	x3, x29, #48
	mov	x0, x19
	mov	x1, x20
	bl	_setup_qinfo_edns
	cbz	w0, LBB0_10
; %bb.5:
Lloh0:
	adrp	x8, _BIT_RD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BIT_RD@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	ldr	x8, [x19]
	ldr	x0, [x8]
	mov	w1, #0
	mov	x2, #0
	bl	_sldns_buffer_write_u16_at
	ldr	x8, [x19]
	ldr	x0, [x8]
	mov	w1, #2
	mov	x2, x21
	bl	_sldns_buffer_write_u16_at
	ldp	x1, x8, [x19, #8]
	ldr	w0, [x8, #8]
	ldr	x8, [x19]
	ldr	x4, [x8]
	ldr	w5, [x1, #4]
	str	xzr, [sp, #56]
	str	wzr, [sp, #48]
	str	xzr, [sp, #40]
	str	wzr, [sp, #32]
	sub	x2, x29, #40
	sub	x3, x29, #48
	str	xzr, [sp, #24]
	str	wzr, [sp, #16]
	str	xzr, [sp, #8]
	str	wzr, [sp]
	mov	x6, #0
	mov	x7, #0
	bl	_local_zones_answer
	cbz	x0, LBB0_12
LBB0_6:
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #4]
	bl	_regional_free_all
Lloh3:
	adrp	x8, _sec_status_insecure@GOTPAGE
Lloh4:
	ldr	x8, [x8, _sec_status_insecure@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x20, #8]
	ldr	x8, [x19]
	ldr	x2, [x8]
Lloh6:
	adrp	x8, _UB_NOERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UB_NOERROR@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
LBB0_7:
	mov	x4, #0
	mov	w5, #0
	bl	_add_bg_result
LBB0_8:
	ldur	x0, [x29, #-40]
	bl	_free
	b	LBB0_11
LBB0_9:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_log_err
LBB0_10:
Lloh11:
	adrp	x8, _UB_SYNTAX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _UB_SYNTAX@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, #0
	mov	x4, #0
	mov	w5, #0
	bl	_add_bg_result
LBB0_11:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_12:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x0, [x8]
	cbz	x0, LBB0_14
; %bb.13:
	ldp	x8, x1, [x19]
	ldr	x5, [x8]
	ldr	w6, [x1, #4]
	sub	x2, x29, #40
	sub	x3, x29, #48
	mov	x4, #0
	bl	_auth_zones_answer
	cbnz	x0, LBB0_6
LBB0_14:
	str	x19, [x20]
	ldp	x9, x8, [x19]
	ldr	w0, [x8]
	ldr	x4, [x9]
Lloh14:
	adrp	x8, _libworker_bg_done_cb@GOTPAGE
Lloh15:
	ldr	x8, [x8, _libworker_bg_done_cb@GOTPAGEOFF]
Lloh16:
	ldr	w6, [x8]
	sub	x1, x29, #40
	sub	x3, x29, #48
	mov	x2, x21
	mov	x5, #0
	mov	x7, x20
	bl	_mesh_new_callback
	cbnz	w0, LBB0_8
; %bb.15:
Lloh17:
	adrp	x8, _UB_NOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _UB_NOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to deserialize newq"

	.comm	_UB_SYNTAX,4,2                  ; @UB_SYNTAX
	.comm	_BIT_RD,8,3                     ; @BIT_RD
	.comm	_sec_status_insecure,8,3        ; @sec_status_insecure
	.comm	_UB_NOERROR,4,2                 ; @UB_NOERROR
	.comm	_libworker_bg_done_cb,4,2       ; @libworker_bg_done_cb
	.comm	_UB_NOMEM,4,2                   ; @UB_NOMEM
	.no_dead_strip	_handle_newq
.subsections_via_symbols
