	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2400m_fw_hdr_check
_i2400m_fw_hdr_check:                   ## @i2400m_fw_hdr_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r12
	callq	_i2400m_dev
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	24(%rbx), %edi
	callq	_le32_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	20(%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, %r15d
	shll	$2, %r15d
	movl	16(%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, %r14d
	shrl	$16, %r14d
	movl	16(%rbx), %edi
	callq	_le32_to_cpu
	movzwl	%ax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	12(%rbx), %edi
	callq	_le32_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	8(%rbx), %edi
	callq	_le32_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	4(%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, %r13d
	movl	(%rbx), %edi
	callq	_le32_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	shll	$2, %eax
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	(%r12), %ecx
	leaq	L_.str(%rip), %rdx
	movl	$1, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-112(%rbp), %r8                 ## 8-byte Reload
	movq	%r8, %r12
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	pushq	%r13
	pushq	%rax
	pushq	%r15
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	pushq	%r14
	pushq	-96(%rbp)                       ## 8-byte Folded Reload
	pushq	%r13
	pushq	%rbx
	callq	_d_printf
	addq	$64, %rsp
	cmpl	$1, %r14d
	jne	LBB0_1
## %bb.2:
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	cmpl	$6, %ebx
	jne	LBB0_3
## %bb.4:
	cmpl	$32902, %r13d                   ## imm = 0x8086
	jne	LBB0_5
## %bb.8:
	xorl	%r15d, %r15d
	cmpl	$537395967, %r9d                ## imm = 0x200802FF
	ja	LBB0_10
## %bb.9:
	movl	(%rax), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_dev_warn
	jmp	LBB0_10
LBB0_1:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movl	%r14d, %r9d
	xorl	%eax, %eax
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	callq	_dev_err
	addq	$16, %rsp
	jmp	LBB0_7
LBB0_3:
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %r9
	xorl	%r15d, %r15d
	movq	%r12, %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r9d killed $r9d killed $r9
	jmp	LBB0_6
LBB0_5:
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r12, %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movl	%r13d, %r9d
LBB0_6:
	xorl	%eax, %eax
	callq	_dev_err
LBB0_7:
	movq	_EBADF@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"firmware %s #%zd@%08zx: BCF header type:vendor:id 0x%x:%x:%x v%u.%u (%u/%u B) built %08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"firmware %s #%zd@%08zx: major header version v%u.%u not supported\n"

	.comm	_EBADF,4,2                      ## @EBADF
L_.str.2:                               ## @.str.2
	.asciz	"firmware %s #%zd@%08zx: unexpected module type 0x%x; aborting\n"

L_.str.3:                               ## @.str.3
	.asciz	"firmware %s #%zd@%08zx: unexpected module vendor 0x%x; aborting\n"

L_.str.4:                               ## @.str.4
	.asciz	"firmware %s #%zd@%08zx: build date %08x too old; unsupported\n"

	.no_dead_strip	_i2400m_fw_hdr_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_hdr_check
_i2400m_fw_hdr_check:                   ; @i2400m_fw_hdr_check
	.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
	stp	x2, x3, [sp, #32]               ; 16-byte Folded Spill
	mov	x27, x1
	mov	x22, x0
	bl	_i2400m_dev
	mov	x21, x0
	ldr	w0, [x27, #24]
	bl	_le32_to_cpu
	mov	x23, x0
	ldr	w0, [x27, #20]
	bl	_le32_to_cpu
	lsl	w20, w0, #2
	ldr	w0, [x27, #16]
	bl	_le32_to_cpu
	lsr	w24, w0, #16
	ldr	w0, [x27, #16]
	bl	_le32_to_cpu
	and	w19, w0, #0xffff
	ldr	w0, [x27, #12]
	bl	_le32_to_cpu
	mov	x28, x0
	ldr	w0, [x27, #8]
	bl	_le32_to_cpu
	mov	x25, x0
	ldr	w0, [x27, #4]
	bl	_le32_to_cpu
	mov	x26, x0
	ldr	w0, [x27]
	mov	x27, x21
	bl	_le32_to_cpu
	lsl	w8, w0, #2
	ldr	w3, [x22]
	stp	w8, w26, [sp, #16]
	stp	w19, w20, [sp, #8]
	ldp	x21, x20, [sp, #32]             ; 16-byte Folded Reload
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	stp	w28, w24, [sp]
	mov	w0, #1
	mov	x1, x27
	mov	x4, x21
	mov	x5, x20
	mov	x6, x23
	mov	x7, x25
	bl	_d_printf
	cmp	w24, #1
	b.ne	LBB0_6
; %bb.1:
	cmp	w23, #6
	b.ne	LBB0_7
; %bb.2:
	mov	w8, #32902
	cmp	w25, w8
	b.ne	LBB0_8
; %bb.3:
	mov	w8, #767
	movk	w8, #8200, lsl #16
	cmp	w26, w8
	b.hi	LBB0_5
; %bb.4:
	ldr	w2, [x22]
Lloh2:
	adrp	x1, l_.str.4@PAGE
Lloh3:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x27
	mov	x3, x21
	mov	x4, x20
	mov	x5, x26
	bl	_dev_warn
LBB0_5:
	mov	w0, #0
	b	LBB0_10
LBB0_6:
	ldr	w2, [x22]
	str	x19, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x27
	mov	x3, x21
	mov	x4, x20
	mov	x5, x24
	b	LBB0_9
LBB0_7:
	ldr	w2, [x22]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x27
	mov	x3, x21
	mov	x4, x20
	mov	x5, x23
	b	LBB0_9
LBB0_8:
	ldr	w2, [x22]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x27
	mov	x3, x21
	mov	x4, x20
	mov	x5, x25
LBB0_9:
	bl	_dev_err
Lloh10:
	adrp	x8, _EBADF@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"firmware %s #%zd@%08zx: BCF header type:vendor:id 0x%x:%x:%x v%u.%u (%u/%u B) built %08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"firmware %s #%zd@%08zx: major header version v%u.%u not supported\n"

	.comm	_EBADF,4,2                      ; @EBADF
l_.str.2:                               ; @.str.2
	.asciz	"firmware %s #%zd@%08zx: unexpected module type 0x%x; aborting\n"

l_.str.3:                               ; @.str.3
	.asciz	"firmware %s #%zd@%08zx: unexpected module vendor 0x%x; aborting\n"

l_.str.4:                               ; @.str.4
	.asciz	"firmware %s #%zd@%08zx: build date %08x too old; unsupported\n"

	.no_dead_strip	_i2400m_fw_hdr_check
.subsections_via_symbols
