	.file	"extr_a5xx_power.c_a540_lm_setup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	a540_lm_setup, @function
a540_lm_setup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	call	to_adreno_gpu@PLT
	mov	r13d, DWORD PTR AGC_LM_CONFIG_THROTTLE_DISABLE[rip]
	mov	rdi, rbp
	mov	edx, -2147483648
	mov	r8, rax
	mov	eax, DWORD PTR AGC_LM_CONFIG_BCL_DISABLED[rip]
	mov	ecx, DWORD PTR AGC_LM_CONFIG_GPU_VERSION_SHIFT[rip]
	mov	esi, DWORD PTR REG_A5XX_GPMU_GPMU_VOLTAGE[rip]
	or	eax, r13d
	mov	r13d, DWORD PTR [r8]
	sal	r13d, cl
	or	r13d, eax
	call	gpu_write@PLT
	mov	esi, DWORD PTR REG_A5XX_GPMU_GPMU_PWR_THRESHOLD[rip]
	mov	rdi, rbp
	mov	edx, -2147477648
	call	gpu_write@PLT
	mov	esi, DWORD PTR AGC_MSG_STATE[rip]
	mov	rdi, rbp
	mov	edx, -2147483647
	call	gpu_write@PLT
	mov	edx, DWORD PTR AGC_POWER_CONFIG_PRODUCTION_ID[rip]
	mov	esi, DWORD PTR AGC_MSG_COMMAND[rip]
	mov	rdi, rbp
	call	gpu_write@PLT
	xor	edi, edi
	call	AGC_MSG_PAYLOAD@PLT
	mov	edx, 5448
	mov	rdi, rbp
	mov	esi, eax
	call	gpu_write@PLT
	mov	edi, 1
	call	AGC_MSG_PAYLOAD@PLT
	mov	edx, 1
	mov	rdi, rbp
	mov	esi, eax
	call	gpu_write@PLT
	mov	esi, DWORD PTR 0[rbp]
	mov	rdi, rbp
	call	_get_mvolts@PLT
	mov	edi, 2
	mov	r12d, eax
	call	AGC_MSG_PAYLOAD@PLT
	mov	edx, r12d
	mov	rdi, rbp
	mov	esi, eax
	call	gpu_write@PLT
	movsx	r12, DWORD PTR 0[rbp]
	mov	edi, 3
	mov	rax, r12
	imul	r12, r12, 1125899907
	sar	eax, 31
	sar	r12, 50
	sub	r12d, eax
	call	AGC_MSG_PAYLOAD@PLT
	mov	edx, r12d
	mov	rdi, rbp
	mov	esi, eax
	call	gpu_write@PLT
	mov	edi, DWORD PTR AGC_LM_CONFIG[rip]
	call	AGC_MSG_PAYLOAD@PLT
	mov	edx, r13d
	mov	rdi, rbp
	mov	esi, eax
	call	gpu_write@PLT
	mov	edi, DWORD PTR AGC_LEVEL_CONFIG[rip]
	mov	r12d, DWORD PTR LEVEL_CONFIG[rip]
	call	AGC_MSG_PAYLOAD@PLT
	mov	edx, r12d
	mov	rdi, rbp
	mov	esi, eax
	call	gpu_write@PLT
	mov	eax, DWORD PTR AGC_LEVEL_CONFIG[rip]
	lea	edi, 1[rax]
	call	PAYLOAD_SIZE@PLT
	mov	esi, DWORD PTR AGC_MSG_PAYLOAD_SIZE[rip]
	mov	rdi, rbp
	mov	edx, eax
	call	gpu_write@PLT
	mov	edx, DWORD PTR AGC_INIT_MSG_VALUE[rip]
	mov	esi, DWORD PTR AGC_INIT_MSG_MAGIC[rip]
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	gpu_write@PLT
	.cfi_endproc
.LFE0:
	.size	a540_lm_setup, .-a540_lm_setup
	.comm	REG_A5XX_GPMU_GPMU_VOLTAGE,4,4
	.comm	REG_A5XX_GPMU_GPMU_PWR_THRESHOLD,4,4
	.comm	LEVEL_CONFIG,4,4
	.comm	AGC_POWER_CONFIG_PRODUCTION_ID,4,4
	.comm	AGC_MSG_STATE,4,4
	.comm	AGC_MSG_PAYLOAD_SIZE,4,4
	.comm	AGC_MSG_COMMAND,4,4
	.comm	AGC_LM_CONFIG_THROTTLE_DISABLE,4,4
	.comm	AGC_LM_CONFIG_GPU_VERSION_SHIFT,4,4
	.comm	AGC_LM_CONFIG_BCL_DISABLED,4,4
	.comm	AGC_LM_CONFIG,4,4
	.comm	AGC_LEVEL_CONFIG,4,4
	.comm	AGC_INIT_MSG_VALUE,4,4
	.comm	AGC_INIT_MSG_MAGIC,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_a5xx_power.c_a540_lm_setup.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	a540_lm_setup, %function
