	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_parse_edns_from_pkt            ## -- Begin function parse_edns_from_pkt
	.p2align	4, 0x90
_parse_edns_from_pkt:                   ## @parse_edns_from_pkt
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r13
	callq	_sldns_buffer_begin
	movl	%eax, %edi
	callq	_LDNS_QDCOUNT
	xorl	%edi, %edi
	cmpl	$1, %eax
	sete	%dil
	callq	_log_assert
	movq	%r13, %rdi
	callq	_sldns_buffer_begin
	movl	%eax, %edi
	callq	_LDNS_ANCOUNT
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	callq	_sldns_buffer_begin
	movl	%eax, %edi
	callq	_LDNS_NSCOUNT
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	movq	%r13, %rdi
	callq	_sldns_buffer_begin
	movl	%eax, %edi
	callq	_LDNS_ANCOUNT
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_sldns_buffer_begin
	movl	%eax, %edi
	callq	_LDNS_NSCOUNT
	addl	%eax, %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_skip_pkt_rrs
	testl	%eax, %eax
	je	LBB0_3
LBB0_4:
	movq	%r13, %rdi
	callq	_sldns_buffer_begin
	movl	%eax, %edi
	callq	_LDNS_ARCOUNT
	cmpl	$2, %eax
	jge	LBB0_5
## %bb.6:
	movq	%r13, %rdi
	callq	_sldns_buffer_begin
	movl	%eax, %edi
	callq	_LDNS_ARCOUNT
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	%r13, %rdi
	callq	_pkt_dname_len
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.9:
	movq	%r13, %rdi
	callq	_sldns_buffer_remaining
	cmpq	$9, %rax
	jbe	LBB0_5
## %bb.10:
	movq	%r13, %rdi
	callq	_sldns_buffer_read_u16
	movq	_LDNS_RR_TYPE_OPT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.11:
	movl	$1, 4(%r15)
	movq	%r13, %rdi
	callq	_sldns_buffer_read_u16
	movl	%eax, (%r15)
	movq	%r13, %rdi
	callq	_sldns_buffer_read_u8
	movq	%rax, 32(%r15)
	movq	%r13, %rdi
	callq	_sldns_buffer_read_u8
	movq	%rax, 24(%r15)
	movq	%r13, %rdi
	callq	_sldns_buffer_read_u16
	movq	%rax, 16(%r15)
	movq	$0, 8(%r15)
	movq	%r13, %rdi
	callq	_sldns_buffer_read_u16
	movq	%rax, %r12
	movq	%r13, %rdi
	callq	_sldns_buffer_remaining
	cmpq	%r12, %rax
	jae	LBB0_12
LBB0_5:
	movq	_LDNS_RCODE_FORMERR@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %ebx
	jmp	LBB0_15
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_7:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	$512, (%r15)                    ## imm = 0x200
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r13, %rdi
	callq	_sldns_buffer_current
	movq	%rax, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_parse_edns_options
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.13:
	movq	_LDNS_RCODE_SERVFAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_RCODE_FORMERR,4,2         ## @LDNS_RCODE_FORMERR
	.comm	_LDNS_RR_TYPE_OPT,8,3           ## @LDNS_RR_TYPE_OPT
	.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	_parse_edns_from_pkt            ; -- Begin function parse_edns_from_pkt
	.p2align	2
_parse_edns_from_pkt:                   ; @parse_edns_from_pkt
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	bl	_sldns_buffer_begin
	bl	_LDNS_QDCOUNT
	cmp	w0, #1
	cset	w0, eq
	bl	_log_assert
	mov	x0, x21
	bl	_sldns_buffer_begin
	bl	_LDNS_ANCOUNT
	cbnz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_sldns_buffer_begin
	bl	_LDNS_NSCOUNT
	cbz	x0, LBB0_3
LBB0_2:
	mov	x0, x21
	bl	_sldns_buffer_begin
	bl	_LDNS_ANCOUNT
	mov	x22, x0
	mov	x0, x21
	bl	_sldns_buffer_begin
	bl	_LDNS_NSCOUNT
	add	w1, w0, w22
	mov	x0, x21
	bl	_skip_pkt_rrs
	cbz	w0, LBB0_10
LBB0_3:
	mov	x0, x21
	bl	_sldns_buffer_begin
	bl	_LDNS_ARCOUNT
	cmp	w0, #2
	b.ge	LBB0_9
; %bb.4:
	mov	x0, x21
	bl	_sldns_buffer_begin
	bl	_LDNS_ARCOUNT
	cbz	w0, LBB0_11
; %bb.5:
	mov	x0, x21
	bl	_pkt_dname_len
	cmp	w0, #1
	b.ne	LBB0_9
; %bb.6:
	mov	x0, x21
	bl	_sldns_buffer_remaining
	cmp	x0, #9
	b.ls	LBB0_9
; %bb.7:
	mov	x0, x21
	bl	_sldns_buffer_read_u16
Lloh0:
	adrp	x8, _LDNS_RR_TYPE_OPT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LDNS_RR_TYPE_OPT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.8:
	mov	w8, #1
	str	w8, [x19, #4]
	mov	x0, x21
	bl	_sldns_buffer_read_u16
	str	w0, [x19]
	mov	x0, x21
	bl	_sldns_buffer_read_u8
	str	x0, [x19, #32]
	mov	x0, x21
	bl	_sldns_buffer_read_u8
	str	x0, [x19, #24]
	mov	x0, x21
	bl	_sldns_buffer_read_u16
	stp	xzr, x0, [x19, #8]
	mov	x0, x21
	bl	_sldns_buffer_read_u16
	mov	x22, x0
	mov	x0, x21
	bl	_sldns_buffer_remaining
	cmp	x0, x22
	b.hs	LBB0_12
LBB0_9:
Lloh3:
	adrp	x8, _LDNS_RCODE_FORMERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LDNS_RCODE_FORMERR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	mov	w0, #0
	mov	w8, #512
	str	w8, [x19]
	b	LBB0_10
LBB0_12:
	mov	x0, x21
	bl	_sldns_buffer_current
	mov	x1, x22
	mov	x2, x19
	mov	x3, x20
	bl	_parse_edns_options
Lloh6:
	adrp	x8, _LDNS_RCODE_SERVFAIL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LDNS_RCODE_SERVFAIL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w0, w8, wzr, eq
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_RCODE_FORMERR,4,2         ; @LDNS_RCODE_FORMERR
	.comm	_LDNS_RR_TYPE_OPT,8,3           ; @LDNS_RR_TYPE_OPT
	.comm	_LDNS_RCODE_SERVFAIL,4,2        ; @LDNS_RCODE_SERVFAIL
.subsections_via_symbols
