	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function airo_handle_link
_airo_handle_link:                      ## @airo_handle_link
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_LINKSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_IN4500
	movl	%eax, %edi
	callq	_le16_to_cpu
	movq	%rax, %rbx
	movq	_EVACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EV_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_OUT4500
	movq	_STAT_FORCELOSS@GOTPCREL(%rip), %rax
	movb	$1, %r15b
	cmpq	(%rax), %rbx
	jne	LBB0_2
## %bb.1:
	cmpq	$0, (%r14)
	setle	%r15b
LBB0_2:
	movq	8(%r14), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_airo_print_status
	movq	_STAT_ASSOC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_4
## %bb.3:
	movq	_STAT_REASSOC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_4
## %bb.12:
	testb	%r15b, %r15b
	je	LBB0_17
## %bb.13:
	movq	_auto_wep@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_16
## %bb.14:
	cmpq	$0, 24(%r14)
	jne	LBB0_16
## %bb.15:
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,2), %edi
	callq	_RUN_AT
	movq	%rax, 24(%r14)
	leaq	16(%r14), %rdi
	callq	_wake_up_interruptible
LBB0_16:
	callq	_eth_zero_addr
	movq	_ARPHRD_ETHER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	8(%r14), %rdi
	movq	_SIOCGIWAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	xorl	%ecx, %ecx
	callq	_wireless_send_event
	movq	8(%r14), %rdi
	callq	_netif_carrier_off
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_auto_wep@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:
	movq	$0, 24(%r14)
LBB0_6:
	movq	48(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_wake_up_process
LBB0_8:
	movq	_FLAG_UPDATE_UNI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	40(%r14), %rbx
	movq	%rbx, %rsi
	callq	_set_bit
	movq	_FLAG_UPDATE_MULTI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_set_bit
	leaq	36(%r14), %rdi
	callq	_down_trylock
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_JOB_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	32(%r14), %rsi
	callq	_set_bit
	leaq	16(%r14), %rdi
	callq	_wake_up_interruptible
	jmp	LBB0_11
LBB0_17:
	movq	8(%r14), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netif_carrier_off              ## TAILCALL
LBB0_10:
	movq	8(%r14), %rdi
	callq	_airo_send_event
LBB0_11:
	movq	8(%r14), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netif_carrier_on               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LINKSTAT,4,2                   ## @LINKSTAT
	.comm	_EVACK,4,2                      ## @EVACK
	.comm	_EV_LINK,4,2                    ## @EV_LINK
	.comm	_STAT_FORCELOSS,8,3             ## @STAT_FORCELOSS
	.comm	_STAT_ASSOC,8,3                 ## @STAT_ASSOC
	.comm	_STAT_REASSOC,8,3               ## @STAT_REASSOC
	.comm	_auto_wep,8,3                   ## @auto_wep
	.comm	_FLAG_UPDATE_UNI,4,2            ## @FLAG_UPDATE_UNI
	.comm	_FLAG_UPDATE_MULTI,4,2          ## @FLAG_UPDATE_MULTI
	.comm	_JOB_EVENT,4,2                  ## @JOB_EVENT
	.comm	_HZ,4,2                         ## @HZ
	.comm	_ARPHRD_ETHER,4,2               ## @ARPHRD_ETHER
	.comm	_SIOCGIWAP,4,2                  ## @SIOCGIWAP
	.no_dead_strip	_airo_handle_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function airo_handle_link
_airo_handle_link:                      ; @airo_handle_link
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _LINKSTAT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LINKSTAT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_IN4500
	bl	_le16_to_cpu
	mov	x20, x0
Lloh3:
	adrp	x8, _EVACK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EVACK@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _EV_LINK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EV_LINK@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_OUT4500
Lloh9:
	adrp	x8, _STAT_FORCELOSS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _STAT_FORCELOSS@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x20, x8
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x19]
	cmp	x8, #1
	cset	w21, lt
	b	LBB0_3
LBB0_2:
	mov	w21, #1
LBB0_3:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	mov	x1, x20
	bl	_airo_print_status
