	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BN_mod_exp_simple              ## -- Begin function BN_mod_exp_simple
	.p2align	4, 0x90
_BN_mod_exp_simple:                     ## @BN_mod_exp_simple
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_TABLE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	movq	%r12, %rdi
	callq	_BN_num_bits
	testl	%eax, %eax
	je	LBB0_29
## %bb.1:
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_BN_CTX_start
	movq	%r13, %rdi
	callq	_BN_CTX_get
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_30
## %bb.2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_BN_init
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdx
	movq	%r13, %rcx
	callq	_BN_mod
	testl	%eax, %eax
	je	LBB0_31
## %bb.3:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	%r12d, %edi
	callq	_BN_window_bits_for_exponent_size
                                        ## kill: def $eax killed $eax def $rax
	movl	$1, %edx
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	cmpl	$2, %eax
	jl	LBB0_10
## %bb.4:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%r14, %rdx
	movq	%r15, %rcx
	movq	%r13, %r8
	callq	_BN_mod_mul
	testl	%eax, %eax
	je	LBB0_31
## %bb.5:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leal	-1(%rax), %ecx
	movl	$1, %edx
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	cmpl	$2, %eax
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jl	LBB0_10
## %bb.6:
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	%eax, %r12d
	decq	%r12
	movq	%r14, %rbx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %r15
	movq	%rbx, %r13
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_BN_init
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r15, %r13
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%r15, %rcx
	movq	%r13, %r8
	callq	_BN_mod_mul
	testl	%eax, %eax
	je	LBB0_31
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	decq	%r12
	jne	LBB0_7
## %bb.9:
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_10:
	movl	%edx, -108(%rbp)                ## 4-byte Spill
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_BN_one
	testl	%eax, %eax
	je	LBB0_34
## %bb.11:
	decl	%r12d
	movb	$1, %al
	movq	%r12, %rsi
	xorl	%r12d, %r12d
	movq	%r13, -120(%rbp)                ## 8-byte Spill
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
                                        ##     Child Loop BB0_19 Depth 2
                                        ##     Child Loop BB0_24 Depth 2
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_14 Depth=2
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	subl	$1, %esi
	jb	LBB0_28
LBB0_14:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_BN_is_bit_set
	testq	%rax, %rax
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	testb	$1, %r12b
	je	LBB0_13
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	movq	%r13, %r8
	callq	_BN_mod_mul
	testl	%eax, %eax
	jne	LBB0_13
	jmp	LBB0_34
