	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TIFFWriteDirectoryTagSampleformatArray
_TIFFWriteDirectoryTagSampleformatArray: ## @TIFFWriteDirectoryTagSampleformatArray
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movl	%r8d, %ebx
	movl	%ecx, %r13d
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	leal	(,%rbx,8), %edi
	callq	__TIFFmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movl	(%r15), %eax
	cmpl	$128, %eax
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	je	LBB0_25
## %bb.3:
	cmpl	$129, %eax
	je	LBB0_11
## %bb.4:
	xorl	%r13d, %r13d
	cmpl	$130, %eax
	jne	LBB0_40
## %bb.5:
	cmpl	$32, 4(%r15)
	jg	LBB0_10
## %bb.6:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	jle	LBB0_9
## %bb.7:
	movl	-56(%rbp), %r13d                ## 4-byte Reload
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movsd	(%r12,%rbx,8), %xmm0            ## xmm0 = mem[0],zero
	callq	_TIFFClampDoubleToFloat
	movss	%xmm0, (%r14,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_8
LBB0_9:
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	movq	%r14, %r9
	callq	_TIFFWriteDirectoryTagFloatArray
	jmp	LBB0_39
LBB0_1:
	movl	8(%r15), %edi
	leaq	_TIFFWriteDirectoryTagSampleformatArray.module(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	callq	_TIFFErrorExt
	xorl	%r13d, %r13d
	jmp	LBB0_41
LBB0_25:
	movl	4(%r15), %eax
	cmpl	$8, %eax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jg	LBB0_30
## %bb.26:
	testl	%ebx, %ebx
	jle	LBB0_29
## %bb.27:
	movl	-56(%rbp), %r13d                ## 4-byte Reload
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movsd	(%r12,%rbx,8), %xmm0            ## xmm0 = mem[0],zero
	callq	_TIFFClampDoubleToUInt8
	movl	%eax, (%r14,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_28
LBB0_29:
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	movq	%r14, %r9
	callq	_TIFFWriteDirectoryTagByteArray
	jmp	LBB0_39
LBB0_11:
	movl	4(%r15), %eax
	cmpl	$8, %eax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jg	LBB0_16
## %bb.12:
	testl	%ebx, %ebx
	jle	LBB0_15
## %bb.13:
	movl	-56(%rbp), %r13d                ## 4-byte Reload
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movsd	(%r12,%rbx,8), %xmm0            ## xmm0 = mem[0],zero
	callq	_TIFFClampDoubleToInt8
	movl	%eax, (%r14,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_14
LBB0_15:
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	movq	%r14, %r9
	callq	_TIFFWriteDirectoryTagSbyteArray
	jmp	LBB0_39
LBB0_10:
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ebx, %r8d
	movq	%r12, %r9
	callq	_TIFFWriteDirectoryTagDoubleArray
	jmp	LBB0_39
LBB0_30:
	cmpl	$17, %eax
	jae	LBB0_31
## %bb.35:
	testl	%ebx, %ebx
	jle	LBB0_38
## %bb.36:
	movl	-56(%rbp), %r13d                ## 4-byte Reload
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_37:                                ## =>This Inner Loop Header: Depth=1
	movsd	(%r12,%rbx,8), %xmm0            ## xmm0 = mem[0],zero
	callq	_TIFFClampDoubleToUInt16
	movl	%eax, (%r14,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_37
LBB0_38:
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	movq	%r14, %r9
	callq	_TIFFWriteDirectoryTagShortArray
	jmp	LBB0_39
LBB0_16:
	cmpl	$17, %eax
	jae	LBB0_17
## %bb.21:
	testl	%ebx, %ebx
	jle	LBB0_24
## %bb.22:
	movl	-56(%rbp), %r13d                ## 4-byte Reload
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movsd	(%r12,%rbx,8), %xmm0            ## xmm0 = mem[0],zero
	callq	_TIFFClampDoubleToInt16
	movl	%eax, (%r14,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_23
LBB0_24:
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	movq	%r14, %r9
	callq	_TIFFWriteDirectoryTagSshortArray
	jmp	LBB0_39
LBB0_31:
	testl	%ebx, %ebx
	jle	LBB0_34
## %bb.32:
	movl	-56(%rbp), %r13d                ## 4-byte Reload
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_33:                                ## =>This Inner Loop Header: Depth=1
	movsd	(%r12,%rbx,8), %xmm0            ## xmm0 = mem[0],zero
	callq	_TIFFClampDoubleToUInt32
	movl	%eax, (%r14,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_33
LBB0_34:
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	movq	%r14, %r9
	callq	_TIFFWriteDirectoryTagLongArray
	jmp	LBB0_39
LBB0_17:
	testl	%ebx, %ebx
	jle	LBB0_20
## %bb.18:
	movl	-56(%rbp), %r13d                ## 4-byte Reload
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movsd	(%r12,%rbx,8), %xmm0            ## xmm0 = mem[0],zero
	callq	_TIFFClampDoubleToInt32
	movl	%eax, (%r14,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_19
LBB0_20:
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	movq	%r14, %r9
	callq	_TIFFWriteDirectoryTagSlongArray
LBB0_39:
	movl	%eax, %r13d
LBB0_40:
	movq	%r14, %rdi
	callq	__TIFFfree
LBB0_41:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @TIFFWriteDirectoryTagSampleformatArray.module
_TIFFWriteDirectoryTagSampleformatArray.module:
	.asciz	"TIFFWriteDirectoryTagSampleformatArray"

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

	.no_dead_strip	_TIFFWriteDirectoryTagSampleformatArray
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TIFFWriteDirectoryTagSampleformatArray
_TIFFWriteDirectoryTagSampleformatArray: ; @TIFFWriteDirectoryTagSampleformatArray
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x5
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	lsl	w0, w4, #3
	bl	__TIFFmalloc
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	w8, [x24]
	cmp	w8, #128
	b.eq	LBB0_10
; %bb.2:
	cmp	w8, #129
	b.eq	LBB0_15
; %bb.3:
	cmp	w8, #130
	b.ne	LBB0_20
; %bb.4:
	ldr	w8, [x24, #4]
	cmp	w8, #32
	b.gt	LBB0_21
; %bb.5:
	cmp	w20, #1
	b.lt	LBB0_8
; %bb.6:
	mov	w26, w20
	mov	x27, x19
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x25], #8
	bl	_TIFFClampDoubleToFloat
	str	s0, [x27], #4
	subs	x26, x26, #1
	b.ne	LBB0_7
LBB0_8:
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	bl	_TIFFWriteDirectoryTagFloatArray
	b	LBB0_40
LBB0_9:
	ldr	w0, [x24, #8]
Lloh0:
	adrp	x1, _TIFFWriteDirectoryTagSampleformatArray.module@PAGE
Lloh1:
	add	x1, x1, _TIFFWriteDirectoryTagSampleformatArray.module@PAGEOFF
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	bl	_TIFFErrorExt
	mov	w20, #0
	b	LBB0_42
LBB0_10:
	ldr	w8, [x24, #4]
	cmp	w8, #8
	b.gt	LBB0_22
; %bb.11:
	cmp	w20, #1
	b.lt	LBB0_14
; %bb.12:
	mov	w26, w20
	mov	x27, x19
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x25], #8
	bl	_TIFFClampDoubleToUInt8
	str	w0, [x27], #4
	subs	x26, x26, #1
	b.ne	LBB0_13
LBB0_14:
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	bl	_TIFFWriteDirectoryTagByteArray
	b	LBB0_40
LBB0_15:
	ldr	w8, [x24, #4]
	cmp	w8, #8
	b.gt	LBB0_27
; %bb.16:
	cmp	w20, #1
	b.lt	LBB0_19
; %bb.17:
	mov	w26, w20
	mov	x27, x19
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x25], #8
	bl	_TIFFClampDoubleToInt8
	str	w0, [x27], #4
	subs	x26, x26, #1
	b.ne	LBB0_18
LBB0_19:
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	bl	_TIFFWriteDirectoryTagSbyteArray
	b	LBB0_40
LBB0_20:
	mov	w20, #0
	b	LBB0_41
LBB0_21:
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, x25
	bl	_TIFFWriteDirectoryTagDoubleArray
	b	LBB0_40
LBB0_22:
	cmp	w8, #17
	b.hs	LBB0_32
; %bb.23:
	cmp	w20, #1
	b.lt	LBB0_26
; %bb.24:
	mov	w26, w20
	mov	x27, x19
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x25], #8
	bl	_TIFFClampDoubleToUInt16
	str	w0, [x27], #4
	subs	x26, x26, #1
	b.ne	LBB0_25
LBB0_26:
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	bl	_TIFFWriteDirectoryTagShortArray
	b	LBB0_40
LBB0_27:
	cmp	w8, #17
	b.hs	LBB0_36
; %bb.28:
	cmp	w20, #1
	b.lt	LBB0_31
; %bb.29:
	mov	w26, w20
	mov	x27, x19
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x25], #8
	bl	_TIFFClampDoubleToInt16
	str	w0, [x27], #4
	subs	x26, x26, #1
	b.ne	LBB0_30
LBB0_31:
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	bl	_TIFFWriteDirectoryTagSshortArray
	b	LBB0_40
LBB0_32:
	cmp	w20, #1
	b.lt	LBB0_35
; %bb.33:
	mov	w26, w20
	mov	x27, x19
LBB0_34:                                ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x25], #8
	bl	_TIFFClampDoubleToUInt32
	str	w0, [x27], #4
	subs	x26, x26, #1
	b.ne	LBB0_34
LBB0_35:
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	bl	_TIFFWriteDirectoryTagLongArray
	b	LBB0_40
LBB0_36:
	cmp	w20, #1
	b.lt	LBB0_39
; %bb.37:
	mov	w26, w20
	mov	x27, x19
LBB0_38:                                ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x25], #8
	bl	_TIFFClampDoubleToInt32
	str	w0, [x27], #4
	subs	x26, x26, #1
	b.ne	LBB0_38
LBB0_39:
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	bl	_TIFFWriteDirectoryTagSlongArray
LBB0_40:
	mov	x20, x0
LBB0_41:
	mov	x0, x19
	bl	__TIFFfree
LBB0_42:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_TIFFWriteDirectoryTagSampleformatArray.module: ; @TIFFWriteDirectoryTagSampleformatArray.module
	.asciz	"TIFFWriteDirectoryTagSampleformatArray"

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

	.no_dead_strip	_TIFFWriteDirectoryTagSampleformatArray
.subsections_via_symbols
