	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssh_ecdsa_sign                 ## -- Begin function ssh_ecdsa_sign
	.p2align	4, 0x90
_ssh_ecdsa_sign:                        ## @ssh_ecdsa_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SSH_DIGEST_MAX_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	(,%rbx,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	testq	%r13, %r13
	je	LBB0_2
## %bb.1:
	movq	$0, (%r13)
LBB0_2:
	testq	%r15, %r15
	je	LBB0_4
## %bb.3:
	movq	$0, (%r15)
LBB0_4:
	testq	%r12, %r12
	je	LBB0_7
## %bb.5:
	cmpq	$0, (%r12)
	je	LBB0_7
## %bb.6:
	movl	12(%r12), %edi
	callq	_sshkey_type_plain
	movq	_KEY_ECDSA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.9:
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movl	8(%r12), %edi
	callq	_sshkey_ec_nid_to_hash_alg
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_ssh_digest_bytes
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r8
	shll	$2, %r8d
	movl	%r14d, %edi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rcx
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_ssh_digest_memory
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:
	movl	%eax, %r14d
LBB0_14:
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_38:
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_explicit_bzero
	movq	%r13, %rdi
	callq	_sshbuf_free
	movq	%r12, %rdi
	callq	_sshbuf_free
	movq	%r15, %rdi
	callq	_ECDSA_SIG_free
	jmp	LBB0_39
LBB0_7:
	movq	_SSH_ERR_INVALID_ARGUMENT@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %r14d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_39:
	movq	%rbx, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_41
## %bb.40:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_SSH_ERR_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_15:
	movq	(%r12), %rdx
	movq	%rbx, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_ECDSA_do_sign
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:
	xorl	%eax, %eax
	callq	_sshbuf_new
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	xorl	%eax, %eax
	callq	_sshbuf_new
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_19
## %bb.20:
	leaq	-112(%rbp), %rsi
	leaq	-104(%rbp), %rdx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_ECDSA_SIG_get0
	movq	-112(%rbp), %rsi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_sshbuf_put_bignum2
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	movl	%eax, %r14d
	movq	%rbx, %r12
LBB0_29:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_37
LBB0_19:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%r13d, %r13d
LBB0_26:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_38
LBB0_16:
	movq	_SSH_ERR_LIBCRYPTO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_14
