	.file	"extr_pvrusb2-hdw.c_pvr2_hdw_state_eval.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Drive state check START"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Device state change from %s to %s"
	.align 8
.LC2:
	.string	"Drive state check DONE callback=%d"
	.text
	.p2align 4
	.type	pvr2_hdw_state_eval, @function
pvr2_hdw_state_eval:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	rsi, .LC0[rip]
	xor	eax, eax
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	mov	edi, DWORD PTR PVR2_TRACE_STBITS[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	pvr2_trace@PLT
	mov	eax, DWORD PTR pvrusb2_debug[rip]
	test	DWORD PTR PVR2_TRACE_STBITS[rip], eax
	jne	.L31
.L2:
	mov	rdi, rbp
	call	pvr2_hdw_state_update@PLT
	mov	esi, DWORD PTR 80[rbp]
	mov	ebx, DWORD PTR PVR2_STATE_DEAD[rip]
	mov	r12d, eax
	test	esi, esi
	je	.L4
	mov	rax, QWORD PTR FW1_STATE_OK[rip]
	mov	ebx, DWORD PTR PVR2_STATE_COLD[rip]
	cmp	QWORD PTR 8[rbp], rax
	je	.L32
.L4:
	cmp	DWORD PTR 16[rbp], ebx
	jne	.L33
	test	r12d, r12d
	je	.L15
	xor	r12d, r12d
.L14:
	lea	rdi, 20[rbp]
	call	wake_up@PLT
.L15:
	mov	edi, DWORD PTR PVR2_TRACE_STBITS[rip]
	test	DWORD PTR pvrusb2_debug[rip], edi
	jne	.L34
.L16:
	mov	edx, r12d
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	pvr2_trace@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	mov	edi, ebx
	call	pvr2_get_state_name@PLT
	mov	edi, DWORD PTR 16[rbp]
	mov	r12d, eax
	call	pvr2_get_state_name@PLT
	mov	edi, DWORD PTR PVR2_TRACE_STATE[rip]
	mov	ecx, r12d
	lea	rsi, .LC1[rip]
	mov	edx, eax
	xor	eax, eax
	mov	r12d, 1
	call	pvr2_trace@PLT
	xor	esi, esi
	cmp	DWORD PTR PVR2_STATE_RUN[rip], ebx
	mov	rdi, rbp
	sete	sil
	call	pvr2_led_ctrl@PLT
	mov	DWORD PTR 16[rbp], ebx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L31:
	mov	rdi, rbp
	call	pvr2_hdw_state_log_state@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L34:
	mov	rdi, rbp
	call	pvr2_hdw_state_log_state@PLT
	mov	edi, DWORD PTR PVR2_TRACE_STBITS[rip]
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L32:
	mov	rdx, QWORD PTR 0[rbp]
	mov	rax, QWORD PTR PVR2_PATHWAY_DIGITAL[rip]
	cmp	rdx, rax
	je	.L35
.L6:
	mov	ecx, DWORD PTR 64[rbp]
	mov	ebx, DWORD PTR PVR2_STATE_WARM[rip]
	test	ecx, ecx
	je	.L4
	cmp	QWORD PTR 56[rbp], 0
	jne	.L9
	cmp	rdx, rax
	je	.L10
	cmp	QWORD PTR 48[rbp], 0
	jne	.L9
	cmp	QWORD PTR 40[rbp], 0
	je	.L12
	cmp	QWORD PTR 32[rbp], 0
	je	.L12
	cmp	QWORD PTR 24[rbp], 0
	je	.L12
.L18:
	mov	ebx, DWORD PTR PVR2_STATE_RUN[rip]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	mov	ebx, DWORD PTR PVR2_STATE_ERROR[rip]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L35:
	mov	rcx, QWORD PTR 72[rbp]
	cmp	QWORD PTR [rcx], 0
	jne	.L6
	cmp	QWORD PTR 56[rbp], 0
	jne	.L9
.L10:
	cmp	QWORD PTR 40[rbp], 0
	jne	.L18
.L12:
	mov	ebx, DWORD PTR PVR2_STATE_READY[rip]
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	pvr2_hdw_state_eval, .-pvr2_hdw_state_eval
	.comm	pvrusb2_debug,4,4
	.comm	PVR2_TRACE_STBITS,4,4
	.comm	PVR2_TRACE_STATE,4,4
	.comm	PVR2_STATE_WARM,4,4
	.comm	PVR2_STATE_RUN,4,4
	.comm	PVR2_STATE_READY,4,4
	.comm	PVR2_STATE_ERROR,4,4
	.comm	PVR2_STATE_DEAD,4,4
	.comm	PVR2_STATE_COLD,4,4
	.comm	PVR2_PATHWAY_DIGITAL,8,8
	.comm	FW1_STATE_OK,8,8
	.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_pvrusb2-hdw.c_pvr2_hdw_state_eval.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Drive state check START\000"
	.align	2
.LC1:
	.ascii	"Device state change from %s to %s\000"
	.align	2
.LC2:
	.ascii	"Drive state check DONE callback=%d\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pvr2_hdw_state_eval, %function
pvr2_hdw_state_eval:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r6, .L41
	ldr	r8, .L41+4
	mov	r4, r0
	ldr	r1, .L41+8
	ldr	r0, [r6]
	bl	pvr2_trace
	ldr	r3, [r6]
	ldr	r2, [r8]
	tst	r2, r3
	bne	.L37
.L2:
	mov	r0, r4
	bl	pvr2_hdw_state_update
	ldr	r3, [r4, #44]
	mov	r5, r0
	cmp	r3, #0
	bne	.L3
	ldr	r3, .L41+12
	ldr	r7, [r3]
.L4:
	ldr	r0, [r4, #8]
	cmp	r0, r7
	bne	.L38
.L13:
	cmp	r5, #0
	beq	.L15
	mov	r5, #0
.L14:
	add	r0, r4, #12
	bl	wake_up
.L15:
	ldr	r3, [r8]
	ldr	r0, [r6]
	tst	r0, r3
	bne	.L39
.L16:
	mov	r2, r5
	ldr	r1, .L41+16
	bl	pvr2_trace
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L3:
	ldr	r3, .L41+20
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L5
	ldr	r3, .L41+24
	ldr	r0, [r4, #8]
	ldr	r7, [r3]
	cmp	r0, r7
	beq	.L13
.L38:
	ldr	r3, .L41+28
	ldr	r9, [r3]
	bl	pvr2_get_state_name
	mov	r5, r0
	mov	r0, r7
	bl	pvr2_get_state_name
	mov	r2, r5
	mov	r3, r0
	ldr	r1, .L41+32
	mov	r0, r9
	bl	pvr2_trace
	ldr	r3, .L41+36
	mov	r0, r4
	ldr	r1, [r3]
	mov	r5, #1
	sub	r1, r1, r7
	clz	r1, r1
	lsr	r1, r1, #5
	bl	pvr2_led_ctrl
	str	r7, [r4, #8]
	b	.L14
.L37:
	mov	r0, r4
	bl	pvr2_hdw_state_log_state
	b	.L2
.L39:
	mov	r0, r4
	bl	pvr2_hdw_state_log_state
	ldr	r0, [r6]
	b	.L16
.L5:
	ldr	r3, .L41+40
	ldr	r2, [r4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L40
.L6:
	ldr	r1, [r4, #36]
	cmp	r1, #0
	ldreq	r3, .L41+44
	ldreq	r7, [r3]
	beq	.L4
.L8:
	ldr	r1, [r4, #32]
	cmp	r1, #0
	bne	.L9
	cmp	r2, r3
	beq	.L10
	ldr	r3, [r4, #28]
	cmp	r3, #0
	bne	.L9
	ldr	r3, [r4, #24]
	cmp	r3, #0
	beq	.L12
	ldr	r3, [r4, #20]
	cmp	r3, #0
	beq	.L12
	ldr	r3, [r4, #16]
	cmp	r3, #0
	beq	.L12
.L18:
	ldr	r3, .L41+36
	ldr	r7, [r3]
	b	.L4
.L9:
	ldr	r3, .L41+48
	ldr	r7, [r3]
	b	.L4
.L40:
	ldr	r1, [r4, #40]
	ldr	r1, [r1]
	cmp	r1, #0
	bne	.L6
	ldr	r3, [r4, #32]
	cmp	r3, #0
	bne	.L9
.L10:
	ldr	r3, [r4, #24]
	cmp	r3, #0
	bne	.L18
.L12:
	ldr	r3, .L41+52
	ldr	r7, [r3]
	b	.L4
.L42:
	.align	2
.L41:
	.word	PVR2_TRACE_STBITS
	.word	pvrusb2_debug
	.word	.LC0
	.word	PVR2_STATE_DEAD
	.word	.LC2
	.word	FW1_STATE_OK
	.word	PVR2_STATE_COLD
	.word	PVR2_TRACE_STATE
	.word	.LC1
	.word	PVR2_STATE_RUN
	.word	PVR2_PATHWAY_DIGITAL
	.word	PVR2_STATE_WARM
	.word	PVR2_STATE_ERROR
	.word	PVR2_STATE_READY
	.size	pvr2_hdw_state_eval, .-pvr2_hdw_state_eval
	.comm	pvrusb2_debug,4,4
	.comm	PVR2_TRACE_STBITS,4,4
	.comm	PVR2_TRACE_STATE,4,4
	.comm	PVR2_STATE_WARM,4,4
	.comm	PVR2_STATE_RUN,4,4
	.comm	PVR2_STATE_READY,4,4
	.comm	PVR2_STATE_ERROR,4,4
	.comm	PVR2_STATE_DEAD,4,4
	.comm	PVR2_STATE_COLD,4,4
	.comm	PVR2_PATHWAY_DIGITAL,4,4
	.comm	FW1_STATE_OK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
