	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s0_state_handler
_s0_state_handler:                      ## @s0_state_handler
	.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
	movl	%esi, %r12d
	leal	-9(%r12), %eax
	cmpl	$-8, %eax
	jb	LBB0_20
## %bb.1:
	movq	%rdi, %r14
	movl	(%rdi), %r15d
	cmpl	%r12d, %r15d
	je	LBB0_20
## %bb.2:
	movq	_HFCUSB_DBG_STATES@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_DBG
	cmpl	$8, %r12d
	ja	LBB0_13
## %bb.3:
	movl	$398, %eax                      ## imm = 0x18E
	btl	%r12d, %eax
	jae	LBB0_13
## %bb.4:
	leaq	24(%r14), %rbx
	movq	%rbx, %rdi
	callq	_timer_pending
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_del_timer
LBB0_6:
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_DBG
	cmpl	$7, %r12d
	jb	LBB0_10
## %bb.7:
	leaq	16(%r14), %rbx
	movq	%rbx, %rdi
	callq	_timer_pending
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_del_timer
LBB0_9:
	movl	(%r13), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_DBG
LBB0_10:
	cmpl	$7, %r12d
	jne	LBB0_13
## %bb.11:
	cmpl	$0, 4(%r14)
	je	LBB0_12
LBB0_13:
	cmpl	$3, %r12d
	ja	LBB0_19
## %bb.14:
	addl	$-7, %r15d
	cmpl	$1, %r15d
	ja	LBB0_17
## %bb.15:
	movl	(%r13), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_DBG
	leaq	16(%r14), %r15
	movq	%r15, %rdi
	callq	_timer_pending
	testq	%rax, %rax
	jne	LBB0_19
## %bb.16:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_HFC_TIMER_T4@GOTPCREL(%rip), %rcx
	movq	_HZ@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	imull	(%rcx), %edx
	movslq	%edx, %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	movslq	%ecx, %rcx
	addq	(%rax), %rcx
	movq	%rcx, (%r15)
	movq	%r15, %rdi
	callq	_add_timer
	jmp	LBB0_19
LBB0_17:
	leaq	8(%r14), %rdi
	movq	_PH_DEACTIVATE@GOTPCREL(%rip), %rax
	movq	_INDICATION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	xorl	%edx, %edx
	callq	*8(%r14)
	movl	(%r13), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_DBG
	movl	$0, 4(%r14)
	movq	_LED_S0_OFF@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_12:
	leaq	8(%r14), %rdi
	movq	_PH_ACTIVATE@GOTPCREL(%rip), %rax
	movq	_INDICATION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	xorl	%edx, %edx
	callq	*8(%r14)
	movl	(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_DBG
	movl	$1, 4(%r14)
	movq	_LED_S0_ON@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_handle_led
LBB0_19:
	movl	%r12d, (%r14)
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HFCUSB_DBG_STATES,4,2          ## @HFCUSB_DBG_STATES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HFC-S USB: S0 statechange(%d -> %d)"

L_.str.1:                               ## @.str.1
	.asciz	"HFC-S USB: T3 deactivated"

L_.str.2:                               ## @.str.2
	.asciz	"HFC-S USB: T4 deactivated"

	.comm	_PH_ACTIVATE,4,2                ## @PH_ACTIVATE
	.comm	_INDICATION,4,2                 ## @INDICATION
L_.str.3:                               ## @.str.3
	.asciz	"HFC-S USB: PH_ACTIVATE | INDICATION sent"

	.comm	_LED_S0_ON,4,2                  ## @LED_S0_ON
L_.str.4:                               ## @.str.4
	.asciz	"HFC-S USB: T4 activated"

	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HFC_TIMER_T4,4,2               ## @HFC_TIMER_T4
	.comm	_HZ,4,2                         ## @HZ
	.comm	_PH_DEACTIVATE,4,2              ## @PH_DEACTIVATE
L_.str.5:                               ## @.str.5
	.asciz	"HFC-S USB: PH_DEACTIVATE | INDICATION sent"

	.comm	_LED_S0_OFF,4,2                 ## @LED_S0_OFF
	.no_dead_strip	_s0_state_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s0_state_handler
_s0_state_handler:                      ; @s0_state_handler
	.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
	ldr	w23, [x0]
	sub	w8, w1, #9
	cmn	w8, #8
	ccmp	w23, w1, #4, hs
	b.eq	LBB0_19
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _HFCUSB_DBG_STATES@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HFCUSB_DBG_STATES@GOTPAGEOFF]
	ldr	w0, [x22]
	stp	x23, x19, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DBG
	cmp	w19, #8
	b.hi	LBB0_11
