	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvaser_pciefd_remove
_kvaser_pciefd_remove:                  ## @kvaser_pciefd_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_pci_get_drvdata
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_kvaser_pciefd_remove_all_ctrls
	movq	_KVASER_PCIEFD_SRB_CTRL_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	xorl	%edi, %edi
	callq	_iowrite32
	movq	_KVASER_PCIEFD_IRQ_ALL_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_KVASER_PCIEFD_IRQ_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_iowrite32
	movq	_KVASER_PCIEFD_IEN_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	xorl	%edi, %edi
	callq	_iowrite32
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_free_irq
	movq	%r14, %rdi
	callq	_pci_clear_master
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_pci_iounmap
	movq	%r14, %rdi
	callq	_pci_release_regions
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pci_disable_device             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_KVASER_PCIEFD_SRB_CTRL_REG,8,3 ## @KVASER_PCIEFD_SRB_CTRL_REG
	.comm	_KVASER_PCIEFD_IRQ_ALL_MSK,4,2  ## @KVASER_PCIEFD_IRQ_ALL_MSK
	.comm	_KVASER_PCIEFD_IRQ_REG,8,3      ## @KVASER_PCIEFD_IRQ_REG
	.comm	_KVASER_PCIEFD_IEN_REG,8,3      ## @KVASER_PCIEFD_IEN_REG
	.no_dead_strip	_kvaser_pciefd_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvaser_pciefd_remove
_kvaser_pciefd_remove:                  ; @kvaser_pciefd_remove
	.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
	bl	_pci_get_drvdata
	mov	x20, x0
	bl	_kvaser_pciefd_remove_all_ctrls
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _KVASER_PCIEFD_SRB_CTRL_REG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KVASER_PCIEFD_SRB_CTRL_REG@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_iowrite32
Lloh3:
	adrp	x8, _KVASER_PCIEFD_IRQ_ALL_MSK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KVASER_PCIEFD_IRQ_ALL_MSK@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _KVASER_PCIEFD_IRQ_REG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _KVASER_PCIEFD_IRQ_REG@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
	ldr	x8, [x20]
Lloh9:
	adrp	x9, _KVASER_PCIEFD_IEN_REG@GOTPAGE
Lloh10:
	ldr	x9, [x9, _KVASER_PCIEFD_IEN_REG@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_iowrite32
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	mov	x1, x20
	bl	_free_irq
	mov	x0, x19
	bl	_pci_clear_master
	ldr	x1, [x20]
	mov	x0, x19
	bl	_pci_iounmap
	mov	x0, x19
	bl	_pci_release_regions
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pci_disable_device
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_KVASER_PCIEFD_SRB_CTRL_REG,8,3 ; @KVASER_PCIEFD_SRB_CTRL_REG
	.comm	_KVASER_PCIEFD_IRQ_ALL_MSK,4,2  ; @KVASER_PCIEFD_IRQ_ALL_MSK
	.comm	_KVASER_PCIEFD_IRQ_REG,8,3      ; @KVASER_PCIEFD_IRQ_REG
	.comm	_KVASER_PCIEFD_IEN_REG,8,3      ; @KVASER_PCIEFD_IEN_REG
	.no_dead_strip	_kvaser_pciefd_remove
.subsections_via_symbols
