	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nat64_getlasthdr               ## -- Begin function nat64_getlasthdr
	.p2align	4, 0x90
_nat64_getlasthdr:                      ## @nat64_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	%rsi, %r14
	movq	%rdi, %r15
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movl	(%r14), %esi
	jmp	LBB0_3
LBB0_2:
	xorl	%esi, %esi
LBB0_3:
	movslq	(%r15), %rax
	movslq	%esi, %r12
	addq	$16, %r12
	cmpq	%rax, %r12
	jbe	LBB0_5
LBB0_15:
	movl	$-1, %ebx
	jmp	LBB0_16
LBB0_5:
	movq	%r15, %rdi
	callq	_mtodo
	movq	%rax, %r13
	movl	(%rax), %ebx
	movq	_IPPROTO_HOPOPTS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_8
LBB0_6:
	movq	_IPPROTO_ROUTING@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_8
## %bb.7:
	movq	_IPPROTO_DSTOPTS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_12
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_mtodo
	cmpl	%r12d, (%r15)
	jl	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	_IPPROTO_HOPOPTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %ebx
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpq	$0, 8(%r13)
	je	LBB0_15
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	(%rax), %ebx
	movl	4(%rax), %eax
	leal	(%r12,%rax,8), %r12d
	addl	$8, %r12d
	cmpl	%ecx, %ebx
	jne	LBB0_6
	jmp	LBB0_8
LBB0_12:
	testq	%r14, %r14
	je	LBB0_16
## %bb.13:
	movl	%r12d, (%r14)
LBB0_16:
	movl	%ebx, %eax
	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
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nat64_getlasthdr               ; -- Begin function nat64_getlasthdr
	.p2align	2
_nat64_getlasthdr:                      ; @nat64_getlasthdr
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	cbz	x1, LBB0_2
; %bb.1:
	ldr	w1, [x19]
LBB0_2:
	ldrsw	x8, [x20]
	sxtw	x9, w1
	add	x21, x9, #16
	cmp	x21, x8
	b.ls	LBB0_4
LBB0_3:
	mov	w22, #-1
	b	LBB0_12
LBB0_4:
	mov	x0, x20
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_mtodo
	ldr	w22, [x0]
Lloh0:
	adrp	x24, _IPPROTO_HOPOPTS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _IPPROTO_HOPOPTS@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh2:
	adrp	x25, _IPPROTO_ROUTING@GOTPAGE
Lloh3:
	ldr	x25, [x25, _IPPROTO_ROUTING@GOTPAGEOFF]
	ldr	w9, [x25]
Lloh4:
	adrp	x26, _IPPROTO_DSTOPTS@GOTPAGE
Lloh5:
	ldr	x26, [x26, _IPPROTO_DSTOPTS@GOTPAGEOFF]
	ldr	w10, [x26]
	cmp	w22, w8
	ccmp	w22, w9, #4, ne
	ccmp	w22, w10, #4, ne
	b.ne	LBB0_10
; %bb.5:
	mov	x23, x0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldp	w22, w9, [x0]
	add	w9, w21, w9, lsl #3
	add	w21, w9, #8
	ldr	w9, [x25]
	ldr	w10, [x26]
	cmp	w22, w8
	ccmp	w22, w9, #4, ne
	ccmp	w22, w10, #4, ne
	b.ne	LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_mtodo
	ldr	w8, [x20]
	cmp	w8, w21
	b.lt	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x24]
	cmp	w22, w8
	b.ne	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [x23, #8]
	cbnz	x9, LBB0_6
	b	LBB0_3
LBB0_10:
	cbz	x19, LBB0_12
; %bb.11:
	str	w21, [x19]
LBB0_12:
	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
	ldp	x26, x25, [sp], #80             ; 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
.subsections_via_symbols
