	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen_dns_msg
_gen_dns_msg:                           ## @gen_dns_msg
	.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
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	$16, %esi
	callq	_regional_alloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r12
	leaq	8(%rax), %rdi
	movq	%rbx, %rsi
	movl	$8, %edx
	callq	_memcpy
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movq	%r15, %rdi
	callq	_regional_alloc_init
	movl	%eax, 8(%r12)
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movl	$4, %esi
	movq	%r15, %rdi
	callq	_regional_alloc
	movq	%rax, %rcx
	movq	%rax, (%r12)
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.3:
	movq	_RR_COUNT_MAX@GOTPCREL(%rip), %rcx
	cmpq	%r14, (%rcx)
	jb	LBB0_7
## %bb.4:
	shlq	$3, %r14
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_regional_alloc
	movq	(%r12), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	cmoveq	%rax, %r12
	movq	%r12, %rax
	jmp	LBB0_7
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RR_COUNT_MAX,8,3               ## @RR_COUNT_MAX
	.no_dead_strip	_gen_dns_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen_dns_msg
_gen_dns_msg:                           ; @gen_dns_msg
	.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	x21, x2
	mov	x22, x1
	mov	x20, x0
	mov	w1, #16
	bl	_regional_alloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	add	x0, x0, #8
	mov	x1, x22
	mov	w2, #8
	bl	_memcpy
	ldp	w2, w1, [x22]
	mov	x0, x20
	bl	_regional_alloc_init
	str	w0, [x19, #8]
	cbz	w0, LBB0_5
; %bb.2:
	mov	x0, x20
	mov	w1, #4
	bl	_regional_alloc
	mov	x8, x0
	mov	x0, #0
	str	x8, [x19]
	cbz	x8, LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _RR_COUNT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RR_COUNT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x21
	b.lo	LBB0_6
; %bb.4:
	lsl	x1, x21, #3
	mov	x0, x20
	bl	_regional_alloc
	ldr	x8, [x19]
	str	x0, [x8]
	cmp	x0, #0
	csel	x0, xzr, x19, eq
	b	LBB0_6
LBB0_5:
	mov	x0, #0
LBB0_6:
	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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RR_COUNT_MAX,8,3               ; @RR_COUNT_MAX
	.no_dead_strip	_gen_dns_msg
.subsections_via_symbols
