	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_pkt_clone                 ## -- Begin function ldns_pkt_clone
	.p2align	4, 0x90
_ldns_pkt_clone:                        ## @ldns_pkt_clone
	.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_1
## %bb.2:
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_ldns_pkt_new
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_ldns_pkt_id
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_id
	movq	%r14, %rdi
	callq	_ldns_pkt_qr
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_qr
	movq	%r14, %rdi
	callq	_ldns_pkt_aa
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_aa
	movq	%r14, %rdi
	callq	_ldns_pkt_tc
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_tc
	movq	%r14, %rdi
	callq	_ldns_pkt_rd
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_rd
	movq	%r14, %rdi
	callq	_ldns_pkt_cd
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_cd
	movq	%r14, %rdi
	callq	_ldns_pkt_ra
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_ra
	movq	%r14, %rdi
	callq	_ldns_pkt_ad
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_ad
	movq	%r14, %rdi
	callq	_ldns_pkt_get_opcode
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_opcode
	movq	%r14, %rdi
	callq	_ldns_pkt_get_rcode
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_rcode
	movq	%r14, %rdi
	callq	_ldns_pkt_qdcount
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_qdcount
	movq	%r14, %rdi
	callq	_ldns_pkt_ancount
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_ancount
	movq	%r14, %rdi
	callq	_ldns_pkt_nscount
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_nscount
	movq	%r14, %rdi
	callq	_ldns_pkt_arcount
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_arcount
	movq	%r14, %rdi
	callq	_ldns_pkt_answerfrom
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_ldns_pkt_answerfrom
	movq	%rax, %rdi
	callq	_ldns_rdf_clone
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_answerfrom
LBB0_4:
	movq	%r14, %rdi
	callq	_ldns_pkt_timestamp
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_timestamp
	movq	%r14, %rdi
	callq	_ldns_pkt_querytime
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_querytime
	movq	%r14, %rdi
	callq	_ldns_pkt_size
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_size
	movq	%r14, %rdi
	callq	_ldns_pkt_tsig
	movl	%eax, %edi
	callq	_ldns_rr_clone
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_tsig
	movq	%r14, %rdi
	callq	_ldns_pkt_edns_udp_size
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_edns_udp_size
	movq	%r14, %rdi
	callq	_ldns_pkt_edns_extended_rcode
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_edns_extended_rcode
	movq	%r14, %rdi
	callq	_ldns_pkt_edns_version
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_edns_version
	movl	32(%r14), %eax
	movl	%eax, 32(%rbx)
	movq	%r14, %rdi
	callq	_ldns_pkt_edns_z
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_edns_z
	movq	%r14, %rdi
	callq	_ldns_pkt_edns_data
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_ldns_pkt_edns_data
	movq	%rax, %rdi
	callq	_ldns_rdf_clone
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_edns_data
LBB0_6:
	movq	%r14, %rdi
	callq	_ldns_pkt_edns_do
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_edns_do
	movq	24(%rbx), %rdi
	callq	_ldns_rr_list_deep_free
	movq	16(%rbx), %rdi
	callq	_ldns_rr_list_deep_free
	movq	8(%rbx), %rdi
	callq	_ldns_rr_list_deep_free
	movq	(%rbx), %rdi
	callq	_ldns_rr_list_deep_free
	movq	%r14, %rdi
	callq	_ldns_pkt_question
	movl	%eax, %edi
	callq	_ldns_rr_list_clone
	movq	%rax, 24(%rbx)
	movq	%r14, %rdi
	callq	_ldns_pkt_answer
	movl	%eax, %edi
	callq	_ldns_rr_list_clone
	movq	%rax, 16(%rbx)
	movq	%r14, %rdi
	callq	_ldns_pkt_authority
	movl	%eax, %edi
	callq	_ldns_rr_list_clone
	movq	%rax, 8(%rbx)
	movq	%r14, %rdi
	callq	_ldns_pkt_additional
	movl	%eax, %edi
	callq	_ldns_rr_list_clone
	movq	%rax, (%rbx)
	jmp	LBB0_7
