	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function input_kex_ecdh_init
_input_kex_ecdh_init:                   ## @input_kex_ecdh_init
	.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	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsp, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdx), %r13
	movq	$0, -112(%rbp)
	movq	$0, -128(%rbp)
	movq	_SSH_DIGEST_MAX_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	shlq	$2, %r14
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -88(%rbp)                 ## 8-byte Spill
	movl	88(%r13), %edi
	callq	_EC_KEY_new_by_curve_name
	testq	%rax, %rax
	movq	%r12, -208(%rbp)                ## 8-byte Spill
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	je	LBB0_9
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_EC_KEY_generate_key
	cmpl	$1, %eax
	jne	LBB0_10
## %bb.2:
	movq	%rbx, %rdi
	callq	_EC_KEY_get0_group
	movq	80(%r13), %rcx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.3:
	cmpq	$0, 72(%r13)
	je	LBB0_11
## %bb.4:
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	60(%r13), %esi
	movl	64(%r13), %edi
	movq	%r15, %rdx
	callq	*%rcx
	movq	%r13, %rcx
	movq	%rax, %r13
	movl	60(%rcx), %esi
	movl	64(%rcx), %edi
	movq	%r15, %rdx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	callq	*72(%rcx)
	movq	%r13, -160(%rbp)                ## 8-byte Spill
	testq	%r13, %r13
	je	LBB0_18
## %bb.5:
	movq	%rax, -200(%rbp)                ## 8-byte Spill
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_EC_POINT_new
	testq	%rax, %rax
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_9
## %bb.6:
	movq	%r15, %rdi
	movq	%rax, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	callq	_sshpkt_get_ec
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_sshpkt_get_end
	testl	%eax, %eax
	je	LBB0_20
LBB0_8:
	movl	%eax, %r15d
	jmp	LBB0_13
LBB0_9:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_SSH_ERR_LIBCRYPTO_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_SSH_ERR_INVALID_ARGUMENT@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %r15d
LBB0_13:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
LBB0_14:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_explicit_bzero
	movq	16(%r13), %rdi
	callq	_EC_KEY_free
	movq	$0, 16(%r13)
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_EC_KEY_free
	testq	%r12, %r12
	je	LBB0_16
## %bb.15:
	movq	%r12, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_explicit_bzero
	movq	%r12, %rdi
	callq	_free
LBB0_16:
	movq	%rbx, %rdi
	callq	_BN_clear_free
	movq	-112(%rbp), %rdi
	callq	_free
	movq	-128(%rbp), %rdi
	callq	_free
	movq	-208(%rbp), %rsp                ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_45
## %bb.17:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	_SSH_ERR_NO_HOSTKEY_LOADED@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
LBB0_19:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_14
LBB0_20:
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	callq	_sshkey_ec_validate_public
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_sshpkt_disconnect
	movq	_SSH_ERR_MESSAGE_INCOMPLETE@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_22:
	movq	%rbx, %rdi
	callq	_EC_GROUP_get_degree
                                        ## kill: def $eax killed $eax def $rax
	leal	7(%rax), %ecx
	addl	$14, %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$3, %eax
	movslq	%eax, %rbx
	movq	%rbx, %rdi
	callq	_malloc
	movq	%rax, %r12
	testq	%rax, %rax
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_28
## %bb.23:
	xorl	%eax, %eax
	callq	_BN_new
	testq	%rax, %rax
	je	LBB0_28
## %bb.24:
	movq	%rax, %r15
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	-120(%rbp), %rdx                ## 8-byte Reload
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	xorl	%r8d, %r8d
	callq	_ECDH_compute_key
	cmpl	%ebx, %eax
	jne	LBB0_29
## %bb.25:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_BN_bin2bn
	testq	%rax, %rax
	je	LBB0_29
## %bb.26:
	movq	%r15, %rbx
	leaq	-112(%rbp), %rsi
	leaq	-168(%rbp), %rdx
	movq	-160(%rbp), %rdi                ## 8-byte Reload
	callq	_sshkey_to_blob
	testl	%eax, %eax
	jne	LBB0_27
