	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	movq	%rbx, %rsi
	callq	_dev_set_drvdata
	movl	4(%rbx), %edi
	movq	_WM8400_RESET_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	movl	-28(%rbp), %edx
	cmpl	$24946, %edx                    ## imm = 0x6172
	jne	LBB0_6
## %bb.3:
	movl	4(%rbx), %edi
	movq	_WM8400_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	movl	%eax, %r14d
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_5:
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_8
LBB0_6:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_7:
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_WM8400_CHIP_REV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	-28(%rbp), %edx
	movq	_WM8400_CHIP_REV_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrl	%cl, %edx
	movl	%edx, -28(%rbp)
	movl	(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_info
	movq	%rbx, %rdi
	callq	_wm8400_register_codec
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %r14d
	movl	(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_8
LBB0_11:
	testq	%r15, %r15
	je	LBB0_15
## %bb.12:
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	movl	(%rbx), %edi
	callq	*%rax
	testl	%eax, %eax
	je	LBB0_16
## %bb.14:
	movl	%eax, %r14d
	movl	(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_5
LBB0_15:
	movl	(%rbx), %edi
	leaq	L_.str.6(%rip), %rsi
	callq	_dev_warn
LBB0_16:
	xorl	%r14d, %r14d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_WM8400_RESET_ID,4,2            ## @WM8400_RESET_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Chip ID register read failed\n"

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

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_WM8400_ID,4,2                  ## @WM8400_ID
L_.str.2:                               ## @.str.2
	.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.3:                               ## @.str.3
	.asciz	"WM8400 revision %x\n"

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

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

L_.str.6:                               ## @.str.6
	.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, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0]
	mov	x1, x19
	bl	_dev_set_drvdata
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x8, _WM8400_RESET_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WM8400_RESET_ID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
	ldr	w8, [sp, #12]
	mov	w9, #24946
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:
	ldr	w0, [x19, #4]
Lloh7:
	adrp	x8, _WM8400_ID@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WM8400_ID@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	cbz	w0, LBB0_8
; %bb.4:
	mov	x21, x0
	ldr	w0, [x19]
	str	x21, [sp]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_7
LBB0_5:
	ldr	w0, [x19]
	str	x8, [sp]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh14:
	adrp	x8, _ENODEV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_8:
	ldr	w8, [sp, #12]
Lloh16:
	adrp	x9, _WM8400_CHIP_REV_MASK@GOTPAGE
Lloh17:
	ldr	x9, [x9, _WM8400_CHIP_REV_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh19:
	adrp	x9, _WM8400_CHIP_REV_SHIFT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _WM8400_CHIP_REV_SHIFT@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	lsr	w2, w8, w9
	str	w2, [sp, #12]
	ldr	w0, [x19]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_info
	mov	x0, x19
	bl	_wm8400_register_codec
	cbz	w0, LBB0_10
; %bb.9:
	mov	x21, x0
	ldr	w0, [x19]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
	b	LBB0_7
LBB0_10:
	cbz	x20, LBB0_14
; %bb.11:
	ldr	x8, [x20]
	cbz	x8, LBB0_14
; %bb.12:
	ldr	w0, [x19]
	blr	x8
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.13:
	ldr	w0, [x19]
	str	x21, [sp]
Lloh26:
	adrp	x1, l_.str.5@PAGE
Lloh27:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_7
LBB0_14:
	ldr	w0, [x19]
Lloh28:
	adrp	x1, l_.str.6@PAGE
Lloh29:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_warn
	mov	w21, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_WM8400_RESET_ID,4,2            ; @WM8400_RESET_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Chip ID register read failed\n"

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

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_WM8400_ID,4,2                  ; @WM8400_ID
l_.str.2:                               ; @.str.2
	.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.3:                               ; @.str.3
	.asciz	"WM8400 revision %x\n"

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

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

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

	.no_dead_strip	_wm8400_init
.subsections_via_symbols
