	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kex_buf2prop                   ## -- Begin function kex_buf2prop
	.p2align	4, 0x90
_kex_buf2prop:                          ## @kex_buf2prop
	.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	$40, %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	%rsi, %r12
	movq	%rdi, %rbx
	movq	$0, (%rdx)
	movq	_PROPOSAL_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	$8, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_sshbuf_fromb
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_14
## %bb.3:
	movq	_KEX_COOKIE_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_sshbuf_consume
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.4:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	_PROPOSAL_MAX@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.6:
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%r15,%r13), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_sshbuf_get_cstring
	testl	%eax, %eax
	jne	LBB0_16
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_proposal_names@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rax,%r12,4), %rsi
	movq	(%r13,%r12,8), %rdx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_debug2
	incq	%r12
	addq	$8, %r15
	movq	_PROPOSAL_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jb	LBB0_7
	jmp	LBB0_9
LBB0_1:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_19
LBB0_14:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jne	LBB0_17
## %bb.15:
	xorl	%ebx, %ebx
	jmp	LBB0_18
LBB0_5:
	xorl	%r12d, %r12d
LBB0_9:
	movq	%r12, -48(%rbp)
	leaq	-72(%rbp), %rsi
	movq	%r14, %rdi
	callq	_sshbuf_get_u8
	movl	%eax, %ebx
	testl	%eax, %eax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_17
## %bb.10:
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_sshbuf_get_u32
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.11:
	movq	-72(%rbp), %rsi
	testq	%r12, %r12
	je	LBB0_13
## %bb.12:
	movl	%esi, (%r12)
LBB0_13:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_debug2
	movq	-48(%rbp), %rsi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_debug2
	movq	%r13, (%r15)
	jmp	LBB0_18
LBB0_16:
	movl	%eax, %ebx
	movq	%r12, -48(%rbp)
LBB0_17:
	movq	%r13, %rdi
	callq	_kex_prop_free
LBB0_18:
	movq	%r14, %rdi
	callq	_sshbuf_free
LBB0_19:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PROPOSAL_MAX,8,3               ## @PROPOSAL_MAX
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
	.comm	_KEX_COOKIE_LEN,4,2             ## @KEX_COOKIE_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: %s"

	.comm	_proposal_names,8,3             ## @proposal_names
L_.str.1:                               ## @.str.1
	.asciz	"first_kex_follows %d "

L_.str.2:                               ## @.str.2
	.asciz	"reserved %u "

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kex_buf2prop                   ; -- Begin function kex_buf2prop
	.p2align	2
_kex_buf2prop:                          ; @kex_buf2prop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	str	xzr, [x2]
Lloh0:
	adrp	x25, _PROPOSAL_MAX@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PROPOSAL_MAX@GOTPAGEOFF]
	ldr	x0, [x25]
	mov	w1, #8
	bl	_calloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_sshbuf_fromb
	mov	x19, x0
	cbz	x0, LBB0_8
; %bb.2:
Lloh2:
	adrp	x8, _KEX_COOKIE_LEN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _KEX_COOKIE_LEN@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sshbuf_consume
	mov	x23, x0
	cbnz	w0, LBB0_16
; %bb.3:
	ldr	x8, [x25]
	cbz	x8, LBB0_9
; %bb.4:
	mov	x27, #0
	mov	x26, #0
Lloh5:
	adrp	x28, _proposal_names@GOTPAGE
Lloh6:
	ldr	x28, [x28, _proposal_names@GOTPAGEOFF]
Lloh7:
	adrp	x24, l_.str@PAGE
Lloh8:
	add	x24, x24, l_.str@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, x20, x27
	mov	x0, x19
	mov	x2, #0
	bl	_sshbuf_get_cstring
	cbnz	w0, LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x28]
	ldrsw	x1, [x8, x26, lsl #2]
	ldr	x8, [x20, x26, lsl #3]
	str	x8, [sp]
	mov	x0, x24
	bl	_debug2
	add	x26, x26, #1
	ldr	x8, [x25]
	add	x27, x27, #8
	cmp	x26, x8
	b.lo	LBB0_5
	b	LBB0_10
LBB0_7:
Lloh9:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
Lloh11:
	ldr	w23, [x8]
	b	LBB0_18
LBB0_8:
Lloh12:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
Lloh14:
	ldr	w23, [x8]
	cbnz	w23, LBB0_16
	b	LBB0_17
LBB0_9:
	mov	x26, #0
LBB0_10:
	str	x26, [sp, #16]
	add	x1, sp, #24
	mov	x0, x19
	bl	_sshbuf_get_u8
	mov	x23, x0
	cbnz	w0, LBB0_16
; %bb.11:
	add	x1, sp, #16
	mov	x0, x19
	bl	_sshbuf_get_u32
	mov	x23, x0
	cbnz	w0, LBB0_16
; %bb.12:
	ldr	x1, [sp, #24]
	cbz	x22, LBB0_14
; %bb.13:
	str	w1, [x22]
LBB0_14:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_debug2
	ldr	x1, [sp, #16]
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_debug2
	mov	w23, #0
	str	x20, [x21]
	b	LBB0_17
LBB0_15:
	mov	x23, x0
	str	x26, [sp, #16]
LBB0_16:
	mov	x0, x20
	bl	_kex_prop_free
LBB0_17:
	mov	x0, x19
	bl	_sshbuf_free
LBB0_18:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PROPOSAL_MAX,8,3               ; @PROPOSAL_MAX
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
	.comm	_KEX_COOKIE_LEN,4,2             ; @KEX_COOKIE_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: %s"

	.comm	_proposal_names,8,3             ; @proposal_names
l_.str.1:                               ; @.str.1
	.asciz	"first_kex_follows %d "

l_.str.2:                               ; @.str.2
	.asciz	"reserved %u "

.subsections_via_symbols
