	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smb_iod_connect
_smb_iod_connect:                       ## @smb_iod_connect
	.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	%rdi, %rbx
	movq	24(%rdi), %r14
	movq	16(%rdi), %r15
	movl	(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_SMBIODEBUG
	movl	(%rbx), %eax
	cmpl	$129, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_4
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	callq	_SMBERROR
	movq	_EISCONN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_12
LBB0_3:
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_12
LBB0_4:
	incl	16(%r14)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_SMB_TRAN_CREATE
	movq	%rax, %r12
	testl	%r12d, %r12d
	je	LBB0_5
LBB0_11:
	movq	%rbx, %rdi
	callq	_smb_iod_dead
	movl	%r12d, %r15d
LBB0_12:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_SMBIODEBUG
	movq	8(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_SMB_TRAN_BIND
	movq	%rax, %r12
	testl	%r12d, %r12d
	jne	LBB0_11
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_SMBIODEBUG
	movl	(%r14), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_SMB_TRAN_CONNECT
	movq	%rax, %r12
	testl	%r12d, %r12d
	jne	LBB0_11
## %bb.8:
	movq	_SMBTP_SELECTID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	8(%rbx), %rdx
	movq	%r14, %rdi
	callq	_SMB_TRAN_SETPARAM
	movq	_SMBIOD_ST_TRANACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_SMBIODEBUG
	leaq	4(%rbx), %r13
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_smb_smb_negotiate
	movq	%rax, %r12
	testl	%r12d, %r12d
	jne	LBB0_11
## %bb.9:
	leaq	L_.str.5(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_SMBIODEBUG
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_smb_smb_ssnsetup
	movq	%rax, %r12
	testl	%r12d, %r12d
	jne	LBB0_11
## %bb.10:
	movl	$128, (%rbx)
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_SMBIODEBUG
	movq	%rbx, %rdi
	callq	_smb_iod_invrq
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"called for already opened connection\n"

	.comm	_EISCONN,4,2                    ## @EISCONN
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
L_.str.2:                               ## @.str.2
	.asciz	"tcreate\n"

L_.str.3:                               ## @.str.3
	.asciz	"tbind\n"

	.comm	_SMBTP_SELECTID,4,2             ## @SMBTP_SELECTID
	.comm	_SMBIOD_ST_TRANACTIVE,4,2       ## @SMBIOD_ST_TRANACTIVE
L_.str.4:                               ## @.str.4
	.asciz	"tconnect\n"

L_.str.5:                               ## @.str.5
	.asciz	"snegotiate\n"

L_.str.6:                               ## @.str.6
	.asciz	"completed\n"

	.no_dead_strip	_smb_iod_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smb_iod_connect
_smb_iod_connect:                       ; @smb_iod_connect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldp	x21, x20, [x0, #16]
	ldr	w8, [x0]
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_SMBIODEBUG
	ldr	w8, [x19]
	cmp	w8, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.2:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_SMBERROR
Lloh4:
	adrp	x8, _EISCONN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EISCONN@GOTPAGEOFF]
Lloh6:
	ldr	w22, [x8]
	b	LBB0_6
LBB0_3:
Lloh7:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
Lloh9:
	ldr	w22, [x8]
	b	LBB0_6
LBB0_4:
	ldr	w8, [x20, #16]
	add	w8, w8, #1
	str	w8, [x20, #16]
	mov	x0, x20
	mov	x1, x21
	bl	_SMB_TRAN_CREATE
	mov	x22, x0
	cbz	w0, LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_smb_iod_dead
LBB0_6:
	mov	x0, x22
	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
	add	sp, sp, #64
	ret
LBB0_7:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_SMBIODEBUG
	ldr	x1, [x20, #8]
	cbz	x1, LBB0_9
; %bb.8:
	mov	x0, x20
	mov	x2, x21
	bl	_SMB_TRAN_BIND
	mov	x22, x0
	cbnz	w0, LBB0_5
LBB0_9:
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_SMBIODEBUG
	ldr	w1, [x20]
	mov	x0, x20
	mov	x2, x21
	bl	_SMB_TRAN_CONNECT
	mov	x22, x0
	cbnz	w22, LBB0_5
; %bb.10:
Lloh14:
	adrp	x8, _SMBTP_SELECTID@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SMBTP_SELECTID@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	add	x2, x19, #8
	mov	x0, x20
	bl	_SMB_TRAN_SETPARAM
Lloh17:
	adrp	x8, _SMBIOD_ST_TRANACTIVE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SMBIOD_ST_TRANACTIVE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	mov	x21, x19
	str	w8, [x21], #4
Lloh20:
	adrp	x0, l_.str.4@PAGE
Lloh21:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_SMBIODEBUG
	mov	x0, x20
	mov	x1, x21
	bl	_smb_smb_negotiate
	mov	x22, x0
	cbnz	w0, LBB0_5
; %bb.11:
Lloh22:
	adrp	x0, l_.str.5@PAGE
Lloh23:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_SMBIODEBUG
	mov	x0, x20
	mov	x1, x21
	bl	_smb_smb_ssnsetup
	mov	x22, x0
	cbnz	w0, LBB0_5
; %bb.12:
	mov	w8, #128
	str	w8, [x19]
Lloh24:
	adrp	x0, l_.str.6@PAGE
Lloh25:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_SMBIODEBUG
	mov	x0, x19
	bl	_smb_iod_invrq
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"called for already opened connection\n"

	.comm	_EISCONN,4,2                    ; @EISCONN
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
l_.str.2:                               ; @.str.2
	.asciz	"tcreate\n"

l_.str.3:                               ; @.str.3
	.asciz	"tbind\n"

	.comm	_SMBTP_SELECTID,4,2             ; @SMBTP_SELECTID
	.comm	_SMBIOD_ST_TRANACTIVE,4,2       ; @SMBIOD_ST_TRANACTIVE
l_.str.4:                               ; @.str.4
	.asciz	"tconnect\n"

l_.str.5:                               ; @.str.5
	.asciz	"snegotiate\n"

l_.str.6:                               ; @.str.6
	.asciz	"completed\n"

	.no_dead_strip	_smb_iod_connect
.subsections_via_symbols
