	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function be_get_ufi_type
_be_get_ufi_type:                       ## @be_get_ufi_type
	.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_12
## %bb.1:
	movq	%rsi, %rbx
	movq	%r14, %rdi
	callq	_skyhawk_chip
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	(%rbx), %rax
	cmpb	$52, (%rax)
	jne	LBB0_4
## %bb.3:
	movq	_UFI_TYPE4@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_13
LBB0_4:
	movq	%r14, %rdi
	callq	_BE3_chip
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	(%rbx), %rax
	cmpb	$51, (%rax)
	jne	LBB0_9
## %bb.6:
	cmpl	$16, 8(%rbx)
	jne	LBB0_8
## %bb.7:
	movq	_UFI_TYPE3R@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_13
LBB0_9:
	movq	%r14, %rdi
	callq	_BE2_chip
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	(%rbx), %rax
	cmpb	$50, (%rax)
	jne	LBB0_12
## %bb.11:
	movq	_UFI_TYPE2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_13
LBB0_12:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	$-1, %eax
LBB0_13:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	movq	_UFI_TYPE3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_UFI_TYPE4,4,2                  ## @UFI_TYPE4
	.comm	_UFI_TYPE3R,4,2                 ## @UFI_TYPE3R
	.comm	_UFI_TYPE3,4,2                  ## @UFI_TYPE3
	.comm	_UFI_TYPE2,4,2                  ## @UFI_TYPE2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"UFI and Interface are not compatible for flashing\n"

	.no_dead_strip	_be_get_ufi_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function be_get_ufi_type
_be_get_ufi_type:                       ; @be_get_ufi_type
	.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_11
; %bb.1:
	mov	x20, x1
	mov	x0, x19
	bl	_skyhawk_chip
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x20]
	ldrb	w8, [x8]
	cmp	w8, #52
	b.ne	LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _UFI_TYPE4@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UFI_TYPE4@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_12
LBB0_4:
	mov	x0, x19
	bl	_BE3_chip
	cbz	x0, LBB0_8
; %bb.5:
	ldr	x8, [x20]
	ldrb	w8, [x8]
	cmp	w8, #51
	b.ne	LBB0_8
; %bb.6:
	ldr	w8, [x20, #8]
	cmp	w8, #16
	b.ne	LBB0_13
; %bb.7:
Lloh3:
	adrp	x8, _UFI_TYPE3R@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UFI_TYPE3R@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_12
LBB0_8:
	mov	x0, x19
	bl	_BE2_chip
	cbz	x0, LBB0_11
; %bb.9:
	ldr	x8, [x20]
	ldrb	w8, [x8]
	cmp	w8, #50
	b.ne	LBB0_11
; %bb.10:
Lloh6:
	adrp	x8, _UFI_TYPE2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UFI_TYPE2@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_12
LBB0_11:
	ldr	x0, [x19]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	w0, #-1
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh11:
	adrp	x8, _UFI_TYPE3@GOTPAGE
Lloh12:
	ldr	x8, [x8, _UFI_TYPE3@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_UFI_TYPE4,4,2                  ; @UFI_TYPE4
	.comm	_UFI_TYPE3R,4,2                 ; @UFI_TYPE3R
	.comm	_UFI_TYPE3,4,2                  ; @UFI_TYPE3
	.comm	_UFI_TYPE2,4,2                  ; @UFI_TYPE2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"UFI and Interface are not compatible for flashing\n"

	.no_dead_strip	_be_get_ufi_type
.subsections_via_symbols