## %bb.30:
	movq	%r14, -104(%rbp)
	movl	56(%r13), %eax
	movl	%eax, -144(%rbp)                ## 4-byte Spill
	movl	52(%r13), %eax
	movl	%eax, -148(%rbp)                ## 4-byte Spill
	movl	44(%r13), %edi
	movl	48(%r13), %eax
	movl	%eax, -140(%rbp)                ## 4-byte Spill
	callq	_sshbuf_ptr
	movl	%eax, -136(%rbp)                ## 4-byte Spill
	movl	44(%r13), %edi
	callq	_sshbuf_len
	movl	%eax, -132(%rbp)                ## 4-byte Spill
	movl	40(%r13), %edi
	callq	_sshbuf_ptr
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -192(%rbp)                ## 8-byte Spill
	movl	40(%r13), %edi
	callq	_sshbuf_len
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -184(%rbp)                ## 8-byte Spill
	movq	-112(%rbp), %rax
	movq	%rax, -176(%rbp)                ## 8-byte Spill
	movq	-168(%rbp), %r15
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_EC_KEY_get0_public_key
	subq	$8, %rsp
	leaq	-104(%rbp), %r10
	movl	-144(%rbp), %edi                ## 4-byte Reload
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movl	-148(%rbp), %edx                ## 4-byte Reload
	movl	-140(%rbp), %ecx                ## 4-byte Reload
	movl	-136(%rbp), %r8d                ## 4-byte Reload
	movl	-132(%rbp), %r9d                ## 4-byte Reload
	pushq	%r10
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	pushq	%rbx
	pushq	%rax
	pushq	-120(%rbp)                      ## 8-byte Folded Reload
	pushq	%r15
	pushq	-176(%rbp)                      ## 8-byte Folded Reload
	pushq	-184(%rbp)                      ## 8-byte Folded Reload
	pushq	-192(%rbp)                      ## 8-byte Folded Reload
	callq	_kex_ecdh_hash
	addq	$80, %rsp
	testl	%eax, %eax
	je	LBB0_32
LBB0_27:
	movl	%eax, %r15d
	jmp	LBB0_14
LBB0_28:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_29:
	movq	%r15, %rbx
	movq	_SSH_ERR_LIBCRYPTO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_14
LBB0_32:
	cmpq	$0, 32(%r13)
	jne	LBB0_35
## %bb.33:
	movq	-104(%rbp), %r15
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r15, (%r13)
	movq	%r15, %rdi
	callq	_malloc
	movq	%rax, 32(%r13)
	testq	%rax, %rax
	je	LBB0_44
## %bb.34:
	movq	%rax, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_memcpy
LBB0_35:
	movq	-104(%rbp), %r9
	movq	-56(%rbp), %r11                 ## 8-byte Reload
	movl	24(%r11), %r10d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	leaq	-128(%rbp), %rdx
	leaq	-216(%rbp), %rcx
	movq	-200(%rbp), %rdi                ## 8-byte Reload
	movq	-160(%rbp), %rsi                ## 8-byte Reload
	movq	-88(%rbp), %r8                  ## 8-byte Reload
	pushq	%rax
	pushq	%r10
	callq	*8(%r11)
	addq	$16, %rsp
	testl	%eax, %eax
	js	LBB0_43
## %bb.36:
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_EC_KEY_get0_public_key
	movq	%rax, %r13
	movq	_SSH2_MSG_KEX_ECDH_REPLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_sshpkt_start
	testl	%eax, %eax
	jne	LBB0_43
## %bb.37:
	movq	-112(%rbp), %rsi
	movq	-168(%rbp), %rdx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_sshpkt_put_string
	testl	%eax, %eax
	jne	LBB0_43
## %bb.38:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	callq	_sshpkt_put_ec
	testl	%eax, %eax
	jne	LBB0_43
## %bb.39:
	movq	-128(%rbp), %rsi
	movq	-216(%rbp), %rdx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_sshpkt_put_string
	testl	%eax, %eax
	jne	LBB0_43
## %bb.40:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_sshpkt_send
	testl	%eax, %eax
	jne	LBB0_43
## %bb.41:
	movq	-104(%rbp), %rdx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_kex_derive_keys_bn
	testl	%eax, %eax
	jne	LBB0_43
