	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rb8366rb_set_port_led
_rb8366rb_set_port_led:                 ## @rb8366rb_set_port_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testl	%edx, %edx
	movl	$63, %eax
	cmovel	%edx, %eax
	cmpq	$0, 8(%rdi)
	je	LBB0_1
LBB0_15:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	cmpl	$4, %esi
	ja	LBB0_2
## %bb.3:
	movl	%edx, %ecx
	movl	%r14d, %edx
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%rdx,4), %rdx
	addq	%rsi, %rdx
	jmpq	*%rdx
LBB0_4:
	movl	4(%rbx), %edi
	movq	_RTL8366RB_LED_0_1_CTRL_REG@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_14
LBB0_7:
	movl	4(%rbx), %edi
	movq	_RTL8366RB_LED_0_1_CTRL_REG@GOTPCREL(%rip), %rsi
	movq	_RTL8366RB_LED_1_OFFSET@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_9:
	movl	4(%rbx), %edi
	movq	_RTL8366RB_LED_2_3_CTRL_REG@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %esi
	movl	$63, %edx
	movl	%eax, %ecx
	jmp	LBB0_12
LBB0_10:
	movl	4(%rbx), %edi
	movq	_RTL8366RB_LED_2_3_CTRL_REG@GOTPCREL(%rip), %rsi
	movq	_RTL8366RB_LED_3_OFFSET@GOTPCREL(%rip), %rcx
LBB0_8:
	movb	(%rcx), %cl
	movl	$63, %edx
	shll	%cl, %edx
	movl	(%rsi), %esi
	shll	%cl, %eax
	movl	%eax, %ecx
	jmp	LBB0_12
LBB0_11:
	testl	%ecx, %ecx
	movl	4(%rbx), %edi
	movq	_RTL8366RB_INTERRUPT_CONTROL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RTL8366RB_P4_RGMII_LED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmovnel	%edx, %ecx
LBB0_12:
	callq	_regmap_update_bits
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:
	leaq	L_.str.1(%rip), %rsi
LBB0_14:
	movl	(%rbx), %edi
	movl	%r14d, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_7
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_RTL8366RB_LED_0_1_CTRL_REG,4,2 ## @RTL8366RB_LED_0_1_CTRL_REG
	.comm	_RTL8366RB_LED_1_OFFSET,4,2     ## @RTL8366RB_LED_1_OFFSET
	.comm	_RTL8366RB_LED_2_3_CTRL_REG,4,2 ## @RTL8366RB_LED_2_3_CTRL_REG
	.comm	_RTL8366RB_LED_3_OFFSET,4,2     ## @RTL8366RB_LED_3_OFFSET
	.comm	_RTL8366RB_INTERRUPT_CONTROL_REG,4,2 ## @RTL8366RB_INTERRUPT_CONTROL_REG
	.comm	_RTL8366RB_P4_RGMII_LED,4,2     ## @RTL8366RB_P4_RGMII_LED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no LED for port %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"error updating LED on port %d\n"

	.no_dead_strip	_rb8366rb_set_port_led
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rb8366rb_set_port_led
_rb8366rb_set_port_led:                 ; @rb8366rb_set_port_led
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	w8, #63
	cmp	w2, #0
	csel	w3, wzr, w8, eq
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	cmp	w1, #4
	b.hi	LBB0_5
; %bb.3:
	mov	w8, w19
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_4
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_4:
	ldr	w0, [x20, #4]
Lloh2:
	adrp	x8, _RTL8366RB_LED_0_1_CTRL_REG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RTL8366RB_LED_0_1_CTRL_REG@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_13
LBB0_6:
	ldr	w0, [x20, #4]
Lloh6:
	adrp	x8, _RTL8366RB_LED_0_1_CTRL_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RTL8366RB_LED_0_1_CTRL_REG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _RTL8366RB_LED_1_OFFSET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RTL8366RB_LED_1_OFFSET@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
	ldr	w0, [x20, #4]
Lloh11:
	adrp	x8, _RTL8366RB_LED_2_3_CTRL_REG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RTL8366RB_LED_2_3_CTRL_REG@GOTPAGEOFF]
LBB0_8:
	ldr	w1, [x8]
	mov	w2, #63
	bl	_regmap_update_bits
	cbnz	w0, LBB0_12
	b	LBB0_1
LBB0_9:
	ldr	w0, [x20, #4]
Lloh13:
	adrp	x8, _RTL8366RB_LED_2_3_CTRL_REG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _RTL8366RB_LED_2_3_CTRL_REG@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _RTL8366RB_LED_3_OFFSET@GOTPAGE
Lloh17:
	ldr	x8, [x8, _RTL8366RB_LED_3_OFFSET@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	mov	w9, #63
	lsl	w2, w9, w8
	lsl	w3, w3, w8
	bl	_regmap_update_bits
	cbnz	w0, LBB0_12
	b	LBB0_1
LBB0_11:
	ldr	w0, [x20, #4]
Lloh18:
	adrp	x8, _RTL8366RB_INTERRUPT_CONTROL_REG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RTL8366RB_INTERRUPT_CONTROL_REG@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _RTL8366RB_P4_RGMII_LED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RTL8366RB_P4_RGMII_LED@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w2, #0
	csel	w3, wzr, w8, eq
	mov	x2, x8
	bl	_regmap_update_bits
	cbz	w0, LBB0_1
LBB0_12:
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_13:
	ldr	w0, [x20]
	mov	x2, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dev_err
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_6-LBB0_4)>>2
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_9-LBB0_4)>>2
	.byte	(LBB0_11-LBB0_4)>>2
                                        ; -- End function
	.comm	_RTL8366RB_LED_0_1_CTRL_REG,4,2 ; @RTL8366RB_LED_0_1_CTRL_REG
	.comm	_RTL8366RB_LED_1_OFFSET,4,2     ; @RTL8366RB_LED_1_OFFSET
	.comm	_RTL8366RB_LED_2_3_CTRL_REG,4,2 ; @RTL8366RB_LED_2_3_CTRL_REG
	.comm	_RTL8366RB_LED_3_OFFSET,4,2     ; @RTL8366RB_LED_3_OFFSET
	.comm	_RTL8366RB_INTERRUPT_CONTROL_REG,4,2 ; @RTL8366RB_INTERRUPT_CONTROL_REG
	.comm	_RTL8366RB_P4_RGMII_LED,4,2     ; @RTL8366RB_P4_RGMII_LED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no LED for port %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"error updating LED on port %d\n"

	.no_dead_strip	_rb8366rb_set_port_led
.subsections_via_symbols
