	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function bn_from_montgomery_word
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
LCPI0_1:
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	4                               ## 0x4
LCPI0_2:
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
LCPI0_3:
	.long	12                              ## 0xc
	.long	12                              ## 0xc
	.long	12                              ## 0xc
	.long	12                              ## 0xc
LCPI0_4:
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_bn_from_montgomery_word:               ## @bn_from_montgomery_word
	.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	%rdi, %rbx
	movslq	8(%rdx), %r12
	testq	%r12, %r12
	je	LBB0_1
## %bb.2:
	movq	%rdx, %r13
	movq	%rsi, %r15
	leal	(%r12,%r12), %esi
	movq	%r15, %rdi
	movl	%esi, %r14d
	callq	_bn_wexpand
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	24(%r13), %eax
	xorl	%eax, 16(%r15)
	movl	%r12d, %r9d
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	16(%r13), %r10
	movq	8(%r15), %r13
	testl	%r12d, %r12d
	jle	LBB0_16
## %bb.5:
	movl	(%r15), %eax
	cmpl	$2, %r14d
	movl	$1, %ecx
	cmovgel	%r14d, %ecx
	cmpl	$8, %ecx
	jae	LBB0_7
## %bb.6:
	xorl	%edx, %edx
	jmp	LBB0_14
LBB0_1:
	movl	$0, (%rbx)
	movl	$1, %r9d
	jmp	LBB0_34
LBB0_3:
	xorl	%r9d, %r9d
	jmp	LBB0_34
LBB0_7:
	movl	%ecx, %edx
	andl	$2147483640, %edx               ## imm = 0x7FFFFFF8
	movd	%eax, %xmm0
	pshufd	$0, %xmm0, %xmm1                ## xmm1 = xmm0[0,0,0,0]
	leaq	-8(%rdx), %rsi
	movq	%rsi, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.9:
	movq	%r8, %rdi
	andq	$-2, %rdi
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,1,2,3]
	xorl	%esi, %esi
	movdqa	LCPI0_1(%rip), %xmm8            ## xmm8 = [4,4,4,4]
	movdqa	LCPI0_2(%rip), %xmm9            ## xmm9 = [8,8,8,8]
	movdqa	LCPI0_3(%rip), %xmm10           ## xmm10 = [12,12,12,12]
	movdqa	LCPI0_4(%rip), %xmm11           ## xmm11 = [16,16,16,16]
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm0, %xmm6
	psubd	%xmm1, %xmm6
	movdqa	%xmm6, %xmm7
	paddd	%xmm8, %xmm7
	movdqa	%xmm6, %xmm2
	psrad	$31, %xmm2
	movdqu	(%r13,%rsi,4), %xmm3
	pand	%xmm2, %xmm3
	movdqu	16(%r13,%rsi,4), %xmm2
	movdqu	32(%r13,%rsi,4), %xmm4
	movdqu	48(%r13,%rsi,4), %xmm5
	psrad	$31, %xmm7
	pand	%xmm2, %xmm7
	movdqu	%xmm3, (%r13,%rsi,4)
	movdqu	%xmm7, 16(%r13,%rsi,4)
	movdqa	%xmm6, %xmm2
	paddd	%xmm9, %xmm2
	paddd	%xmm10, %xmm6
	psrad	$31, %xmm2
	pand	%xmm4, %xmm2
	psrad	$31, %xmm6
	pand	%xmm5, %xmm6
	movdqu	%xmm2, 32(%r13,%rsi,4)
	movdqu	%xmm6, 48(%r13,%rsi,4)
	addq	$16, %rsi
	paddd	%xmm11, %xmm0
	addq	$-2, %rdi
	jne	LBB0_10
## %bb.11:
	testb	$1, %r8b
	je	LBB0_13
LBB0_12:
	psubd	%xmm1, %xmm0
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = [4,4,4,4]
	paddd	%xmm0, %xmm1
	movdqu	(%r13,%rsi,4), %xmm2
	movdqu	16(%r13,%rsi,4), %xmm3
	psrad	$31, %xmm0
	pand	%xmm2, %xmm0
	psrad	$31, %xmm1
	pand	%xmm3, %xmm1
	movdqu	%xmm0, (%r13,%rsi,4)
	movdqu	%xmm1, 16(%r13,%rsi,4)
LBB0_13:
	cmpq	%rcx, %rdx
	je	LBB0_16
