	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function am654_hbmc_probe
_am654_hbmc_probe:                      ## @am654_hbmc_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_of_property_read_bool
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_devm_mux_control_get
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.14:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_13
LBB0_4:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_mux_control_select
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	jmp	LBB0_13
LBB0_6:
	movq	%r12, (%r14)
LBB0_7:
	movq	%rbx, %rdi
	callq	_pm_runtime_enable
	movq	%rbx, %rdi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	leaq	24(%r14), %rax
	movq	%rbx, 32(%r14)
	movq	_am654_hbmc_ops@GOTPCREL(%rip), %rcx
	movq	%rcx, 24(%r14)
	movq	%r14, %r12
	addq	$8, %r12
	movq	%rax, 16(%r14)
	movl	(%rbx), %edi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_of_get_next_child
	movl	%eax, 8(%r14)
	movq	%r12, %rdi
	callq	_hyperbus_register_device
	testl	%eax, %eax
	je	LBB0_13
## %bb.10:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_pm_runtime_put_sync
	movl	%r12d, %r15d
	jmp	LBB0_11
LBB0_8:
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_pm_runtime_put_noidle
LBB0_11:
	movq	%rbx, %rdi
	callq	_pm_runtime_disable
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_mux_control_deselect
LBB0_13:
	movl	%r15d, %eax
	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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mux-controls"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to select HBMC mux\n"

	.comm	_am654_hbmc_ops,4,2             ## @am654_hbmc_ops
L_.str.2:                               ## @.str.2
	.asciz	"failed to register controller\n"

	.no_dead_strip	_am654_hbmc_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function am654_hbmc_probe
_am654_hbmc_probe:                      ; @am654_hbmc_probe
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, #40
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_of_property_read_bool
	cbz	x0, LBB0_8
; %bb.2:
	mov	x0, x19
	mov	x1, #0
	bl	_devm_mux_control_get
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.3:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_4:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_14
LBB0_5:
	mov	x0, x22
	mov	w1, #1
	bl	_mux_control_select
	cbz	w0, LBB0_7
; %bb.6:
	mov	x21, x0
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_14
LBB0_7:
	str	x22, [x20]
LBB0_8:
	mov	x0, x19
	bl	_pm_runtime_enable
	mov	x0, x19
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_11
; %bb.9:
Lloh10:
	adrp	x8, _am654_hbmc_ops@GOTPAGE
Lloh11:
	ldr	x8, [x8, _am654_hbmc_ops@GOTPAGEOFF]
	str	x19, [x20, #32]
	mov	x9, x20
	str	x8, [x9, #24]!
	str	x9, [x20, #16]
	ldr	w0, [x19]
	mov	x1, #0
	bl	_of_get_next_child
	mov	x8, x20
	str	w0, [x8, #8]!
	mov	x0, x8
	bl	_hyperbus_register_device
	mov	x21, x0
	cbz	w0, LBB0_14
; %bb.10:
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x19
	bl	_pm_runtime_put_sync
	b	LBB0_12
LBB0_11:
	mov	x21, x0
	mov	x0, x19
	bl	_pm_runtime_put_noidle
LBB0_12:
	mov	x0, x19
	bl	_pm_runtime_disable
	ldr	x0, [x20]
	cbz	x0, LBB0_14
; %bb.13:
	bl	_mux_control_deselect
LBB0_14:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.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	"mux-controls"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to select HBMC mux\n"

	.comm	_am654_hbmc_ops,4,2             ; @am654_hbmc_ops
l_.str.2:                               ; @.str.2
	.asciz	"failed to register controller\n"

	.no_dead_strip	_am654_hbmc_probe
.subsections_via_symbols
