	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function php_handle_iff
_php_handle_iff:                        ## @php_handle_iff
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-58(%rbp), %rsi
	movl	$8, %edx
	callq	_php_stream_read
	cmpl	$8, %eax
	jne	LBB0_16
## %bb.1:
	leaq	-54(%rbp), %r15
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_strncmp
	testq	%rax, %rax
	jne	LBB0_16
LBB0_3:
	leaq	-58(%rbp), %rsi
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_php_stream_read
	cmpl	$8, %eax
	jne	LBB0_16
## %bb.4:
	leaq	-58(%rbp), %r13
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_php_stream_seek
	testq	%rax, %rax
	jne	LBB0_16
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	$8, %edx
	callq	_php_stream_read
	cmpl	$8, %eax
	leaq	-54(%rbp), %r15
	jne	LBB0_16
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_php_ifd_get32s
	movl	%eax, %ebx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_php_ifd_get32s
	testl	%eax, %eax
	js	LBB0_16
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %esi
	andl	$1, %esi
	addl	%eax, %esi
	cmpl	$1112361028, %ebx               ## imm = 0x424D4844
	jne	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$9, %esi
	jb	LBB0_16
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	$9, %edx
	callq	_php_stream_read
	cmpl	$9, %eax
	jne	LBB0_16
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_php_ifd_get16s
	movl	%eax, %r12d
	leaq	-56(%rbp), %rdi
	movl	$1, %esi
	callq	_php_ifd_get16s
	testw	%r12w, %r12w
	jle	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %r15d
	testw	%ax, %ax
	jle	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movzbl	-50(%rbp), %eax
	testb	%al, %al
	je	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpb	$32, %al
	ja	LBB0_15
## %bb.13:
	movzbl	%al, %ebx
	movl	$1, %edi
	movl	$16, %esi
	callq	_ecalloc
	movw	%r12w, (%rax)
	movw	%r15w, 2(%rax)
	movw	%bx, 4(%rax)
	movq	$0, 8(%rax)
	jmp	LBB0_17
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_19
## %bb.18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ILBM"

L_.str.1:                               ## @.str.1
	.asciz	"PBM "

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function php_handle_iff
_php_handle_iff:                        ; @php_handle_iff
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	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]
	add	x20, sp, #14
	add	x1, sp, #14
	mov	w2, #8
	bl	_php_stream_read
	cmp	w0, #8
	b.ne	LBB0_16
; %bb.1:
	add	x20, x20, #4
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	w2, #4
	bl	_strncmp
	cbz	x0, LBB0_3
; %bb.2:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	w2, #4
	bl	_strncmp
	cbnz	x0, LBB0_16
LBB0_3:
	add	x21, sp, #14
	add	x1, sp, #14
	mov	x0, x19
	mov	w2, #8
	bl	_php_stream_read
	cmp	w0, #8
	b.ne	LBB0_16
; %bb.4:
	add	x21, x21, #2
	mov	w24, #18500
	movk	w24, #16973, lsl #16
Lloh7:
	adrp	x25, _SEEK_CUR@GOTPAGE
Lloh8:
	ldr	x25, [x25, _SEEK_CUR@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w2, [x25]
	mov	x0, x19
	bl	_php_stream_seek
	cbnz	x0, LBB0_16
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x1, sp, #14
	mov	x0, x19
	mov	w2, #8
	bl	_php_stream_read
	cmp	w0, #8
	b.ne	LBB0_16
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #14
	mov	w1, #1
	bl	_php_ifd_get32s
	mov	x22, x0
	mov	x0, x20
	mov	w1, #1
	bl	_php_ifd_get32s
	tbnz	w0, #31, LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	and	w8, w0, #0x1
	add	w1, w8, w0
	cmp	w22, w24
	b.ne	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w1, #9
	b.lo	LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x1, sp, #14
	mov	x0, x19
	mov	w2, #9
	bl	_php_stream_read
	cmp	w0, #9
	b.ne	LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x0, sp, #14
	mov	w1, #1
	bl	_php_ifd_get16s
	mov	x22, x0
	mov	x0, x21
	mov	w1, #1
	bl	_php_ifd_get16s
	cmp	w22, #1
	b.lt	LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x23, x0
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
	ldrb	w26, [sp, #22]
	cbz	w26, LBB0_6
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=1
	cmp	w26, #32
	b.hi	LBB0_6
; %bb.15:
	mov	w0, #1
	mov	w1, #16
	bl	_ecalloc
	strh	w22, [x0]
	strh	w23, [x0, #2]
	strh	w26, [x0, #4]
	str	xzr, [x0, #8]
	b	LBB0_17
LBB0_16:
	mov	x0, #0
LBB0_17:
	ldr	x8, [sp, #24]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ILBM"

l_.str.1:                               ; @.str.1
	.asciz	"PBM "

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