	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_mpi_safe_cond_assign   ## -- Begin function mbedtls_mpi_safe_cond_assign
	.p2align	4, 0x90
_mbedtls_mpi_safe_cond_assign:          ## @mbedtls_mpi_safe_cond_assign
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rsi), %rsi
	callq	_mbedtls_mpi_grow
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	leaq	8(%r14), %rax
	leaq	8(%r15), %rcx
	testl	%r12d, %r12d
	cmoveq	%rax, %rcx
	movl	(%rcx), %eax
	movl	%eax, 8(%r14)
	movq	(%r15), %rbx
	testq	%rbx, %rbx
	je	LBB0_16
## %bb.1:
	movq	16(%r14), %rcx
	movq	16(%r15), %r15
	cmpq	$8, %rbx
	jb	LBB0_2
## %bb.3:
	leaq	(%r15,%rbx,4), %rax
	cmpq	%rax, %rcx
	jae	LBB0_6
## %bb.4:
	leaq	(%rcx,%rbx,4), %rax
	cmpq	%rax, %r15
	jae	LBB0_6
LBB0_2:
	xorl	%esi, %esi
LBB0_12:
	movq	%rsi, %r8
	notq	%r8
	addq	%rbx, %r8
	movq	%rbx, %rax
	andq	$3, %rax
	je	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	testb	%r12b, %r12b
	leaq	(%rcx,%rsi,4), %rdx
	leaq	(%r15,%rsi,4), %rdi
	cmoveq	%rdx, %rdi
	movl	(%rdi), %edx
	movl	%edx, (%rcx,%rsi,4)
	incq	%rsi
	decq	%rax
	jne	LBB0_13
LBB0_14:
	cmpq	$3, %r8
	jb	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	testb	%r12b, %r12b
	leaq	(%rcx,%rsi,4), %rax
	leaq	(%r15,%rsi,4), %rdx
	cmoveq	%rax, %rdx
	movl	(%rdx), %eax
	movl	%eax, (%rcx,%rsi,4)
	leaq	4(%rcx,%rsi,4), %rax
	leaq	4(%r15,%rsi,4), %rdx
	cmoveq	%rax, %rdx
	movl	(%rdx), %eax
	movl	%eax, 4(%rcx,%rsi,4)
	leaq	8(%rcx,%rsi,4), %rax
	leaq	8(%r15,%rsi,4), %rdx
	cmoveq	%rax, %rdx
	movl	(%rdx), %eax
	movl	%eax, 8(%rcx,%rsi,4)
	leaq	12(%rcx,%rsi,4), %rax
	leaq	12(%r15,%rsi,4), %rdx
	cmoveq	%rax, %rdx
	movl	(%rdx), %eax
	movl	%eax, 12(%rcx,%rsi,4)
	addq	$4, %rsi
	cmpq	%rsi, %rbx
	jne	LBB0_15
	jmp	LBB0_16
LBB0_6:
	movq	%rbx, %rsi
	andq	$-8, %rsi
	leaq	-8(%rsi), %rax
	movq	%rax, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rax, %rax
	je	LBB0_38
## %bb.7:
	movq	%r8, %r11
	andq	$-2, %r11
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	testb	%r12b, %r12b
	leaq	(%rcx,%rdi,4), %r9
	leaq	16(%rcx,%rdi,4), %r10
	leaq	(%r15,%rdi,4), %rax
	leaq	16(%r15,%rdi,4), %rdx
	cmoveq	%r9, %rax
	movups	(%rax), %xmm0
	cmoveq	%r10, %rdx
	movups	(%rdx), %xmm1
	movups	%xmm0, (%rcx,%rdi,4)
	movups	%xmm1, 16(%rcx,%rdi,4)
	leaq	32(%rcx,%rdi,4), %r10
	leaq	48(%rcx,%rdi,4), %r9
	leaq	32(%r15,%rdi,4), %rdx
	leaq	48(%r15,%rdi,4), %rax
	cmoveq	%r10, %rdx
	movups	(%rdx), %xmm0
	cmoveq	%r9, %rax
	movups	(%rax), %xmm1
	movups	%xmm0, 32(%rcx,%rdi,4)
	movups	%xmm1, 48(%rcx,%rdi,4)
	addq	$16, %rdi
	addq	$-2, %r11
	jne	LBB0_8
