	.file	"extr_ui_shared.c_Item_Model_Paint.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	Item_Model_Paint
	.type	Item_Model_Paint, @function
Item_Model_Paint:
.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, 200
	.cfi_def_cfa_offset 256
	mov	rbp, QWORD PTR 40[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 184[rsp], rax
	xor	eax, eax
	test	rbp, rbp
	jne	.L13
.L1:
	mov	rax, QWORD PTR 184[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 200
	.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
.L13:
	.cfi_restore_state
	lea	r12, 16[rsp]
	mov	rbx, rdi
	xor	esi, esi
	mov	edx, 80
	mov	rdi, r12
	xor	r15d, r15d
	xor	r13d, r13d
	xor	r14d, r14d
	call	memset@PLT
	mov	eax, DWORD PTR RDF_NOWORLDMODEL[rip]
	mov	edi, DWORD PTR 88[rsp]
	mov	DWORD PTR 92[rsp], eax
	call	AxisClear@PLT
	mov	eax, DWORD PTR 24[rbx]
	pxor	xmm0, xmm0
	mov	rdi, rsp
	lea	rcx, 12[rsp]
	lea	rdx, 8[rsp]
	add	eax, 1
	lea	rsi, 4[rsp]
	cvtsi2ss	xmm0, eax
	mov	eax, DWORD PTR 28[rbx]
	add	eax, 1
	movss	DWORD PTR [rsp], xmm0
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, eax
	mov	eax, DWORD PTR 32[rbx]
	sub	eax, 2
	movss	DWORD PTR 4[rsp], xmm0
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, eax
	mov	eax, DWORD PTR 36[rbx]
	sub	eax, 2
	movss	DWORD PTR 8[rsp], xmm0
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, eax
	movss	DWORD PTR 12[rsp], xmm0
	call	AdjustFrom640@PLT
	movss	xmm0, DWORD PTR [rsp]
	mov	edi, DWORD PTR 8[rbx]
	mov	rdx, r13
	mov	rax, QWORD PTR DC[rip]
	mov	rsi, r15
	movss	DWORD PTR 16[rsp], xmm0
	movss	xmm0, DWORD PTR 4[rsp]
	movss	DWORD PTR 20[rsp], xmm0
	movss	xmm0, DWORD PTR 8[rsp]
	movss	DWORD PTR 24[rsp], xmm0
	movss	xmm0, DWORD PTR 12[rsp]
	movss	DWORD PTR 28[rsp], xmm0
	call	[QWORD PTR 32[rax]]
	movsd	xmm0, QWORD PTR 16[r15]
	movsd	xmm2, QWORD PTR .LC1[rip]
	cmp	QWORD PTR qtrue[rip], 0
	addsd	xmm0, xmm0
	mulsd	xmm0, QWORD PTR .LC0[rip]
	movsd	QWORD PTR 16[r14], xmm0
	movsd	xmm1, QWORD PTR 8[r15]
	addsd	xmm1, xmm1
	mulsd	xmm1, xmm2
	movsd	QWORD PTR 8[r14], xmm1
	je	.L4
	movsd	xmm0, QWORD PTR ds:16
	subsd	xmm0, xmm0
	mulsd	xmm0, xmm2
	cvtsd2ss	xmm0, xmm0
	cvtss2sd	xmm0, xmm0
	divsd	xmm0, QWORD PTR .LC2[rip]
.L5:
	movsd	QWORD PTR ds:0, xmm0
	mov	eax, DWORD PTR 0[rbp]
	pxor	xmm0, xmm0
	movd	xmm3, eax
	ucomiss	xmm3, xmm0
	jp	.L6
	cmove	eax, DWORD PTR 8[rsp]
.L6:
	mov	DWORD PTR 32[rsp], eax
	mov	eax, DWORD PTR 4[rbp]
	movd	xmm4, eax
	ucomiss	xmm4, xmm0
	jp	.L7
	cmove	eax, DWORD PTR 12[rsp]
.L7:
	mov	rdx, QWORD PTR DC[rip]
	mov	DWORD PTR 36[rsp], eax
	xor	eax, eax
	lea	r13, 96[rsp]
	call	[QWORD PTR 24[rdx]]
	mov	rax, QWORD PTR DC[rip]
	xor	esi, esi
	mov	rdi, r13
	mov	edx, 80
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 40[rsp], rax
	call	memset@PLT
	mov	rax, QWORD PTR 8[rbp]
	test	rax, rax
	jne	.L8
	mov	edx, DWORD PTR 16[rbp]
.L9:
	xor	ebp, ebp
	xor	ecx, ecx
	xor	esi, esi
	xor	r14d, r14d
	mov	rdi, rbp
	call	VectorSet@PLT
	mov	esi, DWORD PTR 164[rsp]
	mov	rdi, rbp
	call	AnglesToAxis@PLT
	mov	eax, DWORD PTR 8[rbx]
	mov	rsi, QWORD PTR 128[rsp]
	mov	rdi, r14
	mov	DWORD PTR 160[rsp], eax
	call	VectorCopy@PLT
	mov	rsi, QWORD PTR 136[rsp]
	mov	rdi, r14
	call	VectorCopy@PLT
	mov	rsi, QWORD PTR 152[rsp]
	mov	rdi, QWORD PTR 128[rsp]
	mov	eax, DWORD PTR RF_LIGHTING_ORIGIN[rip]
	or	eax, DWORD PTR RF_NOSHADOW[rip]
	mov	DWORD PTR 144[rsp], eax
	call	VectorCopy@PLT
	mov	rax, QWORD PTR DC[rip]
	mov	rdi, r13
	call	[QWORD PTR 16[rax]]
	mov	rax, QWORD PTR DC[rip]
	mov	rdi, r12
	call	[QWORD PTR 8[rax]]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	movsd	xmm0, QWORD PTR [rbx]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdx, QWORD PTR DC[rip]
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR 16[rbp]
	cmp	rcx, QWORD PTR 16[rbx]
	jle	.L9
	add	rax, rcx
	mov	QWORD PTR 16[rbx], rax
	lea	eax, 1[rdx]
	movsx	rdx, eax
	mov	ecx, eax
	imul	rdx, rdx, -1240768329
	sar	ecx, 31
	shr	rdx, 32
	add	edx, eax
	sar	edx, 8
	sub	edx, ecx
	imul	edx, edx, 360
	sub	eax, edx
	mov	DWORD PTR 16[rbp], eax
	mov	edx, eax
	jmp	.L9
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	Item_Model_Paint, .-Item_Model_Paint
	.comm	qtrue,8,8
	.comm	RF_NOSHADOW,4,4
	.comm	RF_LIGHTING_ORIGIN,4,4
	.comm	RDF_NOWORLDMODEL,4,4
	.comm	DC,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	-1075838976
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.align 8
.LC2:
	.long	2027224564
	.long	1070671593
	.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_ui_shared.c_Item_Model_Paint.c"
	.text
	.global	__aeabi_i2f
	.global	__aeabi_dadd
	.global	__aeabi_dmul
	.global	__aeabi_dsub
	.global	__aeabi_d2f
	.global	__aeabi_f2d
	.global	__aeabi_ddiv
	.global	__aeabi_fcmpeq
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	Item_Model_Paint
	.syntax unified
	.arm
	.fpu softvfp
	.type	Item_Model_Paint, %function
Item_Model_Paint:
	@ args = 0, pretend = 0, frame = 144
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r5, [r0, #32]
	ldr	r3, .L21
	sub	sp, sp, #148
	cmp	r5, #0
	ldr	r3, [r3]
	str	r3, [sp, #140]
	mov	r3,#0
	bne	.L19
.L1:
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [sp, #140]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	add	sp, sp, #148
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L19:
	mov	r2, #56
	mov	r1, #0
	mov	r4, r0
	add	r0, sp, #20
	bl	memset
	mov	r0, #0
	ldr	r3, .L21+4
	mov	r8, r0
	ldr	r3, [r3]
	ldr	r7, .L21+8
	str	r3, [sp, #76]
	bl	AxisClear
	ldr	r0, [r4, #16]
	add	r0, r0, #1
	bl	__aeabi_i2f
	ldr	r3, [r4, #20]
	str	r0, [sp, #4]	@ float
	add	r0, r3, #1
	bl	__aeabi_i2f
	ldr	r3, [r4, #24]
	str	r0, [sp, #8]	@ float
	sub	r0, r3, #2
	bl	__aeabi_i2f
	ldr	r3, [r4, #28]
	str	r0, [sp, #12]	@ float
	sub	r0, r3, #2
	bl	__aeabi_i2f
	mov	ip, r0
	add	r3, sp, #16
	add	r2, sp, #12
	add	r1, sp, #8
	add	r0, sp, #4
	str	ip, [sp, #16]	@ float
	bl	AdjustFrom640
	ldr	r0, [sp, #8]	@ float
	ldr	lr, [sp, #4]	@ float
	ldr	ip, [sp, #12]	@ float
	ldr	r3, [r7]
	str	r0, [sp, #24]	@ float
	ldr	r0, [sp, #16]	@ float
	str	lr, [sp, #20]	@ float
	str	ip, [sp, #28]	@ float
	mov	r2, r8
	mov	r1, r8
	ldr	r3, [r3, #16]
	str	r0, [sp, #32]	@ float
	ldr	r0, [r4, #8]
	blx	r3
	add	r3, r8, #16
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_dadd
	mov	r2, #0
	ldr	r3, .L21+12
	bl	__aeabi_dmul
	add	r3, r8, #8
	ldmia	r3, {r2-r3}
	str	r0, [r8, #16]
	str	r1, [r8, #20]
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_dadd
	ldr	r3, .L21+16
	mov	r2, #0
	bl	__aeabi_dmul
	ldr	r3, .L21+20
	str	r0, [r8, #8]
	str	r1, [r8, #12]
	ldr	r3, [r3]
	cmp	r3, r8
	beq	.L4
	add	r3, r8, #16
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_dsub
	mov	r2, #0
	ldr	r3, .L21+16
	bl	__aeabi_dmul
	bl	__aeabi_d2f
	bl	__aeabi_f2d
	ldr	r2, .L21+24
	ldr	r3, .L21+28
	bl	__aeabi_ddiv
.L5:
	mov	r6, #0
	ldr	r8, [r5]	@ float
	stm	r6, {r0-r1}
	mov	r0, r8
	mov	r1, #0
	bl	__aeabi_fcmpeq
	cmp	r0, r6
	ldr	r6, [r5, #4]	@ float
	ldrne	r8, [sp, #12]	@ float
	mov	r1, #0
	mov	r0, r6
	str	r8, [sp, #36]	@ float
	bl	__aeabi_fcmpeq
	cmp	r0, #0
	ldrne	r6, [sp, #16]	@ float
	ldr	r3, [r7]
	str	r6, [sp, #40]	@ float
	ldr	r3, [r3, #12]
	blx	r3
	ldr	r6, [r7]
	mov	r2, #60
	ldr	r3, [r6]
	mov	r1, #0
	add	r0, sp, #80
	str	r3, [sp, #44]
	bl	memset
	ldr	r3, [r5, #8]
	cmp	r3, #0
	bne	.L8
	ldr	r2, [r5, #12]
.L9:
	mov	r3, #0
	mov	r5, r3
	mov	r1, r3
	mov	r0, r3
	bl	VectorSet
	ldr	r1, [sp, #128]
	mov	r0, r5
	bl	AnglesToAxis
	ldr	r3, [r4, #8]
	ldr	r1, [sp, #108]
	mov	r0, r5
	str	r3, [sp, #124]
	bl	VectorCopy
	ldr	r1, [sp, #112]
	mov	r0, r5
	bl	VectorCopy
	ldr	r3, .L21+32
	ldr	r2, .L21+36
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, [sp, #120]
	orr	r3, r3, r2
	ldr	r0, [sp, #108]
	str	r3, [sp, #116]
	bl	VectorCopy
	ldr	r3, [r7]
	add	r0, sp, #80
	ldr	r3, [r3, #8]
	blx	r3
	ldr	r3, [r7]
	add	r0, sp, #20
	ldr	r3, [r3, #4]
	blx	r3
	b	.L1
.L4:
	ldmia	r4, {r0-r1}
	b	.L5
.L8:
	ldr	ip, [r6]
	ldr	r1, [r4, #12]
	ldr	r2, [r5, #12]
	cmp	ip, r1
	ble	.L9
	ldr	r1, .L21+40
	add	r0, r2, #1
	smull	r2, r1, r0, r1
	asr	r2, r0, #31
	add	r1, r1, r0
	rsb	r2, r2, r1, asr #8
	add	r2, r2, r2, lsl #1
	rsb	r2, r2, r2, lsl #4
	add	r3, r3, ip
	sub	r2, r0, r2, lsl #3
	str	r3, [r4, #12]
	str	r2, [r5, #12]
	b	.L9
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	.LC0
	.word	RDF_NOWORLDMODEL
	.word	DC
	.word	-1075838976
	.word	1071644672
	.word	qtrue
	.word	2027224564
	.word	1070671593
	.word	RF_LIGHTING_ORIGIN
	.word	RF_NOSHADOW
	.word	-1240768329
	.size	Item_Model_Paint, .-Item_Model_Paint
	.comm	qtrue,4,4
	.comm	RF_NOSHADOW,4,4
	.comm	RF_LIGHTING_ORIGIN,4,4
	.comm	RDF_NOWORLDMODEL,4,4
	.comm	DC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
