	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad_periodic_machine
_ad_periodic_machine:                   ## @ad_periodic_machine
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rdx
	movl	8(%rdi), %eax
	movq	_AD_PORT_BEGIN@GOTPCREL(%rip), %rsi
	movl	$130, %ecx
	testl	%eax, (%rsi)
	je	LBB0_1
LBB0_18:
	movq	%rcx, (%rbx)
LBB0_19:
	cmpq	%rdx, %rcx
	je	LBB0_27
## %bb.20:
	movl	32(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	movq	(%rbx), %rax
	addq	$-128, %rax
	cmpq	$3, %rax
	ja	LBB0_27
## %bb.21:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_25:
	movq	_AD_PERIODIC_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_AD_SLOW_PERIODIC_TIME@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_1:
	movq	_AD_PORT_LACP_ENABLED@GOTPCREL(%rip), %rsi
	testl	%eax, (%rsi)
	je	LBB0_18
## %bb.2:
	cmpl	$0, 40(%rbx)
	je	LBB0_18
## %bb.3:
	movq	_AD_STATE_LACP_ACTIVITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 12(%rbx)
	jne	LBB0_5
## %bb.4:
	testl	%eax, 36(%rbx)
	je	LBB0_18
LBB0_5:
	movq	24(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.6:
	movl	$129, %ecx
	decq	%rax
	movq	%rax, 24(%rbx)
	je	LBB0_18
## %bb.7:
	cmpq	$128, %rdx
	je	LBB0_11
## %bb.8:
	cmpq	$131, %rdx
	jne	LBB0_27
## %bb.9:
	movq	_AD_STATE_LACP_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$131, %ecx
	testl	%eax, 36(%rbx)
	jne	LBB0_19
## %bb.10:
	movl	$128, %ecx
	jmp	LBB0_18
LBB0_26:
	movl	$1, 16(%rbx)
	jmp	LBB0_27
LBB0_22:
	movq	$0, 24(%rbx)
	jmp	LBB0_27
LBB0_23:
	movq	_AD_PERIODIC_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_AD_FAST_PERIODIC_TIME@GOTPCREL(%rip), %rax
LBB0_24:
	movl	(%rax), %esi
	callq	___ad_timer_to_ticks
	decl	%eax
	cltq
	movq	%rax, 24(%rbx)
LBB0_27:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_14:
	cmpq	$130, %rdx
	je	LBB0_15
## %bb.16:
	cmpq	$129, %rdx
	jne	LBB0_27
## %bb.17:
	movq	_AD_STATE_LACP_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	testl	%eax, 36(%rbx)
	setne	%cl
	leaq	(%rcx,%rcx,2), %rcx
	orq	$128, %rcx
	jmp	LBB0_18
LBB0_11:
	movq	_AD_STATE_LACP_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 36(%rbx)
	je	LBB0_12
## %bb.13:
	movq	$0, 24(%rbx)
	jmp	LBB0_18
LBB0_15:
	movl	$131, %ecx
	jmp	LBB0_18
LBB0_12:
	movl	$128, %ecx
	jmp	LBB0_19
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_25, LBB0_25-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
LJTI0_0:
	.long	L0_0_set_25
	.long	L0_0_set_26
	.long	L0_0_set_22
	.long	L0_0_set_23
	.end_data_region
                                        ## -- End function
	.comm	_AD_PORT_BEGIN,4,2              ## @AD_PORT_BEGIN
	.comm	_AD_PORT_LACP_ENABLED,4,2       ## @AD_PORT_LACP_ENABLED
	.comm	_AD_STATE_LACP_ACTIVITY,4,2     ## @AD_STATE_LACP_ACTIVITY
	.comm	_AD_STATE_LACP_TIMEOUT,4,2      ## @AD_STATE_LACP_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Periodic Machine: Port=%d, Last State=%d, Curr State=%d\n"

	.comm	_AD_PERIODIC_TIMER,4,2          ## @AD_PERIODIC_TIMER
	.comm	_AD_FAST_PERIODIC_TIME,4,2      ## @AD_FAST_PERIODIC_TIME
	.comm	_AD_SLOW_PERIODIC_TIME,4,2      ## @AD_SLOW_PERIODIC_TIME
	.no_dead_strip	_ad_periodic_machine
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad_periodic_machine
_ad_periodic_machine:                   ; @ad_periodic_machine
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x2, [x0]
	ldr	w8, [x0, #8]
Lloh0:
	adrp	x9, _AD_PORT_BEGIN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AD_PORT_BEGIN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
LBB0_1:
	mov	w3, #130
LBB0_2:
	str	x3, [x19]
LBB0_3:
	cmp	x3, x2
	b.eq	LBB0_21
; %bb.4:
	ldr	w1, [x19, #32]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	ldr	x8, [x19]
	sub	x8, x8, #128
	cmp	x8, #3
	b.hi	LBB0_21
; %bb.5:
Lloh5:
	adrp	x9, lJTI0_0@PAGE
Lloh6:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_6
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_6:
Lloh7:
	adrp	x8, _AD_PERIODIC_TIMER@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AD_PERIODIC_TIMER@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _AD_SLOW_PERIODIC_TIME@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AD_SLOW_PERIODIC_TIME@GOTPAGEOFF]
	b	LBB0_20
LBB0_7:
Lloh12:
	adrp	x9, _AD_PORT_LACP_ENABLED@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AD_PORT_LACP_ENABLED@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.8:
	ldr	w8, [x19, #40]
	cbz	w8, LBB0_1
; %bb.9:
	ldr	w9, [x19, #12]
Lloh15:
	adrp	x8, _AD_STATE_LACP_ACTIVITY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AD_STATE_LACP_ACTIVITY@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w9
	b.ne	LBB0_11
; %bb.10:
	ldr	w9, [x19, #36]
	tst	w9, w8
	b.eq	LBB0_1
LBB0_11:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_22
; %bb.12:
	subs	x8, x8, #1
	str	x8, [x19, #24]
	b.eq	LBB0_25
; %bb.13:
	cmp	x2, #128
	b.eq	LBB0_26
; %bb.14:
	cmp	x2, #131
	b.ne	LBB0_21
; %bb.15:
	ldr	w8, [x19, #36]
Lloh18:
	adrp	x9, _AD_STATE_LACP_TIMEOUT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _AD_STATE_LACP_TIMEOUT@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_29
; %bb.16:
	mov	w3, #131
	b	LBB0_3
LBB0_17:
	mov	w8, #1
	str	w8, [x19, #16]
	b	LBB0_21
LBB0_18:
	str	xzr, [x19, #24]
	b	LBB0_21
LBB0_19:
Lloh21:
	adrp	x8, _AD_PERIODIC_TIMER@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AD_PERIODIC_TIMER@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x8, _AD_FAST_PERIODIC_TIME@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AD_FAST_PERIODIC_TIME@GOTPAGEOFF]
LBB0_20:
	ldr	w1, [x8]
	bl	___ad_timer_to_ticks
	sub	w8, w0, #1
	sxtw	x8, w8
	str	x8, [x19, #24]
LBB0_21:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_22:
	cmp	x2, #130
	b.eq	LBB0_28
; %bb.23:
	cmp	x2, #129
	b.ne	LBB0_21
; %bb.24:
Lloh26:
	adrp	x8, _AD_STATE_LACP_TIMEOUT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AD_STATE_LACP_TIMEOUT@GOTPAGEOFF]
	ldr	w9, [x19, #36]
Lloh28:
	ldr	w8, [x8]
	tst	w8, w9
	mov	w8, #131
	mov	w9, #128
	csel	x3, x9, x8, eq
	b	LBB0_2
LBB0_25:
	mov	w3, #129
	b	LBB0_2
LBB0_26:
	ldr	w8, [x19, #36]
Lloh29:
	adrp	x9, _AD_STATE_LACP_TIMEOUT@GOTPAGE
Lloh30:
	ldr	x9, [x9, _AD_STATE_LACP_TIMEOUT@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_30
; %bb.27:
	str	xzr, [x19, #24]
	mov	w3, #129
	b	LBB0_2
LBB0_28:
	mov	w3, #131
	b	LBB0_2
LBB0_29:
	mov	w3, #128
	b	LBB0_2
LBB0_30:
	mov	w3, #128
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_17-LBB0_6)>>2
	.byte	(LBB0_18-LBB0_6)>>2
	.byte	(LBB0_19-LBB0_6)>>2
                                        ; -- End function
	.comm	_AD_PORT_BEGIN,4,2              ; @AD_PORT_BEGIN
	.comm	_AD_PORT_LACP_ENABLED,4,2       ; @AD_PORT_LACP_ENABLED
	.comm	_AD_STATE_LACP_ACTIVITY,4,2     ; @AD_STATE_LACP_ACTIVITY
	.comm	_AD_STATE_LACP_TIMEOUT,4,2      ; @AD_STATE_LACP_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Periodic Machine: Port=%d, Last State=%d, Curr State=%d\n"

	.comm	_AD_PERIODIC_TIMER,4,2          ; @AD_PERIODIC_TIMER
	.comm	_AD_FAST_PERIODIC_TIME,4,2      ; @AD_FAST_PERIODIC_TIME
	.comm	_AD_SLOW_PERIODIC_TIME,4,2      ; @AD_SLOW_PERIODIC_TIME
	.no_dead_strip	_ad_periodic_machine
.subsections_via_symbols