LBB0_14:
	negl	%eax
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	leal	(%rax,%rdx), %esi
	sarl	$31, %esi
	andl	%esi, (%r13,%rdx,4)
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_15
LBB0_16:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, (%r15)
	movq	_BN_FLG_FIXED_TOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	orl	%eax, 20(%r15)
	movl	$0, %ebx
	testl	%r12d, %r12d
	movq	%r9, %r14
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	jle	LBB0_19
## %bb.17:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%r12d, %r12d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %r15d
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %ecx
	imull	-48(%rbp), %ecx                 ## 4-byte Folded Reload
	movq	_BN_MASK2@GOTPCREL(%rip), %rax
	andl	(%rax), %ecx
	movq	%r13, %rdi
	movq	%r10, %rbx
	movq	%r10, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_bn_mul_add_words
	movq	%rbx, %r10
	addl	%r12d, %eax
	movl	(%r13,%r14,4), %ecx
	addl	%ecx, %eax
	movq	_BN_MASK2@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	xorl	%edx, %edx
	xorl	%ebx, %ebx
	cmpl	%ecx, %eax
	setne	%dl
	setle	%bl
	orl	%r12d, %edx
	andl	%edx, %ebx
	movl	%eax, (%r13,%r14,4)
	addq	$4, %r13
	movl	%ebx, %r12d
	decl	%r15d
	jne	LBB0_18
LBB0_19:
	movq	%r10, %r13
	movq	%r14, %r15
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	_bn_wexpand
	testq	%rax, %rax
	movl	$0, %r9d
	je	LBB0_34
## %bb.20:
	movl	%r12d, (%r14)
	movq	_BN_FLG_FIXED_TOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%r14)
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	16(%rcx), %eax
	movl	%eax, 16(%r14)
	movq	8(%r14), %r14
	movq	8(%rcx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%r12,4), %rsi
	movq	%r14, %rdi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdx
	movl	%r12d, %ecx
	callq	_bn_sub_words
	movl	$1, %r9d
	testl	%r12d, %r12d
	jle	LBB0_34
## %bb.21:
	subl	%eax, %ebx
	movl	%ebx, %eax
	notl	%eax
	cmpl	$8, %r12d
	jae	LBB0_23
## %bb.22:
	xorl	%ecx, %ecx
	movq	%r15, %r8
	movq	-48(%rbp), %r10                 ## 8-byte Reload
	jmp	LBB0_29
LBB0_23:
	movq	%r15, %r8
	leaq	(%r12,%r15), %rcx
	movq	-48(%rbp), %r10                 ## 8-byte Reload
	leaq	(%r10,%rcx,4), %rcx
	cmpq	%rcx, %r14
	jae	LBB0_26
## %bb.24:
	leaq	(%r14,%r8,4), %rcx
	cmpq	%rcx, -56(%rbp)                 ## 8-byte Folded Reload
	jae	LBB0_26
## %bb.25:
	xorl	%ecx, %ecx
	jmp	LBB0_29
LBB0_8:
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,1,2,3]
	xorl	%esi, %esi
	testb	$1, %r8b
	jne	LBB0_12
	jmp	LBB0_13
LBB0_26:
	movl	%r8d, %ecx
	andl	$-8, %ecx
	movd	%ebx, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movd	%eax, %xmm1
	pshufd	$0, %xmm1, %xmm1                ## xmm1 = xmm1[0,0,0,0]
	leaq	(%r10,%r12,4), %rdx
	addq	$16, %rdx
	leaq	(,%r8,4), %rsi
	andq	$-32, %rsi
	xorl	%edi, %edi
	pxor	%xmm2, %xmm2
	.p2align	4, 0x90
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rdx,%rdi), %xmm3
	movdqu	(%rdx,%rdi), %xmm4
	pand	%xmm0, %xmm3
	pand	%xmm0, %xmm4
	movdqu	(%r14,%rdi), %xmm5
	movdqu	16(%r14,%rdi), %xmm6
	pand	%xmm1, %xmm5
	por	%xmm3, %xmm5
	pand	%xmm1, %xmm6
	por	%xmm4, %xmm6
	movdqu	%xmm5, (%r14,%rdi)
	movdqu	%xmm6, 16(%r14,%rdi)
	movdqu	%xmm2, -16(%rdx,%rdi)
	movdqu	%xmm2, (%rdx,%rdi)
	addq	$32, %rdi
	cmpq	%rdi, %rsi
	jne	LBB0_27
## %bb.28:
	cmpq	%r8, %rcx
	je	LBB0_34
