	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BN_mod_exp                     ## -- Begin function BN_mod_exp
	.p2align	4, 0x90
_BN_mod_exp:                            ## @BN_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %r13
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_bn_check_top
	movq	%r12, %rdi
	callq	_bn_check_top
	movq	%r13, %rdi
	callq	_bn_check_top
	movq	%r13, %rdi
	callq	_BN_is_odd
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	cmpl	$1, (%rbx)
	jne	LBB0_7
## %bb.2:
	cmpl	$0, 16(%rbx)
	jne	LBB0_7
## %bb.3:
	movq	_BN_FLG_CONSTTIME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_BN_get_flags
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	movq	_BN_FLG_CONSTTIME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_BN_get_flags
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movq	_BN_FLG_CONSTTIME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_BN_get_flags
	testq	%rax, %rax
	je	LBB0_6
LBB0_7:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	movq	%r14, %r8
	xorl	%r9d, %r9d
	callq	_BN_mod_exp_mont
	jmp	LBB0_9
LBB0_8:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	movq	%r14, %r8
	callq	_BN_mod_exp_recp
LBB0_9:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_bn_check_top
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r12, %rdx
	movq	%r13, %rcx
	movq	%r14, %r8
	xorl	%r9d, %r9d
	callq	_BN_mod_exp_mont_word
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_BN_FLG_CONSTTIME,4,2           ## @BN_FLG_CONSTTIME
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BN_mod_exp                     ; -- Begin function BN_mod_exp
	.p2align	2
_BN_mod_exp:                            ; @BN_mod_exp
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	mov	x0, x1
	bl	_bn_check_top
	mov	x0, x22
	bl	_bn_check_top
	mov	x0, x21
	bl	_bn_check_top
	mov	x0, x21
	bl	_BN_is_odd
	cbz	x0, LBB0_7
; %bb.1:
	ldr	w8, [x23]
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.2:
	ldr	w8, [x23, #16]
	cbnz	w8, LBB0_6
; %bb.3:
Lloh0:
	adrp	x24, _BN_FLG_CONSTTIME@GOTPAGE
Lloh1:
	ldr	x24, [x24, _BN_FLG_CONSTTIME@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x22
	bl	_BN_get_flags
	cbnz	x0, LBB0_6
; %bb.4:
	ldr	w1, [x24]
	mov	x0, x23
	bl	_BN_get_flags
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	w1, [x24]
	mov	x0, x21
	bl	_BN_get_flags
	cbz	x0, LBB0_9
LBB0_6:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, #0
	bl	_BN_mod_exp_mont
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	bl	_BN_mod_exp_recp
LBB0_8:
	mov	x20, x0
	mov	x0, x19
	bl	_bn_check_top
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	x8, [x23, #8]
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, #0
	bl	_BN_mod_exp_mont_word
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_BN_FLG_CONSTTIME,4,2           ; @BN_FLG_CONSTTIME
.subsections_via_symbols
