	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TIFFOpen                       ## -- Begin function TIFFOpen
	.p2align	4, 0x90
_TIFFOpen:                              ## @TIFFOpen
	.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	%rsi, %rbx
	movq	%rdi, %r14
	leaq	_TIFFOpen.module(%rip), %rsi
	movq	%rbx, %rdi
	callq	__TIFFgetMode
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.1:
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	$438, %edx                      ## imm = 0x1B6
	callq	_open
	testl	%eax, %eax
	js	LBB0_2
## %bb.6:
	movl	%eax, %r15d
	movl	%eax, %edi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_TIFFFdOpen
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:
	movl	%r15d, %edi
	callq	_close
LBB0_8:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_2:
	movq	_errno@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	jle	LBB0_5
## %bb.3:
	callq	_strerror
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	(%rbx), %rdi
	callq	_strerror
	leaq	_TIFFOpen.module(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movq	%r14, %rcx
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_TIFFErrorExt
	jmp	LBB0_9
LBB0_5:
	leaq	_TIFFOpen.module(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_TIFFErrorExt
LBB0_9:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
_TIFFOpen.module:                       ## @TIFFOpen.module
	.asciz	"TIFFOpen"

	.comm	_errno,8,3                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: %s"

L_.str.1:                               ## @.str.1
	.asciz	"%s: Cannot open"

	.comm	_O_BINARY,4,2                   ## @O_BINARY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TIFFOpen                       ; -- Begin function TIFFOpen
	.p2align	2
_TIFFOpen:                              ; @TIFFOpen
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x1, _TIFFOpen.module@PAGE
Lloh1:
	add	x1, x1, _TIFFOpen.module@PAGEOFF
	mov	x0, x20
	bl	__TIFFgetMode
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.1:
	mov	x1, x0
	mov	x0, x19
	mov	w2, #438
	bl	_open
	tbnz	w0, #31, LBB0_4
; %bb.2:
	mov	x21, x0
	mov	x1, x19
	mov	x2, x20
	bl	_TIFFFdOpen
	cbnz	x0, LBB0_10
; %bb.3:
	mov	x0, x21
	bl	_close
	b	LBB0_9
LBB0_4:
Lloh2:
	adrp	x20, _errno@GOTPAGE
Lloh3:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	ldr	x0, [x20]
	cmp	x0, #1
	b.lt	LBB0_7
; %bb.5:
	bl	_strerror
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x0, [x20]
	bl	_strerror
	str	x0, [sp]
Lloh4:
	adrp	x1, _TIFFOpen.module@PAGE
Lloh5:
	add	x1, x1, _TIFFOpen.module@PAGEOFF
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh8:
	adrp	x1, _TIFFOpen.module@PAGE
Lloh9:
	add	x1, x1, _TIFFOpen.module@PAGEOFF
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_8:
	mov	w0, #0
	mov	x3, x19
	bl	_TIFFErrorExt
LBB0_9:
	mov	x0, #0
LBB0_10:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_TIFFOpen.module:                       ; @TIFFOpen.module
	.asciz	"TIFFOpen"

	.comm	_errno,8,3                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: %s"

l_.str.1:                               ; @.str.1
	.asciz	"%s: Cannot open"

	.comm	_O_BINARY,4,2                   ; @O_BINARY
.subsections_via_symbols
