	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2400m_fw_check
_i2400m_fw_check:                       ## @i2400m_fw_check
	.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	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_i2400m_dev
	movq	%rax, %rdi
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	cmpq	$27, %rbx
	ja	LBB0_2
## %bb.1:
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rsi
	movl	$28, %r8d
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_11
LBB0_2:
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	(%r14), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	24(%r14), %edi
	callq	_le32_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	20(%r14), %edi
	callq	_le32_to_cpu
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	20(%r14), %edi
	callq	_le32_to_cpu
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	16(%r14), %edi
	callq	_le32_to_cpu
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	12(%r14), %edi
	callq	_le32_to_cpu
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	8(%r14), %edi
	callq	_le32_to_cpu
	movl	%eax, %r13d
	movl	4(%r14), %edi
	callq	_le32_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	shll	$2, %eax
	cmpq	%rbx, %rax
	jne	LBB0_3
## %bb.4:
	movzwl	-60(%rbp), %r11d                ## 2-byte Folded Reload
	movzwl	-68(%rbp), %r10d                ## 2-byte Folded Reload
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	shll	$2, %eax
	subq	$8, %rsp
	leaq	L_.str.2(%rip), %rdx
	movl	$2, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %r14
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %ecx
	movl	-64(%rbp), %r8d                 ## 4-byte Reload
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	pushq	%rbx
	pushq	%r14
	pushq	%rax
	pushq	%r11
	pushq	%r10
	callq	_d_printf
	addq	$48, %rsp
	cmpl	$6, %r13d
	jne	LBB0_5
## %bb.6:
	movq	%r14, %rbx
	cmpl	$32902, -44(%rbp)               ## 4-byte Folded Reload
                                        ## imm = 0x8086
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_8
## %bb.7:
	movl	(%r15), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
LBB0_8:
	xorl	%r12d, %r12d
	movq	%rbx, %rcx
	cmpl	$537395967, %ecx                ## imm = 0x200802FF
	ja	LBB0_11
## %bb.9:
	movl	(%r15), %edx
	leaq	L_.str.5(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r14, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	jmp	LBB0_10
LBB0_3:
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_11
LBB0_5:
	movl	(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
LBB0_10:
	xorl	%eax, %eax
	callq	_dev_err
LBB0_11:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"firmware %s too short: %zu B vs %zu (at least) expected\n"

L_.str.1:                               ## @.str.1
	.asciz	"firmware %s: bad size, got %zu B vs %u expected\n"

L_.str.2:                               ## @.str.2
	.asciz	"type 0x%x id 0x%x vendor 0x%x; header v%u.%u (%zu B) date %08x (%zu B)\n"

L_.str.3:                               ## @.str.3
	.asciz	"bad fw %s: unexpected module type 0x%x; aborting\n"

L_.str.4:                               ## @.str.4
	.asciz	"bad fw %s? unexpected vendor 0x%04x\n"

L_.str.5:                               ## @.str.5
	.asciz	"bad fw %s? build date too old %08x\n"

	.no_dead_strip	_i2400m_fw_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2400m_fw_check
_i2400m_fw_check:                       ; @i2400m_fw_check
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x22, x2
	mov	x26, x1
	mov	x21, x0
	bl	_i2400m_dev
	mov	x20, x0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
	cmp	x22, #27
	b.hi	LBB0_2
; %bb.1:
	ldr	w2, [x21]
	mov	w8, #28
	str	x8, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_2:
	ldr	w8, [x26]
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	ldr	w0, [x26, #24]
	bl	_le32_to_cpu
	str	w0, [sp, #24]                   ; 4-byte Folded Spill
	ldr	w0, [x26, #20]
	bl	_le32_to_cpu
	mov	x27, x0
	ldr	w0, [x26, #20]
	bl	_le32_to_cpu
	mov	x24, x0
	ldr	w0, [x26, #16]
	bl	_le32_to_cpu
	mov	x28, x0
	ldr	w0, [x26, #12]
	bl	_le32_to_cpu
	mov	x25, x0
	ldr	w0, [x26, #8]
	bl	_le32_to_cpu
	mov	x23, x0
	ldr	w0, [x26, #4]
	bl	_le32_to_cpu
	lsl	w8, w0, #2
	cmp	x8, x22
	b.ne	LBB0_9
; %bb.3:
	and	w7, w24, #0xffff
	and	w6, w27, #0xffff
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	lsl	w8, w8, #2
	str	x22, [sp, #16]
	str	w23, [sp, #8]
	str	x8, [sp]
Lloh5:
	adrp	x2, l_.str.2@PAGE
Lloh6:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w0, #2
	mov	x1, x20
	ldr	w22, [sp, #28]                  ; 4-byte Folded Reload
	mov	x3, x22
	mov	x4, x28
	mov	x5, x25
	bl	_d_printf
	cmp	w22, #6
	b.ne	LBB0_13
; %bb.4:
	mov	w8, #32902
	cmp	w25, w8
	b.eq	LBB0_6
; %bb.5:
	ldr	w2, [x21]
Lloh7:
	adrp	x1, l_.str.4@PAGE
Lloh8:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	x3, x25
	bl	_dev_err
LBB0_6:
	mov	w8, #767
	movk	w8, #8200, lsl #16
	cmp	w23, w8
	b.hi	LBB0_8
; %bb.7:
	ldr	w2, [x21]
Lloh9:
	adrp	x1, l_.str.5@PAGE
Lloh10:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	mov	x3, x23
	bl	_dev_err
LBB0_8:
	mov	w19, #0
	b	LBB0_12
LBB0_9:
	ldr	w2, [x21]
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	str	x8, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_10:
	mov	x0, x20
	mov	x3, x22
LBB0_11:
	bl	_dev_err
LBB0_12:
	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
	add	sp, sp, #128
	ret
LBB0_13:
	ldr	w2, [x21]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x3, x22
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"firmware %s too short: %zu B vs %zu (at least) expected\n"

l_.str.1:                               ; @.str.1
	.asciz	"firmware %s: bad size, got %zu B vs %u expected\n"

l_.str.2:                               ; @.str.2
	.asciz	"type 0x%x id 0x%x vendor 0x%x; header v%u.%u (%zu B) date %08x (%zu B)\n"

l_.str.3:                               ; @.str.3
	.asciz	"bad fw %s: unexpected module type 0x%x; aborting\n"

l_.str.4:                               ; @.str.4
	.asciz	"bad fw %s? unexpected vendor 0x%04x\n"

l_.str.5:                               ; @.str.5
	.asciz	"bad fw %s? build date too old %08x\n"

	.no_dead_strip	_i2400m_fw_check
.subsections_via_symbols
