	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_packet_ok
_check_packet_ok:                       ## @check_packet_ok
	.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	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %rbx
	callq	_sldns_buffer_limit
	movq	_LDNS_HEADER_SIZE@GOTPCREL(%rip), %r14
	xorl	%r15d, %r15d
	cmpq	(%r14), %rax
	jl	LBB0_27
## %bb.1:
	movq	%rbx, %rdi
	callq	_sldns_buffer_begin
	movl	%eax, %edi
	callq	_LDNS_ID_WIRE
	movq	24(%r12), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_27
## %bb.2:
	movq	%rbx, %rdi
	callq	_sldns_buffer_begin
	movl	%eax, %edi
	callq	_LDNS_QR_WIRE
	testl	%eax, %eax
	je	LBB0_27
## %bb.3:
	movq	%rbx, %rdi
	callq	_sldns_buffer_begin
	movl	%eax, %edi
	callq	_LDNS_OPCODE_WIRE
	movq	_LDNS_PACKET_QUERY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_27
## %bb.4:
	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_27
## %bb.5:
	movq	%rbx, %rdi
	callq	_sldns_buffer_begin
	movl	%eax, %edi
	callq	_LDNS_QDCOUNT
	cmpl	$1, %eax
	jne	LBB0_27
## %bb.6:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_sldns_buffer_skip
	movq	%rbx, %rdi
	callq	_sldns_buffer_remaining
	cmpl	(%r12), %eax
	jl	LBB0_27
## %bb.7:
	movq	%rbx, %rdi
	callq	_sldns_buffer_current
	movl	16(%r12), %esi
	movl	%eax, %edi
	callq	_query_dname_compare
	testq	%rax, %rax
	jne	LBB0_27
## %bb.8:
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_sldns_buffer_skip
	movq	%rbx, %rdi
	callq	_sldns_buffer_remaining
	cmpl	$4, %eax
	jl	LBB0_27
## %bb.9:
	movq	%rbx, %rdi
	callq	_sldns_buffer_read_u16
	cmpq	%r13, %rax
	jne	LBB0_27
## %bb.10:
	movq	%rbx, %rdi
	callq	_sldns_buffer_read_u16
	cmpq	8(%r12), %rax
	jne	LBB0_27
## %bb.11:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_26
## %bb.12:
	movq	%rbx, %rdi
	callq	_sldns_buffer_begin
	movl	%eax, %edi
	callq	_LDNS_ANCOUNT
	testq	%rax, %rax
	je	LBB0_27
## %bb.13:
	movq	%rbx, %rdi
	callq	_sldns_buffer_remaining
	testl	%eax, %eax
	jle	LBB0_27
## %bb.14:
	movq	%rbx, %rdi
	callq	_sldns_buffer_current
	movl	16(%r12), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_dname_pkt_compare
	testq	%rax, %rax
	jne	LBB0_27
## %bb.15:
	movq	%rbx, %rdi
	callq	_pkt_dname_len
	testl	%eax, %eax
	je	LBB0_27
## %bb.16:
	movq	%rbx, %rdi
	callq	_sldns_buffer_remaining
	cmpl	$10, %eax
	jl	LBB0_27
## %bb.17:
	movq	%rbx, %rdi
	callq	_sldns_buffer_read_u16
	cmpq	%r13, %rax
	jne	LBB0_27
## %bb.18:
	movq	%rbx, %rdi
	callq	_sldns_buffer_read_u16
	cmpq	8(%r12), %rax
	jne	LBB0_27
## %bb.19:
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_sldns_buffer_skip
	movq	%rbx, %rdi
	callq	_sldns_buffer_read_u16
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_sldns_buffer_remaining
	cltq
	cmpq	%rax, %r12
	jg	LBB0_27
## %bb.20:
	movq	%rbx, %rdi
	callq	_sldns_buffer_remaining
	testl	%eax, %eax
	jle	LBB0_27
## %bb.21:
	movq	%rbx, %rdi
	callq	_pkt_dname_len
	testl	%eax, %eax
	je	LBB0_27
## %bb.22:
	movq	%rbx, %rdi
	callq	_sldns_buffer_remaining
	testl	%eax, %eax
	jle	LBB0_27
## %bb.23:
	movq	%rbx, %rdi
	callq	_pkt_dname_len
	testl	%eax, %eax
	je	LBB0_27
## %bb.24:
	movq	%rbx, %rdi
	callq	_sldns_buffer_remaining
	cmpl	$20, %eax
	jl	LBB0_27
## %bb.25:
	movq	%rbx, %rdi
	callq	_sldns_buffer_read_u32
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_26:
	movl	$1, %r15d
LBB0_27:
	movl	%r15d, %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_PACKET_QUERY,8,3          ## @LDNS_PACKET_QUERY
	.comm	_LDNS_RCODE_NOERROR,8,3         ## @LDNS_RCODE_NOERROR
	.no_dead_strip	_check_packet_ok
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_packet_ok
_check_packet_ok:                       ; @check_packet_ok
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	bl	_sldns_buffer_limit
Lloh0:
	adrp	x23, _LDNS_HEADER_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _LDNS_HEADER_SIZE@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.lt	LBB0_15
