	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tag_write                      ## -- Begin function tag_write
	.p2align	4, 0x90
_tag_write:                             ## @tag_write
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_tag_files@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jle	LBB0_21
## %bb.1:
	movq	24(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.2:
	movq	_tag_data@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_ohash_qlookup
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ohash_find
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_MANDOCERR_TAG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%rbx), %r8
	leaq	L_.str(%rip), %rcx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_mandoc_msg
	movq	$0, 24(%rbx)
LBB0_4:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_fdopen
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	_MANDOCERR_FDOPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rcx
	movl	%ebx, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%rax, %r8
	callq	_mandoc_msg
LBB0_6:
	movq	_tag_data@GOTPCREL(%rip), %rdi
	leaq	-48(%rbp), %rsi
	callq	_ohash_first
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %rbx
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movq	_tag_data@GOTPCREL(%rip), %r14
	leaq	-48(%rbp), %r15
	leaq	L_.str.2(%rip), %r12
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	24(%rbx), %rdi
	callq	_free
	movq	%rbx, %rdi
	callq	_free
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ohash_next
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_16
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	testq	%r13, %r13
	je	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	$0, (%rbx)
	js	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	$0, 8(%rbx)
	je	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	movq	_tag_files@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r13), %rcx
	movq	16(%rbx), %rdx
	movq	24(%rbx), %rax
	movups	(%rax,%r15), %xmm0
	movups	16(%rax,%r15), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_fprintf
	incq	%r14
	addq	$32, %r15
	cmpq	8(%rbx), %r14
	jb	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	_tag_data@GOTPCREL(%rip), %r14
	leaq	-48(%rbp), %r15
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_7:
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_16:
	movq	_tag_data@GOTPCREL(%rip), %rdi
	callq	_ohash_delete
	testq	%r13, %r13
	je	LBB0_18
## %bb.17:
	movq	%r13, %rdi
	callq	_fclose
	movq	_tag_files@GOTPCREL(%rip), %rbx
	jmp	LBB0_19
LBB0_18:
	movq	_tag_files@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_close
LBB0_19:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	$-1, (%rbx)
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	movq	16(%rbx), %rdi
	callq	_unlink
	movq	16(%rbx), %rax
	movb	$0, (%rax)
LBB0_21:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tag_files,32,3                 ## @tag_files
	.comm	_tag_data,4,2                   ## @tag_data
	.comm	_MANDOCERR_TAG,4,2              ## @MANDOCERR_TAG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

L_.str.1:                               ## @.str.1
	.asciz	"w"

	.comm	_MANDOCERR_FDOPEN,4,2           ## @MANDOCERR_FDOPEN
	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"%s %s %zu\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tag_write                      ; -- Begin function tag_write
	.p2align	2
_tag_write:                             ; @tag_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x23, _tag_files@GOTPAGE
Lloh1:
	ldr	x23, [x23, _tag_files@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.1:
	ldr	x1, [x23, #24]
	cbz	x1, LBB0_4
; %bb.2:
Lloh2:
	adrp	x19, _tag_data@GOTPAGE
Lloh3:
	ldr	x19, [x19, _tag_data@GOTPAGEOFF]
	mov	x0, x19
	bl	_ohash_qlookup
	mov	x1, x0
	mov	x0, x19
	bl	_ohash_find
	cbnz	x0, LBB0_4
; %bb.3:
Lloh4:
	adrp	x8, _MANDOCERR_TAG@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MANDOCERR_TAG@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldr	x4, [x23, #24]
Lloh7:
	adrp	x3, l_.str@PAGE
Lloh8:
	add	x3, x3, l_.str@PAGEOFF
	mov	w1, #0
	mov	w2, #0
	bl	_mandoc_msg
	str	xzr, [x23, #24]
LBB0_4:
	ldr	w0, [x23]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fdopen
	mov	x19, x0
	cbnz	x0, LBB0_6
; %bb.5:
Lloh11:
	adrp	x8, _MANDOCERR_FDOPEN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MANDOCERR_FDOPEN@GOTPAGEOFF]
Lloh13:
	ldr	w20, [x8]
Lloh14:
	adrp	x8, _errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_strerror
	mov	x4, x0
Lloh17:
	adrp	x3, l_.str@PAGE
Lloh18:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	bl	_mandoc_msg
LBB0_6:
Lloh19:
	adrp	x0, _tag_data@GOTPAGE
Lloh20:
	ldr	x0, [x0, _tag_data@GOTPAGEOFF]
	add	x1, sp, #44
	bl	_ohash_first
	cbz	x0, LBB0_15
; %bb.7:
	mov	x22, x0
	mov	w24, #1
Lloh21:
	adrp	x20, _tag_data@GOTPAGE
Lloh22:
	ldr	x20, [x20, _tag_data@GOTPAGEOFF]
Lloh23:
	adrp	x21, l_.str.2@PAGE
Lloh24:
	add	x21, x21, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x0, [x22, #24]
	bl	_free
	mov	x0, x22
	bl	_free
	add	x1, sp, #44
	mov	x0, x20
	bl	_ohash_next
	mov	x22, x0
	cbz	x0, LBB0_16
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	cbz	x19, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x22]
	tbnz	x8, #63, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x24, #0
	mov	x25, #0
LBB0_13:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x3, [x23, #8]
	ldp	x2, x8, [x22, #16]
	add	x8, x8, x24
	ldp	q0, q1, [x8]
	stp	q0, q1, [sp]
	mov	x4, sp
	mov	x0, x19
	mov	x1, x21
	bl	_fprintf
	add	x25, x25, #1
	ldr	x8, [x22, #8]
	add	x24, x24, #32
	cmp	x25, x8
	b.lo	LBB0_13
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	w24, #0
	b	LBB0_8
LBB0_15:
	mov	w24, #1
LBB0_16:
Lloh25:
	adrp	x0, _tag_data@GOTPAGE
Lloh26:
	ldr	x0, [x0, _tag_data@GOTPAGEOFF]
	bl	_ohash_delete
	cbz	x19, LBB0_18
; %bb.17:
	mov	x0, x19
	bl	_fclose
	b	LBB0_19
LBB0_18:
	ldr	w0, [x23]
	bl	_close
LBB0_19:
	mov	w8, #-1
	str	w8, [x23]
	cbz	w24, LBB0_21
; %bb.20:
	ldr	x0, [x23, #16]
	bl	_unlink
	ldr	x8, [x23, #16]
	strb	wzr, [x8]
LBB0_21:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_tag_files,32,3                 ; @tag_files
	.comm	_tag_data,4,2                   ; @tag_data
	.comm	_MANDOCERR_TAG,4,2              ; @MANDOCERR_TAG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

l_.str.1:                               ; @.str.1
	.asciz	"w"

	.comm	_MANDOCERR_FDOPEN,4,2           ; @MANDOCERR_FDOPEN
	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"%s %s %zu\n"

.subsections_via_symbols
