	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_rsa_rsassa_pss_sign    ## -- Begin function mbedtls_rsa_rsassa_pss_sign
	.p2align	4, 0x90
_mbedtls_rsa_rsassa_pss_sign:           ## @mbedtls_rsa_rsassa_pss_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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -56(%rbp)                 ## 4-byte Spill
	movq	%r8, %r14
	movl	%ecx, %r12d
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MBEDTLS_MD_MAX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r13, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rdx
	movq	_MBEDTLS_RSA_PRIVATE@GOTPCREL(%rip), %rax
	movl	%r12d, -80(%rbp)                ## 4-byte Spill
	cmpl	%r12d, (%rax)
	movq	%r15, %r12
	jne	LBB0_3
## %bb.1:
	movq	(%r12), %rax
	movq	_MBEDTLS_RSA_PKCS_V21@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
LBB0_3:
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.4:
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %r15
	movq	_MBEDTLS_MD_NONE@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	je	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	callq	_mbedtls_md_info_from_type
	testq	%rax, %rax
	je	LBB0_2
## %bb.6:
	movq	%rax, %rdi
	callq	_mbedtls_md_get_size
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
LBB0_7:
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	24(%r12), %rdi
	callq	_mbedtls_md_info_from_type
	testq	%rax, %rax
	je	LBB0_2
## %bb.8:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mbedtls_md_get_size
	movl	%eax, %ebx
	leal	(%rbx,%rbx), %eax
	addl	$2, %eax
	cmpq	%rax, %r15
	jae	LBB0_9
LBB0_2:
	movq	_MBEDTLS_ERR_RSA_BAD_INPUT_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	24(%rbp), %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_memset
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%ebx, %ebx
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	*-96(%rbp)                      ## 8-byte Folded Reload
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %r15d
	movq	_MBEDTLS_ERR_RSA_RNG_FAILED@GOTPCREL(%rip), %rax
	addl	(%rax), %r15d
	jmp	LBB0_17
