	.file	"extr_nv50.c_exec_clkcmp.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	exec_clkcmp, @function
exec_clkcmp:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	r15d, r15d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, 1
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, r8
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 136
	.cfi_def_cfa_offset 192
	mov	DWORD PTR 40[rsp], ecx
	mov	DWORD PTR 44[rsp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 120[rsp], rax
	xor	eax, eax
	call	nouveau_bios@PLT
	mov	ecx, r12d
	mov	QWORD PTR 8[rsp], rax
	sal	r14d, cl
.L3:
	lea	esi, 6359896[0+r15*8]
	mov	rdi, rbp
	call	nv_rd32@PLT
	mov	ecx, r14d
	mov	edx, r15d
	add	r15d, 1
	and	ecx, eax
	jne	.L47
	cmp	r15d, 3
	jne	.L3
	mov	rdi, rbp
	mov	DWORD PTR 16[rsp], ecx
	call	nv_device@PLT
	mov	ecx, DWORD PTR 16[rsp]
	cmp	DWORD PTR [rax], 143
	jg	.L51
.L8:
	mov	esi, 6359920
	mov	rdi, rbp
	call	nv_rd32@PLT
	bt	eax, r12d
	mov	ebx, eax
	jc	.L25
	mov	esi, 6359928
	mov	rdi, rbp
	call	nv_rd32@PLT
	mov	ecx, r12d
	mov	edx, 6
	mov	r15d, eax
	mov	ebx, eax
	sar	r15d, cl
	and	r15d, 1
.L7:
	test	r15d, r15d
	jne	.L6
.L12:
	lea	esi, 6359936[0+r15*8]
	mov	rdi, rbp
	call	nv_rd32@PLT
	mov	edx, r15d
	add	r15d, 1
	mov	ebx, eax
	test	r14d, eax
	jne	.L13
	cmp	r15d, 3
	jne	.L12
	mov	edx, 11
.L14:
	sub	edx, 1
	bt	ebx, r12d
	jnc	.L17
.L23:
	lea	rax, 52[rsp]
	lea	r15, 56[rsp]
	mov	esi, r12d
	mov	r8, r13
	push	rax
	.cfi_def_cfa_offset 200
	mov	r9, r15
	mov	ecx, ebx
	mov	rdi, rbp
	lea	rax, 76[rsp]
	mov	QWORD PTR 24[rsp], rax
	push	rax
	.cfi_def_cfa_offset 208
	lea	r11, 80[rsp]
	push	r11
	.cfi_def_cfa_offset 216
	lea	r10, 84[rsp]
	mov	QWORD PTR 56[rsp], r11
	push	r10
	.cfi_def_cfa_offset 224
	mov	QWORD PTR 56[rsp], r10
	call	exec_lookup@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 192
	mov	esi, eax
	test	eax, eax
	je	.L17
	cmp	QWORD PTR 0[r13], 0
	mov	r10, QWORD PTR 24[rsp]
	mov	r11, QWORD PTR 32[rsp]
	jne	.L18
	mov	eax, DWORD PTR 8[r13]
	cmp	eax, 129
	je	.L19
	cmp	eax, 130
	je	.L20
	mov	r14d, 255
	cmp	eax, 128
	je	.L52
.L21:
	lea	rax, 72[rsp]
	mov	rcx, r15
	mov	edx, r14d
	mov	r9, r11
	push	rax
	.cfi_def_cfa_offset 200
	mov	r8, r10
	push	QWORD PTR 24[rsp]
	.cfi_def_cfa_offset 208
	mov	rbx, QWORD PTR 24[rsp]
	mov	rdi, rbx
	call	nvbios_ocfg_match@PLT
	pop	rdx
	.cfi_def_cfa_offset 200
	pop	rcx
	.cfi_def_cfa_offset 192
	test	eax, eax
	je	.L1
	mov	eax, DWORD PTR 44[rsp]
	cmp	eax, 254
	jg	.L1
	movsx	rdx, eax
	mov	rax, QWORD PTR 72[rsp]
	mov	rdi, rbx
	mov	esi, DWORD PTR [rax+rdx*4]
	mov	edx, DWORD PTR 40[rsp]
	call	nvbios_oclk_match@PLT
	test	eax, eax
	jne	.L53
.L1:
	mov	rax, QWORD PTR 120[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L54
	add	rsp, 136
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	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
.L18:
	.cfi_restore_state
	mov	eax, DWORD PTR 40[rsp]
	sar	ebx, 8
	and	ebx, 15
	mov	ecx, eax
	mov	r14d, ebx
	shr	ecx, 31
	add	ecx, eax
	sar	ecx
	mov	DWORD PTR 40[rsp], ecx
	jmp	.L21
.L25:
	mov	edx, 5
	.p2align 4,,10
	.p2align 3
.L6:
	sub	edx, 1
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L47:
	mov	ebx, eax
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L52:
	sar	ebx, 8
	and	ebx, 15
	mov	eax, ebx
	mov	r14d, ebx
	or	ah, 1
	cmp	DWORD PTR 40[rsp], 164999
	cmovg	r14d, eax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L20:
	sar	ebx, 8
	and	ebx, 15
	mov	r14d, ebx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L19:
	mov	r14d, DWORD PTR 0[rbp]
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L51:
	mov	rdi, rbp
	mov	DWORD PTR 16[rsp], ecx
	call	nv_device@PLT
	mov	ecx, DWORD PTR 16[rsp]
	cmp	DWORD PTR [rax], 146
	je	.L8
	mov	rdi, rbp
	mov	DWORD PTR 16[rsp], ecx
	call	nv_device@PLT
	cmp	DWORD PTR [rax], 160
	je	.L8
	mov	ecx, DWORD PTR 16[rsp]
	mov	r15d, ecx
.L10:
	lea	esi, 6358932[0+r15*8]
	mov	rdi, rbp
	call	nv_rd32@PLT
	mov	edx, r15d
	add	r15d, 1
	mov	ebx, eax
	test	r14d, eax
	jne	.L9
	cmp	r15d, 4
	jne	.L10
	mov	edx, 8
.L11:
	mov	r15d, ebx
	mov	ecx, r12d
	sar	r15d, cl
	and	r15d, 1
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L53:
	mov	DWORD PTR 80[rsp], eax
	mov	rax, QWORD PTR 8[rsp]
	mov	rdi, rbp
	mov	DWORD PTR 84[rsp], r12d
	mov	DWORD PTR 88[rsp], 1
	mov	QWORD PTR 96[rsp], r13
	mov	QWORD PTR 104[rsp], rax
	call	nv_subdev@PLT
	lea	rdi, 80[rsp]
	mov	DWORD PTR 112[rsp], eax
	call	nvbios_exec@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	add	edx, 9
	jmp	.L14
.L17:
	mov	r14d, -1
	jmp	.L1
.L9:
	add	edx, 5
	jmp	.L11
.L54:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	exec_clkcmp, .-exec_clkcmp
	.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_nv50.c_exec_clkcmp.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	exec_clkcmp, %function
exec_clkcmp:
	@ args = 4, pretend = 0, frame = 72
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #100
	str	r3, [sp, #28]
	ldr	r3, .L54
	str	r2, [sp, #32]
	mov	r6, r1
	ldr	r3, [r3]
	str	r3, [sp, #92]
	mov	r3,#0
	mov	r5, r0
	ldr	r9, [sp, #136]
	bl	nouveau_bios
	mov	r10, #1
	mov	r8, r0
	mov	r7, #0
	ldr	fp, .L54+4
	lsl	r10, r10, r6
.L3:
	add	r1, fp, r7, lsl #3
	mov	r0, r5
	bl	nv_rd32
	ands	r2, r10, r0
	mov	r1, r7
	add	r7, r7, #1
	bne	.L46
	cmp	r7, #3
	bne	.L3
	mov	r0, r5
	str	r2, [sp, #36]
	bl	nv_device
	ldr	r3, [r0]
	ldr	r2, [sp, #36]
	cmp	r3, #143
	bgt	.L50
.L8:
	mov	r0, r5
	ldr	r1, .L54+8
	bl	nv_rd32
	asr	r3, r0, r6
	tst	r3, #1
	mov	r4, r0
	bne	.L25
	ldr	r1, .L54+12
	mov	r0, r5
	bl	nv_rd32
	mov	r1, #6
	mov	r4, r0
	asr	fp, r0, r6
	and	fp, fp, #1
.L7:
	cmp	fp, #0
	bne	.L15
.L12:
	lsl	r1, fp, #3
	add	r1, r1, #6356992
	add	r1, r1, #2944
	mov	r0, r5
	bl	nv_rd32
	tst	r10, r0
	mov	r1, fp
	add	fp, fp, #1
	bne	.L13
	cmp	fp, #3
	bne	.L12
	mov	r4, r0
	mov	r1, #11
.L14:
	asr	r3, r4, r6
	tst	r3, #1
	beq	.L17
.L15:
	sub	r1, r1, #1
.L23:
	add	r3, sp, #44
	str	r3, [sp, #20]
	add	r3, sp, #60
	str	r3, [sp, #12]
	add	fp, sp, #64
	add	r3, sp, #56
	add	r10, sp, #52
	mov	r2, r1
	str	r3, [sp, #8]
	mov	r1, r6
	mov	r3, r4
	mov	r0, r5
	str	r9, [sp]
	str	fp, [sp, #16]
	str	r10, [sp, #4]
	bl	exec_lookup
	subs	r1, r0, #0
	beq	.L17
	ldr	r3, [r9]
	cmp	r3, #0
	bne	.L18
	ldr	r3, [r9, #4]
	cmp	r3, #129
	beq	.L19
	cmp	r3, #130
	beq	.L20
	cmp	r3, #128
	movne	r4, #255
	beq	.L51
.L21:
	add	r3, sp, #60
	add	r2, sp, #48
	str	r3, [sp, #4]
	add	r3, sp, #56
	str	r3, [sp]
	str	r2, [sp, #12]
	mov	r3, r10
	mov	r2, r4
	mov	r0, r8
	str	fp, [sp, #8]
	bl	nvbios_ocfg_match
	ldr	r3, [sp, #32]
	cmp	r3, #254
	movgt	r3, #0
	movle	r3, #1
	cmp	r0, #0
	moveq	r3, #0
	cmp	r3, #0
	bne	.L52
.L1:
	ldr	r3, .L54
	ldr	r2, [r3]
	ldr	r3, [sp, #92]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L53
	mov	r0, r4
	add	sp, sp, #100
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	ldr	r3, [sp, #28]
	asr	r4, r4, #8
	add	r7, r3, r3, lsr #31
	asr	r3, r7, #1
	and	r4, r4, #15
	str	r3, [sp, #28]
	b	.L21
.L52:
	ldr	r3, [sp, #48]
	ldr	r1, [sp, #32]
	mov	r0, r8
	ldr	r1, [r3, r1, lsl #2]
	ldr	r2, [sp, #28]
	bl	nvbios_oclk_match
	subs	r3, r0, #0
	beq	.L1
	mov	r2, #1
	mov	r0, r5
	str	r3, [sp, #68]
	str	r6, [sp, #72]
	str	r9, [sp, #80]
	str	r8, [sp, #84]
	str	r2, [sp, #76]
	bl	nv_subdev
	mov	r3, r0
	add	r0, sp, #68
	str	r3, [sp, #88]
	bl	nvbios_exec
	b	.L1
.L46:
	mov	r4, r0
	b	.L23
.L51:
	ldr	r3, .L54+16
	ldr	r2, [sp, #28]
	asr	r4, r4, #8
	cmp	r2, r3
	and	r4, r4, #15
	orrgt	r4, r4, #256
	b	.L21
.L20:
	asr	r4, r4, #8
	and	r4, r4, #15
	b	.L21
.L19:
	ldr	r4, [r5]
	b	.L21
.L50:
	mov	r0, r5
	str	r2, [sp, #36]
	bl	nv_device
	ldr	r3, [r0]
	ldr	r2, [sp, #36]
	cmp	r3, #146
	beq	.L8
	mov	r0, r5
	str	r2, [sp, #36]
	bl	nv_device
	ldr	r3, [r0]
	cmp	r3, #160
	beq	.L8
	ldr	r2, [sp, #36]
	ldr	fp, .L54+20
	mov	r7, r2
.L10:
	add	r1, fp, r7, lsl #3
	mov	r0, r5
	bl	nv_rd32
	tst	r10, r0
	mov	r1, r7
	add	r7, r7, #1
	bne	.L9
	cmp	r7, #4
	bne	.L10
	mov	r4, r0
	mov	r1, #8
.L11:
	asr	fp, r4, r6
	and	fp, fp, #1
	b	.L7
.L13:
	mov	r4, r0
	add	r1, r1, #9
	b	.L14
.L17:
	mvn	r4, #0
	b	.L1
.L25:
	mov	r1, #5
	b	.L15
.L9:
	mov	r4, r0
	add	r1, r1, #5
	b	.L11
.L53:
	bl	__stack_chk_fail
.L55:
	.align	2
.L54:
	.word	.LC0
	.word	6359896
	.word	6359920
	.word	6359928
	.word	164999
	.word	6358932
	.size	exec_clkcmp, .-exec_clkcmp
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