## %bb.9:
	testb	$1, %r8b
	je	LBB0_11
LBB0_10:
	testb	%r12b, %r12b
	leaq	(%rcx,%rdi,4), %r9
	leaq	16(%rcx,%rdi,4), %r8
	leaq	(%r15,%rdi,4), %rdx
	leaq	16(%r15,%rdi,4), %rax
	cmoveq	%r9, %rdx
	cmoveq	%r8, %rax
	movups	(%rdx), %xmm0
	movups	(%rax), %xmm1
	movups	%xmm0, (%rcx,%rdi,4)
	movups	%xmm1, 16(%rcx,%rdi,4)
LBB0_11:
	cmpq	%rsi, %rbx
	jne	LBB0_12
LBB0_16:
	movq	(%r14), %r11
	movq	%r11, %r10
	subq	%rbx, %r10
	jbe	LBB0_33
## %bb.17:
	movq	16(%r14), %rdx
	cmpq	$8, %r10
	jb	LBB0_36
## %bb.18:
	movq	%r10, %r8
	andq	$-8, %r8
	leaq	-8(%r8), %rax
	movq	%rax, %r9
	shrq	$3, %r9
	incq	%r9
	testq	%rax, %rax
	je	LBB0_26
## %bb.19:
	movq	%r9, %rsi
	andq	$-2, %rsi
	leaq	(%rdx,%rbx,4), %rcx
	addq	$48, %rcx
	xorl	%edi, %edi
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_21 Depth=1
	movups	%xmm1, -16(%rcx,%rdi,4)
	movups	%xmm3, (%rcx,%rdi,4)
	addq	$16, %rdi
	addq	$-2, %rsi
	je	LBB0_27
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	testb	%r12b, %r12b
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	xorps	%xmm0, %xmm0
	xorps	%xmm2, %xmm2
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_21 Depth=1
	movups	-48(%rcx,%rdi,4), %xmm0
	movups	-32(%rcx,%rdi,4), %xmm2
LBB0_24:                                ##   in Loop: Header=BB0_21 Depth=1
	movups	-16(%rcx,%rdi,4), %xmm1
	movups	(%rcx,%rdi,4), %xmm3
	movups	%xmm0, -48(%rcx,%rdi,4)
	movups	%xmm2, -32(%rcx,%rdi,4)
	je	LBB0_20
## %bb.25:                              ##   in Loop: Header=BB0_21 Depth=1
	xorps	%xmm1, %xmm1
	xorps	%xmm3, %xmm3
	jmp	LBB0_20
LBB0_26:
	xorl	%edi, %edi
LBB0_27:
	testb	$1, %r9b
	je	LBB0_32
## %bb.28:
	addq	%rbx, %rdi
	testb	%r12b, %r12b
	je	LBB0_30
## %bb.29:
	xorps	%xmm0, %xmm0
	xorps	%xmm1, %xmm1
	jmp	LBB0_31
LBB0_30:
	movups	(%rdx,%rdi,4), %xmm0
	movups	16(%rdx,%rdi,4), %xmm1
LBB0_31:
	movups	%xmm0, (%rdx,%rdi,4)
	movups	%xmm1, 16(%rdx,%rdi,4)
LBB0_32:
	cmpq	%r8, %r10
	jne	LBB0_34
LBB0_33:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_34:
	addq	%r8, %rbx
	jmp	LBB0_36
	.p2align	4, 0x90
