	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function if_usb_prog_firmware
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_if_usb_prog_firmware:                  ## @if_usb_prog_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movq	_LBTF_DEB_USB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_lbtf_deb_enter
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, 16(%r15)
	movq	_THIS_MODULE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_kernel_param_lock
	leaq	24(%r15), %r12
	movq	_lbtf_fw_name@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	80(%r15), %rdx
	movq	%r12, %rdi
	callq	_request_firmware
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	(%rbx), %edi
	callq	_kernel_param_unlock
	movq	(%r12), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edi
	callq	_check_fwfile_format
	testq	%rax, %rax
	je	LBB0_4
LBB0_3:
	movq	_LBTF_DEB_USB@GOTPCREL(%rip), %rbx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_23
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	callq	_pr_err
	movl	(%r13), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	movl	(%rbx), %edi
	callq	_kernel_param_unlock
	movq	_LBTF_DEB_USB@GOTPCREL(%rip), %rbx
	jmp	LBB0_24
LBB0_4:
	movq	%r15, %rdi
	callq	_if_usb_submit_rx_urb_fwload
	testq	%rax, %rax
	js	LBB0_16
## %bb.5:
	leaq	56(%r15), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	44(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	_BOOT_CMD_FW_BY_USB@GOTPCREL(%rip), %r13
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	_if_usb_prog_firmware.reset_count(%rip), %eax
	leal	-1(%rax), %ecx
	movl	%ecx, _if_usb_prog_firmware.reset_count(%rip)
	testl	%eax, %eax
	jle	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_if_usb_reset_device
	movq	%r15, %rdi
	callq	_if_usb_submit_rx_urb_fwload
	testq	%rax, %rax
	js	LBB0_16
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##       Child Loop BB0_8 Depth 3
	movq	$0, (%r15)
	movl	%r12d, %r14d
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_8 Depth 3
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_if_usb_issue_boot_command
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	$100, %edi
	callq	_msleep_interruptible
	movq	(%r15), %rax
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=3
	leal	1(%rbx), %ecx
	cmpl	$9, %ebx
	movl	%ecx, %ebx
	jb	LBB0_8
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=2
	leal	1(%r14), %r12d
	testq	%rax, %rax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=2
	cmpl	$4, %r14d
	movl	%r12d, %r14d
	jl	LBB0_7
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	testq	%rax, %rax
	jle	LBB0_13
## %bb.17:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	$0, 72(%r15)
	movabsq	$-4294967295, %rax              ## imm = 0xFFFFFFFF00000001
	movq	%rax, 8(%r15)
	movq	$0, 32(%r15)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movq	%r15, %rdi
	callq	_if_usb_send_fw_pkt
	movq	16(%r15), %rcx
	movb	$1, %al
	cmpq	$0, (%rcx)
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$0, 32(%r15)
	setne	%al
LBB0_19:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	48(%r15), %edi
	movzbl	%al, %esi
	callq	_wait_event_interruptible
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_del_timer_sync
	movl	40(%r15), %edi
	callq	_usb_kill_urb
	cmpq	$0, 32(%r15)
	jne	LBB0_3
## %bb.20:                              ##   in Loop: Header=BB0_6 Depth=1
	xorl	%r12d, %r12d
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
	movl	_if_usb_prog_firmware.reset_count(%rip), %eax
	leal	-1(%rax), %ecx
	movl	%ecx, _if_usb_prog_firmware.reset_count(%rip)
	testl	%eax, %eax
	jg	LBB0_15
## %bb.21:
	leaq	L_.str.4(%rip), %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_pr_info
	jmp	LBB0_22
LBB0_16:
	movq	80(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_lbtf_deb_usbd
LBB0_22:
	movl	$-1, %r14d
	movq	_LBTF_DEB_USB@GOTPCREL(%rip), %rbx
LBB0_23:
	movq	24(%r15), %rdi
	callq	_release_firmware
	movq	$0, 24(%r15)
	movq	16(%r15), %rdi
	callq	_if_usb_setup_firmware
LBB0_24:
	movl	(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	movl	%r14d, %edx
	callq	_lbtf_deb_leave_args
LBB0_25:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	$-1, %r14d
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	2                               ## @if_usb_prog_firmware.reset_count
_if_usb_prog_firmware.reset_count:
	.long	10                              ## 0xa

	.comm	_LBTF_DEB_USB,4,2               ## @LBTF_DEB_USB
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_lbtf_fw_name,4,2               ## @lbtf_fw_name
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"request_firmware() failed with %#x\n"

L_.str.1:                               ## @.str.1
	.asciz	"firmware %s not found\n"

L_.str.2:                               ## @.str.2
	.asciz	"URB submission is failed\n"

	.comm	_BOOT_CMD_FW_BY_USB,4,2         ## @BOOT_CMD_FW_BY_USB
L_.str.3:                               ## @.str.3
	.asciz	"failed to load fw, resetting device!\n"

L_.str.4:                               ## @.str.4
	.asciz	"FW download failure, time = %d ms\n"

L_.str.5:                               ## @.str.5
	.asciz	"ret %d"

	.no_dead_strip	_if_usb_prog_firmware
.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 if_usb_prog_firmware
lCPI0_0:
	.long	1                               ; 0x1
	.long	4294967295                      ; 0xffffffff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_if_usb_prog_firmware:                  ; @if_usb_prog_firmware
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x21, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x24, _LBTF_DEB_USB@GOTPAGE
Lloh1:
	ldr	x24, [x24, _LBTF_DEB_USB@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_lbtf_deb_enter
	str	x21, [x20, #16]
Lloh2:
	adrp	x23, _THIS_MODULE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _THIS_MODULE@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_kernel_param_lock
	add	x22, x20, #24
Lloh4:
	adrp	x25, _lbtf_fw_name@GOTPAGE
Lloh5:
	ldr	x25, [x25, _lbtf_fw_name@GOTPAGEOFF]
	ldr	w1, [x25]
	ldr	x2, [x20, #80]
	mov	x0, x22
	bl	_request_firmware
	mov	x19, x0
	tbnz	w0, #31, LBB0_17
; %bb.1:
	ldr	w0, [x23]
	bl	_kernel_param_unlock
	ldr	x8, [x22]
	ldp	w1, w0, [x8]
	bl	_check_fwfile_format
	cbnz	x0, LBB0_21
; %bb.2:
	mov	x0, x20
	bl	_if_usb_submit_rx_urb_fwload
	tbnz	x0, #63, LBB0_18
; %bb.3:
	mov	w23, #0
	add	x25, x20, #56
Lloh6:
	adrp	x26, _BOOT_CMD_FW_BY_USB@GOTPAGE
Lloh7:
	ldr	x26, [x26, _BOOT_CMD_FW_BY_USB@GOTPAGEOFF]
	add	x22, x20, #44
	adrp	x27, _if_usb_prog_firmware.reset_count@PAGE
Lloh8:
	adrp	x8, lCPI0_0@PAGE
Lloh9:
	ldr	d8, [x8, lCPI0_0@PAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x27, _if_usb_prog_firmware.reset_count@PAGEOFF]
	subs	w8, w8, #1
	str	w8, [x27, _if_usb_prog_firmware.reset_count@PAGEOFF]
	b.lt	LBB0_25
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	bl	_if_usb_reset_device
	mov	x0, x20
	bl	_if_usb_submit_rx_urb_fwload
	tbnz	x0, #63, LBB0_18
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;       Child Loop BB0_8 Depth 3
	str	xzr, [x20]
	mov	x28, x23
LBB0_7:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_8 Depth 3
	ldr	w1, [x26]
	mov	x0, x20
	bl	_if_usb_issue_boot_command
	mov	w23, #0
LBB0_8:                                 ;   Parent Loop BB0_6 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	add	w24, w23, #1
	mov	w0, #100
	bl	_msleep_interruptible
	ldr	x8, [x20]
	cmp	x8, #0
	ccmp	w23, #9, #2, eq
	mov	x23, x24
	b.lo	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	add	w23, w28, #1
	cmp	x8, #0
	ccmp	w28, #4, #0, eq
	mov	x28, x23
	b.lt	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	x8, #0
	b.le	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	str	xzr, [x20, #72]
	str	xzr, [x20, #32]
	str	d8, [x20, #8]
	stp	xzr, xzr, [x25]
	mov	x0, x20
	bl	_if_usb_send_fw_pkt
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w1, #1
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20, #32]
	cmp	x8, #0
	cset	w1, ne
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x20, #48]
	bl	_wait_event_interruptible
	mov	x0, x22
	bl	_del_timer_sync
	ldr	w0, [x20, #40]
	bl	_usb_kill_urb
	ldr	x8, [x20, #32]
	cbnz	x8, LBB0_20
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_info
	ldr	w8, [x27, _if_usb_prog_firmware.reset_count@PAGEOFF]
	sub	w9, w8, #1
	str	w9, [x27, _if_usb_prog_firmware.reset_count@PAGEOFF]
	cmp	w8, #0
	b.le	LBB0_24
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w23, #0
	b	LBB0_5
LBB0_17:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_pr_err
	ldr	w1, [x25]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	ldr	w0, [x23]
	bl	_kernel_param_unlock
	b	LBB0_22
LBB0_18:
	ldr	x0, [x20, #80]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_lbtf_deb_usbd
LBB0_19:
	mov	w19, #-1
LBB0_20:
Lloh18:
	adrp	x24, _LBTF_DEB_USB@GOTPAGE
Lloh19:
	ldr	x24, [x24, _LBTF_DEB_USB@GOTPAGEOFF]
LBB0_21:
	ldr	x0, [x20, #24]
	bl	_release_firmware
	str	xzr, [x20, #24]
	ldr	x0, [x20, #16]
	bl	_if_usb_setup_firmware
LBB0_22:
	ldr	w0, [x24]
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, x19
	bl	_lbtf_deb_leave_args
LBB0_23:
	mov	x0, x19
	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
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_24:
	str	xzr, [sp]
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_info
	b	LBB0_19
LBB0_25:
	mov	w19, #-1
	b	LBB0_23
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @if_usb_prog_firmware.reset_count
_if_usb_prog_firmware.reset_count:
	.long	10                              ; 0xa

	.comm	_LBTF_DEB_USB,4,2               ; @LBTF_DEB_USB
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_lbtf_fw_name,4,2               ; @lbtf_fw_name
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"request_firmware() failed with %#x\n"

l_.str.1:                               ; @.str.1
	.asciz	"firmware %s not found\n"

l_.str.2:                               ; @.str.2
	.asciz	"URB submission is failed\n"

	.comm	_BOOT_CMD_FW_BY_USB,4,2         ; @BOOT_CMD_FW_BY_USB
l_.str.3:                               ; @.str.3
	.asciz	"failed to load fw, resetting device!\n"

l_.str.4:                               ; @.str.4
	.asciz	"FW download failure, time = %d ms\n"

l_.str.5:                               ; @.str.5
	.asciz	"ret %d"

	.no_dead_strip	_if_usb_prog_firmware
.subsections_via_symbols
