	.file	"extr_bpmp.c_tegra_bpmp_get_firmware_tag_old.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	tegra_bpmp_get_firmware_tag_old, @function
tegra_bpmp_get_firmware_tag_old:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 80
	.cfi_def_cfa_offset 128
	mov	rsi, QWORD PTR TAG_SZ[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	cmp	rsi, rdx
	je	.L2
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L9
	add	rsp, 80
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rbx, rdi
	mov	edi, DWORD PTR [rdi]
	mov	ecx, DWORD PTR GFP_KERNEL[rip]
	lea	rdx, 12[rsp]
	or	ecx, DWORD PTR GFP_DMA32[rip]
	call	dma_alloc_coherent@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	mov	r13, rax
	neg	r12d
	test	rax, rax
	je	.L1
	lea	r14, 16[rsp]
	xor	esi, esi
	mov	edx, 24
	mov	rdi, r14
	lea	r12, 48[rsp]
	call	memset@PLT
	mov	eax, DWORD PTR 12[rsp]
	xor	esi, esi
	mov	edx, 24
	mov	rdi, r12
	mov	DWORD PTR 36[rsp], eax
	call	memset@PLT
	mov	QWORD PTR 56[rsp], r14
	xor	r14d, r14d
	mov	eax, DWORD PTR MRQ_QUERY_TAG[rip]
	mov	rdi, r14
	mov	DWORD PTR 48[rsp], 24
	mov	DWORD PTR 64[rsp], eax
	call	local_irq_save@PLT
	mov	rsi, r12
	mov	rdi, rbx
	call	tegra_bpmp_transfer_atomic@PLT
	mov	rdi, r14
	mov	r12d, eax
	call	local_irq_restore@PLT
	test	r12d, r12d
	je	.L10
.L5:
	mov	ecx, DWORD PTR 12[rsp]
	mov	rsi, QWORD PTR TAG_SZ[rip]
	mov	rdx, r13
	mov	edi, DWORD PTR [rbx]
	call	dma_free_coherent@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdx, QWORD PTR TAG_SZ[rip]
	mov	rsi, r13
	mov	rdi, rbp
	call	memcpy@PLT
	jmp	.L5
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	tegra_bpmp_get_firmware_tag_old, .-tegra_bpmp_get_firmware_tag_old
	.comm	TAG_SZ,8,8
	.comm	MRQ_QUERY_TAG,4,4
	.comm	GFP_KERNEL,4,4
	.comm	GFP_DMA32,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_bpmp.c_tegra_bpmp_get_firmware_tag_old.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tegra_bpmp_get_firmware_tag_old, %function
tegra_bpmp_get_firmware_tag_old:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r6, .L12
	ldr	r3, .L12+4
	ldr	ip, [r6]
	sub	sp, sp, #44
	cmp	ip, r2
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	beq	.L2
	ldr	r3, .L12+8
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	ldr	r3, .L12+4
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	mov	r0, r4
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L2:
	ldr	r2, .L12+12
	ldr	r3, .L12+16
	ldr	r2, [r2]
	ldr	r3, [r3]
	mov	r7, r0
	orr	r3, r2, r3
	mov	r5, r1
	mov	r2, sp
	mov	r1, ip
	ldr	r0, [r0]
	bl	dma_alloc_coherent
	subs	r8, r0, #0
	beq	.L10
	mov	r9, #0
	mov	r1, #16
	ldr	r2, .L12+20
	ldr	r3, [sp]
	ldr	r2, [r2]
	mov	r0, r9
	str	r2, [sp, #28]
	add	r2, sp, #4
	str	r2, [sp, #24]
	str	r3, [sp, #16]
	str	r1, [sp, #20]
	str	r9, [sp, #4]
	str	r9, [sp, #32]
	str	r9, [sp, #8]
	str	r9, [sp, #12]
	bl	local_irq_save
	add	r1, sp, #20
	mov	r0, r7
	bl	tegra_bpmp_transfer_atomic
	mov	r4, r0
	mov	r0, r9
	bl	local_irq_restore
	cmp	r4, r9
	beq	.L11
.L5:
	mov	r2, r8
	ldr	r1, [r6]
	ldr	r0, [r7]
	ldr	r3, [sp]
	bl	dma_free_coherent
	b	.L1
.L11:
	mov	r0, r5
	mov	r1, r8
	ldr	r2, [r6]
	bl	memcpy
	b	.L5
.L10:
	ldr	r3, .L12+24
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L9:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	TAG_SZ
	.word	.LC0
	.word	EINVAL
	.word	GFP_KERNEL
	.word	GFP_DMA32
	.word	MRQ_QUERY_TAG
	.word	ENOMEM
	.size	tegra_bpmp_get_firmware_tag_old, .-tegra_bpmp_get_firmware_tag_old
	.comm	TAG_SZ,4,4
	.comm	MRQ_QUERY_TAG,4,4
	.comm	GFP_KERNEL,4,4
	.comm	GFP_DMA32,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
