	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssh_ed25519_sign               ## -- Begin function ssh_ed25519_sign
	.p2align	4, 0x90
_ssh_ed25519_sign:                      ## @ssh_ed25519_sign
	.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	%r8, %r14
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %rbx
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movq	$0, (%r12)
LBB0_2:
	testq	%r13, %r13
	je	LBB0_4
## %bb.3:
	movq	$0, (%r13)
LBB0_4:
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.5:
	movl	8(%rbx), %edi
	callq	_sshkey_type_plain
	movq	_KEY_ED25519@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.6:
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.7:
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_crypto_sign_ed25519_BYTES@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	subq	%rcx, %rax
	cmpq	%r14, %rax
	jbe	LBB0_14
## %bb.8:
	movq	%rcx, %rdi
	addq	%r14, %rdi
	movq	%rdi, -48(%rbp)
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_17
## %bb.9:
	leaq	-48(%rbp), %rsi
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movq	%r15, %rdx
	movq	%r14, %rcx
	movq	%rbx, %r8
	callq	_crypto_sign_ed25519
	testl	%eax, %eax
	jne	LBB0_18
## %bb.10:
	cmpq	%r14, -48(%rbp)
	jbe	LBB0_18
## %bb.11:
	xorl	%eax, %eax
	callq	_sshbuf_new
	testq	%rax, %rax
	je	LBB0_19
## %bb.12:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_sshbuf_put_cstring
	testl	%eax, %eax
	jne	LBB0_13
## %bb.22:
	movq	-48(%rbp), %rdx
	subq	%r14, %rdx
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_sshbuf_put_string
	testl	%eax, %eax
	je	LBB0_24
LBB0_13:
	movl	%eax, %r15d
	jmp	LBB0_21
LBB0_14:
	movq	_SSH_ERR_INVALID_ARGUMENT@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %r15d
LBB0_16:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_18:
	movq	_SSH_ERR_INVALID_ARGUMENT@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_19:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
LBB0_20:
	movl	(%rax), %r15d
	xorl	%ebx, %ebx
LBB0_21:
	movq	%rbx, %rdi
	callq	_sshbuf_free
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_explicit_bzero
	movq	%rbx, %rdi
	callq	_free
	jmp	LBB0_16
LBB0_24:
	movq	%rbx, %rdi
	callq	_sshbuf_len
	movq	%rax, %r14
	testq	%r13, %r13
	je	LBB0_27
## %bb.25:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_malloc
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_29
## %bb.26:
	movq	%rax, %rbx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_sshbuf_ptr
	movq	%rbx, %rdi
	movq	%r15, %rbx
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_memcpy
LBB0_27:
	xorl	%r15d, %r15d
	testq	%r12, %r12
	je	LBB0_21
## %bb.28:
	movq	%r14, (%r12)
	jmp	LBB0_21
LBB0_29:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_KEY_ED25519,8,3                ## @KEY_ED25519
	.comm	_INT_MAX,8,3                    ## @INT_MAX
	.comm	_crypto_sign_ed25519_BYTES,8,3  ## @crypto_sign_ed25519_BYTES
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ## @SSH_ERR_INVALID_ARGUMENT
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ssh-ed25519"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssh_ed25519_sign               ; -- Begin function ssh_ed25519_sign
	.p2align	2
_ssh_ed25519_sign:                      ; @ssh_ed25519_sign
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x24, x4
	mov	x23, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	cbz	x2, LBB0_2
; %bb.1:
	str	xzr, [x21]
LBB0_2:
	cbz	x22, LBB0_4
; %bb.3:
	str	xzr, [x22]
LBB0_4:
	cbz	x19, LBB0_11
; %bb.5:
	ldr	w0, [x19, #8]
	bl	_sshkey_type_plain
Lloh0:
	adrp	x8, _KEY_ED25519@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KEY_ED25519@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.6:
	ldr	x25, [x19]
	cbz	x25, LBB0_11
; %bb.7:
Lloh3:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x8]
Lloh6:
	adrp	x8, _crypto_sign_ed25519_BYTES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _crypto_sign_ed25519_BYTES@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	sub	x9, x9, x8
	cmp	x9, x24
	b.ls	LBB0_11
; %bb.8:
	add	x19, x8, x24
	str	x19, [sp, #8]
	mov	x0, x19
	bl	_malloc
	cbz	x0, LBB0_14
; %bb.9:
	mov	x20, x0
	add	x1, sp, #8
	mov	x2, x23
	mov	x3, x24
	mov	x4, x25
	bl	_crypto_sign_ed25519
	ldr	x8, [sp, #8]
	cmp	w0, #0
	ccmp	x8, x24, #0, eq
	b.hi	LBB0_15
; %bb.10:
	mov	x23, #0
Lloh9:
	adrp	x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGEOFF]
	b	LBB0_25
LBB0_11:
Lloh11:
	adrp	x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGEOFF]
LBB0_12:
	ldr	w25, [x8]
LBB0_13:
	mov	x0, x25
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_14:
Lloh13:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
	b	LBB0_12
LBB0_15:
	bl	_sshbuf_new
	mov	x23, x0
	cbz	x0, LBB0_24
; %bb.16:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_sshbuf_put_cstring
	cbnz	w0, LBB0_18
; %bb.17:
	ldr	x8, [sp, #8]
	sub	x2, x8, x24
	mov	x0, x23
	mov	x1, x20
	bl	_sshbuf_put_string
	cbz	w0, LBB0_19
LBB0_18:
	mov	x25, x0
	b	LBB0_26
LBB0_19:
	mov	x0, x23
	bl	_sshbuf_len
	mov	x24, x0
	cbz	x22, LBB0_22
; %bb.20:
	mov	x0, x24
	bl	_malloc
	str	x0, [x22]
	cbz	x0, LBB0_24
; %bb.21:
	mov	x25, x0
	mov	x0, x23
	bl	_sshbuf_ptr
	mov	x1, x0
	mov	x0, x25
	mov	x2, x24
	bl	_memcpy
LBB0_22:
	mov	w25, #0
	cbz	x21, LBB0_26
; %bb.23:
	str	x24, [x21]
	b	LBB0_26
LBB0_24:
Lloh17:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
LBB0_25:
	ldr	w25, [x8]
LBB0_26:
	mov	x0, x23
	bl	_sshbuf_free
	mov	x0, x20
	mov	x1, x19
	bl	_explicit_bzero
	mov	x0, x20
	bl	_free
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_KEY_ED25519,8,3                ; @KEY_ED25519
	.comm	_INT_MAX,8,3                    ; @INT_MAX
	.comm	_crypto_sign_ed25519_BYTES,8,3  ; @crypto_sign_ed25519_BYTES
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ; @SSH_ERR_INVALID_ARGUMENT
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ssh-ed25519"

.subsections_via_symbols
