	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TIFFNumberOfDirectories        ## -- Begin function TIFFNumberOfDirectories
	.p2align	4, 0x90
_TIFFNumberOfDirectories:               ## @TIFFNumberOfDirectories
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_TIFF_BIGTIFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	(%rdi), %eax
	sete	%cl
	movq	8(%rdi,%rcx,8), %rax
	movq	%rax, -32(%rbp)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	leaq	-32(%rbp), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_TIFFAdvanceDirectory
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$65535, %ebx                    ## imm = 0xFFFF
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	cmpq	$0, -32(%rbp)
	jne	LBB0_3
	jmp	LBB0_7
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_6:
	movl	4(%r14), %edi
	leaq	_TIFFNumberOfDirectories.module(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	callq	_TIFFErrorExt
	movl	$65535, %ebx                    ## imm = 0xFFFF
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @TIFFNumberOfDirectories.module
_TIFFNumberOfDirectories.module:
	.asciz	"TIFFNumberOfDirectories"

	.comm	_TIFF_BIGTIFF,4,2               ## @TIFF_BIGTIFF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Directory count exceeded 65535 limit, giving up on counting."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TIFFNumberOfDirectories        ; -- Begin function TIFFNumberOfDirectories
	.p2align	2
_TIFFNumberOfDirectories:               ; @TIFFNumberOfDirectories
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _TIFF_BIGTIFF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TIFF_BIGTIFF@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #8
	mov	w9, #16
	csel	x8, x9, x8, eq
	ldr	x8, [x0, x8]
	str	x8, [sp, #8]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x19, x0
	mov	w20, #0
	mov	w21, #65535
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, #0
	bl	_TIFFAdvanceDirectory
	cbz	x0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w20, w21
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w20, w20, #1
	ldr	x8, [sp, #8]
	cbnz	x8, LBB0_2
	b	LBB0_7
LBB0_5:
	mov	w20, #0
	b	LBB0_7
LBB0_6:
	ldr	w0, [x19, #4]
Lloh3:
	adrp	x1, _TIFFNumberOfDirectories.module@PAGE
Lloh4:
	add	x1, x1, _TIFFNumberOfDirectories.module@PAGEOFF
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	bl	_TIFFErrorExt
	mov	w20, #65535
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_TIFFNumberOfDirectories.module:        ; @TIFFNumberOfDirectories.module
	.asciz	"TIFFNumberOfDirectories"

	.comm	_TIFF_BIGTIFF,4,2               ; @TIFF_BIGTIFF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Directory count exceeded 65535 limit, giving up on counting."

.subsections_via_symbols
