	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm831x_status_probe
_wm831x_status_probe:                   ## @wm831x_status_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, %rbx
	leaq	4(%rdi), %r13
	movl	4(%rdi), %edi
	callq	_dev_get_drvdata
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %r14d
	callq	_ARRAY_SIZE
	movl	%eax, %ecx
	movl	%r14d, %eax
	cltd
	idivl	%ecx
	movl	%edx, %r12d
	movq	_IORESOURCE_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	%r12d, -68(%rbp)                ## 4-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$56, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movq	%r13, %rdi
	movq	%rax, %r13
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rsi
	callq	_dev_set_drvdata
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, 48(%r12)
	movl	(%r15), %eax
	movl	%eax, 32(%r12)
	movq	(%r14), %rax
	movq	(%rax), %rbx
	leaq	-64(%rbp), %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.5:
	movq	(%rbx), %rax
	movslq	-68(%rbp), %rcx                 ## 4-byte Folded Reload
	movq	(%rax,%rcx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.6:
	leaq	-64(%rbp), %rdi
	movl	$12, %edx
	callq	_memcpy
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_19
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_19
LBB0_7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_name
	movl	%eax, -56(%rbp)
LBB0_8:
	leaq	44(%r12), %rdi
	callq	_mutex_init
	leaq	40(%r12), %rdi
	movq	_wm831x_status_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	leaq	36(%r12), %rdi
	callq	_spin_lock_init
	movl	32(%r13), %esi
	movq	%r14, %rdi
	callq	_wm831x_reg_read
	movl	%eax, (%r13)
	movq	_WM831X_LED_MODE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	jne	LBB0_9
## %bb.10:
	movq	_LED_OFF@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_9:
	movq	_LED_FULL@GOTPCREL(%rip), %rcx
LBB0_11:
	movl	(%rcx), %ecx
	movl	%ecx, 28(%r13)
	movl	-64(%rbp), %ecx
	movq	_WM831X_STATUS_PRESERVE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_13
## %bb.12:
	movq	_WM831X_LED_SRC_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_WM831X_LED_SRC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movl	%eax, 4(%r13)
	jmp	LBB0_14
LBB0_13:
	decl	%ecx
	movl	%ecx, 4(%r13)
LBB0_14:
	movl	-56(%rbp), %eax
	addq	$8, %r12
	movl	%eax, 24(%r13)
	movl	-60(%rbp), %eax
	movl	%eax, 20(%r13)
	movq	_wm831x_status_set@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r13)
	movq	_wm831x_status_blink_set@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r13)
	movq	(%r14), %rdi
	movq	%r12, %rsi
	callq	_led_classdev_register
	testl	%eax, %eax
	js	LBB0_15
## %bb.16:
	movl	(%r12), %edi
	movq	_dev_attr_src@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	je	LBB0_17
## %bb.18:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r14d, %r14d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_19
LBB0_15:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r12, %rdi
	callq	_led_classdev_unregister
	movq	%r13, %rdi
	callq	_kfree
	jmp	LBB0_19
LBB0_17:
	xorl	%r14d, %r14d
LBB0_19:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_IO,4,2              ## @IORESOURCE_IO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No I/O resource\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_wm831x_status_work,4,2         ## @wm831x_status_work
	.comm	_WM831X_LED_MODE_MASK,4,2       ## @WM831X_LED_MODE_MASK
	.comm	_LED_FULL,4,2                   ## @LED_FULL
	.comm	_LED_OFF,4,2                    ## @LED_OFF
	.comm	_WM831X_STATUS_PRESERVE,4,2     ## @WM831X_STATUS_PRESERVE
	.comm	_WM831X_LED_SRC_MASK,4,2        ## @WM831X_LED_SRC_MASK
	.comm	_WM831X_LED_SRC_SHIFT,4,2       ## @WM831X_LED_SRC_SHIFT
	.comm	_wm831x_status_set,4,2          ## @wm831x_status_set
	.comm	_wm831x_status_blink_set,4,2    ## @wm831x_status_blink_set
L_.str.1:                               ## @.str.1
	.asciz	"Failed to register LED: %d\n"

	.comm	_dev_attr_src,4,2               ## @dev_attr_src
L_.str.2:                               ## @.str.2
	.asciz	"No source control for LED: %d\n"

	.no_dead_strip	_wm831x_status_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm831x_status_probe
