	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_calc_keytag               ## -- Begin function ldns_calc_keytag
	.p2align	4, 0x90
_ldns_calc_keytag:                      ## @ldns_calc_keytag
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	callq	_ldns_rr_get_type
	movq	_LDNS_RR_TYPE_DNSKEY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_ldns_rr_get_type
	movq	_LDNS_RR_TYPE_KEY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
LBB0_3:
	movq	_LDNS_MIN_BUFLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ldns_buffer_new
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %r14
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_ldns_rr_rdata2buffer_wire
	movq	%r14, %rdi
	callq	_ldns_buffer_position
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_ldns_buffer_begin
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_ldns_calc_keytag_raw
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_ldns_buffer_free
	movl	%ebx, %eax
	jmp	LBB0_6
LBB0_5:
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_RR_TYPE_DNSKEY,8,3        ## @LDNS_RR_TYPE_DNSKEY
	.comm	_LDNS_RR_TYPE_KEY,8,3           ## @LDNS_RR_TYPE_KEY
	.comm	_LDNS_MIN_BUFLEN,4,2            ## @LDNS_MIN_BUFLEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_calc_keytag               ; -- Begin function ldns_calc_keytag
	.p2align	2
_ldns_calc_keytag:                      ; @ldns_calc_keytag
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	bl	_ldns_rr_get_type
Lloh0:
	adrp	x8, _LDNS_RR_TYPE_DNSKEY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LDNS_RR_TYPE_DNSKEY@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_ldns_rr_get_type
Lloh3:
	adrp	x8, _LDNS_RR_TYPE_KEY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LDNS_RR_TYPE_KEY@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _LDNS_MIN_BUFLEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LDNS_MIN_BUFLEN@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_ldns_buffer_new
	cbz	x0, LBB0_5
; %bb.4:
	mov	x20, x0
	mov	x1, x19
	bl	_ldns_rr_rdata2buffer_wire
	mov	x0, x20
	bl	_ldns_buffer_position
	mov	x19, x0
	mov	x0, x20
	bl	_ldns_buffer_begin
	mov	x1, x19
	bl	_ldns_calc_keytag_raw
	mov	x19, x0
	mov	x0, x20
	bl	_ldns_buffer_free
	mov	x0, x19
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_RR_TYPE_DNSKEY,8,3        ; @LDNS_RR_TYPE_DNSKEY
	.comm	_LDNS_RR_TYPE_KEY,8,3           ; @LDNS_RR_TYPE_KEY
	.comm	_LDNS_MIN_BUFLEN,4,2            ; @LDNS_MIN_BUFLEN
.subsections_via_symbols
