	.file	"extr_gm200.c_gm200_secboot_run_blob.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	gm200_secboot_run_blob
	.type	gm200_secboot_run_blob, @function
gm200_secboot_run_blob:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	gm200_secboot@PLT
	mov	rdi, rbp
	mov	QWORD PTR 16[rsp], 0
	lea	r14, 8[rax]
	mov	rbx, rax
	mov	rsi, r14
	call	nvkm_falcon_get@PLT
	mov	r8d, eax
	test	eax, eax
	je	.L8
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L9
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	lea	r15, 16[rsp]
	mov	edx, DWORD PTR 0[r13]
	mov	edi, DWORD PTR [rbx]
	mov	esi, 12
	mov	rcx, r15
	call	nvkm_vmm_get@PLT
	test	eax, eax
	jne	.L10
	mov	rcx, QWORD PTR 16[rsp]
	mov	edx, DWORD PTR [rbx]
	xor	r8d, r8d
	xor	r9d, r9d
	xor	esi, esi
	mov	rdi, r13
	call	nvkm_memory_map@PLT
	mov	r8d, eax
	test	eax, eax
	je	.L11
.L4:
	mov	rax, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR [r12]
	mov	edx, 1
	mov	DWORD PTR 12[rsp], r8d
	mov	esi, DWORD PTR [rax]
	call	nvkm_mc_intr_mask@PLT
	mov	edi, DWORD PTR [rbx]
	mov	rsi, r15
	call	nvkm_vmm_put@PLT
	mov	rsi, r14
	mov	rdi, rbp
	call	nvkm_falcon_put@PLT
	mov	r8d, DWORD PTR 12[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdi, rbp
	call	nvkm_falcon_reset@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L4
	mov	esi, DWORD PTR 4[rbx]
	mov	rdi, rbp
	call	nvkm_falcon_bind_context@PLT
	mov	rdi, QWORD PTR 8[r12]
	mov	rdx, QWORD PTR 16[rsp]
	mov	rsi, rbp
	mov	rax, QWORD PTR [rdi]
	mov	ecx, DWORD PTR [rdx]
	mov	rdx, r13
	call	[QWORD PTR [rax]]
	mov	r8d, eax
	test	eax, eax
	js	.L4
	mov	DWORD PTR 12[rsp], eax
	mov	rax, QWORD PTR 0[rbp]
	xor	edx, edx
	mov	edi, DWORD PTR [r12]
	mov	esi, DWORD PTR [rax]
	call	nvkm_mc_intr_mask@PLT
	mov	edx, -559045211
	mov	esi, 64
	mov	rdi, rbp
	call	nvkm_falcon_wr32@PLT
	mov	r8d, DWORD PTR 12[rsp]
	mov	rdi, rbp
	mov	esi, r8d
	call	nvkm_falcon_set_start_addr@PLT
	mov	rdi, rbp
	call	nvkm_falcon_start@PLT
	mov	esi, 100
	mov	rdi, rbp
	call	nvkm_falcon_wait_for_halt@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L4
	mov	esi, 64
	mov	rdi, rbp
	call	nvkm_falcon_rd32@PLT
	mov	r8d, eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rsi, r14
	mov	rdi, rbp
	mov	DWORD PTR 12[rsp], eax
	call	nvkm_falcon_put@PLT
	mov	r8d, DWORD PTR 12[rsp]
	jmp	.L1
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	gm200_secboot_run_blob, .-gm200_secboot_run_blob
	.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_gm200.c_gm200_secboot_run_blob.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	gm200_secboot_run_blob
	.syntax unified
	.arm
	.fpu softvfp
	.type	gm200_secboot_run_blob, %function
gm200_secboot_run_blob:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L12
	sub	sp, sp, #16
	mov	r5, r2
	mov	r8, r1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r9, r0
	bl	gm200_secboot
	mov	r10, #0
	add	r7, r0, #8
	mov	r6, r0
	mov	r1, r7
	mov	r0, r5
	str	r10, [sp, #8]
	bl	nvkm_falcon_get
	subs	r4, r0, #0
	beq	.L9
.L1:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	mov	r0, r4
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	mov	r1, #12
	ldr	r2, [r8]
	ldr	r0, [r6]
	add	r3, sp, #8
	bl	nvkm_vmm_get
	subs	r4, r0, #0
	bne	.L7
	ldr	r2, [r6]
	mov	r1, r4
	str	r4, [sp, #4]
	str	r4, [sp]
	mov	r0, r8
	ldr	r3, [sp, #8]
	bl	nvkm_memory_map
	subs	r4, r0, #0
	beq	.L11
.L4:
	ldr	r3, [r5]
	mov	r2, #1
	ldr	r1, [r3]
	ldr	r0, [r9]
	bl	nvkm_mc_intr_mask
	ldr	r0, [r6]
	add	r1, sp, #8
	bl	nvkm_vmm_put
.L7:
	mov	r1, r7
	mov	r0, r5
	bl	nvkm_falcon_put
	b	.L1
.L11:
	mov	r0, r5
	bl	nvkm_falcon_reset
	subs	r4, r0, #0
	bne	.L4
	ldr	r1, [r6, #4]
	mov	r0, r5
	bl	nvkm_falcon_bind_context
	ldr	r0, [r9, #4]
	ldr	r3, [sp, #8]
	ldr	r1, [r0]
	mov	r2, r8
	ldr	r4, [r1]
	ldr	r3, [r3]
	mov	r1, r5
	blx	r4
	subs	r4, r0, #0
	blt	.L4
	ldr	r3, [r5]
	mov	r2, r10
	ldr	r1, [r3]
	ldr	r0, [r9]
	bl	nvkm_mc_intr_mask
	ldr	r2, .L12+4
	mov	r1, #64
	mov	r0, r5
	bl	nvkm_falcon_wr32
	mov	r1, r4
	mov	r0, r5
	bl	nvkm_falcon_set_start_addr
	mov	r0, r5
	bl	nvkm_falcon_start
	mov	r1, #100
	mov	r0, r5
	bl	nvkm_falcon_wait_for_halt
	subs	r4, r0, #0
	bne	.L4
	mov	r1, #64
	mov	r0, r5
	bl	nvkm_falcon_rd32
	mov	r4, r0
	b	.L4
.L10:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	-559045211
	.size	gm200_secboot_run_blob, .-gm200_secboot_run_blob
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
