	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function copypktopts
_copypktopts:                           ## @copypktopts
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %rbx
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.3:
	movl	%edx, %r15d
	movq	%rdi, %r14
	movl	32(%rbx), %eax
	movl	%eax, 32(%rdi)
	movups	16(%rbx), %xmm0
	movups	%xmm0, 16(%rdi)
	cmpq	$0, 8(%rbx)
	je	LBB0_6
## %bb.4:
	movq	_M_IP6OPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	movl	%r15d, %edx
	callq	_malloc
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	8(%rbx), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
LBB0_6:
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movl	(%rax), %edi
	movq	_M_IP6OPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edx
	callq	_malloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	(%rbx), %rsi
	movl	(%rsi), %edx
	movq	%rax, %rdi
	callq	_memmove
LBB0_9:
	movq	_ip6po_hbh@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PKTOPT_EXTHDRCPY
	movq	_ip6po_dest1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PKTOPT_EXTHDRCPY
	movq	_ip6po_dest2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PKTOPT_EXTHDRCPY
	movq	_ip6po_rthdr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PKTOPT_EXTHDRCPY
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_2:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	movq	%r14, %rdi
	movl	$-1, %esi
	callq	_ip6_clearpktopts
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_M_IP6OPT,4,2                   ## @M_IP6OPT
	.comm	_ip6po_hbh,4,2                  ## @ip6po_hbh
	.comm	_ip6po_dest1,4,2                ## @ip6po_dest1
	.comm	_ip6po_dest2,4,2                ## @ip6po_dest2
	.comm	_ip6po_rthdr,4,2                ## @ip6po_rthdr
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"ip6_clearpktopts: invalid argument"

	.no_dead_strip	_copypktopts
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function copypktopts
_copypktopts:                           ; @copypktopts
	.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
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x1
	cbz	x1, LBB0_9
; %bb.2:
	mov	x21, x2
	mov	x19, x0
	ldr	w8, [x20, #32]
	str	w8, [x0, #32]
	ldr	q0, [x20, #16]
	str	q0, [x0, #16]
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x22, _M_IP6OPT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _M_IP6OPT@GOTPAGEOFF]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	w1, [x22]
	mov	w0, #4
	mov	x2, x21
	bl	_malloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_10
; %bb.4:
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	str	w8, [x0]
LBB0_5:
	ldr	x8, [x20]
	cbz	x8, LBB0_8
; %bb.6:
	ldr	w0, [x8]
	ldr	w1, [x22]
	mov	x2, x21
	bl	_malloc
	str	x0, [x19]
	cbz	x0, LBB0_10
; %bb.7:
	ldr	x1, [x20]
	ldr	w2, [x1]
	bl	_memmove
LBB0_8:
Lloh2:
	adrp	x8, _ip6po_hbh@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ip6po_hbh@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_PKTOPT_EXTHDRCPY
Lloh5:
	adrp	x8, _ip6po_dest1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ip6po_dest1@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_PKTOPT_EXTHDRCPY
Lloh8:
	adrp	x8, _ip6po_dest2@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ip6po_dest2@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_PKTOPT_EXTHDRCPY
Lloh11:
	adrp	x8, _ip6po_rthdr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ip6po_rthdr@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_PKTOPT_EXTHDRCPY
	mov	w0, #0
	b	LBB0_12
LBB0_9:
Lloh14:
	adrp	x0, l_str@PAGE
Lloh15:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
	mov	x0, x19
	mov	w1, #-1
	bl	_ip6_clearpktopts
Lloh18:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
LBB0_12:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_M_IP6OPT,4,2                   ; @M_IP6OPT
	.comm	_ip6po_hbh,4,2                  ; @ip6po_hbh
	.comm	_ip6po_dest1,4,2                ; @ip6po_dest1
	.comm	_ip6po_dest2,4,2                ; @ip6po_dest2
	.comm	_ip6po_rthdr,4,2                ; @ip6po_rthdr
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"ip6_clearpktopts: invalid argument"

	.no_dead_strip	_copypktopts
.subsections_via_symbols
