	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function as102_firmware_upload
_as102_firmware_upload:                 ## @as102_firmware_upload
	.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
	movq	%rdx, %r14
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movb	$0, -41(%rbp)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r12
	cmpl	$0, (%r14)
	jle	LBB0_2
## %bb.4:
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %rax
	movabsq	$12884901888, %rcx              ## imm = 0x300000000
	movq	%rcx, (%rax)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	movq	%r12, %rsi
	movl	$2, %edx
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	xorl	%ecx, %ecx
	callq	*(%rax)
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_12
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmpl	(%r14), %r13d
	jge	LBB0_14
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %ebx
	movl	$0, -48(%rbp)
	movslq	%r13d, %rdi
	addq	8(%r14), %rdi
	movl	8(%r12), %edx
	movl	12(%r12), %esi
	leaq	-48(%rbp), %rcx
	leaq	-41(%rbp), %r8
	callq	_parse_hex_line
	testl	%eax, %eax
	jle	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %r13d
	addl	%ebx, %r13d
	cmpl	(%r14), %r13d
	je	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpb	$0, -41(%rbp)
	jne	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %rax
	movabsq	$4294967296, %rcx               ## imm = 0x100000000
	movq	%rcx, (%rax)
	movl	-48(%rbp), %edx
	addl	$12, %edx
	movl	%edx, -48(%rbp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	movq	%r12, %rsi
	jmp	LBB0_8
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_16
LBB0_2:
	movq	%r12, %rdi
	callq	_kfree
	xorl	%r13d, %r13d
	jmp	LBB0_15
LBB0_12:
	movl	%r13d, %ebx
LBB0_13:
	movl	%ebx, %r13d
LBB0_14:
	movq	%r12, %rdi
	callq	_kfree
	testl	%r15d, %r15d
	jne	LBB0_16
LBB0_15:
	movl	%r13d, %r15d
LBB0_16:
	movl	%r15d, %eax
	addq	$24, %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
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_as102_firmware_upload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function as102_firmware_upload
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
lCPI0_1:
	.long	0                               ; 0x0
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_as102_firmware_upload:                 ; @as102_firmware_upload
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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 b8, -72
	.cfi_offset b9, -80
	mov	x20, x2
	mov	x21, x0
	strb	wzr, [sp, #15]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kmalloc
	cbz	x0, LBB0_11
; %bb.1:
	mov	x19, x0
	ldr	w8, [x20]
	cmp	w8, #0
	b.le	LBB0_12
; %bb.2:
	mov	w22, #0
	mov	w23, #0
Lloh3:
	adrp	x8, lCPI0_1@PAGE
Lloh4:
	ldr	d8, [x8, lCPI0_1@PAGEOFF]
Lloh5:
	adrp	x8, lCPI0_0@PAGE
Lloh6:
	ldr	d9, [x8, lCPI0_0@PAGEOFF]
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19]
	str	d8, [x8]
	ldr	x8, [x21]
	ldr	x8, [x8]
	mov	x0, x21
	mov	x1, x19
	mov	w2, #2
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w3, #0
	blr	x8
	mov	x22, x0
	tbnz	w0, #31, LBB0_10
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x20]
	cmp	w23, w8
	b.ge	LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [sp, #8]
	ldr	x8, [x20, #8]
	add	x0, x8, w23, sxtw
	ldp	w2, w1, [x19, #8]
	add	x3, sp, #8
	add	x4, sp, #15
	bl	_parse_hex_line
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x20]
	add	w23, w0, w23
	cmp	w23, w8
	b.eq	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [sp, #15]
	cbnz	w8, LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19]
	str	d9, [x8]
	ldr	w8, [sp, #8]
	add	w2, w8, #12
	str	w2, [sp, #8]
	ldr	x8, [x21]
	ldr	x8, [x8]
	mov	x0, x21
	mov	x1, x19
	b	LBB0_4
LBB0_10:
	mov	x0, x19
	bl	_kfree
	cbnz	w22, LBB0_14
	b	LBB0_13
LBB0_11:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_14
LBB0_12:
	mov	x0, x19
	bl	_kfree
	mov	w23, #0
LBB0_13:
	mov	x22, x23
LBB0_14:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpAdrp	Lloh3, Lloh5
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_as102_firmware_upload
.subsections_via_symbols
