	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_falcon_v1_load_dmem
_nvkm_falcon_v1_load_dmem:              ## @nvkm_falcon_v1_load_dmem
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	leal	3(%r13), %r12d
	testl	%ecx, %ecx
	cmovnsl	%ecx, %r12d
	movl	%r8d, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_EMEM_START_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%edx, %eax
	jg	LBB0_2
## %bb.1:
	cmpq	$0, (%r15)
	je	LBB0_2
## %bb.9:
	subl	%eax, %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nvkm_falcon_v1_load_emem       ## TAILCALL
LBB0_2:
	movl	%r12d, %eax
	andl	$-4, %eax
	movl	%r13d, %ecx
	subl	%eax, %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %eax
	shll	$3, %ebx
	leal	448(,%rax,8), %esi
	orl	$16777216, %edx                 ## imm = 0x1000000
	movq	%r15, %rdi
	callq	_nvkm_falcon_wr32
	cmpl	$4, %r13d
	jl	LBB0_3
## %bb.4:
	sarl	$2, %r12d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leal	452(%rbx), %r13d
	movl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx,4), %edx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_nvkm_falcon_wr32
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_5
## %bb.6:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_3:
	xorl	%r12d, %r12d
LBB0_7:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	testl	%edi, %edi
	je	LBB0_8
## %bb.10:
	movl	(%r14,%r12,4), %r14d
	addl	$452, %ebx                      ## imm = 0x1C4
	shll	$3, %edi
	callq	_BIT
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %edx
	andl	%r14d, %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nvkm_falcon_wr32               ## TAILCALL
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EMEM_START_ADDR,4,2            ## @EMEM_START_ADDR
	.no_dead_strip	_nvkm_falcon_v1_load_dmem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_falcon_v1_load_dmem
_nvkm_falcon_v1_load_dmem:              ; @nvkm_falcon_v1_load_dmem
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x3
	mov	x20, x1
	mov	x19, x0
	add	w8, w3, #3
	cmp	w3, #0
	csel	w24, w8, w3, lt
Lloh0:
	adrp	x8, _EMEM_START_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EMEM_START_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.gt	LBB0_3
; %bb.1:
	ldr	x9, [x19]
	cbz	x9, LBB0_3
; %bb.2:
	sub	w2, w2, w8
	mov	x0, x19
	mov	x1, x20
	mov	x3, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_nvkm_falcon_v1_load_emem
LBB0_3:
	and	w8, w24, #0xfffffffc
	sub	w22, w21, w8
	lsl	w23, w4, #3
	add	w1, w23, #448
	orr	w2, w2, #0x1000000
	mov	x0, x19
	bl	_nvkm_falcon_wr32
	cmp	w21, #4
	b.lt	LBB0_8
; %bb.4:
	asr	w24, w24, #2
	add	w21, w23, #452
	mov	x25, x24
	mov	x26, x20
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x26], #4
	mov	x0, x19
	mov	x1, x21
	bl	_nvkm_falcon_wr32
	subs	x25, x25, #1
	b.ne	LBB0_5
; %bb.6:
	cbz	w22, LBB0_9
LBB0_7:
	ldr	w21, [x20, x24, lsl #2]
	add	w20, w23, #452
	lsl	w0, w22, #3
	bl	_BIT
	sub	w8, w0, #1
	and	w2, w8, w21
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_nvkm_falcon_wr32
LBB0_8:
	mov	x24, #0
	cbnz	w22, LBB0_7
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EMEM_START_ADDR,4,2            ; @EMEM_START_ADDR
	.no_dead_strip	_nvkm_falcon_v1_load_dmem
.subsections_via_symbols
