	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra186_bpmp_init
_tegra186_bpmp_init:                    ## @tegra186_bpmp_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	%rdi, %r12
	movq	32(%rdi), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$88, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rax, 48(%r12)
	movq	%r12, 80(%rax)
	movq	32(%r12), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	callq	_of_gen_pool_get
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	leaq	16(%r14), %rdx
	movq	%rax, %rdi
	movl	$4096, %esi                     ## imm = 0x1000
	callq	_gen_pool_dma_alloc
	movq	%rax, (%r14)
	movq	32(%r12), %rdi
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	movl	$1, %edx
	callq	_of_gen_pool_get
	movq	%rax, 32(%r14)
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:
	leaq	40(%r14), %rdx
	movq	%rax, %rdi
	movl	$4096, %esi                     ## imm = 0x1000
	callq	_gen_pool_dma_alloc
	movq	%rax, 24(%r14)
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	(%r12), %rdi
	movq	40(%r12), %rax
	movl	8(%rax), %edx
	movq	%r12, %rsi
	callq	_tegra186_bpmp_channel_init
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:
	movq	8(%r12), %rdi
	movq	40(%r12), %rax
	movl	4(%rax), %edx
	movq	%r12, %rsi
	callq	_tegra186_bpmp_channel_init
	testl	%eax, %eax
	js	LBB0_15
## %bb.16:
	cmpl	$0, 24(%r12)
	je	LBB0_21
## %bb.17:
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	40(%r12), %rax
	movl	(%rax), %edx
	addl	%ebx, %edx
	movq	16(%r12), %rdi
	addq	%r13, %rdi
	movq	%r12, %rsi
	callq	_tegra186_bpmp_channel_init
	testl	%eax, %eax
	js	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_19 Depth=1
	incq	%rbx
	movl	24(%r12), %eax
	addq	$4, %r13
	cmpq	%rax, %rbx
	jb	LBB0_19