LBB0_1:
	xorl	%ebx, %ebx
LBB0_7:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	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_pkt_clone                 ; -- Begin function ldns_pkt_clone
	.p2align	2
_ldns_pkt_clone:                        ; @ldns_pkt_clone
	.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_6
; %bb.1:
	mov	x20, x0
	bl	_ldns_pkt_new
	mov	x19, x0
	mov	x0, x20
	bl	_ldns_pkt_id
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_id
	mov	x0, x20
	bl	_ldns_pkt_qr
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_qr
	mov	x0, x20
	bl	_ldns_pkt_aa
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_aa
	mov	x0, x20
	bl	_ldns_pkt_tc
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_tc
	mov	x0, x20
	bl	_ldns_pkt_rd
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_rd
	mov	x0, x20
	bl	_ldns_pkt_cd
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_cd
	mov	x0, x20
	bl	_ldns_pkt_ra
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_ra
	mov	x0, x20
	bl	_ldns_pkt_ad
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_ad
	mov	x0, x20
	bl	_ldns_pkt_get_opcode
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_opcode
	mov	x0, x20
	bl	_ldns_pkt_get_rcode
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_rcode
	mov	x0, x20
	bl	_ldns_pkt_qdcount
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_qdcount
	mov	x0, x20
	bl	_ldns_pkt_ancount
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_ancount
	mov	x0, x20
	bl	_ldns_pkt_nscount
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_nscount
	mov	x0, x20
	bl	_ldns_pkt_arcount
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_arcount
	mov	x0, x20
	bl	_ldns_pkt_answerfrom
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_ldns_pkt_answerfrom
	bl	_ldns_rdf_clone
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_answerfrom
LBB0_3:
	mov	x0, x20
	bl	_ldns_pkt_timestamp
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_timestamp
	mov	x0, x20
	bl	_ldns_pkt_querytime
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_querytime
	mov	x0, x20
	bl	_ldns_pkt_size
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_size
	mov	x0, x20
	bl	_ldns_pkt_tsig
	bl	_ldns_rr_clone
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_tsig
	mov	x0, x20
	bl	_ldns_pkt_edns_udp_size
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_edns_udp_size
	mov	x0, x20
	bl	_ldns_pkt_edns_extended_rcode
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_edns_extended_rcode
	mov	x0, x20
	bl	_ldns_pkt_edns_version
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_edns_version
	ldr	w8, [x20, #32]
	str	w8, [x19, #32]
	mov	x0, x20
	bl	_ldns_pkt_edns_z
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_edns_z
	mov	x0, x20
	bl	_ldns_pkt_edns_data
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_ldns_pkt_edns_data
	bl	_ldns_rdf_clone
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_edns_data
LBB0_5:
	mov	x0, x20
	bl	_ldns_pkt_edns_do
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_pkt_set_edns_do
	ldr	x0, [x19, #24]
	bl	_ldns_rr_list_deep_free
	ldr	x0, [x19, #16]
	bl	_ldns_rr_list_deep_free
	ldr	x0, [x19, #8]
	bl	_ldns_rr_list_deep_free
	ldr	x0, [x19]
	bl	_ldns_rr_list_deep_free
	mov	x0, x20
	bl	_ldns_pkt_question
	bl	_ldns_rr_list_clone
	str	x0, [x19, #24]
	mov	x0, x20
	bl	_ldns_pkt_answer
	bl	_ldns_rr_list_clone
	str	x0, [x19, #16]
	mov	x0, x20
	bl	_ldns_pkt_authority
	bl	_ldns_rr_list_clone
	str	x0, [x19, #8]
	mov	x0, x20
	bl	_ldns_pkt_additional
	bl	_ldns_rr_list_clone
	str	x0, [x19]
	b	LBB0_7
LBB0_6:
	mov	x19, #0
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
