	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dnscrypt_server_uncurve
_dnscrypt_server_uncurve:               ## @dnscrypt_server_uncurve
	.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	%r8, %rbx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%r8, %rdi
	callq	_sldns_buffer_limit
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_sldns_buffer_begin
	movq	%rax, %r13
	movq	_crypto_box_NONCEBYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -112(%rbp)                ## 8-byte Spill
	movq	_DNSCRYPT_SHARED_SECRET_KEY_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rcx
	movq	_DNSCRYPT_QUERY_HEADER_SIZE@GOTPCREL(%rip), %rax
	movl	$-1, %r12d
	cmpq	(%rax), %r15
	jbe	LBB0_4
## %bb.1:
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rdi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	16(%rbx), %esi
	movl	8(%r13), %edx
	callq	_dnsc_nonce_cache_key_hash
	movl	%eax, %r12d
	leaq	12(%r14), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_lock_basic_lock
	movl	16(%r14), %edi
	movq	(%r13), %rsi
	movl	16(%rbx), %edx
	movl	8(%r13), %ecx
	movl	%r12d, -72(%rbp)                ## 4-byte Spill
	movl	%r12d, %r8d
	callq	_dnsc_nonces_lookup
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %rdi
	callq	_lock_rw_unlock
	incl	20(%r14)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_lock_basic_unlock
LBB0_3:
	movl	$-1, %r12d
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.5:
	movl	%r12d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	16(%r14), %edi
	movq	(%r13), %rsi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	16(%rbx), %edx
	movl	8(%r13), %ecx
	movl	-72(%rbp), %r8d                 ## 4-byte Reload
	callq	_dnsc_nonce_cache_insert
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_lock_basic_unlock
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movl	4(%rax), %esi
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r13), %edx
	movl	(%rcx), %ecx
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_dnsc_shared_secrets_cache_key
	movl	%eax, %r12d
	movl	(%r14), %edi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_dnsc_shared_secrets_lookup
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movq	%rax, %r14
	movq	8(%rax), %rsi
	movq	_crypto_box_BEFORENMBYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_memcpy
	movq	%r14, %rdi
	callq	_lock_rw_unlock
