	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_inet6_opt_append               ## -- Begin function inet6_opt_append
	.p2align	4, 0x90
_inet6_opt_append:                      ## @inet6_opt_append
	.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	%ecx, %r14d
	movl	$-1, %ecx
	cmpl	$2, %r14d
	jl	LBB0_14
## %bb.1:
	movl	%r8d, %r15d
	cmpl	$255, %r8d
	ja	LBB0_14
## %bb.2:
	movl	%r9d, %ebx
	cmpl	$8, %r9d
	ja	LBB0_14
## %bb.3:
	movl	$278, %eax                      ## imm = 0x116
	btl	%ebx, %eax
	jae	LBB0_14
## %bb.4:
	cmpl	%r15d, %ebx
	ja	LBB0_14
## %bb.5:
	movl	%edx, %r8d
	leal	(%r8,%r15), %r9d
	leal	(%r8,%r15), %eax
	addl	$2, %eax
	cltd
	idivl	%ebx
	subl	%edx, %ebx
	testl	%edx, %edx
	cmovel	%edx, %ebx
	leal	(%rbx,%r9), %r12d
	addl	$2, %r12d
	testl	%esi, %esi
	je	LBB0_7
## %bb.6:
	cmpl	%esi, %r12d
	jg	LBB0_14
LBB0_7:
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.8:
	movq	16(%rbp), %rcx
	movslq	%r8d, %rax
	leaq	(%rdi,%rax,4), %r13
	cmpl	$1, %ebx
	jne	LBB0_10
## %bb.9:
	movq	_IP6OPT_PAD1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	addq	$4, %r13
	jmp	LBB0_12
LBB0_10:
	jl	LBB0_12
## %bb.11:
	movq	_IP6OPT_PADN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	addl	$-2, %ebx
	leaq	8(%r13), %rdi
	movl	%ebx, 4(%r13)
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	movq	16(%rbp), %rcx
	leaq	8(%r13,%rbx,4), %r13
LBB0_12:
	movl	%r14d, (%r13)
	movl	%r15d, 4(%r13)
	addq	$8, %r13
	movq	%r13, (%rcx)
LBB0_13:
	movl	%r12d, %ecx
LBB0_14:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IP6OPT_PAD1,4,2                ## @IP6OPT_PAD1
	.comm	_IP6OPT_PADN,4,2                ## @IP6OPT_PADN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_inet6_opt_append               ; -- Begin function inet6_opt_append
	.p2align	2
_inet6_opt_append:                      ; @inet6_opt_append
	.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	w19, #-1
	cmp	w3, #2
	b.lt	LBB0_8
; %bb.1:
	mov	x21, x4
	cmp	w4, #255
	b.hi	LBB0_8
; %bb.2:
	mov	w19, #-1
	cmp	w5, #8
	b.hi	LBB0_8
; %bb.3:
	mov	w8, #1
	lsl	w8, w8, w5
	mov	w9, #278
	tst	w8, w9
	b.eq	LBB0_8
; %bb.4:
	cmp	w5, w21
	b.hi	LBB0_7
; %bb.5:
	mov	x20, x6
	mov	x22, x3
	add	w8, w2, w21
	add	w8, w8, #2
	sdiv	w9, w8, w5
	msub	w9, w9, w5, w8
	sub	w10, w5, w9
	cmp	w9, #0
	csel	w9, wzr, w10, eq
	add	w19, w9, w8
	cbz	w1, LBB0_9
; %bb.6:
	cmp	w19, w1
	b.le	LBB0_9
LBB0_7:
	mov	w19, #-1
LBB0_8:
	mov	x0, x19
	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
LBB0_9:
	cbz	x0, LBB0_8
; %bb.10:
	add	x8, x0, w2, sxtw #2
	cmp	w9, #1
	b.ne	LBB0_12
; %bb.11:
Lloh0:
	adrp	x9, _IP6OPT_PAD1@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IP6OPT_PAD1@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [x8], #4
	b	LBB0_14
LBB0_12:
	b.lt	LBB0_14
; %bb.13:
Lloh3:
	adrp	x10, _IP6OPT_PADN@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IP6OPT_PADN@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	sub	w23, w9, #2
	add	x24, x8, #8
	stp	w10, w23, [x8]
	mov	x0, x24
	mov	w1, #0
	mov	x2, x23
	bl	_memset
	add	x8, x24, w23, uxtw #2
LBB0_14:
	add	x9, x8, #8
	stp	w22, w21, [x8]
	str	x9, [x20]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IP6OPT_PAD1,4,2                ; @IP6OPT_PAD1
	.comm	_IP6OPT_PADN,4,2                ; @IP6OPT_PADN
.subsections_via_symbols
