	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RSA_X931_derive_ex             ## -- Begin function RSA_X931_derive_ex
	.p2align	4, 0x90
_RSA_X931_derive_ex:                    ## @RSA_X931_derive_ex
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_25
## %bb.1:
	movq	%r8, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%r9, -112(%rbp)                 ## 8-byte Spill
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_BN_CTX_new
	testq	%rax, %rax
	je	LBB0_27
## %bb.2:
	movq	%rax, %r12
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_BN_CTX_start
	movq	%r12, %rdi
	callq	_BN_CTX_get
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_BN_CTX_get
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_BN_CTX_get
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_BN_CTX_get
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_26
## %bb.3:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	48(%rbx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	56(%rbp), %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_BN_dup
	movq	%rax, 48(%rbx)
	testq	%rax, %rax
	je	LBB0_26
LBB0_5:
	movq	64(%rbp), %rax
	cmpq	$0, 24(%rbp)
	je	LBB0_7
## %bb.6:
	cmpq	$0, 8(%rbx)
	je	LBB0_32
LBB0_7:
	movq	48(%rbp), %r14
	testq	%r14, %r14
	je	LBB0_9
## %bb.8:
	cmpq	$0, 16(%rbx)
	je	LBB0_34
LBB0_9:
	cmpq	$0, 8(%rbx)
	je	LBB0_31
## %bb.10:
	cmpq	$0, 16(%rbx)
	je	LBB0_31
## %bb.11:
	movq	%r13, %r15
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, 56(%rbx)
	testq	%rax, %rax
	je	LBB0_28
## %bb.12:
	movq	8(%rbx), %rsi
	movq	16(%rbx), %rdx
	movq	%rax, %rdi
	movq	%r12, %rcx
	callq	_BN_mul
	testl	%eax, %eax
	je	LBB0_26
## %bb.13:
	movq	8(%rbx), %r14
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_BN_value_one
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_BN_sub
	testl	%eax, %eax
	je	LBB0_28
## %bb.14:
	movq	16(%rbx), %r14
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_BN_value_one
	movq	%r15, %rbx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_BN_sub
	testl	%eax, %eax
	je	LBB0_28
## %bb.15:
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	callq	_BN_mul
	testl	%eax, %eax
	je	LBB0_26
## %bb.16:
	movq	%rbx, %rdx
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r12, %rcx
	callq	_BN_gcd
	testl	%eax, %eax
	je	LBB0_26
## %bb.17:
	movq	%rbx, %rcx
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	movq	%r12, %r8
	callq	_BN_div
	xorl	%r13d, %r13d
	testl	%eax, %eax
	je	LBB0_29
## %bb.18:
	xorl	%eax, %eax
	callq	_BN_CTX_new
	testq	%rax, %rax
	je	LBB0_28
## %bb.19:
	movq	%rax, %rbx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	48(%r14), %rsi
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, %rcx
	callq	_BN_mod_inverse
	movq	%rax, 24(%r14)
	testq	%rax, %rax
	je	LBB0_29
## %bb.20:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, 40(%r14)
	testq	%rax, %rax
	je	LBB0_29
## %bb.21:
	movq	24(%r14), %rsi
	movq	%rax, %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%r12, %rcx
	callq	_BN_mod
	testl	%eax, %eax
	je	LBB0_29
## %bb.22:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, 32(%r14)
	testq	%rax, %rax
	je	LBB0_29
## %bb.23:
	movq	24(%r14), %rsi
	movq	%rax, %rdi
	movq	%r15, %rdx
	movq	%r12, %rcx
	callq	_BN_mod
	testl	%eax, %eax
	je	LBB0_29
## %bb.24:
	movq	8(%r14), %rdx
	movq	16(%r14), %rsi
	xorl	%edi, %edi
	movq	%rbx, %rcx
	callq	_BN_mod_inverse
	movq	%rax, (%r14)
	xorl	%r13d, %r13d
	testq	%rax, %rax
	setne	%r13b
	jmp	LBB0_29
