	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mandoc_xr_add                  ## -- Begin function mandoc_xr_add
	.p2align	4, 0x90
_mandoc_xr_add:                         ## @mandoc_xr_add
	.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
	movq	_xr_hash@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	callq	_strlen
	movslq	%eax, %r15
	leaq	1(%r15), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_strlen
	movslq	%eax, %r14
	leaq	(%r14,%r15), %r12
	addq	$2, %r12
	incq	%r14
	leal	48(%r12), %edi
	callq	_mandoc_malloc
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rbx
	movq	$0, 40(%rax)
	movq	8(%rax), %rdi
	movq	%rdi, (%rax)
	leaq	1(%rdi,%r15), %rax
	movq	_xr_hash@GOTPCREL(%rip), %r15
	movq	%rax, 16(%rbx)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 24(%rbx)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 28(%rbx)
	movl	$1, 32(%rbx)
	movq	%r13, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_memcpy
	movq	16(%rbx), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_memcpy
	movq	8(%rbx), %rdi
	leaq	(%rdi,%r12), %rax
	movq	%rax, -72(%rbp)
	leaq	-72(%rbp), %rsi
	callq	_ohash_interval
	movq	(%r15), %rdi
	movq	8(%rbx), %rsi
	movq	%r12, %rdx
	movl	%eax, %ecx
	callq	_ohash_lookup_memory
	movl	%eax, %r14d
	movq	(%r15), %rdi
	movl	%eax, %esi
	callq	_ohash_find
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	incl	32(%rax)
	cmpl	$-1, 24(%rax)
	sete	%dl
	movl	24(%rbx), %esi
	cmpl	$-1, %esi
	sete	%cl
	xorb	%dl, %cl
	cmpl	$-1, %esi
	jne	LBB0_5
## %bb.4:
	movl	$-1, 24(%rax)
LBB0_5:
	movzbl	%cl, %r14d
	movq	%rbx, %rdi
	callq	_free
	jmp	LBB0_6
LBB0_2:
	movq	(%r15), %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	callq	_ohash_insert
	movq	_xr_first@GOTPCREL(%rip), %rax
	movq	_xr_last@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	addq	$40, %rdx
	cmpq	$0, (%rax)
	cmoveq	%rax, %rdx
	movq	%rbx, (%rdx)
	movq	%rbx, (%rcx)
	xorl	%r14d, %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_xr_hash,8,3                    ## @xr_hash
	.comm	_xr_first,8,3                   ## @xr_first
	.comm	_xr_last,8,3                    ## @xr_last
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mandoc_xr_add                  ; -- Begin function mandoc_xr_add
	.p2align	2
_mandoc_xr_add:                         ; @mandoc_xr_add
	.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
Lloh0:
	adrp	x27, _xr_hash@GOTPAGE
Lloh1:
	ldr	x27, [x27, _xr_hash@GOTPAGEOFF]
	ldr	x8, [x27]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x22, x3
	mov	x23, x2
	mov	x20, x1
	mov	x21, x0
	bl	_strlen
	add	w8, w0, #1
	sxtw	x24, w8
	mov	x0, x20
	bl	_strlen
	add	w8, w0, #1
	sxtw	x25, w8
	add	x26, x25, x24
	add	w0, w26, #48
	bl	_mandoc_malloc
	mov	x19, x0
	str	xzr, [x0, #40]
	ldr	x0, [x0, #8]
	str	x0, [x19]
	add	x8, x0, x24
	str	x8, [x19, #16]
	stp	w23, w22, [x19, #24]
	mov	w8, #1
	str	w8, [x19, #32]
	mov	x1, x21
	mov	x2, x24
	bl	_memcpy
	ldr	x0, [x19, #16]
	mov	x1, x20
	mov	x2, x25
	bl	_memcpy
	ldr	x0, [x19, #8]
	add	x8, x0, x26
	str	x8, [sp, #8]
	add	x1, sp, #8
	bl	_ohash_interval
	mov	x3, x0
	ldr	x0, [x27]
	ldr	x1, [x19, #8]
	mov	x2, x26
	bl	_ohash_lookup_memory
	mov	x20, x0
	ldr	x0, [x27]
	mov	x1, x20
	bl	_ohash_find
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w8, [x0, #32]
	add	w8, w8, #1
	str	w8, [x0, #32]
	ldr	w8, [x0, #24]
	cmn	w8, #1
	cset	w8, eq
	ldr	w9, [x19, #24]
	cmn	w9, #1
	cset	w9, eq
	eor	w20, w8, w9
	b.ne	LBB0_4
; %bb.3:
	mov	w8, #-1
	str	w8, [x0, #24]
LBB0_4:
	mov	x0, x19
	bl	_free
	b	LBB0_7
LBB0_5:
	mov	w20, #0
	b	LBB0_7
LBB0_6:
	ldr	x0, [x27]
	mov	x1, x20
	mov	x2, x19
	bl	_ohash_insert
	mov	w20, #0
Lloh2:
	adrp	x8, _xr_first@GOTPAGE
Lloh3:
	ldr	x8, [x8, _xr_first@GOTPAGEOFF]
	ldr	x9, [x8]
Lloh4:
	adrp	x10, _xr_last@GOTPAGE
Lloh5:
	ldr	x10, [x10, _xr_last@GOTPAGEOFF]
	ldr	x11, [x10]
	add	x11, x11, #40
	cmp	x9, #0
	csel	x8, x8, x11, eq
	str	x19, [x8]
	str	x19, [x10]
LBB0_7:
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_xr_hash,8,3                    ; @xr_hash
	.comm	_xr_first,8,3                   ; @xr_first
	.comm	_xr_last,8,3                    ; @xr_last
.subsections_via_symbols
