	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function packet_edns_malformed
_packet_edns_malformed:                 ## @packet_edns_malformed
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_sldns_buffer_limit
	movq	_LDNS_HEADER_SIZE@GOTPCREL(%rip), %r13
	movl	$1, %r14d
	cmpq	(%r13), %rax
	jl	LBB0_12
## %bb.1:
	movq	%rbx, %rdi
	callq	_sldns_buffer_begin
	movl	%eax, %edi
	callq	_LDNS_RCODE_WIRE
	movq	_LDNS_RCODE_NOERROR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.2:
	movq	%rbx, %rdi
	callq	_sldns_buffer_begin
	movl	%eax, %edi
	callq	_LDNS_QDCOUNT
	cmpl	$1, %eax
	jne	LBB0_11
## %bb.3:
	movq	%rbx, %rdi
	callq	_sldns_buffer_begin
	movl	%eax, %edi
	callq	_LDNS_ANCOUNT
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movq	(%r13), %rsi
	movq	%rbx, %rdi
	callq	_sldns_buffer_at
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_sldns_buffer_limit
	subq	(%r13), %rax
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_dname_valid
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:
	movq	%rax, %r12
	testl	%r15d, %r15d
	jne	LBB0_7
## %bb.6:
	cmpq	$1, %r12
	je	LBB0_11
LBB0_7:
	movq	%rbx, %rdi
	callq	_sldns_buffer_limit
	movq	(%r13), %rsi
	leaq	(%rsi,%r12), %rcx
	addq	$7, %rcx
	cmpq	%rcx, %rax
	jb	LBB0_11
## %bb.8:
	addq	%r12, %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_sldns_buffer_at
	cmpq	$0, (%rax)
	jne	LBB0_11
## %bb.9:
	addq	$4, %r12
	movq	(%r13), %rsi
	addq	%r12, %rsi
	movq	%rbx, %rdi
	callq	_sldns_buffer_at
	cmpq	$0, 8(%rax)
	jne	LBB0_11
## %bb.10:
	addq	(%r13), %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_sldns_buffer_at
	cmpq	$0, 16(%rax)
	je	LBB0_12
LBB0_11:
	xorl	%r14d, %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_HEADER_SIZE,8,3           ## @LDNS_HEADER_SIZE
	.comm	_LDNS_RCODE_NOERROR,8,3         ## @LDNS_RCODE_NOERROR
	.no_dead_strip	_packet_edns_malformed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function packet_edns_malformed
_packet_edns_malformed:                 ; @packet_edns_malformed
	.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, x1
	mov	x19, x0
	bl	_sldns_buffer_limit
Lloh0:
	adrp	x22, _LDNS_HEADER_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _LDNS_HEADER_SIZE@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ge	LBB0_2
LBB0_1:
	mov	w0, #1
	b	LBB0_13
LBB0_2:
	mov	x0, x19
	bl	_sldns_buffer_begin
	bl	_LDNS_RCODE_WIRE
Lloh2:
	adrp	x8, _LDNS_RCODE_NOERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LDNS_RCODE_NOERROR@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.3:
	mov	x0, x19
	bl	_sldns_buffer_begin
	bl	_LDNS_QDCOUNT
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.4:
	mov	x0, x19
	bl	_sldns_buffer_begin
	bl	_LDNS_ANCOUNT
	cbz	x0, LBB0_13
; %bb.5:
	ldr	x1, [x22]
	mov	x0, x19
	bl	_sldns_buffer_at
	mov	x21, x0
	mov	x0, x19
	bl	_sldns_buffer_limit
	ldr	x8, [x22]
	sub	x1, x0, x8
	mov	x0, x21
	bl	_dname_valid
	cbz	x0, LBB0_13
; %bb.6:
	mov	x21, x0
	cbnz	w20, LBB0_8
; %bb.7:
	cmp	x21, #1
	b.eq	LBB0_12
LBB0_8:
	mov	x0, x19
	bl	_sldns_buffer_limit
	ldr	x8, [x22]
	add	x8, x8, x21
	add	x9, x8, #7
	cmp	x0, x9
	b.lo	LBB0_12
; %bb.9:
	add	x1, x8, #4
	mov	x0, x19
	bl	_sldns_buffer_at
	ldr	x8, [x0]
	cbnz	x8, LBB0_12
; %bb.10:
	ldr	x8, [x22]
	add	x20, x21, #4
	add	x1, x20, x8
	mov	x0, x19
	bl	_sldns_buffer_at
	ldr	x8, [x0, #8]
	cbnz	x8, LBB0_12
; %bb.11:
	ldr	x8, [x22]
	add	x1, x20, x8
	mov	x0, x19
	bl	_sldns_buffer_at
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_1
LBB0_12:
	mov	w0, #0
LBB0_13:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_HEADER_SIZE,8,3           ; @LDNS_HEADER_SIZE
	.comm	_LDNS_RCODE_NOERROR,8,3         ; @LDNS_RCODE_NOERROR
	.no_dead_strip	_packet_edns_malformed
.subsections_via_symbols
