	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm8400_init
_wm8400_init:                           ## @wm8400_init
	.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	%rsi, %r14
	movq	%rdi, %r13
	addq	$24, %rdi
	callq	_mutex_init
	movl	16(%r13), %edi
	movq	%r13, %rsi
	callq	_dev_set_drvdata
	movl	20(%r13), %edi
	movq	_WM8400_RESET_ID@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	leaq	-44(%rbp), %rcx
	movl	$1, %edx
	callq	*(%r13)
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	16(%r13), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
LBB0_2:
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	movl	-44(%rbp), %edi
	callq	_be16_to_cpu
	cltq
	movq	_reg_data@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rbx), %rdx
	shlq	$4, %rdx
	cmpq	%rax, (%rcx,%rdx)
	jne	LBB0_6
## %bb.4:
	movl	20(%r13), %r12d
	movq	(%r13), %rbx
	movq	8(%r13), %rdi
	callq	_ARRAY_SIZE
	movq	8(%r13), %rcx
	xorl	%r15d, %r15d
	movl	%r12d, %edi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	*%rbx
	testl	%eax, %eax
	je	LBB0_9
## %bb.5:
	movl	16(%r13), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_6:
	movl	16(%r13), %ebx
	movl	-44(%rbp), %edi
	callq	_be16_to_cpu
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_7:
	subl	(%rax), %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	8(%r13), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_12
## %bb.10:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_be16_to_cpu
	movq	8(%r13), %rdi
	movl	%eax, (%rdi,%rbx,4)
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_11
LBB0_12:
	movq	8(%r13), %rdi
	movq	_WM8400_POWER_MANAGEMENT_1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_WM8400_CODEC_ENA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rdi,%rax,4)
	movq	_reg_data@GOTPCREL(%rip), %r12
	je	LBB0_15
LBB0_13:
	movq	_WM8400_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rcx
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_wm8400_read
	testl	%eax, %eax
	je	LBB0_21
