	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxreg_led_config
_mlxreg_led_config:                     ## @mlxreg_led_config
	.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
	movq	8(%rdi), %r13
	cmpl	$0, (%r13)
	jle	LBB0_19
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%r13), %r15
	xorl	%eax, %eax
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	28(%r14), %edi
	movq	8(%r15), %rdx
	movl	20(%r15), %ecx
	movl	16(%r15), %r8d
	leaq	L_.str.6(%rip), %rsi
	callq	_dev_info
	movq	-56(%rbp), %r13                 ## 8-byte Reload
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	addq	$32, %r15
	cmpl	(%r13), %eax
	jge	LBB0_19
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%rbx), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$64, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r14
	movq	24(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%r13), %edi
	leaq	-48(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %eax
	testl	%eax, -48(%rbp)
	je	LBB0_18
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_MLXREG_LED_CAPABILITY_CLEAR@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, (%r15)
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %r13
	addq	$24, %r13
	movq	%rbx, %r12
	movq	%rbx, 16(%r14)
	movq	8(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strstr
	movq	_MLXREG_LED_RED_SOLID@GOTPCREL(%rip), %rcx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_strstr
	movq	_MLXREG_LED_RED_SOLID@GOTPCREL(%rip), %rcx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_strstr
	movq	_MLXREG_LED_AMBER_SOLID@GOTPCREL(%rip), %rcx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_MLXREG_LED_GREEN_SOLID@GOTPCREL(%rip), %rcx
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_LED_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%rcx), %eax
	movl	%eax, 12(%r14)
	movl	8(%r14), %edi
	movq	8(%r15), %rcx
	leaq	L_.str.4(%rip), %rsi
	leaq	L_.str.5(%rip), %rdx
	callq	_sprintf
	movl	8(%r14), %eax
	movl	%eax, 60(%r14)
	movl	%ebx, 24(%r14)
	movq	_LED_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r14)
	movq	_mlxreg_led_brightness_set@GOTPCREL(%rip), %rax
	movq	%rax, 48(%r14)
	movq	_mlxreg_led_brightness_get@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r14)
	movq	_mlxreg_led_blink_set@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r14)
	movq	_LED_CORE_SUSPENDRESUME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	movq	%r15, (%r14)
	movq	%r12, %rbx
	movq	(%r12), %rdi
	movq	%r13, %rsi
	callq	_devm_led_classdev_register
	testl	%eax, %eax
	jne	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %esi
	testl	%esi, %esi
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_mlxreg_led_brightness_set
	jmp	LBB0_17
LBB0_19:
	xorl	%r12d, %r12d
	jmp	LBB0_20
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_20
LBB0_14:
	movl	%eax, %r12d
	jmp	LBB0_20
LBB0_6:
	movl	%eax, %r12d
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_20:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to query capability register\n"

	.comm	_MLXREG_LED_CAPABILITY_CLEAR,4,2 ## @MLXREG_LED_CAPABILITY_CLEAR
L_.str.1:                               ## @.str.1
	.asciz	"red"

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

	.comm	_LED_OFF,4,2                    ## @LED_OFF
	.comm	_MLXREG_LED_RED_SOLID,4,2       ## @MLXREG_LED_RED_SOLID
L_.str.3:                               ## @.str.3
	.asciz	"amber"

	.comm	_MLXREG_LED_AMBER_SOLID,4,2     ## @MLXREG_LED_AMBER_SOLID
	.comm	_MLXREG_LED_GREEN_SOLID,4,2     ## @MLXREG_LED_GREEN_SOLID
L_.str.4:                               ## @.str.4
	.asciz	"%s:%s"

L_.str.5:                               ## @.str.5
	.asciz	"mlxreg"

	.comm	_LED_ON,4,2                     ## @LED_ON
	.comm	_mlxreg_led_brightness_get,4,2  ## @mlxreg_led_brightness_get
	.comm	_mlxreg_led_blink_set,4,2       ## @mlxreg_led_blink_set
	.comm	_LED_CORE_SUSPENDRESUME,4,2     ## @LED_CORE_SUSPENDRESUME
L_.str.6:                               ## @.str.6
	.asciz	"label: %s, mask: 0x%02x, offset:0x%02x\n"

	.no_dead_strip	_mlxreg_led_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxreg_led_config
