	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function resolve_esni_keys
_resolve_esni_keys:                     ## @resolve_esni_keys
	.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
	movl	$4416, %eax                     ## imm = 0x1140
	callq	____chkstk_darwin
	subq	%rax, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	leaq	L_.str(%rip), %rsi
	leaq	-4416(%rbp), %rdi
	xorl	%edx, %edx
	callq	_ptls_buffer_init
	leaq	L_.str.1(%rip), %rdx
	leaq	-288(%rbp), %rdi
	movl	$256, %esi                      ## imm = 0x100
	movq	%rbx, %rcx
	callq	_snprintf
	cmpl	$255, %eax
	ja	LBB0_8
## %bb.1:
	movq	_ns_c_in@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ns_t_txt@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-288(%rbp), %rdi
	leaq	-4384(%rbp), %rcx
	movl	$4096, %r8d                     ## imm = 0x1000
	callq	_res_query
	testl	%eax, %eax
	jle	LBB0_8
## %bb.2:
	leaq	-4384(%rbp), %rdi
	leaq	-4392(%rbp), %rdx
	movl	%eax, %esi
	callq	_ns_initparse
	testq	%rax, %rax
	je	LBB0_3
LBB0_8:
	leaq	-4416(%rbp), %rdi
	callq	_ptls_buffer_dispose
	xorl	%edi, %edi
	xorl	%esi, %esi
LBB0_9:
	callq	_ptls_iovec_init
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_11
## %bb.10:
	addq	$4416, %rsp                     ## imm = 0x1140
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movl	-4392(%rbp), %edi
	movq	_ns_s_an@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_ns_msg_count
	testl	%eax, %eax
	jle	LBB0_8
## %bb.4:
	movl	(%rbx), %esi
	leaq	-4392(%rbp), %rdi
	leaq	-4388(%rbp), %rcx
	xorl	%edx, %edx
	callq	_ns_parserr
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movl	-4388(%rbp), %edi
	callq	_ns_rr_rdata
	movq	%rax, %rbx
	movl	-4388(%rbp), %edi
	callq	_ns_rr_rdlen
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_normalize_txt
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	leaq	-4420(%rbp), %r14
	movq	%r14, %rdi
	callq	_ptls_base64_decode_init
	leaq	-4416(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ptls_base64_decode
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movl	-4400(%rbp), %edi
	callq	_assert
	movq	-4408(%rbp), %rdi
	movl	-4416(%rbp), %esi
	jmp	LBB0_9
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

L_.str.1:                               ## @.str.1
	.asciz	"_esni.%s"

	.comm	_ns_c_in,4,2                    ## @ns_c_in
	.comm	_ns_t_txt,4,2                   ## @ns_t_txt
	.comm	_ns_s_an,4,2                    ## @ns_s_an
	.no_dead_strip	_resolve_esni_keys
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function resolve_esni_keys
_resolve_esni_keys:                     ; @resolve_esni_keys
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	w9, #4400
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #1, lsl #12             ; =4096
	sub	sp, sp, #304
	mov	x19, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #8
	mov	w2, #0
	bl	_ptls_buffer_init
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x0, sp, #1, lsl #12             ; =4096
	add	x0, x0, #40
	mov	w1, #256
	mov	x3, x19
	bl	_snprintf
	cmp	w0, #255
	b.hi	LBB0_3
; %bb.1:
Lloh9:
	adrp	x8, _ns_c_in@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ns_c_in@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _ns_t_txt@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ns_t_txt@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	add	x0, sp, #1, lsl #12             ; =4096
	add	x0, x0, #40
	add	x3, sp, #40
	mov	w4, #4096
	bl	_res_query
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.2:
	mov	x1, x0
	add	x0, sp, #40
	add	x2, sp, #36
	bl	_ns_initparse
	cbz	x0, LBB0_6
LBB0_3:
	add	x0, sp, #8
	bl	_ptls_buffer_dispose
	mov	x0, #0
	mov	w1, #0
LBB0_4:
	bl	_ptls_iovec_init
	ldur	x8, [x29, #-24]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.5:
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #304
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w0, [sp, #36]
Lloh18:
	adrp	x19, _ns_s_an@GOTPAGE
Lloh19:
	ldr	x19, [x19, _ns_s_an@GOTPAGEOFF]
	ldr	w1, [x19]
	bl	_ns_msg_count
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.7:
	ldr	w1, [x19]
	add	x0, sp, #36
	add	x3, sp, #32
	mov	w2, #0
	bl	_ns_parserr
	cbnz	x0, LBB0_3
; %bb.8:
	ldr	w0, [sp, #32]
	bl	_ns_rr_rdata
	mov	x19, x0
	ldr	w0, [sp, #32]
	bl	_ns_rr_rdlen
	mov	x1, x0
	mov	x0, x19
	bl	_normalize_txt
	cbz	w0, LBB0_3
; %bb.9:
	add	x0, sp, #4
	bl	_ptls_base64_decode_init
	add	x1, sp, #4
	add	x2, sp, #8
	mov	x0, x19
	bl	_ptls_base64_decode
	cbnz	x0, LBB0_3
; %bb.10:
	ldr	w0, [sp, #24]
	bl	_assert
	ldr	x0, [sp, #16]
	ldr	w1, [sp, #8]
	b	LBB0_4
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

l_.str.1:                               ; @.str.1
	.asciz	"_esni.%s"

	.comm	_ns_c_in,4,2                    ; @ns_c_in
	.comm	_ns_t_txt,4,2                   ; @ns_t_txt
	.comm	_ns_s_an,4,2                    ; @ns_s_an
	.no_dead_strip	_resolve_esni_keys
.subsections_via_symbols
