	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function derive_key
_derive_key:                            ## @derive_key
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movq	%r8, %r12
	movq	%rcx, %rbx
	movq	%rdx, %r13
	movq	(%rdi), %rax
	movb	%sil, -41(%rbp)
	movq	%rax, %r14
	movl	16(%rax), %edi
	callq	_ssh_digest_bytes
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	callq	_ROUNDUP
	movl	$1, %edi
	movl	%eax, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %r13
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, %rbx
	movl	16(%r14), %edi
	callq	_ssh_digest_start
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	%r15, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_ssh_digest_update_buffer
	testq	%rax, %rax
	jne	LBB0_10
## %bb.6:
	movq	%r15, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_ssh_digest_update
	testq	%rax, %rax
	jne	LBB0_10
## %bb.7:
	leaq	-41(%rbp), %rsi
	movl	$1, %edx
	movq	%r15, %rdi
	callq	_ssh_digest_update
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:
	movq	(%rbx), %rsi
	movq	8(%rbx), %rdx
	movq	%r15, %rdi
	callq	_ssh_digest_update
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_ssh_digest_final
	testq	%rax, %rax
	je	LBB0_11
LBB0_10:
	movq	_SSH_ERR_LIBCRYPTO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	jmp	LBB0_20
LBB0_1:
	movq	_SSH_ERR_INVALID_ARGUMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_21
LBB0_3:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%r15d, %r15d
	xorl	%edi, %edi
LBB0_20:
	callq	_free
	movq	%r15, %rdi
	callq	_ssh_digest_free
LBB0_21:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r15, %rdi
	callq	_ssh_digest_free
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	cmpq	-64(%rbp), %r14                 ## 8-byte Folded Reload
	jae	LBB0_19
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	16(%rbx), %edi
	callq	_ssh_digest_start
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_10
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r15, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_ssh_digest_update_buffer
	testq	%rax, %rax
	jne	LBB0_10
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r15, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_ssh_digest_update
	testq	%rax, %rax
	jne	LBB0_10
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_ssh_digest_update
	testq	%rax, %rax
	jne	LBB0_10
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	leaq	(%r14,%r13), %rsi
	movq	%r15, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_ssh_digest_final
	testq	%rax, %rax
	jne	LBB0_10
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r15, %rdi
	callq	_ssh_digest_free
	addq	-56(%rbp), %r14                 ## 8-byte Folded Reload
	cmpq	-64(%rbp), %r14                 ## 8-byte Folded Reload
	jb	LBB0_13
LBB0_19:
	movq	16(%rbp), %rax
	movq	%r13, (%rax)
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	xorl	%ebx, %ebx
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ## @SSH_ERR_INVALID_ARGUMENT
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
	.comm	_SSH_ERR_LIBCRYPTO_ERROR,4,2    ## @SSH_ERR_LIBCRYPTO_ERROR
	.comm	_stderr,4,2                     ## @stderr
	.no_dead_strip	_derive_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function derive_key
_derive_key:                            ; @derive_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x6
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x24, x2
	ldr	x28, [x0]
	strb	w1, [sp, #15]
	ldr	w0, [x28, #16]
	bl	_ssh_digest_bytes
	cbz	x0, LBB0_9
; %bb.1:
	mov	x25, x0
	mov	x0, x24
	mov	x1, x25
	bl	_ROUNDUP
	mov	x1, x0
	mov	w0, #1
	bl	_calloc
	mov	x20, x0
	cbz	x0, LBB0_10
; %bb.2:
	ldr	w0, [x28, #16]
	bl	_ssh_digest_start
	mov	x26, x0
	cbz	x0, LBB0_8
; %bb.3:
	mov	x0, x26
	mov	x1, x21
	bl	_ssh_digest_update_buffer
	cbnz	x0, LBB0_8
; %bb.4:
	mov	x0, x26
	mov	x1, x23
	mov	x2, x22
	bl	_ssh_digest_update
	cbnz	x0, LBB0_8
; %bb.5:
	add	x1, sp, #15
	mov	x0, x26
	mov	w2, #1
	bl	_ssh_digest_update
	cbnz	x0, LBB0_8
; %bb.6:
	ldp	x1, x2, [x28]
	mov	x0, x26
	bl	_ssh_digest_update
	cbnz	x0, LBB0_8
; %bb.7:
	mov	x0, x26
	mov	x1, x20
	mov	x2, x25
	bl	_ssh_digest_final
	cbz	x0, LBB0_14
LBB0_8:
Lloh0:
	adrp	x8, _SSH_ERR_LIBCRYPTO_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSH_ERR_LIBCRYPTO_ERROR@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh2:
	adrp	x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
	b	LBB0_13
LBB0_10:
	mov	x26, #0
Lloh5:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
LBB0_11:
	ldr	w21, [x8]
LBB0_12:
	mov	x0, x20
	bl	_free
	mov	x0, x26
	bl	_ssh_digest_free
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_14:
	mov	x0, x26
	bl	_ssh_digest_free
	cmp	x25, x24
	b.hs	LBB0_22
; %bb.15:
	mov	x27, x25
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x28, #16]
	bl	_ssh_digest_start
	mov	x26, x0
	cbz	x0, LBB0_8
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x26
	mov	x1, x21
	bl	_ssh_digest_update_buffer
	cbnz	x0, LBB0_8
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x26
	mov	x1, x23
	mov	x2, x22
	bl	_ssh_digest_update
	cbnz	x0, LBB0_8
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x26
	mov	x1, x20
	mov	x2, x27
	bl	_ssh_digest_update
	cbnz	x0, LBB0_8
; %bb.20:                               ;   in Loop: Header=BB0_16 Depth=1
	add	x1, x20, x27
	mov	x0, x26
	mov	x2, x25
	bl	_ssh_digest_final
	cbnz	x0, LBB0_8
; %bb.21:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x26
	bl	_ssh_digest_free
	add	x27, x27, x25
	cmp	x27, x24
	b.lo	LBB0_16
LBB0_22:
	mov	x26, #0
	mov	w21, #0
	str	x20, [x19]
	mov	x20, #0
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ; @SSH_ERR_INVALID_ARGUMENT
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
	.comm	_SSH_ERR_LIBCRYPTO_ERROR,4,2    ; @SSH_ERR_LIBCRYPTO_ERROR
	.comm	_stderr,4,2                     ; @stderr
	.no_dead_strip	_derive_key
.subsections_via_symbols
