	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvaser_pciefd_irq_handler
_kvaser_pciefd_irq_handler:             ## @kvaser_pciefd_irq_handler
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	_KVASER_PCIEFD_IRQ_REG@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	8(%rsi), %rdi
	callq	_ioread32
	movl	%eax, %r14d
	movq	_KVASER_PCIEFD_IRQ_ALL_MSK@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_KVASER_PCIEFD_IRQ_SRB@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_kvaser_pciefd_receive_irq
LBB0_4:
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.5:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_11
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rcx
	movl	(%rcx,%rbx,4), %edi
	testl	%edi, %edi
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	btl	%ebx, %r14d
	jae	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	callq	_kvaser_pciefd_transmit_irq
	movl	(%r12), %eax
	jmp	LBB0_10
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_7:
	movq	24(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_11:
	movq	(%r15), %rsi
	addq	8(%r12), %rsi
	movl	%r14d, %edi
	callq	_iowrite32
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KVASER_PCIEFD_IRQ_REG,8,3      ## @KVASER_PCIEFD_IRQ_REG
	.comm	_KVASER_PCIEFD_IRQ_ALL_MSK,4,2  ## @KVASER_PCIEFD_IRQ_ALL_MSK
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_KVASER_PCIEFD_IRQ_SRB,4,2      ## @KVASER_PCIEFD_IRQ_SRB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IRQ mask points to unallocated controller\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_kvaser_pciefd_irq_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvaser_pciefd_irq_handler
_kvaser_pciefd_irq_handler:             ; @kvaser_pciefd_irq_handler
	.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	x19, x1
	ldr	x8, [x1, #8]
Lloh0:
	adrp	x21, _KVASER_PCIEFD_IRQ_REG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _KVASER_PCIEFD_IRQ_REG@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_ioread32
Lloh2:
	adrp	x8, _KVASER_PCIEFD_IRQ_ALL_MSK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _KVASER_PCIEFD_IRQ_ALL_MSK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_9
; %bb.1:
	mov	x20, x0
Lloh5:
	adrp	x8, _KVASER_PCIEFD_IRQ_SRB@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KVASER_PCIEFD_IRQ_SRB@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_kvaser_pciefd_receive_irq
LBB0_3:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.4:
	mov	x22, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #16]
	ldr	w0, [x9, x22, lsl #2]
	cbz	w0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	lsr	w9, w20, w22
	tbz	w9, #0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_kvaser_pciefd_transmit_irq
	ldr	w8, [x19]
	b	LBB0_5
LBB0_9:
Lloh8:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
	ldr	x0, [x19, #24]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_11:
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	x0, x20
	bl	_iowrite32
Lloh12:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
	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
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_KVASER_PCIEFD_IRQ_REG,8,3      ; @KVASER_PCIEFD_IRQ_REG
	.comm	_KVASER_PCIEFD_IRQ_ALL_MSK,4,2  ; @KVASER_PCIEFD_IRQ_ALL_MSK
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_KVASER_PCIEFD_IRQ_SRB,4,2      ; @KVASER_PCIEFD_IRQ_SRB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IRQ mask points to unallocated controller\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_kvaser_pciefd_irq_handler
.subsections_via_symbols
