	.file	"extr_pdf-op-run.c_pdf_set_colorspace.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pdf_set_colorspace, @function
pdf_set_colorspace:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	mov	rsi, rcx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	fz_colorspace_n@PLT
	mov	rsi, r15
	mov	rdi, rbp
	mov	r13d, eax
	call	pdf_flush_text@PLT
	cmp	DWORD PTR PDF_FILL[rip], r14d
	mov	rbx, rax
	jne	.L3
	add	rbx, 16
.L3:
	mov	esi, DWORD PTR 8[rbx]
	mov	rdi, rbp
	call	fz_drop_colorspace@PLT
	mov	eax, DWORD PTR PDF_MAT_COLOR[rip]
	mov	rsi, r12
	mov	rdi, rbp
	mov	DWORD PTR 12[rbx], eax
	call	fz_keep_colorspace@PLT
	mov	rsi, r12
	mov	rdi, rbp
	movabs	rcx, 4294967296
	mov	DWORD PTR 8[rbx], eax
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], rcx
	call	pdf_is_tint_colorspace@PLT
	test	rax, rax
	je	.L1
	test	r13d, r13d
	jle	.L1
	mov	rax, QWORD PTR [rbx]
	lea	edx, -1[r13]
	lea	rdx, 4[rax+rdx*4]
	.p2align 4,,10
	.p2align 3
.L5:
	mov	DWORD PTR [rax], 1
	add	rax, 4
	cmp	rax, rdx
	jne	.L5
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 56
	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
	.cfi_endproc
.LFE0:
	.size	pdf_set_colorspace, .-pdf_set_colorspace
	.comm	PDF_MAT_COLOR,4,4
	.comm	PDF_FILL,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_pdf-op-run.c_pdf_set_colorspace.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pdf_set_colorspace, %function
pdf_set_colorspace:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	mov	r1, r3
	mov	r7, r2
	mov	r8, r3
	mov	r6, r0
	bl	fz_colorspace_n
	mov	r1, r4
	mov	r5, r0
	mov	r0, r6
	bl	pdf_flush_text
	ldr	r3, .L12
	ldr	r3, [r3]
	cmp	r3, r7
	movne	r4, r0
	addeq	r4, r0, #12
	ldr	r1, [r4, #4]
	mov	r0, r6
	bl	fz_drop_colorspace
	ldr	r3, .L12+4
	mov	r1, r8
	ldr	r3, [r3]
	mov	r0, r6
	str	r3, [r4, #8]
	bl	fz_keep_colorspace
	mov	r7, #1
	mov	r2, #0
	ldr	r3, [r4]
	str	r0, [r4, #4]
	mov	r1, r8
	mov	r0, r6
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r7, [r3, #12]
	bl	pdf_is_tint_colorspace
	cmp	r0, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	cmp	r5, #0
	pople	{r4, r5, r6, r7, r8, pc}
	mov	r2, r7
	ldr	r3, [r4]
	add	r0, r3, r5, lsl #2
	sub	r0, r0, #4
	sub	r3, r3, #4
.L5:
	str	r2, [r3, #4]!
	cmp	r3, r0
	bne	.L5
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	.align	2
.L12:
	.word	PDF_FILL
	.word	PDF_MAT_COLOR
	.size	pdf_set_colorspace, .-pdf_set_colorspace
	.comm	PDF_MAT_COLOR,4,4
	.comm	PDF_FILL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
