	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rdssl_mod_exp                  ## -- Begin function rdssl_mod_exp
	.p2align	4, 0x90
_rdssl_mod_exp:                         ## @rdssl_mod_exp
	.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
	xorl	%eax, %eax
	testl	%esi, %esi
	je	LBB0_17
## %bb.1:
	movl	%ecx, %r15d
	cmpl	%esi, %ecx
	jg	LBB0_17
## %bb.2:
	testl	%r15d, %r15d
	je	LBB0_17
## %bb.3:
	testl	%r9d, %r9d
	je	LBB0_17
## %bb.4:
	movl	24(%rbp), %ecx
	testl	%ecx, %ecx
	je	LBB0_17
## %bb.5:
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	cmpl	%esi, %r9d
	movl	%esi, -76(%rbp)                 ## 4-byte Spill
	movl	%esi, %r12d
	cmovgl	%r9d, %r12d
	cmpl	%ecx, %r12d
	cmovlel	%ecx, %r12d
	movl	%r12d, %edi
	movl	$1, %esi
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	callq	_g_malloc
	movq	%rax, %rbx
	movl	%r12d, %edi
	movl	$1, %esi
	callq	_g_malloc
	movq	%rax, %r14
	movl	%r12d, %edi
	movl	$1, %esi
	callq	_g_malloc
	movq	%rax, %r13
	movl	%r12d, %edi
	movl	$1, %esi
	callq	_g_malloc
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	movq	%rax, %r15
	callq	_memcpy
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_memcpy
	movq	%r15, %rdi
	movq	16(%rbp), %rsi
	movl	24(%rbp), %edx
	callq	_memcpy
	leal	3(%r12), %r14d
	testl	%r12d, %r12d
	cmovnsl	%r12d, %r14d
	sarl	$2, %r14d
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_mpSizeof
	movl	%eax, %r13d
	movq	_HIBITMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	jle	LBB0_6
## %bb.7:
	leal	-1(%r13), %ecx
	movl	(%r15,%rcx,4), %ecx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	testl	%eax, %ecx
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, %r12d
	shrl	%r12d
	cmpl	$1, %eax
	movl	%r12d, %eax
	ja	LBB0_8
	jmp	LBB0_11
LBB0_6:
	movl	%eax, %r12d
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_9:
	movl	%eax, %r12d
LBB0_11:
	movl	%r12d, %edi
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_mpNEXTBITMASK
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_mpSetEqual
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	je	LBB0_16
## %bb.12:
	movl	%r14d, -72(%rbp)                ## 4-byte Spill
	movl	%eax, %r15d
	decl	%r15d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	-72(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	%r12d, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_mpNEXTBITMASK
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	movl	%r13d, %r8d
	callq	_mpModMult
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	testl	%r12d, (%rax,%r15,4)
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %rcx
	movl	%r13d, %r8d
	callq	_mpModMult
	jmp	LBB0_15
LBB0_16:
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	-76(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edx
	callq	_memcpy
	movq	%rbx, %rdi
	callq	_g_free
	movq	%r15, %rdi
	callq	_g_free
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_g_free
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_g_free
	movl	%r14d, %eax
LBB0_17:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HIBITMASK,4,2                  ## @HIBITMASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rdssl_mod_exp                  ; -- Begin function rdssl_mod_exp
	.p2align	2
_rdssl_mod_exp:                         ; @rdssl_mod_exp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x8, x0
	mov	w0, #0
	cbz	w1, LBB0_16
; %bb.1:
	mov	x24, x3
	mov	x19, x1
	cmp	w3, w1
	b.gt	LBB0_16
; %bb.2:
	cbz	w24, LBB0_16
; %bb.3:
	mov	x27, x5
	cbz	w5, LBB0_16
; %bb.4:
	mov	x25, x7
	cbz	w7, LBB0_16
; %bb.5:
	mov	x26, x2
	stp	x8, x4, [sp, #8]                ; 16-byte Folded Spill
	cmp	w27, w19
	csel	w8, w27, w19, gt
	cmp	w8, w25
	csel	w28, w8, w25, gt
	mov	x0, x28
	mov	w1, #1
	str	x6, [sp, #24]                   ; 8-byte Folded Spill
	bl	_g_malloc
	mov	x20, x0
	mov	x0, x28
	mov	w1, #1
	bl	_g_malloc
	mov	x21, x0
	mov	x0, x28
	mov	w1, #1
	bl	_g_malloc
	mov	x22, x0
	mov	x0, x28
	mov	w1, #1
	bl	_g_malloc
	mov	x23, x0
	mov	x0, x21
	mov	x1, x26
	mov	x2, x24
	bl	_memcpy
	mov	x0, x22
	ldr	x1, [sp, #16]                   ; 8-byte Folded Reload
	mov	x2, x27
	bl	_memcpy
	mov	x0, x23
	ldr	x1, [sp, #24]                   ; 8-byte Folded Reload
	mov	x2, x25
	bl	_memcpy
	add	w8, w28, #3
	cmp	w28, #0
	csel	w8, w8, w28, lt
	asr	w25, w8, #2
	mov	x0, x23
	mov	x1, x25
	bl	_mpSizeof
	mov	x26, x0
Lloh0:
	adrp	x8, _HIBITMASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HIBITMASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.6:
	sub	w9, w26, #1
	ldr	w9, [x23, w9, uxtw #2]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	tst	w9, w8
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	lsr	w27, w8, #1
	cmp	w8, #1
	mov	x8, x27
	b.hi	LBB0_7
	b	LBB0_10
LBB0_9:
	mov	x27, x8
LBB0_10:
	mov	x0, x27
	mov	x1, x26
	bl	_mpNEXTBITMASK
	mov	x0, x20
	mov	x1, x21
	mov	x2, x25
	bl	_mpSetEqual
	cbz	w26, LBB0_15
; %bb.11:
	sub	w19, w26, #1
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x27
	mov	x1, x26
	bl	_mpNEXTBITMASK
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x20
	mov	x2, x20
	mov	x3, x22
	mov	x4, x25
	bl	_mpModMult
	ldr	w8, [x23, x19, lsl #2]
	tst	w8, w27
	b.eq	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x20
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	mov	x4, x25
	bl	_mpModMult
	b	LBB0_12
LBB0_15:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x1, x20
	mov	x2, x19
	bl	_memcpy
	mov	x0, x20
	bl	_g_free
	mov	x0, x21
	bl	_g_free
	mov	x0, x22
	bl	_g_free
	mov	x0, x23
	bl	_g_free
	mov	x0, x19
LBB0_16:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HIBITMASK,4,2                  ; @HIBITMASK
.subsections_via_symbols
