	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_bpmp_transfer_atomic     ## -- Begin function tegra_bpmp_transfer_atomic
	.p2align	4, 0x90
_tegra_bpmp_transfer_atomic:            ## @tegra_bpmp_transfer_atomic
	.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	%rsi, %r14
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_irqs_disabled
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_2:
	subl	(%rax), %ebx
LBB0_3:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r14, %rdi
	callq	_tegra_bpmp_message_valid
	testl	%eax, %eax
	je	LBB0_9
## %bb.5:
	movq	8(%r15), %r12
	movq	%r15, %rdi
	callq	_spin_lock
	movl	20(%r14), %esi
	movq	_MSG_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	12(%r14), %r8d
	movl	16(%r14), %ecx
	movq	%r12, %rdi
	callq	_tegra_bpmp_channel_write
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_spin_unlock
	testl	%ebx, %ebx
	js	LBB0_3
## %bb.6:
	movq	%r15, %rdi
	callq	_tegra_bpmp_ring_doorbell
	testl	%eax, %eax
	js	LBB0_10
## %bb.7:
	movq	%r12, %rdi
	callq	_tegra_bpmp_wait_response
	testl	%eax, %eax
	js	LBB0_10
## %bb.8:
	movl	4(%r14), %edx
	movl	8(%r14), %esi
	movq	%r12, %rdi
	movq	%r14, %rcx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	___tegra_bpmp_channel_read      ## TAILCALL
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_2
LBB0_10:
	movl	%eax, %ebx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MSG_ACK,4,2                    ## @MSG_ACK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_bpmp_transfer_atomic     ; -- Begin function tegra_bpmp_transfer_atomic
	.p2align	2
_tegra_bpmp_transfer_atomic:            ; @tegra_bpmp_transfer_atomic
	.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, x1
	mov	x20, x0
	bl	_irqs_disabled
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _EPERM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_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
	ret
LBB0_4:
	mov	x0, x19
	bl	_tegra_bpmp_message_valid
	cbz	w0, LBB0_9
; %bb.5:
	ldr	x21, [x20, #8]
	mov	x0, x20
	bl	_spin_lock
	ldp	w3, w1, [x19, #16]
Lloh2:
	adrp	x8, _MSG_ACK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MSG_ACK@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	ldr	w4, [x19, #12]
	mov	x0, x21
	bl	_tegra_bpmp_channel_write
	mov	x22, x0
	mov	x0, x20
	bl	_spin_unlock
	tbnz	w22, #31, LBB0_3
; %bb.6:
	mov	x0, x20
	bl	_tegra_bpmp_ring_doorbell
	tbnz	w0, #31, LBB0_10
; %bb.7:
	mov	x0, x21
	bl	_tegra_bpmp_wait_response
	tbnz	w0, #31, LBB0_10
; %bb.8:
	ldp	w2, w1, [x19, #4]
	mov	x0, x21
	mov	x3, x19
	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	___tegra_bpmp_channel_read
LBB0_9:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_2
LBB0_10:
	mov	x22, x0
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MSG_ACK,4,2                    ; @MSG_ACK
.subsections_via_symbols
