	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__TIFFReadEncodedStripAndAllocBuffer ## -- Begin function _TIFFReadEncodedStripAndAllocBuffer
	.p2align	4, 0x90
__TIFFReadEncodedStripAndAllocBuffer:   ## @_TIFFReadEncodedStripAndAllocBuffer
	.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	%r8, %r13
	movq	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	(%rdx), %rdx
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%r13, %rcx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_TIFFReadEncodedStrip           ## TAILCALL
LBB0_2:
	movq	%rcx, %rbx
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_TIFFReadEncodedStripGetStripSize
	movq	$-1, %rcx
	cmpq	$-1, %rax
	je	LBB0_10
## %bb.3:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	cmpq	%r13, %rax
	movq	%rax, %rbx
	cmovgq	%r13, %rbx
	cmpq	$-1, %r13
	cmoveq	%rax, %rbx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_TIFFFillStrip
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	__TIFFmalloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	%rax, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	__TIFFmemset
	movq	(%r15), %rsi
	movl	-44(%rbp), %ecx
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	*(%r12)
	testq	%rax, %rax
	movq	$-1, %rcx
	jle	LBB0_10
## %bb.6:
	movq	(%r15), %rsi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	*8(%r12)
	movq	%rbx, %rcx
	jmp	LBB0_10
LBB0_8:
	movl	16(%r12), %r14d
	movq	%r12, %rdi
	callq	_TIFFFileName
	leaq	L_.str(%rip), %rdx
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_TIFFErrorExt
LBB0_9:
	movq	$-1, %rcx
LBB0_10:
	movq	%rcx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No space for strip buffer"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__TIFFReadEncodedStripAndAllocBuffer ; -- Begin function _TIFFReadEncodedStripAndAllocBuffer
	.p2align	2
__TIFFReadEncodedStripAndAllocBuffer:   ; @_TIFFReadEncodedStripAndAllocBuffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x4
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x2, [x2]
	cbz	x2, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x23
	mov	x3, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_TIFFReadEncodedStrip
LBB0_2:
	mov	x22, x3
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x23
	bl	_TIFFReadEncodedStripGetStripSize
	mov	x8, #-1
	cmn	x0, #1
	b.eq	LBB0_8
; %bb.3:
	cmp	x0, x20
	ccmp	x20, x8, #4, gt
	csel	x20, x20, x0, ne
	mov	x0, x19
	mov	x1, x23
	bl	_TIFFFillStrip
	cbz	w0, LBB0_8
; %bb.4:
	mov	x0, x22
	bl	__TIFFmalloc
	str	x0, [x21]
	cbz	x0, LBB0_7
; %bb.5:
	mov	w1, #0
	mov	x2, x22
	bl	__TIFFmemset
	ldr	x8, [x19]
	ldr	x1, [x21]
	ldr	w3, [sp, #12]
	mov	x0, x19
	mov	x2, x20
	blr	x8
	cmp	x0, #1
	b.lt	LBB0_8
; %bb.6:
	ldr	x8, [x19, #8]
	ldr	x1, [x21]
	mov	x0, x19
	mov	x2, x20
	blr	x8
	b	LBB0_9
LBB0_7:
	ldr	w20, [x19, #16]
	mov	x0, x19
	bl	_TIFFFileName
	mov	x1, x0
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_TIFFErrorExt
LBB0_8:
	mov	x20, #-1
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No space for strip buffer"

.subsections_via_symbols
