	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function irq_alloc_range
_irq_alloc_range:                       ## @irq_alloc_range
	.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	%rdx, -56(%rbp)                 ## 8-byte Spill
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	cmpl	$0, (%rax)
	jle	LBB0_5
## %bb.1:
	movq	%rdi, %r12
	movl	$8, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rax), %r15
	movl	-8(%r15,%rbx), %esi
	movl	(%r15,%rbx), %edi
	xorl	%edx, %edx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%r8d, %r8d
	callq	_bitmap_find_next_zero_area
	cmpl	-8(%r15,%rbx), %eax
	jl	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movq	(%r12), %rax
	movslq	(%rax), %rcx
	addq	$12, %rbx
	cmpq	%rcx, %r14
	jl	LBB0_2
LBB0_5:
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_3:
	movl	%eax, %r13d
	movl	(%r15,%rbx), %edi
	movl	%eax, %esi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_bitmap_set
	addl	-4(%r15,%rbx), %r13d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, (%rax)
	leal	(%r14,%r13), %edx
	decl	%edx
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	callq	_pr_devel
	xorl	%eax, %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"guest: allocate IRQs %#x->%#x\n"

	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.no_dead_strip	_irq_alloc_range
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function irq_alloc_range
_irq_alloc_range:                       ; @irq_alloc_range
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x8, [x0]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x23, #0
	mov	x24, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8, #8]
	add	x25, x8, x23
	ldr	w0, [x25, #8]
	ldr	w1, [x25]
	mov	w2, #0
	mov	x3, x20
	mov	w4, #0
	bl	_bitmap_find_next_zero_area
	ldr	w8, [x25]
	cmp	w0, w8
	b.lt	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, #1
	ldr	x8, [x21]
	ldrsw	x9, [x8]
	add	x23, x23, #12
	cmp	x24, x9
	b.lt	LBB0_2
LBB0_4:
Lloh0:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	x22, x0
	ldr	w0, [x25, #8]
	mov	x1, x22
	mov	x2, x20
	bl	_bitmap_set
	ldr	w8, [x25, #4]
	add	w1, w8, w22
	add	w8, w20, w1
	str	w1, [x19]
	sub	w2, w8, #1
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_devel
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"guest: allocate IRQs %#x->%#x\n"

	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.no_dead_strip	_irq_alloc_range
.subsections_via_symbols
