	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pm8058_led_probe
_pm8058_led_probe:                      ## @pm8058_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$64, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_of_device_get_match_data
	movq	%rax, (%r14)
	movl	(%r12), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_dev_get_regmap
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, 56(%r13)
	leaq	48(%r14), %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENXIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_6:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movslq	(%r15), %rax
LBB0_8:
	addq	$8, %r14
	movl	%eax, 24(%r13)
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_of_get_property
	movq	%rax, 40(%r13)
	movq	_pm8058_led_set@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r13)
	movq	_pm8058_led_get@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r13)
	movq	(%r13), %rax
	movq	_PM8058_LED_TYPE_COMMON@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	sete	%bl
	shll	$4, %ebx
	orl	$15, %ebx
	movl	%ebx, 16(%r13)
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_15
## %bb.9:
	movq	%rax, %r15
	leaq	L_.str.6(%rip), %rsi
	movq	%rax, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movq	_LED_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, 20(%r13)
	movq	%r14, %rdi
	jmp	LBB0_14
LBB0_10:
	movq	%r14, %rdi
	callq	_pm8058_led_get
	movl	%eax, 20(%r13)
	jmp	LBB0_15
LBB0_12:
	movl	%ebx, 20(%r13)
	movq	%r14, %rdi
	movl	%ebx, %esi
LBB0_14:
	callq	_pm8058_led_set
LBB0_15:
	movq	(%r13), %rax
	movq	_PM8058_LED_TYPE_KEYPAD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_17
## %bb.16:
	movq	_PM8058_LED_TYPE_FLASH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
LBB0_17:
	movq	_LED_CORE_SUSPENDRESUME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r13)
LBB0_18:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_devm_led_classdev_register
	testl	%eax, %eax
	je	LBB0_19
