	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smb_iod_treeconnect
_smb_iod_treeconnect:                   ## @smb_iod_treeconnect
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_SMBIOD_ST_VCACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_SMBIODEBUG
	movq	%rbx, %rdi
	callq	_SMBS_ST_LOCK
	movq	_SMBS_RECONNECTING@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	orl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_SMBS_ST_UNLOCK
	addq	$8, %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_smb_smb_treeconnect
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_SMBS_ST_LOCK
	movl	(%r15), %eax
	notl	%eax
	andl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_SMBS_ST_UNLOCK
	movq	%rbx, %rdi
	callq	_wakeup
	movl	%r14d, %eax
	jmp	LBB0_5
LBB0_1:
	movq	_SMBIOD_ST_DEAD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movq	_SMBIOD_ST_RECONNECT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	%r14, %rdi
	callq	_smb_iod_connect
	testl	%eax, %eax
	jne	LBB0_5
	jmp	LBB0_4
LBB0_2:
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMBIOD_ST_VCACTIVE,8,3         ## @SMBIOD_ST_VCACTIVE
	.comm	_SMBIOD_ST_DEAD,8,3             ## @SMBIOD_ST_DEAD
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
	.comm	_SMBIOD_ST_RECONNECT,8,3        ## @SMBIOD_ST_RECONNECT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tree reconnect\n"

	.comm	_SMBS_RECONNECTING,4,2          ## @SMBS_RECONNECTING
	.no_dead_strip	_smb_iod_treeconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smb_iod_treeconnect
_smb_iod_treeconnect:                   ; @smb_iod_treeconnect
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _SMBIOD_ST_VCACTIVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SMBIOD_ST_VCACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
LBB0_1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_SMBIODEBUG
	mov	x0, x19
	bl	_SMBS_ST_LOCK
Lloh5:
	adrp	x21, _SMBS_RECONNECTING@GOTPAGE
Lloh6:
	ldr	x21, [x21, _SMBS_RECONNECTING@GOTPAGEOFF]
	ldr	w8, [x21]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_SMBS_ST_UNLOCK
	add	x1, x20, #8
	mov	x0, x19
	bl	_smb_smb_treeconnect
	mov	x20, x0
	mov	x0, x19
	bl	_SMBS_ST_LOCK
	ldr	w8, [x21]
	ldr	w9, [x19, #4]
	bic	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_SMBS_ST_UNLOCK
	mov	x0, x19
	bl	_wakeup
	mov	x0, x20
	b	LBB0_5
LBB0_2:
Lloh7:
	adrp	x9, _SMBIOD_ST_DEAD@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SMBIOD_ST_DEAD@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh10:
	adrp	x8, _SMBIOD_ST_RECONNECT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SMBIOD_ST_RECONNECT@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	str	x8, [x20]
	mov	x0, x20
	bl	_smb_iod_connect
	cbnz	w0, LBB0_5
	b	LBB0_1
LBB0_4:
Lloh13:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_SMBIOD_ST_VCACTIVE,8,3         ; @SMBIOD_ST_VCACTIVE
	.comm	_SMBIOD_ST_DEAD,8,3             ; @SMBIOD_ST_DEAD
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
	.comm	_SMBIOD_ST_RECONNECT,8,3        ; @SMBIOD_ST_RECONNECT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tree reconnect\n"

	.comm	_SMBS_RECONNECTING,4,2          ; @SMBS_RECONNECTING
	.no_dead_strip	_smb_iod_treeconnect
.subsections_via_symbols
