	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at76_load_internal_fw
_at76_load_internal_fw:                 ## @at76_load_internal_fw
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	8(%rsi), %edi
	callq	_at76_is_505a
	movl	%eax, %r12d
	movq	_HZ@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	addl	%ecx, %ecx
	testl	%eax, %eax
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	cmovel	%eax, %ecx
	movq	%r14, %rdi
	callq	_at76_usbdfu_download
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movq	_DBG_DEVSTART@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_at76_dbg
	testl	%r12d, %r12d
	jne	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	callq	_at76_remap
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_5
LBB0_6:
	movl	(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_at76_dbg
	movl	(%r13), %eax
	leal	(%rax,%rax), %edi
	incl	%edi
	callq	_schedule_timeout_interruptible
	movq	%r14, %rdi
	callq	_usb_reset_device
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_dev_err
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HZ,4,2                         ## @HZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"downloading internal fw failed with %d\n"

	.comm	_DBG_DEVSTART,4,2               ## @DBG_DEVSTART
L_.str.1:                               ## @.str.1
	.asciz	"sending REMAP"

L_.str.2:                               ## @.str.2
	.asciz	"sending REMAP failed with %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"sleeping for 2 seconds"

	.no_dead_strip	_at76_load_internal_fw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function at76_load_internal_fw
_at76_load_internal_fw:                 ; @at76_load_internal_fw
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x1, #8]
	bl	_at76_is_505a
	mov	x21, x0
	ldp	w2, w1, [x20]
Lloh0:
	adrp	x22, _HZ@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HZ@GOTPAGEOFF]
	ldr	w8, [x22]
	lsl	w8, w8, #1
	cmp	w0, #0
	csel	w3, wzr, w8, eq
	mov	x0, x19
	bl	_at76_usbdfu_download
	mov	x20, x0
	tbnz	w0, #31, LBB0_4
; %bb.1:
Lloh2:
	adrp	x23, _DBG_DEVSTART@GOTPAGE
Lloh3:
	ldr	x23, [x23, _DBG_DEVSTART@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_at76_dbg
	cbnz	w21, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_at76_remap
	mov	x20, x0
	tbnz	w0, #31, LBB0_5
LBB0_3:
	ldr	w0, [x23]
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_at76_dbg
	ldr	w8, [x22]
	mov	w0, #1
	bfi	w0, w8, #1, #31
	bl	_schedule_timeout_interruptible
	mov	x0, x19
	bl	_usb_reset_device
	b	LBB0_7
LBB0_4:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	x0, x19
	mov	x2, x20
	bl	_dev_err
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_HZ,4,2                         ; @HZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"downloading internal fw failed with %d\n"

	.comm	_DBG_DEVSTART,4,2               ; @DBG_DEVSTART
l_.str.1:                               ; @.str.1
	.asciz	"sending REMAP"

l_.str.2:                               ; @.str.2
	.asciz	"sending REMAP failed with %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"sleeping for 2 seconds"

	.no_dead_strip	_at76_load_internal_fw
.subsections_via_symbols
