	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function be_check_ufi_compatibility
_be_check_ufi_compatibility:            ## @be_check_ufi_compatibility
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.1:
	movq	%rsi, %rbx
	movq	(%rsi), %rax
	movl	(%rax), %eax
	cmpl	$130, %eax
	je	LBB0_7
## %bb.2:
	cmpl	$129, %eax
	je	LBB0_9
## %bb.3:
	cmpl	$128, %eax
	jne	LBB0_15
## %bb.4:
	movq	%r14, %rdi
	callq	_skyhawk_chip
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_15
LBB0_6:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_15:
	xorl	%eax, %eax
LBB0_16:
	movzbl	%al, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	movq	%r14, %rdi
	callq	_BE2_chip
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_15
LBB0_9:
	movq	%r14, %rdi
	callq	_BE3_chip
	testl	%eax, %eax
	je	LBB0_15
LBB0_10:
	movq	%r14, %rdi
	callq	_BEx_chip
	movl	8(%rbx), %edx
	movl	(%r14), %ecx
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	testl	%edx, %edx
	jne	LBB0_14
## %bb.12:
	cmpl	$16, %ecx
	setl	%al
	jmp	LBB0_16
LBB0_14:
	cmpl	%ecx, %edx
	setge	%al
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid FW UFI file"

	.no_dead_strip	_be_check_ufi_compatibility
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function be_check_ufi_compatibility
_be_check_ufi_compatibility:            ; @be_check_ufi_compatibility
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	cbz	x1, LBB0_5
; %bb.1:
	mov	x20, x1
	ldr	x8, [x1]
	ldr	w8, [x8]
	cmp	w8, #130
	b.eq	LBB0_6
; %bb.2:
	cmp	w8, #129
	b.eq	LBB0_7
; %bb.3:
	cmp	w8, #128
	b.ne	LBB0_11
; %bb.4:
	mov	x0, x19
	bl	_skyhawk_chip
	cbnz	w0, LBB0_8
	b	LBB0_13
LBB0_5:
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	w0, #0
	b	LBB0_13
LBB0_6:
	mov	x0, x19
	bl	_BE2_chip
	cbnz	w0, LBB0_8
	b	LBB0_13
LBB0_7:
	mov	x0, x19
	bl	_BE3_chip
	cbz	w0, LBB0_13
LBB0_8:
	mov	x0, x19
	bl	_BEx_chip
	ldr	w9, [x20, #8]
	ldr	w8, [x19]
	cbz	x0, LBB0_12
; %bb.9:
	cbnz	w9, LBB0_12
; %bb.10:
	cmp	w8, #16
	cset	w0, lt
	b	LBB0_13
LBB0_11:
	mov	w0, #0
	b	LBB0_13
LBB0_12:
	cmp	w9, w8
	cset	w0, ge
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid FW UFI file"

	.no_dead_strip	_be_check_ufi_compatibility
.subsections_via_symbols
