	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_sd7220_prog_ld
_qib_sd7220_prog_ld:                    ## @qib_sd7220_prog_ld
	.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
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.2:
	movl	%ecx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %r13
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %ebx
	subl	%r15d, %ebx
	movq	_PROG_CHUNK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	cmovgel	%eax, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	(%r15,%rax), %edx
	movslq	%r15d, %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rcx
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%ebx, %r8d
	xorl	%r9d, %r9d
	callq	_qib_sd7220_ram_xfer
	cmpl	%ebx, %eax
	jl	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	addl	%r15d, %ebx
	movl	%ebx, %r15d
	cmpl	%r14d, %ebx
	jl	LBB0_4
	jmp	LBB0_6
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_5:
	movl	$-1, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PROG_CHUNK,4,2                 ## @PROG_CHUNK
	.no_dead_strip	_qib_sd7220_prog_ld
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_sd7220_prog_ld
_qib_sd7220_prog_ld:                    ; @qib_sd7220_prog_ld
	.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
	cmp	w3, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	mov	w20, #0
Lloh0:
	adrp	x26, _PROG_CHUNK@GOTPAGE
Lloh1:
	ldr	x26, [x26, _PROG_CHUNK@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x26]
	sub	w9, w21, w20
	cmp	w9, w8
	csel	w25, w9, w8, lt
	add	w2, w20, w19
	add	x3, x22, w20, sxtw #2
	mov	x0, x24
	mov	x1, x23
	mov	x4, x25
	mov	w5, #0
	bl	_qib_sd7220_ram_xfer
	cmp	w0, w25
	b.lt	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w20, w25, w20
	cmp	w20, w21
	b.lt	LBB0_2
	b	LBB0_6
LBB0_4:
	mov	w20, #0
	b	LBB0_6
LBB0_5:
	mov	w20, #-1
LBB0_6:
	mov	x0, 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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PROG_CHUNK,4,2                 ; @PROG_CHUNK
	.no_dead_strip	_qib_sd7220_prog_ld
.subsections_via_symbols
