	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_as102_fw_upload                ## -- Begin function as102_fw_upload
	.p2align	4, 0x90
_as102_fw_upload:                       ## @as102_fw_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	%rdi, %r12
	movq	_dual_tuner@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	_as102_dt_fw2@GOTPCREL(%rip), %rax
	cmoveq	_as102_st_fw2@GOTPCREL(%rip), %rax
	movq	$0, -48(%rbp)
	movq	(%rdi), %r13
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_as102_dt_fw1@GOTPCREL(%rip), %rax
	cmoveq	_as102_st_fw1@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_MAX_FW_PKT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	-48(%rbp), %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_request_firmware
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_as102_firmware_upload
	movl	%eax, %ebx
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%ebx, %ebx
	js	LBB0_5
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rdx
	callq	_pr_info
	movq	-48(%rbp), %rdi
	callq	_release_firmware
	movq	$0, -48(%rbp)
	movl	$100, %edi
	callq	_mdelay
	leaq	-48(%rbp), %rdi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_request_firmware
	testl	%eax, %eax
	js	LBB0_3
## %bb.8:
	movq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_as102_firmware_upload
	movl	%eax, %ebx
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%ebx, %ebx
	js	LBB0_9
## %bb.10:
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rdx
	callq	_pr_info
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_3:
	movl	%eax, %ebx
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_11
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_6
LBB0_9:
	leaq	L_.str.3(%rip), %rdi
LBB0_6:
	xorl	%eax, %eax
	callq	_pr_err
LBB0_11:
	movq	%r15, %rdi
	callq	_kfree
	movq	-48(%rbp), %rdi
	callq	_release_firmware
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_dual_tuner,8,3                 ## @dual_tuner
	.comm	_as102_dt_fw1,8,3               ## @as102_dt_fw1
	.comm	_as102_dt_fw2,8,3               ## @as102_dt_fw2
	.comm	_as102_st_fw1,8,3               ## @as102_st_fw1
	.comm	_as102_st_fw2,8,3               ## @as102_st_fw2
	.comm	_MAX_FW_PKT_SIZE,4,2            ## @MAX_FW_PKT_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: unable to locate firmware file: %s\n"

	.comm	_DRIVER_NAME,4,2                ## @DRIVER_NAME
L_.str.1:                               ## @.str.1
	.asciz	"%s: error during firmware upload part1\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: firmware: %s loaded with success\n"

L_.str.3:                               ## @.str.3
	.asciz	"%s: error during firmware upload part2\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_as102_fw_upload                ; -- Begin function as102_fw_upload
	.p2align	2
_as102_fw_upload:                       ; @as102_fw_upload
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [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 w25, -72
	.cfi_offset w26, -80
	mov	x22, x0
	str	xzr, [sp, #8]
	ldr	x23, [x0]
Lloh0:
	adrp	x8, _dual_tuner@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dual_tuner@GOTPAGEOFF]
Lloh2:
	adrp	x9, _as102_st_fw2@GOTPAGE
Lloh3:
	ldr	x9, [x9, _as102_st_fw2@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x10, _as102_dt_fw2@GOTPAGE
Lloh6:
	ldr	x10, [x10, _as102_dt_fw2@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x10, eq
	ldr	x20, [x8]
Lloh7:
	adrp	x8, _as102_st_fw1@GOTPAGE
Lloh8:
	ldr	x8, [x8, _as102_st_fw1@GOTPAGEOFF]
Lloh9:
	adrp	x9, _as102_dt_fw1@GOTPAGE
Lloh10:
	ldr	x9, [x9, _as102_dt_fw1@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	x24, [x8]
Lloh11:
	adrp	x8, _MAX_FW_PKT_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MAX_FW_PKT_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.1:
	add	x0, sp, #8
	mov	x1, x24
	mov	x2, x23
	bl	_request_firmware
	tbnz	w0, #31, LBB0_7
; %bb.2:
	ldr	x2, [sp, #8]
	mov	x0, x22
	mov	x1, x19
	bl	_as102_firmware_upload
Lloh17:
	adrp	x25, _DRIVER_NAME@GOTPAGE
Lloh18:
	ldr	x25, [x25, _DRIVER_NAME@GOTPAGEOFF]
	ldr	w1, [x25]
	tbnz	w0, #31, LBB0_8
; %bb.3:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x2, x24
	bl	_pr_info
	ldr	x0, [sp, #8]
	bl	_release_firmware
	str	xzr, [sp, #8]
	mov	w0, #100
	bl	_mdelay
	add	x0, sp, #8
	mov	x1, x20
	mov	x2, x23
	bl	_request_firmware
	tbnz	w0, #31, LBB0_9
; %bb.4:
	ldr	x2, [sp, #8]
	mov	x0, x22
	mov	x1, x19
	bl	_as102_firmware_upload
	mov	x21, x0
	ldr	w1, [x25]
	tbnz	w0, #31, LBB0_13
; %bb.5:
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_pr_info
	b	LBB0_12
LBB0_6:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_7:
	mov	x21, x0
Lloh26:
	adrp	x8, _DRIVER_NAME@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DRIVER_NAME@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	str	x24, [sp]
	b	LBB0_10
LBB0_8:
	mov	x21, x0
Lloh29:
	adrp	x0, l_.str.1@PAGE
Lloh30:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_9:
	mov	x21, x0
	ldr	w1, [x25]
	str	x20, [sp]
LBB0_10:
Lloh31:
	adrp	x0, l_.str@PAGE
Lloh32:
	add	x0, x0, l_.str@PAGEOFF
LBB0_11:
	bl	_pr_err
LBB0_12:
	mov	x0, x19
	bl	_kfree
	ldr	x0, [sp, #8]
	bl	_release_firmware
	mov	x0, x21
	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	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_13:
Lloh33:
	adrp	x0, l_.str.3@PAGE
Lloh34:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_dual_tuner,8,3                 ; @dual_tuner
	.comm	_as102_dt_fw1,8,3               ; @as102_dt_fw1
	.comm	_as102_dt_fw2,8,3               ; @as102_dt_fw2
	.comm	_as102_st_fw1,8,3               ; @as102_st_fw1
	.comm	_as102_st_fw2,8,3               ; @as102_st_fw2
	.comm	_MAX_FW_PKT_SIZE,4,2            ; @MAX_FW_PKT_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: unable to locate firmware file: %s\n"

	.comm	_DRIVER_NAME,4,2                ; @DRIVER_NAME
l_.str.1:                               ; @.str.1
	.asciz	"%s: error during firmware upload part1\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: firmware: %s loaded with success\n"

l_.str.3:                               ; @.str.3
	.asciz	"%s: error during firmware upload part2\n"

.subsections_via_symbols