LBB0_17:                                ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$2, -64(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	-1(%rax), %r13d
	xorl	%ebx, %ebx
	movl	$1, %r15d
	movl	$1, %r12d
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testl	%r13d, %r13d
	js	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=2
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movl	%r13d, %esi
	callq	_BN_is_bit_set
	movl	%r15d, %ecx
	subl	%ebx, %ecx
	movl	%r12d, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	orl	$1, %edx
	testq	%rax, %rax
	cmovnel	%r15d, %ebx
	cmovnel	%edx, %r12d
	incl	%r15d
	decl	%r13d
	cmpl	%r15d, -64(%rbp)                ## 4-byte Folded Reload
	jne	LBB0_19
	jmp	LBB0_22
LBB0_21:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	$1, %r12d
	xorl	%ebx, %ebx
LBB0_22:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	sets	%al
	movl	-80(%rbp), %ecx                 ## 4-byte Reload
	orb	%al, %cl
	testb	$1, %cl
	movq	-120(%rbp), %r13                ## 8-byte Reload
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_26
## %bb.23:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leal	1(%rax), %ebx
	.p2align	4, 0x90
LBB0_24:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdi, %rsi
	movq	%rdi, %rdx
	movq	%r15, %rcx
	movq	%r13, %r8
	callq	_BN_mod_mul
	testl	%eax, %eax
	je	LBB0_34
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=2
	decl	%ebx
	jne	LBB0_24
LBB0_26:                                ##   in Loop: Header=BB0_12 Depth=1
	sarl	%r12d
	movslq	%r12d, %rax
	leaq	(%r14,%rax,4), %rdx
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rcx
	movq	%r13, %r8
	callq	_BN_mod_mul
	testl	%eax, %eax
	je	LBB0_34
## %bb.27:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	notl	%ecx
	xorl	%eax, %eax
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	addl	%ecx, %esi
	movb	$1, %r12b
	jns	LBB0_12
LBB0_28:
	movl	$1, %r15d
	jmp	LBB0_35
LBB0_29:
	movq	%r15, %rdi
	callq	_BN_one
	movl	$1, %r15d
	jmp	LBB0_38
LBB0_30:
	movq	%r13, %rdi
	callq	_BN_CTX_end
	xorl	%r15d, %r15d
	jmp	LBB0_38
LBB0_31:
	movq	%r13, %rdi
	callq	_BN_CTX_end
	xorl	%r15d, %r15d
	movl	$1, %eax
	jmp	LBB0_36
LBB0_34:
	xorl	%r15d, %r15d
LBB0_35:
	movq	%r13, %rdi
	callq	_BN_CTX_end
	movl	-108(%rbp), %eax                ## 4-byte Reload
	testl	%eax, %eax
	jle	LBB0_38
LBB0_36:
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_37:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_BN_clear_free
	addq	$4, %r14
	decq	%rbx
	jne	LBB0_37
LBB0_38:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_41
## %bb.39:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_41:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TABLE_SIZE,4,2                 ## @TABLE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BN_mod_exp_simple              ; -- Begin function BN_mod_exp_simple
	.p2align	2
_BN_mod_exp_simple:                     ; @BN_mod_exp_simple
	.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
	sub	sp, sp, #32
	mov	x20, x4
	mov	x21, x3
	mov	x23, x2
	mov	x24, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _TABLE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TABLE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x19, x9, x8
	mov	sp, x19
	mov	x0, x2
	bl	_BN_num_bits
	cbz	w0, LBB0_10
; %bb.1:
	mov	x25, x0
	mov	x0, x20
	bl	_BN_CTX_start
	mov	x0, x20
	bl	_BN_CTX_get
	mov	x26, x0
	cbz	x0, LBB0_11
; %bb.2:
	mov	x0, x19
	bl	_BN_init
	mov	x0, x19
	mov	x1, x24
	mov	x2, x21
	mov	x3, x20
	bl	_BN_mod
	cbz	w0, LBB0_12
; %bb.3:
	mov	x0, x25
	bl	_BN_window_bits_for_exponent_size
	stur	w0, [x29, #-92]                 ; 4-byte Folded Spill
	cmp	w0, #2
	b.lt	LBB0_13
; %bb.4:
	mov	x0, x26
	mov	x1, x19
	mov	x2, x19
	mov	x3, x21
	mov	x4, x20
	bl	_BN_mod_mul
	cbz	w0, LBB0_12
; %bb.5:
	ldur	w8, [x29, #-92]                 ; 4-byte Folded Reload
	sub	w8, w8, #1
	mov	w9, #1
	lsl	w8, w9, w8
	cmp	w8, #2
	b.lt	LBB0_14
; %bb.6:
	stur	x8, [x29, #-104]                ; 8-byte Folded Spill
	sub	x24, x8, #1
	mov	x28, x19
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x27, x28, #4
	mov	x0, x27
	bl	_BN_init
	mov	x0, x27
	mov	x1, x28
	mov	x2, x26
	mov	x3, x21
	mov	x4, x20
	bl	_BN_mod_mul
	cbz	w0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x28, x27
	subs	x24, x24, #1
	b.ne	LBB0_7
; %bb.9:
	ldur	x8, [x29, #-104]                ; 8-byte Folded Reload
	mov	x9, x8
	b	LBB0_14
LBB0_10:
	mov	x0, x22
	bl	_BN_one
	mov	w26, #1
	b	LBB0_37
LBB0_11:
	mov	x0, x20
	bl	_BN_CTX_end
	b	LBB0_37
LBB0_12:
	mov	x0, x20
	bl	_BN_CTX_end
	mov	w26, #0
	mov	w8, #1
	b	LBB0_35
LBB0_13:
	mov	w9, #1
LBB0_14:
	stur	w9, [x29, #-108]                ; 4-byte Folded Spill
	mov	x0, x22
	bl	_BN_one
	mov	w26, #0
	cbz	w0, LBB0_34
; %bb.15:
	sub	w25, w25, #1
	mov	w24, #1
LBB0_16:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_23 Depth 2
                                        ;     Child Loop BB0_28 Depth 2
	mov	x0, x23
	mov	x1, x25
	bl	_BN_is_bit_set
	cbnz	x0, LBB0_21
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	tbz	w26, #0, LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x22
	mov	x1, x22
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	bl	_BN_mod_mul
	cbz	w0, LBB0_32
LBB0_19:                                ;   in Loop: Header=BB0_16 Depth=1
	cbz	w25, LBB0_33
; %bb.20:                               ;   in Loop: Header=BB0_16 Depth=1
	sub	w25, w25, #1
	b	LBB0_16
LBB0_21:                                ;   in Loop: Header=BB0_16 Depth=1
	stur	w24, [x29, #-104]               ; 4-byte Folded Spill
	ldur	w8, [x29, #-92]                 ; 4-byte Folded Reload
	cmp	w8, #2
	b.lt	LBB0_25
; %bb.22:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	w27, #0
	sub	w26, w25, #1
	mov	w24, #1
	mov	w28, #1
LBB0_23:                                ;   Parent Loop BB0_16 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	tbnz	w26, #31, LBB0_26
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=2
	mov	x0, x23
	mov	x1, x26
	bl	_BN_is_bit_set
	sub	w8, w24, w27
	lsl	w8, w28, w8
	orr	w8, w8, #0x1
	cmp	x0, #0
	csel	w27, w27, w24, eq
	csel	w28, w28, w8, eq
	add	w24, w24, #1
	sub	w26, w26, #1
	ldur	w8, [x29, #-92]                 ; 4-byte Folded Reload
	cmp	w8, w24
	b.ne	LBB0_23
	b	LBB0_26
LBB0_25:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	w27, #0
	mov	w28, #1
LBB0_26:                                ;   in Loop: Header=BB0_16 Depth=1
	cmp	w27, #0
	cset	w8, lt
	ldur	w9, [x29, #-104]                ; 4-byte Folded Reload
	orr	w8, w9, w8
	tbnz	w8, #0, LBB0_30
; %bb.27:                               ;   in Loop: Header=BB0_16 Depth=1
	add	w24, w27, #1
LBB0_28:                                ;   Parent Loop BB0_16 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x22
	mov	x1, x22
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	bl	_BN_mod_mul
	cbz	w0, LBB0_32
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=2
	subs	w24, w24, #1
	b.ne	LBB0_28
LBB0_30:                                ;   in Loop: Header=BB0_16 Depth=1
	asr	w8, w28, #1
	add	x2, x19, w8, sxtw #2
	mov	x0, x22
	mov	x1, x22
	mov	x3, x21
	mov	x4, x20
	bl	_BN_mod_mul
	cbz	w0, LBB0_32
; %bb.31:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	w24, #0
	mvn	w8, w27
	mov	w26, #1
	adds	w25, w25, w8
	b.pl	LBB0_16
	b	LBB0_34
LBB0_32:
	mov	w26, #0
	b	LBB0_34
LBB0_33:
	mov	w26, #1
LBB0_34:
	mov	x0, x20
	bl	_BN_CTX_end
	ldur	w8, [x29, #-108]                ; 4-byte Folded Reload
	cmp	w8, #1
	b.lt	LBB0_37
LBB0_35:
	mov	w20, w8
LBB0_36:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_BN_clear_free
	add	x19, x19, #4
	subs	x20, x20, #1
	b.ne	LBB0_36
LBB0_37:
	ldur	x8, [x29, #-88]
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_39
; %bb.38:
	mov	x0, x26
	sub	sp, x29, #80
	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_39:
	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	_TABLE_SIZE,4,2                 ; @TABLE_SIZE
.subsections_via_symbols
