	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function input_kex_dh_gex_group
_input_kex_dh_gex_group:                ## @input_kex_dh_gex_group
	.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	%rdx, %r14
	movq	(%rdx), %r13
	leaq	L_.str(%rip), %rdi
	callq	_debug
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	xorl	%eax, %eax
	callq	_BN_new
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_sshpkt_get_bignum2
	testl	%eax, %eax
	jne	LBB0_3
## %bb.6:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_sshpkt_get_bignum2
	testl	%eax, %eax
	jne	LBB0_3
## %bb.8:
	movq	%r14, %rdi
	callq	_sshpkt_get_end
	testl	%eax, %eax
	je	LBB0_10
LBB0_3:
	movl	%eax, %ebx
	jmp	LBB0_5
LBB0_4:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%r15d, %r15d
LBB0_5:
	movq	%r12, %rdi
	callq	_BN_clear_free
	movq	%r15, %rdi
	callq	_BN_clear_free
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r12, %rdi
	callq	_BN_num_bits
	testl	%eax, %eax
	js	LBB0_13
## %bb.11:
	movl	%eax, %eax
	cmpq	%rax, (%r13)
	jg	LBB0_13
## %bb.12:
	cmpq	%rax, 8(%r13)
	jge	LBB0_14
LBB0_13:
	movq	_SSH_ERR_DH_GEX_OUT_OF_RANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_5
LBB0_14:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_dh_new_group
	movq	%rax, 24(%r13)
	testq	%rax, %rax
	je	LBB0_18
## %bb.15:
	movl	16(%r13), %esi
	shll	$3, %esi
	movq	%rax, %rdi
	callq	_dh_gen_key
	testl	%eax, %eax
	je	LBB0_19
LBB0_16:
	movl	%eax, %ebx
	xorl	%r15d, %r15d
LBB0_17:
	xorl	%r12d, %r12d
	jmp	LBB0_5
LBB0_18:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_5
LBB0_19:
	movq	24(%r13), %rdi
	xorl	%r15d, %r15d
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	callq	_DH_get0_key
	movq	_SSH2_MSG_KEX_DH_GEX_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_sshpkt_start
	movl	%eax, %ebx
	movl	$0, %r12d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.20:
	movq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_sshpkt_put_bignum2
	testl	%eax, %eax
	jne	LBB0_16
## %bb.21:
	movq	%r14, %rdi
	callq	_sshpkt_send
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_23
## %bb.22:
	movl	%eax, %ebx
	jmp	LBB0_17
LBB0_23:
	leaq	L_.str.1(%rip), %rdi
	callq	_debug
	movq	_SSH2_MSG_KEX_DH_GEX_GROUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_ssh_dispatch_set
	movq	_SSH2_MSG_KEX_DH_GEX_REPLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_input_kex_dh_gex_reply@GOTPCREL(%rip), %rdx
	movq	%r14, %rdi
	callq	_ssh_dispatch_set
	xorl	%ebx, %ebx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"got SSH2_MSG_KEX_DH_GEX_GROUP"

	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
	.comm	_SSH_ERR_DH_GEX_OUT_OF_RANGE,4,2 ## @SSH_ERR_DH_GEX_OUT_OF_RANGE
	.comm	_SSH2_MSG_KEX_DH_GEX_INIT,4,2   ## @SSH2_MSG_KEX_DH_GEX_INIT
L_.str.1:                               ## @.str.1
	.asciz	"SSH2_MSG_KEX_DH_GEX_INIT sent"

	.comm	_SSH2_MSG_KEX_DH_GEX_GROUP,4,2  ## @SSH2_MSG_KEX_DH_GEX_GROUP
	.comm	_SSH2_MSG_KEX_DH_GEX_REPLY,4,2  ## @SSH2_MSG_KEX_DH_GEX_REPLY
	.comm	_input_kex_dh_gex_reply,4,2     ## @input_kex_dh_gex_reply
	.comm	_stderr,4,2                     ## @stderr
	.no_dead_strip	_input_kex_dh_gex_group
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function input_kex_dh_gex_group
_input_kex_dh_gex_group:                ; @input_kex_dh_gex_group
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x2
	ldr	x23, [x2]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_debug
	bl	_BN_new
	mov	x21, x0
	cbz	x0, LBB0_6
