	.file	"extr_tif_dirwrite.c_TIFFWriteDirectoryTagCheckedRationalArray.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Out of memory"
	.text
	.p2align 4
	.type	TIFFWriteDirectoryTagCheckedRationalArray, @function
TIFFWriteDirectoryTagCheckedRationalArray:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, ecx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, r8d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	mov	edi, 1
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	QWORD PTR [rsp], r9
	call	assert@PLT
	lea	eax, [r14+r14]
	lea	edi, 0[0+r14*8]
	mov	DWORD PTR 12[rsp], eax
	call	_TIFFmalloc@PLT
	test	rax, rax
	je	.L2
	test	r14d, r14d
	mov	r9, QWORD PTR [rsp]
	mov	rbp, rax
	jle	.L18
	xor	eax, eax
	pxor	xmm1, xmm1
	movsd	xmm3, QWORD PTR .LC4[rip]
	movss	xmm4, DWORD PTR .LC3[rip]
	movss	xmm0, DWORD PTR [r9+rax*4]
	movss	xmm5, DWORD PTR .LC2[rip]
	lea	edx, -1[r14]
	movapd	xmm6, xmm3
	comiss	xmm1, xmm0
	jnb	.L7
	.p2align 4,,10
	.p2align 3
.L30:
	ucomiss	xmm0, xmm0
	jp	.L7
	jne	.L7
	comiss	xmm0, xmm1
	jb	.L11
	comiss	xmm5, xmm0
	jb	.L11
	cvttss2si	ecx, xmm0
	pxor	xmm2, xmm2
	cvtsi2ss	xmm2, ecx
	ucomiss	xmm0, xmm2
	jp	.L11
	jne	.L11
	mov	DWORD PTR 0[rbp+rax*8], ecx
	lea	rsi, 1[rax]
	mov	DWORD PTR 4[rbp+rax*8], 1
	cmp	rax, rdx
	jne	.L19
	.p2align 4,,10
	.p2align 3
.L18:
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR TIFF_SWAB[rip], eax
	jne	.L28
.L5:
	lea	eax, 0[0+r14*8]
	push	rbp
	.cfi_def_cfa_offset 88
	mov	rdx, r13
	mov	rsi, r12
	push	rax
	.cfi_def_cfa_offset 96
	mov	r8d, DWORD PTR TIFF_RATIONAL[rip]
	mov	r9d, r14d
	mov	ecx, r15d
	mov	rdi, rbx
	call	TIFFWriteDirectoryTagData@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	_TIFFfree@PLT
	pop	rax
	.cfi_def_cfa_offset 88
	pop	rdx
	.cfi_def_cfa_offset 80
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	comiss	xmm4, xmm0
	pxor	xmm2, xmm2
	cvtss2sd	xmm2, xmm0
	ja	.L29
	movapd	xmm0, xmm3
	mov	DWORD PTR 0[rbp+rax*8], -1
	divsd	xmm0, xmm2
	cvttsd2si	ecx, xmm0
	mov	DWORD PTR 4[rbp+rax*8], ecx
	.p2align 4,,10
	.p2align 3
.L10:
	lea	rsi, 1[rax]
	cmp	rax, rdx
	je	.L18
.L19:
	mov	rax, rsi
	movss	xmm0, DWORD PTR [r9+rax*4]
	comiss	xmm1, xmm0
	jb	.L30
.L7:
	mov	DWORD PTR 0[rbp+rax*8], 0
	mov	DWORD PTR 4[rbp+rax*8], 1
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L29:
	mulsd	xmm2, xmm6
	mov	DWORD PTR 4[rbp+rax*8], -1
	cvttsd2si	ecx, xmm2
	mov	DWORD PTR 0[rbp+rax*8], ecx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L28:
	mov	esi, DWORD PTR 12[rsp]
	mov	rdi, rbp
	call	TIFFSwabArrayOfLong@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, DWORD PTR 4[rbx]
	lea	rdx, .LC0[rip]
	lea	rsi, module.1955[rip]
	xor	r12d, r12d
	call	TIFFErrorExt@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	TIFFWriteDirectoryTagCheckedRationalArray, .-TIFFWriteDirectoryTagCheckedRationalArray
	.section	.rodata
	.align 32
	.type	module.1955, @object
	.size	module.1955, 42
module.1955:
	.string	"TIFFWriteDirectoryTagCheckedRationalArray"
	.comm	TIFF_SWAB,4,4
	.comm	TIFF_RATIONAL,4,4
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC2:
	.long	1333788672
	.align 4
