	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_reply_info_answer_encode       ## -- Begin function reply_info_answer_encode
	.p2align	4, 0x90
_reply_info_answer_encode:              ## @reply_info_answer_encode
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r12d
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movl	%edx, %r13d
	movq	%rsi, %rbx
	movq	%rdi, %rsi
	movl	56(%rbp), %r8d
	cmpl	$0, 16(%rbp)
	je	LBB0_2
## %bb.1:
	cmpq	$0, 8(%rbx)
	je	LBB0_3
LBB0_2:
	movl	(%rbx), %edx
	movl	%edx, %edi
	jmp	LBB0_4
LBB0_3:
	movl	(%rbx), %edi
	movq	_BIT_AA@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	andl	%edi, %edx
LBB0_4:
	movq	_BIT_RD@GOTPCREL(%rip), %r9
	movq	_BIT_CD@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	orl	(%r9), %r14d
	movl	48(%rbp), %r9d
	andl	%ecx, %r14d
	orl	%edx, %r14d
	testl	%r8d, %r8d
	je	LBB0_6
## %bb.5:
	movq	_BIT_AD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%eax, %ecx
	xorl	%edx, %edx
	orl	%r9d, %ecx
	cmovnel	%eax, %edx
	orl	%edx, %r14d
LBB0_6:
	movl	32(%rbp), %r15d
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	cmpq	$0, (%rsi)
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_10
## %bb.7:
	callq	_FLAGS_GET_RCODE
	movq	_LDNS_RCODE_NOERROR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.8:
	movl	(%rbx), %edi
	callq	_FLAGS_GET_RCODE
	movq	_LDNS_RCODE_NXDOMAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_9:
	movq	_BIT_AA@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_BIT_AD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r14d
LBB0_10:
	movq	_BIT_QR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	%r14d, %edi
	callq	_log_assert
	movq	_LDNS_HEADER_SIZE@GOTPCREL(%rip), %r13
	xorl	%r12d, %r12d
	cmpl	%r15d, (%r13)
	ja	LBB0_20
## %bb.11:
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_sldns_buffer_capacity
	movl	%r15d, %ecx
	cmpq	%rcx, %rax
	jge	LBB0_13
## %bb.12:
	movq	%r12, %rdi
	callq	_sldns_buffer_capacity
	movq	%rax, %r15
LBB0_13:
	movl	(%r13), %ebx
	movq	40(%rbp), %r13
	movq	%r13, %rdi
	callq	_calc_edns_field_size
	addl	%ebx, %eax
	cmpl	%eax, %r15d
	jae	LBB0_14
## %bb.18:
	subq	$8, %rsp
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r14d, %ecx
	movq	%r12, %r8
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	movl	48(%rbp), %eax
	pushq	%rax
	pushq	%r15
	pushq	24(%rbp)
	callq	_reply_info_encode
	addq	$32, %rsp
	movl	$1, %r12d
	testl	%eax, %eax
	jne	LBB0_20
	jmp	LBB0_19
LBB0_14:
	movq	%r13, %rdi
	callq	_calc_edns_field_size
	movl	%eax, %r13d
	subl	%eax, %r15d
	subq	$8, %rsp
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r14d, %ecx
	movq	%r12, %rbx
	movq	%r12, %r8
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	movl	48(%rbp), %eax
	pushq	%rax
	pushq	%r15
	pushq	24(%rbp)
	callq	_reply_info_encode
	addq	$32, %rsp
	testl	%eax, %eax
	je	LBB0_19
## %bb.15:
	movl	$1, %r12d
	testl	%r13d, %r13d
	je	LBB0_20
## %bb.16:
	movq	%rbx, %rdi
	callq	_sldns_buffer_capacity
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_sldns_buffer_limit
	movl	%r13d, %ecx
	addq	%rax, %rcx
	cmpq	%rcx, %r14
	jl	LBB0_20
## %bb.17:
	movq	%rbx, %rdi
	movq	40(%rbp), %rsi
	callq	_attach_edns_record
	jmp	LBB0_20
LBB0_19:
	leaq	L_.str(%rip), %rdi
	callq	_log_err
	xorl	%r12d, %r12d
LBB0_20:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BIT_RD,4,2                     ## @BIT_RD
	.comm	_BIT_CD,4,2                     ## @BIT_CD
	.comm	_BIT_AA,4,2                     ## @BIT_AA
	.comm	_BIT_AD,4,2                     ## @BIT_AD
	.comm	_LDNS_RCODE_NOERROR,8,3         ## @LDNS_RCODE_NOERROR
	.comm	_LDNS_RCODE_NXDOMAIN,8,3        ## @LDNS_RCODE_NXDOMAIN
	.comm	_BIT_QR,4,2                     ## @BIT_QR
	.comm	_LDNS_HEADER_SIZE,4,2           ## @LDNS_HEADER_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reply encode: out of memory"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_reply_info_answer_encode       ; -- Begin function reply_info_answer_encode
	.p2align	2
