	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipv6_rearrange_rthdr
_ipv6_rearrange_rthdr:                  ## @ipv6_rearrange_rthdr
	.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
	movl	(%rsi), %r13d
	testl	%r13d, %r13d
	je	LBB0_2
## %bb.1:
	movq	%rdi, %r15
	movl	$0, (%rsi)
	movl	4(%rsi), %eax
	sarl	%eax
	movq	(%rsi), %r14
	movslq	%eax, %rbx
	leaq	(%r14,%rbx,4), %rsi
	addq	$-4, %rsi
	leaq	-48(%rbp), %rdi
	callq	_ipv6_addr_copy
	subl	%r13d, %ebx
	movslq	%ebx, %rax
	leaq	(%r14,%rax,4), %r12
	leaq	(%r14,%rax,4), %rdi
	addq	$4, %rdi
	leal	-4(,%r13,4), %edx
	movq	%r12, %rsi
	callq	_memmove
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ipv6_addr_copy
	movq	%r15, %rdi
	leaq	-48(%rbp), %rsi
	callq	_ipv6_addr_copy
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ipv6_rearrange_rthdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipv6_rearrange_rthdr
_ipv6_rearrange_rthdr:                  ; @ipv6_rearrange_rthdr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	w21, [x1]
	cbz	w21, LBB0_2
; %bb.1:
	mov	x19, x0
	str	wzr, [x1]
	ldr	w8, [x1, #4]
	asr	w20, w8, #1
	ldr	x22, [x1]
	add	x8, x22, w20, sxtw #2
	sub	x1, x8, #4
	add	x0, sp, #8
	bl	_ipv6_addr_copy
	sub	w8, w20, w21
	add	x20, x22, w8, sxtw #2
	add	x0, x20, #4
	lsl	w8, w21, #2
	sub	w2, w8, #4
	mov	x1, x20
	bl	_memmove
	mov	x0, x20
	mov	x1, x19
	bl	_ipv6_addr_copy
	add	x1, sp, #8
	mov	x0, x19
	bl	_ipv6_addr_copy
LBB0_2:
	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
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ipv6_rearrange_rthdr
.subsections_via_symbols
