	.file	"extr_targ-data.c_user_ad_price.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	user_ad_price
	.type	user_ad_price, @function
user_ad_price:
.LFB0:
	.cfi_startproc
	endbr64
	test	edi, edi
	js	.L9
	cmp	DWORD PTR MAX_USERS[rip], edi
	jle	.L9
	test	esi, esi
	jle	.L9
	cmp	DWORD PTR GSORT_HEAP_SIZE[rip], esi
	jle	.L9
	mov	rax, QWORD PTR User[rip]
	movsx	rdi, edi
	mov	rdi, QWORD PTR [rax+rdi*8]
	test	rdi, rdi
	je	.L9
	mov	eax, DWORD PTR [rdi]
	test	eax, eax
	je	.L9
	sub	rsp, 24
	.cfi_def_cfa_offset 32
	mov	DWORD PTR 12[rsp], esi
	call	build_user_ad_heap@PLT
	mov	esi, DWORD PTR 12[rsp]
	xor	eax, eax
	cmp	DWORD PTR HN[rip], esi
	jl	.L1
	mov	rax, QWORD PTR H[rip]
	movsd	xmm0, QWORD PTR 8[rax]
	mulsd	xmm0, QWORD PTR CTR_GAIN_PRICE_MULTIPLIER[rip]
	addsd	xmm0, QWORD PTR .LC0[rip]
	cvttsd2si	eax, xmm0
.L1:
	add	rsp, 24
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	xor	eax, eax
	ret
	.cfi_endproc
.LFE0:
	.size	user_ad_price, .-user_ad_price
	.comm	User,8,8
	.comm	MAX_USERS,4,4
	.comm	HN,4,4
	.comm	H,8,8
	.comm	GSORT_HEAP_SIZE,4,4
	.comm	CTR_GAIN_PRICE_MULTIPLIER,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1071644672
	.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_targ-data.c_user_ad_price.c"
	.text
	.global	__aeabi_dmul
	.global	__aeabi_dadd
	.global	__aeabi_d2iz
	.align	2
	.global	user_ad_price
	.syntax unified
	.arm
	.fpu softvfp
	.type	user_ad_price, %function
user_ad_price:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r0, #0
	blt	.L15
	ldr	r3, .L17
	push	{r4, lr}
	ldr	r3, [r3]
	mov	r4, r1
	cmp	r1, #0
	cmpgt	r3, r0
	bgt	.L16
.L4:
	mov	r0, #0
	pop	{r4, pc}
.L16:
	ldr	r3, .L17+4
	ldr	r3, [r3]
	cmp	r3, r1
	ble	.L4
	ldr	r3, .L17+8
	ldr	r3, [r3]
	ldr	r0, [r3, r0, lsl #2]
	cmp	r0, #0
	beq	.L4
	ldr	r3, [r0]
	cmp	r3, #0
	beq	.L4
	bl	build_user_ad_heap
	ldr	r3, .L17+12
	ldr	r3, [r3]
	cmp	r3, r4
	blt	.L4
	ldr	r2, .L17+16
	ldr	r3, .L17+20
	ldr	r1, [r2]
	ldmia	r3, {r2-r3}
	add	r1, r1, #8
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, #0
	ldr	r3, .L17+24
	bl	__aeabi_dadd
	bl	__aeabi_d2iz
	pop	{r4, pc}
.L15:
	mov	r0, #0
	bx	lr
.L18:
	.align	2
.L17:
	.word	MAX_USERS
	.word	GSORT_HEAP_SIZE
	.word	User
	.word	HN
	.word	H
	.word	CTR_GAIN_PRICE_MULTIPLIER
	.word	1071644672
	.size	user_ad_price, .-user_ad_price
	.comm	User,4,4
	.comm	MAX_USERS,4,4
	.comm	HN,4,4
	.comm	H,4,4
	.comm	GSORT_HEAP_SIZE,4,4
	.comm	CTR_GAIN_PRICE_MULTIPLIER,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
