	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rcar_drif_s_fmt_sdr_cap
_rcar_drif_s_fmt_sdr_cap:               ## @rcar_drif_s_fmt_sdr_cap
	.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	%rdx, %r15
	callq	_video_drvdata
	movq	%rax, %r14
	leaq	32(%rax), %rdi
	callq	_vb2_is_busy
	testq	%rax, %rax
	je	LBB0_1
## %bb.11:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_1:
	movq	_formats@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	xorl	%r13d, %r13d
	movl	$0, %ebx
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movl	$12, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	movl	(%rdi,%r13), %eax
	cmpl	8(%r15), %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	addq	$16, %r13
	cmpq	%rax, %rbx
	jb	LBB0_3
LBB0_5:
	xorl	%r13d, %r13d
LBB0_6:
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	cmovel	%r13d, %ebx
	movq	(%r12), %rax
	movq	%rbx, %r13
	shlq	$4, %r13
	leaq	(%rax,%r13), %rcx
	movq	%rcx, 24(%r14)
	movl	12(%rax,%r13), %ecx
	movl	%ecx, 8(%r15)
	movl	8(%rax,%r13), %eax
	movl	%eax, 4(%r15)
	movl	(%r15), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	(%r12), %rax
	movq	(%r14), %r8
	cmpq	%r8, (%rax,%r13)
	jge	LBB0_8
## %bb.7:
	xorl	%edi, %edi
	callq	_BIT
	movl	%eax, %ecx
	movq	(%r12), %rax
	movq	(%rax,%r13), %r8
	jmp	LBB0_9
LBB0_8:
	movl	20(%r14), %ecx
LBB0_9:
	movl	%ecx, 16(%r14)
	movq	%r8, 8(%r14)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_rdrif_dbg
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_formats,8,3                    ## @formats
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cur: idx %u mask %lu num %u\n"

	.no_dead_strip	_rcar_drif_s_fmt_sdr_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rcar_drif_s_fmt_sdr_cap
_rcar_drif_s_fmt_sdr_cap:               ; @rcar_drif_s_fmt_sdr_cap
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	bl	_video_drvdata
	mov	x19, x0
	add	x0, x0, #32
	bl	_vb2_is_busy
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_2:
Lloh3:
	adrp	x22, _formats@GOTPAGE
Lloh4:
	ldr	x22, [x22, _formats@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_6
; %bb.3:
	mov	x21, #0
	mov	w23, #12
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	ldr	w8, [x0, x23]
	ldr	w9, [x20, #8]
	cmp	w8, w9
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	bl	_ARRAY_SIZE
	add	x23, x23, #16
	cmp	x21, w0, uxtw
	b.lo	LBB0_4
	b	LBB0_7
LBB0_6:
	mov	w21, #0
LBB0_7:
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w21, w0
	csel	w21, wzr, w21, eq
	ldr	x8, [x22]
	lsl	x23, x21, #4
	add	x8, x8, x23
	str	x8, [x19, #24]
	ldr	d0, [x8, #8]
	stur	d0, [x20, #4]
	ldr	w0, [x20]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x8, [x22]
	ldr	x8, [x8, x23]
	ldr	x4, [x19]
	cmp	x8, x4
	b.ge	LBB0_9
; %bb.8:
	mov	w0, #0
	bl	_BIT
	mov	x3, x0
	ldr	x8, [x22]
	ldr	x4, [x8, x23]
	b	LBB0_10
LBB0_9:
	ldr	w3, [x19, #20]
LBB0_10:
	str	w3, [x19, #16]
	str	x4, [x19, #8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_rdrif_dbg
	mov	w0, #0
LBB0_11:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_formats,8,3                    ; @formats
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cur: idx %u mask %lu num %u\n"

	.no_dead_strip	_rcar_drif_s_fmt_sdr_cap
.subsections_via_symbols
