	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TIFFReadBufferSetup            ## -- Begin function TIFFReadBufferSetup
	.p2align	4, 0x90
_TIFFReadBufferSetup:                   ## @TIFFReadBufferSetup
	.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	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_TIFF_NOREADRAW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%rbx), %eax
	sete	%dil
	callq	_assert
	movq	_TIFF_BUFFERMMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	(%rbx), %eax
	movl	%eax, (%rbx)
	movq	32(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	_TIFF_MYBUFFER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.2:
	callq	__TIFFfree
LBB0_3:
	movq	$0, 32(%rbx)
	movq	$0, 8(%rbx)
LBB0_4:
	testq	%r14, %r14
	je	LBB0_6
## %bb.5:
	movq	%r15, 8(%rbx)
	movq	%r14, 32(%rbx)
	movq	_TIFF_MYBUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	(%rbx), %eax
	jmp	LBB0_9
LBB0_6:
	movl	%r15d, %edi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_TIFFroundup_64
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movl	$1, %edi
	movq	%rax, %rsi
	callq	__TIFFcalloc
	movq	%rax, %r14
	movq	%rax, 32(%rbx)
	movq	_TIFF_MYBUFFER@GOTPCREL(%rip), %rcx
	movl	(%rbx), %eax
	orl	(%rcx), %eax
LBB0_9:
	movl	%eax, (%rbx)
	movl	$1, %r15d
	testq	%r14, %r14
	jne	LBB0_11
## %bb.10:
	movl	24(%rbx), %edi
	movq	16(%rbx), %rcx
	leaq	_TIFFReadBufferSetup.module(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_TIFFErrorExt
	movq	$0, 8(%rbx)
	jmp	LBB0_11
LBB0_7:
	movl	24(%rbx), %edi
	leaq	_TIFFReadBufferSetup.module(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_TIFFErrorExt
LBB0_11:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @TIFFReadBufferSetup.module
_TIFFReadBufferSetup.module:
	.asciz	"TIFFReadBufferSetup"

	.comm	_TIFF_NOREADRAW,4,2             ## @TIFF_NOREADRAW
	.comm	_TIFF_BUFFERMMAP,4,2            ## @TIFF_BUFFERMMAP
	.comm	_TIFF_MYBUFFER,4,2              ## @TIFF_MYBUFFER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid buffer size"

L_.str.1:                               ## @.str.1
	.asciz	"No space for data buffer at scanline %lu"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TIFFReadBufferSetup            ; -- Begin function TIFFReadBufferSetup
	.p2align	2
_TIFFReadBufferSetup:                   ; @TIFFReadBufferSetup
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _TIFF_NOREADRAW@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TIFF_NOREADRAW@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	bl	_assert
Lloh3:
	adrp	x8, _TIFF_BUFFERMMAP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TIFF_BUFFERMMAP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	ldr	x0, [x19, #32]
Lloh6:
	adrp	x22, _TIFF_MYBUFFER@GOTPAGE
Lloh7:
	ldr	x22, [x22, _TIFF_MYBUFFER@GOTPAGEOFF]
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	bl	__TIFFfree
LBB0_3:
	str	xzr, [x19, #32]
	str	xzr, [x19, #8]
LBB0_4:
	cbz	x20, LBB0_7
; %bb.5:
	str	x21, [x19, #8]
	str	x20, [x19, #32]
	ldr	w8, [x22]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	cbz	x20, LBB0_9
LBB0_6:
	mov	w0, #1
	b	LBB0_11
LBB0_7:
	mov	x0, x21
	mov	w1, #1024
	bl	_TIFFroundup_64
	str	x0, [x19, #8]
	cbz	x0, LBB0_10
; %bb.8:
	mov	x1, x0
	mov	w0, #1
	bl	__TIFFcalloc
	mov	x20, x0
	str	x0, [x19, #32]
	ldr	w8, [x22]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	cbnz	x20, LBB0_6
LBB0_9:
	ldr	w0, [x19, #24]
	ldr	x8, [x19, #16]
Lloh8:
	adrp	x1, _TIFFReadBufferSetup.module@PAGE
Lloh9:
	add	x1, x1, _TIFFReadBufferSetup.module@PAGEOFF
	str	x8, [sp]
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_TIFFErrorExt
	mov	w0, #0
	str	xzr, [x19, #8]
	b	LBB0_11
LBB0_10:
	ldr	w0, [x19, #24]
Lloh12:
	adrp	x1, _TIFFReadBufferSetup.module@PAGE
Lloh13:
	add	x1, x1, _TIFFReadBufferSetup.module@PAGEOFF
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	bl	_TIFFErrorExt
	mov	w0, #0
LBB0_11:
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_TIFFReadBufferSetup.module:            ; @TIFFReadBufferSetup.module
	.asciz	"TIFFReadBufferSetup"

	.comm	_TIFF_NOREADRAW,4,2             ; @TIFF_NOREADRAW
	.comm	_TIFF_BUFFERMMAP,4,2            ; @TIFF_BUFFERMMAP
	.comm	_TIFF_MYBUFFER,4,2              ; @TIFF_MYBUFFER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid buffer size"

l_.str.1:                               ; @.str.1
	.asciz	"No space for data buffer at scanline %lu"

.subsections_via_symbols