## %bb.42:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_kex_send_newkeys
LBB0_43:
	movl	%eax, %r15d
	jmp	LBB0_19
LBB0_44:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_19
LBB0_45:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_DIGEST_MAX_LENGTH,4,2      ## @SSH_DIGEST_MAX_LENGTH
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
	.comm	_SSH_ERR_LIBCRYPTO_ERROR,4,2    ## @SSH_ERR_LIBCRYPTO_ERROR
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ## @SSH_ERR_INVALID_ARGUMENT
	.comm	_SSH_ERR_NO_HOSTKEY_LOADED,4,2  ## @SSH_ERR_NO_HOSTKEY_LOADED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid client public key"

	.comm	_SSH_ERR_MESSAGE_INCOMPLETE,4,2 ## @SSH_ERR_MESSAGE_INCOMPLETE
	.comm	_SSH2_MSG_KEX_ECDH_REPLY,4,2    ## @SSH2_MSG_KEX_ECDH_REPLY
	.comm	_stderr,4,2                     ## @stderr
	.no_dead_strip	_input_kex_ecdh_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function input_kex_ecdh_init
_input_kex_ecdh_init:                   ; @input_kex_ecdh_init
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #128
	mov	x25, x2
	mov	x28, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x26, [x2, #8]
	stp	xzr, xzr, [x29, #-104]
Lloh3:
	adrp	x8, _SSH_DIGEST_MAX_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SSH_DIGEST_MAX_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x19, x8, #2
	mov	x9, x19
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x19, #15
	and	x9, x9, #0x7fffffff0
	sub	x21, x8, x9
	mov	sp, x21
	ldr	w0, [x26, #88]
	bl	_EC_KEY_new_by_curve_name
	mov	x20, x0
	cbz	x0, LBB0_9
; %bb.1:
	mov	x0, x20
	bl	_EC_KEY_generate_key
	cmp	w0, #1
	b.ne	LBB0_11
; %bb.2:
	mov	x0, x20
	bl	_EC_KEY_get0_group
	ldr	x8, [x26, #80]
	cbz	x8, LBB0_13
; %bb.3:
	ldr	x9, [x26, #72]
	cbz	x9, LBB0_13
; %bb.4:
	mov	x22, x0
	ldp	w1, w0, [x26, #60]
	mov	x2, x25
	blr	x8
	mov	x23, x0
	ldr	x8, [x26, #72]
	ldp	w1, w0, [x26, #60]
	mov	x2, x25
	blr	x8
	cbz	x23, LBB0_19
; %bb.5:
	mov	x24, x0
	mov	x0, x22
	bl	_EC_POINT_new
	cbz	x0, LBB0_9
; %bb.6:
	mov	x27, x0
	mov	x0, x25
	mov	x1, x27
	mov	x2, x22
	bl	_sshpkt_get_ec
	cbnz	w0, LBB0_8
; %bb.7:
	stur	x27, [x29, #-136]               ; 8-byte Folded Spill
	mov	x0, x25
	bl	_sshpkt_get_end
	cbz	w0, LBB0_20
LBB0_8:
	mov	x27, x0
	mov	x22, #0
	mov	x24, #0
	mov	x23, #0
	b	LBB0_15
LBB0_9:
	mov	x22, #0
	mov	x24, #0
	mov	x23, #0
LBB0_10:
Lloh8:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
	b	LBB0_14
LBB0_11:
	mov	x22, #0
	mov	x24, #0
	mov	x23, #0
LBB0_12:
Lloh10:
	adrp	x8, _SSH_ERR_LIBCRYPTO_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SSH_ERR_LIBCRYPTO_ERROR@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
	mov	x22, #0
	mov	x24, #0
	mov	x23, #0
Lloh12:
	adrp	x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGEOFF]
LBB0_14:
	ldr	w27, [x8]
LBB0_15:
	mov	x0, x21
	mov	x1, x19
	bl	_explicit_bzero
	ldr	x0, [x26, #16]
	bl	_EC_KEY_free
	str	xzr, [x26, #16]
	mov	x0, x20
	bl	_EC_KEY_free
	cbz	x22, LBB0_17
; %bb.16:
	mov	x0, x22
	mov	x1, x23
	bl	_explicit_bzero
	mov	x0, x22
	bl	_free
LBB0_17:
	mov	x0, x24
	bl	_BN_clear_free
	ldur	x0, [x29, #-96]
	bl	_free
	ldur	x0, [x29, #-104]
	bl	_free
	mov	sp, x28
	ldur	x8, [x29, #-88]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_41
; %bb.18:
	mov	x0, x27
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_19:
	mov	x22, #0
	mov	x24, #0
Lloh17:
	adrp	x8, _SSH_ERR_NO_HOSTKEY_LOADED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SSH_ERR_NO_HOSTKEY_LOADED@GOTPAGEOFF]
	b	LBB0_14
LBB0_20:
	mov	x0, x22
	ldur	x27, [x29, #-136]               ; 8-byte Folded Reload
	mov	x1, x27
	bl	_sshkey_ec_validate_public
	cbz	x0, LBB0_22
; %bb.21:
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x25
	bl	_sshpkt_disconnect
	mov	x22, #0
	mov	x24, #0
	mov	x23, #0
Lloh21:
	adrp	x8, _SSH_ERR_MESSAGE_INCOMPLETE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SSH_ERR_MESSAGE_INCOMPLETE@GOTPAGEOFF]
	b	LBB0_14
LBB0_22:
	stp	x24, x22, [x29, #-160]          ; 16-byte Folded Spill
	stur	x23, [x29, #-144]               ; 8-byte Folded Spill
	mov	x0, x22
	bl	_EC_GROUP_get_degree
	add	w8, w0, #7
	add	w9, w0, #14
	cmp	w8, #0
	csel	w8, w9, w8, lt
	sbfx	x23, x8, #3, #29
	mov	x0, x23
	bl	_malloc
	mov	x22, x0
	cbz	x0, LBB0_29
; %bb.23:
	bl	_BN_new
	cbz	x0, LBB0_29
; %bb.24:
	mov	x24, x0
	mov	x0, x22
	mov	x1, x23
	mov	x2, x27
	mov	x3, x20
	mov	x4, #0
	bl	_ECDH_compute_key
	cmp	w0, w23
	b.ne	LBB0_12
; %bb.25:
	mov	x0, x22
	mov	x1, x23
	mov	x2, x24
	bl	_BN_bin2bn
	cbz	x0, LBB0_12
; %bb.26:
	sub	x1, x29, #96
	sub	x2, x29, #120
	ldur	x0, [x29, #-144]                ; 8-byte Folded Reload
	bl	_sshkey_to_blob
	cbnz	w0, LBB0_28
; %bb.27:
	stur	x19, [x29, #-128]
	ldr	w9, [x26, #56]
	ldr	w8, [x26, #52]
	stur	w8, [x29, #-164]                ; 4-byte Folded Spill
	ldp	w0, w8, [x26, #44]
	stp	w9, w8, [x29, #-172]            ; 8-byte Folded Spill
	bl	_sshbuf_ptr
	stur	w0, [x29, #-176]                ; 4-byte Folded Spill
	ldr	w0, [x26, #44]
	bl	_sshbuf_len
	stur	w0, [x29, #-180]                ; 4-byte Folded Spill
	ldr	w0, [x26, #40]
	bl	_sshbuf_ptr
	stur	w0, [x29, #-184]                ; 4-byte Folded Spill
	ldr	w0, [x26, #40]
	bl	_sshbuf_len
	stur	w0, [x29, #-188]                ; 4-byte Folded Spill
	ldur	x8, [x29, #-96]
	stur	x8, [x29, #-200]                ; 8-byte Folded Spill
	ldur	x27, [x29, #-120]
	mov	x0, x20
	bl	_EC_KEY_get0_public_key
	sub	sp, sp, #64
	sub	x8, x29, #128
	stp	x21, x8, [sp, #40]
	stp	x0, x24, [sp, #24]
	ldur	x8, [x29, #-136]                ; 8-byte Folded Reload
	stp	x27, x8, [sp, #8]
	ldur	x8, [x29, #-200]                ; 8-byte Folded Reload
	str	x8, [sp]
	ldp	w0, w3, [x29, #-172]            ; 8-byte Folded Reload
	ldur	x1, [x29, #-152]                ; 8-byte Folded Reload
	ldur	w2, [x29, #-164]                ; 4-byte Folded Reload
	ldp	w5, w4, [x29, #-180]            ; 8-byte Folded Reload
	ldp	w7, w6, [x29, #-188]            ; 8-byte Folded Reload
	bl	_kex_ecdh_hash
	add	sp, sp, #64
	cbz	w0, LBB0_30
LBB0_28:
	mov	x27, x0
	b	LBB0_15
LBB0_29:
	mov	x24, #0
	b	LBB0_10
LBB0_30:
	ldr	x8, [x26, #32]
	cbnz	x8, LBB0_33
; %bb.31:
	ldur	x27, [x29, #-128]
	str	x27, [x26]
	mov	x0, x27
	bl	_malloc
	str	x0, [x26, #32]
	cbz	x0, LBB0_10
; %bb.32:
	mov	x1, x21
	mov	x2, x27
	bl	_memcpy
LBB0_33:
	ldr	x8, [x26, #8]
	ldur	x5, [x29, #-128]
	ldr	w6, [x26, #24]
	ldr	w7, [x25]
	sub	x2, x29, #104
	sub	x3, x29, #112
	ldur	x0, [x29, #-160]                ; 8-byte Folded Reload
	ldur	x1, [x29, #-144]                ; 8-byte Folded Reload
	mov	x4, x21
	blr	x8
	tbnz	w0, #31, LBB0_28
; %bb.34:
	mov	x0, x20
	bl	_EC_KEY_get0_public_key
	stur	x0, [x29, #-136]                ; 8-byte Folded Spill
Lloh23:
	adrp	x8, _SSH2_MSG_KEX_ECDH_REPLY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SSH2_MSG_KEX_ECDH_REPLY@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x25
	bl	_sshpkt_start
	cbnz	w0, LBB0_28
; %bb.35:
	ldur	x1, [x29, #-96]
	ldur	x2, [x29, #-120]
	mov	x0, x25
	bl	_sshpkt_put_string
	cbnz	w0, LBB0_28
; %bb.36:
	mov	x0, x25
	ldur	x1, [x29, #-136]                ; 8-byte Folded Reload
	ldur	x2, [x29, #-152]                ; 8-byte Folded Reload
	bl	_sshpkt_put_ec
	cbnz	w0, LBB0_28
; %bb.37:
	ldp	x2, x1, [x29, #-112]
	mov	x0, x25
	bl	_sshpkt_put_string
	cbnz	w0, LBB0_28
; %bb.38:
	mov	x0, x25
	bl	_sshpkt_send
	cbnz	w0, LBB0_28
; %bb.39:
	ldur	x2, [x29, #-128]
	mov	x0, x25
	mov	x1, x21
	mov	x3, x24
	bl	_kex_derive_keys_bn
	cbnz	w0, LBB0_28
; %bb.40:
	mov	x0, x25
	bl	_kex_send_newkeys
	b	LBB0_28
LBB0_41:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_DIGEST_MAX_LENGTH,4,2      ; @SSH_DIGEST_MAX_LENGTH
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
	.comm	_SSH_ERR_LIBCRYPTO_ERROR,4,2    ; @SSH_ERR_LIBCRYPTO_ERROR
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ; @SSH_ERR_INVALID_ARGUMENT
	.comm	_SSH_ERR_NO_HOSTKEY_LOADED,4,2  ; @SSH_ERR_NO_HOSTKEY_LOADED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid client public key"

	.comm	_SSH_ERR_MESSAGE_INCOMPLETE,4,2 ; @SSH_ERR_MESSAGE_INCOMPLETE
	.comm	_SSH2_MSG_KEX_ECDH_REPLY,4,2    ; @SSH2_MSG_KEX_ECDH_REPLY
	.comm	_stderr,4,2                     ; @stderr
	.no_dead_strip	_input_kex_ecdh_init
.subsections_via_symbols
