	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssl_generate_pkey_group        ## -- Begin function ssl_generate_pkey_group
	.p2align	4, 0x90
_ssl_generate_pkey_group:               ## @ssl_generate_pkey_group
	.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	%rdi, %r14
	movq	$0, -48(%rbp)
	movl	%esi, %edi
	callq	_tls1_group_id_lookup
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	_TLS_CURVE_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	(%rbx), %r12d
	movq	_TLS_CURVE_CUSTOM@GOTPCREL(%rip), %r13
	addq	$4, %rbx
	movq	%rbx, %rax
	cmpl	(%r13), %r12d
	je	LBB0_5
## %bb.4:
	movq	_EVP_PKEY_EC@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_EVP_PKEY_CTX_new_id
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_EVP_PKEY_keygen_init
	testq	%rax, %rax
	jle	LBB0_8
## %bb.9:
	cmpl	(%r13), %r12d
	je	LBB0_11
## %bb.10:
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_EVP_PKEY_CTX_set_ec_paramgen_curve_nid
	testq	%rax, %rax
	jle	LBB0_8
LBB0_11:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_EVP_PKEY_keygen
	testq	%rax, %rax
	jg	LBB0_13
## %bb.12:
	movq	_SSL_AD_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SSL_F_SSL_GENERATE_PKEY_GROUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ERR_R_EVP_LIB@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_SSLfatal
	movq	-48(%rbp), %rdi
	callq	_EVP_PKEY_free
	movq	$0, -48(%rbp)
	jmp	LBB0_13
LBB0_1:
	movq	_SSL_AD_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SSL_F_SSL_GENERATE_PKEY_GROUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ERR_R_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	movq	_SSL_AD_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SSL_F_SSL_GENERATE_PKEY_GROUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_SSLfatal
	xorl	%r15d, %r15d
	jmp	LBB0_13
LBB0_8:
	movq	_SSL_AD_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SSL_F_SSL_GENERATE_PKEY_GROUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ERR_R_EVP_LIB@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_SSLfatal
LBB0_13:
	movq	%r15, %rdi
	callq	_EVP_PKEY_CTX_free
	movq	-48(%rbp), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSL_AD_INTERNAL_ERROR,4,2      ## @SSL_AD_INTERNAL_ERROR
	.comm	_SSL_F_SSL_GENERATE_PKEY_GROUP,4,2 ## @SSL_F_SSL_GENERATE_PKEY_GROUP
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ## @ERR_R_INTERNAL_ERROR
	.comm	_TLS_CURVE_TYPE,4,2             ## @TLS_CURVE_TYPE
	.comm	_TLS_CURVE_CUSTOM,4,2           ## @TLS_CURVE_CUSTOM
	.comm	_EVP_PKEY_EC,4,2                ## @EVP_PKEY_EC
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.comm	_ERR_R_EVP_LIB,4,2              ## @ERR_R_EVP_LIB
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssl_generate_pkey_group        ; -- Begin function ssl_generate_pkey_group
	.p2align	2
_ssl_generate_pkey_group:               ; @ssl_generate_pkey_group
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	str	xzr, [sp, #8]
	mov	x0, x1
	bl	_tls1_group_id_lookup
	cbz	x0, LBB0_7
; %bb.1:
	mov	x21, x0
	ldr	w8, [x21], #4
Lloh0:
	adrp	x9, _TLS_CURVE_TYPE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TLS_CURVE_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w22, w9, w8
Lloh3:
	adrp	x23, _TLS_CURVE_CUSTOM@GOTPAGE
Lloh4:
	ldr	x23, [x23, _TLS_CURVE_CUSTOM@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh5:
	adrp	x9, _EVP_PKEY_EC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EVP_PKEY_EC@GOTPAGEOFF]
	cmp	w22, w8
	csel	x8, x21, x9, eq
	ldr	w0, [x8]
	mov	x1, #0
	bl	_EVP_PKEY_CTX_new_id
	mov	x20, x0
	cbz	x0, LBB0_8
; %bb.2:
	mov	x0, x20
	bl	_EVP_PKEY_keygen_init
	cmp	x0, #0
	b.le	LBB0_9
; %bb.3:
	ldr	w8, [x23]
	cmp	w22, w8
	b.eq	LBB0_5
; %bb.4:
	ldr	w1, [x21]
	mov	x0, x20
	bl	_EVP_PKEY_CTX_set_ec_paramgen_curve_nid
	cmp	x0, #0
	b.le	LBB0_9
LBB0_5:
	add	x1, sp, #8
	mov	x0, x20
	bl	_EVP_PKEY_keygen
	cmp	x0, #0
	b.gt	LBB0_11
; %bb.6:
Lloh7:
	adrp	x8, _SSL_AD_INTERNAL_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SSL_AD_INTERNAL_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _SSL_F_SSL_GENERATE_PKEY_GROUP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SSL_F_SSL_GENERATE_PKEY_GROUP@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
Lloh13:
	adrp	x8, _ERR_R_EVP_LIB@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ERR_R_EVP_LIB@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_SSLfatal
	ldr	x0, [sp, #8]
	bl	_EVP_PKEY_free
	str	xzr, [sp, #8]
	b	LBB0_11
LBB0_7:
Lloh16:
	adrp	x8, _SSL_AD_INTERNAL_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SSL_AD_INTERNAL_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x8, _SSL_F_SSL_GENERATE_PKEY_GROUP@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SSL_F_SSL_GENERATE_PKEY_GROUP@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
Lloh22:
	adrp	x8, _ERR_R_INTERNAL_ERROR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ERR_R_INTERNAL_ERROR@GOTPAGEOFF]
Lloh24:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_SSLfatal
	mov	x20, #0
	b	LBB0_11
LBB0_8:
Lloh25:
	adrp	x8, _SSL_AD_INTERNAL_ERROR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SSL_AD_INTERNAL_ERROR@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x8, _SSL_F_SSL_GENERATE_PKEY_GROUP@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SSL_F_SSL_GENERATE_PKEY_GROUP@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
Lloh31:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh33:
	adrp	x8, _SSL_AD_INTERNAL_ERROR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _SSL_AD_INTERNAL_ERROR@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
Lloh36:
	adrp	x8, _SSL_F_SSL_GENERATE_PKEY_GROUP@GOTPAGE
Lloh37:
	ldr	x8, [x8, _SSL_F_SSL_GENERATE_PKEY_GROUP@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
Lloh39:
	adrp	x8, _ERR_R_EVP_LIB@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ERR_R_EVP_LIB@GOTPAGEOFF]
LBB0_10:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_SSLfatal
LBB0_11:
	mov	x0, x20
	bl	_EVP_PKEY_CTX_free
	ldr	x0, [sp, #8]
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_SSL_AD_INTERNAL_ERROR,4,2      ; @SSL_AD_INTERNAL_ERROR
	.comm	_SSL_F_SSL_GENERATE_PKEY_GROUP,4,2 ; @SSL_F_SSL_GENERATE_PKEY_GROUP
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ; @ERR_R_INTERNAL_ERROR
	.comm	_TLS_CURVE_TYPE,4,2             ; @TLS_CURVE_TYPE
	.comm	_TLS_CURVE_CUSTOM,4,2           ; @TLS_CURVE_CUSTOM
	.comm	_EVP_PKEY_EC,4,2                ; @EVP_PKEY_EC
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.comm	_ERR_R_EVP_LIB,4,2              ; @ERR_R_EVP_LIB
.subsections_via_symbols
