	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mp_SetEnddisc                  ## -- Begin function mp_SetEnddisc
	.p2align	4, 0x90
_mp_SetEnddisc:                         ## @mp_SetEnddisc
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	movq	%r15, %rdi
	callq	_bundle_Phase
	cmpl	$129, %eax
	je	LBB0_6
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_5
## %bb.2:
	movq	16(%rbx), %rdi
	callq	_bundle_HighestState
	movq	_DATALINK_LCP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_3
LBB0_6:
	movl	(%rbx), %ecx
	movslq	4(%rbx), %rax
	cmpl	%eax, %ecx
	jne	LBB0_8
## %bb.7:
	movq	$0, 32(%r15)
	movq	16(%r15), %rax
	movb	$0, (%rax)
	movl	$0, 24(%r15)
	xorl	%r14d, %r14d
	jmp	LBB0_31
LBB0_5:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_8:
	xorl	%r14d, %r14d
	cmpl	%eax, %ecx
	jle	LBB0_31
## %bb.9:
	movq	8(%rbx), %rcx
	movl	(%rcx,%rax,4), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcasecmp
	testl	%eax, %eax
	je	LBB0_10
## %bb.12:
	movq	8(%rbx), %rax
	movslq	4(%rbx), %rcx
	movl	(%rax,%rcx,4), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcasecmp
	testl	%eax, %eax
	je	LBB0_13
## %bb.17:
	movq	8(%rbx), %rax
	movslq	4(%rbx), %rcx
	movl	(%rax,%rcx,4), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcasecmp
	testl	%eax, %eax
	je	LBB0_18
## %bb.24:
	movq	8(%rbx), %rax
	movslq	4(%rbx), %rcx
	movl	(%rax,%rcx,4), %edi
	leaq	L_.str.6(%rip), %rsi
	callq	_strcasecmp
	testl	%eax, %eax
	je	LBB0_25
## %bb.26:
	movq	8(%rbx), %rax
	movslq	4(%rbx), %rcx
	movl	(%rax,%rcx,4), %edi
	leaq	L_.str.7(%rip), %rsi
	callq	_strcasecmp
	testl	%eax, %eax
	je	LBB0_27
## %bb.30:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rax
	movslq	4(%rbx), %rcx
	movl	(%rax,%rcx,4), %edx
	leaq	L_.str.9(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	movl	$6, %r14d
	jmp	LBB0_31
LBB0_3:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
LBB0_4:
	xorl	%eax, %eax
	callq	_log_Printf
	movl	$1, %r14d
LBB0_31:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_ENDDISC_LOCAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r15)
	movq	16(%r15), %rdi
	movq	16(%rbx), %rax
	movl	40(%rax), %esi
LBB0_11:
	callq	_strcpy
	movq	16(%r15), %rdi
	callq	_strlen
	movl	%eax, 24(%r15)
	jmp	LBB0_31
LBB0_13:
	movq	16(%rbx), %rdi
	movq	(%rdi), %rax
	movq	_INADDR_ANY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.14:
	addq	$8, %rdi
	leaq	-32(%rbp), %rsi
	callq	_ncprange_getip4addr
	jmp	LBB0_16
LBB0_18:
	movq	16(%rbx), %rax
	movq	(%rax), %rdi
	movq	_INADDR_ANY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdi
	jne	LBB0_20
## %bb.19:
	addq	$8, %rax
	leaq	-32(%rbp), %rsi
	movq	%rax, %rdi
	callq	_ncprange_getip4addr
	movq	-32(%rbp), %rdi
	jmp	LBB0_21
LBB0_15:
	movq	%rax, -32(%rbp)
LBB0_16:
	movq	16(%r15), %rdi
	leaq	-32(%rbp), %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	_ENDDISC_IP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r15)
	movl	$8, 24(%r15)
	jmp	LBB0_31
