	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kex_input_newkeys
_kex_input_newkeys:                     ## @kex_input_newkeys
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	movq	(%rdx), %r14
	leaq	L_.str(%rip), %rdi
	callq	_debug
	movq	_SSH2_MSG_NEWKEYS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_kex_protocol_error@GOTPCREL(%rip), %rdx
	movq	%rbx, %rdi
	callq	_ssh_dispatch_set
	movq	_SSH2_MSG_KEXINIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_kex_input_kexinit@GOTPCREL(%rip), %rdx
	movq	%rbx, %rdi
	callq	_ssh_dispatch_set
	movq	%rbx, %rdi
	callq	_sshpkt_get_end
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	_MODE_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ssh_set_newkeys
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movl	$1, (%r14)
	movl	20(%r14), %edi
	callq	_sshbuf_reset
	movq	_KEX_INIT_SENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 16(%r14)
	movq	8(%r14), %rdi
	callq	_free
	movq	$0, 8(%r14)
	xorl	%eax, %eax
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SSH2_MSG_NEWKEYS received"

	.comm	_SSH2_MSG_NEWKEYS,4,2           ## @SSH2_MSG_NEWKEYS
	.comm	_kex_protocol_error,4,2         ## @kex_protocol_error
	.comm	_SSH2_MSG_KEXINIT,4,2           ## @SSH2_MSG_KEXINIT
	.comm	_kex_input_kexinit,4,2          ## @kex_input_kexinit
	.comm	_MODE_IN,4,2                    ## @MODE_IN
	.comm	_KEX_INIT_SENT,4,2              ## @KEX_INIT_SENT
	.no_dead_strip	_kex_input_newkeys
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kex_input_newkeys
_kex_input_newkeys:                     ; @kex_input_newkeys
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	ldr	x20, [x2]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_debug
Lloh2:
	adrp	x8, _SSH2_MSG_NEWKEYS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SSH2_MSG_NEWKEYS@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, _kex_protocol_error@GOTPAGE
Lloh6:
	ldr	x2, [x2, _kex_protocol_error@GOTPAGEOFF]
	mov	x0, x19
	bl	_ssh_dispatch_set
Lloh7:
	adrp	x8, _SSH2_MSG_KEXINIT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SSH2_MSG_KEXINIT@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, _kex_input_kexinit@GOTPAGE
Lloh11:
	ldr	x2, [x2, _kex_input_kexinit@GOTPAGEOFF]
	mov	x0, x19
	bl	_ssh_dispatch_set
	mov	x0, x19
	bl	_sshpkt_get_end
	cbnz	w0, LBB0_3
; %bb.1:
Lloh12:
	adrp	x8, _MODE_IN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MODE_IN@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ssh_set_newkeys
	cbnz	w0, LBB0_3
; %bb.2:
	mov	w8, #1
	str	w8, [x20]
	ldr	w0, [x20, #20]
	bl	_sshbuf_reset
Lloh15:
	adrp	x8, _KEX_INIT_SENT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _KEX_INIT_SENT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x20, #16]
	bic	w8, w9, w8
	str	w8, [x20, #16]
	ldr	x0, [x20, #8]
	bl	_free
	mov	w0, #0
	str	xzr, [x20, #8]
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SSH2_MSG_NEWKEYS received"

	.comm	_SSH2_MSG_NEWKEYS,4,2           ; @SSH2_MSG_NEWKEYS
	.comm	_kex_protocol_error,4,2         ; @kex_protocol_error
	.comm	_SSH2_MSG_KEXINIT,4,2           ; @SSH2_MSG_KEXINIT
	.comm	_kex_input_kexinit,4,2          ; @kex_input_kexinit
	.comm	_MODE_IN,4,2                    ; @MODE_IN
	.comm	_KEX_INIT_SENT,4,2              ; @KEX_INIT_SENT
	.no_dead_strip	_kex_input_newkeys
.subsections_via_symbols
