	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pkey_ec_sign
_pkey_ec_sign:                          ## @pkey_ec_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, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_ECDSA_size
	movl	%eax, %r12d
	xorl	%edi, %edi
	testl	%eax, %eax
	setg	%dil
	callq	_ossl_assert
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_11
## %bb.1:
	movslq	%r12d, %rax
	testq	%r13, %r13
	je	LBB0_10
## %bb.2:
	cmpq	%rax, (%r15)
	jae	LBB0_4
## %bb.3:
	movq	_EC_F_PKEY_EC_SIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EC_R_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ECerr
	jmp	LBB0_11
LBB0_4:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_EVP_MD_type
	movl	%eax, %edi
	jmp	LBB0_7
LBB0_6:
	movq	_NID_sha1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_7:
	leaq	-44(%rbp), %r8
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%r13, %rcx
	movq	%rbx, %r9
	callq	_ECDSA_sign
	testl	%eax, %eax
	jle	LBB0_8
## %bb.9:
	movl	-44(%rbp), %eax
LBB0_10:
	movq	%rax, (%r15)
	movl	$1, %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	%eax, %r14d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_F_PKEY_EC_SIGN,4,2          ## @EC_F_PKEY_EC_SIGN
	.comm	_EC_R_BUFFER_TOO_SMALL,4,2      ## @EC_R_BUFFER_TOO_SMALL
	.comm	_NID_sha1,4,2                   ## @NID_sha1
	.no_dead_strip	_pkey_ec_sign
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pkey_ec_sign
_pkey_ec_sign:                          ; @pkey_ec_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	x20, x4
	mov	x21, x3
	mov	x19, x2
	mov	x22, x1
	ldp	x8, x25, [x0]
	ldr	x23, [x8]
	mov	x0, x23
	bl	_ECDSA_size
	mov	x24, x0
	cmp	w0, #0
	cset	w0, gt
	bl	_ossl_assert
	cbz	w0, LBB0_11
; %bb.1:
	cbz	x22, LBB0_4
; %bb.2:
	ldr	x8, [x19]
	cmp	x8, w24, sxtw
	b.hs	LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _EC_F_PKEY_EC_SIGN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EC_F_PKEY_EC_SIGN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _EC_R_BUFFER_TOO_SMALL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EC_R_BUFFER_TOO_SMALL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_ECerr
	mov	w0, #0
	b	LBB0_11
LBB0_4:
	sxtw	x8, w24
	b	LBB0_10
LBB0_5:
	ldr	x0, [x25]
	cbz	x0, LBB0_7
; %bb.6:
	bl	_EVP_MD_type
	b	LBB0_8
LBB0_7:
Lloh6:
	adrp	x8, _NID_sha1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NID_sha1@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
LBB0_8:
	add	x4, sp, #12
	mov	x1, x21
	mov	x2, x20
	mov	x3, x22
	mov	x5, x23
	bl	_ECDSA_sign
	cmp	w0, #1
	b.lt	LBB0_11
; %bb.9:
	ldr	w8, [sp, #12]
LBB0_10:
	str	x8, [x19]
	mov	w0, #1
LBB0_11:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_F_PKEY_EC_SIGN,4,2          ; @EC_F_PKEY_EC_SIGN
	.comm	_EC_R_BUFFER_TOO_SMALL,4,2      ; @EC_R_BUFFER_TOO_SMALL
	.comm	_NID_sha1,4,2                   ; @NID_sha1
	.no_dead_strip	_pkey_ec_sign
.subsections_via_symbols
