	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_ad
_parse_ad:                              ## @parse_ad
	.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
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	_RIP_DEFAULT@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	je	LBB0_5
## %bb.1:
	movq	%r8, %r14
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%r13, %rdi
	callq	_check_dst
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	movq	%r13, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_ifwithaddr
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_trace_pkt                      ## TAILCALL
LBB0_5:
	movq	%rbx, %rdi
	callq	_naddr_ntoa
	movl	%eax, %r14d
	movq	%r13, %rdi
	callq	_naddr_ntoa
	leaq	_parse_ad.bad_gate(%rip), %rdi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rsi
	movl	%r14d, %ecx
	movl	%eax, %r8d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_msglim                         ## TAILCALL
LBB0_6:
	movl	8(%r14), %edx
	movl	12(%r14), %esi
	movq	%r13, %rdi
	callq	_on_net
	testl	%eax, %eax
	je	LBB0_29
## %bb.7:
	movq	%r12, %rdi
	callq	_ntohl
	movl	%eax, %edi
	callq	_UNSIGN_PREF
	testq	%rax, %rax
	sete	%cl
	movq	_MinMaxAdvertiseInterval@GOTPCREL(%rip), %rdx
	cmpq	%r15, (%rdx)
	setg	%dl
	xorl	%esi, %esi
	orb	%cl, %dl
	cmovneq	%rsi, %r15
	cmovneq	%rsi, %rax
	movq	_MAX_ADS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	testq	%rdx, %rdx
	jle	LBB0_34
## %bb.8:
	movq	_drs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rdx,%rdx,2), %rdx
	shlq	$4, %rdx
	addq	%rcx, %rdx
	movq	_IS_SICK@GOTPCREL(%rip), %r12
	movl	(%r12), %r8d
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_11 Depth=1
	movq	%rdi, %rbx
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	addq	$48, %rcx
	cmpq	%rdx, %rcx
	jae	LBB0_31
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%r13, (%rcx)
	je	LBB0_30
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%rbx, %rdi
	testq	%r15, %r15
	je	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	$0, 8(%rcx)
	movq	%rcx, %rbx
	je	LBB0_10
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	$0, 8(%rdi)
	je	LBB0_9
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	40(%rdi), %rsi
	movl	(%rsi), %esi
	testl	%esi, %r8d
	je	LBB0_25
LBB0_17:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	16(%rdi), %rbx
	cmpq	16(%rcx), %rbx
	jle	LBB0_9
## %bb.18:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	40(%rcx), %rbx
	xorl	(%rbx), %esi
	movq	%rdi, %rbx
	testl	%r8d, %esi
	jne	LBB0_10
	jmp	LBB0_26
LBB0_19:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	(%r14), %esi
	testl	%esi, %r8d
	je	LBB0_28
LBB0_20:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpq	16(%rcx), %rax
	jle	LBB0_27
## %bb.21:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	40(%rcx), %rdi
	xorl	(%rdi), %esi
	testl	%r8d, %esi
	je	LBB0_26
LBB0_27:                                ##   in Loop: Header=BB0_11 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_25:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	40(%rcx), %rbx
	testl	%r8d, (%rbx)
	je	LBB0_17
LBB0_26:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%rcx, %rbx
	jmp	LBB0_10
LBB0_28:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	40(%rcx), %rdi
	movq	%rcx, %rbx
	testl	%r8d, (%rdi)
	jne	LBB0_10
	jmp	LBB0_20
LBB0_29:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_4
LBB0_30:
	movq	%rcx, %rbx
	jmp	LBB0_32
LBB0_31:
	testq	%rbx, %rbx
	je	LBB0_34
LBB0_32:
	movq	%r14, 40(%rbx)
	movq	%r13, (%rbx)
	movq	_now@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 8(%rbx)
	movq	%r15, 32(%rbx)
	movq	%rax, 24(%rbx)
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_PREF
	movq	%rax, 16(%rbx)
	movl	(%r12), %eax
	testl	%eax, (%r14)
	jne	LBB0_34
## %bb.33:
	movq	_MAX_SOLICITATIONS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
LBB0_34:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_parse_ad.bad_gate,4,2 ## @parse_ad.bad_gate
	.comm	_RIP_DEFAULT,8,3                ## @RIP_DEFAULT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"router %s advertising bad gateway %s"

L_.str.1:                               ## @.str.1
	.asciz	"    discard Router Discovery Ad pointing at us"

L_.str.2:                               ## @.str.2
	.asciz	"    discard Router Discovery Ad toward unreachable net"

	.comm	_MinMaxAdvertiseInterval,8,3    ## @MinMaxAdvertiseInterval
	.comm	_drs,8,3                        ## @drs
	.comm	_MAX_ADS,8,3                    ## @MAX_ADS
	.comm	_IS_SICK,4,2                    ## @IS_SICK
	.comm	_now,8,3                        ## @now
	.comm	_MAX_SOLICITATIONS,4,2          ## @MAX_SOLICITATIONS
	.no_dead_strip	_parse_ad
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_ad
_parse_ad:                              ; @parse_ad
	.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	x20, x1
	mov	x23, x0
Lloh0:
	adrp	x8, _RIP_DEFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RIP_DEFAULT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.eq	LBB0_5
; %bb.1:
	mov	x19, x4
	mov	x21, x3
	mov	x22, x2
	mov	x0, x20
	bl	_check_dst
	cbz	w0, LBB0_5
