	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_br_rsa_i31_compute_modulus     ## -- Begin function br_rsa_i31_compute_modulus
	.p2align	4, 0x90
_br_rsa_i31_compute_modulus:            ## @br_rsa_i31_compute_modulus
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_BR_MAX_RSA_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	addl	$30, %ecx
	movslq	%ecx, %rcx
	imulq	$-2078209981, %rcx, %rcx        ## imm = 0x84210843
	shrq	$32, %rcx
	addl	%ecx, %eax
	addl	$30, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	sarl	$4, %eax
	addl	%ecx, %eax
	leal	(%rax,%rax), %r15d
	addl	$5, %r15d
	leaq	(,%r15,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rdi
	movq	(%r12), %rsi
	movq	8(%r12), %rdx
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.1:
	leaq	(%rsi,%rdx), %rax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	$0, (%rsi)
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rsi
	decq	%rdx
	jne	LBB0_2
## %bb.4:
	movq	%rax, %rsi
LBB0_5:
	xorl	%edx, %edx
LBB0_6:
	movq	16(%r12), %rbx
	movq	24(%r12), %r13
	testq	%r13, %r13
	je	LBB0_11
## %bb.7:
	leaq	(%rbx,%r13), %rax
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	$0, (%rbx)
	jne	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	decq	%r13
	jne	LBB0_8
## %bb.10:
	movq	%rax, %rbx
LBB0_11:
	xorl	%r13d, %r13d
LBB0_12:
	movq	%r15, %rax
	shlq	$5, %rax
	subq	%r15, %rax
	leaq	31(,%rdx,8), %rcx
	cmpq	%rcx, %rax
	jb	LBB0_13
## %bb.14:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_br_i31_decode
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx), %eax
	addl	$63, %eax
	sarl	$5, %eax
	movslq	%eax, %r14
	subq	%r14, %r15
	movq	%r15, %rax
	shlq	$5, %rax
	subq	%r15, %rax
	leaq	31(,%r13,8), %rcx
	cmpq	%rcx, %rax
	jb	LBB0_13
## %bb.16:
	leaq	(%rdx,%r14,4), %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	movq	%rdi, %r13
	callq	_br_i31_decode
	movl	(%r13), %eax
	addl	$63, %eax
	sarl	$5, %eax
	cltq
	subq	%rax, %r15
	leaq	(%r14,%rax), %rcx
	incq	%rcx
	cmpq	%rcx, %r15
	jae	LBB0_18
LBB0_13:
	xorl	%ebx, %ebx
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	movq	%rbx, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movl	32(%r12), %ecx
	addl	$7, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %rbx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	testq	%r14, %r14
	je	LBB0_20
## %bb.19:
	leaq	(,%rax,4), %r12
	addq	%r13, %r12
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_br_i31_zero
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_br_i31_mulacc
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_br_i31_encode
	jmp	LBB0_20
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BR_MAX_RSA_SIZE,4,2            ## @BR_MAX_RSA_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_br_rsa_i31_compute_modulus     ; -- Begin function br_rsa_i31_compute_modulus
	.p2align	2
_br_rsa_i31_compute_modulus:            ; @br_rsa_i31_compute_modulus
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #16
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _BR_MAX_RSA_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BR_MAX_RSA_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w8, w8, #30
	mov	w9, #2115
	movk	w9, #33825, lsl #16
	smull	x9, w8, w9
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #4
	add	w8, w9, w8, lsr #31
	lsl	w8, w8, #1
	add	w24, w8, #5
	lsl	x9, x24, #2
	add	x8, x9, #15
	and	x8, x8, #0x7fffffff0
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x21, x9, x8
	mov	sp, x21
	ldr	x1, [x1]
	ldr	x2, [x20, #8]
	cbz	x2, LBB0_5
; %bb.1:
	add	x8, x1, x2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x1]
	cbnz	w9, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x1, x1, #1
	subs	x2, x2, #1
	b.ne	LBB0_2
; %bb.4:
	mov	x1, x8
LBB0_5:
	ldp	x22, x23, [x20, #16]
	cbz	x23, LBB0_10
; %bb.6:
	add	x8, x22, x23
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x22]
	cbnz	w9, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x22, x22, #1
	subs	x23, x23, #1
	b.ne	LBB0_7
; %bb.9:
	mov	x22, x8
LBB0_10:
	lsl	x8, x24, #5
	lsl	x9, x2, #3
	add	x9, x9, #31
	sub	x8, x8, x24
	cmp	x8, x9
	b.lo	LBB0_13
; %bb.11:
	mov	x0, x21
	bl	_br_i31_decode
	ldr	w8, [x21]
	add	w8, w8, #63
	sbfx	x26, x8, #5, #27
	sub	x25, x24, x26
	lsl	x9, x25, #5
	sub	x9, x9, x25
	lsl	x10, x23, #3
	add	x10, x10, #31
	cmp	x9, x10
	b.lo	LBB0_13
; %bb.12:
	asr	w8, w8, #5
	add	x24, x21, w8, sxtw #2
	mov	x0, x24
	mov	x1, x22
	mov	x2, x23
	bl	_br_i31_decode
	ldr	w8, [x24]
	add	w8, w8, #63
	sbfx	x9, x8, #5, #27
	add	x10, x26, x9
	add	x10, x10, #1
	sub	x9, x25, x9
	cmp	x9, x10
	b.hs	LBB0_16
LBB0_13:
	mov	x20, #0
LBB0_14:
	ldur	x8, [x29, #-72]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.15:
	mov	x0, x20
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_16:
	ldr	w9, [x20, #32]
	add	w9, w9, #7
	sbfx	x20, x9, #3, #29
	cbz	x19, LBB0_14
; %bb.17:
	asr	w8, w8, #5
	add	x22, x24, w8, sxtw #2
	ldr	w1, [x21]
	mov	x0, x22
	bl	_br_i31_zero
	mov	x0, x22
	mov	x1, x21
	mov	x2, x24
	bl	_br_i31_mulacc
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_br_i31_encode
	b	LBB0_14
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BR_MAX_RSA_SIZE,4,2            ; @BR_MAX_RSA_SIZE
.subsections_via_symbols
