	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at76_load_firmware
_at76_load_firmware:                    ## @at76_load_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
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	_firmwares@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	%esi, %eax
	leaq	(%rax,%rax,8), %r14
	leaq	(,%r14,8), %r15
	addq	%r13, %r15
	movq	_fw_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	cmpl	$0, (%r13,%r14,8)
	movq	_DBG_FW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_at76_dbg
LBB0_9:
	movq	_fw_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	cmpl	$0, (%r15)
	cmovneq	%r15, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, -72(%rbp)                 ## 4-byte Spill
	leaq	8(,%r14,8), %rbx
	addq	%r13, %rbx
	movq	8(%r13,%r14,8), %rdx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_at76_dbg
	leaq	64(,%r14,8), %r15
	addq	%r13, %r15
	movq	8(%r13,%r14,8), %rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_request_firmware
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	_DBG_FW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_at76_dbg
	movq	(%r15), %rax
	movl	(%rax), %edx
	cmpl	$40, %edx
	ja	LBB0_6
## %bb.5:
	leaq	L_.str.5(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_3:
	movq	(%rbx), %rdx
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_6:
	movq	8(%rax), %r15
	movl	36(%r15), %edi
	callq	_le32_to_cpu
	movl	%eax, 16(%r13,%r14,8)
	movl	-72(%rbp), %r12d                ## 4-byte Reload
	cmpl	%r12d, %eax
	jne	LBB0_7
## %bb.8:
	movups	16(%r15), %xmm0
	movups	%xmm0, 48(%r13,%r14,8)
	movl	32(%r15), %edi
	callq	_le32_to_cpu
	cltq
	addq	%r15, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	12(%r15), %edi
	callq	_le32_to_cpu
	cltq
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 40(%r13,%r14,8)
	movl	8(%r15), %edi
	callq	_le32_to_cpu
	movl	%eax, 20(%r13,%r14,8)
	movl	4(%r15), %edi
	callq	_le32_to_cpu
	cltq
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 32(%r13,%r14,8)
	movl	(%r15), %edi
	callq	_le32_to_cpu
	movl	%eax, 24(%r13,%r14,8)
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	$1, (%r13)
	movq	_KERN_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movl	28(%r15), %r8d
	movl	24(%r15), %r9d
	movl	16(%r15), %eax
	movl	20(%r15), %ebx
	leaq	L_.str.7(%rip), %rdx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	pushq	%rax
	pushq	%rbx
	callq	_dev_printk
	addq	$16, %rsp
	movq	_DBG_DEVSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	12(%r15), %edi
	callq	_le32_to_cpu
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	8(%r15), %edi
	callq	_le32_to_cpu
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	4(%r15), %edi
	callq	_le32_to_cpu
	movl	%eax, %r14d
	movl	(%r15), %edi
	movq	%r13, %r15
	callq	_le32_to_cpu
	movl	%eax, %ebx
	subq	$8, %rsp
	leaq	L_.str.8(%rip), %rsi
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	%r12d, %edx
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	movl	-68(%rbp), %r8d                 ## 4-byte Reload
	movl	%r14d, %r9d
	xorl	%eax, %eax
	pushq	%rbx
	callq	_at76_dbg
	addq	$16, %rsp
	movq	_DBG_DEVSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.9(%rip), %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_at76_dbg
	jmp	LBB0_9
LBB0_7:
	leaq	L_.str.6(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_firmwares,8,3                  ## @firmwares
	.comm	_fw_mutex,4,2                   ## @fw_mutex
	.comm	_DBG_FW,4,2                     ## @DBG_FW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"re-using previously loaded fw"

L_.str.1:                               ## @.str.1
	.asciz	"downloading firmware %s"

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

L_.str.3:                               ## @.str.3
	.asciz	"you may need to download the firmware from http://developer.berlios.de/projects/at76c503a/\n"

L_.str.4:                               ## @.str.4
	.asciz	"got it."

L_.str.5:                               ## @.str.5
	.asciz	"firmware is too short (0x%zx)\n"

L_.str.6:                               ## @.str.6
	.asciz	"board type mismatch, requested %u, got %u\n"

	.comm	_KERN_DEBUG,4,2                 ## @KERN_DEBUG
L_.str.7:                               ## @.str.7
	.asciz	"using firmware %s (version %d.%d.%d-%d)\n"

	.comm	_DBG_DEVSTART,4,2               ## @DBG_DEVSTART
L_.str.8:                               ## @.str.8
	.asciz	"board %u, int %d:%d, ext %d:%d"

L_.str.9:                               ## @.str.9
	.asciz	"firmware id %s"

	.no_dead_strip	_at76_load_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function at76_load_firmware
_at76_load_firmware:                    ; @at76_load_firmware
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _firmwares@GOTPAGE
Lloh1:
	ldr	x8, [x8, _firmwares@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	mov	w8, #72
	umaddl	x24, w1, w8, x23
Lloh3:
	adrp	x0, _fw_mutex@GOTPAGE
Lloh4:
	ldr	x0, [x0, _fw_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	w8, [x24]
Lloh5:
	adrp	x25, _DBG_FW@GOTPAGE
Lloh6:
	ldr	x25, [x25, _DBG_FW@GOTPAGEOFF]
	ldr	w0, [x25]
	cbz	w8, LBB0_3
; %bb.1:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	bl	_at76_dbg
	b	LBB0_11
LBB0_3:
	mov	w26, w19
	mov	w8, #72
	madd	x22, x26, x8, x23
	ldr	x8, [x22, #8]!
	str	x8, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_at76_dbg
	add	x21, x22, #56
	ldr	x1, [x22]
	mov	x0, x21
	mov	x2, x20
	bl	_request_firmware
	tbnz	w0, #31, LBB0_6
; %bb.4:
	ldr	w0, [x25]
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_at76_dbg
	ldr	x9, [x21]
	ldr	w8, [x9]
	cmp	w8, #40
	b.hi	LBB0_7
; %bb.5:
	str	x8, [sp]
Lloh13:
	adrp	x1, l_.str.5@PAGE
Lloh14:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_10
LBB0_6:
	ldr	x8, [x22]
	str	x8, [sp]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_7:
	ldr	x25, [x9, #8]
	ldr	w0, [x25, #36]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	mov	w8, #72
	madd	x8, x26, x8, x23
	str	w0, [x8, #16]
	cmp	w0, w19
	b.ne	LBB0_9
; %bb.8:
	mov	w8, #72
	madd	x21, x26, x8, x23
	ldr	q0, [x25, #16]
	str	q0, [x21, #48]
	ldr	w0, [x25, #32]
	bl	_le32_to_cpu
	add	x26, x25, w0, sxtw
	ldr	w0, [x25, #12]
	bl	_le32_to_cpu
	add	x8, x25, w0, sxtw #2
	str	x8, [x21, #40]
	ldr	w0, [x25, #8]
	bl	_le32_to_cpu
	str	w0, [x21, #20]
	ldr	w0, [x25, #4]
	bl	_le32_to_cpu
	add	x8, x25, w0, sxtw #2
	str	x8, [x21, #32]
	ldr	w0, [x25]
	bl	_le32_to_cpu
	str	w0, [x21, #24]
	mov	w8, #1
	str	w8, [x24]
Lloh19:
	adrp	x8, _KERN_DEBUG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _KERN_DEBUG@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	ldr	x3, [x22]
	ldp	w5, w4, [x25, #24]
	ldp	w7, w6, [x25, #16]
Lloh22:
	adrp	x2, l_.str.7@PAGE
Lloh23:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x1, x20
	bl	_dev_printk
Lloh24:
	adrp	x27, _DBG_DEVSTART@GOTPAGE
Lloh25:
	ldr	x27, [x27, _DBG_DEVSTART@GOTPAGEOFF]
	ldr	w20, [x27]
	ldr	w0, [x25, #12]
	bl	_le32_to_cpu
	mov	x21, x0
	ldr	w0, [x25, #8]
	bl	_le32_to_cpu
	mov	x22, x0
	ldr	w0, [x25, #4]
	bl	_le32_to_cpu
	mov	x23, x0
	ldr	w0, [x25]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x23, x0, [sp, #24]
	stp	x21, x22, [sp, #8]
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	str	x19, [sp]
Lloh26:
	adrp	x1, l_.str.8@PAGE
Lloh27:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x20
	bl	_at76_dbg
	ldr	w0, [x27]
	str	x26, [sp]
Lloh28:
	adrp	x1, l_.str.9@PAGE
Lloh29:
	add	x1, x1, l_.str.9@PAGEOFF
	b	LBB0_2
LBB0_9:
	stp	x19, x0, [sp]
Lloh30:
	adrp	x1, l_.str.6@PAGE
Lloh31:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_10:
	mov	x0, x20
	bl	_dev_err
LBB0_11:
Lloh32:
	adrp	x0, _fw_mutex@GOTPAGE
Lloh33:
	ldr	x0, [x0, _fw_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	ldr	w8, [x24]
	cmp	w8, #0
	csel	x0, xzr, x24, eq
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_firmwares,8,3                  ; @firmwares
	.comm	_fw_mutex,4,2                   ; @fw_mutex
	.comm	_DBG_FW,4,2                     ; @DBG_FW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"re-using previously loaded fw"

l_.str.1:                               ; @.str.1
	.asciz	"downloading firmware %s"

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

l_.str.3:                               ; @.str.3
	.asciz	"you may need to download the firmware from http://developer.berlios.de/projects/at76c503a/\n"

l_.str.4:                               ; @.str.4
	.asciz	"got it."

l_.str.5:                               ; @.str.5
	.asciz	"firmware is too short (0x%zx)\n"

l_.str.6:                               ; @.str.6
	.asciz	"board type mismatch, requested %u, got %u\n"

	.comm	_KERN_DEBUG,4,2                 ; @KERN_DEBUG
l_.str.7:                               ; @.str.7
	.asciz	"using firmware %s (version %d.%d.%d-%d)\n"

	.comm	_DBG_DEVSTART,4,2               ; @DBG_DEVSTART
l_.str.8:                               ; @.str.8
	.asciz	"board %u, int %d:%d, ext %d:%d"

l_.str.9:                               ; @.str.9
	.asciz	"firmware id %s"

	.no_dead_strip	_at76_load_firmware
.subsections_via_symbols