; %bb.2:
	mov	x0, x20
	mov	w1, #1
	mov	w2, #0
	bl	_ifwithaddr
	cbz	x0, LBB0_6
; %bb.3:
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	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
	b	_trace_pkt
LBB0_5:
	mov	x0, x23
	bl	_naddr_ntoa
	mov	x19, x0
	mov	x0, x20
	bl	_naddr_ntoa
Lloh5:
	adrp	x8, _parse_ad.bad_gate@PAGE
Lloh6:
	add	x8, x8, _parse_ad.bad_gate@PAGEOFF
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	mov	x4, x0
	mov	x0, x8
	mov	x1, x23
	mov	x3, 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
	b	_msglim
LBB0_6:
	ldp	w2, w1, [x19, #8]
	mov	x0, x20
	bl	_on_net
	cbz	w0, LBB0_26
; %bb.7:
	mov	x0, x22
	bl	_ntohl
	bl	_UNSIGN_PREF
	cmp	x0, #0
Lloh9:
	adrp	x8, _MinMaxAdvertiseInterval@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MinMaxAdvertiseInterval@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ccmp	x8, x21, #0, ne
	cset	w8, gt
	cmp	w8, #0
	csel	x8, xzr, x21, ne
	csel	x0, xzr, x0, ne
Lloh12:
	adrp	x9, _MAX_ADS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MAX_ADS@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x9]
	cmp	x10, #1
	b.lt	LBB0_31
; %bb.8:
	mov	x22, #0
Lloh15:
	adrp	x9, _drs@GOTPAGE
Lloh16:
	ldr	x9, [x9, _drs@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	mov	w11, #48
	madd	x10, x10, x11, x9
Lloh18:
	adrp	x21, _IS_SICK@GOTPAGE
Lloh19:
	ldr	x21, [x21, _IS_SICK@GOTPAGEOFF]
	ldr	w11, [x21]
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	mov	x22, x12
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x9, x9, #48
	cmp	x9, x10
	b.hs	LBB0_28
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x9]
	cmp	x13, x20
	b.eq	LBB0_27
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x12, x22
	cbz	x8, LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x13, [x9, #8]
	mov	x22, x9
	cbz	x13, LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	cbz	x12, LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x13, [x12, #8]
	cbz	x13, LBB0_9
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x13, [x12, #40]
	ldr	w13, [x13]
	tst	w11, w13
	b.eq	LBB0_23
LBB0_17:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x14, [x12, #16]
	ldr	x15, [x9, #16]
	cmp	x14, x15
	b.le	LBB0_9
; %bb.18:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x14, [x9, #40]
	ldr	w14, [x14]
	eor	w13, w14, w13
	mov	x22, x12
	tst	w13, w11
	b.ne	LBB0_10
	b	LBB0_24
LBB0_19:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w12, [x19]
	tst	w11, w12
	b.eq	LBB0_25
LBB0_20:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x13, [x9, #16]
	cmp	x0, x13
	b.le	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x13, [x9, #40]
	ldr	w13, [x13]
	eor	w12, w13, w12
	tst	w12, w11
	b.eq	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x22, #0
	b	LBB0_10
LBB0_23:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x14, [x9, #40]
	ldr	w14, [x14]
	tst	w14, w11
	b.eq	LBB0_17
LBB0_24:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x22, x9
	b	LBB0_10
LBB0_25:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x13, [x9, #40]
	ldr	w13, [x13]
	mov	x22, x9
	tst	w13, w11
	b.ne	LBB0_10
	b	LBB0_20
LBB0_26:
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_27:
	mov	x22, x9
	b	LBB0_29
LBB0_28:
	cbz	x22, LBB0_31
LBB0_29:
Lloh22:
	adrp	x9, _now@GOTPAGE
Lloh23:
	ldr	x9, [x9, _now@GOTPAGEOFF]
	stp	x8, x19, [x22, #32]
Lloh24:
	ldr	x9, [x9]
	stp	x20, x9, [x22]
	str	x0, [x22, #24]
	mov	x1, x19
	bl	_PREF
	str	x0, [x22, #16]
	ldr	w8, [x19]
	ldr	w9, [x21]
	tst	w9, w8
	b.ne	LBB0_31
; %bb.30:
Lloh25:
	adrp	x8, _MAX_SOLICITATIONS@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MAX_SOLICITATIONS@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	str	w8, [x19, #4]
LBB0_31:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_parse_ad.bad_gate,4,2 ; @parse_ad.bad_gate
	.comm	_RIP_DEFAULT,8,3                ; @RIP_DEFAULT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"router %s advertising bad gateway %s"

l_.str.1:                               ; @.str.1
	.asciz	"    discard Router Discovery Ad pointing at us"

l_.str.2:                               ; @.str.2
	.asciz	"    discard Router Discovery Ad toward unreachable net"

	.comm	_MinMaxAdvertiseInterval,8,3    ; @MinMaxAdvertiseInterval
	.comm	_drs,8,3                        ; @drs
	.comm	_MAX_ADS,8,3                    ; @MAX_ADS
	.comm	_IS_SICK,4,2                    ; @IS_SICK
	.comm	_now,8,3                        ; @now
	.comm	_MAX_SOLICITATIONS,4,2          ; @MAX_SOLICITATIONS
	.no_dead_strip	_parse_ad
.subsections_via_symbols
