	.file	"extr_lib_color.c_rgb2hls.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rgb2hls, @function
rgb2hls:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	esi, edx
	mov	r11d, edx
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, edx
	cmovle	r11d, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	r10d, edx
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, edi
	cmp	r11d, edi
	cmovg	r11d, edi
	cmp	esi, edx
	cmovge	r12d, esi
	cmp	r12d, edi
	cmovge	ebx, r12d
	lea	ebp, [rbx+r11]
	movsx	rax, ebp
	mov	edx, ebp
	imul	rax, rax, 1717986919
	sar	edx, 31
	sar	rax, 35
	sub	eax, edx
	mov	DWORD PTR [r8], eax
	cmp	ebx, r11d
	je	.L12
	mov	r8d, ebx
	sub	r8d, r11d
	imul	eax, r8d, 100
	cmp	ebp, 999
	jg	.L4
	cdq
	idiv	ebp
	mov	DWORD PTR [r9], eax
	cmp	r12d, edi
	jle	.L13
.L6:
	cmp	ebx, esi
	je	.L14
	sub	edi, esi
	imul	eax, edi, 60
	cdq
	idiv	r8d
	add	eax, 360
.L7:
	movsx	rdx, eax
	mov	esi, eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	imul	rdx, rdx, -1240768329
	sar	esi, 31
	pop	r12
	.cfi_def_cfa_offset 8
	shr	rdx, 32
	add	edx, eax
	sar	edx, 8
	sub	edx, esi
	imul	edx, edx, 360
	sub	eax, edx
	mov	DWORD PTR [rcx], eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	ebp, 2000
	cdq
	sub	ebp, ebx
	sub	ebp, r11d
	idiv	ebp
	mov	DWORD PTR [r9], eax
	cmp	r12d, edi
	jg	.L6
.L13:
	sub	esi, r10d
	sub	edi, r11d
	imul	eax, esi, 60
	cdq
	idiv	edi
	add	eax, 120
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L12:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	mov	DWORD PTR [rcx], 0
	pop	r12
	.cfi_def_cfa_offset 8
	mov	DWORD PTR [r9], 0
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	sub	r10d, edi
	sub	ebx, r11d
	imul	eax, r10d, 60
	cdq
	idiv	ebx
	add	eax, 240
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	rgb2hls, .-rgb2hls
	.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_lib_color.c_rgb2hls.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rgb2hls, %function
rgb2hls:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, r2
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	movge	r8, r2
	movlt	r8, r1
	cmp	r8, r0
	movge	r8, r0
	cmp	r1, r2
	movge	fp, r1
	movlt	fp, r2
	cmp	fp, r0
	movlt	r10, r0
	movge	r10, fp
	mov	r6, r2
	ldr	r2, .L15
	mov	r5, r1
	add	r1, r10, r8
	mov	r4, r0
	smull	ip, r0, r2, r1
	ldr	ip, [sp, #40]
	asr	r2, r1, #31
	rsb	r2, r2, r0, asr #3
	cmp	r10, r8
	mov	r7, r3
	str	r2, [ip]
	beq	.L12
	sub	r9, r10, r8
	cmp	r1, #1000
	add	r0, r9, r9, lsl #2
	rsbge	r1, r10, #2000
	add	r0, r0, r0, lsl #2
	subge	r1, r1, r8
	lsl	r0, r0, #2
	bl	__aeabi_idiv
	ldr	r3, [sp, #44]
	cmp	fp, r4
	str	r0, [r3]
	ble	.L13
	cmp	r10, r5
	beq	.L14
	sub	r4, r4, r5
	rsb	r4, r4, r4, lsl #4
	mov	r1, r9
	lsl	r0, r4, #2
	bl	__aeabi_idiv
	add	r0, r0, #360
.L7:
	ldr	r3, .L15+4
	asr	r2, r0, #31
	smull	r1, r3, r0, r3
	add	r3, r3, r0
	rsb	r2, r2, r3, asr #8
	add	r2, r2, r2, lsl #1
	rsb	r2, r2, r2, lsl #4
	sub	r2, r0, r2, lsl #3
	str	r2, [r7]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	sub	r5, r5, r6
	rsb	r5, r5, r5, lsl #4
	lsl	r0, r5, #2
	sub	r1, r4, r8
	bl	__aeabi_idiv
	add	r0, r0, #120
	b	.L7
.L12:
	mov	r3, #0
	ldr	r2, [sp, #44]
	str	r3, [r7]
	str	r3, [r2]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	sub	r4, r6, r4
	rsb	r4, r4, r4, lsl #4
	mov	r1, r9
	lsl	r0, r4, #2
	bl	__aeabi_idiv
	add	r0, r0, #240
	b	.L7
.L16:
	.align	2
.L15:
	.word	1717986919
	.word	-1240768329
	.size	rgb2hls, .-rgb2hls
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
