	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kex_from_blob
_kex_from_blob:                         ## @kex_from_blob
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	$1, %edi
	movl	$64, %esi
	callq	_calloc
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_18
## %bb.1:
	xorl	%eax, %eax
	callq	_sshbuf_new
	movq	%rax, 16(%r12)
	testq	%rax, %rax
	je	LBB0_15
## %bb.2:
	xorl	%eax, %eax
	callq	_sshbuf_new
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_15
## %bb.3:
	leaq	60(%r12), %rsi
	leaq	56(%r12), %rdx
	movq	%r15, %rdi
	callq	_sshbuf_get_string
	testl	%eax, %eax
	jne	LBB0_14
## %bb.4:
	leaq	52(%r12), %rsi
	movq	%r15, %rdi
	callq	_sshbuf_get_u32
	testl	%eax, %eax
	jne	LBB0_14
## %bb.5:
	leaq	48(%r12), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_sshbuf_get_cstring
	testl	%eax, %eax
	jne	LBB0_14
## %bb.6:
	leaq	44(%r12), %rsi
	movq	%r15, %rdi
	callq	_sshbuf_get_u32
	testl	%eax, %eax
	jne	LBB0_14
## %bb.7:
	leaq	40(%r12), %rsi
	movq	%r15, %rdi
	callq	_sshbuf_get_u32
	testl	%eax, %eax
	jne	LBB0_14
## %bb.8:
	leaq	36(%r12), %rsi
	movq	%r15, %rdi
	callq	_sshbuf_get_u32
	testl	%eax, %eax
	jne	LBB0_14
## %bb.9:
	movq	16(%r12), %rsi
	movq	%r15, %rdi
	callq	_sshbuf_get_stringb
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:
	movq	8(%r12), %rsi
	movq	%r15, %rdi
	callq	_sshbuf_get_stringb
	testl	%eax, %eax
	jne	LBB0_14
## %bb.11:
	leaq	32(%r12), %rsi
	movq	%r15, %rdi
	callq	_sshbuf_get_u32
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	leaq	28(%r12), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_sshbuf_get_cstring
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movq	%r12, %rsi
	addq	$24, %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_sshbuf_get_cstring
	testl	%eax, %eax
	je	LBB0_19
LBB0_14:
	testq	%r14, %r14
	sete	%r15b
	movl	%eax, %ebx
	jmp	LBB0_21
LBB0_15:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testq	%r14, %r14
	sete	%r15b
	je	LBB0_21
## %bb.16:
	testl	%ebx, %ebx
	jne	LBB0_21
## %bb.17:
	xorl	%ebx, %ebx
	jmp	LBB0_23
LBB0_18:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	setne	%cl
	testq	%r14, %r14
	sete	%dl
	xorl	%ebx, %ebx
	orb	%cl, %dl
	cmovneq	%rbx, %r12
	cmovnel	%eax, %ebx
	testq	%r14, %r14
	jne	LBB0_23
	jmp	LBB0_25
LBB0_19:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, (%r12)
	testq	%r14, %r14
	jne	LBB0_23
## %bb.20:
	movb	$1, %r15b
LBB0_21:
	movq	16(%r12), %rdi
	callq	_sshbuf_free
	movq	8(%r12), %rdi
	callq	_sshbuf_free
	movq	%r12, %rdi
	callq	_free
	testb	%r15b, %r15b
	jne	LBB0_24
## %bb.22:
	xorl	%r12d, %r12d
LBB0_23:
	movq	%r12, (%r14)
LBB0_24:
	movl	%ebx, %eax
LBB0_25:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
	.no_dead_strip	_kex_from_blob
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kex_from_blob
_kex_from_blob:                         ; @kex_from_blob
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x21, x0
	mov	w0, #1
	mov	w1, #64
	bl	_calloc
	mov	x20, x0
	cbz	x0, LBB0_19
; %bb.1:
	bl	_sshbuf_new
	str	x0, [x20, #16]
	cbz	x0, LBB0_15
; %bb.2:
	bl	_sshbuf_new
	str	x0, [x20, #8]
	cbz	x0, LBB0_15
; %bb.3:
	add	x1, x20, #60
	add	x2, x20, #56
	mov	x0, x21
	bl	_sshbuf_get_string
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.4:
	add	x1, x20, #52
	mov	x0, x21
	bl	_sshbuf_get_u32
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.5:
	add	x1, x20, #48
	mov	x0, x21
	mov	x2, #0
	bl	_sshbuf_get_cstring
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.6:
	add	x1, x20, #44
	mov	x0, x21
	bl	_sshbuf_get_u32
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.7:
	add	x1, x20, #40
	mov	x0, x21
	bl	_sshbuf_get_u32
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.8:
	add	x1, x20, #36
	mov	x0, x21
	bl	_sshbuf_get_u32
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.9:
	ldr	x1, [x20, #16]
	mov	x0, x21
	bl	_sshbuf_get_stringb
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.10:
	ldr	x1, [x20, #8]
	mov	x0, x21
	bl	_sshbuf_get_stringb
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.11:
	add	x1, x20, #32
	mov	x0, x21
	bl	_sshbuf_get_u32
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.12:
	add	x1, x20, #28
	mov	x0, x21
	mov	x2, #0
	bl	_sshbuf_get_cstring
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.13:
	add	x1, x20, #24
	mov	x0, x21
	mov	x2, #0
	bl	_sshbuf_get_cstring
	mov	x22, x0
	cbz	w0, LBB0_23
LBB0_14:
	cmp	x19, #0
	cset	w21, eq
	b	LBB0_17
LBB0_15:
Lloh0:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	cmp	x19, #0
	cset	w21, eq
	cbz	x19, LBB0_17
; %bb.16:
	cbz	w22, LBB0_21
LBB0_17:
	ldr	x0, [x20, #16]
	bl	_sshbuf_free
	ldr	x0, [x20, #8]
	bl	_sshbuf_free
	mov	x0, x20
	bl	_free
	tbnz	w21, #0, LBB0_22
; %bb.18:
	mov	x20, #0
	b	LBB0_21
LBB0_19:
Lloh3:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	cmp	x19, #0
	ccmp	w22, #0, #0, ne
	csel	x20, xzr, x20, ne
	csel	w8, w22, wzr, ne
	cbz	x19, LBB0_22
; %bb.20:
	mov	x22, x8
LBB0_21:
	str	x20, [x19]
LBB0_22:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_23:
	movi.2s	v0, #1
	str	d0, [x20]
	cbnz	x19, LBB0_21
; %bb.24:
	mov	w21, #1
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
	.no_dead_strip	_kex_from_blob
.subsections_via_symbols
