	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt6397_probe
_mt6397_probe:                          ## @mt6397_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$32, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r15
	movq	%r14, 24(%rax)
	movl	(%r14), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_dev_get_regmap
	movl	%eax, 20(%r15)
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movq	%r14, %rdi
	callq	_of_device_get_match_data
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %r12
	movl	20(%r15), %edi
	movl	4(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	je	LBB0_11
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_10
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_11:
	movl	-36(%rbp), %eax
	movb	(%r12), %cl
	shrl	%cl, %eax
	movzbl	%al, %eax
	movl	%eax, (%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	jle	LBB0_16
## %bb.12:
	movq	%r15, %rdi
	callq	_mt6397_irq_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.13:
	movl	(%r15), %edx
	leal	-128(%rdx), %eax
	cmpl	$3, %eax
	jae	LBB0_17
## %bb.14:
	cltq
	leaq	l_switch.table.mt6397_probe(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %r12d
	movl	%r12d, %edi
	callq	_ARRAY_SIZE
	movl	16(%r15), %ecx
	movl	%ecx, (%rsp)
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	$-1, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_devm_mfd_add_devices
	testl	%eax, %eax
	je	LBB0_10
## %bb.15:
	movl	%eax, %r12d
	movl	16(%r15), %edi
	callq	_irq_domain_remove
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_dev_err
	movl	%r12d, %ebx
	jmp	LBB0_10
LBB0_16:
	movq	%rax, %rbx
	jmp	LBB0_10
LBB0_17:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dev_err
LBB0_7:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read chip id: %d\n"

	.comm	_mt6323_devs,4,2                ## @mt6323_devs
	.comm	_mt6397_devs,4,2                ## @mt6397_devs
L_.str.1:                               ## @.str.1
	.asciz	"unsupported chip: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to add child devices: %d\n"

	.no_dead_strip	_mt6397_probe
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.mt6397_probe
l_switch.table.mt6397_probe:
	.quad	_mt6397_devs
	.quad	_mt6397_devs
	.quad	_mt6323_devs

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt6397_probe
_mt6397_probe:                          ; @mt6397_probe
	.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	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #32
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	str	x19, [x0, #24]
	ldr	w0, [x19]
	mov	x1, #0
	bl	_dev_get_regmap
	str	w0, [x20, #20]
	cbz	w0, LBB0_14
; %bb.2:
	mov	x0, x19
	bl	_of_device_get_match_data
	cbz	x0, LBB0_14
; %bb.3:
	mov	x22, x0
	ldr	w0, [x20, #20]
	ldr	w1, [x22, #4]
	add	x2, sp, #12
	bl	_regmap_read
	cbz	w0, LBB0_7
; %bb.4:
	mov	x21, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
LBB0_5:
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	b	LBB0_16
LBB0_6:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_15
LBB0_7:
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	lsr	w8, w8, w9
	and	w8, w8, #0xff
	str	w8, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	str	x0, [x20, #8]
	cmp	x0, #0
	b.le	LBB0_12
; %bb.8:
	mov	x0, x20
	bl	_mt6397_irq_init
	mov	x21, x0
	cbnz	w0, LBB0_16
; %bb.9:
	ldr	w2, [x20]
	sub	w8, w2, #128
	cmp	w8, #3
	b.hs	LBB0_13
; %bb.10:
Lloh7:
	adrp	x9, l_switch.table.mt6397_probe@PAGE
Lloh8:
	add	x9, x9, l_switch.table.mt6397_probe@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x3, x0
	ldr	w6, [x20, #16]
	mov	x0, x19
	mov	w1, #-1
	mov	x2, x21
	mov	x4, #0
	mov	w5, #0
	bl	_devm_mfd_add_devices
	mov	x21, x0
	cbz	w0, LBB0_16
; %bb.11:
	ldr	w0, [x20, #16]
	bl	_irq_domain_remove
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_12:
	mov	x21, x0
	b	LBB0_16
LBB0_13:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_14:
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_16:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read chip id: %d\n"

	.comm	_mt6323_devs,4,2                ; @mt6323_devs
	.comm	_mt6397_devs,4,2                ; @mt6397_devs
l_.str.1:                               ; @.str.1
	.asciz	"unsupported chip: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to add child devices: %d\n"

	.no_dead_strip	_mt6397_probe
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.mt6397_probe
l_switch.table.mt6397_probe:
	.quad	_mt6397_devs
	.quad	_mt6397_devs
	.quad	_mt6323_devs

.subsections_via_symbols
