	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_ut_allocate_owner_id      ## -- Begin function acpi_ut_allocate_owner_id
	.p2align	4, 0x90
_acpi_ut_allocate_owner_id:             ## @acpi_ut_allocate_owner_id
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_ut_allocate_owner_id@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ACPI_FUNCTION_TRACE
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ACPI_ERROR
	movq	_AE_ALREADY_EXISTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_return_ACPI_STATUS
LBB0_2:
	movq	_ACPI_MTX_CACHES@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_acpi_ut_acquire_mutex
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	%r15d, %edi
	callq	_return_ACPI_STATUS
LBB0_4:
	movq	_ACPI_NUM_OWNERID_MASKS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	js	LBB0_12
## %bb.5:
	movq	_acpi_gbl_next_owner_id_offset@GOTPCREL(%rip), %r9
	movq	(%r9), %rbx
	movq	_acpi_gbl_last_owner_id_index@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_acpi_gbl_owner_id_mask@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_ACPI_UINT32_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r11d
	xorl	%r10d, %r10d
	xorl	%eax, %eax
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	$0, (%r9)
	leaq	1(%rax), %rcx
	incq	%rdi
	movl	$0, %ebx
	cmpq	%rdx, %rax
	movq	%rcx, %rax
	je	LBB0_12
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	cmpq	%rdx, %rdi
	cmovgeq	%r10, %rdi
	cmpq	$31, %rbx
	jg	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r13,%rdi,4), %esi
	cmpl	%r11d, %esi
	je	LBB0_11
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	$1, %r8d
	movl	%ebx, %ecx
	shll	%cl, %r8d
	btl	%ebx, %esi
	jae	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=2
	incq	%rbx
	cmpq	$32, %rbx
	jne	LBB0_8
	jmp	LBB0_11
LBB0_9:
	orl	%r8d, %esi
	movl	%esi, (%r13,%rdi,4)
	movq	_acpi_gbl_last_owner_id_index@GOTPCREL(%rip), %rax
	movq	%rdi, (%rax)
	leaq	1(%rbx), %rax
	movq	%rax, (%r9)
	callq	_ACPI_MUL_32
	leaq	(%rax,%rbx), %rdi
	incq	%rdi
	movq	%rdi, (%r14)
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ACPI_DEBUG_PRINT
	jmp	LBB0_13
LBB0_12:
	movq	_AE_OWNER_ID_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	L_.str.2(%rip), %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ACPI_ERROR
LBB0_13:
	movl	(%r12), %edi
	callq	_acpi_ut_release_mutex
	movl	%r15d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_return_ACPI_STATUS             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ut_allocate_owner_id,4,2       ## @ut_allocate_owner_id
	.comm	_AE_INFO,4,2                    ## @AE_INFO
	.comm	_AE_ALREADY_EXISTS,4,2          ## @AE_ALREADY_EXISTS
	.comm	_ACPI_MTX_CACHES,4,2            ## @ACPI_MTX_CACHES
	.comm	_acpi_gbl_last_owner_id_index,8,3 ## @acpi_gbl_last_owner_id_index
	.comm	_ACPI_NUM_OWNERID_MASKS,8,3     ## @ACPI_NUM_OWNERID_MASKS
	.comm	_acpi_gbl_next_owner_id_offset,8,3 ## @acpi_gbl_next_owner_id_offset
	.comm	_acpi_gbl_owner_id_mask,8,3     ## @acpi_gbl_owner_id_mask
	.comm	_ACPI_UINT32_MAX,4,2            ## @ACPI_UINT32_MAX
	.comm	_ACPI_DB_VALUES,4,2             ## @ACPI_DB_VALUES
	.comm	_AE_OWNER_ID_LIMIT,4,2          ## @AE_OWNER_ID_LIMIT
	.section	__TEXT,__cstring,cstring_literals
L_.str.2:                               ## @.str.2
	.asciz	"Could not allocate new OwnerId (255 max), AE_OWNER_ID_LIMIT"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_ut_allocate_owner_id      ; -- Begin function acpi_ut_allocate_owner_id
	.p2align	2
_acpi_ut_allocate_owner_id:             ; @acpi_ut_allocate_owner_id
	.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, x0
Lloh0:
	adrp	x8, _ut_allocate_owner_id@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ut_allocate_owner_id@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ACPI_FUNCTION_TRACE
	ldr	x0, [x19]
	cbz	x0, LBB0_2
; %bb.1:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ACPI_ERROR
Lloh3:
	adrp	x8, _AE_ALREADY_EXISTS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AE_ALREADY_EXISTS@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_return_ACPI_STATUS
