	.file	"extr_puzzle_lib.c_puzzle_draw_rectangle.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	puzzle_draw_rectangle
	.type	puzzle_draw_rectangle, @function
puzzle_draw_rectangle:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	add	rcx, rsi
	add	r8, rdx
	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, 72
	.cfi_def_cfa_offset 128
	cmp	QWORD PTR [rdi], 0
	mov	QWORD PTR 8[rsp], rdi
	mov	QWORD PTR 40[rsp], rsi
	mov	QWORD PTR 48[rsp], rdx
	mov	QWORD PTR 56[rsp], r9
	mov	QWORD PTR 24[rsp], rcx
	mov	QWORD PTR 32[rsp], r8
	mov	QWORD PTR [rsp], 0
	je	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR 8[rsp]
	mov	rcx, QWORD PTR [rsp]
	cmp	QWORD PTR Y_PLANE[rip], rcx
	mov	r8, QWORD PTR 8[rax]
	lea	rax, [rcx+rcx*4]
	lea	r15, [r8+rax*8]
	mov	rbp, QWORD PTR [r15]
	je	.L9
	cmp	QWORD PTR U_PLANE[rip], rcx
	je	.L10
	cmp	QWORD PTR V_PLANE[rip], rcx
	cmove	rbx, QWORD PTR 136[rsp]
.L3:
	mov	rsi, QWORD PTR 8[r15]
	mov	rax, QWORD PTR 40[rsp]
	xor	edx, edx
	mov	rdi, QWORD PTR 8[r8]
	mov	r12, QWORD PTR 16[r15]
	imul	rax, rsi
	div	rdi
	xor	edx, edx
	imul	rax, rbp
	mov	r13, rax
	mov	rax, QWORD PTR 24[rsp]
	imul	rax, rsi
	mov	rsi, QWORD PTR 16[r8]
	div	rdi
	xor	edx, edx
	imul	rbp, rax
	mov	rax, QWORD PTR 48[rsp]
	imul	rax, r12
	imul	r12, QWORD PTR 32[rsp]
	mov	rcx, rbp
	sub	rcx, r13
	div	rsi
	mov	QWORD PTR 16[rsp], rcx
	xor	edx, edx
	mov	r14, rax
	mov	rax, r12
	div	rsi
	mov	rdx, QWORD PTR 32[r15]
	mov	rsi, rbx
	mov	r12, rax
	mov	rax, QWORD PTR 24[r15]
	sub	r12, 1
	imul	rax, r14
	add	rax, r13
	lea	rdi, [rdx+rax*4]
	mov	rdx, rcx
	call	memset@PLT
	mov	rax, r12
	sub	rax, r14
	add	r14, 1
	cmp	rax, 1
	jbe	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rax, QWORD PTR 24[r15]
	mov	rdx, QWORD PTR 32[r15]
	mov	rsi, rbx
	imul	rax, r14
	add	rax, r13
	lea	rdi, [rdx+rax*4]
	mov	rdx, QWORD PTR [r15]
	call	memset@PLT
	mov	rax, QWORD PTR 24[r15]
	mov	rdx, QWORD PTR 32[r15]
	mov	rsi, rbx
	imul	rax, r14
	add	r14, 1
	add	rax, rbp
	lea	rdi, -4[rdx+rax*4]
	mov	rdx, QWORD PTR [r15]
	call	memset@PLT
	cmp	r12, r14
	jne	.L7
.L8:
	imul	r12, QWORD PTR 24[r15]
	mov	rax, QWORD PTR 32[r15]
	mov	rsi, rbx
	mov	rdx, QWORD PTR 16[rsp]
	add	r13, r12
	lea	rdi, [rax+r13*4]
	call	memset@PLT
	mov	rcx, QWORD PTR 8[rsp]
	add	QWORD PTR [rsp], 1
	mov	rax, QWORD PTR [rsp]
	cmp	QWORD PTR [rcx], rax
	ja	.L5
.L1:
	add	rsp, 72
	.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
