	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TIFFWriteDirectoryTagColormap
_TIFFWriteDirectoryTagColormap:         ## @TIFFWriteDirectoryTagColormap
	.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	%rsi, %r15
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	%rdx, %rbx
	movq	%rdi, %r13
	movl	(%rdi), %r14d
	movl	$3, %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leal	(,%rax,4), %edi
	callq	__TIFFmalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movl	$1, %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	movq	8(%r13), %rcx
	movl	(%rcx), %esi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
	movslq	%eax, %r15
	leal	(,%r15,4), %r14d
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	__TIFFmemcpy
	leaq	(%r12,%r15,4), %rdi
	movq	8(%r13), %rax
	movl	4(%rax), %esi
	movl	%r14d, %edx
	callq	__TIFFmemcpy
	leal	(%r15,%r15), %eax
	cltq
	leaq	(%r12,%rax,4), %rdi
	movq	8(%r13), %rax
	movl	8(%rax), %esi
	movl	%r14d, %edx
	callq	__TIFFmemcpy
	movq	_TIFFTAG_COLORMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	movq	%r12, %r9
	callq	_TIFFWriteDirectoryTagCheckedShortArray
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	__TIFFfree
	movl	%r14d, %eax
	jmp	LBB0_5
LBB0_1:
	incl	(%r15)
	movl	$1, %eax
	jmp	LBB0_5
LBB0_3:
	movl	16(%r13), %edi
	leaq	_TIFFWriteDirectoryTagColormap.module(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	callq	_TIFFErrorExt
	xorl	%eax, %eax
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @TIFFWriteDirectoryTagColormap.module
_TIFFWriteDirectoryTagColormap.module:
	.asciz	"TIFFWriteDirectoryTagColormap"

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of memory"

	.comm	_TIFFTAG_COLORMAP,4,2           ## @TIFFTAG_COLORMAP
	.no_dead_strip	_TIFFWriteDirectoryTagColormap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TIFFWriteDirectoryTagColormap
_TIFFWriteDirectoryTagColormap:         ; @TIFFWriteDirectoryTagColormap
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	cbz	x2, LBB0_3
; %bb.1:
	mov	x20, x2
	mov	x21, x0
	ldr	w24, [x0]
	mov	w8, #3
	lsl	w22, w8, w24
	lsl	w0, w22, #2
	bl	__TIFFmalloc
	cbz	x0, LBB0_4
; %bb.2:
	mov	x23, x0
	mov	w8, #1
	lsl	w25, w8, w24
	ldr	x8, [x21, #8]
	ldr	w1, [x8]
	lsl	w24, w25, #2
	mov	x2, x24
	bl	__TIFFmemcpy
	add	x0, x23, w25, sxtw #2
	ldr	x8, [x21, #8]
	ldr	w1, [x8, #4]
	mov	x2, x24
	bl	__TIFFmemcpy
	add	x0, x23, w25, sxtw #3
	ldr	x8, [x21, #8]
	ldr	w1, [x8, #8]
	mov	x2, x24
	bl	__TIFFmemcpy
Lloh0:
	adrp	x8, _TIFFTAG_COLORMAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TIFFTAG_COLORMAP@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	mov	x4, x22
	mov	x5, x23
	bl	_TIFFWriteDirectoryTagCheckedShortArray
	mov	x19, x0
	mov	x0, x23
	bl	__TIFFfree
	mov	x0, x19
	b	LBB0_5
LBB0_3:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	w0, #1
	b	LBB0_5
LBB0_4:
	ldr	w0, [x21, #16]
Lloh3:
	adrp	x1, _TIFFWriteDirectoryTagColormap.module@PAGE
Lloh4:
	add	x1, x1, _TIFFWriteDirectoryTagColormap.module@PAGEOFF
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	bl	_TIFFErrorExt
	mov	w0, #0
LBB0_5:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_TIFFWriteDirectoryTagColormap.module:  ; @TIFFWriteDirectoryTagColormap.module
	.asciz	"TIFFWriteDirectoryTagColormap"

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of memory"

	.comm	_TIFFTAG_COLORMAP,4,2           ; @TIFFTAG_COLORMAP
	.no_dead_strip	_TIFFWriteDirectoryTagColormap
.subsections_via_symbols
