	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvaser_pciefd_start_controller_flush
_kvaser_pciefd_start_controller_flush:  ## @kvaser_pciefd_start_controller_flush
	.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, %rbx
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_KVASER_PCIEFD_KCAN_IRQ_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	$-1, %edi
	callq	_iowrite32
	movq	_KVASER_PCIEFD_KCAN_IRQ_ABD@GOTPCREL(%rip), %rax
	movq	_KVASER_PCIEFD_KCAN_IRQ_TFD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_KVASER_PCIEFD_KCAN_IEN_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_iowrite32
	movq	_KVASER_PCIEFD_KCAN_STAT_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_ioread32
	movq	_KVASER_PCIEFD_KCAN_STAT_IDLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_KVASER_PCIEFD_KCAN_CMD_AT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%rbx), %edi
	incl	%edi
	movl	%edi, (%rbx)
	movq	_KVASER_PCIEFD_KCAN_CMD_SEQ_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edi
	orl	%eax, %edi
	movq	_KVASER_PCIEFD_KCAN_CMD_REG@GOTPCREL(%rip), %r15
LBB0_4:
	movq	(%r15), %rsi
	addq	8(%rbx), %rsi
	callq	_iowrite32
	jmp	LBB0_5
LBB0_2:
	movq	_KVASER_PCIEFD_KCAN_STAT_RMR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
LBB0_5:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_3:
	movq	_KVASER_PCIEFD_KCAN_MODE_REG@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	8(%rbx), %rdi
	callq	_ioread32
	movl	%eax, %edi
	movq	_KVASER_PCIEFD_KCAN_MODE_RM@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_KVASER_PCIEFD_KCAN_IRQ_REG,8,3 ## @KVASER_PCIEFD_KCAN_IRQ_REG
	.comm	_KVASER_PCIEFD_KCAN_IRQ_ABD,4,2 ## @KVASER_PCIEFD_KCAN_IRQ_ABD
	.comm	_KVASER_PCIEFD_KCAN_IRQ_TFD,4,2 ## @KVASER_PCIEFD_KCAN_IRQ_TFD
	.comm	_KVASER_PCIEFD_KCAN_IEN_REG,8,3 ## @KVASER_PCIEFD_KCAN_IEN_REG
	.comm	_KVASER_PCIEFD_KCAN_STAT_REG,8,3 ## @KVASER_PCIEFD_KCAN_STAT_REG
	.comm	_KVASER_PCIEFD_KCAN_STAT_IDLE,4,2 ## @KVASER_PCIEFD_KCAN_STAT_IDLE
	.comm	_KVASER_PCIEFD_KCAN_CMD_AT,4,2  ## @KVASER_PCIEFD_KCAN_CMD_AT
	.comm	_KVASER_PCIEFD_KCAN_CMD_SEQ_SHIFT,4,2 ## @KVASER_PCIEFD_KCAN_CMD_SEQ_SHIFT
	.comm	_KVASER_PCIEFD_KCAN_CMD_REG,8,3 ## @KVASER_PCIEFD_KCAN_CMD_REG
	.comm	_KVASER_PCIEFD_KCAN_STAT_RMR,4,2 ## @KVASER_PCIEFD_KCAN_STAT_RMR
	.comm	_KVASER_PCIEFD_KCAN_MODE_REG,8,3 ## @KVASER_PCIEFD_KCAN_MODE_REG
	.comm	_KVASER_PCIEFD_KCAN_MODE_RM,4,2 ## @KVASER_PCIEFD_KCAN_MODE_RM
	.no_dead_strip	_kvaser_pciefd_start_controller_flush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvaser_pciefd_start_controller_flush
_kvaser_pciefd_start_controller_flush:  ; @kvaser_pciefd_start_controller_flush
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x9, _KVASER_PCIEFD_KCAN_IRQ_REG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KVASER_PCIEFD_KCAN_IRQ_REG@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #-1
	bl	_iowrite32
