	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ip6_nexthdr                    ## -- Begin function ip6_nexthdr
	.p2align	4, 0x90
_ip6_nexthdr:                           ## @ip6_nexthdr
	.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, %r14
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r13
	testq	%rdi, %rdi
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_panic
LBB0_2:
	movq	_M_PKTHDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$-1, %r12d
	testl	%eax, (%r13)
	je	LBB0_23
## %bb.3:
	movslq	4(%r13), %rax
	cmpl	%r15d, %eax
	jge	LBB0_4
LBB0_23:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	addl	$-128, %ebx
	cmpl	$8, %ebx
	ja	LBB0_23
## %bb.5:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rbx,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_6:
	movslq	%r15d, %rcx
	addq	$8, %rcx
	cmpq	%rax, %rcx
	ja	LBB0_23
## %bb.7:
	leaq	-48(%rbp), %rcx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	$8, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_m_copydata
	testq	%r14, %r14
	je	LBB0_9
## %bb.8:
	movl	-48(%rbp), %eax
	movl	%eax, (%r14)
LBB0_9:
	movl	-44(%rbp), %eax
	leal	(%r15,%rax,8), %r12d
	addl	$8, %r12d
	jmp	LBB0_23
LBB0_10:
	movslq	%r15d, %rbx
	addq	$4, %rbx
	cmpq	%rax, %rbx
	ja	LBB0_23
## %bb.11:
	leaq	-48(%rbp), %rcx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	$4, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_m_copydata
	testq	%r14, %r14
	je	LBB0_14
## %bb.12:
	movl	-48(%rbp), %eax
	jmp	LBB0_13
LBB0_15:
	movslq	%r15d, %rbx
	addq	$8, %rbx
	cmpq	%rax, %rbx
	ja	LBB0_23
## %bb.16:
	leaq	-48(%rbp), %rcx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	$8, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_m_copydata
	movq	_IP6F_OFF_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -48(%rbp)
	jne	LBB0_23
## %bb.17:
	testq	%r14, %r14
	je	LBB0_14
## %bb.18:
	movl	-44(%rbp), %eax
LBB0_13:
	movl	%eax, (%r14)
LBB0_14:
	movl	%ebx, %r12d
	jmp	LBB0_23
LBB0_19:
	movslq	%r15d, %rcx
	addq	$8, %rcx
	cmpq	%rax, %rcx
	ja	LBB0_23
## %bb.20:
	leaq	-48(%rbp), %rcx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	$8, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_m_copydata
	testq	%r14, %r14
	je	LBB0_22
## %bb.21:
	movl	-48(%rbp), %eax
	movl	%eax, (%r14)
LBB0_22:
	movl	-44(%rbp), %eax
	leal	(%r15,%rax,4), %r12d
	addl	$8, %r12d
	jmp	LBB0_23
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_23
	.long	L0_0_set_10
	.long	L0_0_set_23
	.long	L0_0_set_6
	.long	L0_0_set_15
	.long	L0_0_set_23
	.long	L0_0_set_6
	.long	L0_0_set_19
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ip6_nexthdr: m == NULL"

	.comm	_M_PKTHDR,4,2                   ## @M_PKTHDR
	.comm	_IP6F_OFF_MASK,4,2              ## @IP6F_OFF_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ip6_nexthdr                    ; -- Begin function ip6_nexthdr
	.p2align	2
_ip6_nexthdr:                           ; @ip6_nexthdr
	.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, x3
	mov	x23, x2
	mov	x20, x1
	mov	x21, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
LBB0_2:
	ldr	w8, [x21]
Lloh2:
	adrp	x9, _M_PKTHDR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _M_PKTHDR@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.3:
	ldrsw	x8, [x21, #4]
	mov	w22, #-1
	cmp	w8, w20
	b.lt	LBB0_20
; %bb.4:
	sub	w9, w23, #128
	cmp	w9, #8
	b.hi	LBB0_20
; %bb.5:
Lloh5:
	adrp	x10, lJTI0_0@PAGE
Lloh6:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_6
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_6:
	mov	x9, x20
	sxtw	x9, w9
	add	x9, x9, #8
	cmp	x9, x8
	b.hi	LBB0_19
; %bb.7:
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	w2, #8
	bl	_m_copydata
	cbz	x19, LBB0_9
; %bb.8:
	ldr	w8, [sp, #8]
	str	w8, [x19]
LBB0_9:
	ldr	w8, [sp, #12]
	add	w8, w20, w8, lsl #3
	b	LBB0_24
LBB0_10:
	sxtw	x9, w20
	add	x22, x9, #4
	cmp	x22, x8
	b.hi	LBB0_19
; %bb.11:
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	w2, #4
	bl	_m_copydata
	cbz	x19, LBB0_20
; %bb.12:
	ldr	w8, [sp, #8]
	str	w8, [x19]
	b	LBB0_20
LBB0_13:
	mov	x9, x20
	sxtw	x9, w9
	add	x22, x9, #8
	cmp	x22, x8
	b.hi	LBB0_19
; %bb.14:
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	w2, #8
	bl	_m_copydata
	ldr	w8, [sp, #8]
Lloh7:
	adrp	x9, _IP6F_OFF_MASK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _IP6F_OFF_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_19
; %bb.15:
	cbz	x19, LBB0_17
; %bb.16:
	ldr	w8, [sp, #12]
	str	w8, [x19]
LBB0_17:
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	b	LBB0_20
LBB0_18:
	mov	x9, x20
	sxtw	x9, w9
	add	x9, x9, #8
	cmp	x9, x8
	b.ls	LBB0_21
LBB0_19:
	mov	w22, #-1
LBB0_20:
	mov	x0, x22
	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_21:
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	w2, #8
	bl	_m_copydata
	cbz	x19, LBB0_23
; %bb.22:
	ldr	w8, [sp, #8]
	str	w8, [x19]
LBB0_23:
	ldr	w8, [sp, #12]
	add	w8, w20, w8, lsl #2
LBB0_24:
	add	w22, w8, #8
	b	LBB0_20
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_20-LBB0_6)>>2
	.byte	(LBB0_10-LBB0_6)>>2
	.byte	(LBB0_20-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_13-LBB0_6)>>2
	.byte	(LBB0_20-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_18-LBB0_6)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ip6_nexthdr: m == NULL"

	.comm	_M_PKTHDR,4,2                   ; @M_PKTHDR
	.comm	_IP6F_OFF_MASK,4,2              ; @IP6F_OFF_MASK
.subsections_via_symbols