LBB0_25:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_randinit
	xorl	%eax, %eax
	callq	_random
	movq	16(%r15), %rcx
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	callq	_random
	movq	16(%r15), %rcx
	movq	%rax, 8(%rcx)
	xorl	%eax, %eax
	callq	_random
	movq	16(%r15), %rcx
	movq	%rax, 16(%rcx)
	movq	_ENDDISC_MAGIC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r15)
	movl	$20, 24(%r15)
	jmp	LBB0_31
LBB0_20:
	movq	%rdi, -32(%rbp)
LBB0_21:
	leaq	-48(%rbp), %rsi
	movl	$1, %edx
	callq	_arp_EtherAddr
	testq	%rax, %rax
	je	LBB0_22
## %bb.23:
	movq	_ENDDISC_MAC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r15)
	movq	16(%r15), %rdi
	movslq	-40(%rbp), %rsi
	shlq	$3, %rsi
	addq	-48(%rbp), %rsi
	movl	-36(%rbp), %edx
	callq	_memcpy
	movl	-36(%rbp), %eax
	movl	%eax, 24(%r15)
	jmp	LBB0_31
LBB0_27:
	movslq	4(%rbx), %rax
	leal	1(%rax), %ecx
	cmpl	%ecx, (%rbx)
	jle	LBB0_29
## %bb.28:
	movq	_ENDDISC_PSN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 32(%r15)
	movq	16(%r15), %rdi
	movq	8(%rbx), %rcx
	movl	4(%rcx,%rax,4), %esi
	jmp	LBB0_11
