	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function php_handle_gif
_php_handle_gif:                        ## @php_handle_gif
	.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
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$3, %esi
	callq	_php_stream_seek
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:
	leaq	-13(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$5, %edx
	callq	_php_stream_read
	cmpl	$5, %eax
	jne	LBB0_4
## %bb.3:
	movl	$1, %edi
	movl	$16, %esi
	callq	_ecalloc
	movzwl	-13(%rbp), %ecx
	movl	%ecx, (%rax)
	movzwl	-11(%rbp), %ecx
	movl	%ecx, 4(%rax)
	movsbl	-9(%rbp), %ecx
	movl	%ecx, %edx
	shrl	$7, %edx
	andl	$7, %ecx
	incl	%ecx
	andl	%edx, %ecx
	movl	%ecx, 8(%rax)
	movl	$3, 12(%rax)
	jmp	LBB0_5
LBB0_4:
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.no_dead_strip	_php_handle_gif
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function php_handle_gif
_php_handle_gif:                        ; @php_handle_gif
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #3
	bl	_php_stream_seek
	cbnz	x0, LBB0_3
; %bb.1:
	add	x1, sp, #11
	mov	x0, x19
	mov	w2, #5
	bl	_php_stream_read
	cmp	w0, #5
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #1
	mov	w1, #16
	bl	_ecalloc
	ldurh	w8, [sp, #11]
	str	w8, [x0]
	ldurh	w8, [sp, #13]
	str	w8, [x0, #4]
	ldrb	w8, [sp, #15]
	lsl	w9, w8, #24
	and	w8, w8, #0x7
	add	w8, w8, #1
	and	w8, w8, w9, asr #31
	mov	w9, #3
	stp	w8, w9, [x0, #8]
	b	LBB0_4
LBB0_3:
	mov	x0, #0
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.no_dead_strip	_php_handle_gif
.subsections_via_symbols
