	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EcConnect                      ## -- Begin function EcConnect
	.p2align	4, 0x90
_EcConnect:                             ## @EcConnect
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SHA1_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	leaq	(,%r12,4), %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	movq	%r14, %rbx
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rax
	testq	%r13, %r13
	leaq	L_.str.1(%rip), %r14
	cmovneq	%r13, %r14
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%r15, %r15
	jne	LBB0_4
## %bb.3:
	movq	_EL_ADMIN_PORT@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
LBB0_4:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	leaq	L_.str(%rip), %rdi
	cmovneq	%rax, %rdi
	movq	%r15, %rsi
	callq	_Connect
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r15
	movq	%rax, %rdi
	movl	$5000, %esi                     ## imm = 0x1388
	callq	_SetTimeout
	movq	%r14, %rdi
	callq	_StrLen
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_Sha0
	shll	$2, %r12d
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_Zero
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	callq	_RecvAll
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_SecurePassword
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	callq	_SendAll
	movl	$0, -52(%rbp)
	leaq	-52(%rbp), %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	xorl	%ecx, %ecx
	callq	_RecvAll
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	-52(%rbp), %edi
	callq	_Endian32
	movl	%eax, -52(%rbp)
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movq	_INFINITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_SetTimeout
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_StartRpcClient
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	_ERR_NO_ERROR@GOTPCREL(%rip), %rbx
	jmp	LBB0_11
LBB0_1:
	movq	_ERR_INTERNAL_ERROR@GOTPCREL(%rip), %rbx
	jmp	LBB0_12
LBB0_5:
	movq	_ERR_CONNECT_FAILED@GOTPCREL(%rip), %rbx
	jmp	LBB0_12
LBB0_7:
	movq	_ERR_PROTOCOL_ERROR@GOTPCREL(%rip), %rbx
	jmp	LBB0_11
LBB0_9:
	movq	_ERR_AUTH_FAILED@GOTPCREL(%rip), %rbx
LBB0_11:
	movq	%r15, %rdi
	callq	_ReleaseSock
LBB0_12:
	movq	(%rbx), %rax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_14
## %bb.13:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SHA1_SIZE,4,2                  ## @SHA1_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"localhost"

	.comm	_EL_ADMIN_PORT,8,3              ## @EL_ADMIN_PORT
L_.str.1:                               ## @.str.1
	.space	1

	.comm	_ERR_INTERNAL_ERROR,8,3         ## @ERR_INTERNAL_ERROR
	.comm	_ERR_CONNECT_FAILED,8,3         ## @ERR_CONNECT_FAILED
	.comm	_ERR_PROTOCOL_ERROR,8,3         ## @ERR_PROTOCOL_ERROR
	.comm	_ERR_AUTH_FAILED,8,3            ## @ERR_AUTH_FAILED
	.comm	_INFINITE,4,2                   ## @INFINITE
	.comm	_ERR_NO_ERROR,8,3               ## @ERR_NO_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EcConnect                      ; -- Begin function EcConnect
	.p2align	2
_EcConnect:                             ; @EcConnect
	.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
	sub	sp, sp, #16
	mov	x19, x3
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _SHA1_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SHA1_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w25, [x8]
	lsl	x8, x25, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x7fffffff0
	sub	x21, x9, x12
	mov	sp, x21
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x22, x9, x12
	mov	sp, x22
	mov	x9, x8
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x23, x8, x12
	mov	sp, x23
Lloh12:
	adrp	x8, l_.str.1@PAGE
Lloh13:
	add	x8, x8, l_.str.1@PAGEOFF
	cmp	x2, #0
	csel	x24, x8, x2, eq
	cbz	x3, LBB0_5
; %bb.1:
Lloh14:
	adrp	x8, _EL_ADMIN_PORT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EL_ADMIN_PORT@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x1, #0
	csel	x1, x8, x1, eq
Lloh17:
	adrp	x8, l_.str@PAGE
Lloh18:
	add	x8, x8, l_.str@PAGEOFF
	cmp	x0, #0
	csel	x0, x8, x0, eq
	bl	_Connect
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
	mov	w1, #5000
	bl	_SetTimeout
	mov	x0, x24
	bl	_StrLen
	mov	x2, x0
	mov	x0, x21
	mov	x1, x24
	bl	_Sha0
	lsl	w24, w25, #2
	mov	x0, x22
	mov	x1, x24
	bl	_Zero
	mov	x0, x20
	mov	x1, x22
	mov	x2, x24
	mov	w3, #0
	bl	_RecvAll
	mov	x0, x23
	mov	x1, x21
	mov	x2, x22
	bl	_SecurePassword
	mov	x0, x20
	mov	x1, x23
	mov	x2, x24
	mov	w3, #0
	bl	_SendAll
	stur	wzr, [x29, #-76]
	sub	x1, x29, #76
	mov	x0, x20
	mov	w2, #4
	mov	w3, #0
	bl	_RecvAll
	cbz	w0, LBB0_7
; %bb.3:
	ldur	w0, [x29, #-76]
	bl	_Endian32
	stur	w0, [x29, #-76]
	cbz	w0, LBB0_8
; %bb.4:
Lloh19:
	adrp	x8, _INFINITE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _INFINITE@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_SetTimeout
	mov	x0, x20
	mov	x1, #0
	bl	_StartRpcClient
	str	x0, [x19]
Lloh22:
	adrp	x19, _ERR_NO_ERROR@GOTPAGE
Lloh23:
	ldr	x19, [x19, _ERR_NO_ERROR@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
Lloh24:
	adrp	x19, _ERR_INTERNAL_ERROR@GOTPAGE
Lloh25:
	ldr	x19, [x19, _ERR_INTERNAL_ERROR@GOTPAGEOFF]
	b	LBB0_10
LBB0_6:
Lloh26:
	adrp	x19, _ERR_CONNECT_FAILED@GOTPAGE
Lloh27:
	ldr	x19, [x19, _ERR_CONNECT_FAILED@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
Lloh28:
	adrp	x19, _ERR_PROTOCOL_ERROR@GOTPAGE
Lloh29:
	ldr	x19, [x19, _ERR_PROTOCOL_ERROR@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh30:
	adrp	x19, _ERR_AUTH_FAILED@GOTPAGE
Lloh31:
	ldr	x19, [x19, _ERR_AUTH_FAILED@GOTPAGEOFF]
LBB0_9:
	mov	x0, x20
	bl	_ReleaseSock
LBB0_10:
	ldr	x0, [x19]
	ldur	x8, [x29, #-72]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	sub	sp, x29, #64
	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
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_SHA1_SIZE,4,2                  ; @SHA1_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"localhost"

	.comm	_EL_ADMIN_PORT,8,3              ; @EL_ADMIN_PORT
l_.str.1:                               ; @.str.1
	.space	1

	.comm	_ERR_INTERNAL_ERROR,8,3         ; @ERR_INTERNAL_ERROR
	.comm	_ERR_CONNECT_FAILED,8,3         ; @ERR_CONNECT_FAILED
	.comm	_ERR_PROTOCOL_ERROR,8,3         ; @ERR_PROTOCOL_ERROR
	.comm	_ERR_AUTH_FAILED,8,3            ; @ERR_AUTH_FAILED
	.comm	_INFINITE,4,2                   ; @INFINITE
	.comm	_ERR_NO_ERROR,8,3               ; @ERR_NO_ERROR
.subsections_via_symbols