LBB0_2:
Lloh6:
	adrp	x21, _ACPI_MTX_CACHES@GOTPAGE
Lloh7:
	ldr	x21, [x21, _ACPI_MTX_CACHES@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_acpi_ut_acquire_mutex
	mov	x20, x0
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_return_ACPI_STATUS
LBB0_4:
Lloh8:
	adrp	x8, _ACPI_NUM_OWNERID_MASKS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ACPI_NUM_OWNERID_MASKS@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x8]
	tbnz	x9, #63, LBB0_12
; %bb.5:
	mov	x11, #0
Lloh11:
	adrp	x8, _acpi_gbl_next_owner_id_offset@GOTPAGE
Lloh12:
	ldr	x8, [x8, _acpi_gbl_next_owner_id_offset@GOTPAGEOFF]
	ldr	x22, [x8]
Lloh13:
	adrp	x10, _acpi_gbl_last_owner_id_index@GOTPAGE
Lloh14:
	ldr	x10, [x10, _acpi_gbl_last_owner_id_index@GOTPAGEOFF]
Lloh15:
	adrp	x12, _acpi_gbl_owner_id_mask@GOTPAGE
Lloh16:
	ldr	x12, [x12, _acpi_gbl_owner_id_mask@GOTPAGEOFF]
	ldr	x15, [x10]
Lloh17:
	ldr	x12, [x12]
Lloh18:
	adrp	x13, _ACPI_UINT32_MAX@GOTPAGE
Lloh19:
	ldr	x13, [x13, _ACPI_UINT32_MAX@GOTPAGEOFF]
Lloh20:
	ldr	w13, [x13]
	mov	w14, #1
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x22, #0
	str	xzr, [x8]
	add	x16, x11, #1
	add	x15, x0, #1
	cmp	x11, x9
	mov	x11, x16
	b.eq	LBB0_12
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	cmp	x15, x9
	csel	x0, x15, xzr, lt
	cmp	x22, #31
	b.gt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w15, [x12, x0, lsl #2]
	cmp	w15, w13
	b.eq	LBB0_6
LBB0_9:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	w16, w14, w22
	tst	w15, w16
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	add	x22, x22, #1
	cmp	x22, #32
	b.ne	LBB0_9
	b	LBB0_6
LBB0_11:
	orr	w9, w15, w16
	str	w9, [x12, x0, lsl #2]
	str	x0, [x10]
	add	x9, x22, #1
	str	x9, [x8]
	bl	_ACPI_MUL_32
	add	x8, x0, x22
	add	x0, x8, #1
	str	x0, [x19]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ACPI_DEBUG_PRINT
	b	LBB0_13
LBB0_12:
Lloh21:
	adrp	x8, _AE_OWNER_ID_LIMIT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AE_OWNER_ID_LIMIT@GOTPAGEOFF]
Lloh23:
	ldr	w20, [x8]
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ACPI_ERROR
LBB0_13:
	ldr	w0, [x21]
	bl	_acpi_ut_release_mutex
	mov	x0, x20
	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	_return_ACPI_STATUS
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ut_allocate_owner_id,4,2       ; @ut_allocate_owner_id
	.comm	_AE_INFO,4,2                    ; @AE_INFO
	.comm	_AE_ALREADY_EXISTS,4,2          ; @AE_ALREADY_EXISTS
	.comm	_ACPI_MTX_CACHES,4,2            ; @ACPI_MTX_CACHES
	.comm	_acpi_gbl_last_owner_id_index,8,3 ; @acpi_gbl_last_owner_id_index
	.comm	_ACPI_NUM_OWNERID_MASKS,8,3     ; @ACPI_NUM_OWNERID_MASKS
	.comm	_acpi_gbl_next_owner_id_offset,8,3 ; @acpi_gbl_next_owner_id_offset
	.comm	_acpi_gbl_owner_id_mask,8,3     ; @acpi_gbl_owner_id_mask
	.comm	_ACPI_UINT32_MAX,4,2            ; @ACPI_UINT32_MAX
	.comm	_ACPI_DB_VALUES,4,2             ; @ACPI_DB_VALUES
	.comm	_AE_OWNER_ID_LIMIT,4,2          ; @AE_OWNER_ID_LIMIT
	.section	__TEXT,__cstring,cstring_literals
l_.str.2:                               ; @.str.2
	.asciz	"Could not allocate new OwnerId (255 max), AE_OWNER_ID_LIMIT"

.subsections_via_symbols