LBB0_22:
	movq	-104(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_sshbuf_put_bignum2
	testl	%eax, %eax
	je	LBB0_24
## %bb.23:
	movl	%eax, %r14d
LBB0_36:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	-72(%rbp), %r12                 ## 8-byte Reload
LBB0_37:
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_38
LBB0_24:
	movq	%r12, %rdi
	callq	_sshkey_ssh_name_plain
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_sshbuf_put_cstring
	testl	%eax, %eax
	je	LBB0_27
## %bb.25:
	movl	%eax, %r14d
	movq	%rbx, %r13
	jmp	LBB0_26
LBB0_27:
	movq	%rbx, %rdi
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_sshbuf_put_stringb
	testl	%eax, %eax
	je	LBB0_30
## %bb.28:
	movl	%eax, %r14d
	jmp	LBB0_29
LBB0_30:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_sshbuf_len
	movq	%rax, %r12
	testq	%r15, %r15
	je	LBB0_34
## %bb.31:
	movq	%r12, %rdi
	callq	_malloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_32
## %bb.33:
	movq	%rax, %r14
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_sshbuf_ptr
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%r12, %rdx
	callq	_memcpy
LBB0_34:
	xorl	%r14d, %r14d
	testq	%r13, %r13
	je	LBB0_36
## %bb.35:
	movq	%r12, (%r13)
	jmp	LBB0_36
LBB0_32:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_36
LBB0_41:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_DIGEST_MAX_LENGTH,4,2      ## @SSH_DIGEST_MAX_LENGTH
	.comm	_SSH_ERR_INTERNAL_ERROR,4,2     ## @SSH_ERR_INTERNAL_ERROR
	.comm	_KEY_ECDSA,8,3                  ## @KEY_ECDSA
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ## @SSH_ERR_INVALID_ARGUMENT
	.comm	_SSH_ERR_LIBCRYPTO_ERROR,4,2    ## @SSH_ERR_LIBCRYPTO_ERROR
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssh_ecdsa_sign                 ; -- Begin function ssh_ecdsa_sign
	.p2align	2
_ssh_ecdsa_sign:                        ; @ssh_ecdsa_sign
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
	mov	x21, x4
	mov	x23, x3
	mov	x22, x2
	mov	x24, x1
	mov	x26, x0
	mov	x28, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _SSH_DIGEST_MAX_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SSH_DIGEST_MAX_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	lsl	x8, x20, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x19, x9, x8
	mov	sp, x19
	cbz	x2, LBB0_2
; %bb.1:
	str	xzr, [x22]
LBB0_2:
	cbz	x24, LBB0_4
; %bb.3:
	str	xzr, [x24]
LBB0_4:
	cbz	x26, LBB0_12
; %bb.5:
	ldr	x8, [x26]
	cbz	x8, LBB0_12
; %bb.6:
	ldr	w0, [x26, #12]
	bl	_sshkey_type_plain
Lloh8:
	adrp	x8, _KEY_ECDSA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _KEY_ECDSA@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.7:
	ldr	w0, [x26, #8]
	bl	_sshkey_ec_nid_to_hash_alg
	cmn	w0, #1
	b.eq	LBB0_16
; %bb.8:
	mov	x27, x0
	bl	_ssh_digest_bytes
	cbz	x0, LBB0_16
; %bb.9:
	mov	x25, x0
	lsl	w20, w20, #2
	mov	x0, x27
	mov	x1, x23
	mov	x2, x21
	mov	x3, x19
	mov	x4, x20
	bl	_ssh_digest_memory
	cbz	w0, LBB0_17
; %bb.10:
	mov	x27, x0
	mov	x21, #0
	mov	x25, #0
	mov	x23, #0
LBB0_11:
	mov	x0, x19
	mov	x1, x20
	bl	_explicit_bzero
	mov	x0, x25
	bl	_sshbuf_free
	mov	x0, x23
	bl	_sshbuf_free
	mov	x0, x21
	bl	_ECDSA_SIG_free
	b	LBB0_14
LBB0_12:
Lloh11:
	adrp	x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGEOFF]
LBB0_13:
	ldr	w27, [x8]
LBB0_14:
	mov	sp, x28
	ldur	x8, [x29, #-88]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_33
; %bb.15:
	mov	x0, x27
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_16:
Lloh16:
	adrp	x8, _SSH_ERR_INTERNAL_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SSH_ERR_INTERNAL_ERROR@GOTPAGEOFF]
	b	LBB0_13
LBB0_17:
	ldr	x2, [x26]
	mov	x0, x19
	mov	x1, x25
	bl	_ECDSA_do_sign
	mov	x21, x0
	cbz	x0, LBB0_27
; %bb.18:
	bl	_sshbuf_new
	mov	x23, x0
	cbz	x0, LBB0_25
; %bb.19:
	bl	_sshbuf_new
	cbz	x0, LBB0_25
; %bb.20:
	mov	x25, x0
	sub	x1, x29, #96
	sub	x2, x29, #104
	mov	x0, x21
	bl	_ECDSA_SIG_get0
	ldur	x1, [x29, #-96]
	mov	x0, x23
	bl	_sshbuf_put_bignum2
	cbnz	w0, LBB0_24
; %bb.21:
	ldur	x1, [x29, #-104]
	mov	x0, x23
	bl	_sshbuf_put_bignum2
	cbnz	w0, LBB0_24
; %bb.22:
	mov	x0, x26
	bl	_sshkey_ssh_name_plain
	mov	x1, x0
	mov	x0, x25
	bl	_sshbuf_put_cstring
	cbnz	w0, LBB0_24
; %bb.23:
	mov	x0, x25
	mov	x1, x23
	bl	_sshbuf_put_stringb
	cbz	w0, LBB0_28
LBB0_24:
	mov	x27, x0
	b	LBB0_11
LBB0_25:
	mov	x25, #0
LBB0_26:
Lloh18:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
Lloh20:
	ldr	w27, [x8]
	b	LBB0_11
LBB0_27:
	mov	x25, #0
	mov	x23, #0
Lloh21:
	adrp	x8, _SSH_ERR_LIBCRYPTO_ERROR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SSH_ERR_LIBCRYPTO_ERROR@GOTPAGEOFF]
Lloh23:
	ldr	w27, [x8]
	b	LBB0_11
LBB0_28:
	mov	x0, x25
	bl	_sshbuf_len
	mov	x26, x0
	cbz	x24, LBB0_31
; %bb.29:
	mov	x0, x26
	bl	_malloc
	str	x0, [x24]
	cbz	x0, LBB0_26
; %bb.30:
	mov	x27, x0
	mov	x0, x25
	bl	_sshbuf_ptr
	mov	x1, x0
	mov	x0, x27
	mov	x2, x26
	bl	_memcpy
LBB0_31:
	mov	w27, #0
	cbz	x22, LBB0_11
; %bb.32:
	str	x26, [x22]
	b	LBB0_11
LBB0_33:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_DIGEST_MAX_LENGTH,4,2      ; @SSH_DIGEST_MAX_LENGTH
	.comm	_SSH_ERR_INTERNAL_ERROR,4,2     ; @SSH_ERR_INTERNAL_ERROR
	.comm	_KEY_ECDSA,8,3                  ; @KEY_ECDSA
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ; @SSH_ERR_INVALID_ARGUMENT
	.comm	_SSH_ERR_LIBCRYPTO_ERROR,4,2    ; @SSH_ERR_LIBCRYPTO_ERROR
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
.subsections_via_symbols
