	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msi2500_s_fmt_sdr_cap
_msi2500_s_fmt_sdr_cap:                 ## @msi2500_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	callq	_video_drvdata
	movq	%rax, %r12
	leaq	24(%rax), %rbx
	movl	20(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	callq	_dev_dbg
	movq	%rbx, %rdi
	callq	_vb2_is_busy
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_8
LBB0_2:
	movl	12(%r14), %edi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	(%r12), %ecx
	movq	_formats@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.3:
	movq	(%r14), %rdx
	shlq	$4, %rcx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, (%rax,%rsi)
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	addq	$16, %rsi
	cmpq	%rsi, %rcx
	jne	LBB0_4
LBB0_7:
	movq	(%rax), %rcx
	movq	%rcx, 8(%r12)
	movl	8(%rax), %eax
	movl	%eax, 16(%r12)
	movq	%rcx, (%r14)
	movl	%eax, 8(%r14)
	jmp	LBB0_8
LBB0_5:
	movq	%rdx, 8(%r12)
	movl	8(%rax,%rsi), %eax
	movl	%eax, 16(%r12)
	movl	%eax, 8(%r14)
	xorl	%r15d, %r15d
LBB0_8:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pixelformat fourcc %4.4s\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_formats,8,3                    ## @formats
	.no_dead_strip	_msi2500_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 msi2500_s_fmt_sdr_cap
_msi2500_s_fmt_sdr_cap:                 ; @msi2500_s_fmt_sdr_cap
	.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, x2
	bl	_video_drvdata
	mov	x20, x0
	add	x21, x0, #24
	ldr	w0, [x0, #20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_dbg
	mov	x0, x21
	bl	_vb2_is_busy
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_2:
	ldr	w0, [x19, #12]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w9, [x20]
Lloh5:
	adrp	x8, _formats@GOTPAGE
Lloh6:
	ldr	x8, [x8, _formats@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.3:
	ldr	x10, [x19]
	add	x11, x8, #8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x12, [x11, #-8]
	cmp	x12, x10
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x11, x11, #16
	subs	x9, x9, #1
	b.ne	LBB0_4
LBB0_6:
	mov	w0, #0
	ldr	x9, [x8]
	str	x9, [x20, #8]
	ldr	w8, [x8, #8]
	str	w8, [x20, #16]
	str	x9, [x19]
	b	LBB0_8
LBB0_7:
	mov	w0, #0
	str	x10, [x20, #8]
	ldr	w8, [x11]
	str	w8, [x20, #16]
LBB0_8:
	str	w8, [x19, #8]
LBB0_9:
	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
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pixelformat fourcc %4.4s\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_formats,8,3                    ; @formats
	.no_dead_strip	_msi2500_s_fmt_sdr_cap
.subsections_via_symbols
