	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdl_do_processing
_sdl_do_processing:                     ## @sdl_do_processing
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	(%rcx), %r13
	movq	(%rax), %r15
	movq	(%r13), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	4(%rax), %r12d
	movl	40(%r15), %edi
	callq	_mmal_queue_get
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	cmpq	$0, 40(%rax)
	je	LBB0_9
## %bb.3:
	movq	%rbx, %rdi
	callq	_mmal_event_format_changed_get
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	(%r13), %rdi
	movl	(%rax), %esi
	callq	_mmal_format_copy
	movq	16(%r13), %rax
	movq	%r13, %rdi
	callq	*(%rax)
	movq	%rax, (%r15)
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	je	LBB0_8
## %bb.5:
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_LOG_ERROR
	movl	8(%r13), %edi
	movq	(%r15), %rsi
	callq	_mmal_event_error_send
	cmpq	(%r14), %rax
	je	LBB0_8
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_LOG_ERROR
	jmp	LBB0_8
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_22
LBB0_9:
	movq	(%r15), %rax
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rcx
	movl	$1, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_22
## %bb.10:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	_MMAL_BUFFER_HEADER_FLAG_EOS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%rbx, %rax
	addq	$8, %rax
	andl	(%rbx), %r12d
	cmpq	$0, 8(%rbx)
	je	LBB0_20
## %bb.11:
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movq	24(%rbx), %rax
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movq	32(%rbx), %rbx
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movslq	(%rcx), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movslq	8(%rcx), %r14
	movslq	4(%rcx), %r12
	movq	8(%r15), %rdi
	callq	_SDL_LockYUVOverlay
	movq	%r15, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	movq	%r13, -112(%rbp)                ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_23
## %bb.12:
	leaq	(%rbx,%r14,4), %r15
	leaq	(%rbx,%r12,4), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rbx,%rax,4), %r14
	movq	8(%rdx), %rax
	movq	8(%rax), %rax
	movq	(%rax), %rbx
	movl	%ecx, %r13d
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%rdx, %r12
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_memcpy
	movq	%r12, %rdx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movslq	(%rax), %rax
	leaq	(%r14,%rax,4), %r14
	movq	8(%r12), %rax
	movq	(%rax), %rcx
	movslq	(%rcx), %rcx
	leaq	(%rbx,%rcx,4), %rbx
	decl	%r13d
	jne	LBB0_13
## %bb.14:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	cmpl	$2, %r14d
	jae	LBB0_15
LBB0_23:
	movq	8(%rdx), %rdi
	jmp	LBB0_19
