	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function php_openssl_generate_private_key
_php_openssl_generate_private_key:      ## @php_openssl_generate_private_key
	.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	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r8
	movq	_MIN_KEY_LENGTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%rcx, %r8
	jge	LBB0_2
## %bb.1:
	movq	_E_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_php_error_docref
	jmp	LBB0_26
LBB0_2:
	movq	%rdi, %r15
	movl	28(%rdi), %esi
	movl	32(%rdi), %edi
	leaq	L_.str.1(%rip), %rdx
	callq	_CONF_get_string
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_php_openssl_store_errors
LBB0_4:
	leaq	-44(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	_php_openssl_load_rand_file
	xorl	%eax, %eax
	callq	_EVP_PKEY_new
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_23
## %bb.5:
	movl	8(%r15), %eax
	cmpl	$131, %eax
	je	LBB0_11
## %bb.6:
	cmpl	$130, %eax
	je	LBB0_18
## %bb.7:
	cmpl	$128, %eax
	jne	LBB0_27
## %bb.8:
	xorl	%eax, %eax
	callq	_PHP_OPENSSL_RAND_ADD_TIME
	movq	(%r15), %rdi
	movq	_RSA_F4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_RSA_generate_key
	testq	%rax, %rax
	je	LBB0_23
## %bb.9:
	movq	16(%r15), %rdi
	movq	%rax, %rsi
	callq	_EVP_PKEY_assign_RSA
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_23
LBB0_11:
	xorl	%eax, %eax
	callq	_PHP_OPENSSL_RAND_ADD_TIME
	movl	$0, -36(%rbp)
	xorl	%eax, %eax
	callq	_DH_new
	testq	%rax, %rax
	je	LBB0_23
## %bb.12:
	movq	%rax, %r12
	movq	(%r15), %rsi
	movq	%rax, %rdi
	movl	$2, %edx
	xorl	%ecx, %ecx
	callq	_DH_generate_parameters_ex
	testl	%eax, %eax
	je	LBB0_23
## %bb.13:
	xorl	%eax, %eax
	callq	_DH_get_default_method
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_DH_set_method
	leaq	-36(%rbp), %rsi
	movq	%r12, %rdi
	callq	_DH_check
	testl	%eax, %eax
	je	LBB0_28
## %bb.14:
	cmpl	$0, -36(%rbp)
	jne	LBB0_28
## %bb.15:
	movq	%r12, %rdi
	callq	_DH_generate_key
	testl	%eax, %eax
	je	LBB0_28
## %bb.16:
	movq	16(%r15), %rdi
	movq	%r12, %rsi
	callq	_EVP_PKEY_assign_DH
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_23
LBB0_18:
	xorl	%eax, %eax
	callq	_PHP_OPENSSL_RAND_ADD_TIME
	xorl	%eax, %eax
	callq	_DSA_new
	testq	%rax, %rax
	je	LBB0_23
## %bb.19:
	movq	%rax, %r12
	movq	(%r15), %rsi
	movq	$0, (%rsp)
	movq	%rax, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_DSA_generate_parameters_ex
	testl	%eax, %eax
	je	LBB0_23
## %bb.20:
	xorl	%eax, %eax
	callq	_DSA_get_default_method
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_DSA_set_method
	movq	%r12, %rdi
	callq	_DSA_generate_key
	testl	%eax, %eax
	je	LBB0_29
## %bb.21:
	movq	16(%r15), %rdi
	movq	%r12, %rsi
	callq	_EVP_PKEY_assign_DSA
	testl	%eax, %eax
	je	LBB0_23
LBB0_10:
	movq	16(%r15), %rbx
	jmp	LBB0_24
LBB0_23:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_php_openssl_store_errors
LBB0_24:
	movl	-44(%rbp), %esi
	movl	-40(%rbp), %edx
	movq	%r14, %rdi
	callq	_php_openssl_write_rand_file
	testq	%rbx, %rbx
	jne	LBB0_26
## %bb.25:
	movq	16(%r15), %rdi
	callq	_EVP_PKEY_free
	movq	$0, 16(%r15)
	xorl	%ebx, %ebx
LBB0_26:
	movq	%rbx, %rax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movq	_E_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_php_error_docref
	jmp	LBB0_24
LBB0_28:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_php_openssl_store_errors
	movq	%r12, %rdi
	callq	_DH_free
	jmp	LBB0_24
LBB0_29:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_php_openssl_store_errors
	movq	%r12, %rdi
	callq	_DSA_free
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_MIN_KEY_LENGTH,8,3             ## @MIN_KEY_LENGTH
	.comm	_E_WARNING,4,2                  ## @E_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"private key length is too short; it needs to be at least %d bits, not %d"

L_.str.1:                               ## @.str.1
	.asciz	"RANDFILE"

	.comm	_RSA_F4,4,2                     ## @RSA_F4
L_.str.2:                               ## @.str.2
	.asciz	"Unsupported private key type"

	.comm	_NID_undef,4,2                  ## @NID_undef
	.comm	_OPENSSL_EC_NAMED_CURVE,4,2     ## @OPENSSL_EC_NAMED_CURVE
	.no_dead_strip	_php_openssl_generate_private_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function php_openssl_generate_private_key
_php_openssl_generate_private_key:      ; @php_openssl_generate_private_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MIN_KEY_LENGTH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MIN_KEY_LENGTH@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_2
; %bb.1:
Lloh3:
	adrp	x10, _E_WARNING@GOTPAGE
Lloh4:
	ldr	x10, [x10, _E_WARNING@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x10]
	stp	x9, x8, [sp]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, #0
	bl	_php_error_docref
	mov	x21, #0
	b	LBB0_25
LBB0_2:
	mov	x19, x0
	ldr	w0, [x0, #32]
	ldr	w1, [x19, #28]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_CONF_get_string
	mov	x20, x0
	cbnz	x0, LBB0_4
; %bb.3:
	bl	_php_openssl_store_errors
LBB0_4:
	add	x1, sp, #28
	add	x2, sp, #24
	mov	x0, x20
	bl	_php_openssl_load_rand_file
	bl	_EVP_PKEY_new
	str	x0, [x19, #16]
	cbz	x0, LBB0_21
; %bb.5:
	ldr	w8, [x19, #8]
	cmp	w8, #131
	b.eq	LBB0_10
; %bb.6:
	cmp	w8, #130
	b.eq	LBB0_16
; %bb.7:
	cmp	w8, #128
	b.ne	LBB0_26
; %bb.8:
	bl	_PHP_OPENSSL_RAND_ADD_TIME
	ldr	x0, [x19]
Lloh10:
	adrp	x8, _RSA_F4@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RSA_F4@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x2, #0
	mov	x3, #0
	bl	_RSA_generate_key
	cbz	x0, LBB0_21
; %bb.9:
	mov	x1, x0
	ldr	x0, [x19, #16]
	bl	_EVP_PKEY_assign_RSA
	cbnz	w0, LBB0_20
	b	LBB0_21
LBB0_10:
	bl	_PHP_OPENSSL_RAND_ADD_TIME
	str	wzr, [sp, #20]
	bl	_DH_new
	cbz	x0, LBB0_21
; %bb.11:
	mov	x21, x0
	ldr	x1, [x19]
	mov	w2, #2
	mov	x3, #0
	bl	_DH_generate_parameters_ex
	cbz	w0, LBB0_21
; %bb.12:
	bl	_DH_get_default_method
	mov	x1, x0
	mov	x0, x21
	bl	_DH_set_method
	add	x1, sp, #20
	mov	x0, x21
	bl	_DH_check
	cbz	w0, LBB0_27
; %bb.13:
	ldr	w8, [sp, #20]
	cbnz	w8, LBB0_27
; %bb.14:
	mov	x0, x21
	bl	_DH_generate_key
	cbz	w0, LBB0_27
; %bb.15:
	ldr	x0, [x19, #16]
	mov	x1, x21
	bl	_EVP_PKEY_assign_DH
	cbnz	w0, LBB0_20
	b	LBB0_21
LBB0_16:
	bl	_PHP_OPENSSL_RAND_ADD_TIME
	bl	_DSA_new
	cbz	x0, LBB0_21
; %bb.17:
	mov	x21, x0
	ldr	x1, [x19]
	mov	x2, #0
	mov	w3, #0
	mov	x4, #0
	mov	x5, #0
	mov	x6, #0
	bl	_DSA_generate_parameters_ex
	cbz	w0, LBB0_21
; %bb.18:
	bl	_DSA_get_default_method
	mov	x1, x0
	mov	x0, x21
	bl	_DSA_set_method
	mov	x0, x21
	bl	_DSA_generate_key
	cbz	w0, LBB0_28
; %bb.19:
	ldr	x0, [x19, #16]
	mov	x1, x21
	bl	_EVP_PKEY_assign_DSA
	cbz	w0, LBB0_21
LBB0_20:
	ldr	x21, [x19, #16]
	b	LBB0_23
LBB0_21:
	bl	_php_openssl_store_errors
LBB0_22:
	mov	x21, #0
LBB0_23:
	ldp	w2, w1, [sp, #24]
	mov	x0, x20
	bl	_php_openssl_write_rand_file
	cbnz	x21, LBB0_25
; %bb.24:
	ldr	x0, [x19, #16]
	bl	_EVP_PKEY_free
	str	xzr, [x19, #16]
LBB0_25:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_26:
Lloh13:
	adrp	x8, _E_WARNING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _E_WARNING@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, #0
	bl	_php_error_docref
	b	LBB0_22
LBB0_27:
	bl	_php_openssl_store_errors
	mov	x0, x21
	bl	_DH_free
	b	LBB0_22
LBB0_28:
	bl	_php_openssl_store_errors
	mov	x0, x21
	bl	_DSA_free
	b	LBB0_22
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MIN_KEY_LENGTH,8,3             ; @MIN_KEY_LENGTH
	.comm	_E_WARNING,4,2                  ; @E_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"private key length is too short; it needs to be at least %d bits, not %d"

l_.str.1:                               ; @.str.1
	.asciz	"RANDFILE"

	.comm	_RSA_F4,4,2                     ; @RSA_F4
l_.str.2:                               ; @.str.2
	.asciz	"Unsupported private key type"

	.comm	_NID_undef,4,2                  ; @NID_undef
	.comm	_OPENSSL_EC_NAMED_CURVE,4,2     ; @OPENSSL_EC_NAMED_CURVE
	.no_dead_strip	_php_openssl_generate_private_key
.subsections_via_symbols