LBB0_11:
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %ebx
	addl	%eax, %ebx
	leaq	16(%r12), %rdi
	movq	%rdi, -112(%rbp)                ## 8-byte Spill
	callq	_mbedtls_mpi_bitlen
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movl	%ebx, %eax
	movq	%r15, -128(%rbp)                ## 8-byte Spill
	subq	%rax, %r15
	movq	24(%rbp), %rax
	leaq	(%r15,%rax), %rdi
	decq	%rdi
	movb	$1, -2(%r15,%rax)
	movq	%rdi, -120(%rbp)                ## 8-byte Spill
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	leaq	-52(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_mbedtls_md_init
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_mbedtls_md_setup
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %r15d
	leaq	-52(%rbp), %rdi
	callq	_mbedtls_md_free
	jmp	LBB0_17
LBB0_13:
	movq	-120(%rbp), %r14                ## 8-byte Reload
	addq	-88(%rbp), %r14                 ## 8-byte Folded Reload
	movl	-76(%rbp), %r15d                ## 4-byte Reload
	decl	%r15d
	leaq	-52(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_mbedtls_md_starts
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$8, %edx
	callq	_mbedtls_md_update
	movq	%rbx, %rdi
	movq	16(%rbp), %rsi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	callq	_mbedtls_md_update
	movq	%rbx, %rdi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_mbedtls_md_update
	leaq	-52(%rbp), %rdi
	movq	%r14, %rsi
	callq	_mbedtls_md_finish
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_mbedtls_zeroize
	xorl	%eax, %eax
	testb	$7, %r15b
	sete	%al
	movq	24(%rbp), %rbx
	leaq	(%rbx,%rax), %rdi
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rsi
	notq	%rsi
	movq	-128(%rbp), %rbx                ## 8-byte Reload
	addq	%rbx, %rsi
	subq	%rax, %rsi
	movq	%r14, %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	leaq	-52(%rbp), %r15
	movq	%r15, %r8
	callq	_mgf_mask
	movq	%r15, %rdi
	callq	_mbedtls_md_free
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	callq	_mbedtls_mpi_bitlen
	movq	24(%rbp), %r8
	leal	1(,%rbx,8), %ecx
	subl	%eax, %ecx
	movl	$255, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %eax
	andb	%al, (%r8)
	movb	$-68, (%r13,%r14)
	movq	_MBEDTLS_RSA_PUBLIC@GOTPCREL(%rip), %rax
	movl	-80(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	jne	LBB0_15
## %bb.14:
	movq	%r12, %rdi
	movq	%r8, %rsi
	movq	%r8, %rdx
	callq	_mbedtls_rsa_public
	jmp	LBB0_16
LBB0_15:
	movq	%r12, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	movq	%r8, %rcx
	callq	_mbedtls_rsa_private
LBB0_16:
	movl	%eax, %r15d
	jmp	LBB0_17
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_MD_MAX_SIZE,4,2        ## @MBEDTLS_MD_MAX_SIZE
	.comm	_MBEDTLS_RSA_PRIVATE,4,2        ## @MBEDTLS_RSA_PRIVATE
	.comm	_MBEDTLS_RSA_PKCS_V21,8,3       ## @MBEDTLS_RSA_PKCS_V21
	.comm	_MBEDTLS_ERR_RSA_BAD_INPUT_DATA,4,2 ## @MBEDTLS_ERR_RSA_BAD_INPUT_DATA
	.comm	_MBEDTLS_MD_NONE,8,3            ## @MBEDTLS_MD_NONE
	.comm	_MBEDTLS_ERR_RSA_RNG_FAILED,4,2 ## @MBEDTLS_ERR_RSA_RNG_FAILED
	.comm	_MBEDTLS_RSA_PUBLIC,4,2         ## @MBEDTLS_RSA_PUBLIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_rsa_rsassa_pss_sign    ; -- Begin function mbedtls_rsa_rsassa_pss_sign
	.p2align	2
_mbedtls_rsa_rsassa_pss_sign:           ; @mbedtls_rsa_rsassa_pss_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, #64
	mov	x24, x7
	mov	x26, x6
	mov	x28, x5
	mov	x23, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
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_MD_MAX_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_MD_MAX_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w25, [x8]
	mov	x9, x25
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x25, #15
	and	x9, x9, #0x1fffffff0
	sub	x27, x8, x9
	mov	sp, x27
Lloh8:
	adrp	x8, _MBEDTLS_RSA_PRIVATE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MBEDTLS_RSA_PRIVATE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, w3
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x21]
Lloh11:
	adrp	x9, _MBEDTLS_RSA_PKCS_V21@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MBEDTLS_RSA_PKCS_V21@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
LBB0_2:
	cbz	x22, LBB0_8
; %bb.3:
	ldr	x19, [x21, #8]
Lloh14:
	adrp	x8, _MBEDTLS_MD_NONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MBEDTLS_MD_NONE@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x8, x4
	b.eq	LBB0_6
; %bb.4:
	mov	x0, x4
	bl	_mbedtls_md_info_from_type
	cbz	x0, LBB0_8
; %bb.5:
	bl	_mbedtls_md_get_size
	mov	x28, x0
LBB0_6:
	stur	x26, [x29, #-104]               ; 8-byte Folded Spill
	mov	x26, x24
	ldr	x0, [x21, #24]
	bl	_mbedtls_md_info_from_type
	cbz	x0, LBB0_8
; %bb.7:
	mov	x24, x0
	stur	x20, [x29, #-112]               ; 8-byte Folded Spill
	bl	_mbedtls_md_get_size
	stur	w0, [x29, #-96]                 ; 4-byte Folded Spill
	lsl	w20, w0, #1
	add	w8, w20, #2
	cmp	x19, x8
	b.hs	LBB0_11
LBB0_8:
Lloh17:
	adrp	x8, _MBEDTLS_ERR_RSA_BAD_INPUT_DATA@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MBEDTLS_ERR_RSA_BAD_INPUT_DATA@GOTPAGEOFF]
Lloh19:
	ldr	w24, [x8]
LBB0_9:
	ldur	x8, [x29, #-88]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.10:
	mov	x0, x24
	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_11:
	mov	x0, x26
	mov	w1, #0
	stur	x19, [x29, #-120]               ; 8-byte Folded Spill
	mov	x2, x19
	bl	_memset
	ldur	w8, [x29, #-96]                 ; 4-byte Folded Reload
	mov	w19, w8
	ldur	x0, [x29, #-112]                ; 8-byte Folded Reload
	mov	x1, x27
	mov	x2, x19
	blr	x22
	cbz	w0, LBB0_13
; %bb.12:
Lloh23:
	adrp	x8, _MBEDTLS_ERR_RSA_RNG_FAILED@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MBEDTLS_ERR_RSA_RNG_FAILED@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	add	w24, w8, w0
	b	LBB0_9
LBB0_13:
	add	x0, x21, #16
	stur	x0, [x29, #-128]                ; 8-byte Folded Spill
	bl	_mbedtls_mpi_bitlen
	stur	w0, [x29, #-132]                ; 4-byte Folded Spill
	ldur	x8, [x29, #-120]                ; 8-byte Folded Reload
	sub	x8, x8, w20, uxtw
	add	x8, x8, x26
	sub	x20, x8, #1
	mov	w9, #1
	sturb	w9, [x8, #-2]
	mov	x0, x20
	mov	x1, x27
	ldur	w2, [x29, #-96]                 ; 4-byte Folded Reload
	bl	_memcpy
	sub	x0, x29, #92
	bl	_mbedtls_md_init
	sub	x0, x29, #92
	mov	x1, x24
	mov	w2, #0
	bl	_mbedtls_md_setup
	cbz	w0, LBB0_15
; %bb.14:
	mov	x24, x0
	sub	x0, x29, #92
	bl	_mbedtls_md_free
	b	LBB0_9
LBB0_15:
	add	x20, x20, x19
	ldur	w8, [x29, #-132]                ; 4-byte Folded Reload
	sub	w8, w8, #1
	stur	w8, [x29, #-132]                ; 4-byte Folded Spill
	sub	x0, x29, #92
	bl	_mbedtls_md_starts
	sub	x0, x29, #92
	mov	x1, x20
	mov	w2, #8
	bl	_mbedtls_md_update
	sub	x0, x29, #92
	ldur	x1, [x29, #-104]                ; 8-byte Folded Reload
	mov	x2, x28
	bl	_mbedtls_md_update
	sub	x0, x29, #92
	mov	x1, x27
	ldur	w24, [x29, #-96]                ; 4-byte Folded Reload
	mov	x2, x24
	bl	_mbedtls_md_update
	sub	x0, x29, #92
	mov	x28, x20
	mov	x1, x20
	bl	_mbedtls_md_finish
	mov	x0, x27
	mov	x1, x25
	bl	_mbedtls_zeroize
	ldur	w8, [x29, #-132]                ; 4-byte Folded Reload
	tst	w8, #0x7
	cset	w8, eq
	cinc	x0, x26, eq
	mvn	x9, x19
	ldur	x20, [x29, #-120]               ; 8-byte Folded Reload
	add	x9, x20, x9
	sub	x1, x9, x8
	sub	x4, x29, #92
	mov	x2, x28
	mov	x3, x24
	bl	_mgf_mask
	sub	x0, x29, #92
	bl	_mbedtls_md_free
	ldur	x0, [x29, #-128]                ; 8-byte Folded Reload
	bl	_mbedtls_mpi_bitlen
	mov	w8, #1
	bfi	w8, w20, #3, #29
	sub	w8, w8, w0
	mov	w9, #255
	lsr	w8, w9, w8
	ldrb	w9, [x26]
	and	w8, w9, w8
	strb	w8, [x26]
	mov	w8, #188
	strb	w8, [x28, x19]
Lloh26:
	adrp	x8, _MBEDTLS_RSA_PUBLIC@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MBEDTLS_RSA_PUBLIC@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	mov	x0, x21
	cmp	w8, w23
	b.ne	LBB0_17
; %bb.16:
	mov	x1, x26
	mov	x2, x26
	bl	_mbedtls_rsa_public
	b	LBB0_18
LBB0_17:
	mov	x1, x22
	ldur	x2, [x29, #-112]                ; 8-byte Folded Reload
	mov	x3, x26
	mov	x4, x26
	bl	_mbedtls_rsa_private
LBB0_18:
	mov	x24, x0
	b	LBB0_9
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_MD_MAX_SIZE,4,2        ; @MBEDTLS_MD_MAX_SIZE
	.comm	_MBEDTLS_RSA_PRIVATE,4,2        ; @MBEDTLS_RSA_PRIVATE
	.comm	_MBEDTLS_RSA_PKCS_V21,8,3       ; @MBEDTLS_RSA_PKCS_V21
	.comm	_MBEDTLS_ERR_RSA_BAD_INPUT_DATA,4,2 ; @MBEDTLS_ERR_RSA_BAD_INPUT_DATA
	.comm	_MBEDTLS_MD_NONE,8,3            ; @MBEDTLS_MD_NONE
	.comm	_MBEDTLS_ERR_RSA_RNG_FAILED,4,2 ; @MBEDTLS_ERR_RSA_RNG_FAILED
	.comm	_MBEDTLS_RSA_PUBLIC,4,2         ; @MBEDTLS_RSA_PUBLIC
.subsections_via_symbols
