	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tar_pack                       ## -- Begin function tar_pack
	.p2align	4, 0x90
_tar_pack:                              ## @tar_pack
	.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
	subq	$1056, %rsp                     ## imm = 0x420
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leal	-1(%rdx), %eax
	cmpl	$8, %eax
	ja	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	leaq	-48(%rbp), %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_sprintf
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	leaq	-48(%rbp), %rdi
	callq	_strcpy
LBB0_3:
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movq	_O_TRUNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_O_EXCL@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$432, %edx                      ## imm = 0x1B0
	callq	_open
	testl	%eax, %eax
	js	LBB0_7
## %bb.4:
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_dup
	testl	%eax, %eax
	js	LBB0_8
## %bb.5:
	leaq	-48(%rbp), %rsi
	movl	%eax, %edi
	callq	_gzdopen
	movl	%eax, %r12d
	leaq	-1080(%rbp), %rsi
	movq	%r15, %rdi
	callq	_stat
	movl	$-1, %r14d
	testq	%rax, %rax
	jne	LBB0_10
## %bb.6:
	callq	_dyn_mark
	leaq	L_.str.2(%rip), %rdx
	leaq	-1080(%rbp), %rcx
	movl	%r12d, %edi
	movq	%r15, %rsi
	callq	_rec_tar_pack
	movl	%eax, %r14d
	callq	_dyn_release
	leaq	-1072(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_memset
	movl	%r12d, %edi
	movq	%r15, %rsi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_gzwrite
	xorl	%edi, %edi
	cmpl	$1024, %eax                     ## imm = 0x400
	sete	%dil
	callq	_assert
	movl	%r12d, %edi
	callq	_gzclose
	movq	_Z_OK@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	movl	%ebx, %edi
	callq	_fsync
	shrq	$63, %rax
	xorl	$1, %eax
	movl	%eax, %edi
	callq	_assert
	movl	%ebx, %edi
	callq	_close
	shrq	$63, %rax
	xorl	$1, %eax
	movl	%eax, %edi
	callq	_assert
	jmp	LBB0_10
LBB0_7:
	movq	_TAR_PACK_ERR_OPEN@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movl	%ebx, %edi
	callq	_close
	shrq	$63, %rax
	xorl	$1, %eax
	movl	%eax, %edi
	callq	_assert
	movq	_TAR_PACK_ERR_DUP@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %r14d
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%r14d, %eax
	addq	$1056, %rsp                     ## imm = 0x420
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wb%d"

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

	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_EXCL,4,2                     ## @O_EXCL
	.comm	_TAR_PACK_ERR_OPEN,4,2          ## @TAR_PACK_ERR_OPEN
	.comm	_TAR_PACK_ERR_DUP,4,2           ## @TAR_PACK_ERR_DUP
L_.str.2:                               ## @.str.2
	.space	1

	.comm	_Z_OK,8,3                       ## @Z_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tar_pack                       ; -- Begin function tar_pack
	.p2align	2
_tar_pack:                              ; @tar_pack
	.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
	sub	sp, sp, #1056
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	sub	w8, w2, #1
	cmp	w8, #8
	b.hi	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	sub	x0, x29, #48
	bl	_sprintf
	b	LBB0_3
LBB0_2:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	sub	x0, x29, #48
	bl	_strcpy
LBB0_3:
Lloh7:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh11:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh13:
	adrp	x9, _O_WRONLY@GOTPAGE
Lloh14:
	ldr	x9, [x9, _O_WRONLY@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh16:
	adrp	x9, _O_EXCL@GOTPAGE
Lloh17:
	ldr	x9, [x9, _O_EXCL@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x19
	mov	w2, #432
	bl	_open
	tbnz	w0, #31, LBB0_7
; %bb.4:
	mov	x19, x0
	bl	_dup
	tbnz	w0, #31, LBB0_8
; %bb.5:
	sub	x1, x29, #48
	bl	_gzdopen
	mov	x21, x0
	add	x1, sp, #8
	mov	x0, x20
	bl	_stat
	cbz	x0, LBB0_9
; %bb.6:
	mov	w20, #-1
	b	LBB0_10
LBB0_7:
Lloh19:
	adrp	x8, _TAR_PACK_ERR_OPEN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _TAR_PACK_ERR_OPEN@GOTPAGEOFF]
Lloh21:
	ldr	w20, [x8]
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_close
	lsr	x8, x0, #63
	eor	w0, w8, #0x1
	bl	_assert
Lloh22:
	adrp	x8, _TAR_PACK_ERR_DUP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _TAR_PACK_ERR_DUP@GOTPAGEOFF]
Lloh24:
	ldr	w20, [x8]
	b	LBB0_10
LBB0_9:
	bl	_dyn_mark
Lloh25:
	adrp	x2, l_.str.2@PAGE
Lloh26:
	add	x2, x2, l_.str.2@PAGEOFF
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x20
	bl	_rec_tar_pack
	mov	x20, x0
	bl	_dyn_release
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #1024
	bl	_memset
	add	x1, sp, #16
	mov	x0, x21
	mov	w2, #1024
	bl	_gzwrite
	cmp	w0, #1024
	cset	w0, eq
	bl	_assert
	mov	x0, x21
	bl	_gzclose
Lloh27:
	adrp	x8, _Z_OK@GOTPAGE
Lloh28:
	ldr	x8, [x8, _Z_OK@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, eq
	bl	_assert
	mov	x0, x19
	bl	_fsync
	lsr	x8, x0, #63
	eor	w0, w8, #0x1
	bl	_assert
	mov	x0, x19
	bl	_close
	lsr	x8, x0, #63
	eor	w0, w8, #0x1
	bl	_assert
LBB0_10:
	ldur	x8, [x29, #-40]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x20
	add	sp, sp, #1056
	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_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wb%d"

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

	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_EXCL,4,2                     ; @O_EXCL
	.comm	_TAR_PACK_ERR_OPEN,4,2          ; @TAR_PACK_ERR_OPEN
	.comm	_TAR_PACK_ERR_DUP,4,2           ; @TAR_PACK_ERR_DUP
l_.str.2:                               ; @.str.2
	.space	1

	.comm	_Z_OK,8,3                       ; @Z_OK
.subsections_via_symbols