Lloh12:
	adrp	x8, _STAT_ASSOC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _STAT_ASSOC@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x9, _STAT_REASSOC@GOTPAGE
Lloh16:
	ldr	x9, [x9, _STAT_REASSOC@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x20, x8
	ccmp	x20, x9, #4, ne
	b.ne	LBB0_10
; %bb.4:
Lloh18:
	adrp	x8, _auto_wep@GOTPAGE
Lloh19:
	ldr	x8, [x8, _auto_wep@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
	str	xzr, [x19, #24]
LBB0_6:
	ldr	x0, [x19, #48]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_wake_up_process
LBB0_8:
Lloh21:
	adrp	x8, _FLAG_UPDATE_UNI@GOTPAGE
Lloh22:
	ldr	x8, [x8, _FLAG_UPDATE_UNI@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	add	x20, x19, #40
	mov	x1, x20
	bl	_set_bit
Lloh24:
	adrp	x8, _FLAG_UPDATE_MULTI@GOTPAGE
Lloh25:
	ldr	x8, [x8, _FLAG_UPDATE_MULTI@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_set_bit
	add	x0, x19, #36
	bl	_down_trylock
	cbz	x0, LBB0_16
; %bb.9:
Lloh27:
	adrp	x8, _JOB_EVENT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _JOB_EVENT@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	add	x1, x19, #32
	bl	_set_bit
	add	x0, x19, #16
	bl	_wake_up_interruptible
	b	LBB0_17
LBB0_10:
	cbz	w21, LBB0_15
; %bb.11:
Lloh30:
	adrp	x8, _auto_wep@GOTPAGE
Lloh31:
	ldr	x8, [x8, _auto_wep@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.12:
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_14
; %bb.13:
Lloh33:
	adrp	x8, _HZ@GOTPAGE
Lloh34:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	add	w0, w8, w8, lsl #1
	bl	_RUN_AT
	str	x0, [x19, #24]
	add	x0, x19, #16
	bl	_wake_up_interruptible
LBB0_14:
	bl	_eth_zero_addr
Lloh36:
	adrp	x8, _ARPHRD_ETHER@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ARPHRD_ETHER@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	x0, [x19, #8]
Lloh39:
	adrp	x8, _SIOCGIWAP@GOTPAGE
Lloh40:
	ldr	x8, [x8, _SIOCGIWAP@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x3, #0
	bl	_wireless_send_event
	ldr	x0, [x19, #8]
	bl	_netif_carrier_off
	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
	add	sp, sp, #64
	ret
LBB0_15:
	ldr	x0, [x19, #8]
	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
	add	sp, sp, #64
	b	_netif_carrier_off
LBB0_16:
	ldr	x0, [x19, #8]
	bl	_airo_send_event
LBB0_17:
	ldr	x0, [x19, #8]
	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
	add	sp, sp, #64
	b	_netif_carrier_on
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_LINKSTAT,4,2                   ; @LINKSTAT
	.comm	_EVACK,4,2                      ; @EVACK
	.comm	_EV_LINK,4,2                    ; @EV_LINK
	.comm	_STAT_FORCELOSS,8,3             ; @STAT_FORCELOSS
	.comm	_STAT_ASSOC,8,3                 ; @STAT_ASSOC
	.comm	_STAT_REASSOC,8,3               ; @STAT_REASSOC
	.comm	_auto_wep,8,3                   ; @auto_wep
	.comm	_FLAG_UPDATE_UNI,4,2            ; @FLAG_UPDATE_UNI
	.comm	_FLAG_UPDATE_MULTI,4,2          ; @FLAG_UPDATE_MULTI
	.comm	_JOB_EVENT,4,2                  ; @JOB_EVENT
	.comm	_HZ,4,2                         ; @HZ
	.comm	_ARPHRD_ETHER,4,2               ; @ARPHRD_ETHER
	.comm	_SIOCGIWAP,4,2                  ; @SIOCGIWAP
	.no_dead_strip	_airo_handle_link
.subsections_via_symbols
