	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_auth_zones_answer              ## -- Begin function auth_zones_answer
	.p2align	4, 0x90
_auth_zones_answer:                     ## @auth_zones_answer
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movq	%r8, %r15
	movq	%rcx, %rbx
	movq	%rdx, %r13
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	$0, -104(%rbp)
	movl	$0, -44(%rbp)
	callq	_lock_rw_rdlock
	cmpl	$0, 8(%r14)
	je	LBB0_9
## %bb.1:
	movq	(%r13), %rax
	movq	_LDNS_RR_TYPE_DS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jne	LBB0_3
## %bb.2:
	movq	24(%r13), %rax
	movq	%rax, -96(%rbp)
	movq	8(%r13), %rax
	movq	%rax, -88(%rbp)
	leaq	-96(%rbp), %rdi
	leaq	-88(%rbp), %rsi
	callq	_dname_remove_label
	movq	-96(%rbp), %rsi
	movq	-88(%rbp), %rdx
	jmp	LBB0_4
LBB0_3:
	movq	24(%r13), %rsi
	movq	8(%r13), %rdx
LBB0_4:
	movl	16(%r13), %ecx
	movq	%r14, %rdi
	callq	_auth_zones_find_zone
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	%r15, %rdi
	callq	_lock_rw_rdlock
	movq	%r14, %rdi
	callq	_lock_rw_unlock
	cmpl	$0, 24(%r15)
	je	LBB0_12
## %bb.6:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %r12
	cmpq	$0, 16(%r15)
	je	LBB0_13
## %bb.7:
	movq	%r12, %rbx
	movq	8(%r15), %r12
	movq	%r15, %rdi
	callq	_lock_rw_unlock
	xorl	%eax, %eax
	testq	%r12, %r12
	jne	LBB0_11
## %bb.8:
	movq	%r14, %rdi
	callq	_lock_rw_wrlock
	incl	4(%r14)
	movq	%r14, %rdi
	callq	_lock_rw_unlock
	movq	_LDNS_RCODE_SERVFAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r13, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	%rbx, %r9
	jmp	LBB0_18
LBB0_9:
	movq	%r14, %rdi
LBB0_10:
	callq	_lock_rw_unlock
	xorl	%eax, %eax
LBB0_11:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r15, %rdi
	jmp	LBB0_10
LBB0_13:
	leaq	-104(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_auth_zone_generate_answer
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_lock_rw_unlock
	testl	%ebx, %ebx
	jne	LBB0_15
## %bb.14:
	xorl	%eax, %eax
	cmpl	$0, -44(%rbp)
	jne	LBB0_11
LBB0_15:
	movq	%r14, %rdi
	callq	_lock_rw_wrlock
	incl	4(%r14)
	movq	%r14, %rdi
	callq	_lock_rw_unlock
	testl	%ebx, %ebx
	je	LBB0_17
## %bb.16:
	movq	-104(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%r13, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	%r12, %r9
	callq	_auth_answer_encode
	jmp	LBB0_19
LBB0_17:
	movq	_LDNS_RCODE_SERVFAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r13, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	%r12, %r9
LBB0_18:
	callq	_auth_error_encode
LBB0_19:
	movl	$1, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_RR_TYPE_DS,8,3            ## @LDNS_RR_TYPE_DS
	.comm	_LDNS_RCODE_SERVFAIL,4,2        ## @LDNS_RCODE_SERVFAIL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_auth_zones_answer              ; -- Begin function auth_zones_answer
	.p2align	2
_auth_zones_answer:                     ; @auth_zones_answer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x6
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x24, x2
	mov	x23, x1
	mov	x25, x0
	str	xzr, [sp, #24]
	str	wzr, [sp, #20]
	bl	_lock_rw_rdlock
	ldr	w8, [x25, #8]
	cbz	w8, LBB0_9
; %bb.1:
	ldr	x8, [x24]
Lloh0:
	adrp	x9, _LDNS_RR_TYPE_DS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LDNS_RR_TYPE_DS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	x9, [x24, #24]
	ldr	x8, [x24, #8]
	stp	x8, x9, [sp]
	add	x0, sp, #8
	mov	x1, sp
	bl	_dname_remove_label
	ldp	x2, x1, [sp]
	b	LBB0_4
LBB0_3:
	ldr	x1, [x24, #24]
	ldr	x2, [x24, #8]
LBB0_4:
	ldr	w3, [x24, #16]
	mov	x0, x25
	bl	_auth_zones_find_zone
	mov	x26, x0
	cbz	x0, LBB0_9
; %bb.5:
	mov	x0, x26
	bl	_lock_rw_rdlock
	mov	x0, x25
	bl	_lock_rw_unlock
	ldr	w8, [x26, #24]
	cbz	w8, LBB0_13
; %bb.6:
	ldr	x8, [x26, #16]
	cbz	x8, LBB0_14
; %bb.7:
	ldr	x27, [x26, #8]
	mov	x0, x26
	bl	_lock_rw_unlock
	cbnz	x27, LBB0_11
; %bb.8:
	mov	x0, x25
	bl	_lock_rw_wrlock
	ldr	w8, [x25, #4]
	add	w8, w8, #1
	str	w8, [x25, #4]
	mov	x0, x25
	bl	_lock_rw_unlock
	b	LBB0_18
LBB0_9:
	mov	x0, x25
LBB0_10:
	bl	_lock_rw_unlock
LBB0_11:
	mov	w0, #0
LBB0_12:
	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
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_13:
	mov	x0, x26
	b	LBB0_10
LBB0_14:
	add	x3, sp, #24
	add	x4, sp, #20
	mov	x0, x26
	mov	x1, x24
	mov	x2, x19
	bl	_auth_zone_generate_answer
	mov	x27, x0
	mov	x0, x26
	bl	_lock_rw_unlock
	cbnz	w27, LBB0_16
; %bb.15:
	ldr	w8, [sp, #20]
	cbnz	w8, LBB0_11
LBB0_16:
	mov	x0, x25
	bl	_lock_rw_wrlock
	ldr	w8, [x25, #4]
	add	w8, w8, #1
	str	w8, [x25, #4]
	mov	x0, x25
	bl	_lock_rw_unlock
	cbz	w27, LBB0_18
; %bb.17:
	ldr	x6, [sp, #24]
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	bl	_auth_answer_encode
	b	LBB0_19
LBB0_18:
Lloh3:
	adrp	x8, _LDNS_RCODE_SERVFAIL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LDNS_RCODE_SERVFAIL@GOTPAGEOFF]
Lloh5:
	ldr	w6, [x8]
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	bl	_auth_error_encode
LBB0_19:
	mov	w0, #1
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_RR_TYPE_DS,8,3            ; @LDNS_RR_TYPE_DS
	.comm	_LDNS_RCODE_SERVFAIL,4,2        ; @LDNS_RCODE_SERVFAIL
.subsections_via_symbols
