	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_readudp                        ## -- Begin function readudp
	.p2align	4, 0x90
_readudp:                               ## @readudp
	.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	$24, %rsp
	.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, %rbx
	movq	$0, -48(%rbp)
	movq	$0, -56(%rbp)
	movq	_IPPROTO_UDP@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-56(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	callq	_readip
	movl	%eax, %r12d
	leal	1(%r12), %eax
	cmpl	$25, %eax
	jb	LBB0_2
## %bb.1:
	movq	-48(%rbp), %rax
	movq	(%rax), %rdi
	callq	_ntohs
	cmpl	%eax, %r12d
	jne	LBB0_2
## %bb.3:
	movq	-48(%rbp), %rax
	movq	8(%rax), %rcx
	cmpq	(%rbx), %rcx
	jne	LBB0_2
## %bb.4:
	cmpq	$0, 16(%rax)
	je	LBB0_7
## %bb.5:
	movq	(%rax), %rdi
	callq	_ntohs
	movl	%eax, %r12d
	addl	$4, %r12d
	movq	-48(%rbp), %r13
	leaq	-4(%r13), %rbx
	movl	-4(%r13), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	leaq	4(%r13), %rdi
	movl	$4, %esi
	callq	_bzero
	movq	-48(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -4(%r13)
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_in_cksum
	testq	%rax, %rax
	jne	LBB0_2
## %bb.6:
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	movq	-48(%rbp), %rax
LBB0_7:
	movq	(%rax), %rdi
	callq	_ntohs
	cmpl	$23, %eax
	ja	LBB0_8
LBB0_2:
	movq	-56(%rbp), %rdi
	callq	_free
	movl	$-1, %r12d
LBB0_11:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movslq	%r12d, %rbx
	movq	-48(%rbp), %rax
	movq	(%rax), %rdi
	callq	_ntohs
	cltq
	addq	$-24, %rax
	cmpq	%rbx, %rax
	jae	LBB0_10
## %bb.9:
	movq	-48(%rbp), %rax
	movq	(%rax), %rdi
	callq	_ntohs
	movl	%eax, %r12d
	addl	$-24, %r12d
LBB0_10:
	movq	-56(%rbp), %rax
	movq	%rax, (%r15)
	movq	-48(%rbp), %rax
	addq	$24, %rax
	movq	%rax, (%r14)
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_IPPROTO_UDP,4,2                ## @IPPROTO_UDP
	.comm	_debug,8,3                      ## @debug
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_readudp                        ; -- Begin function readudp
	.p2align	2
_readudp:                               ; @readudp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x20, x1
	mov	x22, x0
	stp	xzr, xzr, [sp]
Lloh0:
	adrp	x8, _IPPROTO_UDP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPPROTO_UDP@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	x1, sp
	add	x2, sp, #8
	bl	_readip
	add	w8, w0, #1
	cmp	w8, #25
	b.lo	LBB0_7
; %bb.1:
	mov	x21, x0
	ldr	x8, [sp, #8]
	ldr	x0, [x8]
	bl	_ntohs
	cmp	w21, w0
	b.ne	LBB0_7
; %bb.2:
	ldr	x8, [sp, #8]
	ldr	x9, [x8, #8]
	ldr	x10, [x22]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.3:
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_6
; %bb.4:
	ldr	x0, [x8]
	bl	_ntohs
	add	w21, w0, #4
	ldr	x22, [sp, #8]
	ldr	w23, [x22, #-4]!
	add	x0, x22, #8
	mov	w1, #4
	bl	_bzero
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
	str	x8, [x22]
	mov	x0, x22
	mov	x1, x21
	bl	_in_cksum
	cbnz	x0, LBB0_7
; %bb.5:
	str	w23, [x22]
	ldr	x8, [sp, #8]
LBB0_6:
	ldr	x0, [x8]
	bl	_ntohs
	cmp	w0, #23
	b.hi	LBB0_9
LBB0_7:
	ldr	x0, [sp]
	bl	_free
	mov	w21, #-1
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
	ldr	x8, [sp, #8]
	ldr	x0, [x8]
	bl	_ntohs
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	sub	x8, x8, #24
	cmp	x8, w21, sxtw
	b.hs	LBB0_11
; %bb.10:
	ldr	x8, [sp, #8]
	ldr	x0, [x8]
	bl	_ntohs
	sub	w21, w0, #24
LBB0_11:
	ldr	x8, [sp]
	str	x8, [x20]
	ldr	x8, [sp, #8]
	add	x8, x8, #24
	str	x8, [x19]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IPPROTO_UDP,4,2                ; @IPPROTO_UDP
	.comm	_debug,8,3                      ; @debug
.subsections_via_symbols
