	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function af9035_download_firmware_new
_af9035_download_firmware_new:          ## @af9035_download_firmware_new
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -112(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movq	$0, -64(%rbp)
	movq	_CMD_FW_SCATTER_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -112(%rbp)
	movl	(%rsi), %eax
	xorl	%r12d, %r12d
	cmpl	$7, %eax
	jl	LBB0_11
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r15
	xorl	%ecx, %ecx
	movl	$6, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movslq	%eax, %rdx
	cmpq	%rdx, %r14
	jge	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %r13
	incq	%r14
	movl	%eax, %esi
	movq	8(%rbx), %rdx
	cmpq	%rsi, %r14
	jne	LBB0_3
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %eax
	subl	%ecx, %eax
	incl	%eax
	movl	%eax, -112(%rbp)
	movslq	%ecx, %rax
	leaq	(%rdx,%rax,4), %rax
	movq	%rax, -104(%rbp)
	movq	%r15, %rdi
	leaq	-112(%rbp), %rsi
	callq	_af9035_ctrl_msg
	testl	%eax, %eax
	js	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_dev_dbg
	movl	(%rbx), %eax
	movl	%r13d, %ecx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$3, 4(%rdx,%r13,4)
	jne	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$1, 8(%rdx,%r13,4)
	ja	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 12(%rdx,%r13,4)
	jne	LBB0_8
	jmp	LBB0_6
LBB0_9:
	xorl	%r12d, %r12d
	jmp	LBB0_11
LBB0_10:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_dev_dbg
LBB0_11:
	movl	%r12d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_FW_SCATTER_WR,4,2          ## @CMD_FW_SCATTER_WR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"data uploaded=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed=%d\n"

	.comm	_HDR_SIZE,4,2                   ## @HDR_SIZE
	.no_dead_strip	_af9035_download_firmware_new
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function af9035_download_firmware_new
_af9035_download_firmware_new:          ; @af9035_download_firmware_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	ldr	x19, [x0]
	movi.2d	v0, #0000000000000000
	str	xzr, [sp, #48]
	stp	q0, q0, [sp, #16]
	str	q0, [sp]
Lloh0:
	adrp	x8, _CMD_FW_SCATTER_WR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_FW_SCATTER_WR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp]
	ldr	w8, [x1]
	cmp	w8, #7
	b.ge	LBB0_3
LBB0_1:
	mov	w24, #0
LBB0_2:
	mov	x0, x24
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_3:
	mov	x20, x1
	mov	x21, x0
	mov	x25, #0
	mov	w9, #0
Lloh3:
	adrp	x22, l_.str@PAGE
Lloh4:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x10, x25, #7
	add	x25, x25, #1
	cmp	x10, w8, sxtw
	b.ge	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x23, x25, #7
	ldr	x10, [x20, #8]
	cmp	x23, w8, uxtw
	b.ne	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_5 Depth=1
	sub	w8, w25, w9
	add	w8, w8, #7
	str	w8, [sp]
	add	x8, x10, w9, sxtw #2
	str	x8, [sp, #8]
	mov	x1, sp
	mov	x0, x21
	bl	_af9035_ctrl_msg
	tbnz	w0, #31, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_dev_dbg
	ldr	w8, [x20]
	mov	x9, x23
	b	LBB0_4
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x11, x10, x25, lsl #2
	ldr	w12, [x11, #28]
	cmp	w12, #3
	b.ne	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w11, [x11, #32]
	cmp	w11, #1
	b.hi	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x11, x10, x25, lsl #2
	ldr	w11, [x11, #36]
	cbnz	w11, LBB0_4
	b	LBB0_6
LBB0_11:
	mov	x24, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x24
	bl	_dev_dbg
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_FW_SCATTER_WR,4,2          ; @CMD_FW_SCATTER_WR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"data uploaded=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed=%d\n"

	.comm	_HDR_SIZE,4,2                   ; @HDR_SIZE
	.no_dead_strip	_af9035_download_firmware_new
.subsections_via_symbols
