	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pvr2_hdw_state_eval
_pvr2_hdw_state_eval:                   ## @pvr2_hdw_state_eval
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_PVR2_TRACE_STBITS@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_pvr2_trace
	movq	_pvrusb2_debug@GOTPCREL(%rip), %r15
	movl	(%r13), %eax
	testl	%eax, (%r15)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_pvr2_hdw_state_log_state
LBB0_2:
	movq	%r14, %rdi
	callq	_pvr2_hdw_state_update
	cmpl	$0, 80(%r14)
	je	LBB0_14
## %bb.3:
	movq	8(%r14), %rcx
	movq	_FW1_STATE_OK@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_15
## %bb.4:
	movq	(%r14), %rdx
	movq	_PVR2_PATHWAY_DIGITAL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	cmpq	%rsi, %rdx
	jne	LBB0_6
## %bb.5:
	movq	72(%r14), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_17
LBB0_6:
	cmpl	$0, 64(%r14)
	je	LBB0_16
## %bb.7:
	movq	_PVR2_STATE_ERROR@GOTPCREL(%rip), %rcx
	cmpq	$0, 56(%r14)
	jne	LBB0_22
## %bb.8:
	cmpq	%rsi, %rdx
	je	LBB0_19
## %bb.9:
	cmpq	$0, 48(%r14)
	jne	LBB0_22
## %bb.10:
	cmpq	$0, 40(%r14)
	je	LBB0_21
## %bb.11:
	cmpq	$0, 32(%r14)
	je	LBB0_21
## %bb.12:
	cmpq	$0, 24(%r14)
	jne	LBB0_13
LBB0_21:
	movq	_PVR2_STATE_READY@GOTPCREL(%rip), %rcx
	jmp	LBB0_22
LBB0_14:
	movq	_PVR2_STATE_DEAD@GOTPCREL(%rip), %rcx
	jmp	LBB0_22
LBB0_15:
	movq	_PVR2_STATE_COLD@GOTPCREL(%rip), %rcx
	jmp	LBB0_22
LBB0_16:
	movq	_PVR2_STATE_WARM@GOTPCREL(%rip), %rcx
	jmp	LBB0_22
LBB0_17:
	cmpq	$0, 56(%r14)
	je	LBB0_19
## %bb.18:
	movq	_PVR2_STATE_ERROR@GOTPCREL(%rip), %rcx
	jmp	LBB0_22
LBB0_19:
	cmpq	$0, 40(%r14)
	je	LBB0_21
LBB0_13:
	movq	_PVR2_STATE_RUN@GOTPCREL(%rip), %rcx
LBB0_22:
	movl	(%rcx), %ebx
	movl	16(%r14), %edi
	cmpl	%ebx, %edi
	jne	LBB0_24
## %bb.23:
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_25
	jmp	LBB0_26
LBB0_24:
	movq	_PVR2_TRACE_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	callq	_pvr2_get_state_name
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_pvr2_get_state_name
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edi
	movq	_pvrusb2_debug@GOTPCREL(%rip), %r15
	movl	%r12d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_pvr2_trace
	movq	_PVR2_STATE_RUN@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	cmpl	(%rax), %ebx
	sete	%sil
	movq	%r14, %rdi
	callq	_pvr2_led_ctrl
	movl	%ebx, 16(%r14)
	movl	$1, %ebx
LBB0_25:
	leaq	20(%r14), %rdi
	callq	_wake_up
LBB0_26:
	movl	(%r13), %edi
	testl	%edi, (%r15)
	je	LBB0_28
## %bb.27:
	movq	%r14, %rdi
	callq	_pvr2_hdw_state_log_state
	movl	(%r13), %edi
LBB0_28:
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_pvr2_trace
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PVR2_TRACE_STBITS,4,2          ## @PVR2_TRACE_STBITS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Drive state check START"

	.comm	_pvrusb2_debug,4,2              ## @pvrusb2_debug
	.comm	_PVR2_PATHWAY_DIGITAL,8,3       ## @PVR2_PATHWAY_DIGITAL
	.comm	_PVR2_STATE_DEAD,4,2            ## @PVR2_STATE_DEAD
	.comm	_FW1_STATE_OK,8,3               ## @FW1_STATE_OK
	.comm	_PVR2_STATE_COLD,4,2            ## @PVR2_STATE_COLD
	.comm	_PVR2_STATE_WARM,4,2            ## @PVR2_STATE_WARM
	.comm	_PVR2_STATE_ERROR,4,2           ## @PVR2_STATE_ERROR
	.comm	_PVR2_STATE_RUN,4,2             ## @PVR2_STATE_RUN
	.comm	_PVR2_STATE_READY,4,2           ## @PVR2_STATE_READY
	.comm	_PVR2_TRACE_STATE,4,2           ## @PVR2_TRACE_STATE
L_.str.1:                               ## @.str.1
	.asciz	"Device state change from %s to %s"

L_.str.2:                               ## @.str.2
	.asciz	"Drive state check DONE callback=%d"

	.no_dead_strip	_pvr2_hdw_state_eval
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pvr2_hdw_state_eval
_pvr2_hdw_state_eval:                   ; @pvr2_hdw_state_eval
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x23, _PVR2_TRACE_STBITS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PVR2_TRACE_STBITS@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_pvr2_trace
Lloh4:
	adrp	x24, _pvrusb2_debug@GOTPAGE
