	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function domain_id_alloc
_domain_id_alloc:                       ## @domain_id_alloc
	.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	_pd_bitmap_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock
	movq	_amd_iommu_pd_alloc_bitmap@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_MAX_DOMAIN_ID@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_find_first_zero_bit
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_BUG_ON
	xorl	%r14d, %r14d
	testl	%ebx, %ebx
	jle	LBB0_3
## %bb.1:
	cmpl	(%r12), %ebx
	jge	LBB0_3
## %bb.2:
	movl	(%r15), %esi
	movl	%ebx, %edi
	callq	___set_bit
	movl	%ebx, %r14d
LBB0_3:
	movq	_pd_bitmap_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pd_bitmap_lock,4,2             ## @pd_bitmap_lock
	.comm	_amd_iommu_pd_alloc_bitmap,4,2  ## @amd_iommu_pd_alloc_bitmap
	.comm	_MAX_DOMAIN_ID,4,2              ## @MAX_DOMAIN_ID
	.no_dead_strip	_domain_id_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function domain_id_alloc
_domain_id_alloc:                       ; @domain_id_alloc
	.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
Lloh0:
	adrp	x0, _pd_bitmap_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _pd_bitmap_lock@GOTPAGEOFF]
	bl	_spin_lock
Lloh2:
	adrp	x20, _amd_iommu_pd_alloc_bitmap@GOTPAGE
Lloh3:
	ldr	x20, [x20, _amd_iommu_pd_alloc_bitmap@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh4:
	adrp	x21, _MAX_DOMAIN_ID@GOTPAGE
Lloh5:
	ldr	x21, [x21, _MAX_DOMAIN_ID@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_find_first_zero_bit
	mov	x19, x0
	cmp	w0, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	w8, [x21]
	cmp	w19, #1
	ccmp	w19, w8, #0, ge
	b.lt	LBB0_2
; %bb.1:
	mov	w19, #0
	b	LBB0_3
LBB0_2:
	ldr	w1, [x20]
	mov	x0, x19
	bl	___set_bit
LBB0_3:
Lloh6:
	adrp	x0, _pd_bitmap_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _pd_bitmap_lock@GOTPAGEOFF]
	bl	_spin_unlock
	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
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_pd_bitmap_lock,4,2             ; @pd_bitmap_lock
	.comm	_amd_iommu_pd_alloc_bitmap,4,2  ; @amd_iommu_pd_alloc_bitmap
	.comm	_MAX_DOMAIN_ID,4,2              ; @MAX_DOMAIN_ID
	.no_dead_strip	_domain_id_alloc
.subsections_via_symbols
