	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ec_GFp_mont_group_set_curve    ## -- Begin function ec_GFp_mont_group_set_curve
	.p2align	4, 0x90
_ec_GFp_mont_group_set_curve:           ## @ec_GFp_mont_group_set_curve
	.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	$24, %rsp
	.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, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	8(%rdi), %rdi
	callq	_BN_MONT_CTX_free
	movq	$0, 8(%r15)
	movq	(%r15), %rdi
	callq	_BN_free
	movq	$0, (%r15)
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	xorl	%r12d, %r12d
	jmp	LBB0_3
LBB0_2:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_BN_CTX_new
	movq	%rax, %r14
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_14
LBB0_3:
	movq	%r13, %rbx
	xorl	%eax, %eax
	callq	_BN_MONT_CTX_new
	testq	%rax, %rax
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_9
## %bb.4:
	movq	%rax, %r13
	movq	%rax, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_BN_MONT_CTX_set
	testl	%eax, %eax
	je	LBB0_10
## %bb.5:
	xorl	%eax, %eax
	callq	_BN_new
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	movq	%rax, %r12
	xorl	%eax, %eax
	callq	_BN_value_one
	movq	%r12, %rdi
	movl	%eax, %esi
	movq	%r13, %rdx
	movq	%r14, %rcx
	callq	_BN_to_montgomery
	testl	%eax, %eax
	je	LBB0_12
## %bb.7:
	movq	%r13, 8(%r15)
	movq	%r12, (%r15)
	movq	%r15, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rbx, %rcx
	movq	%r14, %r8
	callq	_ec_GFp_simple_group_set_curve
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_16
## %bb.8:
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	movl	%eax, %ebx
	jmp	LBB0_13
LBB0_9:
	xorl	%r13d, %r13d
	jmp	LBB0_11
LBB0_10:
	movq	_EC_F_EC_GFP_MONT_GROUP_SET_CURVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_BN_LIB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ECerr
LBB0_11:
	xorl	%r12d, %r12d
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	movq	%r12, %rdi
	callq	_BN_free
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_CTX_free
	movq	%r13, %rdi
	callq	_BN_MONT_CTX_free
                                        ## kill: def $ebx killed $ebx killed $rbx
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	8(%r15), %rdi
	callq	_BN_MONT_CTX_free
	movq	$0, 8(%r15)
	movq	(%r15), %rdi
	callq	_BN_free
	movq	$0, (%r15)
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_F_EC_GFP_MONT_GROUP_SET_CURVE,4,2 ## @EC_F_EC_GFP_MONT_GROUP_SET_CURVE
	.comm	_ERR_R_BN_LIB,4,2               ## @ERR_R_BN_LIB
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ec_GFp_mont_group_set_curve    ; -- Begin function ec_GFp_mont_group_set_curve
	.p2align	2
_ec_GFp_mont_group_set_curve:           ; @ec_GFp_mont_group_set_curve
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x24, x4
	mov	x22, x3
	mov	x23, x2
	mov	x25, x1
	mov	x21, x0
	ldr	x0, [x0, #8]
	bl	_BN_MONT_CTX_free
	str	xzr, [x21, #8]
	ldr	x0, [x21]
	bl	_BN_free
	mov	x19, #0
	str	xzr, [x21]
	cbnz	x24, LBB0_2
; %bb.1:
	bl	_BN_CTX_new
	mov	x24, x0
	mov	x19, x0
	cbz	x0, LBB0_13
LBB0_2:
	bl	_BN_MONT_CTX_new
	mov	x20, x0
	cbz	x0, LBB0_9
; %bb.3:
	mov	x0, x20
	mov	x1, x25
	mov	x2, x24
	bl	_BN_MONT_CTX_set
	cbz	w0, LBB0_8
; %bb.4:
	bl	_BN_new
	mov	x26, x0
	cbz	x0, LBB0_10
; %bb.5:
	bl	_BN_value_one
	mov	x1, x0
	mov	x0, x26
	mov	x2, x20
	mov	x3, x24
	bl	_BN_to_montgomery
	cbz	w0, LBB0_10
; %bb.6:
	stp	x26, x20, [x21]
	mov	x0, x21
	mov	x1, x25
	mov	x2, x23
	mov	x3, x22
	mov	x4, x24
	bl	_ec_GFp_simple_group_set_curve
	mov	x22, x0
	cbz	w0, LBB0_14
; %bb.7:
	mov	x20, #0
	mov	x26, #0
	b	LBB0_11
LBB0_8:
Lloh0:
	adrp	x8, _EC_F_EC_GFP_MONT_GROUP_SET_CURVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EC_F_EC_GFP_MONT_GROUP_SET_CURVE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _ERR_R_BN_LIB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERR_R_BN_LIB@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_ECerr
LBB0_9:
	mov	x26, #0
LBB0_10:
	mov	w22, #0
LBB0_11:
	mov	x0, x26
	bl	_BN_free
	mov	x0, x19
	bl	_BN_CTX_free
	mov	x0, x20
	bl	_BN_MONT_CTX_free
LBB0_12:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	w22, #0
	b	LBB0_12
LBB0_14:
	ldr	x0, [x21, #8]
	bl	_BN_MONT_CTX_free
	str	xzr, [x21, #8]
	ldr	x0, [x21]
	bl	_BN_free
	mov	x20, #0
	mov	x26, #0
	str	xzr, [x21]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_F_EC_GFP_MONT_GROUP_SET_CURVE,4,2 ; @EC_F_EC_GFP_MONT_GROUP_SET_CURVE
	.comm	_ERR_R_BN_LIB,4,2               ; @ERR_R_BN_LIB
.subsections_via_symbols