LBB0_22:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-32(%rbp), %rdi
	callq	_inet_ntoa
	leaq	L_.str.5(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_log_Printf
	movl	$4, %r14d
	jmp	LBB0_31
LBB0_29:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.8(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	movl	$5, %r14d
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
	.comm	_DATALINK_LCP,4,2               ## @DATALINK_LCP
	.comm	_LogWARN,4,2                    ## @LogWARN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enddisc: Only changeable before LCP negotiations\n"

L_.str.1:                               ## @.str.1
	.asciz	"enddisc: Only changeable at phase DEAD/ESTABLISH\n"

L_.str.2:                               ## @.str.2
	.asciz	"label"

	.comm	_ENDDISC_LOCAL,8,3              ## @ENDDISC_LOCAL
L_.str.3:                               ## @.str.3
	.asciz	"ip"

	.comm	_INADDR_ANY,8,3                 ## @INADDR_ANY
	.comm	_ENDDISC_IP,8,3                 ## @ENDDISC_IP
L_.str.4:                               ## @.str.4
	.asciz	"mac"

	.comm	_ENDDISC_MAC,8,3                ## @ENDDISC_MAC
L_.str.5:                               ## @.str.5
	.asciz	"set enddisc: Can't locate MAC address for %s\n"

L_.str.6:                               ## @.str.6
	.asciz	"magic"

	.comm	_ENDDISC_MAGIC,8,3              ## @ENDDISC_MAGIC
L_.str.7:                               ## @.str.7
	.asciz	"psn"

	.comm	_ENDDISC_PSN,8,3                ## @ENDDISC_PSN
L_.str.8:                               ## @.str.8
	.asciz	"PSN endpoint requires additional data\n"

L_.str.9:                               ## @.str.9
	.asciz	"%s: Unrecognised endpoint type\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mp_SetEnddisc                  ; -- Begin function mp_SetEnddisc
	.p2align	2
_mp_SetEnddisc:                         ; @mp_SetEnddisc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x20, x0
	ldr	x19, [x0, #16]
	mov	x0, x19
	bl	_bundle_Phase
	cmp	w0, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w0, #128
	b.ne	LBB0_5
; %bb.2:
	ldr	x0, [x20, #16]
	bl	_bundle_HighestState
Lloh0:
	adrp	x8, _DATALINK_LCP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DATALINK_LCP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ge	LBB0_13
LBB0_3:
	ldp	w9, w8, [x20]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	cmp	w9, w8
	b.ne	LBB0_6
; %bb.4:
	mov	w0, #0
	str	xzr, [x19, #32]
	ldr	x8, [x19, #16]
	strb	wzr, [x8]
	str	wzr, [x19, #24]
	b	LBB0_32
LBB0_5:
Lloh3:
	adrp	x8, _LogWARN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_6:
	cmp	w9, w8
	b.le	LBB0_15
; %bb.7:
	ldr	x9, [x20, #8]
	ldr	w0, [x9, x8, lsl #2]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcasecmp
	cbz	w0, LBB0_16
; %bb.8:
	ldr	x8, [x20, #8]
	ldrsw	x9, [x20, #4]
	ldr	w0, [x8, x9, lsl #2]
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strcasecmp
	cbz	w0, LBB0_18
; %bb.9:
	ldr	x8, [x20, #8]
	ldrsw	x9, [x20, #4]
	ldr	w0, [x8, x9, lsl #2]
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strcasecmp
	cbz	w0, LBB0_20
; %bb.10:
	ldr	x8, [x20, #8]
	ldrsw	x9, [x20, #4]
	ldr	w0, [x8, x9, lsl #2]
Lloh14:
	adrp	x1, l_.str.6@PAGE
Lloh15:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_strcasecmp
	cbz	w0, LBB0_24
; %bb.11:
	ldr	x8, [x20, #8]
	ldrsw	x9, [x20, #4]
	ldr	w0, [x8, x9, lsl #2]
Lloh16:
	adrp	x1, l_.str.7@PAGE
Lloh17:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_strcasecmp
	cbz	w0, LBB0_28
; %bb.12:
Lloh18:
	adrp	x8, _LogWARN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ldr	x8, [x20, #8]
	ldrsw	x9, [x20, #4]
	ldr	w8, [x8, x9, lsl #2]
	str	x8, [sp]
Lloh21:
	adrp	x1, l_.str.9@PAGE
Lloh22:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_log_Printf
	mov	w0, #6
	b	LBB0_32
LBB0_13:
Lloh23:
	adrp	x8, _LogWARN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
LBB0_14:
	bl	_log_Printf
	mov	w0, #1
	b	LBB0_32
LBB0_15:
	mov	w0, #0
	b	LBB0_32
LBB0_16:
Lloh28:
	adrp	x8, _ENDDISC_LOCAL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENDDISC_LOCAL@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	str	x8, [x19, #32]
	ldr	x0, [x19, #16]
	ldr	x8, [x20, #16]
	ldr	w1, [x8, #40]
LBB0_17:
	bl	_strcpy
	ldr	x0, [x19, #16]
	bl	_strlen
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #24]
	b	LBB0_32
LBB0_18:
	ldr	x8, [x20, #16]
	ldr	x9, [x8]
Lloh31:
	adrp	x10, _INADDR_ANY@GOTPAGE
Lloh32:
	ldr	x10, [x10, _INADDR_ANY@GOTPAGEOFF]
Lloh33:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_22
; %bb.19:
	add	x0, x8, #8
	add	x1, sp, #24
	bl	_ncprange_getip4addr
	b	LBB0_23
LBB0_20:
	ldr	x8, [x20, #16]
	ldr	x0, [x8]
Lloh34:
	adrp	x9, _INADDR_ANY@GOTPAGE
Lloh35:
	ldr	x9, [x9, _INADDR_ANY@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x0, x9
	b.ne	LBB0_25
; %bb.21:
	add	x0, x8, #8
	add	x1, sp, #24
	bl	_ncprange_getip4addr
	ldr	x0, [sp, #24]
	b	LBB0_26
LBB0_22:
	str	x9, [sp, #24]
LBB0_23:
	ldr	x0, [x19, #16]
	mov	w20, #8
	add	x1, sp, #24
	mov	w2, #8
	bl	_memcpy
	mov	w0, #0
Lloh37:
	adrp	x8, _ENDDISC_IP@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ENDDISC_IP@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
	str	x8, [x19, #32]
	str	w20, [x19, #24]
	b	LBB0_32
LBB0_24:
	bl	_randinit
	bl	_random
	ldr	x8, [x19, #16]
	str	x0, [x8]
	bl	_random
	ldr	x8, [x19, #16]
	str	x0, [x8, #8]
	bl	_random
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x19, #16]
	str	x8, [x9, #16]
Lloh40:
	adrp	x8, _ENDDISC_MAGIC@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ENDDISC_MAGIC@GOTPAGEOFF]
Lloh42:
	ldr	x8, [x8]
	str	x8, [x19, #32]
	mov	w8, #20
	str	w8, [x19, #24]
	b	LBB0_32
LBB0_25:
	str	x0, [sp, #24]
LBB0_26:
	add	x1, sp, #8
	mov	w2, #1
	bl	_arp_EtherAddr
	cbz	x0, LBB0_30
; %bb.27:
Lloh43:
	adrp	x8, _ENDDISC_MAC@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ENDDISC_MAC@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	str	x8, [x19, #32]
	ldr	x0, [x19, #16]
	ldr	x8, [sp, #8]
	ldp	w9, w2, [sp, #16]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	add	x1, x8, x9, lsl #3
	bl	_memcpy
	mov	w0, #0
	ldr	w8, [sp, #20]
	str	w8, [x19, #24]
	b	LBB0_32
LBB0_28:
	ldp	w9, w8, [x20]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	add	x8, x8, #1
	cmp	w9, w8
	b.le	LBB0_31
; %bb.29:
Lloh46:
	adrp	x9, _ENDDISC_PSN@GOTPAGE
Lloh47:
	ldr	x9, [x9, _ENDDISC_PSN@GOTPAGEOFF]
Lloh48:
	ldr	x9, [x9]
	str	x9, [x19, #32]
	ldr	x0, [x19, #16]
	ldr	x9, [x20, #8]
	ldr	w1, [x9, x8, lsl #2]
	b	LBB0_17
LBB0_30:
Lloh49:
	adrp	x8, _LogWARN@GOTPAGE
Lloh50:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh51:
	ldr	w19, [x8]
	ldr	x0, [sp, #24]
	bl	_inet_ntoa
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh52:
	adrp	x1, l_.str.5@PAGE
Lloh53:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_log_Printf
	mov	w0, #4
	b	LBB0_32
LBB0_31:
Lloh54:
	adrp	x8, _LogWARN@GOTPAGE
Lloh55:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh56:
	ldr	w0, [x8]
Lloh57:
	adrp	x1, l_.str.8@PAGE
Lloh58:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_log_Printf
	mov	w0, #5
LBB0_32:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.cfi_endproc
                                        ; -- End function
	.comm	_DATALINK_LCP,4,2               ; @DATALINK_LCP
	.comm	_LogWARN,4,2                    ; @LogWARN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enddisc: Only changeable before LCP negotiations\n"

l_.str.1:                               ; @.str.1
	.asciz	"enddisc: Only changeable at phase DEAD/ESTABLISH\n"

l_.str.2:                               ; @.str.2
	.asciz	"label"

	.comm	_ENDDISC_LOCAL,8,3              ; @ENDDISC_LOCAL
l_.str.3:                               ; @.str.3
	.asciz	"ip"

	.comm	_INADDR_ANY,8,3                 ; @INADDR_ANY
	.comm	_ENDDISC_IP,8,3                 ; @ENDDISC_IP
l_.str.4:                               ; @.str.4
	.asciz	"mac"

	.comm	_ENDDISC_MAC,8,3                ; @ENDDISC_MAC
l_.str.5:                               ; @.str.5
	.asciz	"set enddisc: Can't locate MAC address for %s\n"

l_.str.6:                               ; @.str.6
	.asciz	"magic"

	.comm	_ENDDISC_MAGIC,8,3              ; @ENDDISC_MAGIC
l_.str.7:                               ; @.str.7
	.asciz	"psn"

	.comm	_ENDDISC_PSN,8,3                ; @ENDDISC_PSN
l_.str.8:                               ; @.str.8
	.asciz	"PSN endpoint requires additional data\n"

l_.str.9:                               ; @.str.9
	.asciz	"%s: Unrecognised endpoint type\n"

.subsections_via_symbols
