	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setupMap
_setupMap:                              ## @setupMap
	.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	%rdi, %r15
	movq	(%rdi), %rcx
	movq	$-1, %rax
	shlq	%cl, %rax
	notl	%eax
	cmpq	$16, %rcx
	movl	$255, %ebx
	cmovnel	%eax, %ebx
	leal	8(,%rbx,8), %edi
	callq	__TIFFmalloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	16(%r15), %r10
	movq	_PHOTOMETRIC_MINISWHITE@GOTPCREL(%rip), %r8
	cmpq	(%r8), %r10
	jne	LBB0_10
## %bb.2:
	testl	%ebx, %ebx
	js	LBB0_18
## %bb.3:
	movq	$255, (%rax)
	je	LBB0_18
## %bb.4:
	movl	%ebx, %r9d
	movl	$1, %edi
	cmpl	$1, %ebx
	je	LBB0_7
## %bb.5:
	movl	%ebx, %ecx
	shll	$8, %ecx
	subl	%ebx, %ecx
	addl	$-510, %ecx                     ## imm = 0xFE02
	movl	%r9d, %r11d
	andl	$-2, %r11d
	negq	%r11
	movl	$1, %edi
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rsi
	leal	255(%rcx), %eax
	cltd
	idivl	%ebx
	cltq
	movq	%rax, (%rsi,%rdi,8)
	movq	8(%r15), %rsi
	movl	%ecx, %eax
	cltd
	idivl	%ebx
	cltq
	movq	%rax, 8(%rsi,%rdi,8)
	addl	$-510, %ecx                     ## imm = 0xFE02
	leaq	(%r11,%rdi), %rax
	addq	$2, %rax
	addq	$2, %rdi
	cmpq	$1, %rax
	jne	LBB0_6
LBB0_7:
	testb	$1, %r9b
	je	LBB0_18
## %bb.8:
	movq	8(%r15), %rcx
	movl	%ebx, %edx
	subl	%edi, %edx
	movl	%edx, %eax
	shll	$8, %eax
	subl	%edx, %eax
	jmp	LBB0_17
LBB0_9:
	movq	24(%r15), %rdi
	movl	(%rdi), %ebx
	callq	_TIFFFileName
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_TIFFErrorExt
LBB0_23:
	xorl	%r14d, %r14d
	jmp	LBB0_24
LBB0_10:
	testl	%ebx, %ebx
	js	LBB0_18
## %bb.11:
	movq	$0, (%rax)
	je	LBB0_18
## %bb.12:
	movl	%ebx, %r9d
	movl	$1, %edi
	cmpl	$1, %ebx
	je	LBB0_15
## %bb.13:
	movl	%r9d, %r11d
	andl	$-2, %r11d
	negq	%r11
	movl	$1, %edi
	movl	$510, %ecx                      ## imm = 0x1FE
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rsi
	leal	-255(%rcx), %eax
	cltd
	idivl	%ebx
	cltq
	movq	%rax, (%rsi,%rdi,8)
	movq	8(%r15), %rsi
	movl	%ecx, %eax
	cltd
	idivl	%ebx
	cltq
	movq	%rax, 8(%rsi,%rdi,8)
	addl	$510, %ecx                      ## imm = 0x1FE
	leaq	(%r11,%rdi), %rax
	addq	$2, %rax
	addq	$2, %rdi
	cmpq	$1, %rax
	jne	LBB0_14
LBB0_15:
	testb	$1, %r9b
	je	LBB0_18
## %bb.16:
	movq	8(%r15), %rcx
	movl	%edi, %eax
	shll	$8, %eax
	subl	%edi, %eax
LBB0_17:
	cltd
	idivl	%ebx
	cltq
	movq	%rax, (%rcx,%rdi,8)
LBB0_18:
	movl	$1, %r14d
	cmpq	$16, (%r15)
	jg	LBB0_24
