	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adp5520_led_probe
_adp5520_led_probe:                     ## @adp5520_led_probe
	.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	%rdi, %r15
	callq	_dev_get_platdata
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	(%rax), %esi
	movq	_ADP5520_01_MAXLEDS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpl	%edx, %esi
	jle	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EFAULT@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_20
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_20
LBB0_4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	$28, %edx
	callq	_devm_kcalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r14
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_adp5520_led_prepare
	testl	%eax, %eax
	je	LBB0_7
## %bb.21:
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_20
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_20
LBB0_7:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$0, (%rcx)
	jle	LBB0_19
## %bb.8:
	movl	$8, %r15d
	xorl	%r14d, %r14d
	movq	_ADP5520_FLAG_LED_MASK@GOTPCREL(%rip), %rdx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rcx), %rax
	movl	(%rax,%r15), %ecx
	leaq	8(%rbx), %rsi
	movl	%ecx, 20(%rbx)
	movl	-4(%rax,%r15), %ecx
	movl	%ecx, 16(%rbx)
	movq	_adp5520_led_set@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rbx)
	movq	_LED_OFF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rbx)
	movl	-8(%rax,%r15), %eax
	movl	(%rdx), %ecx
	andl	%eax, %ecx
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	leal	1(%r14), %eax
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%eax, (%rbx)
	movq	%rdx, %r12
	andl	(%rdx), %eax
	movl	%eax, 4(%rbx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	%edi, 24(%rbx)
	callq	_led_classdev_register
	testl	%eax, %eax
	jne	LBB0_12
## %bb.16:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rbx, %rdi
	callq	_adp5520_led_setup
	testl	%eax, %eax
	jne	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%r14
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movslq	(%rcx), %rax
	addq	$28, %rbx
	addq	$12, %r15
	cmpq	%rax, %r14
	movq	%r12, %rdx
	jl	LBB0_9
LBB0_19:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_platform_set_drvdata
	xorl	%r13d, %r13d
	jmp	LBB0_20
LBB0_12:
	movl	%eax, %r13d
	movl	4(%rbx), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_13
LBB0_17:
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
	incl	%r14d
LBB0_13:
	testl	%r14d, %r14d
	jle	LBB0_20
## %bb.14:
	movl	%r14d, %eax
	leaq	1(%rax), %r14
	leaq	(%rax,%rax,8), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	addq	%rax, %rcx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rcx), %rbx
	addq	$-20, %rbx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_led_classdev_unregister
	decq	%r14
	addq	$-28, %rbx
	cmpq	$1, %r14
	ja	LBB0_15
LBB0_20:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"missing platform data\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ADP5520_01_MAXLEDS,4,2         ## @ADP5520_01_MAXLEDS
L_.str.1:                               ## @.str.1
	.asciz	"can't handle more than %d LEDS\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"failed to write\n"

	.comm	_adp5520_led_set,4,2            ## @adp5520_led_set
	.comm	_LED_OFF,4,2                    ## @LED_OFF
	.comm	_ADP5520_FLAG_LED_MASK,4,2      ## @ADP5520_FLAG_LED_MASK
L_.str.3:                               ## @.str.3
	.asciz	"failed to register LED %d\n"

	.no_dead_strip	_adp5520_led_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adp5520_led_probe
_adp5520_led_probe:                     ; @adp5520_led_probe
	.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
	mov	x19, x0
	bl	_dev_get_platdata
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	w1, [x0]
Lloh0:
	adrp	x8, _ADP5520_01_MAXLEDS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADP5520_01_MAXLEDS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w1, w8
	b.le	LBB0_4
; %bb.2:
	str	x8, [sp]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh5:
	adrp	x8, _EFAULT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
Lloh11:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w2, #28
	bl	_devm_kcalloc
	cbz	x0, LBB0_7
; %bb.5:
	mov	x20, x0
	mov	x0, x19
	bl	_adp5520_led_prepare
	cbz	w0, LBB0_10
; %bb.6:
	mov	x22, x0
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_9
LBB0_7:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	mov	x0, x22
	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
LBB0_10:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.11:
	mov	x25, #0
	mov	x24, #0
Lloh18:
	adrp	x26, _adp5520_led_set@GOTPAGE
Lloh19:
	ldr	x26, [x26, _adp5520_led_set@GOTPAGEOFF]
Lloh20:
	adrp	x27, _LED_OFF@GOTPAGE
Lloh21:
	ldr	x27, [x27, _LED_OFF@GOTPAGEOFF]
Lloh22:
	adrp	x28, _ADP5520_FLAG_LED_MASK@GOTPAGE
Lloh23:
	ldr	x28, [x28, _ADP5520_FLAG_LED_MASK@GOTPAGEOFF]
	mov	x23, x20
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	add	x8, x8, x25
	ldur	d0, [x8, #4]
	str	d0, [x23, #16]
	ldr	w9, [x26]
	str	w9, [x23, #12]
	ldr	w9, [x27]
	mov	x1, x23
	str	w9, [x1, #8]!
	ldr	w8, [x8]
	ldr	w9, [x28]
	tst	w9, w8
	csinc	w8, w8, w24, ne
	str	w8, [x23]
	ldr	w9, [x28]
	and	w8, w9, w8
	str	w8, [x23, #4]
	ldr	w0, [x19]
	str	w0, [x23, #24]
	bl	_led_classdev_register
	cbnz	w0, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x23
	bl	_adp5520_led_setup
	cbnz	w0, LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x21]
	add	x23, x23, #28
	add	x25, x25, #12
	cmp	x24, x8
	b.lt	LBB0_12
LBB0_15:
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	w22, #0
	b	LBB0_9
LBB0_16:
	mov	x22, x0
	ldr	w8, [x23, #4]
	str	x8, [sp]
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_18
LBB0_17:
	mov	x22, x0
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	add	w24, w24, #1
LBB0_18:
	cmp	w24, #1
	b.lt	LBB0_9
; %bb.19:
	mov	w8, w24
	add	x21, x8, #1
	mov	w8, #28
	umaddl	x8, w24, w8, x20
	sub	x19, x8, #20
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_led_classdev_unregister
	sub	x21, x21, #1
	sub	x19, x19, #28
	cmp	x21, #1
	b.hi	LBB0_20
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"missing platform data\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ADP5520_01_MAXLEDS,4,2         ; @ADP5520_01_MAXLEDS
l_.str.1:                               ; @.str.1
	.asciz	"can't handle more than %d LEDS\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"failed to write\n"

	.comm	_adp5520_led_set,4,2            ; @adp5520_led_set
	.comm	_LED_OFF,4,2                    ; @LED_OFF
	.comm	_ADP5520_FLAG_LED_MASK,4,2      ; @ADP5520_FLAG_LED_MASK
l_.str.3:                               ; @.str.3
	.asciz	"failed to register LED %d\n"

	.no_dead_strip	_adp5520_led_probe
.subsections_via_symbols
