	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tag_file
_tag_file:                              ## @tag_file
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_num_files@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_1
## %bb.2:
	movl	$4, %r12d
	xorl	%ebx, %ebx
	movq	_ifname@GOTPCREL(%rip), %r14
	movq	_fsize@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_get_file_size
	movq	(%r13), %rcx
	movq	%rax, (%rcx,%rbx,8)
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	addl	%eax, %r12d
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
	jmp	LBB0_6
LBB0_1:
	movl	$4, %r12d
LBB0_6:
	movl	%r12d, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_23
## %bb.7:
	movq	%rax, %r14
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_13
## %bb.8:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_fsize@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$4, %r13d
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	_ifname@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rbx), %edi
	movslq	%r13d, %r13
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%r13), %rsi
	movq	(%rax,%rbx,2), %rdx
	callq	_read_file_to_buf
	testl	%eax, %eax
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_fsize@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	(%rax,%rbx,2), %r13
	incq	%r14
	movslq	(%r15), %rcx
	addq	$4, %rbx
	cmpq	%rcx, %r14
	jl	LBB0_9
## %bb.12:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_13:
	movq	_dhp@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.14:
	movq	_fsize@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$200, %esi
	addq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_fixup_tag3
	jmp	LBB0_18
LBB0_4:
	movq	(%r14), %rax
	movl	(%rax,%rbx,4), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_ERR
	movl	$-1, %ebx
	jmp	LBB0_22
LBB0_23:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_ERR
	movl	$-1, %ebx
	jmp	LBB0_22
LBB0_10:
	movq	_ifname@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	leaq	L_.str.2(%rip), %rdi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_20
LBB0_15:
	movq	%r14, %rdi
	movl	%r12d, %esi
	cmpl	$1, %ecx
	jne	LBB0_17
## %bb.16:
	callq	_fixup_tag
	jmp	LBB0_18
LBB0_17:
	callq	_fixup_tag2
LBB0_18:
	movq	_ofname@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_write_buf_to_file
	testl	%eax, %eax
	je	LBB0_24
## %bb.19:
	leaq	L_.str.3(%rip), %rdi
LBB0_20:
	movl	(%rbx), %esi
	xorl	%eax, %eax
	callq	_ERR
	movl	$-1, %ebx
	jmp	LBB0_21
LBB0_24:
	xorl	%ebx, %ebx
LBB0_21:
	movq	%r14, %rdi
	callq	_free
LBB0_22:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dhp,8,3                        ## @dhp
	.comm	_num_files,4,2                  ## @num_files
	.comm	_ifname,8,3                     ## @ifname
	.comm	_fsize,8,3                      ## @fsize
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to get size of '%s'"

L_.str.1:                               ## @.str.1
	.asciz	"no memory for buffer\n"

L_.str.2:                               ## @.str.2
	.asciz	"unable to read from file '%s'"

	.comm	_ofname,4,2                     ## @ofname
L_.str.3:                               ## @.str.3
	.asciz	"unable to write to file '%s'"

	.no_dead_strip	_tag_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tag_file
_tag_file:                              ; @tag_file
	.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	x22, _num_files@GOTPAGE
Lloh1:
	ldr	x22, [x22, _num_files@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x21, _fsize@GOTPAGE
Lloh3:
	ldr	x21, [x21, _fsize@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x20, #0
	mov	w19, #4
Lloh4:
	adrp	x23, _ifname@GOTPAGE
Lloh5:
	ldr	x23, [x23, _ifname@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	w0, [x8, x20, lsl #2]
	bl	_get_file_size
	ldr	x8, [x21]
	str	x0, [x8, x20, lsl #3]
	tbnz	x0, #63, LBB0_12
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w19, w19, w0
	add	x20, x20, #1
	ldrsw	x8, [x22]
	cmp	x20, x8
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w19, #4
LBB0_5:
	mov	x0, x19
	bl	_malloc
	cbz	x0, LBB0_13
; %bb.6:
	mov	x20, x0
	ldr	w10, [x22]
	cmp	w10, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x24, #0
	mov	x23, #0
	mov	x25, #0
	ldr	x8, [x21]
	mov	w9, #4
Lloh6:
	adrp	x26, _ifname@GOTPAGE
Lloh7:
	ldr	x26, [x26, _ifname@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x26]
	ldr	w0, [x10, x23]
	sxtw	x27, w9
	add	x1, x20, x27
	ldr	x2, [x8, x24]
	bl	_read_file_to_buf
	cbnz	w0, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x21]
	ldr	x9, [x8, x24]
	add	x9, x9, x27
	add	x25, x25, #1
	ldrsw	x10, [x22]
	add	x23, x23, #4
	add	x24, x24, #8
	cmp	x25, x10
	b.lt	LBB0_8
LBB0_10:
Lloh8:
	adrp	x8, _dhp@GOTPAGE
Lloh9:
	ldr	x8, [x8, _dhp@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_16
; %bb.11:
	ldr	x8, [x21]
	ldr	x8, [x8]
	add	x1, x8, #200
	mov	x0, x20
	bl	_fixup_tag3
	b	LBB0_19
LBB0_12:
	ldr	x8, [x23]
	ldr	w8, [x8, x20, lsl #2]
	str	x8, [sp]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_14
LBB0_13:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_14:
	bl	_ERR
	mov	w19, #-1
	b	LBB0_24
LBB0_15:
	ldr	x8, [x26]
	add	x21, x8, x23
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_21
LBB0_16:
	mov	x0, x20
	mov	x1, x19
	cmp	w10, #1
	b.ne	LBB0_18
; %bb.17:
	bl	_fixup_tag
	b	LBB0_19
LBB0_18:
	bl	_fixup_tag2
LBB0_19:
Lloh17:
	adrp	x21, _ofname@GOTPAGE
Lloh18:
	ldr	x21, [x21, _ofname@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	x1, x20
	mov	x2, x19
	bl	_write_buf_to_file
	cbz	w0, LBB0_22
; %bb.20:
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_21:
	ldr	w8, [x21]
	str	x8, [sp]
	bl	_ERR
	mov	w19, #-1
	b	LBB0_23
LBB0_22:
	mov	w19, #0
LBB0_23:
	mov	x0, x20
	bl	_free
LBB0_24:
	mov	x0, x19
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_dhp,8,3                        ; @dhp
	.comm	_num_files,4,2                  ; @num_files
	.comm	_ifname,8,3                     ; @ifname
	.comm	_fsize,8,3                      ; @fsize
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to get size of '%s'"

l_.str.1:                               ; @.str.1
	.asciz	"no memory for buffer\n"

l_.str.2:                               ; @.str.2
	.asciz	"unable to read from file '%s'"

	.comm	_ofname,4,2                     ; @ofname
l_.str.3:                               ; @.str.3
	.asciz	"unable to write to file '%s'"

	.no_dead_strip	_tag_file
.subsections_via_symbols
