	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phar_create_writeable_entry    ## -- Begin function phar_create_writeable_entry
	.p2align	4, 0x90
_phar_create_writeable_entry:           ## @phar_create_writeable_entry
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rsi), %rax
	movq	_PHAR_MOD@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_3
## %bb.1:
	movl	64(%rbx), %edi
	xorl	%esi, %esi
	callq	_php_stream_truncate_set_size
	jmp	LBB0_2
LBB0_3:
	movq	%rdx, %r15
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.4:
	movq	$0, (%r15)
LBB0_5:
	movq	80(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_efree
	movq	$0, 80(%rbx)
	xorl	%eax, %eax
	cmpq	$0, 72(%rbx)
	movq	_TAR_FILE@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	cmovel	%eax, %ecx
	movb	%cl, 12(%rbx)
LBB0_7:
	xorl	%eax, %eax
	callq	_php_stream_fopen_tmpfile
	movl	%eax, 64(%rbx)
	testl	%eax, %eax
	je	LBB0_8
LBB0_2:
	movq	24(%rbx), %rax
	movq	%rax, 56(%rbx)
	movl	$1, 8(%rbx)
	movl	$1, (%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	movq	$0, 48(%rbx)
	movq	_PHAR_ENT_PERM_DEF_FILE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	movq	(%r12), %rax
	movq	%rax, (%rbx)
	movq	$0, 16(%rbx)
	movq	_SUCCESS@GOTPCREL(%rip), %rbx
LBB0_10:
	movl	(%rbx), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_FAILURE@GOTPCREL(%rip), %rbx
	testq	%r15, %r15
	je	LBB0_10
## %bb.9:
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_spprintf
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_PHAR_MOD,8,3                   ## @PHAR_MOD
	.comm	_PHAR_ENT_PERM_DEF_FILE,8,3     ## @PHAR_ENT_PERM_DEF_FILE
	.comm	_SUCCESS,4,2                    ## @SUCCESS
	.comm	_TAR_FILE,1,0                   ## @TAR_FILE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phar error: unable to create temporary file"

	.comm	_FAILURE,4,2                    ## @FAILURE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phar_create_writeable_entry    ; -- Begin function phar_create_writeable_entry
	.p2align	2
_phar_create_writeable_entry:           ; @phar_create_writeable_entry
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x1]
Lloh0:
	adrp	x22, _PHAR_MOD@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PHAR_MOD@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x19, #64]
	mov	w1, #0
	bl	_php_stream_truncate_set_size
	b	LBB0_7
LBB0_2:
	mov	x21, x2
	cbz	x2, LBB0_4
; %bb.3:
	str	xzr, [x21]
LBB0_4:
	ldr	x0, [x19, #80]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_efree
	str	xzr, [x19, #80]
	ldr	x8, [x19, #72]
Lloh2:
	adrp	x9, _TAR_FILE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TAR_FILE@GOTPAGEOFF]
	ldrb	w9, [x9]
	cmp	x8, #0
	csel	w8, wzr, w9, eq
	strb	w8, [x19, #12]
LBB0_6:
	bl	_php_stream_fopen_tmpfile
	str	w0, [x19, #64]
	cbz	w0, LBB0_9
LBB0_7:
	mov	w8, #1
	str	w8, [x20]
	ldr	x9, [x19, #24]
	str	w8, [x19, #8]
	stp	xzr, xzr, [x19, #32]
	stp	xzr, x9, [x19, #48]
Lloh4:
	adrp	x8, _PHAR_ENT_PERM_DEF_FILE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PHAR_ENT_PERM_DEF_FILE@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldr	x9, [x22]
	str	x9, [x19]
	stp	xzr, x8, [x19, #16]
Lloh7:
	adrp	x8, _SUCCESS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SUCCESS@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	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_9:
	cbz	x21, LBB0_11
; %bb.10:
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	mov	w1, #0
	bl	_spprintf
LBB0_11:
Lloh11:
	adrp	x8, _FAILURE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FAILURE@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PHAR_MOD,8,3                   ; @PHAR_MOD
	.comm	_PHAR_ENT_PERM_DEF_FILE,8,3     ; @PHAR_ENT_PERM_DEF_FILE
	.comm	_SUCCESS,4,2                    ; @SUCCESS
	.comm	_TAR_FILE,1,0                   ; @TAR_FILE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phar error: unable to create temporary file"

	.comm	_FAILURE,4,2                    ; @FAILURE
.subsections_via_symbols
