	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_bpmp_get_firmware_tag_old
_tegra_bpmp_get_firmware_tag_old:       ## @tegra_bpmp_get_firmware_tag_old
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_TAG_SZ@GOTPCREL(%rip), %r13
	cmpq	%rdx, (%r13)
	jne	LBB0_1
## %bb.3:
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	(%rdi), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movq	_GFP_DMA32@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	-44(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdx
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	leaq	-96(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	-44(%rbp), %eax
	movl	%eax, -76(%rbp)
	leaq	-72(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	_MRQ_QUERY_TAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	leaq	-96(%rbp), %rax
	movq	%rax, -64(%rbp)
	movl	$24, -72(%rbp)
	callq	_local_irq_save
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_tegra_bpmp_transfer_atomic
	movl	%eax, %ebx
	callq	_local_irq_restore
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.6:
	movq	(%r13), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_memcpy
LBB0_7:
	movl	(%r12), %edi
	movq	(%r13), %rsi
	movl	-44(%rbp), %ecx
	movq	%r15, %rdx
	callq	_dma_free_coherent
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TAG_SZ,8,3                     ## @TAG_SZ
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_GFP_DMA32,4,2                  ## @GFP_DMA32
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MRQ_QUERY_TAG,4,2              ## @MRQ_QUERY_TAG
	.no_dead_strip	_tegra_bpmp_get_firmware_tag_old
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_bpmp_get_firmware_tag_old
_tegra_bpmp_get_firmware_tag_old:       ; @tegra_bpmp_get_firmware_tag_old
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x23, _TAG_SZ@GOTPAGE
Lloh1:
	ldr	x23, [x23, _TAG_SZ@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x9, x2
	b.ne	LBB0_5
; %bb.1:
	mov	x8, x2
	mov	x20, x1
	mov	x19, x0
Lloh2:
	adrp	x9, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w0, [x0]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _GFP_DMA32@GOTPAGE
Lloh6:
	ldr	x10, [x10, _GFP_DMA32@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	orr	w3, w10, w9
	add	x2, sp, #12
	mov	x1, x8
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_6
; %bb.2:
	mov	x21, x0
	add	x22, sp, #40
	mov	w24, #24
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	w8, [sp, #12]
	str	w8, [sp, #60]
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #24
	bl	_memset
Lloh8:
	adrp	x8, _MRQ_QUERY_TAG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MRQ_QUERY_TAG@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [sp, #32]
	str	x22, [sp, #24]
	str	w24, [sp, #16]
	bl	_local_irq_save
	add	x1, sp, #16
	mov	x0, x19
	bl	_tegra_bpmp_transfer_atomic
	mov	x22, x0
	bl	_local_irq_restore
	cbnz	w22, LBB0_4
; %bb.3:
	ldr	x2, [x23]
	mov	x0, x20
	mov	x1, x21
	bl	_memcpy
LBB0_4:
	ldr	w0, [x19]
	ldr	x1, [x23]
	ldr	w3, [sp, #12]
	mov	x2, x21
	bl	_dma_free_coherent
	b	LBB0_8
LBB0_5:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_8:
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_TAG_SZ,8,3                     ; @TAG_SZ
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_GFP_DMA32,4,2                  ; @GFP_DMA32
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MRQ_QUERY_TAG,4,2              ; @MRQ_QUERY_TAG
	.no_dead_strip	_tegra_bpmp_get_firmware_tag_old
.subsections_via_symbols
