	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ip6_calcmtu
_ip6_calcmtu:                           ## @ip6_calcmtu
	.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
	movq	%r8, %r15
	movq	%rdi, %r12
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.1:
	movq	%r9, %r13
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	leaq	-56(%rbp), %rdi
	movl	$8, %esi
	callq	_bzero
	movq	_INC_ISIPV6@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -52(%rbp)
	movl	(%r14), %eax
	movl	%eax, -56(%rbp)
	movq	%r12, %rdi
	callq	_IN6_LINKMTU
	movq	%rax, %r12
	movq	_IPPROTO_TCP@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	je	LBB0_4
## %bb.2:
	leaq	-56(%rbp), %rdi
	callq	_tcp_hc_getmtu
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_min
	movq	%rax, %rbx
LBB0_4:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	_IPV6_MMTU@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rbx
	cmovaeq	%rbx, %rax
	setb	%sil
	testq	%rbx, %rbx
	cmoveq	%r12, %rax
	setne	%dl
	andb	%sil, %dl
	movzbl	%dl, %edx
	xorl	%esi, %esi
	jmp	LBB0_8
LBB0_5:
	testq	%r12, %r12
	je	LBB0_7
## %bb.6:
	movq	%r12, %rdi
	movq	%rcx, %rbx
	callq	_IN6_LINKMTU
	movq	%rbx, %rcx
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_8
LBB0_7:
	movq	_EHOSTUNREACH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	xorl	%eax, %eax
LBB0_8:
	movq	%rax, (%rcx)
	testq	%r15, %r15
	je	LBB0_10
## %bb.9:
	movl	%edx, (%r15)
LBB0_10:
	movl	%esi, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INC_ISIPV6,4,2                 ## @INC_ISIPV6
	.comm	_IPPROTO_TCP,8,3                ## @IPPROTO_TCP
	.comm	_IPV6_MMTU,8,3                  ## @IPV6_MMTU
	.comm	_EHOSTUNREACH,4,2               ## @EHOSTUNREACH
	.no_dead_strip	_ip6_calcmtu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ip6_calcmtu
_ip6_calcmtu:                           ; @ip6_calcmtu
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x4
	mov	x20, x3
	mov	x22, x0
	cbz	x2, LBB0_5
; %bb.1:
	mov	x23, x5
	mov	x21, x2
	mov	x24, x1
	add	x0, sp, #8
	mov	w1, #8
	bl	_bzero
Lloh0:
	adrp	x8, _INC_ISIPV6@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INC_ISIPV6@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w8, w9, w8
	ldr	w9, [x24]
	stp	w9, w8, [sp, #8]
	mov	x0, x22
	bl	_IN6_LINKMTU
	mov	x22, x0
Lloh3:
	adrp	x8, _IPPROTO_TCP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IPPROTO_TCP@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x23
	b.eq	LBB0_4
; %bb.2:
	add	x0, sp, #8
	bl	_tcp_hc_getmtu
	cbz	x0, LBB0_4
; %bb.3:
	mov	x1, x21
	bl	_min
	mov	x21, x0
LBB0_4:
	mov	w0, #0
Lloh6:
	adrp	x8, _IPV6_MMTU@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IPV6_MMTU@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x21, x8
	csel	x8, x8, x21, lo
	cset	w9, lo
	cmp	x21, #0
	csel	x8, x22, x8, eq
	cset	w10, ne
	and	w9, w10, w9
	str	x8, [x20]
	cbnz	x19, LBB0_7
	b	LBB0_8
LBB0_5:
	cbz	x22, LBB0_9
; %bb.6:
	mov	x0, x22
	bl	_IN6_LINKMTU
	mov	x8, x0
	mov	w9, #0
	mov	w0, #0
	str	x8, [x20]
	cbz	x19, LBB0_8
LBB0_7:
	str	w9, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
	mov	w9, #0
	mov	x8, #0
Lloh9:
	adrp	x10, _EHOSTUNREACH@GOTPAGE
Lloh10:
	ldr	x10, [x10, _EHOSTUNREACH@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x10]
	str	x8, [x20]
	cbnz	x19, LBB0_7
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_INC_ISIPV6,4,2                 ; @INC_ISIPV6
	.comm	_IPPROTO_TCP,8,3                ; @IPPROTO_TCP
	.comm	_IPV6_MMTU,8,3                  ; @IPV6_MMTU
	.comm	_EHOSTUNREACH,4,2               ; @EHOSTUNREACH
	.no_dead_strip	_ip6_calcmtu
.subsections_via_symbols