a540_lm_setup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	to_adreno_gpu
	ldr	r1, .L4
	ldr	r2, .L4+4
	ldr	r3, .L4+8
	ldr	ip, [r2]
	ldr	r5, [r1]
	ldr	r2, [r0]
	ldr	r3, [r3]
	ldr	r1, .L4+12
	orr	r5, r5, ip
	orr	r5, r5, r2, lsl r3
	mov	r0, r4
	mov	r2, #-2147483648
	ldr	r1, [r1]
	bl	gpu_write
	ldr	r3, .L4+16
	mov	r0, r4
	ldr	r1, [r3]
	ldr	r2, .L4+20
	bl	gpu_write
	ldr	r3, .L4+24
	mov	r0, r4
	ldr	r1, [r3]
	mov	r2, #-2147483647
	bl	gpu_write
	ldr	r3, .L4+28
	ldr	r2, .L4+32
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r0, r4
	bl	gpu_write
	mov	r0, #0
	bl	AGC_MSG_PAYLOAD
	ldr	r2, .L4+36
	mov	r1, r0
	mov	r0, r4
	bl	gpu_write
	mov	r0, #1
	bl	AGC_MSG_PAYLOAD
	mov	r2, #1
	mov	r1, r0
	mov	r0, r4
	bl	gpu_write
	mov	r0, #2
	bl	AGC_MSG_PAYLOAD
	ldr	r1, [r4]
	mov	r6, r0
	mov	r0, r4
	bl	_get_mvolts
	mov	r1, r6
	mov	r2, r0
	mov	r0, r4
	bl	gpu_write
	mov	r0, #3
	bl	AGC_MSG_PAYLOAD
	ldr	r3, [r4]
	ldr	r2, .L4+40
	mov	r1, r0
	smull	r0, r2, r3, r2
	asr	r3, r3, #31
	rsb	r2, r3, r2, asr #18
	mov	r0, r4
	bl	gpu_write
	ldr	r3, .L4+44
	ldr	r6, .L4+48
	ldr	r0, [r3]
	bl	AGC_MSG_PAYLOAD
	mov	r2, r5
	mov	r1, r0
	mov	r0, r4
	bl	gpu_write
	ldr	r0, [r6]
	bl	AGC_MSG_PAYLOAD
	ldr	r3, .L4+52
	mov	r1, r0
	ldr	r2, [r3]
	mov	r0, r4
	bl	gpu_write
	ldr	r0, [r6]
	ldr	r3, .L4+56
	add	r0, r0, #1
	ldr	r5, [r3]
	bl	PAYLOAD_SIZE
	mov	r1, r5
	mov	r2, r0
	mov	r0, r4
	bl	gpu_write
	ldr	r2, .L4+60
	ldr	r3, .L4+64
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	ldr	r2, [r2]
	ldr	r1, [r3]
	b	gpu_write
.L5:
	.align	2
.L4:
	.word	AGC_LM_CONFIG_THROTTLE_DISABLE
	.word	AGC_LM_CONFIG_BCL_DISABLED
	.word	AGC_LM_CONFIG_GPU_VERSION_SHIFT
	.word	REG_A5XX_GPMU_GPMU_VOLTAGE
	.word	REG_A5XX_GPMU_GPMU_PWR_THRESHOLD
	.word	-2147477648
	.word	AGC_MSG_STATE
	.word	AGC_MSG_COMMAND
	.word	AGC_POWER_CONFIG_PRODUCTION_ID
	.word	5448
	.word	1125899907
	.word	AGC_LM_CONFIG
	.word	AGC_LEVEL_CONFIG
	.word	LEVEL_CONFIG
	.word	AGC_MSG_PAYLOAD_SIZE
	.word	AGC_INIT_MSG_VALUE
	.word	AGC_INIT_MSG_MAGIC
	.size	a540_lm_setup, .-a540_lm_setup
	.comm	REG_A5XX_GPMU_GPMU_VOLTAGE,4,4
	.comm	REG_A5XX_GPMU_GPMU_PWR_THRESHOLD,4,4
	.comm	LEVEL_CONFIG,4,4
	.comm	AGC_POWER_CONFIG_PRODUCTION_ID,4,4
	.comm	AGC_MSG_STATE,4,4
	.comm	AGC_MSG_PAYLOAD_SIZE,4,4
	.comm	AGC_MSG_COMMAND,4,4
	.comm	AGC_LM_CONFIG_THROTTLE_DISABLE,4,4
	.comm	AGC_LM_CONFIG_GPU_VERSION_SHIFT,4,4
	.comm	AGC_LM_CONFIG_BCL_DISABLED,4,4
	.comm	AGC_LM_CONFIG,4,4
	.comm	AGC_LEVEL_CONFIG,4,4
	.comm	AGC_INIT_MSG_VALUE,4,4
	.comm	AGC_INIT_MSG_MAGIC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
