	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max8997_led_probe
_max8997_led_probe:                     ## @max8997_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	4(%rdi), %r14
	movl	4(%rdi), %edi
	callq	_dev_get_drvdata
	movq	%rax, %r12
	movl	(%rax), %edi
	callq	_dev_get_platdata
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$64, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %rbx
	movl	(%r15), %ecx
	movl	%ecx, (%rax)
	leaq	L_.str.1(%rip), %rdx
	leaq	-80(%rbp), %r15
	movq	%r15, %rdi
	movl	$20, %esi
	callq	_snprintf
	movq	%r15, 8(%rbx)
	movq	_max8997_led_brightness_set@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	_LED_CORE_SUSPENDRESUME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 36(%rbx)
	leaq	8(%rbx), %r15
	movq	$0, 24(%rbx)
	movq	_max8997_groups@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	%r12, 56(%rbx)
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movslq	(%rbx), %rcx
	movq	(%rax), %rdx
	movq	8(%rax), %rax
	movq	(%rdx,%rcx,8), %rsi
	movq	(%rax,%rcx,8), %r13
	movq	%rbx, %rdi
	callq	_max8997_led_set_mode
	movq	16(%rbx), %r12
	cmpq	%r12, %r13
	cmovlq	%r13, %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_max8997_led_set_current
	movq	%r12, 24(%rbx)
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_7:
	movq	_MAX8997_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	callq	_max8997_led_set_mode
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_max8997_led_set_current
LBB0_8:
	addq	$48, %rbx
	movq	%rbx, %rdi
	callq	_mutex_init
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_devm_led_classdev_register
	movl	%eax, %ecx
	sarl	$31, %eax
	andl	%ecx, %eax
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_11
## %bb.10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no platform data\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"max8997-led%d"

	.comm	_max8997_led_brightness_set,4,2 ## @max8997_led_brightness_set
	.comm	_LED_CORE_SUSPENDRESUME,4,2     ## @LED_CORE_SUSPENDRESUME
	.comm	_max8997_groups,4,2             ## @max8997_groups
	.comm	_MAX8997_NONE,8,3               ## @MAX8997_NONE
	.no_dead_strip	_max8997_led_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max8997_led_probe
_max8997_led_probe:                     ; @max8997_led_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	mov	x19, x0
	ldr	w0, [x19, #4]!
	bl	_dev_get_drvdata
	mov	x22, x0
	ldr	w0, [x0]
	bl	_dev_get_platdata
	cbz	x0, LBB0_4
; %bb.1:
	mov	x23, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #64
	bl	_devm_kzalloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	ldr	w3, [x21]
	str	w3, [x0]
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x24, sp, #4
	add	x0, sp, #4
	mov	w1, #20
	bl	_snprintf
	mov	x21, x20
	str	x24, [x21, #8]!
Lloh8:
	adrp	x8, _max8997_led_brightness_set@GOTPAGE
Lloh9:
	ldr	x8, [x8, _max8997_led_brightness_set@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _LED_CORE_SUSPENDRESUME@GOTPAGE
Lloh12:
	ldr	x9, [x9, _LED_CORE_SUSPENDRESUME@GOTPAGEOFF]
	str	w8, [x21, #32]
Lloh13:
	ldr	w8, [x9]
	ldr	w9, [x21, #28]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _max8997_groups@GOTPAGE
Lloh15:
	ldr	x9, [x9, _max8997_groups@GOTPAGEOFF]
	str	xzr, [x21, #16]
Lloh16:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #24]
	str	x22, [x21, #48]
	ldr	x8, [x23]
	cbz	x8, LBB0_7
; %bb.3:
	ldrsw	x9, [x20]
	lsl	x9, x9, #3
	ldp	x10, x8, [x8]
	ldr	x1, [x10, x9]
	ldr	x22, [x8, x9]
	mov	x0, x20
	bl	_max8997_led_set_mode
	ldr	x8, [x20, #16]
	cmp	x22, x8
	csel	x22, x22, x8, lt
	mov	x0, x20
	mov	x1, x22
	bl	_max8997_led_set_current
	str	x22, [x20, #24]
	b	LBB0_8
LBB0_4:
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh19:
	adrp	x8, _ENODEV@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_7:
Lloh23:
	adrp	x8, _MAX8997_NONE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MAX8997_NONE@GOTPAGEOFF]
Lloh25:
	ldr	x1, [x8]
	mov	x0, x20
	bl	_max8997_led_set_mode
	mov	x0, x20
	mov	x1, #0
	bl	_max8997_led_set_current
LBB0_8:
	add	x0, x20, #48
	bl	_mutex_init
	mov	x0, x19
	mov	x1, x21
	bl	_devm_led_classdev_register
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_9:
	ldr	x8, [sp, #24]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no platform data\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"max8997-led%d"

	.comm	_max8997_led_brightness_set,4,2 ; @max8997_led_brightness_set
	.comm	_LED_CORE_SUSPENDRESUME,4,2     ; @LED_CORE_SUSPENDRESUME
	.comm	_max8997_groups,4,2             ; @max8997_groups
	.comm	_MAX8997_NONE,8,3               ; @MAX8997_NONE
	.no_dead_strip	_max8997_led_probe
.subsections_via_symbols
