	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssl_generate_param_group       ## -- Begin function ssl_generate_param_group
	.p2align	4, 0x90
_ssl_generate_param_group:              ## @ssl_generate_param_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, -40(%rbp)
	callq	_tls1_group_id_lookup
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	(%rax), %eax
	movq	_TLS_GROUP_TYPE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movq	_TLS_GROUP_CURVE_CUSTOM@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_6
## %bb.3:
	xorl	%eax, %eax
	callq	_EVP_PKEY_new
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	4(%r15), %esi
	movq	%rbx, %rdi
	callq	_EVP_PKEY_set_type
	testq	%rax, %rax
	jne	LBB0_19
LBB0_5:
	movq	%rbx, %rdi
	callq	_EVP_PKEY_free
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_18
LBB0_6:
	movq	_TLS_GROUP_FFDHE@GOTPCREL(%rip), %r12
	andl	(%r12), %eax
	jne	LBB0_7
## %bb.8:
	movq	_EVP_PKEY_EC@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_EVP_PKEY_DH@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_EVP_PKEY_CTX_new_id
	testq	%rax, %rax
	je	LBB0_18
## %bb.10:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_EVP_PKEY_paramgen_init
	testq	%rax, %rax
	jle	LBB0_17
## %bb.11:
	movl	(%r12), %eax
	movl	4(%r15), %esi
	testl	%eax, (%r15)
	je	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_EVP_PKEY_CTX_set_dh_nid
	testq	%rax, %rax
	jg	LBB0_15
	jmp	LBB0_17
LBB0_13:
	movq	%r14, %rdi
	callq	_EVP_PKEY_CTX_set_ec_paramgen_curve_nid
	testq	%rax, %rax
	jle	LBB0_17
LBB0_15:
	leaq	-40(%rbp), %rsi
	movq	%r14, %rdi
	callq	_EVP_PKEY_paramgen
	testq	%rax, %rax
	jg	LBB0_17
## %bb.16:
	movq	-40(%rbp), %rdi
	callq	_EVP_PKEY_free
	movq	$0, -40(%rbp)
LBB0_17:
	movq	%r14, %rbx
LBB0_18:
	movq	%rbx, %rdi
	callq	_EVP_PKEY_CTX_free
	movq	-40(%rbp), %rbx
LBB0_19:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TLS_GROUP_TYPE,4,2             ## @TLS_GROUP_TYPE
	.comm	_TLS_GROUP_CURVE_CUSTOM,4,2     ## @TLS_GROUP_CURVE_CUSTOM
	.comm	_TLS_GROUP_FFDHE,4,2            ## @TLS_GROUP_FFDHE
	.comm	_EVP_PKEY_DH,4,2                ## @EVP_PKEY_DH
	.comm	_EVP_PKEY_EC,4,2                ## @EVP_PKEY_EC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssl_generate_param_group       ; -- Begin function ssl_generate_param_group
	.p2align	2
_ssl_generate_param_group:              ; @ssl_generate_param_group
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	str	xzr, [sp, #8]
	bl	_tls1_group_id_lookup
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _TLS_GROUP_TYPE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TLS_GROUP_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w9, w9, w8
Lloh3:
	adrp	x10, _TLS_GROUP_CURVE_CUSTOM@GOTPAGE
Lloh4:
	ldr	x10, [x10, _TLS_GROUP_CURVE_CUSTOM@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_6
; %bb.2:
	bl	_EVP_PKEY_new
	mov	x19, x0
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_EVP_PKEY_set_type
	cbnz	x0, LBB0_14
LBB0_4:
	mov	x0, x19
	bl	_EVP_PKEY_free
	mov	x19, #0
	b	LBB0_14
LBB0_5:
	mov	x19, #0
	b	LBB0_13
LBB0_6:
Lloh6:
	adrp	x21, _TLS_GROUP_FFDHE@GOTPAGE
Lloh7:
	ldr	x21, [x21, _TLS_GROUP_FFDHE@GOTPAGEOFF]
Lloh8:
	adrp	x9, _EVP_PKEY_DH@GOTPAGE
Lloh9:
	ldr	x9, [x9, _EVP_PKEY_DH@GOTPAGEOFF]
	ldr	w10, [x21]
Lloh10:
	adrp	x11, _EVP_PKEY_EC@GOTPAGE
Lloh11:
	ldr	x11, [x11, _EVP_PKEY_EC@GOTPAGEOFF]
	tst	w10, w8
	csel	x8, x11, x9, eq
	ldr	w0, [x8]
	mov	x1, #0
	bl	_EVP_PKEY_CTX_new_id
	mov	x19, x0
	cbz	x0, LBB0_13
; %bb.7:
	mov	x0, x19
	bl	_EVP_PKEY_paramgen_init
	cmp	x0, #1
	b.lt	LBB0_13
; %bb.8:
	ldr	w8, [x21]
	ldp	w9, w1, [x20]
	mov	x0, x19
	tst	w8, w9
	b.eq	LBB0_10
; %bb.9:
	bl	_EVP_PKEY_CTX_set_dh_nid
	cmp	x0, #1
	b.ge	LBB0_11
	b	LBB0_13
LBB0_10:
	bl	_EVP_PKEY_CTX_set_ec_paramgen_curve_nid
	cmp	x0, #1
	b.lt	LBB0_13
LBB0_11:
	add	x1, sp, #8
	mov	x0, x19
	bl	_EVP_PKEY_paramgen
	cmp	x0, #0
	b.gt	LBB0_13
; %bb.12:
	ldr	x0, [sp, #8]
	bl	_EVP_PKEY_free
	str	xzr, [sp, #8]
LBB0_13:
	mov	x0, x19
	bl	_EVP_PKEY_CTX_free
	ldr	x19, [sp, #8]
LBB0_14:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_TLS_GROUP_TYPE,4,2             ; @TLS_GROUP_TYPE
	.comm	_TLS_GROUP_CURVE_CUSTOM,4,2     ; @TLS_GROUP_CURVE_CUSTOM
	.comm	_TLS_GROUP_FFDHE,4,2            ; @TLS_GROUP_FFDHE
	.comm	_EVP_PKEY_DH,4,2                ; @EVP_PKEY_DH
	.comm	_EVP_PKEY_EC,4,2                ; @EVP_PKEY_EC
.subsections_via_symbols