; %bb.1:
	bl	_BN_new
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x21
	bl	_sshpkt_get_bignum2
	cbnz	w0, LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	bl	_sshpkt_get_bignum2
	cbnz	w0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_sshpkt_get_end
	cbz	w0, LBB0_10
LBB0_5:
	mov	x22, x0
	b	LBB0_9
LBB0_6:
	mov	x20, #0
LBB0_7:
Lloh2:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
LBB0_8:
	ldr	w22, [x8]
LBB0_9:
	mov	x0, x21
	bl	_BN_clear_free
	mov	x0, x20
	bl	_BN_clear_free
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
LBB0_10:
	mov	x0, x21
	bl	_BN_num_bits
	tbnz	w0, #31, LBB0_13
; %bb.11:
	mov	w8, w0
	ldr	x9, [x23]
	cmp	x9, x8
	b.gt	LBB0_13
; %bb.12:
	ldr	x9, [x23, #8]
	cmp	x9, x8
	b.ge	LBB0_14
LBB0_13:
Lloh4:
	adrp	x8, _SSH_ERR_DH_GEX_OUT_OF_RANGE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SSH_ERR_DH_GEX_OUT_OF_RANGE@GOTPAGEOFF]
	b	LBB0_8
LBB0_14:
	mov	x0, x20
	mov	x1, x21
	bl	_dh_new_group
	str	x0, [x23, #24]
	cbz	x0, LBB0_7
; %bb.15:
	ldr	w8, [x23, #16]
	lsl	w1, w8, #3
	bl	_dh_gen_key
	cbnz	w0, LBB0_18
; %bb.16:
	ldr	x0, [x23, #24]
	add	x1, sp, #8
	mov	x2, #0
	bl	_DH_get0_key
Lloh6:
	adrp	x8, _SSH2_MSG_KEX_DH_GEX_INIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SSH2_MSG_KEX_DH_GEX_INIT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sshpkt_start
	cbnz	w0, LBB0_18
; %bb.17:
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_sshpkt_put_bignum2
	cbz	w0, LBB0_20
LBB0_18:
	mov	x22, x0
LBB0_19:
	mov	x20, #0
	mov	x21, #0
	b	LBB0_9
LBB0_20:
	mov	x0, x19
	bl	_sshpkt_send
	mov	x22, x0
	cbnz	w0, LBB0_19
; %bb.21:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_debug
Lloh11:
	adrp	x8, _SSH2_MSG_KEX_DH_GEX_GROUP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SSH2_MSG_KEX_DH_GEX_GROUP@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_ssh_dispatch_set
Lloh14:
	adrp	x8, _SSH2_MSG_KEX_DH_GEX_REPLY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SSH2_MSG_KEX_DH_GEX_REPLY@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, _input_kex_dh_gex_reply@GOTPAGE
Lloh18:
	ldr	x2, [x2, _input_kex_dh_gex_reply@GOTPAGEOFF]
	mov	x0, x19
	bl	_ssh_dispatch_set
	b	LBB0_19
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"got SSH2_MSG_KEX_DH_GEX_GROUP"

	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
	.comm	_SSH_ERR_DH_GEX_OUT_OF_RANGE,4,2 ; @SSH_ERR_DH_GEX_OUT_OF_RANGE
	.comm	_SSH2_MSG_KEX_DH_GEX_INIT,4,2   ; @SSH2_MSG_KEX_DH_GEX_INIT
l_.str.1:                               ; @.str.1
	.asciz	"SSH2_MSG_KEX_DH_GEX_INIT sent"

	.comm	_SSH2_MSG_KEX_DH_GEX_GROUP,4,2  ; @SSH2_MSG_KEX_DH_GEX_GROUP
	.comm	_SSH2_MSG_KEX_DH_GEX_REPLY,4,2  ; @SSH2_MSG_KEX_DH_GEX_REPLY
	.comm	_input_kex_dh_gex_reply,4,2     ; @input_kex_dh_gex_reply
	.comm	_stderr,4,2                     ; @stderr
	.no_dead_strip	_input_kex_dh_gex_group
.subsections_via_symbols
