	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_br_i31_modpow                  ## -- Begin function br_i31_modpow
	.p2align	4, 0x90
_br_i31_modpow:                         ## @br_i31_modpow
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movl	%r8d, %r14d
	movq	%rcx, %r12
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movl	(%rcx), %eax
	addl	$63, %eax
	sarl	$5, %eax
	movslq	%eax, %rdx
	shlq	$2, %rdx
	movq	%r9, %rdi
	movq	%r13, %rsi
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	callq	_memcpy
	movq	%r15, %rbx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_br_i31_to_monty
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_br_i31_zero
	movl	$1, 4(%r13)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	(,%rax,8), %eax
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	movq	%r13, %r12
	xorl	%r13d, %r13d
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %eax
	shrl	$3, %eax
	notq	%rax
	addq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movzbl	(%rcx,%rax), %eax
	movl	%r13d, %ecx
	andb	$7, %cl
	movzbl	%cl, %ecx
	movl	%r14d, %ebx
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	xorl	%r15d, %r15d
	btl	%ecx, %eax
	setb	%r15b
	movq	16(%rbp), %rdi
	movq	%r12, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %rcx
	movl	%ebx, %r8d
	callq	_br_i31_montymul
	movl	%r15d, %edi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	16(%rbp), %rdx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	callq	_CCOPY
	movq	16(%rbp), %rdi
	movq	%r15, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	movl	%ebx, %r14d
	movl	%ebx, %r8d
	callq	_br_i31_montymul
	movq	%r15, %rdi
	movq	16(%rbp), %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_memcpy
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	incl	%r13d
	cmpl	%r13d, %eax
	jne	LBB0_2
LBB0_3:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_br_i31_modpow                  ; -- Begin function br_i31_modpow
	.p2align	2
_br_i31_modpow:                         ; @br_i31_modpow
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x6
	mov	x20, x5
	mov	x28, x4
	mov	x22, x3
	mov	x21, x2
	mov	x27, x1
	mov	x25, x0
	ldr	w8, [x3]
	add	w8, w8, #63
	asr	w8, w8, #5
	sbfiz	x26, x8, #2, #32
	mov	x0, x5
	mov	x1, x25
	mov	x2, x26
	bl	_memcpy
	mov	x0, x20
	mov	x1, x22
	bl	_br_i31_to_monty
	ldr	w1, [x22]
	mov	x0, x25
	bl	_br_i31_zero
	mov	w8, #1
	str	w8, [x25, #4]
	lsl	w8, w21, #3
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w24, #0
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w8, w24, #3
	mvn	x8, x8
	add	x8, x8, x21
	ldrb	w8, [x27, x8]
	and	w9, w24, #0x7
	lsr	w8, w8, w9
	mov	x23, x27
	and	w27, w8, #0x1
	mov	x0, x19
	mov	x1, x25
	mov	x2, x20
	mov	x3, x22
	mov	x4, x28
	bl	_br_i31_montymul
	mov	x0, x27
	mov	x27, x23
	mov	x1, x25
	mov	x2, x19
	mov	x3, x26
	bl	_CCOPY
	mov	x0, x19
	mov	x1, x20
	mov	x2, x20
	mov	x3, x22
	mov	x4, x28
	bl	_br_i31_montymul
	mov	x0, x20
	mov	x1, x19
	mov	x2, x26
	bl	_memcpy
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	add	w24, w24, #1
	cmp	w8, w24
	b.ne	LBB0_2
LBB0_3:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