LBB0_29:
	movq	%rcx, %rdx
	notq	%rdx
	testb	$1, %r8b
	je	LBB0_31
## %bb.30:
	movq	-56(%rbp), %r11                 ## 8-byte Reload
	movl	(%r11,%rcx,4), %esi
	andl	%ebx, %esi
	movl	(%r14,%rcx,4), %edi
	andl	%eax, %edi
	orl	%esi, %edi
	movl	%edi, (%r14,%rcx,4)
	movl	$0, (%r11,%rcx,4)
	orq	$1, %rcx
LBB0_31:
	addq	%r8, %rdx
	je	LBB0_34
## %bb.32:
	leaq	(%r10,%r12,4), %rdx
	addq	$4, %rdx
	.p2align	4, 0x90
LBB0_33:                                ## =>This Inner Loop Header: Depth=1
	movl	-4(%rdx,%rcx,4), %esi
	andl	%ebx, %esi
	movl	(%r14,%rcx,4), %edi
	andl	%eax, %edi
	orl	%esi, %edi
	movl	%edi, (%r14,%rcx,4)
	movl	$0, -4(%rdx,%rcx,4)
	movl	(%rdx,%rcx,4), %esi
	andl	%ebx, %esi
	movl	4(%r14,%rcx,4), %edi
	andl	%eax, %edi
	orl	%esi, %edi
	movl	%edi, 4(%r14,%rcx,4)
	movl	$0, (%rdx,%rcx,4)
	addq	$2, %rcx
	cmpq	%rcx, %r8
	jne	LBB0_33
