	.file	"extr_nuklear_rawfb.h_nk_rawfb_fill_polygon.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	nk_rawfb_fill_polygon, @function
nk_rawfb_fill_polygon:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 344
	.cfi_def_cfa_offset 400
	mov	QWORD PTR 32[rsp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 328[rsp], rax
	xor	eax, eax
	test	edx, edx
	je	.L1
	cmp	edx, 64
	mov	eax, 64
	cmovle	eax, edx
	mov	DWORD PTR 44[rsp], eax
	mov	r9d, eax
	test	edx, edx
	jle	.L1
	mov	rbp, rdi
	mov	r8, rsi
	mov	r12d, ecx
	xor	eax, eax
	xor	esi, esi
	xor	ecx, ecx
	mov	r15d, 10000
	mov	edi, 10000
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edx, DWORD PTR [r8+rax*8]
	cmp	edi, edx
	cmovg	edi, edx
	cmp	esi, edx
	cmovl	esi, edx
	mov	edx, DWORD PTR 4[r8+rax*8]
	cmp	r15d, edx
	cmovg	r15d, edx
	cmp	ecx, edx
	cmovl	ecx, edx
	add	rax, 1
	cmp	r9d, eax
	jg	.L3
	lea	eax, 1[rsi]
	mov	DWORD PTR 40[rsp], edi
	mov	DWORD PTR 12[rsp], eax
	cmp	r15d, ecx
	jg	.L1
	mov	eax, DWORD PTR 44[rsp]
	lea	ebx, 1[rcx]
	mov	DWORD PTR 56[rsp], ebx
	mov	rbx, QWORD PTR 32[rsp]
	sub	eax, 1
	mov	DWORD PTR 60[rsp], eax
	cdqe
	lea	rax, [rbx+rax*8]
	mov	QWORD PTR 48[rsp], rax
	lea	rax, 64[rsp]
	mov	QWORD PTR 24[rsp], rax
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rax, QWORD PTR 48[rsp]
	mov	edi, DWORD PTR 60[rsp]
	xor	r9d, r9d
	mov	r10d, DWORD PTR 44[rsp]
	mov	r8, QWORD PTR 32[rsp]
	mov	edx, DWORD PTR 4[rax]
	xor	eax, eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L44:
	cmp	ecx, r15d
	jl	.L8
.L7:
	pxor	xmm2, xmm2
	pxor	xmm0, xmm0
	pxor	xmm1, xmm1
	movsx	r11, r9d
	cvtsi2ss	xmm2, edx
	pxor	xmm3, xmm3
	add	r9d, 1
	cvtsi2ss	xmm1, ecx
	cvtsi2ss	xmm0, r15d
	cvtsi2ss	xmm3, DWORD PTR [r8+rax*8]
	subss	xmm1, xmm2
	subss	xmm0, xmm2
	divss	xmm0, xmm1
	pxor	xmm1, xmm1
	cvtsi2ss	xmm1, DWORD PTR [r8+rsi*8]
	subss	xmm1, xmm3
	mulss	xmm0, xmm1
	addss	xmm0, xmm3
	cvttss2si	ecx, xmm0
	mov	DWORD PTR 64[rsp+r11*4], ecx
.L8:
	add	rax, 1
	cmp	r10d, eax
	jle	.L43
.L9:
	mov	ecx, edx
	mov	edx, DWORD PTR 4[r8+rax*8]
	movsx	rsi, edi
	mov	edi, eax
	cmp	edx, r15d
	jl	.L44
	cmp	ecx, r15d
	jl	.L7
	add	rax, 1
	cmp	r10d, eax
	jg	.L9
.L43:
	lea	edi, -1[r9]
	xor	edx, edx
	xor	eax, eax
.L10:
	mov	rbx, QWORD PTR 24[rsp]
	lea	rax, [rbx+rax*4]
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L13:
	mov	esi, DWORD PTR [rax]
	mov	r8d, DWORD PTR 4[rax]
	add	rax, 4
	lea	ecx, 1[rdx]
	cmp	esi, r8d
	jg	.L45
	mov	edx, ecx
.L11:
	cmp	edx, edi
	jl	.L13
	test	r9d, r9d
	je	.L16
	shr	edi
	mov	r14, QWORD PTR 24[rsp]
	lea	rax, 72[rsp+rdi*8]
	mov	QWORD PTR 16[rsp], rax
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L23:
	add	r14, 8
	cmp	r14, QWORD PTR 16[rsp]
	je	.L16
.L18:
	mov	esi, DWORD PTR [r14]
	cmp	esi, DWORD PTR 12[rsp]
	jge	.L16
	mov	ebx, DWORD PTR 4[r14]
	cmp	DWORD PTR 40[rsp], ebx
	jge	.L23
	mov	eax, DWORD PTR 40[rsp]
	cmp	eax, esi
	jle	.L19
	mov	DWORD PTR [r14], eax
	mov	esi, eax
	cmp	ebx, DWORD PTR 12[rsp]
	jg	.L20
	mov	r13d, DWORD PTR 40[rsp]
	.p2align 4,,10
	.p2align 3
.L24:
	mov	esi, r13d
	mov	ecx, r12d
	mov	edx, r15d
	mov	rdi, rbp
	call	nk_rawfb_ctx_setpixel@PLT
	add	r13d, 1
	cmp	ebx, r13d
	jne	.L24
	add	r14, 8
	cmp	r14, QWORD PTR 16[rsp]
	jne	.L18
	.p2align 4,,10
	.p2align 3
.L16:
	add	r15d, 1
	cmp	DWORD PTR 56[rsp], r15d
	jne	.L15
.L1:
	mov	rax, QWORD PTR 328[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L46
	add	rsp, 344
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	cmp	ebx, DWORD PTR 12[rsp]
	jle	.L22
.L20:
	mov	eax, DWORD PTR 12[rsp]
	mov	DWORD PTR 4[r14], eax
	mov	ebx, eax
.L22:
	mov	r13d, esi
	cmp	ebx, esi
	jg	.L24
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L45:
	movsx	rax, edx
	movsx	rcx, ecx
	mov	DWORD PTR 64[rsp+rax*4], r8d
	mov	DWORD PTR 64[rsp+rcx*4], esi
	test	edx, edx
	je	.L10
	sub	edx, 1
	movsx	rax, edx
	jmp	.L10
.L46:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	nk_rawfb_fill_polygon, .-nk_rawfb_fill_polygon
	.comm	MAX_POINTS,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_nuklear_rawfb.h_nk_rawfb_fill_polygon.c"
	.text
	.global	__aeabi_i2f
	.global	__aeabi_fsub
	.global	__aeabi_fdiv
	.global	__aeabi_fmul
	.global	__aeabi_fadd
	.global	__aeabi_f2iz
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nk_rawfb_fill_polygon, %function
nk_rawfb_fill_polygon:
	@ args = 0, pretend = 0, frame = 304
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r10, r3
	sub	sp, sp, #308
	ldr	r3, .L46
	str	r1, [sp, #16]
	cmp	r2, #0
	ldr	r3, [r3]
	str	r3, [sp, #300]
	mov	r3,#0
	beq	.L1
	cmp	r2, #64
	movlt	r4, r2
	movge	r4, #64
	cmp	r2, #0
	str	r4, [sp, #8]
	ble	.L1
	mov	ip, #0
	ldr	fp, .L46+4
	mov	r9, r0
	mov	lr, ip
	mov	r3, ip
	mov	r0, fp
	mov	r5, r1
	add	r6, r1, #4
	str	r6, [sp, #12]
.L3:
	ldr	r1, [r5, r3, lsl #3]
	ldr	r2, [r6, r3, lsl #3]
	cmp	r0, r1
	movge	r0, r1
	cmp	ip, r1
	movlt	ip, r1
	cmp	fp, r2
	movge	fp, r2
	add	r3, r3, #1
	cmp	lr, r2
	movlt	lr, r2
	cmp	r4, r3
	bgt	.L3
	add	r3, ip, #1
	cmp	fp, lr
	str	r0, [sp]
	str	r3, [sp, #36]
	bgt	.L1
	add	r2, lr, #1
	ldr	r3, [sp, #8]
	str	r2, [sp, #24]
	ldr	r2, [sp, #16]
	sub	r3, r3, #1
	str	r3, [sp, #32]
	add	r3, r2, r3, lsl #3
	str	r3, [sp, #28]
.L15:
	mov	r8, #0
	ldr	r3, [sp, #28]
	str	r10, [sp, #20]
	ldr	r5, [r3, #4]
	ldr	r3, [sp, #32]
	mov	r4, r8
	mov	r10, r3
	str	r9, [sp, #4]
	b	.L9
.L43:
	cmp	r6, fp
	blt	.L8
.L7:
	ldr	r3, [sp, #16]
	ldr	r0, [r3, r4, lsl #3]
	bl	__aeabi_i2f
	mov	r7, r0
	mov	r0, r5
	bl	__aeabi_i2f
	mov	r9, r0
	mov	r0, fp
	bl	__aeabi_i2f
	mov	r1, r9
	bl	__aeabi_fsub
	mov	ip, r0
	mov	r0, r6
	mov	r6, ip
	bl	__aeabi_i2f
	mov	r1, r9
	bl	__aeabi_fsub
	mov	r1, r0
	mov	r0, r6
	bl	__aeabi_fdiv
	ldr	r3, [sp, #16]
	mov	r6, r0
	ldr	r0, [r3, r10, lsl #3]
	bl	__aeabi_i2f
	mov	r1, r7
	bl	__aeabi_fsub
	mov	r1, r0
	mov	r0, r6
	bl	__aeabi_fmul
	mov	r1, r7
	bl	__aeabi_fadd
	bl	__aeabi_f2iz
	add	r1, r8, #1
	add	r3, sp, #304
	add	r3, r3, r8, lsl #2
	mov	r8, r1
	str	r0, [r3, #-260]
.L8:
	ldr	r3, [sp, #8]
	add	r1, r4, #1
	cmp	r3, r1
	mov	r10, r4
	ble	.L42
	mov	r4, r1
.L9:
	ldr	r3, [sp, #12]
	mov	r6, r5
	ldr	r5, [r3, r4, lsl #3]
	cmp	r5, fp
	blt	.L43
	cmp	r6, fp
	bge	.L8
	b	.L7
.L42:
	mov	r3, #0
	mov	r1, r3
	ldr	r9, [sp, #4]
	ldr	r10, [sp, #20]
	sub	r4, r8, #1
.L10:
	add	r2, sp, #44
	add	r1, r2, r1
	b	.L11
.L13:
	ldr	r0, [r1]
	ldr	ip, [r1, #4]!
	add	r2, r3, #1
	cmp	r0, ip
	bgt	.L44
	mov	r3, r2
.L11:
	cmp	r3, r4
	blt	.L13
	cmp	r8, #0
	beq	.L16
	str	r8, [sp, #4]
	mov	r7, #0
	ldr	r8, [sp, #36]
	add	r6, sp, #48
	b	.L18
.L23:
	ldr	r3, [sp, #4]
	add	r7, r7, #2
	cmp	r3, r7
	add	r6, r6, #8
	ble	.L16
.L18:
	ldr	r4, [r6, #-4]
	cmp	r4, r8
	bge	.L16
	ldr	r5, [r6]
	ldr	r3, [sp]
	cmp	r3, r5
	bge	.L23
	ldr	r3, [sp]
	cmp	r3, r4
	ble	.L19
	cmp	r5, r8
	movgt	r4, r3
	str	r3, [r6, #-4]
	bgt	.L20
	ldr	r4, [sp]
.L24:
	mov	r1, r4
	mov	r3, r10
	mov	r2, fp
	mov	r0, r9
	add	r4, r4, #1
	bl	nk_rawfb_ctx_setpixel
	cmp	r5, r4
	bne	.L24
	b	.L23
.L19:
	cmp	r5, r8
	ble	.L22
.L20:
	mov	r5, r8
	str	r8, [r6]
.L22:
	cmp	r5, r4
	bgt	.L24
	b	.L23
.L16:
	ldr	r3, [sp, #24]
	add	fp, fp, #1
	cmp	r3, fp
	bne	.L15
.L1:
	ldr	r3, .L46
	ldr	r2, [r3]
	ldr	r3, [sp, #300]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L45
	add	sp, sp, #308
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L44:
	add	r1, sp, #304
	add	r2, r1, r2, lsl #2
	cmp	r3, #0
	add	r1, r1, r3, lsl #2
	str	ip, [r1, #-260]
	lsl	r1, r3, #2
	subne	r3, r3, #1
	str	r0, [r2, #-260]
	lslne	r1, r3, #2
	b	.L10
.L45:
	bl	__stack_chk_fail
.L47:
	.align	2
.L46:
	.word	.LC0
	.word	10000
	.size	nk_rawfb_fill_polygon, .-nk_rawfb_fill_polygon
	.comm	MAX_POINTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
