	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_convert_ecdsa_rrsig_rdf2asn1 ## -- Begin function ldns_convert_ecdsa_rrsig_rdf2asn1
	.p2align	4, 0x90
_ldns_convert_ecdsa_rrsig_rdf2asn1:     ## @ldns_convert_ecdsa_rrsig_rdf2asn1
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movabsq	$137438953474, %rax             ## imm = 0x2000000002
	movq	%rax, -96(%rbp)
	movq	%rsi, %rdi
	callq	_ldns_rdf_size
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_ldns_rdf_data
	cmpq	$32, %rbx
	jl	LBB0_18
## %bb.1:
	movq	%rax, %r13
	movq	%rbx, %r15
	shrq	$63, %r15
	addq	%rbx, %r15
	sarq	%r15
	leaq	(%r15,%r15), %rbx
	movq	%r12, %rdi
	callq	_ldns_rdf_size
	cmpq	%rax, %rbx
	jne	LBB0_18
## %bb.2:
	cmpq	$3, %r15
	movl	$2, %ecx
	cmovgeq	%r15, %rcx
	decq	%rcx
	xorl	%eax, %eax
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%r13,%rax,4)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rax
	cmpq	%rax, %rcx
	jne	LBB0_3
## %bb.5:
	movq	%rcx, %rax
LBB0_6:
	movl	%eax, %esi
	leaq	(,%r15,4), %r14
	addq	%r13, %r14
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%r14,%rdx,4)
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_7
## %bb.9:
	movq	%rcx, %rdx
LBB0_10:
	movl	%edx, %ecx
	movl	(%r13,%rsi,4), %edi
	andl	$128, %edi
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	addq	%r15, %rcx
	movl	(%r13,%rcx,4), %ecx
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movzbl	%cl, %ecx
	shrl	$7, %ecx
	movl	%edi, -52(%rbp)                 ## 4-byte Spill
	cmpl	$1, %edi
	sbbl	%eax, %ebx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	addl	%ecx, %ebx
	subl	%edx, %ebx
	addl	$7, %ebx
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movslq	%ebx, %rsi
	movq	%r12, %rdi
	callq	_ldns_buffer_reserve
	testq	%rax, %rax
	je	LBB0_16
## %bb.11:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(,%rax,4), %rax
	addq	%r13, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r12d
	shrl	$7, %r12d
	movl	$48, %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ldns_buffer_write_u8
	addl	$-2, %ebx
	movslq	%ebx, %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ldns_buffer_write_u8
	movl	$2, %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ldns_buffer_write_u8
	movq	%r15, %r13
	subq	-64(%rbp), %r13                 ## 8-byte Folded Reload
	addq	%r13, %r12
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	callq	_ldns_buffer_write_u8
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_13
## %bb.12:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_ldns_buffer_write_u8
LBB0_13:
	movq	%r12, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_ldns_buffer_write
	leaq	-96(%rbp), %rsi
	movl	$1, %edx
	movq	%r12, %rdi
	callq	_ldns_buffer_write
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	addq	%r15, %rsi
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	subq	%rbx, %rsi
	movq	%r12, %rdi
	callq	_ldns_buffer_write_u8
	testb	$-128, -56(%rbp)                ## 1-byte Folded Reload
	je	LBB0_15
## %bb.14:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_ldns_buffer_write_u8
LBB0_15:
	leaq	(%r14,%rbx,4), %rsi
	subq	%rbx, %r15
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	_ldns_buffer_write
LBB0_16:
	movq	%r12, %rdi
	callq	_ldns_buffer_status
	jmp	LBB0_17
LBB0_18:
	movq	_LDNS_STATUS_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_17:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_STATUS_ERR,4,2            ## @LDNS_STATUS_ERR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_convert_ecdsa_rrsig_rdf2asn1 ; -- Begin function ldns_convert_ecdsa_rrsig_rdf2asn1
	.p2align	2
_ldns_convert_ecdsa_rrsig_rdf2asn1:     ; @ldns_convert_ecdsa_rrsig_rdf2asn1
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x19, x0
	mov	x8, #2
	movk	x8, #32, lsl #32
	str	x8, [sp, #8]
	mov	x0, x1
	bl	_ldns_rdf_size
	mov	x22, x0
	cmp	x0, #0
	cinc	x23, x0, lt
	mov	x0, x21
	bl	_ldns_rdf_data
	cmp	x22, #32
	b.lt	LBB0_17
; %bb.1:
	mov	x20, x0
	asr	x23, x23, #1
	lsl	x27, x23, #1
	mov	x0, x21
	bl	_ldns_rdf_size
	cmp	x27, x0
	b.ne	LBB0_17
; %bb.2:
	mov	x8, #0
	mov	w9, #2
	cmp	x23, #2
	csel	x9, x23, x9, gt
	sub	x9, x9, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x20, x8, lsl #2]
	cbnz	w10, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #1
	cmp	x9, x8
	b.ne	LBB0_3
; %bb.5:
	mov	x8, x9
LBB0_6:
	mov	x10, #0
	and	x22, x8, #0xffffffff
	add	x11, x20, x23, lsl #2
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11, x10, lsl #2]
	cbnz	w12, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x10, x10, #1
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.9:
	mov	x10, x9
LBB0_10:
	and	x24, x10, #0xffffffff
	add	x21, x20, x22, lsl #2
	ldr	w28, [x21]
	add	x9, x23, x24
	ldr	w25, [x20, x9, lsl #2]
	ubfx	w26, w25, #7, #1
	tst	w28, #0x80
	mov	w9, #4
	cinc	w9, w9, ne
	sub	w8, w27, w8
	add	w8, w8, w9
	add	w8, w8, w26
	sub	w8, w8, w10
	add	w27, w8, #2
	sxtw	x1, w27
	mov	x0, x19
	bl	_ldns_buffer_reserve
	cbz	x0, LBB0_16
; %bb.11:
	str	w25, [sp, #4]                   ; 4-byte Folded Spill
	ubfx	w25, w28, #7, #1
	mov	x0, x19
	mov	w1, #48
	bl	_ldns_buffer_write_u8
	sub	w8, w27, #2
	sxtw	x1, w8
	mov	x0, x19
	bl	_ldns_buffer_write_u8
	mov	x0, x19
	mov	w1, #2
	bl	_ldns_buffer_write_u8
	sub	x22, x23, x22
	add	x1, x22, x25
	mov	x0, x19
	bl	_ldns_buffer_write_u8
	tbz	w28, #7, LBB0_13
; %bb.12:
	mov	x0, x19
	mov	x1, #0
	bl	_ldns_buffer_write_u8
LBB0_13:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_ldns_buffer_write
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #1
	bl	_ldns_buffer_write
	add	x8, x23, x26
	sub	x1, x8, x24
	mov	x0, x19
	bl	_ldns_buffer_write_u8
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	tbz	w8, #7, LBB0_15
; %bb.14:
	mov	x0, x19
	mov	x1, #0
	bl	_ldns_buffer_write_u8
LBB0_15:
	add	x8, x20, x23, lsl #2
	add	x1, x8, x24, lsl #2
	sub	x2, x23, x24
	mov	x0, x19
	bl	_ldns_buffer_write
LBB0_16:
	mov	x0, x19
	bl	_ldns_buffer_status
	b	LBB0_18
LBB0_17:
Lloh0:
	adrp	x8, _LDNS_STATUS_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LDNS_STATUS_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
LBB0_18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_STATUS_ERR,4,2            ; @LDNS_STATUS_ERR
.subsections_via_symbols
