	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function TIFFWriteDirectoryTagCheckedRationalArray
LCPI0_0:
	.long	0x4f800000                      ## float 4.2949673E+9
LCPI0_1:
	.long	0x3f800000                      ## float 1
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_2:
	.quad	0x41efffffffe00000              ## double 4294967295
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_TIFFWriteDirectoryTagCheckedRationalArray: ## @TIFFWriteDirectoryTagCheckedRationalArray
	.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	%r9, %r12
	movl	%r8d, %ebx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movl	$1, %edi
	callq	_assert
	leal	(,%rbx,8), %r15d
	movl	%r15d, %edi
	callq	__TIFFmalloc
	testq	%rax, %rax
	je	LBB0_17
## %bb.1:
	movq	%rax, %r14
	testl	%ebx, %ebx
	jle	LBB0_14
## %bb.2:
	movl	%ebx, %eax
	xorl	%ecx, %ecx
	xorps	%xmm0, %xmm0
	movss	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movsd	LCPI0_2(%rip), %xmm2            ## xmm2 = mem[0],zero
	movss	LCPI0_0(%rip), %xmm3            ## xmm3 = mem[0],zero,zero,zero
	jmp	LBB0_6
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	$-1, (%r14,%rdx,4)
	cvtss2sd	%xmm4, %xmm4
	movapd	%xmm2, %xmm5
	divsd	%xmm4, %xmm5
	cvttsd2si	%xmm5, %edx
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	%edx, 4(%r14,%rcx,8)
	incq	%rcx
	cmpl	%ecx, %eax
	je	LBB0_14
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rcx,%rcx), %rdx
	movss	(%r12,%rcx,4), %xmm4            ## xmm4 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm4
	ja	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$0, (%r14,%rdx,4)
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=1
	jb	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	ucomiss	%xmm4, %xmm3
	jb	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	cvttps2dq	%xmm4, %xmm5
	cvtdq2ps	%xmm5, %xmm5
	ucomiss	%xmm5, %xmm4
	jne	LBB0_11
	jp	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	cvttss2si	%xmm4, %esi
	movl	%esi, (%r14,%rdx,4)
LBB0_4:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	ucomiss	%xmm4, %xmm1
	jbe	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	cvtss2sd	%xmm4, %xmm4
	mulsd	%xmm2, %xmm4
	cvttsd2si	%xmm4, %esi
	movl	%esi, (%r14,%rdx,4)
	movl	$-1, %edx
	jmp	LBB0_5
LBB0_14:
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_16
## %bb.15:
	leal	(%rbx,%rbx), %esi
	movq	%r14, %rdi
	callq	_TIFFSwabArrayOfLong
LBB0_16:
	movq	_TIFF_RATIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r13, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ebx, %r9d
	pushq	%r14
	pushq	%r15
	callq	_TIFFWriteDirectoryTagData
	addq	$16, %rsp
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	__TIFFfree
	movl	%ebx, %eax
	jmp	LBB0_18
LBB0_17:
	movl	4(%r13), %edi
	leaq	_TIFFWriteDirectoryTagCheckedRationalArray.module(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	callq	_TIFFErrorExt
	xorl	%eax, %eax
LBB0_18:
	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                               ## @TIFFWriteDirectoryTagCheckedRationalArray.module
_TIFFWriteDirectoryTagCheckedRationalArray.module:
	.asciz	"TIFFWriteDirectoryTagCheckedRationalArray"

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

	.comm	_TIFF_SWAB,4,2                  ## @TIFF_SWAB
	.comm	_TIFF_RATIONAL,4,2              ## @TIFF_RATIONAL
	.no_dead_strip	_TIFFWriteDirectoryTagCheckedRationalArray
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TIFFWriteDirectoryTagCheckedRationalArray
_TIFFWriteDirectoryTagCheckedRationalArray: ; @TIFFWriteDirectoryTagCheckedRationalArray
	.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	x26, x5
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	mov	w0, #1
	bl	_assert
	lsl	w25, w19, #3
	mov	x0, x25
	bl	__TIFFmalloc
	cbz	x0, LBB0_15
; %bb.1:
	mov	x24, x0
	cmp	w19, #1
	b.lt	LBB0_12
; %bb.2:
	mov	w8, #1333788672
	fmov	s0, #1.00000000
	mov	x9, #281474974613504
	movk	x9, #16879, lsl #48
	mov	w10, #-1
	mov	x11, x19
	mov	x12, x24
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	w10, [x12]
	fcvt	d1, s1
	fmov	d2, x9
	fdiv	d1, d2, d1
	fcvtzs	w13, d1
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	w13, [x12, #4]
	add	x26, x26, #4
	add	x12, x12, #8
	subs	w11, w11, #1
	b.eq	LBB0_12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	s1, [x26]
	fcmp	s1, #0.0
	b.gt	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	str	wzr, [x12]
	b	LBB0_11
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	fmov	s2, w8
	fccmp	s1, s2, #2, ge
	fcvtzs	s2, s1
	scvtf	s2, s2
	fccmp	s1, s2, #0, ls
	b.eq	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	fcmp	s1, s0
	b.pl	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	fcvt	d1, s1
	fmov	d2, x9
	fmul	d1, d1, d2
	fcvtzs	w13, d1
	str	w13, [x12]
	mov	w13, #-1
	b	LBB0_4
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	fcvtzs	w13, s1
	str	w13, [x12]
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w13, #1
	b	LBB0_4
LBB0_12:
	ldr	w8, [x23]
Lloh0:
	adrp	x9, _TIFF_SWAB@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TIFF_SWAB@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
	lsl	w1, w19, #1
	mov	x0, x24
	bl	_TIFFSwabArrayOfLong
LBB0_14:
Lloh3:
	adrp	x8, _TIFF_RATIONAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TIFF_RATIONAL@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	mov	x5, x19
	mov	x6, x25
	mov	x7, x24
	bl	_TIFFWriteDirectoryTagData
	mov	x19, x0
	mov	x0, x24
	bl	__TIFFfree
	mov	x0, x19
	b	LBB0_16
LBB0_15:
	ldr	w0, [x23, #4]
Lloh6:
	adrp	x1, _TIFFWriteDirectoryTagCheckedRationalArray.module@PAGE
Lloh7:
	add	x1, x1, _TIFFWriteDirectoryTagCheckedRationalArray.module@PAGEOFF
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	bl	_TIFFErrorExt
	mov	w0, #0
LBB0_16:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_TIFFWriteDirectoryTagCheckedRationalArray.module: ; @TIFFWriteDirectoryTagCheckedRationalArray.module
	.asciz	"TIFFWriteDirectoryTagCheckedRationalArray"

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

	.comm	_TIFF_SWAB,4,2                  ; @TIFF_SWAB
	.comm	_TIFF_RATIONAL,4,2              ; @TIFF_RATIONAL
	.no_dead_strip	_TIFFWriteDirectoryTagCheckedRationalArray
.subsections_via_symbols
