	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_key_new_frm_engine        ## -- Begin function ldns_key_new_frm_engine
	.p2align	4, 0x90
_ldns_key_new_frm_engine:               ## @ldns_key_new_frm_engine
	.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	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_ldns_key_new
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_UI_OpenSSL
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_ENGINE_load_private_key
	movl	%eax, (%rbx)
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_ldns_key_set_algorithm
	cmpl	$0, (%rbx)
	je	LBB0_5
## %bb.6:
	movq	%rbx, (%r14)
	movq	_LDNS_STATUS_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	movq	_LDNS_STATUS_MEM_ERR@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	movq	%rbx, %rdi
	callq	_ldns_key_free
	movq	_LDNS_STATUS_ERR@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	%rbx, %rdi
	callq	_ldns_key_free
	movq	_LDNS_STATUS_ENGINE_KEY_NOT_LOADED@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_STATUS_MEM_ERR,4,2        ## @LDNS_STATUS_MEM_ERR
	.comm	_LDNS_STATUS_ERR,4,2            ## @LDNS_STATUS_ERR
	.comm	_LDNS_STATUS_ENGINE_KEY_NOT_LOADED,4,2 ## @LDNS_STATUS_ENGINE_KEY_NOT_LOADED
	.comm	_LDNS_STATUS_OK,4,2             ## @LDNS_STATUS_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_key_new_frm_engine        ; -- Begin function ldns_key_new_frm_engine
	.p2align	2
_ldns_key_new_frm_engine:               ; @ldns_key_new_frm_engine
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	bl	_ldns_key_new
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	bl	_UI_OpenSSL
	mov	x2, x0
	mov	x0, x23
	mov	x1, x22
	mov	x3, #0
	bl	_ENGINE_load_private_key
	str	w0, [x19]
	cbz	w0, LBB0_5
; %bb.2:
	mov	x0, x19
	mov	x1, x21
	bl	_ldns_key_set_algorithm
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.3:
	str	x19, [x20]
Lloh0:
	adrp	x8, _LDNS_STATUS_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LDNS_STATUS_OK@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
Lloh2:
	adrp	x8, _LDNS_STATUS_MEM_ERR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LDNS_STATUS_MEM_ERR@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_ldns_key_free
Lloh4:
	adrp	x8, _LDNS_STATUS_ERR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _LDNS_STATUS_ERR@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_ldns_key_free
Lloh6:
	adrp	x8, _LDNS_STATUS_ENGINE_KEY_NOT_LOADED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LDNS_STATUS_ENGINE_KEY_NOT_LOADED@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_STATUS_MEM_ERR,4,2        ; @LDNS_STATUS_MEM_ERR
	.comm	_LDNS_STATUS_ERR,4,2            ; @LDNS_STATUS_ERR
	.comm	_LDNS_STATUS_ENGINE_KEY_NOT_LOADED,4,2 ; @LDNS_STATUS_ENGINE_KEY_NOT_LOADED
	.comm	_LDNS_STATUS_OK,4,2             ; @LDNS_STATUS_OK
.subsections_via_symbols
