	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_component_power_status
_get_component_power_status:            ## @get_component_power_status
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_to_enclosure_device
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_to_enclosure_component
	movq	%rax, %rbx
	movq	(%r15), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	*%rax
LBB0_2:
	movl	(%rbx), %eax
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.7:
	testl	%eax, %eax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	$40, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_snprintf                       ## TAILCALL
LBB0_3:
	movq	(%r15), %rax
	cmpq	$0, (%rax)
	jne	LBB0_4
## %bb.5:
	movq	_ENOTTY@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENOTTY,4,2                     ## @ENOTTY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s\n"

L_.str.1:                               ## @.str.1
	.asciz	"on"

L_.str.2:                               ## @.str.2
	.asciz	"off"

	.no_dead_strip	_get_component_power_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_component_power_status
_get_component_power_status:            ; @get_component_power_status
	.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, x2
	mov	x21, x0
	ldr	w0, [x0]
	bl	_to_enclosure_device
	mov	x20, x0
	mov	x0, x21
	bl	_to_enclosure_component
	mov	x21, x0
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x21
	blr	x8
LBB0_2:
	ldr	w8, [x21]
	cmn	w8, #1
	b.eq	LBB0_4
; %bb.3:
Lloh0:
	adrp	x9, l_.str.1@PAGE
Lloh1:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh2:
	adrp	x10, l_.str.2@PAGE
Lloh3:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w8, #0
	csel	x3, x10, x9, eq
Lloh4:
	adrp	x2, l_.str@PAGE
Lloh5:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #40
	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	_snprintf
LBB0_4:
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _EIO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
Lloh8:
	adrp	x10, _ENOTTY@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ENOTTY@GOTPAGEOFF]
	ldr	x8, [x8]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	neg	w0, w8
	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 AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENOTTY,4,2                     ; @ENOTTY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s\n"

l_.str.1:                               ; @.str.1
	.asciz	"on"

l_.str.2:                               ; @.str.2
	.asciz	"off"

	.no_dead_strip	_get_component_power_status
.subsections_via_symbols
