	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_bpmp_mrq_return          ## -- Begin function tegra_bpmp_mrq_return
	.p2align	4, 0x90
_tegra_bpmp_mrq_return:                 ## @tegra_bpmp_mrq_return
	.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	%rcx, %r15
	movq	%rdx, %r12
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %rax
	movq	(%rax), %r14
	movq	_MSG_DATA_MIN_SZ@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%rcx, (%rax)
	setb	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	movq	%rbx, %rdi
	callq	_tegra_bpmp_ack_request
	shrl	$31, %eax
	movl	%eax, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_MSG_ACK@GOTPCREL(%rip), %rax
	testq	%r14, (%rax)
	je	LBB0_9
## %bb.3:
	movq	%rbx, %rdi
	callq	_tegra_bpmp_is_response_channel_free
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_9
## %bb.4:
	movq	(%rbx), %rax
	movl	%r13d, (%rax)
	testq	%r12, %r12
	je	LBB0_7
## %bb.5:
	testq	%r15, %r15
	je	LBB0_7
## %bb.6:
	movl	4(%rax), %edi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_memcpy
LBB0_7:
	movq	%rbx, %rdi
	callq	_tegra_bpmp_post_response
	shrl	$31, %eax
	movl	%eax, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	_MSG_RING@GOTPCREL(%rip), %rax
	testq	%r14, (%rax)
	je	LBB0_9
## %bb.10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_tegra_bpmp_ring_doorbell
	shrl	$31, %eax
	movl	%eax, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WARN_ON                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DATA_MIN_SZ,8,3            ## @MSG_DATA_MIN_SZ
	.comm	_MSG_ACK,8,3                    ## @MSG_ACK
	.comm	_MSG_RING,8,3                   ## @MSG_RING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_bpmp_mrq_return          ; -- Begin function tegra_bpmp_mrq_return
	.p2align	2
_tegra_bpmp_mrq_return:                 ; @tegra_bpmp_mrq_return
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	ldp	x19, x8, [x0, #8]
	ldr	x24, [x8]
Lloh0:
	adrp	x8, _MSG_DATA_MIN_SZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_DATA_MIN_SZ@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x3
	cset	w0, lo
	bl	_WARN_ON
	cbnz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_tegra_bpmp_ack_request
	lsr	w0, w0, #31
	bl	_WARN_ON
	cbz	x0, LBB0_3
LBB0_2:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh3:
	adrp	x8, _MSG_ACK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSG_ACK@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	tst	x8, x24
	b.eq	LBB0_2
; %bb.4:
	mov	x0, x20
	bl	_tegra_bpmp_is_response_channel_free
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_2
; %bb.5:
	ldr	x8, [x20]
	str	w23, [x8]
	cbz	x22, LBB0_8
; %bb.6:
	cbz	x21, LBB0_8
; %bb.7:
	ldr	w0, [x8, #4]
	mov	x1, x22
	mov	x2, x21
	bl	_memcpy
LBB0_8:
	mov	x0, x20
	bl	_tegra_bpmp_post_response
	lsr	w0, w0, #31
	bl	_WARN_ON
	cbnz	x0, LBB0_2
; %bb.9:
Lloh6:
	adrp	x8, _MSG_RING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MSG_RING@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	tst	x8, x24
	b.eq	LBB0_2
; %bb.10:
	mov	x0, x19
	bl	_tegra_bpmp_ring_doorbell
	lsr	w0, w0, #31
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_WARN_ON
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DATA_MIN_SZ,8,3            ; @MSG_DATA_MIN_SZ
	.comm	_MSG_ACK,8,3                    ; @MSG_ACK
	.comm	_MSG_RING,8,3                   ; @MSG_RING
.subsections_via_symbols