LBB0_7:
	movl	40(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_LOG_ERROR
LBB0_8:
	movq	$0, 8(%rbx)
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_mmal_port_buffer_header_callback
	movl	$1, %r14d
LBB0_22:
	movl	%r14d, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	shrl	%r14d
	shrl	-48(%rbp)                       ## 4-byte Folded Spill
	movq	8(%rax), %rax
	movq	8(%rax), %rbx
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_memcpy
	movq	%r12, %rdx
	movslq	4(%r13), %rax
	leaq	(%r15,%rax,4), %r15
	movq	8(%r12), %rax
	movq	(%rax), %rcx
	movslq	4(%rcx), %rcx
	leaq	(%rbx,%rcx,4), %rbx
	decl	%r14d
	jne	LBB0_16
## %bb.17:
	movq	8(%rax), %rax
	movq	16(%rax), %r12
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_memcpy
	movslq	8(%r13), %rax
	leaq	(%rbx,%rax,4), %rbx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	movq	(%rdi), %rax
	movslq	8(%rax), %rax
	leaq	(%r12,%rax,4), %r12
	decl	%r14d
	jne	LBB0_18
LBB0_19:
	callq	_SDL_UnlockYUVOverlay
	movq	-112(%rbp), %r13                ## 8-byte Reload
	movq	(%r13), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %eax
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	32(%rsi), %edx
	movl	%edx, -120(%rbp)
	movl	16(%rsi), %edx
	movl	%edx, -136(%rbp)
	imull	%edx, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	20(%rsi), %ecx
	subl	%eax, %ecx
	shrl	%ecx
	addq	24(%rsi), %rcx
	movq	%rcx, -128(%rbp)
	movl	%eax, -132(%rbp)
	movq	8(%rsi), %rdi
	leaq	-136(%rbp), %rsi
	callq	_SDL_DisplayYUVOverlay
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	movl	$1, %r14d
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movq	-96(%rbp), %rax                 ## 8-byte Reload
LBB0_20:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_mmal_port_buffer_header_callback
	testl	%r12d, %r12d
	je	LBB0_22
## %bb.21:
	movq	%r13, %rdi
	callq	_mmal_event_eos_send
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_BUFFER_HEADER_FLAG_EOS,4,2 ## @MMAL_BUFFER_HEADER_FLAG_EOS
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"format not set on port %p"

L_.str.1:                               ## @.str.1
	.asciz	"unable to send an error event buffer"

L_.str.2:                               ## @.str.2
	.asciz	"discarding event %i on port %p"

	.no_dead_strip	_sdl_do_processing
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdl_do_processing
_sdl_do_processing:                     ; @sdl_do_processing
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldp	x9, x8, [x0]
	ldr	x19, [x8]
	ldr	x26, [x9]
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldp	w22, w28, [x8]
	ldr	w0, [x26, #40]
	bl	_mmal_queue_get
	cbz	x0, LBB0_17
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_6
; %bb.2:
	mov	x0, x20
	bl	_mmal_event_format_changed_get
	cbz	x0, LBB0_13
; %bb.3:
	ldr	x8, [x19]
	ldr	w1, [x0]
	mov	x0, x8
	bl	_mmal_format_copy
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	str	x0, [x26]
Lloh0:
	adrp	x21, _MMAL_SUCCESS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MMAL_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_15
; %bb.4:
	str	x19, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_LOG_ERROR
	ldr	w0, [x19, #8]
	ldr	x1, [x26]
	bl	_mmal_event_error_send
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_15
; %bb.5:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_6:
	ldr	x8, [x26]
Lloh6:
	adrp	x9, _MMAL_SUCCESS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.7:
Lloh9:
	adrp	x8, _MMAL_BUFFER_HEADER_FLAG_EOS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MMAL_BUFFER_HEADER_FLAG_EOS@GOTPAGEOFF]
	ldr	w9, [x20]
Lloh11:
	ldr	w8, [x8]
	and	w25, w8, w9
	mov	x9, x20
	ldr	x8, [x9, #8]!
	cbz	x8, LBB0_24
; %bb.8:
	str	x9, [sp, #32]                   ; 8-byte Folded Spill
	ldp	x8, x24, [x20, #24]
	ldp	x8, x27, [x8]
	ldpsw	x21, x23, [x8, #4]
	ldrsw	x9, [x8]
	str	x9, [sp, #24]                   ; 8-byte Folded Spill
	ldr	x0, [x26, #8]
	bl	_SDL_LockYUVOverlay
	cbz	w28, LBB0_12
; %bb.9:
	str	w25, [sp, #20]                  ; 4-byte Folded Spill
	add	x23, x24, x23, lsl #2
	add	x21, x24, x21, lsl #2
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	add	x24, x24, x8, lsl #2
	ldr	x8, [x26, #8]
	ldr	x8, [x8, #8]
	ldr	x25, [x8]
	str	w28, [sp, #24]                  ; 4-byte Folded Spill
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	mov	x1, x24
	mov	x2, x22
	bl	_memcpy
	ldrsw	x8, [x27]
	add	x24, x24, x8, lsl #2
	ldr	x8, [x26, #8]
	ldr	x9, [x8]
	ldrsw	x9, [x9]
	add	x25, x25, x9, lsl #2
	subs	w28, w28, #1
	b.ne	LBB0_10
; %bb.11:
	ldp	w25, w9, [sp, #20]              ; 8-byte Folded Reload
	cmp	w9, #2
	b.hs	LBB0_18
LBB0_12:
	ldr	x0, [x26, #8]
	b	LBB0_23
LBB0_13:
	ldr	x8, [x20, #40]
	stp	x8, x19, [sp]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_14:
	bl	_LOG_ERROR
LBB0_15:
	str	xzr, [x20, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_mmal_port_buffer_header_callback
LBB0_16:
	mov	w0, #1
LBB0_17:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_18:
	lsr	w25, w9, #1
	lsr	w22, w22, #1
	ldr	x8, [x8, #8]
	ldr	x24, [x8, #8]
	mov	x28, x25
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	bl	_memcpy
	ldrsw	x8, [x27, #4]
	add	x23, x23, x8, lsl #2
	ldr	x8, [x26, #8]
	ldr	x9, [x8]
	ldrsw	x9, [x9, #4]
	add	x24, x24, x9, lsl #2
	subs	w28, w28, #1
	b.ne	LBB0_19
; %bb.20:
	ldr	x8, [x8, #8]
	ldr	x23, [x8, #16]
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x21
	mov	x2, x22
	bl	_memcpy
	ldrsw	x8, [x27, #8]
	add	x21, x21, x8, lsl #2
	ldr	x0, [x26, #8]
	ldr	x8, [x0]
	ldrsw	x8, [x8, #8]
	add	x23, x23, x8, lsl #2
	subs	w25, w25, #1
	b.ne	LBB0_21
; %bb.22:
	ldr	w25, [sp, #20]                  ; 4-byte Folded Reload
LBB0_23:
	bl	_SDL_UnlockYUVOverlay
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldp	w9, w8, [x8]
	ldr	w10, [x26, #32]
	str	w10, [sp, #56]
	ldp	w10, w11, [x26, #16]
	mul	w8, w10, w8
	udiv	w8, w8, w9
	ldr	x9, [x26, #24]
	sub	w11, w11, w8
	lsr	w11, w11, #1
	add	x9, x9, x11
	str	x9, [sp, #48]
	stp	w10, w8, [sp, #40]
	ldr	x0, [x26, #8]
	add	x1, sp, #40
	bl	_SDL_DisplayYUVOverlay
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
LBB0_24:
	stp	xzr, xzr, [x9]
	mov	x0, x19
	mov	x1, x20
	bl	_mmal_port_buffer_header_callback
	cbz	w25, LBB0_16
; %bb.25:
	mov	x0, x19
	bl	_mmal_event_eos_send
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_BUFFER_HEADER_FLAG_EOS,4,2 ; @MMAL_BUFFER_HEADER_FLAG_EOS
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"format not set on port %p"

l_.str.1:                               ; @.str.1
	.asciz	"unable to send an error event buffer"

l_.str.2:                               ; @.str.2
	.asciz	"discarding event %i on port %p"

	.no_dead_strip	_sdl_do_processing
.subsections_via_symbols
