	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lme2510_download_firmware
_lme2510_download_firmware:             ## @lme2510_download_firmware
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$128, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rcx
	leaq	L_.str.1(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	callq	_info
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, %rax
	addq	$8, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	$511, %r12d                     ## imm = 0x1FF
	xorl	%ebx, %ebx
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$129, (%rcx)
	movl	%r12d, %r13d
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, 4(%rcx)
	leal	1(%r13), %r14d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_memcpy
	leal	4(%r13), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_check_sum
	movslq	%r13d, %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, 12(%rdx,%rcx,4)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	12(%rdx), %edx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	8(%rsi,%rcx,4), %ecx
	movl	$1, %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %r8d
	callq	_deb_info
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	$1, %r8d
	callq	_lme2510_usb_talk
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$136, (%rcx)
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	movl	$-1, %eax
	cmovnel	%eax, %ebx
	addq	$50, %r15
	addl	$-50, %r12d
	cmpl	$512, %r15d                     ## imm = 0x200
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	jge	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movq	8(%r14), %rbx
	addq	%r15, %rbx
	cmpl	$462, %r15d                     ## imm = 0x1CE
	jg	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, (%rcx)
	movl	$49, %r13d
	jmp	LBB0_6
LBB0_7:
	movl	(%r14), %eax
	cmpl	$513, %eax                      ## imm = 0x201
	jl	LBB0_13
## %bb.8:
	leal	-513(%rax), %r15d
	movl	$512, %r12d                     ## imm = 0x200
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	$2, (%rcx)
	movl	$49, %ebx
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%ebx, 4(%rcx)
	leal	1(%rbx), %r13d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_memcpy
	leal	4(%rbx), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_check_sum
	movslq	%ebx, %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, 12(%rdx,%rcx,4)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	12(%rdx), %edx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	8(%rsi,%rcx,4), %ecx
	movl	$1, %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %r8d
	callq	_deb_info
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	$1, %r8d
	callq	_lme2510_usb_talk
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$136, (%rcx)
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	movl	$-1, %eax
	cmovnel	%eax, %ebx
	addq	$50, %r12
	addl	$-50, %r15d
	cmpl	%r12d, -88(%rbp)                ## 4-byte Folded Reload
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	jle	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %r14
	addq	%r12, %r14
	leal	1(%r15), %eax
	cmpl	$49, %eax
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	jg	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	$130, (%rcx)
	movl	%r15d, %ebx
	jmp	LBB0_12
LBB0_13:
	movl	$138, (%rcx)
	movl	$2000, %edi                     ## imm = 0x7D0
	movq	%rcx, %r14
	callq	_msleep
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	$1, %edx
	movq	%r14, %rcx
	movl	$1, %r8d
	callq	_lme2510_usb_talk
	movl	$400, %edi                      ## imm = 0x190
	callq	_msleep
	testl	%ebx, %ebx
	js	LBB0_14
## %bb.15:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_info
	jmp	LBB0_16
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_info
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_14:
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_info
LBB0_16:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	movq	_RECONNECTS_USB@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FRM Could not start Firmware Download(Buffer allocation failed)"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"FRM Starting Firmware Download"

L_.str.2:                               ## @.str.2
	.asciz	"Data S=%02x:E=%02x CS= %02x"

L_.str.3:                               ## @.str.3
	.asciz	"FRM Firmware Download Failed (%04x)"

L_.str.4:                               ## @.str.4
	.asciz	"FRM Firmware Download Completed - Resetting Device"

	.comm	_RECONNECTS_USB,4,2             ## @RECONNECTS_USB
	.no_dead_strip	_lme2510_download_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lme2510_download_firmware
_lme2510_download_firmware:             ; @lme2510_download_firmware
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #128
	bl	_kzalloc
	cbz	x0, LBB0_14
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_info
	mov	x28, #0
	mov	w27, #0
	add	x22, x19, #8
	mov	w20, #511
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #129
	str	w9, [x19]
	mov	x23, x20
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x28, x8
	str	w23, [x19, #4]
	add	w25, w23, #1
	mov	x0, x22
	mov	x1, x24
	mov	x2, x25
	bl	_memcpy
	add	w26, w23, #4
	mov	x0, x24
	mov	x1, x25
	bl	_check_sum
	mov	x4, x0
	add	x8, x19, w23, sxtw #2
	str	w0, [x8, #12]
	ldr	w2, [x19, #12]
	ldr	w3, [x8, #8]
	mov	w0, #1
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_deb_info
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	mov	x1, x19
	mov	x2, x26
	mov	x3, x19
	mov	w4, #1
	bl	_lme2510_usb_talk
	ldr	w8, [x19]
	cmp	w8, #136
	csinv	w27, w27, wzr, eq
	add	x28, x28, #50
	sub	w20, w20, #50
	cmp	w28, #512
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	cmp	w28, #462
	b.gt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #1
	str	w9, [x19]
	mov	w23, #49
	b	LBB0_3
LBB0_6:
	ldr	w8, [x21]
	subs	w23, w8, #513
	b.lt	LBB0_12
; %bb.7:
	mov	w28, #512
	str	w8, [sp, #20]                   ; 4-byte Folded Spill
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	mov	w9, #2
	str	w9, [x19]
	mov	w20, #49
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x24, x28, x8
	str	w20, [x19, #4]
	add	w25, w20, #1
	mov	x0, x22
	mov	x1, x24
	mov	x2, x25
	bl	_memcpy
	add	w26, w20, #4
	mov	x0, x24
	mov	x1, x25
	bl	_check_sum
	mov	x4, x0
	add	x8, x19, w20, sxtw #2
	str	w0, [x8, #12]
	ldr	w2, [x19, #12]
	ldr	w3, [x8, #8]
	mov	w0, #1
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_deb_info
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	mov	x1, x19
	mov	x2, x26
	mov	x3, x19
	mov	w4, #1
	bl	_lme2510_usb_talk
	ldr	w8, [x19]
	cmp	w8, #136
	csinv	w27, w27, wzr, eq
	add	x28, x28, #50
	sub	w23, w23, #50
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w8, w28
	b.le	LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	add	w9, w23, #1
	cmp	w9, #49
	b.gt	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w9, #130
	str	w9, [x19]
	mov	x20, x23
	b	LBB0_9
LBB0_12:
	mov	w8, #138
	str	w8, [x19]
	mov	w0, #2000
	bl	_msleep
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	mov	x1, x19
	mov	w2, #1
	mov	x3, x19
	mov	w4, #1
	bl	_lme2510_usb_talk
	mov	w0, #400
	bl	_msleep
	tbnz	w27, #31, LBB0_15
; %bb.13:
Lloh9:
	adrp	x0, l_.str.4@PAGE
Lloh10:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_16
LBB0_14:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_info
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_15:
	str	x27, [sp]
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_16:
	bl	_info
	mov	x0, x19
	bl	_kfree
Lloh18:
	adrp	x8, _RECONNECTS_USB@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RECONNECTS_USB@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
LBB0_17:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FRM Could not start Firmware Download(Buffer allocation failed)"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"FRM Starting Firmware Download"

l_.str.2:                               ; @.str.2
	.asciz	"Data S=%02x:E=%02x CS= %02x"

l_.str.3:                               ; @.str.3
	.asciz	"FRM Firmware Download Failed (%04x)"

l_.str.4:                               ; @.str.4
	.asciz	"FRM Firmware Download Completed - Resetting Device"

	.comm	_RECONNECTS_USB,4,2             ; @RECONNECTS_USB
	.no_dead_strip	_lme2510_download_firmware
.subsections_via_symbols
