	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_enclosure_component_register   ## -- Begin function enclosure_component_register
	.p2align	4, 0x90
_enclosure_component_register:          ## @enclosure_component_register
	.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
	cmpl	%esi, (%rdi)
	jbe	LBB0_1
## %bb.2:
	movl	%esi, %ebx
	movq	8(%rdi), %r13
	movl	%esi, %eax
	leaq	(%rax,%rax,4), %r14
	cmpl	$-1, (%r13,%r14,4)
	je	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_3:
	movq	%rcx, %r12
	leaq	(,%r14,4), %rax
	addq	%r13, %rax
	movl	%edx, 4(%r13,%r14,4)
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, (%rax)
	leaq	8(,%r14,4), %r15
	addq	%r13, %r15
	addq	$4, %rdi
	callq	_get_device
	movl	%eax, 16(%r13,%r14,4)
	testq	%r12, %r12
	je	LBB0_6
## %bb.4:
	cmpb	$0, (%r12)
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_dev_set_name
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_set_name
LBB0_7:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	_enclosure_component_release@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r13,%r14,4)
	movq	_enclosure_groups@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%r15, %rdi
	callq	_device_register
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	movl	%eax, %ebx
	movl	$-1, (%r12)
	movq	%r15, %rdi
	callq	_put_device
	jmp	LBB0_9
LBB0_10:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

L_.str.1:                               ## @.str.1
	.asciz	"%u"

	.comm	_enclosure_component_release,4,2 ## @enclosure_component_release
	.comm	_enclosure_groups,4,2           ## @enclosure_groups
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_enclosure_component_register   ; -- Begin function enclosure_component_register
	.p2align	2
_enclosure_component_register:          ; @enclosure_component_register
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	ldr	w8, [x0]
	cmp	w8, w1
	b.ls	LBB0_2
; %bb.1:
	mov	x22, x1
	ldr	x23, [x0, #8]
	mov	w8, #20
	umaddl	x19, w1, w8, x23
	ldr	w8, [x19]
	cmn	w8, #1
	b.eq	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_3:
	mov	x0, x21
	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
	add	sp, sp, #96
	b	_ERR_PTR
LBB0_4:
	mov	x21, x3
	mov	w24, w22
	mov	w8, #20
	madd	x25, x24, x8, x23
	str	w2, [x25, #4]
	str	w22, [x19]
	add	x20, x25, #8
	add	x0, x0, #4
	bl	_get_device
	str	w0, [x25, #16]
	cbz	x21, LBB0_7
; %bb.5:
	ldrb	w8, [x21]
	cbz	w8, LBB0_7
; %bb.6:
	str	x21, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
	str	x22, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_8:
	mov	x0, x20
	bl	_dev_set_name
Lloh7:
	adrp	x8, _enclosure_component_release@GOTPAGE
Lloh8:
	ldr	x8, [x8, _enclosure_component_release@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	mov	w9, #20
	madd	x9, x24, x9, x23
	str	w8, [x9, #12]
Lloh10:
	adrp	x8, _enclosure_groups@GOTPAGE
Lloh11:
	ldr	x8, [x8, _enclosure_groups@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x20]
	mov	x0, x20
	bl	_device_register
	cbz	w0, LBB0_10
; %bb.9:
	mov	x21, x0
	mov	w8, #-1
	str	w8, [x19]
	mov	x0, x20
	bl	_put_device
	b	LBB0_3
LBB0_10:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

l_.str.1:                               ; @.str.1
	.asciz	"%u"

	.comm	_enclosure_component_release,4,2 ; @enclosure_component_release
	.comm	_enclosure_groups,4,2           ; @enclosure_groups
.subsections_via_symbols
