	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function BuildMapBitdepth16To8
_BuildMapBitdepth16To8:                 ## @BuildMapBitdepth16To8
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	sete	%dil
	callq	_assert
	movl	$65536, %edi                    ## imm = 0x10000
	callq	__TIFFmalloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	xorl	%ecx, %ecx
	movl	$4278255361, %edx               ## imm = 0xFF00FF01
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	128(%rcx), %esi
	imulq	%rdx, %rsi
	shrq	$40, %rsi
	movq	%rsi, (%rax,%rcx,8)
	leal	129(%rcx), %esi
	imulq	%rdx, %rsi
	shrq	$40, %rsi
	movq	%rsi, 8(%rax,%rcx,8)
	addq	$2, %rcx
	cmpl	$65536, %ecx                    ## imm = 0x10000
	jne	LBB0_2
## %bb.3:
	movl	$1, %eax
	jmp	LBB0_4
LBB0_5:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	leaq	_BuildMapBitdepth16To8.module(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	callq	_TIFFErrorExt
	xorl	%eax, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @BuildMapBitdepth16To8.module
_BuildMapBitdepth16To8.module:
	.asciz	"BuildMapBitdepth16To8"

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

	.no_dead_strip	_BuildMapBitdepth16To8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function BuildMapBitdepth16To8
_BuildMapBitdepth16To8:                 ; @BuildMapBitdepth16To8
	.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]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	mov	w0, #65536
	bl	__TIFFmalloc
	str	x0, [x19]
	cbz	x0, LBB0_4
; %bb.1:
	mov	x8, #0
	add	x9, x0, #16
	mov	w10, #65281
	movk	w10, #65280, lsl #16
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w11, w8, #128
	add	w12, w8, #129
	add	w13, w8, #130
	add	w14, w8, #131
	umull	x11, w11, w10
	lsr	x11, x11, #40
	umull	x12, w12, w10
	lsr	x12, x12, #40
	umull	x13, w13, w10
	lsr	x13, x13, #40
	umull	x14, w14, w10
	lsr	x14, x14, #40
	stp	x11, x12, [x9, #-16]
	stp	x13, x14, [x9], #32
	add	x8, x8, #4
	cmp	x8, #16, lsl #12                ; =65536
	b.ne	LBB0_2
; %bb.3:
	mov	w0, #1
	b	LBB0_5
LBB0_4:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh0:
	adrp	x1, _BuildMapBitdepth16To8.module@PAGE
Lloh1:
	add	x1, x1, _BuildMapBitdepth16To8.module@PAGEOFF
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	bl	_TIFFErrorExt
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_BuildMapBitdepth16To8.module:          ; @BuildMapBitdepth16To8.module
	.asciz	"BuildMapBitdepth16To8"

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

	.no_dead_strip	_BuildMapBitdepth16To8
.subsections_via_symbols
