	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rmi_f54_buffer_queue
_rmi_f54_buffer_queue:                  ## @rmi_f54_buffer_queue
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_vb2_get_drv_priv
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_mutex_lock
	movl	40(%r13), %esi
	movq	%r13, %rdi
	callq	_rmi_f54_get_reptype
	movq	_F54_REPORT_NONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_5
## %bb.1:
	cmpq	$0, 32(%r13)
	jne	LBB0_5
## %bb.2:
	movq	16(%r13), %rdi
	movl	%eax, %esi
	callq	_rmi_f54_request_report
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	movq	16(%r13), %rdi
	leaq	L_.str(%rip), %rsi
LBB0_4:
	callq	_dev_err
LBB0_5:
	movq	_VB2_BUF_STATE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_6:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_vb2_buffer_done
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
LBB0_7:
	leaq	4(%r13), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	cmpq	$0, 32(%r13)
	je	LBB0_11
## %bb.8:
	movq	%r13, %r12
	addq	$24, %r12
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r15, %rdi
	callq	_mutex_lock
	cmpq	$0, 32(%r13)
	jne	LBB0_9
LBB0_11:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_vb2_plane_vaddr
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movl	8(%r13), %edx
	movl	12(%r13), %esi
	movq	%rax, %rdi
	callq	_memcpy
	movq	%r13, %rdi
	callq	_rmi_f54_get_report_size
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_vb2_set_plane_payload
	movq	_VB2_BUF_STATE_DONE@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_13:
	movq	16(%r13), %rdi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_14:
	movq	16(%r13), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	_VB2_BUF_STATE_ERROR@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_F54_REPORT_NONE,4,2            ## @F54_REPORT_NONE
	.comm	_VB2_BUF_STATE_ERROR,4,2        ## @VB2_BUF_STATE_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error requesting F54 report\n"

L_.str.1:                               ## @.str.1
	.asciz	"Timed out\n"

L_.str.2:                               ## @.str.2
	.asciz	"Error acquiring frame ptr\n"

	.comm	_VB2_BUF_STATE_DONE,4,2         ## @VB2_BUF_STATE_DONE
	.no_dead_strip	_rmi_f54_buffer_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rmi_f54_buffer_queue
_rmi_f54_buffer_queue:                  ; @rmi_f54_buffer_queue
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	ldr	w0, [x0]
	bl	_vb2_get_drv_priv
	mov	x20, x0
	bl	_mutex_lock
	ldr	w1, [x20, #40]
	mov	x0, x20
	bl	_rmi_f54_get_reptype
Lloh0:
	adrp	x8, _F54_REPORT_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _F54_REPORT_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_5
; %bb.1:
	ldr	x8, [x20, #32]
	cbnz	x8, LBB0_5
; %bb.2:
	mov	x1, x0
	ldr	x0, [x20, #16]
	bl	_rmi_f54_request_report
	cbz	w0, LBB0_7
; %bb.3:
	ldr	x0, [x20, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	bl	_dev_err
LBB0_5:
Lloh5:
	adrp	x8, _VB2_BUF_STATE_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VB2_BUF_STATE_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
LBB0_6:
	mov	x0, x19
	mov	x1, x22
	bl	_vb2_buffer_done
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mutex_unlock
LBB0_7:
	add	x21, x20, #4
	mov	x0, x21
	bl	_mutex_lock
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_11
; %bb.8:
	add	x22, x20, #24
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_mutex_unlock
	mov	w0, #1000
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x22
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x21
	bl	_mutex_lock
	ldr	x8, [x20, #32]
	cbnz	x8, LBB0_9
LBB0_11:
	mov	x0, x19
	mov	w1, #0
	bl	_vb2_plane_vaddr
	cbz	x0, LBB0_14
; %bb.12:
	ldp	w2, w1, [x20, #8]
	bl	_memcpy
	mov	x0, x20
	bl	_rmi_f54_get_report_size
	mov	x2, x0
	mov	x0, x19
	mov	w1, #0
	bl	_vb2_set_plane_payload
Lloh8:
	adrp	x8, _VB2_BUF_STATE_DONE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VB2_BUF_STATE_DONE@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
	ldr	x0, [x20, #16]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_14:
	ldr	x0, [x20, #16]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh14:
	adrp	x8, _VB2_BUF_STATE_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VB2_BUF_STATE_ERROR@GOTPAGEOFF]
LBB0_15:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_mutex_unlock
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_F54_REPORT_NONE,4,2            ; @F54_REPORT_NONE
	.comm	_VB2_BUF_STATE_ERROR,4,2        ; @VB2_BUF_STATE_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error requesting F54 report\n"

l_.str.1:                               ; @.str.1
	.asciz	"Timed out\n"

l_.str.2:                               ; @.str.2
	.asciz	"Error acquiring frame ptr\n"

	.comm	_VB2_BUF_STATE_DONE,4,2         ; @VB2_BUF_STATE_DONE
	.no_dead_strip	_rmi_f54_buffer_queue
.subsections_via_symbols
