	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_led
_do_led:                                ## @do_led
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movl	%edx, %ebx
	movl	%edi, %r15d
	xorl	%r13d, %r13d
	testl	%ecx, %ecx
	setne	%r14b
	movl	%esi, -56(%rbp)
	movq	_ENCIOC_GETELMSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_ioctl
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	movl	%r15d, %edi
	callq	_close
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_xo_err
LBB0_2:
	andl	$-2, %ebx
	cmpl	$128, %ebx
	jne	LBB0_8
## %bb.3:
	movb	%r14b, %r13b
	movq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ses_ctrl_common_set_select
	movq	%rbx, %rdi
	movl	%r13d, %esi
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.4:
	callq	_ses_ctrl_dev_slot_set_rqst_fault
	jmp	LBB0_6
LBB0_5:
	callq	_ses_ctrl_dev_slot_set_rqst_ident
LBB0_6:
	movq	_ENCIOC_SETELMSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	leaq	-56(%rbp), %rdx
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_ioctl
	testq	%rax, %rax
	jns	LBB0_8
## %bb.7:
	movl	%r15d, %edi
	callq	_close
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_xo_err
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENCIOC_GETELMSTAT,4,2          ## @ENCIOC_GETELMSTAT
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ENCIOC_GETELMSTAT"

	.comm	_ENCIOC_SETELMSTAT,4,2          ## @ENCIOC_SETELMSTAT
L_.str.1:                               ## @.str.1
	.asciz	"ENCIOC_SETELMSTAT"

	.no_dead_strip	_do_led
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_led
_do_led:                                ; @do_led
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x4
	mov	x22, x2
	mov	x19, x0
	cmp	w3, #0
	cset	w20, ne
	str	w1, [sp]
Lloh0:
	adrp	x8, _ENCIOC_GETELMSTAT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENCIOC_GETELMSTAT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, sp
	bl	_ioctl
	tbz	x0, #63, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_close
Lloh3:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_xo_err
LBB0_2:
	and	w8, w22, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_8
; %bb.3:
	ldr	x22, [sp, #8]
	mov	x0, x22
	mov	w1, #1
	bl	_ses_ctrl_common_set_select
	mov	x0, x22
	mov	x1, x20
	cbz	w21, LBB0_5
; %bb.4:
	bl	_ses_ctrl_dev_slot_set_rqst_fault
	b	LBB0_6
LBB0_5:
	bl	_ses_ctrl_dev_slot_set_rqst_ident
LBB0_6:
Lloh8:
	adrp	x8, _ENCIOC_SETELMSTAT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENCIOC_SETELMSTAT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	bl	_ioctl
	tbz	x0, #63, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_close
Lloh11:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_xo_err
LBB0_8:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ENCIOC_GETELMSTAT,4,2          ; @ENCIOC_GETELMSTAT
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ENCIOC_GETELMSTAT"

	.comm	_ENCIOC_SETELMSTAT,4,2          ; @ENCIOC_SETELMSTAT
l_.str.1:                               ; @.str.1
	.asciz	"ENCIOC_SETELMSTAT"

	.no_dead_strip	_do_led
.subsections_via_symbols