LBB0_35:                                ##   in Loop: Header=BB0_36 Depth=1
	movl	%eax, (%rdx,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r11
	je	LBB0_33
LBB0_36:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	testb	%r12b, %r12b
	jne	LBB0_35
## %bb.37:                              ##   in Loop: Header=BB0_36 Depth=1
	movl	(%rdx,%rbx,4), %eax
	jmp	LBB0_35
LBB0_38:
	xorl	%edi, %edi
	testb	$1, %r8b
	jne	LBB0_10
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_mpi_safe_cond_assign   ; -- Begin function mbedtls_mpi_safe_cond_assign
	.p2align	2
_mbedtls_mpi_safe_cond_assign:          ; @mbedtls_mpi_safe_cond_assign
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x1, [x1]
	bl	_mbedtls_mpi_grow
	bl	_MBEDTLS_MPI_CHK
	add	x9, x20, #8
	cmp	w19, #0
	mov	x10, x21
	ldr	x8, [x10], #8
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
	str	w9, [x20, #8]
	cbz	x8, LBB0_9
; %bb.1:
	ldr	x9, [x20, #16]
	ldr	x10, [x21, #16]
	cmp	x8, #16
	b.lo	LBB0_6
; %bb.2:
	lsl	x11, x8, #2
	add	x12, x9, x11
	add	x11, x10, x11
	cmp	x9, x11
	ccmp	x10, x12, #2, lo
	b.lo	LBB0_6
; %bb.3:
	and	x11, x8, #0xfffffffffffffff0
	add	x12, x9, #32
	add	x13, x10, #32
	mov	x14, x11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	x15, x12, #32
	sub	x16, x12, #16
	add	x17, x12, #16
	sub	x0, x13, #32
	sub	x1, x13, #16
	add	x2, x13, #16
	cmp	w19, #0
	csel	x15, x15, x0, eq
	ldr	q0, [x15]
	csel	x15, x16, x1, eq
	ldr	q1, [x15]
	csel	x15, x12, x13, eq
	ldr	q2, [x15]
	csel	x15, x17, x2, eq
	ldr	q3, [x15]
	stp	q0, q1, [x12, #-32]
	stp	q2, q3, [x12], #64
	add	x13, x13, #64
	subs	x14, x14, #16
	b.ne	LBB0_4
; %bb.5:
	cmp	x8, x11
	b.ne	LBB0_7
	b	LBB0_9
LBB0_6:
	mov	x11, #0
LBB0_7:
	sub	x12, x8, x11
	lsl	x11, x11, #2
	add	x10, x10, x11
	add	x9, x9, x11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w19, #0
	csel	x11, x9, x10, eq
	ldr	w11, [x11]
	str	w11, [x9], #4
	add	x10, x10, #4
	subs	x12, x12, #1
	b.ne	LBB0_8
LBB0_9:
	ldr	x9, [x20]
	subs	x11, x9, x8
	b.ls	LBB0_16
; %bb.10:
	ldr	x10, [x20, #16]
	mov	x12, x8
	cmp	x11, #16
	b.lo	LBB0_14
; %bb.11:
	and	x13, x11, #0xfffffffffffffff0
	add	x12, x8, x13
	add	x8, x10, x8, lsl #2
	add	x8, x8, #32
	mov	x14, x13
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	fmov	s0, wzr
	fmov	s1, w19
	cmeq.16b	v0, v1, v0
	dup.16b	v0, v0[0]
	ldp	q2, q1, [x8]
	and.16b	v1, v1, v0
	and.16b	v2, v2, v0
	ldp	q4, q3, [x8, #-32]
	and.16b	v3, v3, v0
	and.16b	v0, v4, v0
	stp	q0, q3, [x8, #-32]
	stp	q2, q1, [x8], #64
	subs	x14, x14, #16
	b.ne	LBB0_12
; %bb.13:
	cmp	x11, x13
	b.eq	LBB0_16
LBB0_14:
	sub	x8, x9, x12
	add	x9, x10, x12, lsl #2
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9]
	cmp	w19, #0
	csel	w10, w10, wzr, eq
	str	w10, [x9], #4
	subs	x8, x8, #1
	b.ne	LBB0_15
LBB0_16:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
