	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skge_remove
_skge_remove:                           ## @skge_remove
	.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
	movq	%rdi, %r14
	callq	_pci_get_drvdata
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %r13
	movq	32(%rbx), %rax
	movq	8(%rax), %r15
	testq	%r15, %r15
	je	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	_unregister_netdev
	movq	32(%r13), %rax
LBB0_3:
	movq	(%rax), %r12
	movq	%r12, %rdi
	callq	_unregister_netdev
	leaq	24(%rbx), %rdi
	callq	_tasklet_kill
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irq
	movq	$0, 16(%r13)
	cmpl	$2, (%r13)
	jl	LBB0_5
## %bb.4:
	movq	_B0_IMSK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_skge_write32
	movq	_B0_IMSK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_skge_read32
LBB0_5:
	movq	%rbx, %rdi
	callq	_spin_unlock_irq
	movq	_B0_LED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LED_STAT_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_skge_write16
	movq	_B0_CTST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CS_RST_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_skge_write8
	cmpl	$2, (%r13)
	jl	LBB0_7
## %bb.6:
	movl	(%r14), %edi
	movq	%r13, %rsi
	callq	_free_irq
LBB0_7:
	movq	%r14, %rdi
	callq	_pci_release_regions
	movq	%r14, %rdi
	callq	_pci_disable_device
	testq	%r15, %r15
	je	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_free_netdev
LBB0_9:
	movq	%r12, %rdi
	callq	_free_netdev
	movl	4(%r13), %edi
	callq	_iounmap
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B0_IMSK,4,2                    ## @B0_IMSK
	.comm	_B0_LED,4,2                     ## @B0_LED
	.comm	_LED_STAT_OFF,4,2               ## @LED_STAT_OFF
	.comm	_B0_CTST,4,2                    ## @B0_CTST
	.comm	_CS_RST_SET,4,2                 ## @CS_RST_SET
	.no_dead_strip	_skge_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function skge_remove
_skge_remove:                           ; @skge_remove
	.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, x0
	bl	_pci_get_drvdata
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #32]
	ldr	x21, [x8, #8]
	cbz	x21, LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_unregister_netdev
	ldr	x8, [x19, #32]
LBB0_3:
	ldr	x22, [x8]
	mov	x0, x22
	bl	_unregister_netdev
	add	x0, x19, #24
	bl	_tasklet_kill
	add	x23, x19, #8
	mov	x0, x23
	bl	_spin_lock_irq
	str	xzr, [x19, #16]
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.4:
Lloh0:
	adrp	x24, _B0_IMSK@GOTPAGE
Lloh1:
	ldr	x24, [x24, _B0_IMSK@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	mov	w2, #0
	bl	_skge_write32
	ldr	w1, [x24]
	mov	x0, x19
	bl	_skge_read32
LBB0_5:
	mov	x0, x23
	bl	_spin_unlock_irq
Lloh2:
	adrp	x8, _B0_LED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _B0_LED@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _LED_STAT_OFF@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LED_STAT_OFF@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_skge_write16
Lloh8:
	adrp	x8, _B0_CTST@GOTPAGE
Lloh9:
	ldr	x8, [x8, _B0_CTST@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _CS_RST_SET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CS_RST_SET@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_skge_write8
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_7
; %bb.6:
	ldr	w0, [x20]
	mov	x1, x19
	bl	_free_irq
LBB0_7:
	mov	x0, x20
	bl	_pci_release_regions
	mov	x0, x20
	bl	_pci_disable_device
	cbz	x21, LBB0_9
; %bb.8:
	mov	x0, x21
	bl	_free_netdev
LBB0_9:
	mov	x0, x22
	bl	_free_netdev
	ldr	w0, [x19, #4]
	bl	_iounmap
	mov	x0, x19
	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	_kfree
LBB0_10:
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_B0_IMSK,4,2                    ; @B0_IMSK
	.comm	_B0_LED,4,2                     ; @B0_LED
	.comm	_LED_STAT_OFF,4,2               ; @LED_STAT_OFF
	.comm	_B0_CTST,4,2                    ; @B0_CTST
	.comm	_CS_RST_SET,4,2                 ; @CS_RST_SET
	.no_dead_strip	_skge_remove
.subsections_via_symbols