## %bb.14:
	movl	%eax, %r15d
	movl	16(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_8
LBB0_15:
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_13
## %bb.16:
	movl	$8, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	-8(%rax,%r15), %eax
	movq	8(%r13), %rdi
	movl	%eax, (%rdi,%rbx,4)
LBB0_18:                                ##   in Loop: Header=BB0_19 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	addq	$16, %r15
	cmpq	%rax, %rbx
	jge	LBB0_13
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	cmpq	$0, (%rax,%r15)
	jne	LBB0_17
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	8(%r13), %rdi
	jmp	LBB0_18
LBB0_21:
	movq	_WM8400_CHIP_REV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	-44(%rbp), %edx
	movq	_WM8400_CHIP_REV_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %edx
	movl	%edx, -44(%rbp)
	movl	16(%r13), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_info
	movq	%r13, %rdi
	callq	_wm8400_register_codec
	testl	%eax, %eax
	je	LBB0_24
## %bb.22:
	movl	%eax, %r15d
	movl	16(%r13), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_23:
	movl	16(%r13), %edi
	callq	_mfd_remove_devices
	jmp	LBB0_8
LBB0_24:
	testq	%r14, %r14
	je	LBB0_28
## %bb.25:
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_28
## %bb.26:
	movl	16(%r13), %edi
	callq	*%rax
	testl	%eax, %eax
	je	LBB0_29
## %bb.27:
	movl	%eax, %r15d
	movl	16(%r13), %edi
	leaq	L_.str.6(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_23
LBB0_28:
	movl	16(%r13), %edi
	leaq	L_.str.7(%rip), %rsi
	callq	_dev_warn
LBB0_29:
	xorl	%r15d, %r15d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_WM8400_RESET_ID,8,3            ## @WM8400_RESET_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Chip ID register read failed\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_reg_data,8,3                   ## @reg_data
L_.str.1:                               ## @.str.1
	.asciz	"Device is not a WM8400, ID is %x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"Register cache read failed\n"

	.comm	_WM8400_POWER_MANAGEMENT_1,8,3  ## @WM8400_POWER_MANAGEMENT_1
	.comm	_WM8400_CODEC_ENA,4,2           ## @WM8400_CODEC_ENA
	.comm	_WM8400_ID,4,2                  ## @WM8400_ID
L_.str.3:                               ## @.str.3
	.asciz	"ID register read failed: %d\n"

	.comm	_WM8400_CHIP_REV_MASK,4,2       ## @WM8400_CHIP_REV_MASK
	.comm	_WM8400_CHIP_REV_SHIFT,4,2      ## @WM8400_CHIP_REV_SHIFT
L_.str.4:                               ## @.str.4
	.asciz	"WM8400 revision %x\n"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to register codec\n"

L_.str.6:                               ## @.str.6
	.asciz	"Platform init failed: %d\n"

L_.str.7:                               ## @.str.7
	.asciz	"No platform initialisation supplied\n"

	.no_dead_strip	_wm8400_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm8400_init
_wm8400_init:                           ; @wm8400_init
	.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	x20, x1
	mov	x19, x0
	add	x0, x0, #24
	bl	_mutex_init
	ldr	w0, [x19, #16]
	mov	x1, x19
	bl	_dev_set_drvdata
	ldr	x8, [x19]
	ldr	w0, [x19, #20]
Lloh0:
	adrp	x21, _WM8400_RESET_ID@GOTPAGE
Lloh1:
	ldr	x21, [x21, _WM8400_RESET_ID@GOTPAGEOFF]
	ldr	x1, [x21]
	add	x3, sp, #12
	mov	w2, #1
	blr	x8
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w0, [x19, #16]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	bl	_dev_err
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
	ldr	w0, [sp, #12]
	bl	_be16_to_cpu
Lloh6:
	adrp	x22, _reg_data@GOTPAGE
Lloh7:
	ldr	x22, [x22, _reg_data@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x9, [x21]
	lsl	x9, x9, #4
	ldr	x8, [x8, x9]
	cmp	x8, w0, sxtw
	b.ne	LBB0_6
; %bb.4:
	ldr	w21, [x19, #20]
	ldp	x23, x0, [x19]
	bl	_ARRAY_SIZE
	mov	x2, x0
	ldr	x3, [x19, #8]
	mov	x0, x21
	mov	x1, #0
	blr	x23
	cbz	w0, LBB0_9
; %bb.5:
	ldr	w0, [x19, #16]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_6:
	ldr	w19, [x19, #16]
	ldr	w0, [sp, #12]
	bl	_be16_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	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_9:
	ldr	x0, [x19, #8]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.10:
	mov	x21, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	lsl	x23, x21, #2
	ldr	w0, [x8, x23]
	bl	_be16_to_cpu
	ldr	x8, [x19, #8]
	str	w0, [x8, x23]
	add	x21, x21, #1
	mov	x0, x8
	bl	_ARRAY_SIZE
	cmp	x21, w0, sxtw
	b.lt	LBB0_11
LBB0_12:
	ldr	x0, [x19, #8]
Lloh14:
	adrp	x8, _WM8400_POWER_MANAGEMENT_1@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WM8400_POWER_MANAGEMENT_1@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldr	w8, [x0, x8, lsl #2]
Lloh17:
	adrp	x9, _WM8400_CODEC_ENA@GOTPAGE
Lloh18:
	ldr	x9, [x9, _WM8400_CODEC_ENA@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
LBB0_13:
Lloh20:
	adrp	x8, _WM8400_ID@GOTPAGE
Lloh21:
	ldr	x8, [x8, _WM8400_ID@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w2, #1
	bl	_wm8400_read
	cbz	w0, LBB0_21
; %bb.14:
	mov	x21, x0
	ldr	w0, [x19, #16]
	str	x21, [sp]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_15:
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_13
; %bb.16:
	mov	x21, #0
	mov	x23, #0
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	x8, [x8, x21]
	ldr	x0, [x19, #8]
	str	w8, [x0, x23, lsl #2]
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x23, x23, #1
	bl	_ARRAY_SIZE
	add	x21, x21, #16
	cmp	x23, w0, sxtw
	b.ge	LBB0_13
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	add	x9, x8, x21
	ldr	x9, [x9, #8]
	cbnz	x9, LBB0_17
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	x0, [x19, #8]
	b	LBB0_18
LBB0_21:
	ldr	w8, [sp, #12]
Lloh25:
	adrp	x9, _WM8400_CHIP_REV_MASK@GOTPAGE
Lloh26:
	ldr	x9, [x9, _WM8400_CHIP_REV_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh28:
	adrp	x9, _WM8400_CHIP_REV_SHIFT@GOTPAGE
Lloh29:
	ldr	x9, [x9, _WM8400_CHIP_REV_SHIFT@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	asr	w2, w8, w9
	str	w2, [sp, #12]
	ldr	w0, [x19, #16]
Lloh31:
	adrp	x1, l_.str.4@PAGE
Lloh32:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_info
	mov	x0, x19
	bl	_wm8400_register_codec
	cbz	w0, LBB0_24
; %bb.22:
	mov	x21, x0
	ldr	w0, [x19, #16]
Lloh33:
	adrp	x1, l_.str.5@PAGE
Lloh34:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
LBB0_23:
	ldr	w0, [x19, #16]
	bl	_mfd_remove_devices
	b	LBB0_8
LBB0_24:
	cbz	x20, LBB0_28
; %bb.25:
	ldr	x8, [x20]
	cbz	x8, LBB0_28
; %bb.26:
	ldr	w0, [x19, #16]
	blr	x8
	mov	x21, x0
	cbz	w0, LBB0_8
; %bb.27:
	ldr	w0, [x19, #16]
	str	x21, [sp]
Lloh35:
	adrp	x1, l_.str.6@PAGE
Lloh36:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_23
LBB0_28:
	ldr	w0, [x19, #16]
Lloh37:
	adrp	x1, l_.str.7@PAGE
Lloh38:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_warn
	mov	w21, #0
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_WM8400_RESET_ID,8,3            ; @WM8400_RESET_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Chip ID register read failed\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_reg_data,8,3                   ; @reg_data
l_.str.1:                               ; @.str.1
	.asciz	"Device is not a WM8400, ID is %x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"Register cache read failed\n"

	.comm	_WM8400_POWER_MANAGEMENT_1,8,3  ; @WM8400_POWER_MANAGEMENT_1
	.comm	_WM8400_CODEC_ENA,4,2           ; @WM8400_CODEC_ENA
	.comm	_WM8400_ID,4,2                  ; @WM8400_ID
l_.str.3:                               ; @.str.3
	.asciz	"ID register read failed: %d\n"

	.comm	_WM8400_CHIP_REV_MASK,4,2       ; @WM8400_CHIP_REV_MASK
	.comm	_WM8400_CHIP_REV_SHIFT,4,2      ; @WM8400_CHIP_REV_SHIFT
l_.str.4:                               ; @.str.4
	.asciz	"WM8400 revision %x\n"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to register codec\n"

l_.str.6:                               ; @.str.6
	.asciz	"Platform init failed: %d\n"

l_.str.7:                               ; @.str.7
	.asciz	"No platform initialisation supplied\n"

	.no_dead_strip	_wm8400_init
.subsections_via_symbols
