	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_rth_add                   ## -- Begin function test_rth_add
	.p2align	4, 0x90
_test_rth_add:                          ## @test_rth_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	%r14
	pushq	%rbx
	movl	$10288, %eax                    ## imm = 0x2830
	callq	____chkstk_darwin
	subq	%rax, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	leaq	L_.str(%rip), %rdi
	movl	$14, %esi
	callq	_set_funcname
	movq	_IPV6_RTHDR_TYPE_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-10272(%rbp), %rdi
	movl	$10240, %esi                    ## imm = 0x2800
	movl	$127, %ecx
	callq	_inet6_rth_init
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	leaq	-10296(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_AF_INET6@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -10284(%rbp)
	movq	_AI_NUMERICHOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -10288(%rbp)
	leaq	L_.str.1(%rip), %rdi
	leaq	-10280(%rbp), %rcx
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_getaddrinfo
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	movl	$127, %ebx
	leaq	-10272(%rbp), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-10280(%rbp), %rax
	movq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_inet6_rth_add
	decl	%ebx
	jne	LBB0_3
## %bb.4:
	movl	-10272(%rbp), %esi
	leaq	l_.str.2(%rip), %rcx
	movl	$127, %edi
	xorl	%edx, %edx
	callq	_checknum
	movq	-10280(%rbp), %rax
	movq	(%rax), %rsi
	leaq	-10272(%rbp), %rdi
	callq	_inet6_rth_add
	leaq	l_.str.3(%rip), %rcx
	movl	$-1, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_checknum
	movq	-10280(%rbp), %rdi
	callq	_freeaddrinfo
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_7
## %bb.5:
	addq	$10288, %rsp                    ## imm = 0x2830
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	xorl	%eax, %eax
	callq	_abort
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test_rth_add"

	.comm	_IPV6_RTHDR_TYPE_0,4,2          ## @IPV6_RTHDR_TYPE_0
	.comm	_AF_INET6,4,2                   ## @AF_INET6
	.comm	_AI_NUMERICHOST,4,2             ## @AI_NUMERICHOST
L_.str.1:                               ## @.str.1
	.asciz	"::1"

	.section	__TEXT,__const
l_.str.2:                               ## @.str.2
	.asciz	"add 127 segments\000"

l_.str.3:                               ## @.str.3
	.asciz	"add 128th segment to 127 segment header\000"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_rth_add                   ; -- Begin function test_rth_add
	.p2align	2
_test_rth_add:                          ; @test_rth_add
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	w9, #10272
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #2, lsl #12             ; =8192
	sub	sp, sp, #2080
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #14
	bl	_set_funcname
Lloh7:
	adrp	x8, _IPV6_RTHDR_TYPE_0@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IPV6_RTHDR_TYPE_0@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	add	x0, sp, #24
	mov	w1, #10240
	mov	w3, #127
	bl	_inet6_rth_init
	cbz	x0, LBB0_6
; %bb.1:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh10:
	adrp	x8, _AF_INET6@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AF_INET6@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _AI_NUMERICHOST@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AI_NUMERICHOST@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #8]
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, sp
	add	x3, sp, #16
	mov	x1, #0
	bl	_getaddrinfo
	cbnz	x0, LBB0_6
; %bb.2:
	mov	w19, #127
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #16]
	ldr	x1, [x8]
	add	x0, sp, #24
	bl	_inet6_rth_add
	subs	w19, w19, #1
	b.ne	LBB0_3
; %bb.4:
	ldr	w1, [sp, #24]
Lloh18:
	adrp	x3, l_.str.2@PAGE
Lloh19:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	w0, #127
	mov	w2, #0
	bl	_checknum
	ldr	x8, [sp, #16]
	ldr	x1, [x8]
	add	x0, sp, #24
	bl	_inet6_rth_add
	mov	x1, x0
Lloh20:
	adrp	x3, l_.str.3@PAGE
Lloh21:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	w0, #-1
	mov	w2, #0
	bl	_checknum
	ldr	x0, [sp, #16]
	bl	_freeaddrinfo
	ldur	x8, [x29, #-24]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.5:
	add	sp, sp, #2, lsl #12             ; =8192
	add	sp, sp, #2080
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	bl	_abort
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test_rth_add"

	.comm	_IPV6_RTHDR_TYPE_0,4,2          ; @IPV6_RTHDR_TYPE_0
	.comm	_AF_INET6,4,2                   ; @AF_INET6
	.comm	_AI_NUMERICHOST,4,2             ; @AI_NUMERICHOST
l_.str.1:                               ; @.str.1
	.asciz	"::1"

	.section	__TEXT,__const
l_.str.2:                               ; @.str.2
	.asciz	"add 127 segments\000"

l_.str.3:                               ; @.str.3
	.asciz	"add 128th segment to 127 segment header\000"

.subsections_via_symbols
