	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpld_set_led_id
_cpld_set_led_id:                       ## @cpld_set_led_id
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	$0, -20(%rbp)
	movl	12(%rdi), %edi
	xorl	%ebx, %ebx
	testl	%edi, %edi
	je	LBB0_7
## %bb.1:
	movl	%esi, %edx
	cmpl	$128, %esi
	je	LBB0_5
## %bb.2:
	cmpl	$129, %edx
	jne	LBB0_6
## %bb.3:
	movl	8(%r14), %esi
	leaq	-20(%rbp), %rdx
	callq	_dsaf_read_syscon
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movl	-20(%rbp), %edi
	movq	_DSAF_LED_ANCHOR_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CPLD_LED_ON_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_dsaf_set_bit
	movl	8(%r14), %esi
	movl	12(%r14), %edi
	movl	-20(%rbp), %edx
	callq	_dsaf_write_syscon
	movl	-20(%rbp), %eax
	movl	%eax, 4(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_5:
	movl	4(%r14), %edi
	movq	_DSAF_LED_ANCHOR_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CPLD_LED_DEFAULT_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_dsaf_set_bit
	movl	12(%r14), %edi
	movl	4(%r14), %edx
	movl	8(%r14), %esi
	callq	_dsaf_write_syscon
	jmp	LBB0_7
LBB0_6:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSAF_LED_ANCHOR_B,4,2          ## @DSAF_LED_ANCHOR_B
	.comm	_CPLD_LED_ON_VALUE,4,2          ## @CPLD_LED_ON_VALUE
	.comm	_CPLD_LED_DEFAULT_VALUE,4,2     ## @CPLD_LED_DEFAULT_VALUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid led state: %d!"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_cpld_set_led_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpld_set_led_id
_cpld_set_led_id:                       ; @cpld_set_led_id
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	str	wzr, [sp, #12]
	ldr	w0, [x0, #12]
	cbz	w0, LBB0_7
; %bb.1:
	mov	x2, x1
	cmp	w1, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	w2, #129
	b.ne	LBB0_6
; %bb.3:
	ldr	w1, [x19, #8]
	add	x2, sp, #12
	bl	_dsaf_read_syscon
	cbnz	w0, LBB0_7
; %bb.4:
	ldr	w0, [sp, #12]
Lloh0:
	adrp	x8, _DSAF_LED_ANCHOR_B@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DSAF_LED_ANCHOR_B@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _CPLD_LED_ON_VALUE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CPLD_LED_ON_VALUE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_dsaf_set_bit
	ldp	w1, w0, [x19, #8]
	ldr	w2, [sp, #12]
	bl	_dsaf_write_syscon
	mov	w0, #0
	ldr	w8, [sp, #12]
	str	w8, [x19, #4]
	b	LBB0_7
LBB0_5:
	ldr	w0, [x19, #4]
Lloh6:
	adrp	x8, _DSAF_LED_ANCHOR_B@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DSAF_LED_ANCHOR_B@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _CPLD_LED_DEFAULT_VALUE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CPLD_LED_DEFAULT_VALUE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	bl	_dsaf_set_bit
	ldp	w1, w0, [x19, #8]
	ldr	w2, [x19, #4]
	bl	_dsaf_write_syscon
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	ldr	w0, [x19]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_DSAF_LED_ANCHOR_B,4,2          ; @DSAF_LED_ANCHOR_B
	.comm	_CPLD_LED_ON_VALUE,4,2          ; @CPLD_LED_ON_VALUE
	.comm	_CPLD_LED_DEFAULT_VALUE,4,2     ; @CPLD_LED_DEFAULT_VALUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid led state: %d!"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cpld_set_led_id
.subsections_via_symbols