_wm831x_status_probe:                   ; @wm831x_status_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
	mov	x19, x0
	ldr	w0, [x19, #4]!
	bl	_dev_get_drvdata
	mov	x20, x0
	ldr	w24, [x21]
	bl	_ARRAY_SIZE
	mov	x22, x0
Lloh0:
	adrp	x8, _IORESOURCE_IO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IORESOURCE_IO@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_platform_get_resource
	cbz	x0, LBB0_5
; %bb.1:
	mov	x23, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #56
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_dev_set_drvdata
	str	x20, [x21, #48]
	ldr	w8, [x23]
	str	w8, [x21, #32]
	ldr	x8, [x20]
	ldr	x23, [x8]
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	cbz	x23, LBB0_8
; %bb.3:
	sdiv	w8, w24, w22
	msub	w8, w8, w22, w24
	ldr	x9, [x23]
	ldr	x1, [x9, w8, sxtw #3]
	cbz	x1, LBB0_8
; %bb.4:
	add	x0, sp, #16
	mov	w2, #12
	bl	_memcpy
	b	LBB0_9
LBB0_5:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_17
LBB0_8:
	mov	x0, x19
	bl	_dev_name
	str	w0, [sp, #24]
LBB0_9:
	add	x0, x21, #44
	bl	_mutex_init
	add	x0, x21, #40
Lloh12:
	adrp	x8, _wm831x_status_work@GOTPAGE
Lloh13:
	ldr	x8, [x8, _wm831x_status_work@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x0, x21, #36
	bl	_spin_lock_init
	ldr	w1, [x21, #32]
	mov	x0, x20
	bl	_wm831x_reg_read
	str	w0, [x21]
Lloh15:
	adrp	x8, _WM831X_LED_MODE_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WM831X_LED_MODE_MASK@GOTPAGEOFF]
Lloh17:
	adrp	x9, _LED_OFF@GOTPAGE
Lloh18:
	ldr	x9, [x9, _LED_OFF@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x10, _LED_FULL@GOTPAGE
Lloh21:
	ldr	x10, [x10, _LED_FULL@GOTPAGEOFF]
	tst	w8, w0
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	str	w8, [x21, #28]
	ldr	w8, [sp, #16]
Lloh22:
	adrp	x9, _WM831X_STATUS_PRESERVE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _WM831X_STATUS_PRESERVE@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.10:
Lloh25:
	adrp	x8, _WM831X_LED_SRC_MASK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _WM831X_LED_SRC_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh28:
	adrp	x9, _WM831X_LED_SRC_SHIFT@GOTPAGE
Lloh29:
	ldr	x9, [x9, _WM831X_LED_SRC_SHIFT@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	asr	w8, w8, w9
	b	LBB0_12
LBB0_11:
	sub	w8, w8, #1
LBB0_12:
	str	w8, [x21, #4]
	add	x22, x21, #8
	ldur	d0, [sp, #20]
	stur	d0, [x21, #20]
Lloh31:
	adrp	x8, _wm831x_status_set@GOTPAGE
Lloh32:
	ldr	x8, [x8, _wm831x_status_set@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	adrp	x9, _wm831x_status_blink_set@GOTPAGE
Lloh35:
	ldr	x9, [x9, _wm831x_status_blink_set@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #12]
	ldr	x0, [x20]
	mov	x1, x22
	bl	_led_classdev_register
	tbnz	w0, #31, LBB0_16
; %bb.13:
	ldr	w0, [x22]
Lloh37:
	adrp	x1, _dev_attr_src@GOTPAGE
Lloh38:
	ldr	x1, [x1, _dev_attr_src@GOTPAGEOFF]
	bl	_device_create_file
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_15
; %bb.14:
	str	x0, [sp]
Lloh39:
	adrp	x1, l_.str.2@PAGE
Lloh40:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_15:
	mov	w20, #0
	b	LBB0_17
LBB0_16:
	mov	x20, x0
	str	x20, [sp]
Lloh41:
	adrp	x1, l_.str.1@PAGE
Lloh42:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x22
	bl	_led_classdev_unregister
	mov	x0, x21
	bl	_kfree
LBB0_17:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_IO,4,2              ; @IORESOURCE_IO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No I/O resource\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_wm831x_status_work,4,2         ; @wm831x_status_work
	.comm	_WM831X_LED_MODE_MASK,4,2       ; @WM831X_LED_MODE_MASK
	.comm	_LED_FULL,4,2                   ; @LED_FULL
	.comm	_LED_OFF,4,2                    ; @LED_OFF
	.comm	_WM831X_STATUS_PRESERVE,4,2     ; @WM831X_STATUS_PRESERVE
	.comm	_WM831X_LED_SRC_MASK,4,2        ; @WM831X_LED_SRC_MASK
	.comm	_WM831X_LED_SRC_SHIFT,4,2       ; @WM831X_LED_SRC_SHIFT
	.comm	_wm831x_status_set,4,2          ; @wm831x_status_set
	.comm	_wm831x_status_blink_set,4,2    ; @wm831x_status_blink_set
l_.str.1:                               ; @.str.1
	.asciz	"Failed to register LED: %d\n"

	.comm	_dev_attr_src,4,2               ; @dev_attr_src
l_.str.2:                               ; @.str.2
	.asciz	"No source control for LED: %d\n"

	.no_dead_strip	_wm831x_status_probe
.subsections_via_symbols
