	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_enclosure_register             ## -- Begin function enclosure_register
	.p2align	4, 0x90
_enclosure_register:                    ## @enclosure_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
	movq	%rcx, %r12
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	_component@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_struct_size
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_kzalloc
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%r12, %r12
	sete	%dil
	callq	_BUG_ON
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.3:
	movl	%r14d, (%rbx)
	movq	%r13, %rdi
	movq	%r15, %r13
	leaq	8(%rbx), %r15
	movq	_enclosure_class@GOTPCREL(%rip), %rax
	movq	%rax, 16(%rbx)
	callq	_get_device
	movl	%eax, 8(%rbx)
	movq	%r12, 40(%rbx)
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movq	%r13, %rdx
	callq	_dev_set_name
	movq	%r15, %rdi
	callq	_device_register
	testl	%eax, %eax
	je	LBB0_4
## %bb.7:
	movl	%eax, %r15d
	movl	8(%rbx), %edi
	callq	_put_device
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r15d, %edi
	jmp	LBB0_2
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_4:
	testl	%r14d, %r14d
	jle	LBB0_6
## %bb.5:
	movq	32(%rbx), %rdi
	movl	%r14d, %eax
	shlq	$2, %rax
	leaq	(%rax,%rax,2), %rdx
	movl	$255, %esi
	callq	_memset
LBB0_6:
	movq	_container_list_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	addq	$24, %rdi
	movq	_container_list@GOTPCREL(%rip), %rsi
	callq	_list_add_tail
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_component,4,2                  ## @component
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_enclosure_class,4,2            ## @enclosure_class
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_container_list_lock,4,2        ## @container_list_lock
	.comm	_container_list,4,2             ## @container_list
	.comm	_edev,8,3                       ## @edev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_enclosure_register             ; -- Begin function enclosure_register
	.p2align	2
_enclosure_register:                    ; @enclosure_register
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
Lloh0:
	adrp	x8, _component@GOTPAGE
Lloh1:
	ldr	x8, [x8, _component@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_struct_size
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kzalloc
	mov	x19, x0
	cmp	x22, #0
	cset	w0, eq
	bl	_BUG_ON
	cbz	x19, LBB0_3
; %bb.1:
	str	w20, [x19]
Lloh6:
	adrp	x8, _enclosure_class@GOTPAGE
Lloh7:
	ldr	x8, [x8, _enclosure_class@GOTPAGEOFF]
	str	x8, [x19, #16]
	mov	x0, x23
	bl	_get_device
	mov	x23, x19
	str	w0, [x23, #8]!
	str	x22, [x23, #32]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x2, x21
	bl	_dev_set_name
	mov	x0, x23
	bl	_device_register
	cbz	w0, LBB0_5
; %bb.2:
	mov	x21, x0
	ldr	w0, [x19, #8]
	bl	_put_device
	mov	x0, x19
	bl	_kfree
	mov	x0, x21
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_5:
	cmp	w20, #1
	b.lt	LBB0_7
; %bb.6:
	ldr	x0, [x19, #32]
	mov	w8, #12
	umull	x2, w20, w8
	mov	w1, #255
	bl	_memset
LBB0_7:
Lloh13:
	adrp	x20, _container_list_lock@GOTPAGE
Lloh14:
	ldr	x20, [x20, _container_list_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_mutex_lock
	add	x0, x19, #24
Lloh15:
	adrp	x1, _container_list@GOTPAGE
Lloh16:
	ldr	x1, [x1, _container_list@GOTPAGEOFF]
	bl	_list_add_tail
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_component,4,2                  ; @component
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_enclosure_class,4,2            ; @enclosure_class
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_container_list_lock,4,2        ; @container_list_lock
	.comm	_container_list,4,2             ; @container_list
	.comm	_edev,8,3                       ; @edev
.subsections_via_symbols
