	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_ape_driver_state_change
_tg3_ape_driver_state_change:           ## @tg3_ape_driver_state_change
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_ENABLE_APE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_tg3_flag
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	cmpl	$128, %ebx
	je	LBB0_4
## %bb.2:
	cmpl	$129, %ebx
	jne	LBB0_9
## %bb.3:
	movq	_TG3_APE_HOST_HEARTBEAT_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	leal	1(%rdx), %eax
	movl	%eax, 8(%r14)
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_tg3_ape_write32
	movq	_TG3_APE_HOST_SEG_SIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_APE_HOST_SEG_SIG_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_tg3_ape_write32
	movq	_TG3_APE_HOST_SEG_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_APE_HOST_SEG_LEN_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_tg3_ape_write32
	movq	_TG3_APE_HOST_INIT_COUNT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_tg3_ape_read32
                                        ## kill: def $eax killed $eax def $rax
	movl	(%rbx), %esi
	leal	1(%rax), %edx
	movq	%r14, %rdi
	callq	_tg3_ape_write32
	movq	_TG3_APE_HOST_DRIVER_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_TG3_MAJ_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TG3_MIN_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_APE_HOST_DRIVER_ID_MAGIC
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_tg3_ape_write32
	movq	_TG3_APE_HOST_BEHAVIOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_APE_HOST_BEHAV_NO_PHYLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_tg3_ape_write32
	movq	_TG3_APE_HOST_DRVR_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TG3_APE_HOST_DRVR_STATE_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_tg3_ape_write32
	movq	_APE_EVENT_STATUS_STATE_START@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movq	(%r14), %rdi
	callq	_device_may_wakeup
	movq	_TG3_APE_HOST_DRVR_STATE_UNLOAD@GOTPCREL(%rip), %rbx
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movq	_WOL_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_tg3_flag
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_TG3_APE_HOST_WOL_SPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TG3_APE_HOST_WOL_SPEED_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_tg3_ape_write32
	movq	_TG3_APE_HOST_DRVR_STATE_WOL@GOTPCREL(%rip), %rbx
LBB0_7:
	movl	(%rbx), %edx
	movq	_TG3_APE_HOST_DRVR_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_tg3_ape_write32
	movq	_APE_EVENT_STATUS_STATE_UNLOAD@GOTPCREL(%rip), %rax
LBB0_8:
	movq	_APE_EVENT_STATUS_DRIVER_EVNT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_APE_EVENT_STATUS_STATE_CHNGE@GOTPCREL(%rip), %rcx
	orl	(%rax), %esi
	orl	(%rcx), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_tg3_ape_send_event             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENABLE_APE,4,2                 ## @ENABLE_APE
	.comm	_TG3_APE_HOST_HEARTBEAT_COUNT,4,2 ## @TG3_APE_HOST_HEARTBEAT_COUNT
	.comm	_TG3_APE_HOST_SEG_SIG,4,2       ## @TG3_APE_HOST_SEG_SIG
	.comm	_APE_HOST_SEG_SIG_MAGIC,4,2     ## @APE_HOST_SEG_SIG_MAGIC
	.comm	_TG3_APE_HOST_SEG_LEN,4,2       ## @TG3_APE_HOST_SEG_LEN
	.comm	_APE_HOST_SEG_LEN_MAGIC,4,2     ## @APE_HOST_SEG_LEN_MAGIC
	.comm	_TG3_APE_HOST_INIT_COUNT,4,2    ## @TG3_APE_HOST_INIT_COUNT
	.comm	_TG3_APE_HOST_DRIVER_ID,4,2     ## @TG3_APE_HOST_DRIVER_ID
	.comm	_TG3_MAJ_NUM,4,2                ## @TG3_MAJ_NUM
	.comm	_TG3_MIN_NUM,4,2                ## @TG3_MIN_NUM
	.comm	_TG3_APE_HOST_BEHAVIOR,4,2      ## @TG3_APE_HOST_BEHAVIOR
	.comm	_APE_HOST_BEHAV_NO_PHYLOCK,4,2  ## @APE_HOST_BEHAV_NO_PHYLOCK
	.comm	_TG3_APE_HOST_DRVR_STATE,4,2    ## @TG3_APE_HOST_DRVR_STATE
	.comm	_TG3_APE_HOST_DRVR_STATE_START,4,2 ## @TG3_APE_HOST_DRVR_STATE_START
	.comm	_APE_EVENT_STATUS_STATE_START,4,2 ## @APE_EVENT_STATUS_STATE_START
	.comm	_WOL_ENABLE,4,2                 ## @WOL_ENABLE
	.comm	_TG3_APE_HOST_WOL_SPEED,4,2     ## @TG3_APE_HOST_WOL_SPEED
	.comm	_TG3_APE_HOST_WOL_SPEED_AUTO,4,2 ## @TG3_APE_HOST_WOL_SPEED_AUTO
	.comm	_TG3_APE_HOST_DRVR_STATE_WOL,4,2 ## @TG3_APE_HOST_DRVR_STATE_WOL
	.comm	_TG3_APE_HOST_DRVR_STATE_UNLOAD,4,2 ## @TG3_APE_HOST_DRVR_STATE_UNLOAD
	.comm	_APE_EVENT_STATUS_STATE_UNLOAD,4,2 ## @APE_EVENT_STATUS_STATE_UNLOAD
	.comm	_APE_EVENT_STATUS_DRIVER_EVNT,4,2 ## @APE_EVENT_STATUS_DRIVER_EVNT
	.comm	_APE_EVENT_STATUS_STATE_CHNGE,4,2 ## @APE_EVENT_STATUS_STATE_CHNGE
	.no_dead_strip	_tg3_ape_driver_state_change
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_ape_driver_state_change
_tg3_ape_driver_state_change:           ; @tg3_ape_driver_state_change
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _ENABLE_APE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENABLE_APE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_tg3_flag
	cbz	x0, LBB0_4
