	.file	"extr_cmstypes.c_Type_ColorantTable_Write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	Type_ColorantTable_Write, @function
Type_ColorantTable_Write:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rsi, rcx
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	mov	r13d, edi
	push	r12
	push	rbx
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 72
	mov	QWORD PTR -104[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	call	cmsNamedColorCount@PLT
	mov	rsi, rbx
	mov	edi, r13d
	mov	rdx, rax
	mov	QWORD PTR -96[rbp], rax
	call	_cmsWriteUInt32Number@PLT
	test	eax, eax
	je	.L25
	xor	r12d, r12d
	cmp	QWORD PTR -96[rbp], 0
	lea	r15, -68[rbp]
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	movsx	rax, DWORD PTR cmsMAX_PATH[rip]
	mov	rsi, rsp
	mov	r14, rsp
	mov	r8, rax
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L5
.L26:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L26
.L5:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L6
	or	QWORD PTR -8[rsp+rdx], 0
.L6:
	mov	rcx, rsp
	mov	rdi, rsp
	mov	edx, r8d
	xor	esi, esi
	mov	QWORD PTR -88[rbp], rcx
	call	memset@PLT
	push	0
	mov	rcx, QWORD PTR -88[rbp]
	mov	rdx, r12
	push	r15
	mov	rsi, QWORD PTR -104[rbp]
	xor	r9d, r9d
	xor	r8d, r8d
	mov	edi, r13d
	call	cmsNamedColorInfo@PLT
	pop	rdx
	pop	rcx
	test	eax, eax
	je	.L7
	mov	rcx, QWORD PTR -88[rbp]
	mov	edx, 32
	mov	rsi, rbx
	mov	edi, r13d
	mov	BYTE PTR 32[rcx], 0
	call	[QWORD PTR [rbx]]
	test	eax, eax
	je	.L23
	mov	rcx, r15
	mov	edx, 3
	mov	rsi, rbx
	mov	edi, r13d
	call	_cmsWriteUInt16Array@PLT
	test	eax, eax
	je	.L23
	add	r12, 1
	mov	rsp, r14
	cmp	QWORD PTR -96[rbp], r12
	jne	.L10
.L11:
	mov	eax, DWORD PTR TRUE[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	mov	eax, DWORD PTR FALSE[rip]
.L7:
	mov	rsp, r14
.L1:
	mov	rbx, QWORD PTR -56[rbp]
	xor	rbx, QWORD PTR fs:40
	jne	.L27
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	mov	eax, DWORD PTR FALSE[rip]
	jmp	.L1
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	Type_ColorantTable_Write, .-Type_ColorantTable_Write
	.comm	cmsMAX_PATH,4,4
	.comm	TRUE,4,4
	.comm	FALSE,4,4
	.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_cmstypes.c_Type_ColorantTable_Write.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	Type_ColorantTable_Write, %function
Type_ColorantTable_Write:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #44
	mov	r1, r3
	str	r3, [fp, #-60]
	ldr	r3, .L22
	mov	r7, r2
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	mov	r6, r0
	bl	cmsNamedColorCount
	mov	r1, r7
	mov	r2, r0
	str	r0, [fp, #-56]
	mov	r0, r6
	bl	_cmsWriteUInt32Number
	cmp	r0, #0
	beq	.L19
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	movgt	r5, #0
	subgt	r8, fp, #52
	movgt	r4, r5
	bgt	.L7
	b	.L8
.L20:
	mov	r3, r10
	strb	r4, [r10, #32]
	mov	r2, #32
	mov	r1, r7
	mov	r0, r6
	ldr	r10, [r7]
	blx	r10
	cmp	r0, #0
	beq	.L17
	mov	r3, r8
	mov	r2, #3
	mov	r1, r7
	mov	r0, r6
	bl	_cmsWriteUInt16Array
	cmp	r0, #0
	beq	.L17
	ldr	r3, [fp, #-56]
	add	r5, r5, #1
	cmp	r3, r5
	mov	sp, r9
	beq	.L8
.L7:
	ldr	r3, .L22+4
	mov	r9, sp
	ldr	r2, [r3]
	mov	r1, #0
	add	r3, r2, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	add	r10, sp, #16
	mov	r0, r10
	bl	memset
	stmib	sp, {r4, r8}
	str	r4, [sp, #12]
	str	r4, [sp]
	mov	r3, r10
	mov	r2, r5
	mov	r0, r6
	ldr	r1, [fp, #-60]
	bl	cmsNamedColorInfo
	cmp	r0, #0
	bne	.L20
.L4:
	mov	sp, r9
.L1:
	ldr	r3, .L22
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L21
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	ldr	r3, .L22+8
	ldr	r0, [r3]
	b	.L1
.L17:
	ldr	r3, .L22+8
	ldr	r0, [r3]
	b	.L4
.L8:
	ldr	r3, .L22+12
	ldr	r0, [r3]
	b	.L1
.L21:
	bl	__stack_chk_fail
.L23:
	.align	2
.L22:
	.word	.LC0
	.word	cmsMAX_PATH
	.word	FALSE
	.word	TRUE
	.size	Type_ColorantTable_Write, .-Type_ColorantTable_Write
	.comm	cmsMAX_PATH,4,4
	.comm	TRUE,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