## %bb.20:
	movl	%eax, %ebx
	movl	24(%r13), %edx
	leaq	L_.str.8(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_21
LBB0_19:
	xorl	%ebx, %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %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	"Parent regmap unavailable.\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"reg"

L_.str.2:                               ## @.str.2
	.asciz	"no register offset specified\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"label"

L_.str.4:                               ## @.str.4
	.asciz	"linux,default-trigger"

	.comm	_PM8058_LED_TYPE_COMMON,8,3     ## @PM8058_LED_TYPE_COMMON
L_.str.5:                               ## @.str.5
	.asciz	"default-state"

L_.str.6:                               ## @.str.6
	.asciz	"keep"

L_.str.7:                               ## @.str.7
	.asciz	"on"

	.comm	_LED_OFF,4,2                    ## @LED_OFF
	.comm	_PM8058_LED_TYPE_KEYPAD,8,3     ## @PM8058_LED_TYPE_KEYPAD
	.comm	_PM8058_LED_TYPE_FLASH,8,3      ## @PM8058_LED_TYPE_FLASH
	.comm	_LED_CORE_SUSPENDRESUME,4,2     ## @LED_CORE_SUSPENDRESUME
L_.str.8:                               ## @.str.8
	.asciz	"unable to register led \"%s\"\n"

	.no_dead_strip	_pm8058_led_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pm8058_led_probe
_pm8058_led_probe:                      ; @pm8058_led_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #64
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_of_device_get_match_data
	str	x0, [x20]
	ldr	w0, [x19]
	mov	x1, #0
	bl	_dev_get_regmap
	cbz	x0, LBB0_5
; %bb.2:
	str	x0, [x20, #56]
	add	x2, x20, #48
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_of_property_read_u32
	cbz	w0, LBB0_8
; %bb.3:
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh13:
	adrp	x8, _ENXIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	mov	x2, #0
	bl	_of_get_property
	cbnz	x0, LBB0_10
; %bb.9:
	ldrsw	x0, [x21]
LBB0_10:
	str	w0, [x20, #24]
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	mov	x2, #0
	bl	_of_get_property
Lloh19:
	adrp	x8, _pm8058_led_get@GOTPAGE
Lloh20:
	ldr	x8, [x8, _pm8058_led_get@GOTPAGEOFF]
	mov	x22, x20
	str	x8, [x22, #8]!
Lloh21:
	adrp	x8, _pm8058_led_set@GOTPAGE
Lloh22:
	ldr	x8, [x8, _pm8058_led_set@GOTPAGEOFF]
	stp	x8, x0, [x20, #32]
	ldr	x8, [x20]
Lloh23:
	adrp	x9, _PM8058_LED_TYPE_COMMON@GOTPAGE
Lloh24:
	ldr	x9, [x9, _PM8058_LED_TYPE_COMMON@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	mov	w8, #15
	mov	w9, #31
	csel	w23, w9, w8, eq
	str	w23, [x20, #16]
Lloh26:
	adrp	x1, l_.str.5@PAGE
Lloh27:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_17
; %bb.11:
	mov	x21, x0
Lloh28:
	adrp	x1, l_.str.6@PAGE
Lloh29:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_14
; %bb.12:
Lloh30:
	adrp	x1, l_.str.7@PAGE
Lloh31:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x21
	bl	_strcmp
	cbz	w0, LBB0_15
; %bb.13:
Lloh32:
	adrp	x8, _LED_OFF@GOTPAGE
Lloh33:
	ldr	x8, [x8, _LED_OFF@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	str	w1, [x20, #20]
	mov	x0, x22
	b	LBB0_16
LBB0_14:
	mov	x0, x22
	bl	_pm8058_led_get
	str	w0, [x20, #20]
	b	LBB0_17
LBB0_15:
	str	w23, [x20, #20]
	mov	x0, x22
	mov	x1, x23
LBB0_16:
	bl	_pm8058_led_set
LBB0_17:
	ldr	x8, [x20]
Lloh35:
	adrp	x9, _PM8058_LED_TYPE_KEYPAD@GOTPAGE
Lloh36:
	ldr	x9, [x9, _PM8058_LED_TYPE_KEYPAD@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
Lloh38:
	adrp	x10, _PM8058_LED_TYPE_FLASH@GOTPAGE
Lloh39:
	ldr	x10, [x10, _PM8058_LED_TYPE_FLASH@GOTPAGEOFF]
Lloh40:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_19
; %bb.18:
Lloh41:
	adrp	x8, _LED_CORE_SUSPENDRESUME@GOTPAGE
Lloh42:
	ldr	x8, [x8, _LED_CORE_SUSPENDRESUME@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	str	w8, [x20, #28]
LBB0_19:
	mov	x0, x19
	mov	x1, x22
	bl	_devm_led_classdev_register
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.20:
	ldr	w8, [x20, #24]
	str	x8, [sp]
Lloh44:
	adrp	x1, l_.str.8@PAGE
Lloh45:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.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	"Parent regmap unavailable.\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"reg"

l_.str.2:                               ; @.str.2
	.asciz	"no register offset specified\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"label"

l_.str.4:                               ; @.str.4
	.asciz	"linux,default-trigger"

	.comm	_PM8058_LED_TYPE_COMMON,8,3     ; @PM8058_LED_TYPE_COMMON
l_.str.5:                               ; @.str.5
	.asciz	"default-state"

l_.str.6:                               ; @.str.6
	.asciz	"keep"

l_.str.7:                               ; @.str.7
	.asciz	"on"

	.comm	_LED_OFF,4,2                    ; @LED_OFF
	.comm	_PM8058_LED_TYPE_KEYPAD,8,3     ; @PM8058_LED_TYPE_KEYPAD
	.comm	_PM8058_LED_TYPE_FLASH,8,3      ; @PM8058_LED_TYPE_FLASH
	.comm	_LED_CORE_SUSPENDRESUME,4,2     ; @LED_CORE_SUSPENDRESUME
l_.str.8:                               ; @.str.8
	.asciz	"unable to register led \"%s\"\n"

	.no_dead_strip	_pm8058_led_probe
.subsections_via_symbols