; %bb.1:
	cmp	w20, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	w20, #129
	b.ne	LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _TG3_APE_HOST_HEARTBEAT_COUNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TG3_APE_HOST_HEARTBEAT_COUNT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
	add	w8, w2, #1
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_tg3_ape_write32
Lloh6:
	adrp	x8, _TG3_APE_HOST_SEG_SIG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TG3_APE_HOST_SEG_SIG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _APE_HOST_SEG_SIG_MAGIC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _APE_HOST_SEG_SIG_MAGIC@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_tg3_ape_write32
Lloh12:
	adrp	x8, _TG3_APE_HOST_SEG_LEN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TG3_APE_HOST_SEG_LEN@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _APE_HOST_SEG_LEN_MAGIC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _APE_HOST_SEG_LEN_MAGIC@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_tg3_ape_write32
Lloh18:
	adrp	x20, _TG3_APE_HOST_INIT_COUNT@GOTPAGE
Lloh19:
	ldr	x20, [x20, _TG3_APE_HOST_INIT_COUNT@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_tg3_ape_read32
	ldr	w1, [x20]
	add	w2, w0, #1
	mov	x0, x19
	bl	_tg3_ape_write32
Lloh20:
	adrp	x8, _TG3_APE_HOST_DRIVER_ID@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TG3_APE_HOST_DRIVER_ID@GOTPAGEOFF]
Lloh22:
	ldr	w20, [x8]
Lloh23:
	adrp	x8, _TG3_MAJ_NUM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TG3_MAJ_NUM@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x8, _TG3_MIN_NUM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TG3_MIN_NUM@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	bl	_APE_HOST_DRIVER_ID_MAGIC
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_tg3_ape_write32
Lloh29:
	adrp	x8, _TG3_APE_HOST_BEHAVIOR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _TG3_APE_HOST_BEHAVIOR@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x8, _APE_HOST_BEHAV_NO_PHYLOCK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _APE_HOST_BEHAV_NO_PHYLOCK@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_tg3_ape_write32
Lloh35:
	adrp	x8, _TG3_APE_HOST_DRVR_STATE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _TG3_APE_HOST_DRVR_STATE@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
Lloh38:
	adrp	x8, _TG3_APE_HOST_DRVR_STATE_START@GOTPAGE