_mlxreg_led_config:                     ; @mlxreg_led_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x22, [x0, #8]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x19, x0
	mov	w21, #0
	ldr	x20, [x22, #8]
Lloh0:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	adrp	x23, _MLXREG_LED_RED_SOLID@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MLXREG_LED_RED_SOLID@GOTPAGEOFF]
Lloh4:
	adrp	x24, l_.str.5@PAGE
Lloh5:
	add	x24, x24, l_.str.5@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x26, #28]
	ldr	x2, [x20, #8]
	ldp	w4, w3, [x20, #16]
Lloh6:
	adrp	x1, l_.str.6@PAGE
Lloh7:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_info
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w21, w21, #1
	add	x20, x20, #32
	ldr	w8, [x22]
	cmp	w21, w8
	b.ge	LBB0_15
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	ldr	w2, [x25]
	mov	w1, #64
	bl	_devm_kzalloc
	cbz	x0, LBB0_16
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x26, x0
	ldr	x1, [x20, #24]
	cbz	x1, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x22, #4]
	add	x2, sp, #12
	bl	_regmap_read
	cbnz	w0, LBB0_18
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [sp, #12]
	ldr	w8, [x20]
	tst	w8, w9
	b.eq	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh8:
	adrp	x9, _MLXREG_LED_CAPABILITY_CLEAR@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MLXREG_LED_CAPABILITY_CLEAR@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	and	w8, w9, w8
	str	w8, [x20]
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	x19, [x26, #16]
	ldr	x0, [x20, #8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strstr
	mov	x8, x23
	cbnz	x0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x20, #8]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strstr
	mov	x8, x23
	cbnz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x20, #8]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strstr
	cmp	x0, #0
Lloh17:
	adrp	x8, _MLXREG_LED_AMBER_SOLID@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MLXREG_LED_AMBER_SOLID@GOTPAGEOFF]
Lloh19:
	adrp	x9, _MLXREG_LED_GREEN_SOLID@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MLXREG_LED_GREEN_SOLID@GOTPAGEOFF]
	csel	x8, x9, x8, eq
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x27, x26, #24
Lloh21:
	adrp	x9, _LED_OFF@GOTPAGE
Lloh22:
	ldr	x9, [x9, _LED_OFF@GOTPAGEOFF]
Lloh23:
	ldr	w28, [x9]
	ldr	w8, [x8]
	str	w8, [x26, #12]
	ldr	w0, [x26, #8]
	ldr	x3, [x20, #8]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, x24
	bl	_sprintf
	ldr	w8, [x26, #8]
	str	w28, [x26, #24]
Lloh26:
	adrp	x9, _LED_ON@GOTPAGE
Lloh27:
	ldr	x9, [x9, _LED_ON@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	stp	w9, w8, [x26, #56]
Lloh29:
	adrp	x8, _mlxreg_led_brightness_set@GOTPAGE
Lloh30:
	ldr	x8, [x8, _mlxreg_led_brightness_set@GOTPAGEOFF]
	str	x8, [x26, #48]
Lloh31:
	adrp	x8, _mlxreg_led_brightness_get@GOTPAGE
Lloh32:
	ldr	x8, [x8, _mlxreg_led_brightness_get@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	str	w8, [x26, #40]
Lloh34:
	adrp	x8, _mlxreg_led_blink_set@GOTPAGE
Lloh35:
	ldr	x8, [x8, _mlxreg_led_blink_set@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
Lloh37:
	adrp	x9, _LED_CORE_SUSPENDRESUME@GOTPAGE
Lloh38:
	ldr	x9, [x9, _LED_CORE_SUSPENDRESUME@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	stp	w9, w8, [x26, #32]
	str	x20, [x26]
	ldr	x0, [x19]
	mov	x1, x27
	bl	_devm_led_classdev_register
	cbnz	w0, LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x27]
	cbz	w1, LBB0_2
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x27
	bl	_mlxreg_led_brightness_set
	b	LBB0_2
LBB0_15:
	mov	w28, #0
	b	LBB0_19
LBB0_16:
Lloh40:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	neg	w28, w8
	b	LBB0_19
LBB0_17:
	mov	x28, x0
	b	LBB0_19
LBB0_18:
	mov	x28, x0
	ldr	x0, [x19]
Lloh43:
	adrp	x1, l_.str@PAGE
Lloh44:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_19:
	mov	x0, x28
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to query capability register\n"

	.comm	_MLXREG_LED_CAPABILITY_CLEAR,4,2 ; @MLXREG_LED_CAPABILITY_CLEAR
l_.str.1:                               ; @.str.1
	.asciz	"red"

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

	.comm	_LED_OFF,4,2                    ; @LED_OFF
	.comm	_MLXREG_LED_RED_SOLID,4,2       ; @MLXREG_LED_RED_SOLID
l_.str.3:                               ; @.str.3
	.asciz	"amber"

	.comm	_MLXREG_LED_AMBER_SOLID,4,2     ; @MLXREG_LED_AMBER_SOLID
	.comm	_MLXREG_LED_GREEN_SOLID,4,2     ; @MLXREG_LED_GREEN_SOLID
l_.str.4:                               ; @.str.4
	.asciz	"%s:%s"

l_.str.5:                               ; @.str.5
	.asciz	"mlxreg"

	.comm	_LED_ON,4,2                     ; @LED_ON
	.comm	_mlxreg_led_brightness_get,4,2  ; @mlxreg_led_brightness_get
	.comm	_mlxreg_led_blink_set,4,2       ; @mlxreg_led_blink_set
	.comm	_LED_CORE_SUSPENDRESUME,4,2     ; @LED_CORE_SUSPENDRESUME
l_.str.6:                               ; @.str.6
	.asciz	"label: %s, mask: 0x%02x, offset:0x%02x\n"

	.no_dead_strip	_mlxreg_led_config
.subsections_via_symbols
