	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function NewState
_NewState:                              ## @NewState
	.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, %r14d
	movq	%rdi, %rbx
	movl	80(%rdi), %r15d
	movq	72(%rdi), %rax
	movl	(%rax), %r12d
	movl	(%rdi), %edi
	callq	_State2Nam
	movl	%eax, %r13d
	movl	%r14d, %edi
	callq	_State2Nam
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edi
	movl	%r12d, %edx
	movl	%r13d, %ecx
	movl	%eax, %r8d
	callq	_log_Printf
	movl	(%rbx), %eax
	movq	_ST_STOPPED@GOTPCREL(%rip), %r15
	cmpl	(%r15), %eax
	jne	LBB0_3
## %bb.1:
	movq	8(%rbx), %rax
	movq	_TIMER_RUNNING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	leaq	8(%rbx), %rdi
	callq	_timer_Stop
LBB0_3:
	movl	%r14d, (%rbx)
	movq	_ST_INITIAL@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	setle	%al
	cmpl	%r14d, (%r15)
	setge	%cl
	testb	%cl, %al
	jne	LBB0_5
## %bb.4:
	movq	_ST_OPENED@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_7
LBB0_5:
	leaq	40(%rbx), %rdi
	callq	_timer_Stop
	cmpl	%r14d, (%r15)
	jne	LBB0_7
## %bb.6:
	cmpq	$0, 32(%rbx)
	je	LBB0_7
## %bb.8:
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_timer_Stop
	movq	_StoppedTimeout@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	%rbx, 16(%rbx)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_timer_Start                    ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: State change %s --> %s\n"

	.comm	_ST_STOPPED,4,2                 ## @ST_STOPPED
	.comm	_TIMER_RUNNING,8,3              ## @TIMER_RUNNING
	.comm	_ST_INITIAL,4,2                 ## @ST_INITIAL
	.comm	_ST_OPENED,4,2                  ## @ST_OPENED
	.comm	_StoppedTimeout,4,2             ## @StoppedTimeout
	.no_dead_strip	_NewState
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function NewState
_NewState:                              ; @NewState
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	ldr	w21, [x0, #80]
	ldr	x8, [x0, #72]
	ldr	w22, [x8]
	ldr	w0, [x0]
	bl	_State2Nam
	mov	x23, x0
	mov	x0, x20
	bl	_State2Nam
	mov	x4, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	mov	x3, x23
	bl	_log_Printf
	ldr	w8, [x19]
Lloh2:
	adrp	x21, _ST_STOPPED@GOTPAGE
Lloh3:
	ldr	x21, [x21, _ST_STOPPED@GOTPAGEOFF]
	ldr	w9, [x21]
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x19
	ldr	x8, [x0, #8]!
Lloh4:
	adrp	x9, _TIMER_RUNNING@GOTPAGE
Lloh5:
	ldr	x9, [x9, _TIMER_RUNNING@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	bl	_timer_Stop
LBB0_3:
	str	w20, [x19]
Lloh7:
	adrp	x8, _ST_INITIAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ST_INITIAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [x21]
	cmp	w9, w20
	ccmp	w8, w20, #0, ge
Lloh10:
	adrp	x8, _ST_OPENED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ST_OPENED@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ccmp	w8, w20, #4, gt
	b.ne	LBB0_7
; %bb.4:
	add	x0, x19, #40
	bl	_timer_Stop
	ldr	w8, [x21]
	cmp	w8, w20
	b.ne	LBB0_7
; %bb.5:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_7
; %bb.6:
	add	x20, x19, #8
	mov	x0, x20
	bl	_timer_Stop
Lloh13:
	adrp	x8, _StoppedTimeout@GOTPAGE
Lloh14:
	ldr	x8, [x8, _StoppedTimeout@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	str	x19, [x19, #16]
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_timer_Start
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: State change %s --> %s\n"

	.comm	_ST_STOPPED,4,2                 ; @ST_STOPPED
	.comm	_TIMER_RUNNING,8,3              ; @TIMER_RUNNING
	.comm	_ST_INITIAL,4,2                 ; @ST_INITIAL
	.comm	_ST_OPENED,4,2                  ; @ST_OPENED
	.comm	_StoppedTimeout,4,2             ; @StoppedTimeout
	.no_dead_strip	_NewState
.subsections_via_symbols