.LC3:
	.long	1065353216
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC4:
	.long	4292870144
	.long	1106247679
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_tif_dirwrite.c_TIFFWriteDirectoryTagCheckedRationalArray.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Out of memory\000"
	.global	__aeabi_fcmple
	.global	__aeabi_fcmpeq
	.global	__aeabi_fcmpge
	.global	__aeabi_f2iz
	.global	__aeabi_i2f
	.global	__aeabi_f2d
	.global	__aeabi_fcmplt
	.global	__aeabi_dmul
	.global	__aeabi_d2iz
	.global	__aeabi_ddiv
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	TIFFWriteDirectoryTagCheckedRationalArray, %function
TIFFWriteDirectoryTagCheckedRationalArray:
	@ args = 8, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, r0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #44
	ldr	r7, [sp, #80]
	mov	r0, #1
	lsl	r4, r7, #3
	str	r3, [sp, #32]
	str	ip, [sp, #20]
	str	r1, [sp, #24]
	str	r2, [sp, #28]
	str	r4, [sp, #36]
	bl	assert
	mov	r0, r4
	bl	_TIFFmalloc
	subs	r3, r0, #0
	str	r3, [sp, #16]
	beq	.L2
	cmp	r7, #0
	ble	.L18
	mov	r5, #0
	mov	r9, #1
	mov	r8, #0
	ldr	r3, [sp, #16]
	add	r4, r3, #8
	ldr	r3, [sp, #84]
	sub	r6, r3, #4
.L17:
	ldr	r10, [r6, #4]!	@ float
	mov	r1, r8
	mov	r0, r10
	bl	__aeabi_fcmple
	cmp	r0, #0
	bne	.L7
	mov	r1, r10
	mov	r0, r10
	bl	__aeabi_fcmpeq
	cmp	r0, #0
	beq	.L7
	mov	r1, r8
	mov	r0, r10
	bl	__aeabi_fcmpge
	cmp	r0, #0
	beq	.L11
	mov	r0, r10
	ldr	r1, .L33
	bl	__aeabi_fcmple
	cmp	r0, #0
	beq	.L11
	mov	r0, r10
	bl	__aeabi_f2iz
	mov	fp, r0
	bl	__aeabi_i2f
	mov	r1, r0
	mov	r0, r10
	bl	__aeabi_fcmpeq
	cmp	r0, #0
	strne	fp, [r4, #-8]
	strne	r9, [r4, #-4]
	bne	.L10
.L11:
	mov	r0, r10
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r10
	mov	r1, #1065353216
	mov	r10, r2
	mov	fp, r3
	bl	__aeabi_fcmplt
	cmp	r0, #0
	bne	.L31
	mvn	r3, #0
	mov	r2, r10
	str	r3, [r4, #-8]
	ldr	r0, .L33+4
	mov	r3, fp
	ldr	r1, .L33+8
	bl	__aeabi_ddiv
	bl	__aeabi_d2iz
	str	r0, [r4, #-4]
.L10:
	add	r5, r5, #1
	cmp	r7, r5
	add	r4, r4, #8
	bne	.L17
.L18:
	ldr	r3, .L33+12
	ldr	r2, [sp, #20]
	ldr	r3, [r3]
	ldr	r2, [r2]
	tst	r2, r3
	bne	.L32
.L5:
	ldr	r5, [sp, #16]
	ldr	r3, .L33+16
	str	r5, [sp, #12]
	ldr	ip, [r3]
	ldr	r3, [sp, #36]
	str	r7, [sp, #4]
	str	r3, [sp, #8]
	add	r0, sp, #20
	ldm	r0, {r0, r1, r2, r3}
	str	ip, [sp]
	bl	TIFFWriteDirectoryTagData
	mov	r4, r0
	mov	r0, r5
	bl	_TIFFfree
.L1:
	mov	r0, r4
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	mov	r3, #0
	add	r5, r5, #1
	cmp	r7, r5
	stmdb	r4, {r3, r9}
	add	r4, r4, #8
	bne	.L17
	b	.L18
.L31:
	ldr	r3, .L33+8
	ldr	r2, .L33+4
	mov	r0, r10
	mov	r1, fp
	bl	__aeabi_dmul
	bl	__aeabi_d2iz
	mvn	r3, #0
	add	r5, r5, #1
	cmp	r7, r5
	stmdb	r4, {r0, r3}
	add	r4, r4, #8
	bne	.L17
	b	.L18
.L32:
	ldr	r0, [sp, #16]
	lsl	r1, r7, #1
	bl	TIFFSwabArrayOfLong
	b	.L5
.L2:
	ldr	r3, [sp, #20]
	ldr	r2, .L33+20
	ldr	r0, [r3, #4]
	ldr	r1, .L33+24
	ldr	r4, [sp, #16]
	bl	TIFFErrorExt
	b	.L1
.L34:
	.align	2
.L33:
	.word	1333788672
	.word	-2097152
	.word	1106247679
	.word	TIFF_SWAB
	.word	TIFF_RATIONAL
	.word	.LC0
	.word	.LANCHOR0
	.size	TIFFWriteDirectoryTagCheckedRationalArray, .-TIFFWriteDirectoryTagCheckedRationalArray
	.comm	TIFF_SWAB,4,4
	.comm	TIFF_RATIONAL,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
	.type	module.4239, %object
	.size	module.4239, 42
module.4239:
	.ascii	"TIFFWriteDirectoryTagCheckedRationalArray\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
