	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phar_create_signature          ## -- Begin function phar_create_signature
	.p2align	4, 0x90
_phar_create_signature:                 ## @phar_create_signature
	.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	$1144, %rsp                     ## imm = 0x478
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, %rdi
	callq	_php_stream_rewind
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_efree
	movq	$0, (%r12)
LBB0_2:
	movl	8(%r12), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	movq	%rbx, -1160(%rbp)               ## 8-byte Spill
	ja	LBB0_17
## %bb.3:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_4:
	movq	%r14, -1152(%rbp)               ## 8-byte Spill
	leaq	-1140(%rbp), %rdi
	callq	_PHP_SHA512Init
	leaq	-1072(%rbp), %rsi
	movq	%r15, %rdi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_php_stream_read
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	leaq	-1140(%rbp), %r13
	leaq	-1072(%rbp), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_PHP_SHA512Update
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_php_stream_read
	testq	%rax, %rax
	jne	LBB0_6
LBB0_7:
	leaq	-1136(%rbp), %rbx
	leaq	-1140(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_PHP_SHA512Final
	movq	%rbx, %rdi
	movl	$64, %esi
	callq	_estrndup
	movq	%rax, %rdi
	movq	-1160(%rbp), %rax               ## 8-byte Reload
	movq	%rdi, (%rax)
	movq	-1152(%rbp), %rax               ## 8-byte Reload
	movq	$64, (%rax)
	movl	$64, %esi
	jmp	LBB0_26
LBB0_17:
	movl	$130, 8(%r12)
LBB0_18:
	leaq	-1140(%rbp), %rdi
	callq	_PHP_SHA1Init
	leaq	-1072(%rbp), %rsi
	movq	%r15, %rdi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_php_stream_read
	testq	%rax, %rax
	je	LBB0_21
## %bb.19:
	leaq	-1140(%rbp), %r13
	leaq	-1072(%rbp), %rbx
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_PHP_SHA1Update
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_php_stream_read
	testq	%rax, %rax
	jne	LBB0_20
LBB0_21:
	leaq	-1136(%rbp), %rbx
	leaq	-1140(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_PHP_SHA1Final
	movq	%rbx, %rdi
	movl	$20, %esi
	callq	_estrndup
	movq	%rax, %rdi
	movq	-1160(%rbp), %rax               ## 8-byte Reload
	movq	%rdi, (%rax)
	movq	$20, (%r14)
	movl	$20, %esi
	jmp	LBB0_26
LBB0_8:
	movq	%r14, -1152(%rbp)               ## 8-byte Spill
	leaq	-1140(%rbp), %rdi
	callq	_PHP_SHA256Init
	leaq	-1072(%rbp), %rsi
	movq	%r15, %rdi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_php_stream_read
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	leaq	-1140(%rbp), %r13
	leaq	-1072(%rbp), %r14
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_PHP_SHA256Update
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_php_stream_read
	testq	%rax, %rax
	jne	LBB0_10
LBB0_11:
	leaq	-1136(%rbp), %rbx
	leaq	-1140(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_PHP_SHA256Final
	movq	%rbx, %rdi
	movl	$32, %esi
	callq	_estrndup
	movq	%rax, %rdi
	movq	-1160(%rbp), %rax               ## 8-byte Reload
	movq	%rdi, (%rax)
	movq	-1152(%rbp), %rax               ## 8-byte Reload
	movq	$32, (%rax)
	movl	$32, %esi
	jmp	LBB0_26
LBB0_12:
	movq	%r14, -1152(%rbp)               ## 8-byte Spill
	movq	$0, -1072(%rbp)
	movq	$0, -1136(%rbp)
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_php_stream_seek
	movq	_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -1164(%rbp)               ## 4-byte Spill
	movq	%r15, %rdi
	callq	_php_stream_tell
	movl	%eax, %r14d
	movq	_openssl_privatekey@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PHAR_G
	movl	%eax, %ebx
	movq	_openssl_privatekey_len@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PHAR_G
	leaq	-1136(%rbp), %rcx
	movq	%rcx, (%rsp)
	leaq	-1072(%rbp), %r9
	movl	$1, %edi
	movq	%r15, %rsi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	callq	_phar_call_openssl_signverify
	cmpl	%eax, -1164(%rbp)               ## 4-byte Folded Reload
	jne	LBB0_16
## %bb.13:
	testq	%r13, %r13
	je	LBB0_15
## %bb.14:
	movl	16(%r12), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_spprintf
LBB0_15:
	movq	_FAILURE@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_22:
	movq	%r14, -1152(%rbp)               ## 8-byte Spill
	leaq	-1140(%rbp), %rdi
	callq	_PHP_MD5Init
	leaq	-1072(%rbp), %rsi
	movq	%r15, %rdi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_php_stream_read
	testq	%rax, %rax
	je	LBB0_25
## %bb.23:
	leaq	-1140(%rbp), %r13
	leaq	-1072(%rbp), %r14
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_PHP_MD5Update
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_php_stream_read
	testq	%rax, %rax
	jne	LBB0_24
LBB0_25:
	leaq	-1136(%rbp), %rbx
	leaq	-1140(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_PHP_MD5Final
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_estrndup
	movq	%rax, %rdi
	movq	-1160(%rbp), %rax               ## 8-byte Reload
	movq	%rdi, (%rax)
	movq	-1152(%rbp), %rax               ## 8-byte Reload
	movq	$16, (%rax)
	movl	$16, %esi
	jmp	LBB0_26
LBB0_16:
	movq	-1072(%rbp), %rdi
	movq	-1160(%rbp), %rax               ## 8-byte Reload
	movq	%rdi, (%rax)
	movq	-1136(%rbp), %rsi
	movq	-1152(%rbp), %rax               ## 8-byte Reload
	movq	%rsi, (%rax)
LBB0_26:
	movq	%r12, %rdx
	callq	_phar_hex_str
	movl	%eax, 12(%r12)
	movq	_SUCCESS@GOTPCREL(%rip), %rax
LBB0_27:
	movl	(%rax), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_29
## %bb.28:
	addq	$1144, %rsp                     ## imm = 0x478
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_8
	.long	L0_0_set_18
	.long	L0_0_set_12
	.long	L0_0_set_22
	.end_data_region
                                        ## -- End function
	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_FAILURE,4,2                    ## @FAILURE
	.comm	_openssl_privatekey,4,2         ## @openssl_privatekey
	.comm	_openssl_privatekey_len,4,2     ## @openssl_privatekey_len
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to write phar \"%s\" with requested openssl signature"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phar_create_signature          ; -- Begin function phar_create_signature
	.p2align	2
_phar_create_signature:                 ; @phar_create_signature
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #1120
	mov	x23, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, 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, #-88]
	mov	x0, x1
	bl	_php_stream_rewind
	ldr	x0, [x19]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_efree
	str	xzr, [x19]
LBB0_2:
	ldr	w8, [x19, #8]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_8
; %bb.3:
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_4
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_4:
	add	x0, sp, #20
	bl	_PHP_SHA512Init
	add	x1, sp, #88
	mov	x0, x22
	mov	w2, #1024
	bl	_php_stream_read
	cbz	x0, LBB0_7
; %bb.5:
	mov	x2, x0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #20
	add	x1, sp, #88
	bl	_PHP_SHA512Update
	add	x1, sp, #88
	mov	x0, x22
	mov	w2, #1024
	bl	_php_stream_read
	mov	x2, x0
	cbnz	x0, LBB0_6
LBB0_7:
	add	x0, sp, #24
	add	x1, sp, #20
	bl	_PHP_SHA512Final
	mov	w22, #64
	add	x0, sp, #24
	mov	w1, #64
	b	LBB0_25
LBB0_8:
	mov	w8, #130
	str	w8, [x19, #8]
LBB0_9:
	add	x0, sp, #20
	bl	_PHP_SHA1Init
	add	x1, sp, #88
	mov	x0, x22
	mov	w2, #1024
	bl	_php_stream_read
	cbz	x0, LBB0_12
; %bb.10:
	mov	x2, x0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #20
	add	x1, sp, #88
	bl	_PHP_SHA1Update
	add	x1, sp, #88
	mov	x0, x22
	mov	w2, #1024
	bl	_php_stream_read
	mov	x2, x0
	cbnz	x0, LBB0_11
LBB0_12:
	add	x0, sp, #24
	add	x1, sp, #20
	bl	_PHP_SHA1Final
	mov	w22, #20
	add	x0, sp, #24
	mov	w1, #20
	b	LBB0_25
LBB0_13:
	add	x0, sp, #20
	bl	_PHP_SHA256Init
	add	x1, sp, #88
	mov	x0, x22
	mov	w2, #1024
	bl	_php_stream_read
	cbz	x0, LBB0_16
; %bb.14:
	mov	x2, x0
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #20
	add	x1, sp, #88
	bl	_PHP_SHA256Update
	add	x1, sp, #88
	mov	x0, x22
	mov	w2, #1024
	bl	_php_stream_read
	mov	x2, x0
	cbnz	x0, LBB0_15
LBB0_16:
	add	x0, sp, #24
	add	x1, sp, #20
	bl	_PHP_SHA256Final
	mov	w22, #32
	add	x0, sp, #24
	mov	w1, #32
	b	LBB0_25
LBB0_17:
	str	xzr, [sp, #88]
	str	xzr, [sp, #24]
Lloh5:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x22
	mov	w1, #0
	bl	_php_stream_seek
Lloh8:
	adrp	x26, _FAILURE@GOTPAGE
Lloh9:
	ldr	x26, [x26, _FAILURE@GOTPAGEOFF]
	ldr	w27, [x26]
	mov	x0, x22
	bl	_php_stream_tell
	mov	x24, x0
Lloh10:
	adrp	x8, _openssl_privatekey@GOTPAGE
Lloh11:
	ldr	x8, [x8, _openssl_privatekey@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_PHAR_G
	mov	x25, x0
Lloh13:
	adrp	x8, _openssl_privatekey_len@GOTPAGE
Lloh14:
	ldr	x8, [x8, _openssl_privatekey_len@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_PHAR_G
	mov	x4, x0
	add	x5, sp, #88
	add	x6, sp, #24
	mov	w0, #1
	mov	x1, x22
	mov	x2, x24
	mov	x3, x25
	bl	_phar_call_openssl_signverify
	cmp	w27, w0
	b.ne	LBB0_29
; %bb.18:
	cbz	x23, LBB0_20
; %bb.19:
	ldr	w8, [x19, #16]
	str	x8, [sp]
Lloh16:
	adrp	x2, l_.str@PAGE
Lloh17:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x23
	mov	w1, #0
	bl	_spprintf
LBB0_20:
	ldr	w0, [x26]
	b	LBB0_27
LBB0_21:
	add	x0, sp, #20
	bl	_PHP_MD5Init
	add	x1, sp, #88
	mov	x0, x22
	mov	w2, #1024
	bl	_php_stream_read
	cbz	x0, LBB0_24
; %bb.22:
	mov	x2, x0
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #20
	add	x1, sp, #88
	bl	_PHP_MD5Update
	add	x1, sp, #88
	mov	x0, x22
	mov	w2, #1024
	bl	_php_stream_read
	mov	x2, x0
	cbnz	x0, LBB0_23
LBB0_24:
	add	x0, sp, #24
	add	x1, sp, #20
	bl	_PHP_MD5Final
	mov	w22, #16
	add	x0, sp, #24
	mov	w1, #16
LBB0_25:
	bl	_estrndup
	str	x0, [x21]
LBB0_26:
	str	x22, [x20]
	mov	x1, x22
	mov	x2, x19
	bl	_phar_hex_str
	str	w0, [x19, #12]
Lloh18:
	adrp	x8, _SUCCESS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SUCCESS@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
LBB0_27:
	ldur	x8, [x29, #-88]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_30
; %bb.28:
	add	sp, sp, #1120
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_29:
	ldr	x0, [sp, #88]
	str	x0, [x21]
	ldr	x22, [sp, #24]
	b	LBB0_26
LBB0_30:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_13-LBB0_4)>>2
	.byte	(LBB0_9-LBB0_4)>>2
	.byte	(LBB0_17-LBB0_4)>>2
	.byte	(LBB0_21-LBB0_4)>>2
                                        ; -- End function
	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_FAILURE,4,2                    ; @FAILURE
	.comm	_openssl_privatekey,4,2         ; @openssl_privatekey
	.comm	_openssl_privatekey_len,4,2     ; @openssl_privatekey_len
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to write phar \"%s\" with requested openssl signature"

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