	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bundle_Close                   ## -- Begin function bundle_Close
	.p2align	4, 0x90
_bundle_Close:                          ## @bundle_Close
	.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
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_19
## %bb.1:
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx), %rax
	movq	_DATALINK_CLOSED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%cl
	movq	_DATALINK_HANGUP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	setne	%al
	andb	%cl, %al
	movzbl	%al, %eax
	addl	%eax, %r14d
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_12
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	testq	%r12, %r12
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	16(%rbx), %esi
	movq	%r12, %rdi
	callq	_strcasecmp
	testl	%eax, %eax
	cmoveq	%rbx, %r15
	movq	%rbx, %r13
	cmpq	%rbx, %r15
	jne	LBB0_2
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %r13
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	$128, %eax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$129, %eax
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_datalink_DontHangup
	movq	%r13, %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_datalink_StayDown
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %r15
	jmp	LBB0_3
LBB0_12:
	testq	%r12, %r12
	je	LBB0_14
## %bb.13:
	testq	%r15, %r15
	je	LBB0_20
LBB0_14:
	testl	%r14d, %r14d
	je	LBB0_21
## %bb.15:
	testq	%r15, %r15
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_27
## %bb.16:
	movq	(%r15), %rax
	movq	_DATALINK_CLOSED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_27
## %bb.17:
	movq	_DATALINK_HANGUP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_27
## %bb.18:
	movq	%r15, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_datalink_Close                 ## TAILCALL
LBB0_19:
	testq	%r12, %r12
	je	LBB0_21
LBB0_20:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_log_Printf                     ## TAILCALL
LBB0_21:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	cmpq	$0, 16(%rbx)
	je	LBB0_23
## %bb.22:
	movq	%rbx, %rdi
	callq	_bundle_StopSessionTimer
LBB0_23:
	movq	%rbx, %rdi
	callq	_bundle_StopIdleTimer
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_ncp_LayersUnfinished
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ncp_Close                      ## TAILCALL
LBB0_25:
	movq	%r14, %rdi
	callq	_ncp2initial
	movq	%r14, %rdi
	callq	_mp_Down
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_27
	.p2align	4, 0x90
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_datalink_Close
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_26
LBB0_27:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DATALINK_CLOSED,8,3            ## @DATALINK_CLOSED
	.comm	_DATALINK_HANGUP,8,3            ## @DATALINK_HANGUP
	.comm	_LogWARN,4,2                    ## @LogWARN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Invalid datalink name\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bundle_Close                   ; -- Begin function bundle_Close
	.p2align	2
_bundle_Close:                          ; @bundle_Close
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x23, [x0]
	cbz	x23, LBB0_16
; %bb.1:
	mov	w26, #0
	mov	x22, #0
Lloh0:
	adrp	x24, _DATALINK_CLOSED@GOTPAGE
Lloh1:
	ldr	x24, [x24, _DATALINK_CLOSED@GOTPAGEOFF]
Lloh2:
	adrp	x25, _DATALINK_HANGUP@GOTPAGE
Lloh3:
	ldr	x25, [x25, _DATALINK_HANGUP@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x23]
	ldr	x10, [x24]
	cmp	x9, x10
	ldr	x10, [x25]
	ccmp	x9, x10, #4, ne
	cinc	w26, w26, ne
	mov	x22, x8
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x23, [x23, #8]
	cbz	x23, LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x21, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x23, #16]
	mov	x0, x21
	bl	_strcasecmp
	cmp	w0, #0
	csel	x8, x23, x22, eq
	mov	x22, x23
	cmp	x8, x23
	b.ne	LBB0_2
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	w19, #128
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w19, #129
	b.ne	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x23
	bl	_datalink_DontHangup
	b	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x23
	bl	_datalink_StayDown
	b	LBB0_3
LBB0_10:
	cbz	x21, LBB0_12
; %bb.11:
	cbz	x22, LBB0_17
LBB0_12:
	cbz	w26, LBB0_18
; %bb.13:
	cbz	x22, LBB0_24
; %bb.14:
	ldr	x8, [x22]
	ldr	x9, [x24]
	ldr	x10, [x25]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_24
; %bb.15:
	mov	x0, x22
	mov	x1, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_datalink_Close
LBB0_16:
	cbz	x21, LBB0_18
LBB0_17:
Lloh4:
	adrp	x8, _LogWARN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_log_Printf
LBB0_18:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_20
; %bb.19:
	mov	x0, x20
	bl	_bundle_StopSessionTimer
LBB0_20:
	mov	x0, x20
	bl	_bundle_StopIdleTimer
	add	x21, x20, #8
	mov	x0, x21
	bl	_ncp_LayersUnfinished
	cbz	x0, LBB0_22
; %bb.21:
	mov	x0, x21
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ncp_Close
LBB0_22:
	mov	x0, x21
	bl	_ncp2initial
	mov	x0, x21
	bl	_mp_Down
	ldr	x20, [x20]
	cbz	x20, LBB0_24
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_datalink_Close
	ldr	x20, [x20, #8]
	cbnz	x20, LBB0_23
LBB0_24:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_DATALINK_CLOSED,8,3            ; @DATALINK_CLOSED
	.comm	_DATALINK_HANGUP,8,3            ; @DATALINK_HANGUP
	.comm	_LogWARN,4,2                    ; @LogWARN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Invalid datalink name\n"

.subsections_via_symbols
