	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BN_mod_inverse                 ## -- Begin function BN_mod_inverse
	.p2align	4, 0x90
_BN_mod_inverse:                        ## @BN_mod_inverse
	.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	%rcx, %rbx
	movq	%rdx, %r14
	movq	%rdi, %r15
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_bn_check_top
	movq	%r14, %rdi
	callq	_bn_check_top
	movq	%rbx, %rdi
	callq	_BN_CTX_start
	movq	%rbx, %rdi
	callq	_BN_CTX_get
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_BN_CTX_get
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_BN_CTX_get
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_BN_CTX_get
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_BN_CTX_get
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_BN_CTX_get
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, %r14
	testq	%r15, %r15
	jne	LBB0_5
## %bb.3:
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_4
LBB0_5:
	movq	%r13, %rdi
	callq	_BN_zero
	movq	%r12, %rdi
	callq	_BN_one
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	callq	_BN_copy
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_BN_copy
	testq	%rax, %rax
	je	LBB0_6
## %bb.9:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_BN_is_zero
	testl	%eax, %eax
	movq	%rbx, %rax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_13
## %bb.10:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %r14
LBB0_11:
	movq	%r15, %r12
	callq	_BN_is_one
	testq	%rax, %rax
	je	LBB0_23
## %bb.12:
	movq	%r14, %rsi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%rbx, %r15
	movq	%rbx, %rcx
	callq	_BN_mod
	xorl	%ebx, %ebx
	testl	%eax, %eax
	cmovneq	%r14, %rbx
	jmp	LBB0_24
LBB0_1:
	movq	%r15, %r12
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_6:
	movq	%r15, %r12
LBB0_7:
	xorl	%ebx, %ebx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_24:
	orq	%rbx, %r12
	jne	LBB0_26
## %bb.25:
	movq	%r14, %rdi
	callq	_BN_free
