	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_datalink_ComeDown              ## -- Begin function datalink_ComeDown
	.p2align	4, 0x90
_datalink_ComeDown:                     ## @datalink_ComeDown
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_CLOSE_LCP@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_datalink_DontHangup
	jmp	LBB0_4
LBB0_2:
	movq	_CLOSE_STAYDOWN@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_datalink_StayDown
LBB0_4:
	movl	(%rbx), %ecx
	movl	$0, (%rbx)
	movq	8(%rbx), %rax
	movq	_DATALINK_READY@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jl	LBB0_6
## %bb.5:
	testl	%ecx, %ecx
	je	LBB0_6
## %bb.18:
	movl	40(%rbx), %edi
	callq	_physical_StopDeviceTimer
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_datalink_NewState              ## TAILCALL
LBB0_6:
	movq	_DATALINK_CLOSED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_17
## %bb.7:
	movq	_DATALINK_HANGUP@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	je	LBB0_17
## %bb.8:
	movl	40(%rbx), %edi
	callq	_physical_Offline
	cmpq	$0, 32(%rbx)
	je	LBB0_16
## %bb.9:
	movq	8(%rbx), %rax
	movq	_DATALINK_OPENING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_16:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_datalink_HangupDone            ## TAILCALL
LBB0_10:
	movq	_DATALINK_LOGOUT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	cmpq	%rsi, %rax
	jne	LBB0_14
## %bb.11:
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	callq	_datalink_NewState
	movl	20(%rbx), %esi
	addq	$24, %rbx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_chat_Setup
	testl	%eax, %eax
	jne	LBB0_17
## %bb.12:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_13
LBB0_14:
	movq	%rbx, %rdi
	callq	_datalink_NewState
	movl	16(%rbx), %esi
	addq	$24, %rbx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_chat_Setup
	testl	%eax, %eax
	je	LBB0_15
LBB0_17:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_15:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_13:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_log_Printf                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CLOSE_LCP,4,2                  ## @CLOSE_LCP
	.comm	_CLOSE_STAYDOWN,4,2             ## @CLOSE_STAYDOWN
	.comm	_DATALINK_READY,8,3             ## @DATALINK_READY
	.comm	_DATALINK_CLOSED,8,3            ## @DATALINK_CLOSED
	.comm	_DATALINK_HANGUP,8,3            ## @DATALINK_HANGUP
	.comm	_DATALINK_OPENING,8,3           ## @DATALINK_OPENING
	.comm	_DATALINK_LOGOUT,8,3            ## @DATALINK_LOGOUT
	.comm	_LogWARN,4,2                    ## @LogWARN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid hangup script\n"

L_.str.1:                               ## @.str.1
	.asciz	"Invalid logout script\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_datalink_ComeDown              ; -- Begin function datalink_ComeDown
	.p2align	2
_datalink_ComeDown:                     ; @datalink_ComeDown
	.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	x19, x0
Lloh0:
	adrp	x8, _CLOSE_LCP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CLOSE_LCP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_datalink_DontHangup
	b	LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _CLOSE_STAYDOWN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CLOSE_STAYDOWN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_datalink_StayDown
LBB0_4:
	ldr	w9, [x19]
	str	wzr, [x19]
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x20, _DATALINK_READY@GOTPAGE
Lloh7:
	ldr	x20, [x20, _DATALINK_READY@GOTPAGEOFF]
	ldr	x10, [x20]
	cmp	x8, x10
	ccmp	w9, #0, #4, ge
	b.ne	LBB0_7
; %bb.5:
Lloh8:
	adrp	x9, _DATALINK_CLOSED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DATALINK_CLOSED@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	adrp	x20, _DATALINK_HANGUP@GOTPAGE
Lloh12:
	ldr	x20, [x20, _DATALINK_HANGUP@GOTPAGEOFF]
	ldr	x10, [x20]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	w0, [x19, #40]
	bl	_physical_StopDeviceTimer
	ldr	x1, [x20]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_datalink_NewState
LBB0_8:
	ldr	w0, [x19, #40]
	bl	_physical_Offline
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_10
; %bb.9:
	ldr	x8, [x19, #8]
Lloh13:
	adrp	x9, _DATALINK_OPENING@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DATALINK_OPENING@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_datalink_HangupDone
LBB0_11:
Lloh16:
	adrp	x9, _DATALINK_LOGOUT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _DATALINK_LOGOUT@GOTPAGEOFF]
Lloh18:
	ldr	x1, [x9]
	cmp	x8, x1
	b.ne	LBB0_14
; %bb.12:
	ldr	x1, [x20]
	mov	x0, x19
	bl	_datalink_NewState
	add	x0, x19, #24
	ldr	w1, [x19, #20]
	mov	x2, #0
	bl	_chat_Setup
	cbnz	w0, LBB0_6
; %bb.13:
Lloh19:
	adrp	x8, _LogWARN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_16
LBB0_14:
	mov	x0, x19
	bl	_datalink_NewState
	add	x0, x19, #24
	ldr	w1, [x19, #16]
	mov	x2, #0
	bl	_chat_Setup
	cbnz	w0, LBB0_6
; %bb.15:
Lloh24:
	adrp	x8, _LogWARN@GOTPAGE
Lloh25:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_16:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_log_Printf
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_CLOSE_LCP,4,2                  ; @CLOSE_LCP
	.comm	_CLOSE_STAYDOWN,4,2             ; @CLOSE_STAYDOWN
	.comm	_DATALINK_READY,8,3             ; @DATALINK_READY
	.comm	_DATALINK_CLOSED,8,3            ; @DATALINK_CLOSED
	.comm	_DATALINK_HANGUP,8,3            ; @DATALINK_HANGUP
	.comm	_DATALINK_OPENING,8,3           ; @DATALINK_OPENING
	.comm	_DATALINK_LOGOUT,8,3            ; @DATALINK_LOGOUT
	.comm	_LogWARN,4,2                    ; @LogWARN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid hangup script\n"

l_.str.1:                               ; @.str.1
	.asciz	"Invalid logout script\n"

.subsections_via_symbols