LBB0_8:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rsi
	movq	_crypto_box_HALF_NONCEBYTES@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	-112(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %rdi
	callq	_memcpy
	movslq	(%rbx), %rdx
	leaq	(%r14,%rdx,4), %rdi
	xorl	%esi, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memset
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	cmpl	$2, 4(%rax)
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movl	$-1, %r12d
	je	LBB0_4
## %bb.9:
	movq	_DNSCRYPT_QUERY_BOX_OFFSET@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(,%rax,4), %rsi
	addq	%r13, %rsi
	movl	%r15d, %edx
	subl	%eax, %edx
	movq	%r13, %rdi
	movq	%r14, %rcx
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	callq	_crypto_box_open_easy_afternm
	testq	%rax, %rax
	jne	LBB0_4
## %bb.10:
	movq	_DNSCRYPT_QUERY_HEADER_SIZE@GOTPCREL(%rip), %rax
	subq	(%rax), %r15
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	decq	%r15
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_sldns_buffer_at
	cmpl	$0, (%rax)
	je	LBB0_11
## %bb.12:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_sldns_buffer_at
	cmpl	$128, (%rax)
	jne	LBB0_4
## %bb.13:
	movq	_crypto_box_HALF_NONCEBYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	%r14, %rsi
	callq	_memcpy
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sldns_buffer_set_position
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_sldns_buffer_set_limit
	jmp	LBB0_4
LBB0_14:
	movq	%r14, %rbx
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_lock_basic_lock
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	incl	8(%rbx)
	movq	%r14, %rdi
	callq	_lock_basic_unlock
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rax
	cmpl	$2, 4(%rax)
	je	LBB0_3
## %bb.16:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %esi
	movq	8(%r13), %rax
	movl	(%rax), %edx
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_crypto_box_beforenm
	testq	%rax, %rax
	jne	LBB0_3
## %bb.18:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	movq	%r14, %rcx
	callq	_dnsc_shared_secret_cache_insert
	jmp	LBB0_8
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_crypto_box_HALF_NONCEBYTES,4,2 ## @crypto_box_HALF_NONCEBYTES
	.comm	_crypto_box_BEFORENMBYTES,4,2   ## @crypto_box_BEFORENMBYTES
	.comm	_crypto_box_NONCEBYTES,4,2      ## @crypto_box_NONCEBYTES
	.comm	_DNSCRYPT_SHARED_SECRET_KEY_LENGTH,4,2 ## @DNSCRYPT_SHARED_SECRET_KEY_LENGTH
	.comm	_DNSCRYPT_QUERY_HEADER_SIZE,8,3 ## @DNSCRYPT_QUERY_HEADER_SIZE
	.comm	_DNSCRYPT_QUERY_BOX_OFFSET,4,2  ## @DNSCRYPT_QUERY_BOX_OFFSET
	.no_dead_strip	_dnscrypt_server_uncurve
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dnscrypt_server_uncurve
_dnscrypt_server_uncurve:               ; @dnscrypt_server_uncurve
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #16
	mov	x19, x4
	mov	x22, x3
	mov	x20, x2
	mov	x24, x1
	mov	x26, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	mov	x0, x4
	bl	_sldns_buffer_limit
	mov	x23, x0
	mov	x0, x19
	bl	_sldns_buffer_begin
	mov	x25, x0
Lloh3:
	adrp	x8, _crypto_box_NONCEBYTES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _crypto_box_NONCEBYTES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
Lloh8:
	adrp	x8, _DNSCRYPT_SHARED_SECRET_KEY_LENGTH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DNSCRYPT_SHARED_SECRET_KEY_LENGTH@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x27, x9, x8
	mov	sp, x27
Lloh13:
	adrp	x8, _DNSCRYPT_QUERY_HEADER_SIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DNSCRYPT_QUERY_HEADER_SIZE@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x23, x8
	b.ls	LBB0_3
; %bb.1:
	stur	x20, [x29, #-96]                ; 8-byte Folded Spill
	ldr	x0, [x25]
	ldr	w1, [x24, #16]
	ldr	w2, [x25, #8]
	bl	_dnsc_nonce_cache_key_hash
	mov	x20, x0
	add	x28, x26, #12
	mov	x0, x28
	bl	_lock_basic_lock
	ldr	w0, [x26, #16]
	ldr	x1, [x25]
	ldr	w2, [x24, #16]
	ldr	w3, [x25, #8]
	mov	x4, x20
	bl	_dnsc_nonces_lookup
	cbz	x0, LBB0_6
; %bb.2:
	bl	_lock_rw_unlock
	ldr	w8, [x26, #20]
	add	w8, w8, #1
	str	w8, [x26, #20]
	mov	x0, x28
	bl	_lock_basic_unlock
LBB0_3:
	mov	w0, #-1
LBB0_4:
	ldur	x8, [x29, #-88]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.5:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w0, [x26, #16]
	ldr	x1, [x25]
	ldr	w2, [x24, #16]
	ldr	w3, [x25, #8]
	mov	x4, x20
	bl	_dnsc_nonce_cache_insert
	mov	x0, x28
	bl	_lock_basic_unlock
	ldp	x8, x9, [x24]
	ldr	w1, [x8, #4]
	ldr	w2, [x25, #8]
	ldr	w3, [x9]
	mov	x0, x27
	bl	_dnsc_shared_secrets_cache_key
	mov	x28, x0
	ldr	w0, [x26]
	mov	x1, x27
	mov	x2, x28
	bl	_dnsc_shared_secrets_lookup
	cbz	x0, LBB0_14
; %bb.7:
	mov	x20, x0
	ldr	x1, [x0, #8]
Lloh19:
	adrp	x8, _crypto_box_BEFORENMBYTES@GOTPAGE
Lloh20:
	ldr	x8, [x8, _crypto_box_BEFORENMBYTES@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_memcpy
	mov	x0, x20
	bl	_lock_rw_unlock
LBB0_8:
	ldr	x1, [x25]
Lloh22:
	adrp	x20, _crypto_box_HALF_NONCEBYTES@GOTPAGE
Lloh23:
	ldr	x20, [x20, _crypto_box_HALF_NONCEBYTES@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x21
	bl	_memcpy
	ldrsw	x2, [x20]
	add	x0, x21, x2, lsl #2
	mov	w1, #0
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memset
	ldr	x8, [x24]
	ldr	w8, [x8, #4]
	cmp	w8, #2
	b.eq	LBB0_3
; %bb.9:
Lloh24:
	adrp	x8, _DNSCRYPT_QUERY_BOX_OFFSET@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DNSCRYPT_QUERY_BOX_OFFSET@GOTPAGEOFF]
Lloh26:
	ldrsw	x8, [x8]
	add	x1, x25, x8, lsl #2
	sub	w2, w23, w8
	mov	x0, x25
	mov	x3, x21
	mov	x4, x22
	bl	_crypto_box_open_easy_afternm
	cbnz	x0, LBB0_3
; %bb.10:
Lloh27:
	adrp	x8, _DNSCRYPT_QUERY_HEADER_SIZE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _DNSCRYPT_QUERY_HEADER_SIZE@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	sub	x22, x23, x8
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	sub	x22, x22, #1
	mov	x0, x19
	mov	x1, x22
	bl	_sldns_buffer_at
	ldr	w8, [x0]
	cbz	w8, LBB0_11
; %bb.12:
	mov	x0, x19
	mov	x1, x22
	bl	_sldns_buffer_at
	ldr	w8, [x0]
	cmp	w8, #128
	b.ne	LBB0_3
; %bb.13:
	ldr	w2, [x20]
	ldur	x0, [x29, #-96]                 ; 8-byte Folded Reload
	mov	x1, x21
	bl	_memcpy
	mov	x0, x19
	mov	w1, #0
	bl	_sldns_buffer_set_position
	mov	x0, x19
	mov	x1, x22
	bl	_sldns_buffer_set_limit
	mov	w0, #0
	b	LBB0_4
LBB0_14:
	add	x20, x26, #4
	mov	x0, x20
	bl	_lock_basic_lock
	ldr	w8, [x26, #8]
	add	w8, w8, #1
	str	w8, [x26, #8]
	mov	x0, x20
	bl	_lock_basic_unlock
	ldr	x8, [x24]
	ldr	w8, [x8, #4]
	cmp	w8, #2
	b.eq	LBB0_3
; %bb.15:
	ldr	w1, [x25, #8]
	ldr	x8, [x24, #8]
	ldr	w2, [x8]
	mov	x0, x22
	bl	_crypto_box_beforenm
	cbnz	x0, LBB0_3
; %bb.16:
	ldr	w0, [x26]
	mov	x1, x27
	mov	x2, x28
	mov	x3, x22
	bl	_dnsc_shared_secret_cache_insert
	b	LBB0_8
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_crypto_box_HALF_NONCEBYTES,4,2 ; @crypto_box_HALF_NONCEBYTES
	.comm	_crypto_box_BEFORENMBYTES,4,2   ; @crypto_box_BEFORENMBYTES
	.comm	_crypto_box_NONCEBYTES,4,2      ; @crypto_box_NONCEBYTES
	.comm	_DNSCRYPT_SHARED_SECRET_KEY_LENGTH,4,2 ; @DNSCRYPT_SHARED_SECRET_KEY_LENGTH
	.comm	_DNSCRYPT_QUERY_HEADER_SIZE,8,3 ; @DNSCRYPT_QUERY_HEADER_SIZE
	.comm	_DNSCRYPT_QUERY_BOX_OFFSET,4,2  ; @DNSCRYPT_QUERY_BOX_OFFSET
	.no_dead_strip	_dnscrypt_server_uncurve
.subsections_via_symbols