; %bb.2:
	mov	w8, #1
	lsl	w8, w8, w19
	mov	w9, #398
	tst	w8, w9
	b.eq	LBB0_11
; %bb.3:
	add	x21, x20, #24
	mov	x0, x21
	bl	_timer_pending
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x21
	bl	_del_timer
LBB0_5:
	ldr	w0, [x22]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_DBG
	cmp	w19, #7
	b.lo	LBB0_9
; %bb.6:
	add	x21, x20, #16
	mov	x0, x21
	bl	_timer_pending
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_del_timer
LBB0_8:
	ldr	w0, [x22]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_DBG
LBB0_9:
	cmp	w19, #7
	b.ne	LBB0_11
; %bb.10:
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_16
LBB0_11:
	cmp	w19, #3
	b.hi	LBB0_18
; %bb.12:
	sub	w8, w23, #7
	cmp	w8, #1
	b.hi	LBB0_15
; %bb.13:
	ldr	w0, [x22]
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_DBG
	add	x21, x20, #16
	mov	x0, x21
	bl	_timer_pending
	cbnz	x0, LBB0_18
; %bb.14:
Lloh10:
	adrp	x8, _jiffies@GOTPAGE
Lloh11:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x9, _HFC_TIMER_T4@GOTPAGE
Lloh14:
	ldr	x9, [x9, _HFC_TIMER_T4@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _HZ@GOTPAGE
Lloh17:
	ldr	x10, [x10, _HZ@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	mul	w9, w10, w9
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	add	x8, x8, w9, sxtw
	str	x8, [x21]
	mov	x0, x21
	bl	_add_timer
	b	LBB0_18
LBB0_15:
	mov	x0, x20
	ldr	x8, [x0, #8]!
Lloh19:
	adrp	x9, _PH_DEACTIVATE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PH_DEACTIVATE@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	adrp	x10, _INDICATION@GOTPAGE
Lloh23:
	ldr	x10, [x10, _INDICATION@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	orr	w1, w10, w9
	mov	x2, #0
	blr	x8
	ldr	w0, [x22]
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_DBG
	str	wzr, [x20, #4]
Lloh27:
	adrp	x8, _LED_S0_OFF@GOTPAGE
Lloh28:
	ldr	x8, [x8, _LED_S0_OFF@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:
	mov	x0, x20
	ldr	x8, [x0, #8]!
Lloh29:
	adrp	x9, _PH_ACTIVATE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _PH_ACTIVATE@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
Lloh32:
	adrp	x10, _INDICATION@GOTPAGE
Lloh33:
	ldr	x10, [x10, _INDICATION@GOTPAGEOFF]
Lloh34:
	ldr	w10, [x10]
	orr	w1, w10, w9
	mov	x2, #0
	blr	x8
	ldr	w0, [x22]
Lloh35:
	adrp	x1, l_.str.3@PAGE
Lloh36:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_DBG
	mov	w8, #1
	str	w8, [x20, #4]
Lloh37:
	adrp	x8, _LED_S0_ON@GOTPAGE
Lloh38:
	ldr	x8, [x8, _LED_S0_ON@GOTPAGEOFF]
LBB0_17:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_handle_led
LBB0_18:
	str	w19, [x20]
LBB0_19:
	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
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_HFCUSB_DBG_STATES,4,2          ; @HFCUSB_DBG_STATES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HFC-S USB: S0 statechange(%d -> %d)"

l_.str.1:                               ; @.str.1
	.asciz	"HFC-S USB: T3 deactivated"

l_.str.2:                               ; @.str.2
	.asciz	"HFC-S USB: T4 deactivated"

	.comm	_PH_ACTIVATE,4,2                ; @PH_ACTIVATE
	.comm	_INDICATION,4,2                 ; @INDICATION
l_.str.3:                               ; @.str.3
	.asciz	"HFC-S USB: PH_ACTIVATE | INDICATION sent"

	.comm	_LED_S0_ON,4,2                  ; @LED_S0_ON
l_.str.4:                               ; @.str.4
	.asciz	"HFC-S USB: T4 activated"

	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HFC_TIMER_T4,4,2               ; @HFC_TIMER_T4
	.comm	_HZ,4,2                         ; @HZ
	.comm	_PH_DEACTIVATE,4,2              ; @PH_DEACTIVATE
l_.str.5:                               ; @.str.5
	.asciz	"HFC-S USB: PH_DEACTIVATE | INDICATION sent"

	.comm	_LED_S0_OFF,4,2                 ; @LED_S0_OFF
	.no_dead_strip	_s0_state_handler
.subsections_via_symbols