LBB0_34:
	movl	%r9d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BN_FLG_FIXED_TOP,4,2           ## @BN_FLG_FIXED_TOP
	.comm	_BN_MASK2,4,2                   ## @BN_MASK2
	.no_dead_strip	_bn_from_montgomery_word
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function bn_from_montgomery_word
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_bn_from_montgomery_word:               ; @bn_from_montgomery_word
	.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
	mov	x20, x0
	ldr	w19, [x2, #8]
	cbz	w19, LBB0_5
; %bb.1:
	mov	x24, x2
	mov	x21, x1
	lsl	w25, w19, #1
	mov	x0, x1
	mov	x1, x25
	bl	_bn_wexpand
	cbz	x0, LBB0_24
; %bb.2:
	ldr	w8, [x24, #24]
	ldr	w9, [x21, #16]
	eor	w8, w9, w8
	str	w8, [x21, #16]
	ldr	x22, [x24, #16]
	ldr	x23, [x21, #8]
	cmp	w19, #1
	b.lt	LBB0_11
; %bb.3:
	ldr	w9, [x21]
	cmp	w25, #1
	csinc	w8, w25, wzr, gt
	cmp	w8, #16
	b.hs	LBB0_6
; %bb.4:
	mov	x10, #0
	b	LBB0_9
LBB0_5:
	str	wzr, [x20]
	b	LBB0_23
LBB0_6:
	and	x10, x8, #0x7ffffff0
	dup.4s	v0, w9
Lloh0:
	adrp	x11, lCPI0_0@PAGE
Lloh1:
	ldr	q1, [x11, lCPI0_0@PAGEOFF]
	add	x11, x23, #32
	movi.4s	v2, #4
	movi.4s	v3, #8
	movi.4s	v4, #12
	movi.4s	v5, #16
	mov	x12, x10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	sub.4s	v6, v1, v0
	add.4s	v7, v6, v2
	add.4s	v16, v6, v3
	add.4s	v17, v6, v4
	ldp	q18, q19, [x11, #-32]
	ldp	q20, q21, [x11]
	cmlt.4s	v6, v6, #0
	and.16b	v6, v6, v18
	cmlt.4s	v7, v7, #0
	and.16b	v7, v7, v19
	cmlt.4s	v16, v16, #0
	and.16b	v16, v16, v20
	cmlt.4s	v17, v17, #0
	and.16b	v17, v17, v21
	stp	q6, q7, [x11, #-32]
	stp	q16, q17, [x11], #64
	add.4s	v1, v1, v5
	subs	x12, x12, #16
	b.ne	LBB0_7
; %bb.8:
	cmp	x10, x8
	b.eq	LBB0_11
LBB0_9:
	sub	w9, w10, w9
	add	x11, x23, x10, lsl #2
	sub	x8, x8, x10
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x11]
	and	w10, w10, w9, asr #31
	str	w10, [x11], #4
	add	w9, w9, #1
	subs	x8, x8, #1
	b.ne	LBB0_10
LBB0_11:
Lloh2:
	adrp	x8, _BN_FLG_FIXED_TOP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BN_FLG_FIXED_TOP@GOTPAGEOFF]
	str	w25, [x21]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x21, #20]
	orr	w8, w9, w8
	str	w8, [x21, #20]
	cmp	w19, #1
	b.lt	LBB0_14
; %bb.12:
	mov	w25, #0
	ldr	x8, [x24]
	ldr	w24, [x8]
Lloh5:
	adrp	x27, _BN_MASK2@GOTPAGE
Lloh6:
	ldr	x27, [x27, _BN_MASK2@GOTPAGEOFF]
	lsl	x28, x19, #2
	mov	x26, x19
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	mul	w8, w8, w24
	ldr	w9, [x27]
	and	w3, w8, w9
	mov	x0, x23
	mov	x1, x22
	mov	x2, x19
	bl	_bn_mul_add_words
	ldr	w8, [x23, x28]
	add	w9, w0, w25
	add	w9, w9, w8
	ldr	w10, [x27]
	and	w9, w9, w10
	cmp	w9, w8
	cset	w8, ne
	orr	w8, w25, w8
	cset	w10, le
	and	w25, w8, w10
	str	w9, [x23, x28]
	add	x23, x23, #4
	subs	w26, w26, #1
	b.ne	LBB0_13
	b	LBB0_15
LBB0_14:
	mov	w25, #0
LBB0_15:
	mov	x0, x20
	mov	x1, x19
	bl	_bn_wexpand
	cbz	x0, LBB0_24
; %bb.16:
	mov	x8, x19
	sxtw	x23, w8
	str	w19, [x20]
Lloh7:
	adrp	x8, _BN_FLG_FIXED_TOP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BN_FLG_FIXED_TOP@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [x20, #20]
	orr	w8, w9, w8
	ldr	w9, [x21, #16]
	stp	w9, w8, [x20, #16]
	ldr	x20, [x20, #8]
	ldr	x24, [x21, #8]
	add	x21, x24, x23, lsl #2
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x3, x19
	bl	_bn_sub_words
	cmp	w19, #1
	b.lt	LBB0_23
; %bb.17:
	sub	w8, w25, w0
	mvn	w9, w8
	cmp	w19, #8
	b.lo	LBB0_20
; %bb.18:
	add	x10, x23, x19
	add	x10, x24, x10, lsl #2
	cmp	x20, x10
	b.hs	LBB0_25
; %bb.19:
	add	x10, x20, x19, lsl #2
	cmp	x21, x10
	b.hs	LBB0_25
LBB0_20:
	mov	x10, #0
LBB0_21:
	add	x11, x20, x10, lsl #2
	add	x12, x10, x23
	add	x12, x24, x12, lsl #2
	sub	x10, x19, x10
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x12]
	and	w13, w13, w8
	ldr	w14, [x11]
	and	w14, w14, w9
	orr	w13, w14, w13
	str	w13, [x11], #4
	str	wzr, [x12], #4
	subs	x10, x10, #1
	b.ne	LBB0_22
LBB0_23:
	mov	w0, #1
LBB0_24:
	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_25:
	dup.4s	v0, w8
	dup.4s	v1, w9
	and	x10, x19, #0xfffffff8
	add	x11, x24, x23, lsl #2
	add	x11, x11, #16
	add	x12, x20, #16
	movi.2d	v2, #0000000000000000
	mov	x13, x10
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	ldp	q3, q4, [x11, #-16]
	and.16b	v3, v3, v0
	and.16b	v4, v4, v0
	ldp	q5, q6, [x12, #-16]
	and.16b	v5, v5, v1
	and.16b	v6, v6, v1
	orr.16b	v3, v5, v3
	orr.16b	v4, v6, v4
	stp	q3, q4, [x12, #-16]
	stp	q2, q2, [x11, #-16]
	add	x11, x11, #32
	add	x12, x12, #32
	subs	x13, x13, #8
	b.ne	LBB0_26
; %bb.27:
	cmp	x10, x19
	b.eq	LBB0_23
	b	LBB0_21
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_BN_FLG_FIXED_TOP,4,2           ; @BN_FLG_FIXED_TOP
	.comm	_BN_MASK2,4,2                   ; @BN_MASK2
	.no_dead_strip	_bn_from_montgomery_word
.subsections_via_symbols
