	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function preprocess_image
_preprocess_image:                      ## @preprocess_image
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -32(%rbp)
	movq	$0, -16(%rbp)
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -20(%rbp)
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movl	8(%rdi), %edi
	movq	_VIDIOC_DQBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	callq	_xioctl
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.3:
	movq	-32(%rbp), %rax
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	setb	%dil
	callq	_retro_assert
	leaq	28(%rbx), %rdi
	movl	24(%rbx), %esi
	movq	16(%rbx), %rax
	movq	-32(%rbp), %rcx
	movq	(%rax,%rcx,8), %rdx
	callq	_scaler_ctx_scale_direct
	movl	8(%rbx), %edi
	movq	_VIDIOC_QBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	callq	_xioctl
	movl	$1, %ebx
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_5
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	$128, (%rax)
	je	LBB0_6
## %bb.2:
	leaq	L_.str(%rip), %rdi
LBB0_5:
	callq	_RARCH_ERR
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_MEMORY_MMAP,4,2           ## @V4L2_MEMORY_MMAP
	.comm	_VIDIOC_DQBUF,4,2               ## @VIDIOC_DQBUF
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[V4L2]: VIDIOC_DQBUF.\n"

	.comm	_VIDIOC_QBUF,4,2                ## @VIDIOC_QBUF
L_.str.1:                               ## @.str.1
	.asciz	"[V4L2]: VIDIOC_QBUF\n"

	.no_dead_strip	_preprocess_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function preprocess_image
_preprocess_image:                      ; @preprocess_image
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp, #24]
Lloh0:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #16]
	ldr	w0, [x0, #8]
Lloh6:
	adrp	x8, _VIDIOC_DQBUF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VIDIOC_DQBUF@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_xioctl
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	ldr	x8, [sp, #8]
	ldr	x9, [x19]
	cmp	x8, x9
	cset	w0, lo
	bl	_retro_assert
	add	x0, x19, #28
	ldr	w1, [x19, #24]
	ldr	x8, [x19, #16]
	ldr	x9, [sp, #8]
	ldr	x2, [x8, x9, lsl #3]
	bl	_scaler_ctx_scale_direct
	ldr	w0, [x19, #8]
Lloh9:
	adrp	x8, _VIDIOC_QBUF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VIDIOC_QBUF@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_xioctl
	mov	w19, #1
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.2:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_3:
	mov	w19, #0
Lloh14:
	adrp	x8, _errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.4:
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
LBB0_5:
	bl	_RARCH_ERR
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_MEMORY_MMAP,4,2           ; @V4L2_MEMORY_MMAP
	.comm	_VIDIOC_DQBUF,4,2               ; @VIDIOC_DQBUF
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[V4L2]: VIDIOC_DQBUF.\n"

	.comm	_VIDIOC_QBUF,4,2                ; @VIDIOC_QBUF
l_.str.1:                               ; @.str.1
	.asciz	"[V4L2]: VIDIOC_QBUF\n"

	.no_dead_strip	_preprocess_image
.subsections_via_symbols
