	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TIFFFlush                      ## -- Begin function TIFFFlush
	.p2align	4, 0x90
_TIFFFlush:                             ## @TIFFFlush
	.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), %rax
	movq	_O_RDONLY@GOTPCREL(%rip), %rcx
	movl	$1, %r14d
	cmpq	(%rcx), %rax
	je	LBB0_17
## %bb.1:
	movq	%rdi, %rbx
	callq	_TIFFFlushData
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_17
## %bb.2:
	movl	8(%rbx), %eax
	movq	_TIFF_DIRTYSTRIP@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	testl	%eax, %ecx
	je	LBB0_14
## %bb.3:
	movq	_TIFF_DIRTYDIRECT@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	jne	LBB0_14
## %bb.4:
	movq	(%rbx), %rdx
	movq	_O_RDWR@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_14
## %bb.5:
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	%rbx, %rdi
	callq	_TIFFIsTiled
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	_TIFFTAG_TILEOFFSETS@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_TIFFGetField
	testq	%rax, %rax
	je	LBB0_13
## %bb.7:
	movq	_TIFFTAG_TILEBYTECOUNTS@GOTPCREL(%rip), %r12
	jmp	LBB0_10
LBB0_8:
	movq	_TIFFTAG_STRIPOFFSETS@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_TIFFGetField
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movq	_TIFFTAG_STRIPBYTECOUNTS@GOTPCREL(%rip), %r12
LBB0_10:
	movl	(%r12), %esi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_TIFFGetField
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movl	(%r13), %esi
	movq	_TIFF_LONG8@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	12(%rbx), %ecx
	movq	-56(%rbp), %r8
	movq	%rbx, %rdi
	callq	__TIFFRewriteField
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	(%r12), %esi
	movl	(%r13), %edx
	movl	12(%rbx), %ecx
	movq	-48(%rbp), %r8
	movq	%rbx, %rdi
	callq	__TIFFRewriteField
	testq	%rax, %rax
	je	LBB0_13
## %bb.18:
	movl	(%r15), %eax
	movq	_TIFF_BEENWRITING@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%eax
	andl	%eax, 8(%rbx)
	jmp	LBB0_16
LBB0_13:
	movl	8(%rbx), %eax
	movl	(%r15), %ecx
LBB0_14:
	movq	_TIFF_DIRTYDIRECT@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	je	LBB0_16
## %bb.15:
	movq	%rbx, %rdi
	callq	_TIFFRewriteDirectory
	testl	%eax, %eax
	je	LBB0_17
LBB0_16:
	movl	$1, %r14d
LBB0_17:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,8,3                   ## @O_RDONLY
	.comm	_TIFF_DIRTYSTRIP,4,2            ## @TIFF_DIRTYSTRIP
	.comm	_TIFF_DIRTYDIRECT,4,2           ## @TIFF_DIRTYDIRECT
	.comm	_O_RDWR,8,3                     ## @O_RDWR
	.comm	_TIFFTAG_TILEOFFSETS,4,2        ## @TIFFTAG_TILEOFFSETS
	.comm	_TIFFTAG_TILEBYTECOUNTS,4,2     ## @TIFFTAG_TILEBYTECOUNTS
	.comm	_TIFF_LONG8,4,2                 ## @TIFF_LONG8
	.comm	_TIFF_BEENWRITING,4,2           ## @TIFF_BEENWRITING
	.comm	_TIFFTAG_STRIPOFFSETS,4,2       ## @TIFFTAG_STRIPOFFSETS
	.comm	_TIFFTAG_STRIPBYTECOUNTS,4,2    ## @TIFFTAG_STRIPBYTECOUNTS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TIFFFlush                      ; -- Begin function TIFFFlush
	.p2align	2
_TIFFFlush:                             ; @TIFFFlush
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
LBB0_1:
	mov	w0, #1
	b	LBB0_18
LBB0_2:
	mov	x19, x0
	bl	_TIFFFlushData
	cbz	w0, LBB0_18
