	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function php_handle_png
_php_handle_png:                        ## @php_handle_png
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$8, %esi
	callq	_php_stream_seek
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	leaq	-25(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$9, %edx
	callq	_php_stream_read
	cmpl	$9, %eax
	jae	LBB0_4
LBB0_1:
	xorl	%eax, %eax
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	movl	$1, %edi
	movl	$12, %esi
	callq	_ecalloc
	movl	-25(%rbp), %ecx
	bswapl	%ecx
	movl	%ecx, (%rax)
	movl	-21(%rbp), %ecx
	bswapl	%ecx
	movl	%ecx, 4(%rax)
	movzbl	-17(%rbp), %ecx
	movl	%ecx, 8(%rax)
	jmp	LBB0_5
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.no_dead_strip	_php_handle_png
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function php_handle_png
_php_handle_png:                        ; @php_handle_png
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_php_stream_seek
	cbnz	x0, LBB0_2
; %bb.1:
	add	x1, sp, #15
	mov	x0, x19
	mov	w2, #9
	bl	_php_stream_read
	cmp	w0, #9
	b.hs	LBB0_5
LBB0_2:
	mov	x0, #0
LBB0_3:
	ldr	x8, [sp, #24]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_5:
	mov	w0, #1
	mov	w1, #12
	bl	_ecalloc
	ldur	w8, [sp, #15]
	rev	w8, w8
	str	w8, [x0]
	ldur	w8, [sp, #19]
	rev	w8, w8
	str	w8, [x0, #4]
	ldrb	w8, [sp, #23]
	str	w8, [x0, #8]
	b	LBB0_3
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.no_dead_strip	_php_handle_png
.subsections_via_symbols