## %bb.19:
	movq	_PHOTOMETRIC_MINISBLACK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r10
	je	LBB0_21
## %bb.20:
	cmpq	(%r8), %r10
	jne	LBB0_24
LBB0_21:
	movq	%r15, %rdi
	callq	_makebwmap
	testl	%eax, %eax
	je	LBB0_23
## %bb.22:
	movq	8(%r15), %rdi
	callq	__TIFFfree
	movq	$0, 8(%r15)
LBB0_24:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No space for photometric conversion table"

	.comm	_PHOTOMETRIC_MINISWHITE,8,3     ## @PHOTOMETRIC_MINISWHITE
	.comm	_PHOTOMETRIC_MINISBLACK,8,3     ## @PHOTOMETRIC_MINISBLACK
	.no_dead_strip	_setupMap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setupMap
_setupMap:                              ; @setupMap
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0]
	mov	x9, #-1
	lsl	x9, x9, x8
	cmp	x8, #16
	mov	w8, #255
	csinv	w20, w8, w9, eq
	lsl	w8, w20, #3
	add	w0, w8, #8
	bl	__TIFFmalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.1:
	ldr	x8, [x19, #16]
Lloh0:
	adrp	x9, _PHOTOMETRIC_MINISWHITE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PHOTOMETRIC_MINISWHITE@GOTPAGEOFF]
	ldr	x10, [x9]
	cmp	x8, x10
	b.ne	LBB0_7
; %bb.2:
	tbnz	w20, #31, LBB0_11
; %bb.3:
	mov	w10, #255
	str	x10, [x0]
	cbz	w20, LBB0_11
; %bb.4:
	add	w10, w20, #1
	lsl	x10, x10, #3
	lsl	w11, w20, #8
	sub	w11, w11, w20
	sub	w11, w11, #255
	mov	w12, #8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x19, #8]
	sdiv	w14, w11, w20
	sxtw	x14, w14
	str	x14, [x13, x12]
	add	x12, x12, #8
	sub	w11, w11, #255
	cmp	x10, x12
	b.ne	LBB0_5
	b	LBB0_11
LBB0_6:
	ldr	x0, [x19, #24]
	ldr	w19, [x0]
	bl	_TIFFFileName
	mov	x1, x0
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_TIFFErrorExt
	mov	w0, #0
	b	LBB0_16
LBB0_7:
	tbnz	w20, #31, LBB0_11
; %bb.8:
	str	xzr, [x0]
	cbz	w20, LBB0_11
; %bb.9:
	add	w10, w20, #1
	lsl	x11, x10, #8
	sub	x10, x11, x10
	mov	w11, #255
	mov	w12, #8
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x19, #8]
	sdiv	w14, w11, w20
	sxtw	x14, w14
	str	x14, [x13, x12]
	add	x11, x11, #255
	add	x12, x12, #8
	cmp	x10, x11
	b.ne	LBB0_10
LBB0_11:
	ldr	x10, [x19]
	cmp	x10, #16
	b.gt	LBB0_15
; %bb.12:
Lloh4:
	adrp	x10, _PHOTOMETRIC_MINISBLACK@GOTPAGE
Lloh5:
	ldr	x10, [x10, _PHOTOMETRIC_MINISBLACK@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
	ldr	x9, [x9]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
	b.ne	LBB0_15
; %bb.13:
	mov	x0, x19
	bl	_makebwmap
	cbz	w0, LBB0_16
; %bb.14:
	ldr	x0, [x19, #8]
	bl	__TIFFfree
	str	xzr, [x19, #8]
LBB0_15:
	mov	w0, #1
LBB0_16:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No space for photometric conversion table"

	.comm	_PHOTOMETRIC_MINISWHITE,8,3     ; @PHOTOMETRIC_MINISWHITE
	.comm	_PHOTOMETRIC_MINISBLACK,8,3     ; @PHOTOMETRIC_MINISBLACK
	.no_dead_strip	_setupMap
.subsections_via_symbols
