	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TIFFReadEncodedStripGetStripSize
_TIFFReadEncodedStripGetStripSize:      ## @TIFFReadEncodedStripGetStripSize
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r13
	xorl	%esi, %esi
	callq	_TIFFCheckRead
	movq	$-1, %rbx
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movq	8(%r13), %r8
	cmpq	%r12, %r8
	jle	LBB0_2
## %bb.3:
	movq	16(%r13), %r15
	movq	24(%r13), %rdi
	cmpq	%rdi, %r15
	cmovgeq	%rdi, %r15
	movq	%r15, %rsi
	callq	_TIFFhowmany_32_maxuint_compat
	movq	%rax, %rcx
	orq	%r12, %rax
	shrq	$32, %rax
	je	LBB0_4
## %bb.5:
	movq	%r12, %rax
	cqto
	idivq	%rcx
	testq	%r14, %r14
	je	LBB0_8
LBB0_7:
	movq	%rax, (%r14)
LBB0_8:
	movq	24(%r13), %rsi
	imulq	%r15, %rdx
	subq	%rdx, %rsi
	cmpq	%r15, %rsi
	cmovgeq	%r15, %rsi
	movq	%r13, %rdi
	callq	_TIFFVStripSize
	xorl	%ebx, %ebx
	cmpq	$1, %rax
	sbbq	%rbx, %rbx
	orq	%rax, %rbx
	jmp	LBB0_9
LBB0_2:
	movl	(%r13), %edi
	leaq	_TIFFReadEncodedStripGetStripSize.module(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rcx
	callq	_TIFFErrorExt
LBB0_9:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
                                        ## kill: def $eax killed $eax def $rax
	testq	%r14, %r14
	jne	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @TIFFReadEncodedStripGetStripSize.module
_TIFFReadEncodedStripGetStripSize.module:
	.asciz	"TIFFReadEncodedStrip"

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%lu: Strip out of range, max %lu"

	.no_dead_strip	_TIFFReadEncodedStripGetStripSize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TIFFReadEncodedStripGetStripSize
_TIFFReadEncodedStripGetStripSize:      ; @TIFFReadEncodedStripGetStripSize
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	w1, #0
	bl	_TIFFCheckRead
	cbz	w0, LBB0_6
; %bb.1:
	ldr	x4, [x19, #8]
	cmp	x4, x20
	b.le	LBB0_5
; %bb.2:
	ldp	x8, x0, [x19, #16]
	cmp	x8, x0
	csel	x22, x8, x0, lt
	mov	x1, x22
	bl	_TIFFhowmany_32_maxuint_compat
	sdiv	x9, x20, x0
	msub	x8, x9, x0, x20
	cbz	x21, LBB0_4
; %bb.3:
	str	x9, [x21]
LBB0_4:
	ldr	x9, [x19, #24]
	msub	x8, x8, x22, x9
	cmp	x8, x22
	csel	x1, x8, x22, lt
	mov	x0, x19
	bl	_TIFFVStripSize
	cmp	x0, #0
	csinv	x0, x0, xzr, ne
	b	LBB0_7
LBB0_5:
	ldr	w0, [x19]
Lloh0:
	adrp	x1, _TIFFReadEncodedStripGetStripSize.module@PAGE
Lloh1:
	add	x1, x1, _TIFFReadEncodedStripGetStripSize.module@PAGEOFF
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x20
	bl	_TIFFErrorExt
LBB0_6:
	mov	x0, #-1
LBB0_7:
	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
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_TIFFReadEncodedStripGetStripSize.module: ; @TIFFReadEncodedStripGetStripSize.module
	.asciz	"TIFFReadEncodedStrip"

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%lu: Strip out of range, max %lu"

	.no_dead_strip	_TIFFReadEncodedStripGetStripSize
.subsections_via_symbols
