	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function phar_zip_applysignature
_phar_zip_applysignature:               ## @phar_zip_applysignature
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpl	$0, 16(%rdi)
	je	LBB0_2
## %bb.1:
	cmpq	$0, (%r15)
	je	LBB0_15
LBB0_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, -96(%rbp)
	movups	%xmm0, -112(%rbp)
	movq	$0, -80(%rbp)
	xorl	%eax, %eax
	callq	_php_stream_fopen_tmpfile
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%rax, %r14
	movl	12(%r13), %edi
	callq	_php_stream_tell
	movl	%eax, %ebx
	movl	12(%r13), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_php_stream_seek
	movl	12(%r13), %edi
	movq	%r14, %rsi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_php_stream_copy_to_stream_ex
	movl	8(%r13), %edi
	callq	_php_stream_tell
	movl	%eax, %ebx
	movl	8(%r13), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_php_stream_seek
	movl	8(%r13), %edi
	movq	%r14, %rsi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_php_stream_copy_to_stream_ex
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_ZSTR_VAL
	movq	%rax, %rbx
	movq	(%r12), %rdi
	callq	_ZSTR_LEN
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_php_stream_write
LBB0_5:
	movq	_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	(%r13), %r8
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rcx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_phar_create_signature
	cmpl	%eax, %ebx
	jne	LBB0_9
