	.file	"extr_base.c_nvkm_cstate_new.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	nvkm_cstate_new, @function
nvkm_cstate_new:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	rbx, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 8[rdi]
	lea	rcx, 12[rsp]
	lea	rdx, 8[rsp]
	lea	r8, 16[rsp]
	mov	rdi, QWORD PTR 8[rax]
	mov	r12, QWORD PTR [rax]
	call	nvbios_cstepXp@PLT
	test	eax, eax
	je	.L21
	test	r12, r12
	je	.L4
	mov	esi, DWORD PTR 20[rsp]
	mov	rdi, r12
	call	nvkm_volt_map_min@PLT
	cmp	rax, QWORD PTR [r12]
	jg	.L22
.L4:
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 24
	call	kzalloc@PLT
	mov	r12, rax
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	test	r12, r12
	je	.L1
	movdqu	xmm0, XMMWORD PTR 8[r13]
	mov	rdx, QWORD PTR nv_clk_src_max[rip]
	movups	XMMWORD PTR [r12], xmm0
	mov	rax, QWORD PTR 24[r13]
	mov	QWORD PTR 16[r12], rax
	mov	eax, DWORD PTR 20[rsp]
	mov	DWORD PTR [r12], r14d
	mov	DWORD PTR 16[r12], eax
	test	rbx, rbx
	jne	.L7
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	add	rbx, 16
.L7:
	cmp	QWORD PTR [rbx], rdx
	je	.L10
	mov	eax, DWORD PTR 8[rbx]
	test	DWORD PTR NVKM_CLK_DOM_FLAG_CORE[rip], eax
	je	.L8
	mov	ecx, DWORD PTR 12[rbx]
	mov	edx, DWORD PTR 4[r13]
	mov	esi, 1
	mov	rdi, rbp
	mov	r8d, DWORD PTR 16[rsp]
	call	nvkm_clk_adjust@PLT
	mov	rdx, QWORD PTR [rbx]
	mov	rcx, QWORD PTR 8[r12]
	mov	DWORD PTR [rcx+rdx*4], eax
	mov	rdx, QWORD PTR nv_clk_src_max[rip]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rsi, QWORD PTR 24[rsp]
	xor	rsi, QWORD PTR fs:40
	jne	.L23
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	lea	rdi, 4[r12]
	mov	rsi, r13
	call	list_add@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	eax, DWORD PTR ENOENT[rip]
	neg	eax
	jmp	.L1
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	nvkm_cstate_new, .-nvkm_cstate_new
	.comm	nv_clk_src_max,8,8
	.comm	NVKM_CLK_DOM_FLAG_CORE,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENOENT,4,4
	.comm	EINVAL,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_base.c_nvkm_cstate_new.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nvkm_cstate_new, %function
nvkm_cstate_new:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r5, r0
	sub	sp, sp, #36
	ldr	r3, [r0, #4]
	ldr	ip, .L24
	mov	r7, r2
	add	r2, sp, #20
	ldr	r0, [r3, #4]
	ldr	r6, [r3]
	str	r2, [sp]
	add	r3, sp, #16
	add	r2, sp, #12
	ldr	ip, [ip]
	str	ip, [sp, #28]
	mov	ip,#0
	mov	r8, r1
	ldr	r4, [r5]
	bl	nvbios_cstepXp
	cmp	r0, #0
	beq	.L20
	cmp	r6, #0
	beq	.L4
	mov	r0, r6
	ldr	r1, [sp, #24]
	bl	nvkm_volt_map_min
	ldr	r3, [r6]
	cmp	r0, r3
	bgt	.L21
.L4:
	ldr	r3, .L24+4
	mov	r0, #16
	ldr	r1, [r3]
	bl	kzalloc
	subs	r6, r0, #0
	beq	.L22
	ldr	ip, [sp, #24]
	add	r3, r7, #8
	cmp	r4, #0
	ldm	r3, {r0, r1, r2, r3}
	stm	r6, {r0, r1, r2, r3}
	str	ip, [r6, #12]
	str	r8, [r6]
	beq	.L10
	ldr	r9, .L24+8
	ldr	r8, .L24+12
	ldr	r1, [r9]
	add	r4, r4, #12
	b	.L7
.L8:
	add	r4, r4, #12
.L7:
	ldr	r3, [r4, #-12]
	cmp	r3, r1
	beq	.L10
	ldr	r2, [r4, #-8]
	ldr	r3, [r8]
	tst	r2, r3
	beq	.L8
	ldr	r2, [sp, #20]
	ldr	r3, [r4, #-4]
	str	r2, [sp]
	mov	r1, #1
	ldr	r2, [r7, #4]
	mov	r0, r5
	bl	nvkm_clk_adjust
	ldr	r2, [r4, #-12]
	ldr	r3, [r6, #8]
	ldr	r1, [r9]
	str	r0, [r3, r2, lsl #2]
	b	.L8
.L10:
	mov	r1, r7
	add	r0, r6, #4
	bl	list_add
	mov	r0, #0
.L1:
	ldr	r3, .L24
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L20:
	ldr	r3, .L24+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L21:
	ldr	r3, .L24+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L22:
	ldr	r3, .L24+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L23:
	bl	__stack_chk_fail
.L25:
	.align	2
.L24:
	.word	.LC0
	.word	GFP_KERNEL
	.word	nv_clk_src_max
	.word	NVKM_CLK_DOM_FLAG_CORE
	.word	ENOENT
	.word	EINVAL
	.word	ENOMEM
	.size	nvkm_cstate_new, .-nvkm_cstate_new
	.comm	nv_clk_src_max,4,4
	.comm	NVKM_CLK_DOM_FLAG_CORE,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENOENT,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