LBB0_26:
	movq	%r15, %rdi
	callq	_BN_CTX_end
	movq	%rbx, %rax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r15, %r12
	xorl	%r14d, %r14d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_13:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movl	$1, %r9d
	movl	$-1, %r8d
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%rax, %rbx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	%r9d, -96(%rbp)                 ## 4-byte Spill
	movq	%r13, %r14
	movq	%rbx, %rcx
	movq	%rsi, %r13
	movl	%r8d, -88(%rbp)                 ## 4-byte Spill
	movq	-120(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movq	%rdx, %rsi
	movq	%r13, %rdx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %r8
	callq	_BN_div
	testl	%eax, %eax
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r14, -112(%rbp)                ## 8-byte Spill
	movq	%r14, %rdx
	movq	%r15, %rcx
	callq	_BN_mul
	testl	%eax, %eax
	je	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r13, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_BN_add
	testl	%eax, %eax
	je	LBB0_15
## %bb.18:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_BN_is_zero
	movl	-96(%rbp), %r8d                 ## 4-byte Reload
	movl	-88(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %r9d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdi, %rsi
	movq	%r12, %rdx
	movq	-112(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %r12
	testl	%eax, %eax
	je	LBB0_14
## %bb.19:
	testl	%ecx, %ecx
	js	LBB0_21
## %bb.20:
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_15:
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_21:
	movq	%r14, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_BN_sub
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	testl	%eax, %eax
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_11
## %bb.22:
	movq	%r15, %r12
LBB0_23:
	movq	%rbx, %r15
	xorl	%ebx, %ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BN_mod_inverse                 ; -- Begin function BN_mod_inverse
	.p2align	2
_BN_mod_inverse:                        ; @BN_mod_inverse
	.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	x19, x3
	mov	x28, x2
	mov	x21, x1
	mov	x20, x0
	mov	x0, x1
	bl	_bn_check_top
	mov	x0, x28
	bl	_bn_check_top
	mov	x0, x19
	bl	_BN_CTX_start
	mov	x0, x19
	bl	_BN_CTX_get
	mov	x27, x0
	mov	x0, x19
	bl	_BN_CTX_get
	mov	x25, x0
	mov	x0, x19
	bl	_BN_CTX_get
	mov	x23, x0
	mov	x0, x19
	bl	_BN_CTX_get
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	mov	x0, x19
	bl	_BN_CTX_get
	mov	x22, x0
	mov	x0, x19
	bl	_BN_CTX_get
	cbz	x0, LBB0_9
; %bb.1:
	mov	x26, x0
	mov	x24, x20
	cbnz	x20, LBB0_3
; %bb.2:
	bl	_BN_new
	mov	x24, x0
	cbz	x0, LBB0_10
LBB0_3:
	mov	x0, x23
	bl	_BN_zero
	mov	x0, x26
	bl	_BN_one
	mov	x0, x27
	mov	x1, x21
	bl	_BN_copy
	cbz	x0, LBB0_10
; %bb.4:
	mov	x0, x25
	mov	x1, x28
	bl	_BN_copy
	cbz	x0, LBB0_10
; %bb.5:
	str	x28, [sp, #16]                  ; 8-byte Folded Spill
	mov	x0, x25
	bl	_BN_is_zero
	cbz	w0, LBB0_13
; %bb.6:
	mov	x28, x27
	mov	x21, x26
LBB0_7:
	mov	x0, x28
	bl	_BN_is_one
	cbz	x0, LBB0_10
; %bb.8:
	mov	x0, x24
	mov	x1, x21
	ldr	x2, [sp, #16]                   ; 8-byte Folded Reload
	mov	x3, x19
	bl	_BN_mod
	cmp	w0, #0
	csel	x21, xzr, x24, eq
	orr	x8, x20, x21
	cbz	x8, LBB0_11
	b	LBB0_12
LBB0_9:
	mov	x24, #0
LBB0_10:
	mov	x21, #0
	orr	x8, x20, x21
	cbnz	x8, LBB0_12
LBB0_11:
	mov	x0, x24
	bl	_BN_free
LBB0_12:
	mov	x0, x19
	bl	_BN_CTX_end
	mov	x0, x21
	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
LBB0_13:
	stp	x24, x20, [sp]                  ; 16-byte Folded Spill
	mov	w24, #1
	mov	w8, #-1
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	mov	x21, x23
	mov	x28, x25
	mov	x23, x27
	mov	x20, x8
	ldr	x25, [sp, #24]                  ; 8-byte Folded Reload
	mov	x0, x25
	mov	x1, x22
	mov	x2, x27
	mov	x3, x28
	mov	x4, x19
	bl	_BN_div
	cbz	w0, LBB0_20
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x23
	mov	x1, x25
	mov	x2, x21
	mov	x3, x19
	bl	_BN_mul
	cbz	w0, LBB0_20
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x23
	mov	x1, x23
	mov	x2, x26
	bl	_BN_add
	cbz	w0, LBB0_20
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x22
	bl	_BN_is_zero
	mov	x8, x24
	mov	x24, x20
	mov	x27, x28
	mov	x25, x22
	mov	x22, x26
	mov	x26, x21
	cbz	w0, LBB0_14
; %bb.18:
	tbnz	w20, #31, LBB0_21
; %bb.19:
	ldp	x24, x20, [sp]                  ; 16-byte Folded Reload
	b	LBB0_7
LBB0_20:
	mov	x21, #0
	ldp	x24, x20, [sp]                  ; 16-byte Folded Reload
	orr	x8, x20, x21
	cbz	x8, LBB0_11
	b	LBB0_12
LBB0_21:
	mov	x0, x21
	ldr	x1, [sp, #16]                   ; 8-byte Folded Reload
	mov	x2, x21
	bl	_BN_sub
	ldp	x24, x20, [sp]                  ; 16-byte Folded Reload
	cbnz	w0, LBB0_7
	b	LBB0_10
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
