	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_attach_edns_record             ## -- Begin function attach_edns_record
	.p2align	4, 0x90
_attach_edns_record:                    ## @attach_edns_record
	.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
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.1:
	movq	%rsi, %r14
	cmpl	$0, 32(%rsi)
	je	LBB0_9
## %bb.2:
	movq	%rdi, %r12
	movl	$10, %esi
	callq	_sldns_buffer_read_u16_at
	leaq	1(%rax), %rdx
	movl	$10, %esi
	movq	%r12, %rdi
	callq	_sldns_buffer_write_u16_at
	movq	%r12, %rdi
	callq	_sldns_buffer_limit
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_sldns_buffer_clear
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_sldns_buffer_set_position
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_sldns_buffer_write_u8
	movq	_LDNS_RR_TYPE_OPT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	callq	_sldns_buffer_write_u16
	movq	(%r14), %rsi
	movq	%r12, %rdi
	callq	_sldns_buffer_write_u16
	movl	28(%r14), %esi
	movq	%r12, %rdi
	callq	_sldns_buffer_write_u8
	movl	24(%r14), %esi
	movq	%r12, %rdi
	callq	_sldns_buffer_write_u8
	movq	8(%r14), %rsi
	movq	%r12, %rdi
	callq	_sldns_buffer_write_u16
	movq	%r12, %rdi
	callq	_sldns_buffer_position
	movq	%rax, %r15
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_sldns_buffer_write_u16
	movq	16(%r14), %rbx
	testq	%rbx, %rbx
	jne	LBB0_3
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	24(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rsi
	movq	%r12, %rdi
	callq	_sldns_buffer_write_u16
	movq	8(%rbx), %rsi
	movq	%r12, %rdi
	callq	_sldns_buffer_write_u16
	movq	8(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	16(%rbx), %esi
	movq	%r12, %rdi
	callq	_sldns_buffer_write
	jmp	LBB0_5
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpq	$0, 16(%r14)
	je	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	callq	_sldns_buffer_position
	subq	%r15, %rax
	leaq	-2(%rax), %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_sldns_buffer_write_u16_at
LBB0_8:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sldns_buffer_flip              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_RR_TYPE_OPT,8,3           ## @LDNS_RR_TYPE_OPT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_attach_edns_record             ; -- Begin function attach_edns_record
	.p2align	2
_attach_edns_record:                    ; @attach_edns_record
	.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
	cbz	x1, LBB0_6
; %bb.1:
	mov	x20, x1
	ldr	w8, [x1, #32]
	cbz	w8, LBB0_6
; %bb.2:
	mov	x19, x0
	mov	w1, #10
	bl	_sldns_buffer_read_u16_at
	add	x2, x0, #1
	mov	x0, x19
	mov	w1, #10
	bl	_sldns_buffer_write_u16_at
	mov	x0, x19
	bl	_sldns_buffer_limit
	mov	x21, x0
	mov	x0, x19
	bl	_sldns_buffer_clear
	mov	x0, x19
	mov	x1, x21
	bl	_sldns_buffer_set_position
	mov	x0, x19
	mov	w1, #0
	bl	_sldns_buffer_write_u8
Lloh0:
	adrp	x8, _LDNS_RR_TYPE_OPT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LDNS_RR_TYPE_OPT@GOTPAGEOFF]
Lloh2:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_sldns_buffer_write_u16
	ldr	x1, [x20]
	mov	x0, x19
	bl	_sldns_buffer_write_u16
	ldr	w1, [x20, #28]
	mov	x0, x19
	bl	_sldns_buffer_write_u8
	ldr	w1, [x20, #24]
	mov	x0, x19
	bl	_sldns_buffer_write_u8
	ldr	x1, [x20, #8]
	mov	x0, x19
	bl	_sldns_buffer_write_u16
	mov	x0, x19
	bl	_sldns_buffer_position
	mov	x21, x0
	mov	x0, x19
	mov	x1, #0
	bl	_sldns_buffer_write_u16
	ldr	x22, [x20, #16]
	cbnz	x22, LBB0_4
	b	LBB0_9
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x22, [x22, #24]
	cbz	x22, LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x22]
	mov	x0, x19
	bl	_sldns_buffer_write_u16
	ldr	x1, [x22, #8]
	mov	x0, x19
	bl	_sldns_buffer_write_u16
	ldr	x2, [x22, #8]
	cbz	x2, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x22, #16]
	mov	x0, x19
	bl	_sldns_buffer_write
	b	LBB0_3
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
LBB0_7:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_sldns_buffer_position
	sub	x8, x0, x21
	sub	x2, x8, #2
	mov	x0, x19
	mov	x1, x21
	bl	_sldns_buffer_write_u16_at
LBB0_9:
	mov	x0, x19
	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
	b	_sldns_buffer_flip
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_RR_TYPE_OPT,8,3           ; @LDNS_RR_TYPE_OPT
.subsections_via_symbols
