	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kexecdh_client                 ## -- Begin function kexecdh_client
	.p2align	4, 0x90
_kexecdh_client:                        ## @kexecdh_client
	.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, %r14
	movq	(%rdi), %r15
	movl	16(%r15), %edi
	callq	_EC_KEY_new_by_curve_name
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_EC_KEY_generate_key
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.2:
	movq	%r12, %rdi
	callq	_EC_KEY_get0_group
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_EC_KEY_get0_public_key
	movq	%rax, %r13
	movq	_SSH2_MSG_KEX_ECDH_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_sshpkt_start
	testl	%eax, %eax
	jne	LBB0_3
## %bb.7:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_sshpkt_put_ec
	testl	%eax, %eax
	jne	LBB0_3
## %bb.9:
	movq	%r14, %rdi
	callq	_sshpkt_send
	testl	%eax, %eax
	je	LBB0_11
LBB0_3:
	movl	%eax, %ebx
	jmp	LBB0_6
LBB0_4:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_6
LBB0_5:
	movq	_SSH_ERR_LIBCRYPTO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_6:
	movq	%r12, %rdi
	callq	_EC_KEY_free
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	leaq	L_.str(%rip), %rdi
	callq	_debug
	movq	%r12, 8(%r15)
	movq	%r13, (%r15)
	leaq	L_.str.1(%rip), %rdi
	callq	_debug
	movq	_SSH2_MSG_KEX_ECDH_REPLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_input_kex_ecdh_reply@GOTPCREL(%rip), %rdx
	movq	%r14, %rdi
	callq	_ssh_dispatch_set
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
	.comm	_SSH_ERR_LIBCRYPTO_ERROR,4,2    ## @SSH_ERR_LIBCRYPTO_ERROR
	.comm	_SSH2_MSG_KEX_ECDH_INIT,4,2     ## @SSH2_MSG_KEX_ECDH_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sending SSH2_MSG_KEX_ECDH_INIT"

L_.str.1:                               ## @.str.1
	.asciz	"expecting SSH2_MSG_KEX_ECDH_REPLY"

	.comm	_SSH2_MSG_KEX_ECDH_REPLY,4,2    ## @SSH2_MSG_KEX_ECDH_REPLY
	.comm	_input_kex_ecdh_reply,4,2       ## @input_kex_ecdh_reply
	.comm	_stderr,4,2                     ## @stderr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kexecdh_client                 ; -- Begin function kexecdh_client
	.p2align	2
_kexecdh_client:                        ; @kexecdh_client
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	ldr	x24, [x0]
	ldr	w0, [x24, #16]
	bl	_EC_KEY_new_by_curve_name
	mov	x19, x0
	cbz	x0, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_EC_KEY_generate_key
	cmp	w0, #1
	b.ne	LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_EC_KEY_get0_group
	mov	x21, x0
	mov	x0, x19
	bl	_EC_KEY_get0_public_key
	mov	x23, x0
Lloh0:
	adrp	x8, _SSH2_MSG_KEX_ECDH_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSH2_MSG_KEX_ECDH_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_sshpkt_start
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, x20
	mov	x1, x23
	mov	x2, x21
	bl	_sshpkt_put_ec
	cbz	w0, LBB0_9
LBB0_4:
	mov	x22, x0
	b	LBB0_8
LBB0_5:
Lloh3:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh5:
	adrp	x8, _SSH_ERR_LIBCRYPTO_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SSH_ERR_LIBCRYPTO_ERROR@GOTPAGEOFF]
LBB0_7:
	ldr	w22, [x8]
LBB0_8:
	mov	x0, x19
	bl	_EC_KEY_free
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x0, x20
	bl	_sshpkt_send
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.10:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_debug
	stp	x21, x19, [x24]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_debug
Lloh11:
	adrp	x8, _SSH2_MSG_KEX_ECDH_REPLY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SSH2_MSG_KEX_ECDH_REPLY@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, _input_kex_ecdh_reply@GOTPAGE
Lloh15:
	ldr	x2, [x2, _input_kex_ecdh_reply@GOTPAGEOFF]
	mov	x0, x20
	bl	_ssh_dispatch_set
	mov	x19, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
	.comm	_SSH_ERR_LIBCRYPTO_ERROR,4,2    ; @SSH_ERR_LIBCRYPTO_ERROR
	.comm	_SSH2_MSG_KEX_ECDH_INIT,4,2     ; @SSH2_MSG_KEX_ECDH_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sending SSH2_MSG_KEX_ECDH_INIT"

l_.str.1:                               ; @.str.1
	.asciz	"expecting SSH2_MSG_KEX_ECDH_REPLY"

	.comm	_SSH2_MSG_KEX_ECDH_REPLY,4,2    ; @SSH2_MSG_KEX_ECDH_REPLY
	.comm	_input_kex_ecdh_reply,4,2       ; @input_kex_ecdh_reply
	.comm	_stderr,4,2                     ; @stderr
.subsections_via_symbols
