	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbus_find_intrmap
_sbus_find_intrmap:                     ## @sbus_find_intrmap
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movl	%esi, %ecx
	movq	%rdi, %r13
	movq	_SBUS_MAX_INO@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jge	LBB0_2
## %bb.1:
	movl	4(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ecx, %edx
	callq	_device_printf
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_INTMAP_OBIO_MASK@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_3
## %bb.8:
	movq	_SBR_SCSI_INT_MAP@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_SBR_RESERVED_INT_MAP@GOTPCREL(%rip), %rsi
	xorl	%eax, %eax
	cmpq	(%rsi), %r15
	jg	LBB0_14
## %bb.9:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	leaq	(%r15,%r12), %rbx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_SYSIO_READ8
	movl	%eax, %edi
	callq	_INTVEC
	movq	%rax, %r14
	movl	(%r13), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_INTMAP_VEC
	cmpq	%rax, %r14
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	leaq	(%r15,%r12), %rax
	addq	$8, %rax
	addq	$8, %r12
	movq	_SBR_RESERVED_INT_MAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_10
	jmp	LBB0_13
LBB0_3:
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	_SBR_SLOT0_INT_MAP@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movl	%ecx, %edi
	movl	%ecx, %r13d
	callq	_INTSLOT
	shll	$3, %eax
	movslq	%eax, %rbx
	addq	%r14, %rbx
	movq	_SBR_SLOT0_INT_CLR@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movl	%r13d, %edi
	callq	_INTSLOT
	shll	$6, %eax
	movslq	%eax, %r15
	addq	%r14, %r15
	movl	%r13d, %edi
	callq	_INTPRI
	shll	$3, %eax
	movslq	%eax, %rcx
	addq	%r15, %rcx
	jmp	LBB0_4
LBB0_12:
	movq	_SBR_SCSI_INT_CLR@GOTPCREL(%rip), %rax
	movl	%r12d, %ecx
	addq	(%rax), %rcx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_13
LBB0_4:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rbx, (%rax)
LBB0_6:
	movl	$1, %eax
	testq	%r12, %r12
	je	LBB0_14
## %bb.7:
	movq	%rcx, (%r12)
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_SBUS_MAX_INO,4,2               ## @SBUS_MAX_INO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of range INO %d requested\n"

	.comm	_INTMAP_OBIO_MASK,4,2           ## @INTMAP_OBIO_MASK
	.comm	_SBR_SLOT0_INT_MAP,8,3          ## @SBR_SLOT0_INT_MAP
	.comm	_SBR_SLOT0_INT_CLR,8,3          ## @SBR_SLOT0_INT_CLR
	.comm	_SBR_SCSI_INT_MAP,8,3           ## @SBR_SCSI_INT_MAP
	.comm	_SBR_RESERVED_INT_MAP,8,3       ## @SBR_RESERVED_INT_MAP
	.comm	_SBR_SCSI_INT_CLR,8,3           ## @SBR_SCSI_INT_CLR
	.no_dead_strip	_sbus_find_intrmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbus_find_intrmap
_sbus_find_intrmap:                     ; @sbus_find_intrmap
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x23, x0
Lloh0:
	adrp	x8, _SBUS_MAX_INO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SBUS_MAX_INO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ge	LBB0_2
; %bb.1:
	ldr	w0, [x23, #4]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_device_printf
	b	LBB0_14
LBB0_2:
	mov	x19, x3
	mov	x20, x2
Lloh5:
	adrp	x8, _INTMAP_OBIO_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _INTMAP_OBIO_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_7
; %bb.3:
Lloh8:
	adrp	x8, _SBR_SCSI_INT_MAP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SBR_SCSI_INT_MAP@GOTPAGEOFF]
Lloh10:
	ldr	x25, [x8]
Lloh11:
	adrp	x26, _SBR_RESERVED_INT_MAP@GOTPAGE
Lloh12:
	ldr	x26, [x26, _SBR_RESERVED_INT_MAP@GOTPAGEOFF]
	ldr	x8, [x26]
	cmp	x25, x8
	b.gt	LBB0_14
; %bb.4:
	mov	x27, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x22, x25, x27
	mov	x0, x23
	mov	x1, x22
	bl	_SYSIO_READ8
	bl	_INTVEC
	mov	x24, x0
	ldr	w0, [x23]
	mov	x1, x21
	bl	_INTMAP_VEC
	cmp	x24, x0
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x26]
	add	x27, x27, #8
	add	x9, x25, x27
	cmp	x9, x8
	b.le	LBB0_5
	b	LBB0_14
LBB0_7:
Lloh13:
	adrp	x8, _SBR_SLOT0_INT_MAP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SBR_SLOT0_INT_MAP@GOTPAGEOFF]
Lloh15:
	ldr	x22, [x8]
	mov	x0, x21
	bl	_INTSLOT
	lsl	w8, w0, #3
	add	x22, x22, w8, sxtw
Lloh16:
	adrp	x8, _SBR_SLOT0_INT_CLR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SBR_SLOT0_INT_CLR@GOTPAGEOFF]
Lloh18:
	ldr	x23, [x8]
	mov	x0, x21
	bl	_INTSLOT
	lsl	w8, w0, #6
	add	x23, x23, w8, sxtw
	mov	x0, x21
	bl	_INTPRI
	lsl	w8, w0, #3
	add	x8, x23, w8, sxtw
	b	LBB0_9
LBB0_8:
Lloh19:
	adrp	x8, _SBR_SCSI_INT_CLR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SBR_SCSI_INT_CLR@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	adds	x8, x8, w27, uxtw
	b.eq	LBB0_14
LBB0_9:
	cbz	x20, LBB0_11
; %bb.10:
	str	x22, [x20]
LBB0_11:
	cbz	x19, LBB0_13
; %bb.12:
	str	x8, [x19]
LBB0_13:
	mov	w0, #1
	b	LBB0_15
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_SBUS_MAX_INO,4,2               ; @SBUS_MAX_INO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of range INO %d requested\n"

	.comm	_INTMAP_OBIO_MASK,4,2           ; @INTMAP_OBIO_MASK
	.comm	_SBR_SLOT0_INT_MAP,8,3          ; @SBR_SLOT0_INT_MAP
	.comm	_SBR_SLOT0_INT_CLR,8,3          ; @SBR_SLOT0_INT_CLR
	.comm	_SBR_SCSI_INT_MAP,8,3           ; @SBR_SCSI_INT_MAP
	.comm	_SBR_RESERVED_INT_MAP,8,3       ; @SBR_RESERVED_INT_MAP
	.comm	_SBR_SCSI_INT_CLR,8,3           ; @SBR_SCSI_INT_CLR
	.no_dead_strip	_sbus_find_intrmap
.subsections_via_symbols
