	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_key_buf2rsa_raw           ## -- Begin function ldns_key_buf2rsa_raw
	.p2align	4, 0x90
_ldns_key_buf2rsa_raw:                  ## @ldns_key_buf2rsa_raw
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.1:
	movq	%rsi, %r13
	movq	%rdi, %r14
	movzbl	(%rdi), %r12d
	testq	%r12, %r12
	je	LBB0_4
## %bb.2:
	movl	$1, %r15d
	jmp	LBB0_7
LBB0_4:
	cmpq	$3, %r13
	jb	LBB0_15
## %bb.6:
	leaq	1(%r14), %rsi
	leaq	-56(%rbp), %rdi
	movl	$2, %edx
	callq	_memmove
	movq	-56(%rbp), %rdi
	callq	_ntohs
	movq	%rax, %r12
	movl	$3, %r15d
LBB0_7:
	leaq	(%r15,%r12), %rax
	incq	%rax
	xorl	%ebx, %ebx
	cmpq	%r13, %rax
	ja	LBB0_16
## %bb.8:
	xorl	%eax, %eax
	callq	_BN_new
	testq	%rax, %rax
	je	LBB0_16
## %bb.9:
	leaq	(%r14,%r15), %rdi
	movl	%r12d, %esi
	movq	%rax, %rdx
	movq	%rax, %rbx
	callq	_BN_bin2bn
	xorl	%eax, %eax
	callq	_BN_new
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	addq	%r12, %r15
	addq	%r15, %r14
	subl	%r15d, %r13d
	movq	%r14, %rdi
	movl	%r13d, %esi
	movq	%rax, %r14
	movq	%rax, %rdx
	callq	_BN_bin2bn
	xorl	%eax, %eax
	callq	_RSA_new
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	%rax, %rbx
	movq	%r14, 8(%rax)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rbx)
	jmp	LBB0_16
LBB0_12:
	movq	%rbx, %rdi
	jmp	LBB0_14
LBB0_13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_free
	movq	%r14, %rdi
LBB0_14:
	callq	_BN_free
LBB0_15:
	xorl	%ebx, %ebx
LBB0_16:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_key_buf2rsa_raw           ; -- Begin function ldns_key_buf2rsa_raw
	.p2align	2
_ldns_key_buf2rsa_raw:                  ; @ldns_key_buf2rsa_raw
	.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
	cbz	x1, LBB0_13
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldrb	w22, [x0]
	cbz	x22, LBB0_3
; %bb.2:
	mov	w24, #1
	b	LBB0_5
LBB0_3:
	cmp	x19, #3
	b.lo	LBB0_13
; %bb.4:
	add	x1, x20, #1
	add	x0, sp, #8
	mov	w2, #2
	bl	_memmove
	ldr	x0, [sp, #8]
	bl	_ntohs
	mov	x22, x0
	mov	w24, #3
LBB0_5:
	add	x23, x24, x22
	add	x8, x23, #1
	cmp	x8, x19
	b.hi	LBB0_13
; %bb.6:
	bl	_BN_new
	cbz	x0, LBB0_14
; %bb.7:
	mov	x21, x0
	add	x0, x20, x24
	mov	x1, x22
	mov	x2, x21
	bl	_BN_bin2bn
	bl	_BN_new
	cbz	x0, LBB0_10
; %bb.8:
	mov	x22, x0
	add	x0, x20, x23
	sub	w1, w19, w23
	mov	x2, x22
	bl	_BN_bin2bn
	bl	_RSA_new
	cbz	x0, LBB0_11
; %bb.9:
	stp	x21, x22, [x0]
	b	LBB0_14
LBB0_10:
	mov	x0, x21
	b	LBB0_12
LBB0_11:
	mov	x0, x21
	bl	_BN_free
	mov	x0, x22
LBB0_12:
	bl	_BN_free
LBB0_13:
	mov	x0, #0
LBB0_14:
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
