	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ecdsa_sign_det         ## -- Begin function mbedtls_ecdsa_sign_det
	.p2align	4, 0x90
_mbedtls_ecdsa_sign_det:                ## @mbedtls_ecdsa_sign_det
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -120(%rbp)                 ## 8-byte Spill
	movq	%r8, -112(%rbp)                 ## 8-byte Spill
	movq	%rcx, %r12
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	%rsp, %r15
	movl	16(%rbp), %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MBEDTLS_ECP_MAX_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %ebx
	movl	%r14d, %edi
	callq	_mbedtls_md_info_from_type
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leal	7(%rbx), %eax
	addl	$14, %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	sarl	$3, %ebx
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movslq	%ebx, %r15
	leaq	-52(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_mbedtls_mpi_init
	leaq	-56(%rbp), %rdi
	callq	_mbedtls_hmac_drbg_init
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_mbedtls_mpi_write_binary
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	-112(%rbp), %r12                ## 8-byte Reload
	movq	%r12, %rdx
	movq	-120(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_derive_mpi
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	movq	%r13, %rsi
	addq	%r15, %rsi
	leaq	-52(%rbp), %rdi
	movq	%r15, %rdx
	callq	_mbedtls_mpi_write_binary
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	addl	%r15d, %r15d
	movq	%r13, %rdx
	leaq	-56(%rbp), %r13
	movq	%r13, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %ecx
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	callq	_mbedtls_hmac_drbg_seed_buf
	movq	_mbedtls_hmac_drbg_random@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r14, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%r12, %r8
	movq	%rbx, %r9
	pushq	%r13
	pushq	%rax
	callq	_mbedtls_ecdsa_sign
	addq	$16, %rsp
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_mbedtls_hmac_drbg_free
	leaq	-52(%rbp), %rdi
	callq	_mbedtls_mpi_free
	jmp	LBB0_3
LBB0_1:
	movq	_MBEDTLS_ERR_ECP_BAD_INPUT_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_3:
	movq	%r15, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_ECP_MAX_BYTES,4,2      ## @MBEDTLS_ECP_MAX_BYTES
	.comm	_MBEDTLS_ERR_ECP_BAD_INPUT_DATA,4,2 ## @MBEDTLS_ERR_ECP_BAD_INPUT_DATA
	.comm	_mbedtls_hmac_drbg_random,4,2   ## @mbedtls_hmac_drbg_random
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ecdsa_sign_det         ; -- Begin function mbedtls_ecdsa_sign_det
	.p2align	2
_mbedtls_ecdsa_sign_det:                ; @mbedtls_ecdsa_sign_det
	.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	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x23, x2
	mov	x22, x1
	mov	x24, 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, _MBEDTLS_ECP_MAX_BYTES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_ECP_MAX_BYTES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	w8, w8, #1
	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, #0x1fffffff0
	sub	x25, x9, x8
	mov	sp, x25
	ldr	w27, [x0]
	mov	x0, x6
	bl	_mbedtls_md_info_from_type
	cbz	x0, LBB0_2
; %bb.1:
	mov	x26, x0
	add	w8, w27, #7
	add	w9, w27, #14
	cmp	w8, #0
	csel	w8, w9, w8, lt
	stur	x23, [x29, #-104]               ; 8-byte Folded Spill
	mov	x23, x22
	asr	w22, w8, #3
	sbfx	x27, x8, #3, #29
	sub	x0, x29, #96
	bl	_mbedtls_mpi_init
	sub	x0, x29, #92
	bl	_mbedtls_hmac_drbg_init
	mov	x0, x21
	mov	x1, x25
	mov	x2, x27
	bl	_mbedtls_mpi_write_binary
	bl	_MBEDTLS_MPI_CHK
	sub	x1, x29, #96
	mov	x0, x24
	mov	x2, x20
	mov	x3, x19
	bl	_derive_mpi
	bl	_MBEDTLS_MPI_CHK
	add	x1, x25, x27
	sub	x0, x29, #96
	mov	x2, x27
	bl	_mbedtls_mpi_write_binary
	bl	_MBEDTLS_MPI_CHK
	lsl	w3, w22, #1
	sub	x0, x29, #92
	mov	x1, x26
	mov	x2, x25
	bl	_mbedtls_hmac_drbg_seed_buf
Lloh8:
	adrp	x8, _mbedtls_hmac_drbg_random@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mbedtls_hmac_drbg_random@GOTPAGEOFF]
Lloh10:
	ldr	w6, [x8]
	sub	x7, x29, #92
	mov	x0, x24
	mov	x1, x23
	ldur	x2, [x29, #-104]                ; 8-byte Folded Reload
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	bl	_mbedtls_ecdsa_sign
	mov	x19, x0
	sub	x0, x29, #92
	bl	_mbedtls_hmac_drbg_free
	sub	x0, x29, #96
	bl	_mbedtls_mpi_free
	b	LBB0_3
LBB0_2:
Lloh11:
	adrp	x8, _MBEDTLS_ERR_ECP_BAD_INPUT_DATA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MBEDTLS_ERR_ECP_BAD_INPUT_DATA@GOTPAGEOFF]
Lloh13:
	ldr	w19, [x8]
LBB0_3:
	mov	sp, x28
	ldur	x8, [x29, #-88]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x19
	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_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_ECP_MAX_BYTES,4,2      ; @MBEDTLS_ECP_MAX_BYTES
	.comm	_MBEDTLS_ERR_ECP_BAD_INPUT_DATA,4,2 ; @MBEDTLS_ERR_ECP_BAD_INPUT_DATA
	.comm	_mbedtls_hmac_drbg_random,4,2   ; @mbedtls_hmac_drbg_random
.subsections_via_symbols