; %bb.3:
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x21, _TIFF_DIRTYSTRIP@GOTPAGE
Lloh4:
	ldr	x21, [x21, _TIFF_DIRTYSTRIP@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh5:
	adrp	x20, _TIFF_DIRTYDIRECT@GOTPAGE
Lloh6:
	ldr	x20, [x20, _TIFF_DIRTYDIRECT@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.4:
	ldr	w10, [x20]
	tst	w10, w8
	b.ne	LBB0_16
; %bb.5:
	ldr	x10, [x19]
Lloh7:
	adrp	x11, _O_RDWR@GOTPAGE
Lloh8:
	ldr	x11, [x11, _O_RDWR@GOTPAGEOFF]
Lloh9:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_16
; %bb.6:
	stp	xzr, xzr, [sp]
	mov	x0, x19
	bl	_TIFFIsTiled
	cbz	x0, LBB0_9
; %bb.7:
Lloh10:
	adrp	x23, _TIFFTAG_TILEOFFSETS@GOTPAGE
Lloh11:
	ldr	x23, [x23, _TIFFTAG_TILEOFFSETS@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #8
	mov	x0, x19
	bl	_TIFFGetField
	cbz	x0, LBB0_15
; %bb.8:
Lloh12:
	adrp	x22, _TIFFTAG_TILEBYTECOUNTS@GOTPAGE
Lloh13:
	ldr	x22, [x22, _TIFFTAG_TILEBYTECOUNTS@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh14:
	adrp	x23, _TIFFTAG_STRIPOFFSETS@GOTPAGE
Lloh15:
	ldr	x23, [x23, _TIFFTAG_STRIPOFFSETS@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #8
	mov	x0, x19
	bl	_TIFFGetField
	cbz	x0, LBB0_15
; %bb.10:
Lloh16:
	adrp	x22, _TIFFTAG_STRIPBYTECOUNTS@GOTPAGE
Lloh17:
	ldr	x22, [x22, _TIFFTAG_STRIPBYTECOUNTS@GOTPAGEOFF]
LBB0_11:
	ldr	w1, [x22]
	mov	x2, sp
	mov	x0, x19
	bl	_TIFFGetField
	cbz	x0, LBB0_15
; %bb.12:
	ldr	w1, [x23]
Lloh18:
	adrp	x23, _TIFF_LONG8@GOTPAGE
Lloh19:
	ldr	x23, [x23, _TIFF_LONG8@GOTPAGEOFF]
	ldr	w2, [x23]
	ldr	w3, [x19, #12]
	ldr	x4, [sp, #8]
	mov	x0, x19
	bl	__TIFFRewriteField
	cbz	x0, LBB0_15
; %bb.13:
	ldr	w1, [x22]
	ldr	w2, [x23]
	ldr	w3, [x19, #12]
	ldr	x4, [sp]
	mov	x0, x19
	bl	__TIFFRewriteField
	cbz	x0, LBB0_15
; %bb.14:
	ldr	w8, [x21]
Lloh20:
	adrp	x9, _TIFF_BEENWRITING@GOTPAGE
Lloh21:
	ldr	x9, [x9, _TIFF_BEENWRITING@GOTPAGEOFF]
	ldr	w10, [x19, #8]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w8, w9
	bic	w8, w10, w8
	str	w8, [x19, #8]
	b	LBB0_1
LBB0_15:
	ldr	w8, [x19, #8]
	ldr	w9, [x21]
LBB0_16:
	ldr	w10, [x20]
	orr	w9, w9, w10
	tst	w9, w8
	b.eq	LBB0_1
; %bb.17:
	mov	x0, x19
	bl	_TIFFRewriteDirectory
	cbnz	w0, LBB0_1
LBB0_18:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,8,3                   ; @O_RDONLY
	.comm	_TIFF_DIRTYSTRIP,4,2            ; @TIFF_DIRTYSTRIP
	.comm	_TIFF_DIRTYDIRECT,4,2           ; @TIFF_DIRTYDIRECT
	.comm	_O_RDWR,8,3                     ; @O_RDWR
	.comm	_TIFFTAG_TILEOFFSETS,4,2        ; @TIFFTAG_TILEOFFSETS
	.comm	_TIFFTAG_TILEBYTECOUNTS,4,2     ; @TIFFTAG_TILEBYTECOUNTS
	.comm	_TIFF_LONG8,4,2                 ; @TIFF_LONG8
	.comm	_TIFF_BEENWRITING,4,2           ; @TIFF_BEENWRITING
	.comm	_TIFFTAG_STRIPOFFSETS,4,2       ; @TIFFTAG_STRIPOFFSETS
	.comm	_TIFFTAG_STRIPBYTECOUNTS,4,2    ; @TIFFTAG_STRIPBYTECOUNTS
.subsections_via_symbols
