	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_element_status
_get_element_status:                    ## @get_element_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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movl	%edi, %r12d
	movl	$1, %edi
	movl	$4, %esi
	callq	_calloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_errx
LBB0_2:
	leaq	-72(%rbp), %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	%r12d, %eax
	movq	%rax, -40(%rbp)
	movl	%r15d, %eax
	movq	%rax, -48(%rbp)
	movl	$1, -72(%rbp)
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	movq	_CESR_VOLTAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -56(%rbp)
LBB0_4:
	movq	%rbx, -64(%rbp)
	movq	_changer_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CHIOGSTATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-72(%rbp), %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_free
	movq	_changer_name@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_6:
	movq	%rbx, %rax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't allocate status storage"

	.comm	_CESR_VOLTAGS,4,2               ## @CESR_VOLTAGS
	.comm	_changer_fd,4,2                 ## @changer_fd
	.comm	_CHIOGSTATUS,4,2                ## @CHIOGSTATUS
L_.str.1:                               ## @.str.1
	.asciz	"%s: CHIOGSTATUS"

	.comm	_changer_name,4,2               ## @changer_name
	.no_dead_strip	_get_element_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_element_status
_get_element_status:                    ; @get_element_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	w23, #1
	mov	w0, #1
	mov	w1, #4
	bl	_calloc
	mov	x19, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_2:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	mov	w8, w22
	mov	w9, w21
	stp	x9, x8, [sp, #32]
	str	w23, [sp, #8]
	cbz	w20, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _CESR_VOLTAGS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CESR_VOLTAGS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [sp, #24]
	orr	w8, w9, w8
	str	w8, [sp, #24]
LBB0_4:
	str	x19, [sp, #16]
Lloh5:
	adrp	x8, _changer_fd@GOTPAGE
Lloh6:
	ldr	x8, [x8, _changer_fd@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _CHIOGSTATUS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CHIOGSTATUS@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_free
Lloh11:
	adrp	x8, _changer_name@GOTPAGE
Lloh12:
	ldr	x8, [x8, _changer_name@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't allocate status storage"

	.comm	_CESR_VOLTAGS,4,2               ; @CESR_VOLTAGS
	.comm	_changer_fd,4,2                 ; @changer_fd
	.comm	_CHIOGSTATUS,4,2                ; @CHIOGSTATUS
l_.str.1:                               ; @.str.1
	.asciz	"%s: CHIOGSTATUS"

	.comm	_changer_name,4,2               ; @changer_name
	.no_dead_strip	_get_element_status
.subsections_via_symbols