LBB0_21:
	movq	32(%r12), %rax
	movq	%r14, %rdi
	addq	$56, %rdi
	movq	%rax, 72(%r14)
	movq	_mbox_handle_rx@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%r14)
	movq	$0, 56(%r14)
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_mbox_request_channel
	movl	%eax, 48(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_32
## %bb.22:
	movl	48(%r14), %edi
	callq	_PTR_ERR
	movl	%eax, %r15d
	movq	32(%r12), %rdi
	leaq	L_.str.5(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_23
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_35
LBB0_3:
	movq	32(%r12), %rdi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
LBB0_6:
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_35
LBB0_8:
	movq	32(%r12), %rdi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_9
LBB0_11:
	movq	32(%r12), %rdi
	leaq	L_.str.4(%rip), %rsi
LBB0_9:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_31
LBB0_13:
	movl	%eax, %r15d
	jmp	LBB0_30
LBB0_15:
	movl	%eax, %r15d
	jmp	LBB0_29
LBB0_20:
	movl	%eax, %r15d
LBB0_23:
	movl	24(%r12), %eax
	testl	%eax, %eax
	je	LBB0_28
## %bb.24:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_25 Depth=1
	incq	%r13
	movl	%eax, %ecx
	addq	$4, %rbx
	cmpq	%rcx, %r13
	jae	LBB0_28
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rdi
	cmpl	$0, (%rdi,%rbx)
	je	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_25 Depth=1
	addq	%rbx, %rdi
	callq	_tegra186_bpmp_channel_cleanup
	movl	24(%r12), %eax
	jmp	LBB0_27
LBB0_28:
	movq	8(%r12), %rdi
	callq	_tegra186_bpmp_channel_cleanup
LBB0_29:
	movq	(%r12), %rdi
	callq	_tegra186_bpmp_channel_cleanup
LBB0_30:
	movq	24(%r14), %rsi
	movq	32(%r14), %rdi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_gen_pool_free
LBB0_31:
	movq	(%r14), %rsi
	movq	8(%r14), %rdi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_gen_pool_free
LBB0_35:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_32:
	movq	(%r12), %rdi
	callq	_tegra186_bpmp_channel_reset
	movq	8(%r12), %rdi
	callq	_tegra186_bpmp_channel_reset
	cmpl	$0, 24(%r12)
	je	LBB0_35
## %bb.33:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
LBB0_34:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rdi
	addq	%r14, %rdi
	callq	_tegra186_bpmp_channel_reset
	incq	%rbx
	movl	24(%r12), %eax
	addq	$4, %r14
	cmpq	%rax, %rbx
	jb	LBB0_34
	jmp	LBB0_35
	.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	"shmem"

L_.str.1:                               ## @.str.1
	.asciz	"TX shmem pool not found\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to allocate from TX pool\n"

L_.str.3:                               ## @.str.3
	.asciz	"RX shmem pool not found\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to allocate from RX pool\n"

	.comm	_mbox_handle_rx,4,2             ## @mbox_handle_rx
L_.str.5:                               ## @.str.5
	.asciz	"failed to get HSP mailbox: %d\n"

	.no_dead_strip	_tegra186_bpmp_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra186_bpmp_init
_tegra186_bpmp_init:                    ; @tegra186_bpmp_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	x19, x0
	ldr	x0, [x0, #32]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #88
	bl	_devm_kzalloc
	cbz	x0, LBB0_16
; %bb.1:
	mov	x20, x0
	str	x0, [x19, #48]
	str	x19, [x0, #80]
	ldr	x8, [x19, #32]
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #0
	bl	_of_gen_pool_get
	str	x0, [x20, #8]
	cbz	x0, LBB0_13
; %bb.2:
	add	x2, x20, #16
	mov	w1, #4096
	bl	_gen_pool_dma_alloc
	mov	x8, x0
	str	x0, [x20]
	ldr	x0, [x19, #32]
	cbz	x8, LBB0_14
; %bb.3:
	ldr	w0, [x0]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #1
	bl	_of_gen_pool_get
	str	x0, [x20, #32]
	cbz	x0, LBB0_17
; %bb.4:
	add	x2, x20, #40
	mov	w1, #4096
	bl	_gen_pool_dma_alloc
	str	x0, [x20, #24]
	cbz	x0, LBB0_18
; %bb.5:
	ldr	x0, [x19]
	ldr	x8, [x19, #40]
	ldr	w2, [x8, #8]
	mov	x1, x19
	bl	_tegra186_bpmp_channel_init
	tbnz	w0, #31, LBB0_20
; %bb.6:
	ldr	x0, [x19, #8]
	ldr	x8, [x19, #40]
	ldr	w2, [x8, #4]
	mov	x1, x19
	bl	_tegra186_bpmp_channel_init
	tbnz	w0, #31, LBB0_21
; %bb.7:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_11
; %bb.8:
	mov	x22, #0
	mov	x23, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	ldr	w8, [x8]
	add	w2, w23, w8
	ldr	x8, [x19, #16]
	add	x0, x8, x22
	mov	x1, x19
	bl	_tegra186_bpmp_channel_init
	tbnz	w0, #31, LBB0_22
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x23, x23, #1
	ldr	w8, [x19, #24]
	add	x22, x22, #4
	cmp	x23, x8
	b.lo	LBB0_9
LBB0_11:
	ldr	x8, [x19, #32]
	mov	x21, x20
	str	wzr, [x21, #56]!
	str	x8, [x21, #16]
Lloh7:
	adrp	x8, _mbox_handle_rx@GOTPAGE
Lloh8:
	ldr	x8, [x8, _mbox_handle_rx@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	stp	wzr, w8, [x21, #4]
	mov	x0, x21
	mov	w1, #0
	bl	_mbox_request_channel
	stur	w0, [x21, #-8]
	bl	_IS_ERR
	cbz	x0, LBB0_33
; %bb.12:
	ldr	w0, [x20, #48]
	bl	_PTR_ERR
	mov	x21, x0
	ldr	x0, [x19, #32]
	str	x21, [sp]
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
	b	LBB0_23
LBB0_13:
	ldr	x0, [x19, #32]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_14:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_15:
	bl	_dev_err
LBB0_16:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_32
LBB0_17:
	ldr	x0, [x19, #32]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_19
LBB0_18:
	ldr	x0, [x19, #32]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_19:
	bl	_dev_err
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_31
LBB0_20:
	mov	x21, x0
	b	LBB0_30
LBB0_21:
	mov	x21, x0
	b	LBB0_29
LBB0_22:
	mov	x21, x0
LBB0_23:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_28
; %bb.24:
	mov	x22, #0
	mov	x23, #0
	b	LBB0_26
LBB0_25:                                ;   in Loop: Header=BB0_26 Depth=1
	add	x23, x23, #1
	add	x22, x22, #4
	cmp	x23, w8, uxtw
	b.hs	LBB0_28
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #16]
	add	x0, x9, x22
	ldr	w9, [x0]
	cbz	w9, LBB0_25
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=1
	bl	_tegra186_bpmp_channel_cleanup
	ldr	w8, [x19, #24]
	b	LBB0_25
LBB0_28:
	ldr	x0, [x19, #8]
	bl	_tegra186_bpmp_channel_cleanup
LBB0_29:
	ldr	x0, [x19]
	bl	_tegra186_bpmp_channel_cleanup
LBB0_30:
	ldp	x1, x0, [x20, #24]
	mov	w2, #4096
	bl	_gen_pool_free
LBB0_31:
	ldp	x1, x0, [x20]
	mov	w2, #4096
	bl	_gen_pool_free
LBB0_32:
	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_33:
	ldr	x0, [x19]
	bl	_tegra186_bpmp_channel_reset
	ldr	x0, [x19, #8]
	bl	_tegra186_bpmp_channel_reset
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_36
; %bb.34:
	mov	x20, #0
	mov	x22, #0
LBB0_35:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x0, x8, x20
	bl	_tegra186_bpmp_channel_reset
	mov	w21, #0
	add	x22, x22, #1
	ldr	w8, [x19, #24]
	add	x20, x20, #4
	cmp	x22, x8
	b.lo	LBB0_35
	b	LBB0_32
LBB0_36:
	mov	w21, #0
	b	LBB0_32
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.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	"shmem"

l_.str.1:                               ; @.str.1
	.asciz	"TX shmem pool not found\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to allocate from TX pool\n"

l_.str.3:                               ; @.str.3
	.asciz	"RX shmem pool not found\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to allocate from RX pool\n"

	.comm	_mbox_handle_rx,4,2             ; @mbox_handle_rx
l_.str.5:                               ; @.str.5
	.asciz	"failed to get HSP mailbox: %d\n"

	.no_dead_strip	_tegra186_bpmp_init
.subsections_via_symbols