_reply_info_answer_encode:              ; @reply_info_answer_encode
	.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	x19, x7
	mov	x22, x5
	str	x4, [sp, #8]                    ; 8-byte Folded Spill
	mov	x21, x2
	mov	x23, x1
	mov	x24, x0
	ldr	w8, [x29, #36]
	cbz	w6, LBB0_2
; %bb.1:
	ldr	x9, [x23, #8]
	cbz	x9, LBB0_3
LBB0_2:
	ldr	w9, [x23]
	mov	x0, x9
	b	LBB0_4
LBB0_3:
	ldr	w0, [x23]
Lloh0:
	adrp	x9, _BIT_AA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BIT_AA@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	bic	w9, w0, w9
LBB0_4:
	ldr	w20, [x29, #32]
Lloh3:
	adrp	x10, _BIT_RD@GOTPAGE
Lloh4:
	ldr	x10, [x10, _BIT_RD@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
Lloh6:
	adrp	x11, _BIT_CD@GOTPAGE
Lloh7:
	ldr	x11, [x11, _BIT_CD@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	orr	w10, w11, w10
	and	w10, w10, w3
	orr	w25, w10, w9
Lloh9:
	adrp	x27, _BIT_AD@GOTPAGE
Lloh10:
	ldr	x27, [x27, _BIT_AD@GOTPAGEOFF]
	cbz	w8, LBB0_6
; %bb.5:
	ldr	w8, [x27]
	and	w9, w8, w3
	orr	w9, w20, w9
	cmp	w9, #0
	csel	w8, wzr, w8, eq
	orr	w25, w25, w8
LBB0_6:
	ldr	w26, [x29, #16]
	ldr	x8, [x24]
	cbz	x8, LBB0_10
; %bb.7:
	bl	_FLAGS_GET_RCODE
Lloh11:
	adrp	x8, _LDNS_RCODE_NOERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LDNS_RCODE_NOERROR@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_9
; %bb.8:
	ldr	w0, [x23]
	bl	_FLAGS_GET_RCODE
Lloh14:
	adrp	x8, _LDNS_RCODE_NXDOMAIN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LDNS_RCODE_NXDOMAIN@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
LBB0_9:
Lloh17:
	adrp	x8, _BIT_AA@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BIT_AA@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	orr	w8, w8, w25
	ldr	w9, [x27]
	bic	w25, w8, w9
LBB0_10:
Lloh20:
	adrp	x8, _BIT_QR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BIT_QR@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	and	w0, w8, w25
	bl	_log_assert
Lloh23:
	adrp	x28, _LDNS_HEADER_SIZE@GOTPAGE
Lloh24:
	ldr	x28, [x28, _LDNS_HEADER_SIZE@GOTPAGEOFF]
	ldr	w8, [x28]
	cmp	w8, w26
	b.hi	LBB0_21
; %bb.11:
	ldr	x27, [x29, #24]
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_sldns_buffer_capacity
	cmp	x0, w26, uxtw
	b.ge	LBB0_13
; %bb.12:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_sldns_buffer_capacity
	mov	x26, x0
LBB0_13:
	ldr	w28, [x28]
	mov	x0, x27
	bl	_calc_edns_field_size
	add	w8, w0, w28
	cmp	w26, w8
	b.hs	LBB0_15
; %bb.14:
	str	w20, [sp]
	mov	x0, x24
	mov	x1, x23
	mov	x2, x21
	mov	x3, x25
	ldr	x4, [sp, #8]                    ; 8-byte Folded Reload
	mov	x5, x22
	mov	x6, x19
	mov	x7, x26
	bl	_reply_info_encode
	cbnz	w0, LBB0_19
	b	LBB0_20
LBB0_15:
	mov	x0, x27
	bl	_calc_edns_field_size
	mov	x28, x0
	sub	w7, w26, w0
	str	w20, [sp]
	mov	x0, x24
	mov	x1, x23
	mov	x2, x21
	mov	x3, x25
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	mov	x4, x21
	mov	x5, x22
	mov	x6, x19
	bl	_reply_info_encode
	cbz	w0, LBB0_20
; %bb.16:
	cbz	w28, LBB0_19
; %bb.17:
	mov	x0, x21
	bl	_sldns_buffer_capacity
	mov	x20, x0
	mov	x0, x21
	bl	_sldns_buffer_limit
	add	x8, x0, w28, uxtw
	cmp	x20, x8
	b.lt	LBB0_19
; %bb.18:
	mov	x0, x21
	mov	x1, x27
	bl	_attach_edns_record
LBB0_19:
	mov	w0, #1
	b	LBB0_22
LBB0_20:
Lloh25:
	adrp	x0, l_.str@PAGE
Lloh26:
	add	x0, x0, l_.str@PAGEOFF
	bl	_log_err
LBB0_21:
	mov	w0, #0
LBB0_22:
	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
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_BIT_RD,4,2                     ; @BIT_RD
	.comm	_BIT_CD,4,2                     ; @BIT_CD
	.comm	_BIT_AA,4,2                     ; @BIT_AA
	.comm	_BIT_AD,4,2                     ; @BIT_AD
	.comm	_LDNS_RCODE_NOERROR,8,3         ; @LDNS_RCODE_NOERROR
	.comm	_LDNS_RCODE_NXDOMAIN,8,3        ; @LDNS_RCODE_NXDOMAIN
	.comm	_BIT_QR,4,2                     ; @BIT_QR
	.comm	_LDNS_HEADER_SIZE,4,2           ; @LDNS_HEADER_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reply encode: out of memory"

.subsections_via_symbols