Lloh39:
	ldr	x8, [x8, _TG3_APE_HOST_DRVR_STATE_START@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_tg3_ape_write32
Lloh41:
	adrp	x8, _APE_EVENT_STATUS_STATE_START@GOTPAGE
Lloh42:
	ldr	x8, [x8, _APE_EVENT_STATUS_STATE_START@GOTPAGEOFF]
	b	LBB0_10
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	x0, [x19]
	bl	_device_may_wakeup
	cbz	w0, LBB0_8
; %bb.6:
Lloh43:
	adrp	x8, _WOL_ENABLE@GOTPAGE
Lloh44:
	ldr	x8, [x8, _WOL_ENABLE@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tg3_flag
	cbz	x0, LBB0_8
; %bb.7:
Lloh46:
	adrp	x8, _TG3_APE_HOST_WOL_SPEED@GOTPAGE
Lloh47:
	ldr	x8, [x8, _TG3_APE_HOST_WOL_SPEED@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
Lloh49:
	adrp	x8, _TG3_APE_HOST_WOL_SPEED_AUTO@GOTPAGE
Lloh50:
	ldr	x8, [x8, _TG3_APE_HOST_WOL_SPEED_AUTO@GOTPAGEOFF]
Lloh51:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_tg3_ape_write32
Lloh52:
	adrp	x8, _TG3_APE_HOST_DRVR_STATE_WOL@GOTPAGE
Lloh53:
	ldr	x8, [x8, _TG3_APE_HOST_DRVR_STATE_WOL@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh54:
	adrp	x8, _TG3_APE_HOST_DRVR_STATE_UNLOAD@GOTPAGE
Lloh55:
	ldr	x8, [x8, _TG3_APE_HOST_DRVR_STATE_UNLOAD@GOTPAGEOFF]
LBB0_9:
	ldr	w2, [x8]
Lloh56:
	adrp	x8, _TG3_APE_HOST_DRVR_STATE@GOTPAGE
Lloh57:
	ldr	x8, [x8, _TG3_APE_HOST_DRVR_STATE@GOTPAGEOFF]
Lloh58:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tg3_ape_write32
Lloh59:
	adrp	x8, _APE_EVENT_STATUS_STATE_UNLOAD@GOTPAGE
Lloh60:
	ldr	x8, [x8, _APE_EVENT_STATUS_STATE_UNLOAD@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
Lloh61:
	adrp	x9, _APE_EVENT_STATUS_DRIVER_EVNT@GOTPAGE
Lloh62:
	ldr	x9, [x9, _APE_EVENT_STATUS_DRIVER_EVNT@GOTPAGEOFF]
Lloh63:
	adrp	x10, _APE_EVENT_STATUS_STATE_CHNGE@GOTPAGE
Lloh64:
	ldr	x10, [x10, _APE_EVENT_STATUS_STATE_CHNGE@GOTPAGEOFF]
Lloh65:
	ldr	w9, [x9]
Lloh66:
	ldr	w10, [x10]
	orr	w8, w9, w8
	orr	w1, w8, w10
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_tg3_ape_send_event
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh66
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh65
	.cfi_endproc
                                        ; -- End function
	.comm	_ENABLE_APE,4,2                 ; @ENABLE_APE
	.comm	_TG3_APE_HOST_HEARTBEAT_COUNT,4,2 ; @TG3_APE_HOST_HEARTBEAT_COUNT
	.comm	_TG3_APE_HOST_SEG_SIG,4,2       ; @TG3_APE_HOST_SEG_SIG
	.comm	_APE_HOST_SEG_SIG_MAGIC,4,2     ; @APE_HOST_SEG_SIG_MAGIC
	.comm	_TG3_APE_HOST_SEG_LEN,4,2       ; @TG3_APE_HOST_SEG_LEN
	.comm	_APE_HOST_SEG_LEN_MAGIC,4,2     ; @APE_HOST_SEG_LEN_MAGIC
	.comm	_TG3_APE_HOST_INIT_COUNT,4,2    ; @TG3_APE_HOST_INIT_COUNT
	.comm	_TG3_APE_HOST_DRIVER_ID,4,2     ; @TG3_APE_HOST_DRIVER_ID
	.comm	_TG3_MAJ_NUM,4,2                ; @TG3_MAJ_NUM
	.comm	_TG3_MIN_NUM,4,2                ; @TG3_MIN_NUM
	.comm	_TG3_APE_HOST_BEHAVIOR,4,2      ; @TG3_APE_HOST_BEHAVIOR
	.comm	_APE_HOST_BEHAV_NO_PHYLOCK,4,2  ; @APE_HOST_BEHAV_NO_PHYLOCK
	.comm	_TG3_APE_HOST_DRVR_STATE,4,2    ; @TG3_APE_HOST_DRVR_STATE
	.comm	_TG3_APE_HOST_DRVR_STATE_START,4,2 ; @TG3_APE_HOST_DRVR_STATE_START
	.comm	_APE_EVENT_STATUS_STATE_START,4,2 ; @APE_EVENT_STATUS_STATE_START
	.comm	_WOL_ENABLE,4,2                 ; @WOL_ENABLE
	.comm	_TG3_APE_HOST_WOL_SPEED,4,2     ; @TG3_APE_HOST_WOL_SPEED
	.comm	_TG3_APE_HOST_WOL_SPEED_AUTO,4,2 ; @TG3_APE_HOST_WOL_SPEED_AUTO
	.comm	_TG3_APE_HOST_DRVR_STATE_WOL,4,2 ; @TG3_APE_HOST_DRVR_STATE_WOL
	.comm	_TG3_APE_HOST_DRVR_STATE_UNLOAD,4,2 ; @TG3_APE_HOST_DRVR_STATE_UNLOAD
	.comm	_APE_EVENT_STATUS_STATE_UNLOAD,4,2 ; @APE_EVENT_STATUS_STATE_UNLOAD
	.comm	_APE_EVENT_STATUS_DRIVER_EVNT,4,2 ; @APE_EVENT_STATUS_DRIVER_EVNT
	.comm	_APE_EVENT_STATUS_STATE_CHNGE,4,2 ; @APE_EVENT_STATUS_STATE_CHNGE
	.no_dead_strip	_tg3_ape_driver_state_change
.subsections_via_symbols
