	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rmi_f03_initialize
_rmi_f03_initialize:                    ## @rmi_f03_initialize
	.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	%rdi, %r12
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r13
	leaq	12(%r13), %r15
	movq	_RMI_F03_DEVICE_COUNT@GOTPCREL(%rip), %rcx
	movq	_RMI_F03_BYTES_PER_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	(%rcx), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	8(%r13), %edi
	movq	(%r13), %rsi
	leaq	-52(%rbp), %rdx
	callq	_rmi_read
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
LBB0_2:
	movl	%ebx, %edx
	callq	_dev_err
	jmp	LBB0_9
LBB0_3:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	-52(%rbp), %eax
	movq	_RMI_F03_DEVICE_COUNT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	%eax, %edx
	movl	%edx, (%r12)
	movq	_RMI_F03_BYTES_PER_DEVICE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movq	_RMI_F03_BYTES_PER_DEVICE@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	imull	%edx, %eax
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movslq	%eax, %rcx
	movl	8(%r13), %edi
	movq	(%r13), %rsi
	incq	%rsi
	movq	%r14, %rdx
	callq	_rmi_read_block
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_2
LBB0_4:
	movabsq	$30064771073, %rax              ## imm = 0x700000001
	movq	%rax, (%r12)
	jmp	LBB0_8
LBB0_7:
	movq	_RMI_F03_QUEUE_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r14), %eax
	movl	%eax, 4(%r12)
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	movq	-72(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RMI_F03_DEVICE_COUNT,4,2       ## @RMI_F03_DEVICE_COUNT
	.comm	_RMI_F03_BYTES_PER_DEVICE,4,2   ## @RMI_F03_BYTES_PER_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read query register (%d).\n"

	.comm	_RMI_F03_BYTES_PER_DEVICE_SHIFT,4,2 ## @RMI_F03_BYTES_PER_DEVICE_SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"Failed to read second set of query registers (%d).\n"

	.comm	_RMI_F03_QUEUE_LENGTH,4,2       ## @RMI_F03_QUEUE_LENGTH
	.no_dead_strip	_rmi_f03_initialize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function rmi_f03_initialize
lCPI0_0:
	.long	1                               ; 0x1
	.long	7                               ; 0x7
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_rmi_f03_initialize:                    ; @rmi_f03_initialize
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #16
	mov	x19, x0
	mov	x23, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldr	x24, [x0, #8]
	add	x20, x24, #12
Lloh3:
	adrp	x26, _RMI_F03_DEVICE_COUNT@GOTPAGE
Lloh4:
	ldr	x26, [x26, _RMI_F03_DEVICE_COUNT@GOTPAGEOFF]
Lloh5:
	adrp	x25, _RMI_F03_BYTES_PER_DEVICE@GOTPAGE
Lloh6:
	ldr	x25, [x25, _RMI_F03_BYTES_PER_DEVICE@GOTPAGEOFF]
	ldr	w8, [x26]
	ldr	w9, [x25]
	mul	w8, w9, w8
	lsl	x9, x8, #2
	add	x8, x9, #15
	and	x8, x8, #0x7fffffff0
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x22, x9, x8
	mov	sp, x22
	ldr	w0, [x24, #8]
	ldr	x1, [x24]
	sub	x2, x29, #76
	bl	_rmi_read
	cbz	w0, LBB0_5
; %bb.1:
	mov	x21, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	mov	x0, x20
	mov	x2, x21
	bl	_dev_err
LBB0_3:
	mov	sp, x23
	ldur	x8, [x29, #-72]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.4:
	mov	x0, x21
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldur	w8, [x29, #-76]
	ldr	w9, [x26]
	and	w9, w9, w8
Lloh14:
	adrp	x10, _RMI_F03_BYTES_PER_DEVICE_SHIFT@GOTPAGE
Lloh15:
	ldr	x10, [x10, _RMI_F03_BYTES_PER_DEVICE_SHIFT@GOTPAGEOFF]
	str	w9, [x19]
Lloh16:
	ldr	w10, [x10]
	asr	w8, w8, w10
	ldr	w10, [x25]
	and	w8, w8, w10
	mul	w8, w8, w9
	cbz	w8, LBB0_8
; %bb.6:
	sxtw	x3, w8
	ldr	w0, [x24, #8]
	ldr	x8, [x24]
	add	x1, x8, #1
	mov	x2, x22
	bl	_rmi_read_block
	mov	x21, x0
	cbz	w0, LBB0_9
; %bb.7:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_8:
	mov	w21, #0
Lloh19:
	adrp	x8, lCPI0_0@PAGE
Lloh20:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
	b	LBB0_3
LBB0_9:
	ldr	w8, [x22]
Lloh21:
	adrp	x9, _RMI_F03_QUEUE_LENGTH@GOTPAGE
Lloh22:
	ldr	x9, [x9, _RMI_F03_QUEUE_LENGTH@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	and	w8, w9, w8
	str	w8, [x19, #4]
	b	LBB0_3
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdr	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_RMI_F03_DEVICE_COUNT,4,2       ; @RMI_F03_DEVICE_COUNT
	.comm	_RMI_F03_BYTES_PER_DEVICE,4,2   ; @RMI_F03_BYTES_PER_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read query register (%d).\n"

	.comm	_RMI_F03_BYTES_PER_DEVICE_SHIFT,4,2 ; @RMI_F03_BYTES_PER_DEVICE_SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"Failed to read second set of query registers (%d).\n"

	.comm	_RMI_F03_QUEUE_LENGTH,4,2       ; @RMI_F03_QUEUE_LENGTH
	.no_dead_strip	_rmi_f03_initialize
.subsections_via_symbols