.L9:
	.cfi_restore_state
	mov	rbx, QWORD PTR 56[rsp]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rbx, QWORD PTR 128[rsp]
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	puzzle_draw_rectangle, .-puzzle_draw_rectangle
	.comm	Y_PLANE,8,8
	.comm	V_PLANE,8,8
	.comm	U_PLANE,8,8
	.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_puzzle_lib.c_puzzle_draw_rectangle.c"
	.text
	.global	__aeabi_uidiv
	.align	2
	.global	puzzle_draw_rectangle
	.syntax unified
	.arm
	.fpu softvfp
	.type	puzzle_draw_rectangle, %function
puzzle_draw_rectangle:
	@ args = 16, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #28
	str	r0, [sp]
	ldr	r0, [r0]
	str	r1, [sp, #8]
	cmp	r0, #0
	str	r2, [sp, #12]
	beq	.L1
	mov	r10, #0
	add	r3, r1, r3
	str	r3, [sp, #16]
	ldr	r3, [sp, #64]
	add	r3, r2, r3
	str	r3, [sp, #20]
.L5:
	ldr	r3, .L15
	ldr	r2, [sp]
	ldr	r3, [r3]
	ldr	r8, [r2, #4]
	cmp	r3, r10
	add	r3, r10, r10, lsl #2
	ldr	r7, [r8, r3, lsl #2]
	add	r4, r8, r3, lsl #2
	beq	.L9
	ldr	r3, .L15+4
	ldr	r3, [r3]
	cmp	r3, r10
	beq	.L10
	ldr	r3, .L15+8
	ldr	r2, [sp, #76]
	ldr	r3, [r3]
	cmp	r3, r10
	moveq	r6, r2
.L3:
	ldr	r5, [r8, #4]
	ldr	r9, [r4, #4]
	ldr	r0, [sp, #8]
	mov	r1, r5
	mul	r0, r9, r0
	bl	__aeabi_uidiv
	mov	r3, r0
	ldr	r0, [sp, #16]
	mov	r1, r5
	mul	r0, r9, r0
	mul	r5, r7, r3
	bl	__aeabi_uidiv
	mov	r2, r0
	ldr	r3, [r8, #8]
	ldr	r0, [sp, #12]
	ldr	r8, [r4, #8]
	mov	r1, r3
	mul	r0, r8, r0
	mul	r7, r2, r7
	str	r3, [sp, #4]
	bl	__aeabi_uidiv
	mov	fp, r0
	ldr	r2, [r4, #12]
	ldr	r0, [r4, #16]
	mla	r2, fp, r2, r5
	sub	r9, r7, r5
	mov	r1, r6
	add	r0, r0, r2, lsl #2
	mov	r2, r9
	bl	memset
	ldr	r3, [sp, #4]
	ldr	r0, [sp, #20]
	mov	r1, r3
	mul	r0, r8, r0
	bl	__aeabi_uidiv
	sub	r8, r0, #1
	sub	r3, r8, fp
	cmp	r3, #1
	subhi	r7, r7, #-1073741823
	addhi	fp, fp, #1
	bls	.L8
.L7:
	ldr	r3, [r4, #12]
	ldr	r0, [r4, #16]
	mla	r3, fp, r3, r5
	mov	r1, r6
	ldr	r2, [r4]
	add	r0, r0, r3, lsl #2
	bl	memset
	ldr	r3, [r4, #12]
	ldr	r0, [r4, #16]
	mla	r3, fp, r3, r7
	mov	r1, r6
	ldr	r2, [r4]
	add	fp, fp, #1
	add	r0, r0, r3, lsl #2
	bl	memset
	cmp	r8, fp
	bne	.L7
.L8:
	ldr	r3, [r4, #12]
	ldr	r0, [r4, #16]
	mla	r5, r3, r8, r5
	mov	r2, r9
	mov	r1, r6
	add	r0, r0, r5, lsl #2
	bl	memset
	ldr	r3, [sp]
	add	r10, r10, #1
	ldr	r3, [r3]
	cmp	r3, r10
	bhi	.L5
.L1:
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	ldr	r6, [sp, #68]
	b	.L3
.L10:
	ldr	r6, [sp, #72]
	b	.L3
.L16:
	.align	2
.L15:
	.word	Y_PLANE
	.word	U_PLANE
	.word	V_PLANE
	.size	puzzle_draw_rectangle, .-puzzle_draw_rectangle
	.comm	Y_PLANE,4,4
	.comm	V_PLANE,4,4
	.comm	U_PLANE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