Lloh5:
	ldr	x24, [x24, _pvrusb2_debug@GOTPAGEOFF]
	ldr	w8, [x24]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_pvr2_hdw_state_log_state
LBB0_2:
	mov	x0, x19
	bl	_pvr2_hdw_state_update
	ldr	w8, [x19, #80]
	cbz	w8, LBB0_14
; %bb.3:
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _FW1_STATE_OK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FW1_STATE_OK@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.4:
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _PVR2_PATHWAY_DIGITAL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PVR2_PATHWAY_DIGITAL@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	ldr	x10, [x19, #72]
	ldr	x10, [x10]
	cbz	x10, LBB0_17
LBB0_6:
	ldr	w10, [x19, #64]
	cbz	w10, LBB0_16
; %bb.7:
	ldr	x10, [x19, #56]
	cbnz	x10, LBB0_18
; %bb.8:
	cmp	x8, x9
	b.eq	LBB0_26
; %bb.9:
	ldr	x8, [x19, #48]
	cbnz	x8, LBB0_18
; %bb.10:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_13
; %bb.11:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_13
; %bb.12:
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_27
LBB0_13:
Lloh12:
	adrp	x8, _PVR2_STATE_READY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PVR2_STATE_READY@GOTPAGEOFF]
	b	LBB0_19
LBB0_14:
Lloh14:
	adrp	x8, _PVR2_STATE_DEAD@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PVR2_STATE_DEAD@GOTPAGEOFF]
	b	LBB0_19
LBB0_15:
Lloh16:
	adrp	x8, _PVR2_STATE_COLD@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PVR2_STATE_COLD@GOTPAGEOFF]
	b	LBB0_19
LBB0_16:
Lloh18:
	adrp	x8, _PVR2_STATE_WARM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PVR2_STATE_WARM@GOTPAGEOFF]
	b	LBB0_19
LBB0_17:
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_26
LBB0_18:
Lloh20:
	adrp	x8, _PVR2_STATE_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PVR2_STATE_ERROR@GOTPAGEOFF]
LBB0_19:
	ldr	w20, [x8]
	ldr	w8, [x19, #16]
	cmp	w8, w20
	b.ne	LBB0_21
; %bb.20:
	mov	w21, #0
	mov	w20, #0
	cbnz	w0, LBB0_22
	b	LBB0_23
LBB0_21:
Lloh22:
	adrp	x9, _PVR2_TRACE_STATE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _PVR2_TRACE_STATE@GOTPAGEOFF]
Lloh24:
	ldr	w21, [x9]
	mov	x0, x8
	bl	_pvr2_get_state_name
	mov	x22, x0
	mov	x0, x20
	bl	_pvr2_get_state_name
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_pvr2_trace
Lloh27:
	adrp	x8, _PVR2_STATE_RUN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PVR2_STATE_RUN@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	cmp	w20, w8
	cset	w1, eq
	mov	x0, x19
	bl	_pvr2_led_ctrl
	str	w20, [x19, #16]
	mov	w21, #1
LBB0_22:
	add	x0, x19, #20
	bl	_wake_up
	mov	x20, x21
LBB0_23:
	ldr	w8, [x24]
	ldr	w0, [x23]
	tst	w0, w8
	b.eq	LBB0_25
; %bb.24:
	mov	x0, x19
	bl	_pvr2_hdw_state_log_state
	ldr	w0, [x23]
LBB0_25:
	str	x20, [sp]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_pvr2_trace
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_26:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_13
LBB0_27:
Lloh32:
	adrp	x8, _PVR2_STATE_RUN@GOTPAGE
Lloh33:
	ldr	x8, [x8, _PVR2_STATE_RUN@GOTPAGEOFF]
	b	LBB0_19
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_PVR2_TRACE_STBITS,4,2          ; @PVR2_TRACE_STBITS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Drive state check START"

	.comm	_pvrusb2_debug,4,2              ; @pvrusb2_debug
	.comm	_PVR2_PATHWAY_DIGITAL,8,3       ; @PVR2_PATHWAY_DIGITAL
	.comm	_PVR2_STATE_DEAD,4,2            ; @PVR2_STATE_DEAD
	.comm	_FW1_STATE_OK,8,3               ; @FW1_STATE_OK
	.comm	_PVR2_STATE_COLD,4,2            ; @PVR2_STATE_COLD
	.comm	_PVR2_STATE_WARM,4,2            ; @PVR2_STATE_WARM
	.comm	_PVR2_STATE_ERROR,4,2           ; @PVR2_STATE_ERROR
	.comm	_PVR2_STATE_RUN,4,2             ; @PVR2_STATE_RUN
	.comm	_PVR2_STATE_READY,4,2           ; @PVR2_STATE_READY
	.comm	_PVR2_TRACE_STATE,4,2           ; @PVR2_TRACE_STATE
l_.str.1:                               ; @.str.1
	.asciz	"Device state change from %s to %s"

l_.str.2:                               ; @.str.2
	.asciz	"Drive state check DONE callback=%d"

	.no_dead_strip	_pvr2_hdw_state_eval
.subsections_via_symbols
