	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_inet6_opt_next                 ## -- Begin function inet6_opt_next
	.p2align	4, 0x90
_inet6_opt_next:                        ## @inet6_opt_next
	.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
	movl	$-1, %ebx
	testl	%esi, %esi
	je	LBB0_12
## %bb.1:
	movl	%esi, %eax
	andl	$7, %eax
	jne	LBB0_12
## %bb.2:
	movq	%r9, %r14
	movq	%rdi, %r15
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movslq	%esi, %rax
	leaq	(%rdi,%rax,4), %r13
	movslq	%edx, %rax
	leaq	(,%rax,4), %rcx
	testl	%eax, %eax
	movl	$4, %r12d
	cmovneq	%rcx, %r12
	addq	%rdi, %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	cltq
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r12,%rax,4), %r12
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r13, %r12
	jae	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r12), %ecx
	movl	$1, %eax
	cmpl	$129, %ecx
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	cmpl	$128, %ecx
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rsi
	callq	_ip6optlen
	testl	%eax, %eax
	jne	LBB0_7
	jmp	LBB0_9
LBB0_10:
	movq	%r13, %rsi
	callq	_ip6optlen
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	je	LBB0_9
## %bb.11:
	movl	(%r12), %ecx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, (%rdx)
	leal	-2(%rax), %ecx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, (%rdx)
	leaq	8(%r12), %rcx
	movq	%rcx, (%r14)
	leaq	(%r12,%rax,4), %rbx
	subq	%r15, %rbx
	shrq	$2, %rbx
	jmp	LBB0_12
LBB0_9:
	movq	$0, (%r14)
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_inet6_opt_next                 ; -- Begin function inet6_opt_next
	.p2align	2
_inet6_opt_next:                        ; @inet6_opt_next
	.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	x21, x0
	mov	w0, #-1
	cbz	w1, LBB0_13
; %bb.1:
	and	w8, w1, #0x7
	cbnz	w8, LBB0_13
; %bb.2:
	mov	x19, x5
	add	x24, x21, w1, sxtw #2
	add	x8, x21, #4
	add	x9, x21, w2, sxtw #2
	cmp	w2, #0
	csel	x23, x8, x9, eq
	cmp	x23, x24
	b.hs	LBB0_12
; %bb.3:
	mov	x20, x4
	mov	x22, x3
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w8, #1
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, x8, lsl #2
	cmp	x23, x24
	b.hs	LBB0_12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	cmp	w8, #129
	b.eq	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	cmp	w8, #128
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x1, x24
	bl	_ip6optlen
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	sxtw	x8, w0
	b	LBB0_5
LBB0_10:
	mov	x1, x24
	bl	_ip6optlen
	cbz	w0, LBB0_12
; %bb.11:
	mov	x8, x23
	ldr	w9, [x8], #8
	str	w9, [x22]
	sub	w9, w0, #2
	str	w9, [x20]
	str	x8, [x19]
	add	x8, x23, w0, uxtw #2
	sub	x8, x8, x21
	lsr	x0, x8, #2
	b	LBB0_13
LBB0_12:
	str	xzr, [x19]
	mov	w0, #-1
LBB0_13:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
