	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hx509_crypto_set_random_key    ## -- Begin function hx509_crypto_set_random_key
	.p2align	4, 0x90
_hx509_crypto_set_random_key:           ## @hx509_crypto_set_random_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_free
	movq	$0, (%r15)
LBB0_2:
	movl	16(%r15), %edi
	callq	_EVP_CIPHER_key_length
	movq	%rax, %rbx
	movq	%rax, (%r15)
	movq	%rax, %rdi
	callq	_malloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_RAND_bytes
	testq	%rax, %rax
	jle	LBB0_5
## %bb.6:
	testq	%r14, %r14
	je	LBB0_7
## %bb.9:
	movq	%r15, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_der_copy_octet_string          ## TAILCALL
LBB0_3:
	movq	$0, (%r15)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_8
LBB0_5:
	movq	8(%r15), %rdi
	callq	_free
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r15)
	movq	_HX509_CRYPTO_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_8
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HX509_CRYPTO_INTERNAL_ERROR,4,2 ## @HX509_CRYPTO_INTERNAL_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hx509_crypto_set_random_key    ; -- Begin function hx509_crypto_set_random_key
	.p2align	2
_hx509_crypto_set_random_key:           ; @hx509_crypto_set_random_key
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x0, [x0, #8]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_free
	str	xzr, [x19]
LBB0_2:
	ldr	w0, [x19, #16]
	bl	_EVP_CIPHER_key_length
	mov	x21, x0
	str	x0, [x19]
	bl	_malloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.3:
	mov	x1, x21
	bl	_RAND_bytes
	cmp	x0, #0
	b.le	LBB0_7
; %bb.4:
	cbz	x20, LBB0_8
; %bb.5:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_der_copy_octet_string
LBB0_6:
	str	xzr, [x19]
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_7:
	ldr	x0, [x19, #8]
	bl	_free
	stp	xzr, xzr, [x19]
Lloh3:
	adrp	x8, _HX509_CRYPTO_INTERNAL_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HX509_CRYPTO_INTERNAL_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HX509_CRYPTO_INTERNAL_ERROR,4,2 ; @HX509_CRYPTO_INTERNAL_ERROR
.subsections_via_symbols