Lloh3:
	adrp	x8, _KVASER_PCIEFD_KCAN_IRQ_ABD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KVASER_PCIEFD_KCAN_IRQ_ABD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _KVASER_PCIEFD_KCAN_IRQ_TFD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _KVASER_PCIEFD_KCAN_IRQ_TFD@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w0, w9, w8
	ldr	x8, [x20, #8]
Lloh9:
	adrp	x9, _KVASER_PCIEFD_KCAN_IEN_REG@GOTPAGE
Lloh10:
	ldr	x9, [x9, _KVASER_PCIEFD_KCAN_IEN_REG@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
	ldr	x8, [x20, #8]
Lloh12:
	adrp	x9, _KVASER_PCIEFD_KCAN_STAT_REG@GOTPAGE
Lloh13:
	ldr	x9, [x9, _KVASER_PCIEFD_KCAN_STAT_REG@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_ioread32
Lloh15:
	adrp	x8, _KVASER_PCIEFD_KCAN_STAT_IDLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _KVASER_PCIEFD_KCAN_STAT_IDLE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.1:
Lloh18:
	adrp	x8, _KVASER_PCIEFD_KCAN_CMD_AT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _KVASER_PCIEFD_KCAN_CMD_AT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [x20]
	add	w9, w9, #1
Lloh21:
	adrp	x10, _KVASER_PCIEFD_KCAN_CMD_SEQ_SHIFT@GOTPAGE
Lloh22:
	ldr	x10, [x10, _KVASER_PCIEFD_KCAN_CMD_SEQ_SHIFT@GOTPAGEOFF]
	str	w9, [x20]
Lloh23:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w0, w9, w8
Lloh24:
	adrp	x21, _KVASER_PCIEFD_KCAN_CMD_REG@GOTPAGE
Lloh25:
	ldr	x21, [x21, _KVASER_PCIEFD_KCAN_CMD_REG@GOTPAGEOFF]
LBB0_2:
	ldr	x8, [x20, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_iowrite32
	b	LBB0_4
LBB0_3:
Lloh26:
	adrp	x8, _KVASER_PCIEFD_KCAN_STAT_RMR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _KVASER_PCIEFD_KCAN_STAT_RMR@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_5
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
LBB0_5:
	ldr	x8, [x20, #8]
Lloh29:
	adrp	x21, _KVASER_PCIEFD_KCAN_MODE_REG@GOTPAGE
Lloh30:
	ldr	x21, [x21, _KVASER_PCIEFD_KCAN_MODE_REG@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_ioread32
Lloh31:
	adrp	x8, _KVASER_PCIEFD_KCAN_MODE_RM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _KVASER_PCIEFD_KCAN_MODE_RM@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	orr	w0, w8, w0
	b	LBB0_2
	.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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_KVASER_PCIEFD_KCAN_IRQ_REG,8,3 ; @KVASER_PCIEFD_KCAN_IRQ_REG
	.comm	_KVASER_PCIEFD_KCAN_IRQ_ABD,4,2 ; @KVASER_PCIEFD_KCAN_IRQ_ABD
	.comm	_KVASER_PCIEFD_KCAN_IRQ_TFD,4,2 ; @KVASER_PCIEFD_KCAN_IRQ_TFD
	.comm	_KVASER_PCIEFD_KCAN_IEN_REG,8,3 ; @KVASER_PCIEFD_KCAN_IEN_REG
	.comm	_KVASER_PCIEFD_KCAN_STAT_REG,8,3 ; @KVASER_PCIEFD_KCAN_STAT_REG
	.comm	_KVASER_PCIEFD_KCAN_STAT_IDLE,4,2 ; @KVASER_PCIEFD_KCAN_STAT_IDLE
	.comm	_KVASER_PCIEFD_KCAN_CMD_AT,4,2  ; @KVASER_PCIEFD_KCAN_CMD_AT
	.comm	_KVASER_PCIEFD_KCAN_CMD_SEQ_SHIFT,4,2 ; @KVASER_PCIEFD_KCAN_CMD_SEQ_SHIFT
	.comm	_KVASER_PCIEFD_KCAN_CMD_REG,8,3 ; @KVASER_PCIEFD_KCAN_CMD_REG
	.comm	_KVASER_PCIEFD_KCAN_STAT_RMR,4,2 ; @KVASER_PCIEFD_KCAN_STAT_RMR
	.comm	_KVASER_PCIEFD_KCAN_MODE_REG,8,3 ; @KVASER_PCIEFD_KCAN_MODE_REG
	.comm	_KVASER_PCIEFD_KCAN_MODE_RM,4,2 ; @KVASER_PCIEFD_KCAN_MODE_RM
	.no_dead_strip	_kvaser_pciefd_start_controller_flush
.subsections_via_symbols
