	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nptv6_getlasthdr
_nptv6_getlasthdr:                      ## @nptv6_getlasthdr
	.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
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.1:
	movl	(%r14), %ebx
	cmpl	%ebx, (%r15)
	jge	LBB0_4
	jmp	LBB0_11
LBB0_3:
	xorl	%ebx, %ebx
	cmpl	%ebx, (%r15)
	jge	LBB0_4
LBB0_11:
	movl	$-1, %eax
	jmp	LBB0_12
LBB0_4:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_mtodo
	addl	$4, %ebx
	movl	(%rax), %eax
	movq	_IPPROTO_HOPOPTS@GOTPCREL(%rip), %r12
	movq	_IPPROTO_ROUTING@GOTPCREL(%rip), %r13
	cmpl	(%r12), %eax
	je	LBB0_7
	.p2align	4, 0x90
LBB0_5:
	cmpl	(%r13), %eax
	je	LBB0_7
## %bb.6:
	movq	_IPPROTO_DSTOPTS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_mtodo
	cmpl	%ebx, (%r15)
	jl	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %rcx
	movl	(%rax), %eax
	movl	4(%rcx), %ecx
	leal	(%rbx,%rcx,8), %ebx
	addl	$8, %ebx
	cmpl	(%r12), %eax
	jne	LBB0_5
	jmp	LBB0_7
LBB0_9:
	testq	%r14, %r14
	je	LBB0_12
## %bb.10:
	movl	%ebx, (%r14)
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IPPROTO_HOPOPTS,4,2            ## @IPPROTO_HOPOPTS
	.comm	_IPPROTO_ROUTING,4,2            ## @IPPROTO_ROUTING
	.comm	_IPPROTO_DSTOPTS,4,2            ## @IPPROTO_DSTOPTS
	.no_dead_strip	_nptv6_getlasthdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nptv6_getlasthdr
_nptv6_getlasthdr:                      ; @nptv6_getlasthdr
	.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, x2
	mov	x20, x1
	cbz	x2, LBB0_2
; %bb.1:
	ldr	w21, [x19]
	b	LBB0_3
LBB0_2:
	mov	w21, #0
LBB0_3:
	ldr	w8, [x20]
	cmp	w8, w21
	b.ge	LBB0_5
LBB0_4:
	mov	w0, #-1
	b	LBB0_11
LBB0_5:
	mov	x0, x20
	mov	x1, x21
	bl	_mtodo
	add	w21, w21, #4
	ldr	w0, [x0]
Lloh0:
	adrp	x22, _IPPROTO_HOPOPTS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IPPROTO_HOPOPTS@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x23, _IPPROTO_ROUTING@GOTPAGE
Lloh3:
	ldr	x23, [x23, _IPPROTO_ROUTING@GOTPAGEOFF]
	ldr	w9, [x23]
Lloh4:
	adrp	x24, _IPPROTO_DSTOPTS@GOTPAGE
Lloh5:
	ldr	x24, [x24, _IPPROTO_DSTOPTS@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x24]
	cmp	w0, w8
	ccmp	w0, w9, #4, ne
	ccmp	w0, w10, #4, ne
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_mtodo
	ldr	w8, [x20]
	cmp	w8, w21
	b.lt	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldp	w0, w8, [x0]
	add	w8, w21, w8, lsl #3
	add	w21, w8, #8
	ldr	w8, [x22]
	ldr	w9, [x23]
	b	LBB0_6
LBB0_9:
	cbz	x19, LBB0_11
; %bb.10:
	str	w21, [x19]
LBB0_11:
	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
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_IPPROTO_HOPOPTS,4,2            ; @IPPROTO_HOPOPTS
	.comm	_IPPROTO_ROUTING,4,2            ; @IPPROTO_ROUTING
	.comm	_IPPROTO_DSTOPTS,4,2            ; @IPPROTO_DSTOPTS
	.no_dead_strip	_nptv6_getlasthdr
.subsections_via_symbols