; %bb.1:
	mov	x0, x20
	bl	_sldns_buffer_begin
	bl	_LDNS_ID_WIRE
	ldr	x8, [x21, #24]
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.2:
	mov	x0, x20
	bl	_sldns_buffer_begin
	bl	_LDNS_QR_WIRE
	cbz	w0, LBB0_16
; %bb.3:
	mov	x0, x20
	bl	_sldns_buffer_begin
	bl	_LDNS_OPCODE_WIRE
Lloh2:
	adrp	x8, _LDNS_PACKET_QUERY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LDNS_PACKET_QUERY@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.4:
	mov	x0, x20
	bl	_sldns_buffer_begin
	bl	_LDNS_RCODE_WIRE
Lloh5:
	adrp	x8, _LDNS_RCODE_NOERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LDNS_RCODE_NOERROR@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.5:
	mov	x0, x20
	bl	_sldns_buffer_begin
	bl	_LDNS_QDCOUNT
	cmp	w0, #1
	b.ne	LBB0_15
; %bb.6:
	ldr	w1, [x23]
	mov	x0, x20
	bl	_sldns_buffer_skip
	mov	x0, x20
	bl	_sldns_buffer_remaining
	ldr	w8, [x21]
	cmp	w0, w8
	b.lt	LBB0_15
; %bb.7:
	mov	x0, x20
	bl	_sldns_buffer_current
	ldr	w1, [x21, #16]
	bl	_query_dname_compare
	cbnz	x0, LBB0_15
; %bb.8:
	ldr	w1, [x21]
	mov	x0, x20
	bl	_sldns_buffer_skip
	mov	x0, x20
	bl	_sldns_buffer_remaining
	cmp	w0, #4
	b.lt	LBB0_15
; %bb.9:
	mov	x0, x20
	bl	_sldns_buffer_read_u16
	cmp	x0, x22
	b.ne	LBB0_15
; %bb.10:
	mov	x0, x20
	bl	_sldns_buffer_read_u16
	ldr	x8, [x21, #8]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.11:
	cbz	x19, LBB0_28
; %bb.12:
	mov	x0, x20
	bl	_sldns_buffer_begin
	bl	_LDNS_ANCOUNT
	cbz	x0, LBB0_16
; %bb.13:
	mov	x0, x20
	bl	_sldns_buffer_remaining
	cmp	w0, #1
	b.lt	LBB0_15
; %bb.14:
	mov	x0, x20
	bl	_sldns_buffer_current
	mov	x1, x0
	ldr	w2, [x21, #16]
	mov	x0, x20
	bl	_dname_pkt_compare
	cbz	x0, LBB0_17
LBB0_15:
	mov	w0, #0
LBB0_16:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_17:
	mov	x0, x20
	bl	_pkt_dname_len
	cbz	w0, LBB0_16
; %bb.18:
	mov	x0, x20
	bl	_sldns_buffer_remaining
	cmp	w0, #10
	b.lt	LBB0_15
; %bb.19:
	mov	x0, x20
	bl	_sldns_buffer_read_u16
	cmp	x0, x22
	b.ne	LBB0_15
; %bb.20:
	mov	x0, x20
	bl	_sldns_buffer_read_u16
	ldr	x8, [x21, #8]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.21:
	mov	x0, x20
	mov	w1, #4
	bl	_sldns_buffer_skip
	mov	x0, x20
	bl	_sldns_buffer_read_u16
	mov	x21, x0
	mov	x0, x20
	bl	_sldns_buffer_remaining
	cmp	x21, w0, sxtw
	b.gt	LBB0_15
; %bb.22:
	mov	x0, x20
	bl	_sldns_buffer_remaining
	cmp	w0, #1
	b.lt	LBB0_15
; %bb.23:
	mov	x0, x20
	bl	_pkt_dname_len
	cbz	w0, LBB0_16
; %bb.24:
	mov	x0, x20
	bl	_sldns_buffer_remaining
	cmp	w0, #1
	b.lt	LBB0_15
; %bb.25:
	mov	x0, x20
	bl	_pkt_dname_len
	cbz	w0, LBB0_16
; %bb.26:
	mov	x0, x20
	bl	_sldns_buffer_remaining
	cmp	w0, #20
	b.lt	LBB0_15
; %bb.27:
	mov	x0, x20
	bl	_sldns_buffer_read_u32
	str	w0, [x19]
LBB0_28:
	mov	w0, #1
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_HEADER_SIZE,8,3           ; @LDNS_HEADER_SIZE
	.comm	_LDNS_PACKET_QUERY,8,3          ; @LDNS_PACKET_QUERY
	.comm	_LDNS_RCODE_NOERROR,8,3         ; @LDNS_RCODE_NOERROR
	.no_dead_strip	_check_packet_ok
.subsections_via_symbols
