	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_inet6_rthdr_add                ## -- Begin function inet6_rthdr_add
	.p2align	4, 0x90
_inet6_rthdr_add:                       ## @inet6_rthdr_add
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_CMSG_DATA
	movq	%rax, %rbx
	movl	$-1, %eax
	cmpl	$128, (%rbx)
	jne	LBB0_6
## %bb.1:
	movq	_IPV6_RTHDR_LOOSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%r12d, %ecx
	je	LBB0_3
## %bb.2:
	movq	_IPV6_RTHDR_STRICT@GOTPCREL(%rip), %rdx
	cmpl	%r12d, (%rdx)
	jne	LBB0_6
LBB0_3:
	movl	(%rbx), %edx
	cmpl	$23, %edx
	je	LBB0_6
## %bb.4:
	cmpl	%r12d, %ecx
	jne	LBB0_6
## %bb.5:
	incl	%edx
	movl	%edx, (%rbx)
	movl	16(%rbx), %eax
	leal	(%rbx,%rax,8), %esi
	addl	$8, %esi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_bcopy
	movl	16(%rbx), %eax
	leal	8(,%rax,8), %edi
	callq	_CMSG_LEN
	movl	%eax, (%r15)
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IPV6_RTHDR_LOOSE,4,2           ## @IPV6_RTHDR_LOOSE
	.comm	_IPV6_RTHDR_STRICT,4,2          ## @IPV6_RTHDR_STRICT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_inet6_rthdr_add                ; -- Begin function inet6_rthdr_add
	.p2align	2
_inet6_rthdr_add:                       ; @inet6_rthdr_add
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	bl	_CMSG_DATA
	ldr	w8, [x0]
	cmp	w8, #128
	b.ne	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _IPV6_RTHDR_LOOSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPV6_RTHDR_LOOSE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _IPV6_RTHDR_STRICT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IPV6_RTHDR_STRICT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w22
	ccmp	w9, w22, #4, ne
	b.ne	LBB0_3
; %bb.2:
	mov	x21, x0
	ldr	w9, [x0]
	cmp	w9, #23
	ccmp	w8, w22, #0, ne
	b.eq	LBB0_5
LBB0_3:
	mov	w0, #-1
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	add	w8, w9, #1
	str	w8, [x21]
	ldr	w8, [x21, #16]
	add	w8, w21, w8, lsl #3
	add	w1, w8, #8
	mov	x0, x20
	mov	w2, #4
	bl	_bcopy
	ldr	w8, [x21, #16]
	lsl	w8, w8, #3
	add	w0, w8, #8
	bl	_CMSG_LEN
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IPV6_RTHDR_LOOSE,4,2           ; @IPV6_RTHDR_LOOSE
	.comm	_IPV6_RTHDR_STRICT,4,2          ; @IPV6_RTHDR_STRICT
.subsections_via_symbols