LBB0_25:
	xorl	%r12d, %r12d
LBB0_26:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_29
LBB0_27:
	xorl	%r12d, %r12d
LBB0_28:
	xorl	%ebx, %ebx
LBB0_29:
	movq	%r12, %rdi
	callq	_BN_CTX_end
	movq	%r12, %rdi
	callq	_BN_CTX_free
	movq	%rbx, %rdi
	callq	_BN_CTX_free
LBB0_30:
	movl	%r13d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_31:
	movq	%r12, %rdi
	callq	_BN_CTX_end
	movq	%r12, %rdi
	callq	_BN_CTX_free
	movl	$2, %r13d
	jmp	LBB0_30
LBB0_32:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_28
## %bb.33:
	movq	16(%rbp), %r9
	subq	$8, %rsp
	movq	%rax, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	movq	24(%rbp), %rcx
	movq	-112(%rbp), %r8                 ## 8-byte Reload
	movq	64(%rbp), %rbx
	pushq	%rbx
	pushq	%r12
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	callq	_BN_X931_derive_prime_ex
	addq	$32, %rsp
	testl	%eax, %eax
	movq	%rbx, %rax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_7
	jmp	LBB0_26
LBB0_34:
	movq	%rax, %r15
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_28
## %bb.35:
	movq	40(%rbp), %r9
	movq	32(%rbp), %r8
	subq	$8, %rsp
	movq	%rax, %rdi
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %rcx
	pushq	%r15
	pushq	%r12
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	callq	_BN_X931_derive_prime_ex
	addq	$32, %rsp
	testl	%eax, %eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_9
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RSA_X931_derive_ex             ; -- Begin function RSA_X931_derive_ex
	.p2align	2
_RSA_X931_derive_ex:                    ; @RSA_X931_derive_ex
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x20, x0
	cbz	x0, LBB0_25
; %bb.1:
	mov	x28, x7
	mov	x27, x6
	mov	x21, x5
	mov	x25, x4
	mov	x26, x3
	mov	x23, x2
	mov	x24, x1
	bl	_BN_CTX_new
	mov	x19, x0
	cbz	x0, LBB0_31
