	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function php_handle_jpc
_php_handle_jpc:                        ## @php_handle_jpc
	.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	%rdi, %r15
	callq	_php_stream_getc
	movq	_JPEG2000_MARKER_SIZ@GOTPCREL(%rip), %rcx
	cmpb	%al, (%rcx)
	jne	LBB0_1
## %bb.2:
	movl	$1, %edi
	movl	$24, %esi
	callq	_ecalloc
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_php_read2
	movq	%r15, %rdi
	callq	_php_read2
	movq	%r15, %rdi
	callq	_php_read4
	movq	%rax, 16(%r14)
	movq	%r15, %rdi
	callq	_php_read4
	movq	%rax, 8(%r14)
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$24, %esi
	callq	_php_stream_seek
	testq	%rax, %rax
	je	LBB0_4
LBB0_3:
	movq	%r14, %rdi
	callq	_efree
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_1:
	movq	_E_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_php_error_docref
LBB0_13:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r15, %rdi
	callq	_php_read2
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_5
## %bb.7:
	cmpl	$256, %eax                      ## imm = 0x100
	jg	LBB0_3
LBB0_8:
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_php_stream_getc
	leal	1(%rax), %ecx
	cmpl	%eax, %r12d
	cmovlel	%ecx, %r12d
	movq	%r15, %rdi
	callq	_php_stream_getc
	movq	%r15, %rdi
	callq	_php_stream_getc
	incl	%ebx
	cmpl	(%r14), %ebx
	jb	LBB0_11
	jmp	LBB0_12
LBB0_5:
	movq	%r15, %rdi
	callq	_php_stream_eof
	testq	%rax, %rax
	jne	LBB0_3
## %bb.6:
	movl	(%r14), %eax
	cmpl	$256, %eax                      ## imm = 0x100
	jg	LBB0_3
	jmp	LBB0_8
LBB0_9:
	xorl	%r12d, %r12d
LBB0_12:
	movl	%r12d, 4(%r14)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_JPEG2000_MARKER_SIZ,1,0        ## @JPEG2000_MARKER_SIZ
	.comm	_E_WARNING,4,2                  ## @E_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"JPEG2000 codestream corrupt(Expected SIZ marker not found after SOC)"

	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.no_dead_strip	_php_handle_jpc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function php_handle_jpc
_php_handle_jpc:                        ; @php_handle_jpc
	.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	x20, x0
	bl	_php_stream_getc
Lloh0:
	adrp	x8, _JPEG2000_MARKER_SIZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _JPEG2000_MARKER_SIZ@GOTPAGEOFF]
	ldrb	w8, [x8]
	cmp	w8, w0, uxtb
	b.ne	LBB0_3
; %bb.1:
	mov	w0, #1
	mov	w1, #24
	bl	_ecalloc
	mov	x19, x0
	mov	x0, x20
	bl	_php_read2
	mov	x0, x20
	bl	_php_read2
	mov	x0, x20
	bl	_php_read4
	str	x0, [x19, #16]
	mov	x0, x20
	bl	_php_read4
	str	x0, [x19, #8]
Lloh2:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #24
	bl	_php_stream_seek
	cbz	x0, LBB0_6
LBB0_2:
	mov	x0, x19
	bl	_efree
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x8, _E_WARNING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _E_WARNING@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, #0
	bl	_php_error_docref
LBB0_4:
	mov	x19, #0
LBB0_5:
	mov	x0, x19
	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_6:
	mov	x0, x20
	bl	_php_read2
	str	w0, [x19]
	cbz	w0, LBB0_11
; %bb.7:
	cmp	w0, #256
	b.gt	LBB0_2
LBB0_8:
	cbz	w0, LBB0_13
; %bb.9:
	mov	w22, #0
	mov	w21, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_php_stream_getc
	cmp	w21, w0
	csinc	w21, w21, w0, gt
	mov	x0, x20
	bl	_php_stream_getc
	mov	x0, x20
	bl	_php_stream_getc
	add	w22, w22, #1
	ldr	w8, [x19]
	cmp	w22, w8
	b.lo	LBB0_10
	b	LBB0_14
LBB0_11:
	mov	x0, x20
	bl	_php_stream_eof
	cbnz	x0, LBB0_2
; %bb.12:
	ldr	w0, [x19]
	cmp	w0, #256
	b.gt	LBB0_2
	b	LBB0_8
LBB0_13:
	mov	w21, #0
LBB0_14:
	str	w21, [x19, #4]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_JPEG2000_MARKER_SIZ,1,0        ; @JPEG2000_MARKER_SIZ
	.comm	_E_WARNING,4,2                  ; @E_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"JPEG2000 codestream corrupt(Expected SIZ marker not found after SOC)"

	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.no_dead_strip	_php_handle_jpc
.subsections_via_symbols
