	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_update_pkt_new            ## -- Begin function ldns_update_pkt_new
	.p2align	4, 0x90
_ldns_update_pkt_new:                   ## @ldns_update_pkt_new
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.1:
	movq	%rcx, %r12
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.2:
	movq	%r8, %r14
	movq	%rdx, %r15
	movq	%rsi, %rdx
	testq	%rsi, %rsi
	jne	LBB0_4
## %bb.3:
	movq	_LDNS_RR_CLASS_IN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
LBB0_4:
	movq	_LDNS_RR_TYPE_SOA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LDNS_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_ldns_pkt_query_new
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %rbx
	movq	_LDNS_PACKET_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ldns_pkt_set_opcode
	movl	8(%rbx), %edi
	callq	_ldns_rr_list_deep_free
	movq	%r12, %rdi
	callq	_ldns_rr_list_clone
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_authority
	movq	%r12, %rdi
	callq	_ldns_rr_list_rr_count
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_update_set_upcount
	testq	%r15, %r15
	je	LBB0_8
## %bb.7:
	movl	4(%rbx), %edi
	callq	_ldns_rr_list_deep_free
	movq	%r15, %rdi
	callq	_ldns_rr_list_clone
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_answer
	movq	%r15, %rdi
	callq	_ldns_rr_list_rr_count
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_update_set_prcount
LBB0_8:
	testq	%r14, %r14
	je	LBB0_10
## %bb.9:
	movl	(%rbx), %edi
	callq	_ldns_rr_list_deep_free
	movq	%r14, %rdi
	callq	_ldns_rr_list_clone
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_additional
	movq	%r14, %rdi
	callq	_ldns_rr_list_rr_count
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_update_set_adcount
	jmp	LBB0_10
LBB0_5:
	xorl	%ebx, %ebx
LBB0_10:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_RR_CLASS_IN,8,3           ## @LDNS_RR_CLASS_IN
	.comm	_LDNS_RR_TYPE_SOA,4,2           ## @LDNS_RR_TYPE_SOA
	.comm	_LDNS_RD,4,2                    ## @LDNS_RD
	.comm	_LDNS_PACKET_UPDATE,4,2         ## @LDNS_PACKET_UPDATE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_update_pkt_new            ; -- Begin function ldns_update_pkt_new
	.p2align	2
_ldns_update_pkt_new:                   ; @ldns_update_pkt_new
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, #0
	cbz	x0, LBB0_7
; %bb.1:
	mov	x22, x3
	cbz	x3, LBB0_7
; %bb.2:
	mov	x19, x4
	mov	x21, x2
Lloh0:
	adrp	x8, _LDNS_RR_CLASS_IN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LDNS_RR_CLASS_IN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x1, #0
	csel	x2, x8, x1, eq
Lloh3:
	adrp	x8, _LDNS_RR_TYPE_SOA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LDNS_RR_TYPE_SOA@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _LDNS_RD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LDNS_RD@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	bl	_ldns_pkt_query_new
	mov	x20, x0
	cbz	x0, LBB0_7
; %bb.3:
Lloh9:
	adrp	x8, _LDNS_PACKET_UPDATE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LDNS_PACKET_UPDATE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ldns_pkt_set_opcode
	ldr	w0, [x20, #8]
	bl	_ldns_rr_list_deep_free
	mov	x0, x22
	bl	_ldns_rr_list_clone
	mov	x1, x0
	mov	x0, x20
	bl	_ldns_pkt_set_authority
	mov	x0, x22
	bl	_ldns_rr_list_rr_count
	mov	x1, x0
	mov	x0, x20
	bl	_ldns_update_set_upcount
	cbz	x21, LBB0_5
; %bb.4:
	ldr	w0, [x20, #4]
	bl	_ldns_rr_list_deep_free
	mov	x0, x21
	bl	_ldns_rr_list_clone
	mov	x1, x0
	mov	x0, x20
	bl	_ldns_pkt_set_answer
	mov	x0, x21
	bl	_ldns_rr_list_rr_count
	mov	x1, x0
	mov	x0, x20
	bl	_ldns_update_set_prcount
LBB0_5:
	cbz	x19, LBB0_7
; %bb.6:
	ldr	w0, [x20]
	bl	_ldns_rr_list_deep_free
	mov	x0, x19
	bl	_ldns_rr_list_clone
	mov	x1, x0
	mov	x0, x20
	bl	_ldns_pkt_set_additional
	mov	x0, x19
	bl	_ldns_rr_list_rr_count
	mov	x1, x0
	mov	x0, x20
	bl	_ldns_update_set_adcount
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_RR_CLASS_IN,8,3           ; @LDNS_RR_CLASS_IN
	.comm	_LDNS_RR_TYPE_SOA,4,2           ; @LDNS_RR_TYPE_SOA
	.comm	_LDNS_RD,4,2                    ; @LDNS_RD
	.comm	_LDNS_PACKET_UPDATE,4,2         ; @LDNS_PACKET_UPDATE
.subsections_via_symbols