; %bb.2:
	mov	x0, x19
	bl	_BN_CTX_start
	mov	x0, x19
	bl	_BN_CTX_get
	str	x0, [sp, #32]                   ; 8-byte Folded Spill
	mov	x0, x19
	bl	_BN_CTX_get
	str	x0, [sp, #40]                   ; 8-byte Folded Spill
	mov	x0, x19
	bl	_BN_CTX_get
	mov	x22, x0
	mov	x0, x19
	bl	_BN_CTX_get
	cbz	x0, LBB0_31
; %bb.3:
	stp	x0, x22, [sp, #16]              ; 16-byte Folded Spill
	ldr	x22, [x20, #48]
	cbnz	x22, LBB0_5
; %bb.4:
	ldr	x22, [x29, #40]
	mov	x0, x22
	bl	_BN_dup
	str	x0, [x20, #48]
	cbz	x0, LBB0_31
LBB0_5:
	ldr	x9, [x29, #48]
	cbz	x28, LBB0_7
; %bb.6:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_27
LBB0_7:
	ldr	x21, [x29, #32]
	cbz	x21, LBB0_9
; %bb.8:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_29
LBB0_9:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_26
; %bb.10:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_26
; %bb.11:
	bl	_BN_new
	str	x0, [x20, #56]
	cbz	x0, LBB0_31
; %bb.12:
	ldp	x1, x2, [x20, #8]
	mov	x3, x19
	bl	_BN_mul
	cbz	w0, LBB0_31
; %bb.13:
	ldr	x21, [x20, #8]
	bl	_BN_value_one
	mov	x2, x0
	ldr	x23, [sp, #40]                  ; 8-byte Folded Reload
	mov	x0, x23
	mov	x1, x21
	bl	_BN_sub
	cbz	w0, LBB0_31
; %bb.14:
	ldr	x21, [x20, #16]
	bl	_BN_value_one
	mov	x2, x0
	ldr	x22, [sp, #24]                  ; 8-byte Folded Reload
	mov	x0, x22
	mov	x1, x21
	bl	_BN_sub
	cbz	w0, LBB0_31
; %bb.15:
	ldr	x21, [sp, #32]                  ; 8-byte Folded Reload
	mov	x0, x21
	mov	x1, x23
	mov	x2, x22
	mov	x3, x19
	bl	_BN_mul
	cbz	w0, LBB0_31
; %bb.16:
	ldr	x24, [sp, #16]                  ; 8-byte Folded Reload
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x19
	bl	_BN_gcd
	cbz	w0, LBB0_31
; %bb.17:
	mov	x0, x21
	mov	x1, #0
	mov	x2, x21
	mov	x3, x24
	mov	x4, x19
	bl	_BN_div
	cbz	w0, LBB0_31
; %bb.18:
	bl	_BN_CTX_new
	mov	x24, x0
	cbz	x0, LBB0_32
; %bb.19:
	ldr	x1, [x20, #48]
	mov	x0, #0
	mov	x2, x21
	mov	x3, x24
	bl	_BN_mod_inverse
	str	x0, [x20, #24]
	cbz	x0, LBB0_32
; %bb.20:
	bl	_BN_new
	str	x0, [x20, #40]
	cbz	x0, LBB0_32
; %bb.21:
	ldr	x1, [x20, #24]
	mov	x2, x23
	mov	x3, x19
	bl	_BN_mod
	cbz	w0, LBB0_32
; %bb.22:
	bl	_BN_new
	str	x0, [x20, #32]
	cbz	x0, LBB0_32
; %bb.23:
	ldr	x1, [x20, #24]
	mov	x2, x22
	mov	x3, x19
	bl	_BN_mod
	cbz	w0, LBB0_32
; %bb.24:
	ldp	x2, x1, [x20, #8]
	mov	x0, #0
	mov	x3, x24
	bl	_BN_mod_inverse
	str	x0, [x20]
	cmp	x0, #0
	cset	w20, ne
	b	LBB0_33
LBB0_25:
	mov	x19, #0
	mov	x24, #0
	b	LBB0_33
LBB0_26:
	mov	x0, x19
	bl	_BN_CTX_end
	mov	x0, x19
	bl	_BN_CTX_free
	mov	w20, #2
	b	LBB0_34
LBB0_27:
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	bl	_BN_new
	str	x0, [x20, #8]
	cbz	x0, LBB0_31
; %bb.28:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x8, [sp]
	mov	x1, x24
	mov	x2, x23
	mov	x3, x28
	mov	x4, x21
	mov	x5, x27
	mov	x6, x22
	mov	x7, x19
	bl	_BN_X931_derive_prime_ex
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	cbnz	w0, LBB0_7
	b	LBB0_31
LBB0_29:
	mov	x23, x9
	bl	_BN_new
	str	x0, [x20, #16]
	cbz	x0, LBB0_31
; %bb.30:
	ldp	x4, x5, [x29, #16]
	str	x23, [sp]
	mov	x1, x26
	mov	x2, x25
	mov	x3, x21
	mov	x6, x22
	mov	x7, x19
	bl	_BN_X931_derive_prime_ex
	cbnz	w0, LBB0_9
LBB0_31:
	mov	x24, #0
LBB0_32:
	mov	w20, #0
LBB0_33:
	mov	x0, x19
	bl	_BN_CTX_end
	mov	x0, x19
	bl	_BN_CTX_free
	mov	x0, x24
	bl	_BN_CTX_free
LBB0_34:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
