	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rmi_check_bootloader_mode
_rmi_check_bootloader_mode:             ## @rmi_check_bootloader_mode
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movl	(%rbx), %eax
	xorl	%r15d, %r15d
	cmpl	$1, %eax
	je	LBB0_7
## %bb.1:
	cmpl	$52, %eax
	jne	LBB0_12
## %bb.2:
	cmpl	$2, 4(%rbx)
	jl	LBB0_12
## %bb.3:
	movl	8(%rbx), %esi
	leaq	-36(%rbp), %rdx
	movq	%r12, %rdi
	callq	_rmi_read
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_7:
	movl	8(%rbx), %esi
	leaq	-36(%rbp), %rdx
	movq	%r12, %rdi
	callq	_rmi_read
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_5:
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_dev_err
	movl	%ebx, %r15d
	jmp	LBB0_12
LBB0_9:
	movl	-36(%rbp), %ebx
	movl	$6, %edi
	jmp	LBB0_10
LBB0_6:
	movl	-36(%rbp), %ebx
	movl	$7, %edi
LBB0_10:
	callq	_BIT
	testl	%ebx, %eax
	je	LBB0_12
## %bb.11:
	movl	$1, (%r14)
LBB0_12:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read F34 status: %d.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to read F01 status: %d.\n"

	.no_dead_strip	_rmi_check_bootloader_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rmi_check_bootloader_mode
_rmi_check_bootloader_mode:             ; @rmi_check_bootloader_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x20, x0
	bl	_dev_get_drvdata
	mov	x19, x0
	ldr	w8, [x21]
	cmp	w8, #1
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #52
	b.ne	LBB0_12
; %bb.2:
	ldr	w8, [x21, #4]
	cmp	w8, #2
	b.lt	LBB0_12
; %bb.3:
	ldr	w1, [x21, #8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_rmi_read
	cbz	w0, LBB0_9
; %bb.4:
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:
	ldr	w1, [x21, #8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_rmi_read
	cbz	w0, LBB0_8
; %bb.6:
	mov	x21, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	mov	x0, x20
	mov	x2, x21
	bl	_dev_err
	b	LBB0_13
LBB0_8:
	ldr	w20, [sp, #12]
	mov	w0, #6
	b	LBB0_10
LBB0_9:
	ldr	w20, [sp, #12]
	mov	w0, #7
LBB0_10:
	bl	_BIT
	tst	w0, w20
	b.eq	LBB0_12
; %bb.11:
	mov	w21, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_13
LBB0_12:
	mov	w21, #0
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read F34 status: %d.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to read F01 status: %d.\n"

	.no_dead_strip	_rmi_check_bootloader_mode
.subsections_via_symbols