## %bb.6:
	movq	(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.7:
	movq	(%rdi), %rbx
	leaq	L_.str.1(%rip), %rdx
	xorl	%esi, %esi
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_spprintf
	movq	%rbx, %rdi
	callq	_efree
	jmp	LBB0_18
LBB0_8:
	movq	(%r13), %rdi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_20
LBB0_9:
	leaq	L_.str.2(%rip), %rax
	movq	%rax, -128(%rbp)
	movl	$19, -120(%rbp)
	xorl	%eax, %eax
	callq	_php_stream_fopen_tmpfile
	movq	%rax, %r12
	movq	%rax, -88(%rbp)
	movq	_PHAR_MOD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movl	$1, -116(%rbp)
	testq	%r12, %r12
	je	LBB0_19
## %bb.10:
	movq	(%r15), %rsi
	leaq	-56(%rbp), %rdi
	callq	_PHAR_SET_32
	leaq	-52(%rbp), %rdi
	movq	-72(%rbp), %rsi
	callq	_PHAR_SET_32
	movl	$8, %edi
	callq	_Z_UL
	movq	%rax, %rbx
	movl	$8, %edx
	movq	%r12, %rdi
	leaq	-56(%rbp), %rsi
	callq	_php_stream_write
	cmpq	%rax, %rbx
	jne	LBB0_16
## %bb.11:
	movq	-72(%rbp), %rbx
	movq	-64(%rbp), %rsi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	_php_stream_write
	cmpq	%rax, %rbx
	jne	LBB0_16
## %bb.12:
	movq	-64(%rbp), %rdi
	callq	_efree
	movq	-72(%rbp), %rax
	addq	$8, %rax
	movq	%rax, -104(%rbp)
	movq	%rax, -112(%rbp)
	movq	%r15, -96(%rbp)
	leaq	-128(%rbp), %rdi
	movq	%r13, %rsi
	callq	_phar_zip_changed_apply_int
	movq	%r14, %rdi
	callq	_php_stream_close
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	cmpq	$0, (%rax)
	jne	LBB0_21
LBB0_15:
	movq	_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_16:
	movq	-64(%rbp), %rdi
	callq	_efree
	movq	(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.17:
	movq	8(%r15), %rcx
	leaq	L_.str.4(%rip), %rdx
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_spprintf
LBB0_18:
	movq	%r14, %rdi
	callq	_php_stream_close
	jmp	LBB0_21
LBB0_19:
	movq	(%r13), %rdi
	leaq	L_.str.3(%rip), %rdx
LBB0_20:
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_spprintf
LBB0_21:
	movq	_FAILURE@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_24
## %bb.23:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phar error: unable to create temporary file for the signature file"

	.comm	_FAILURE,4,2                    ## @FAILURE
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
L_.str.1:                               ## @.str.1
	.asciz	"phar error: unable to write signature to zip-based phar: %s"

L_.str.2:                               ## @.str.2
	.asciz	".phar/signature.bin"

	.comm	_PHAR_MOD,4,2                   ## @PHAR_MOD
L_.str.3:                               ## @.str.3
	.asciz	"phar error: unable to create temporary file for signature"

L_.str.4:                               ## @.str.4
	.asciz	"phar error: unable to write signature to zip-based phar %s"

	.comm	_SUCCESS,4,2                    ## @SUCCESS
	.no_dead_strip	_phar_zip_applysignature
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function phar_zip_applysignature
_phar_zip_applysignature:               ; @phar_zip_applysignature
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	x8, [x21]
	cbz	x8, LBB0_14
LBB0_2:
	str	xzr, [sp, #56]
	movi.2d	v0, #0000000000000000
	stur	q0, [sp, #40]
	stur	q0, [sp, #24]
	bl	_php_stream_fopen_tmpfile
Lloh3:
	adrp	x24, _FAILURE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _FAILURE@GOTPAGEOFF]
	cbz	x0, LBB0_8
; %bb.3:
	mov	x19, x0
	ldr	w0, [x20, #12]
	bl	_php_stream_tell
	mov	x23, x0
	ldr	w0, [x20, #12]
Lloh5:
	adrp	x25, _SEEK_SET@GOTPAGE
Lloh6:
	ldr	x25, [x25, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x25]
	mov	w1, #0
	bl	_php_stream_seek
	ldr	w0, [x20, #12]
	mov	x1, x19
	mov	x2, x23
	mov	x3, #0
	bl	_php_stream_copy_to_stream_ex
	ldr	w0, [x20, #8]
	bl	_php_stream_tell
	mov	x23, x0
	ldr	w0, [x20, #8]
	ldr	w2, [x25]
	mov	w1, #0
	bl	_php_stream_seek
	ldr	w0, [x20, #8]
	mov	x1, x19
	mov	x2, x23
	mov	x3, #0
	bl	_php_stream_copy_to_stream_ex
	ldr	x0, [x22]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_ZSTR_VAL
	mov	x23, x0
	ldr	x0, [x22]
	bl	_ZSTR_LEN
	mov	x2, x0
	mov	x0, x19
	mov	x1, x23
	bl	_php_stream_write
LBB0_5:
	ldr	w22, [x24]
	ldr	x4, [x20]
	add	x2, sp, #64
	add	x3, sp, #72
	mov	x0, x21
	mov	x1, x19
	bl	_phar_create_signature
	cmp	w22, w0
	b.ne	LBB0_9
; %bb.6:
	ldr	x0, [x20]
	cbz	x0, LBB0_17
; %bb.7:
	ldr	x20, [x0]
	str	x20, [sp]
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #0
	bl	_spprintf
	mov	x0, x20
	bl	_efree
	b	LBB0_17
LBB0_8:
	ldr	x0, [x20]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_19
LBB0_9:
Lloh11:
	adrp	x8, l_.str.2@PAGE
Lloh12:
	add	x8, x8, l_.str.2@PAGEOFF
	str	x8, [sp, #8]
	mov	w8, #19
	str	w8, [sp, #16]
	bl	_php_stream_fopen_tmpfile
	str	x0, [sp, #48]
Lloh13:
	adrp	x8, _PHAR_MOD@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PHAR_MOD@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [sp, #56]
	mov	w8, #1
	str	w8, [sp, #20]
	cbz	x0, LBB0_18
; %bb.10:
	mov	x22, x0
	ldr	x1, [x21]
	add	x23, sp, #80
	add	x0, sp, #80
	bl	_PHAR_SET_32
	add	x0, x23, #4
	ldr	x1, [sp, #72]
	bl	_PHAR_SET_32
	mov	w0, #8
	bl	_Z_UL
	mov	x23, x0
	add	x1, sp, #80
	mov	x0, x22
	mov	w2, #8
	bl	_php_stream_write
	cmp	x23, x0
	b.ne	LBB0_15
; %bb.11:
	ldp	x1, x23, [sp, #64]
	mov	x0, x22
	mov	x2, x23
	bl	_php_stream_write
	cmp	x23, x0
	b.ne	LBB0_15
; %bb.12:
	ldr	x0, [sp, #64]
	bl	_efree
	ldr	x8, [sp, #72]
	add	x8, x8, #8
	stp	x8, x8, [sp, #24]
	str	x21, [sp, #40]
	add	x0, sp, #8
	mov	x1, x20
	bl	_phar_zip_changed_apply_int
	mov	x0, x19
	bl	_php_stream_close
	ldr	x8, [x20]
	cbz	x8, LBB0_14
; %bb.13:
	ldr	x8, [x8]
	cbnz	x8, LBB0_20
LBB0_14:
Lloh16:
	adrp	x8, _SUCCESS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SUCCESS@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	b	LBB0_21
LBB0_15:
	ldr	x0, [sp, #64]
	bl	_efree
	ldr	x0, [x20]
	cbz	x0, LBB0_17
; %bb.16:
	ldr	x8, [x21, #8]
	str	x8, [sp]
Lloh19:
	adrp	x2, l_.str.4@PAGE
Lloh20:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	w1, #0
	bl	_spprintf
LBB0_17:
	mov	x0, x19
	bl	_php_stream_close
	b	LBB0_20
LBB0_18:
	ldr	x0, [x20]
Lloh21:
	adrp	x2, l_.str.3@PAGE
Lloh22:
	add	x2, x2, l_.str.3@PAGEOFF
LBB0_19:
	mov	w1, #0
	bl	_spprintf
LBB0_20:
	ldr	w0, [x24]
LBB0_21:
	ldur	x8, [x29, #-72]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.22:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phar error: unable to create temporary file for the signature file"

	.comm	_FAILURE,4,2                    ; @FAILURE
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
l_.str.1:                               ; @.str.1
	.asciz	"phar error: unable to write signature to zip-based phar: %s"

l_.str.2:                               ; @.str.2
	.asciz	".phar/signature.bin"

	.comm	_PHAR_MOD,4,2                   ; @PHAR_MOD
l_.str.3:                               ; @.str.3
	.asciz	"phar error: unable to create temporary file for signature"

l_.str.4:                               ; @.str.4
	.asciz	"phar error: unable to write signature to zip-based phar %s"

	.comm	_SUCCESS,4,2                    ; @SUCCESS
	.no_dead_strip	_phar_zip_applysignature
.subsections_via_symbols
