	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmalplay_play                  ## -- Begin function mmalplay_play
	.p2align	4, 0x90
_mmalplay_play:                         ## @mmalplay_play
	.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, %r15
	movl	96(%rdi), %edx
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_LOG_TRACE
	xorl	%eax, %eax
	callq	_vcos_getmicrosecs
	movq	%rax, (%r15)
	movq	88(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	_MMAL_PARAMETER_CLOCK_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MMAL_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_mmal_port_parameter_set_boolean
LBB0_2:
	movq	80(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	movq	_MMAL_PARAMETER_CLOCK_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MMAL_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_mmal_port_parameter_set_boolean
LBB0_4:
	leaq	72(%r15), %rbx
	movq	%rbx, %rdi
	callq	_vcos_semaphore_wait
	cmpq	$0, 64(%r15)
	je	LBB0_5
LBB0_31:
	movq	8(%r15), %r13
	jmp	LBB0_32
LBB0_5:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##       Child Loop BB0_13 Depth 3
                                        ##       Child Loop BB0_19 Depth 3
	movq	8(%r15), %rax
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_31
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$0, 16(%r15)
	je	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_30:                                ##   in Loop: Header=BB0_10 Depth=2
	incq	%r14
	movl	16(%r15), %eax
	cmpq	%rax, %r14
	jae	LBB0_6
LBB0_10:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_13 Depth 3
                                        ##       Child Loop BB0_19 Depth 3
	movq	56(%r15), %rax
	movq	(%rax,%r14,8), %r12
	movq	_MMAL_CONNECTION_FLAG_TUNNELLING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	jne	LBB0_30
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	32(%r12), %edi
	callq	_mmal_queue_get
	testq	%rax, %rax
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	%rax, %rbx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_13 Depth=3
	movq	16(%r12), %rdi
	movq	%rbx, %rsi
	callq	_mmal_port_send_buffer
	movq	%rax, %r13
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jne	LBB0_27
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=3
	movl	32(%r12), %edi
	callq	_mmal_queue_get
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_16
LBB0_13:                                ##   Parent Loop BB0_7 Depth=1
                                        ##     Parent Loop BB0_10 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	cmpq	$0, 8(%rbx)
	movq	8(%r12), %rsi
	je	LBB0_21
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=3
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	_mmalplay_event_handle
	movq	%rax, %r13
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_15
	jmp	LBB0_32
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_13 Depth=3
	cmpq	24(%r15), %rsi
	jne	LBB0_26
## %bb.22:                              ##   in Loop: Header=BB0_13 Depth=3
	cmpq	$0, (%rbx)
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_13 Depth=3
	incl	48(%r15)
LBB0_24:                                ##   in Loop: Header=BB0_13 Depth=3
	cmpq	$0, 40(%r15)
	je	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_13 Depth=3
	xorl	%eax, %eax
	callq	_getchar
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=2
	movq	24(%r12), %rax
	testq	%rax, %rax
	je	LBB0_30
## %bb.17:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	(%rax), %edi
	callq	_mmal_queue_get
	testq	%rax, %rax
	je	LBB0_30
## %bb.18:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	%rax, %rbx
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_7 Depth=1
                                        ##     Parent Loop BB0_10 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	8(%r12), %rdi
	movq	%rbx, %rsi
	callq	_mmal_port_send_buffer
	movq	%rax, %r13
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jne	LBB0_20
## %bb.29:                              ##   in Loop: Header=BB0_19 Depth=3
	movq	24(%r12), %rax
	movl	(%rax), %edi
	callq	_mmal_queue_get
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_19
	jmp	LBB0_30
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_vcos_semaphore_wait
	cmpq	$0, 64(%r15)
	je	LBB0_7
	jmp	LBB0_31
LBB0_20:
	leaq	L_.str.1(%rip), %rdi
	movq	%r13, %rsi
	callq	_LOG_ERROR
	movq	24(%r12), %rax
	movl	(%rax), %edi
	jmp	LBB0_28
LBB0_27:
	leaq	L_.str.1(%rip), %rdi
	movq	%r13, %rsi
	callq	_LOG_ERROR
	movl	32(%r12), %edi
LBB0_28:
	movq	%rbx, %rsi
	callq	_mmal_queue_put_back
LBB0_32:
	xorl	%eax, %eax
	callq	_vcos_getmicrosecs
	subq	(%r15), %rax
	movq	%rax, (%r15)
	cmpq	$0, 32(%r15)
	je	LBB0_35
## %bb.33:
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jne	LBB0_35
## %bb.34:
	movq	_MMALPLAY_STILL_IMAGE_PAUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_vcos_sleep
LBB0_35:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%p, %s"

	.comm	_MMAL_PARAMETER_CLOCK_ACTIVE,4,2 ## @MMAL_PARAMETER_CLOCK_ACTIVE
	.comm	_MMAL_TRUE,4,2                  ## @MMAL_TRUE
	.comm	_MMAL_CONNECTION_FLAG_TUNNELLING,4,2 ## @MMAL_CONNECTION_FLAG_TUNNELLING
L_.str.1:                               ## @.str.1
	.asciz	"mmal_port_send_buffer failed (%i)"

	.comm	_MMALPLAY_STILL_IMAGE_PAUSE,4,2 ## @MMALPLAY_STILL_IMAGE_PAUSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmalplay_play                  ; -- Begin function mmalplay_play
	.p2align	2
_mmalplay_play:                         ; @mmalplay_play
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	w2, [x0, #96]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_LOG_TRACE
	bl	_vcos_getmicrosecs
	str	x0, [x19]
	ldr	x0, [x19, #88]
Lloh2:
	adrp	x20, _MMAL_PARAMETER_CLOCK_ACTIVE@GOTPAGE
Lloh3:
	ldr	x20, [x20, _MMAL_PARAMETER_CLOCK_ACTIVE@GOTPAGEOFF]
Lloh4:
	adrp	x21, _MMAL_TRUE@GOTPAGE
Lloh5:
	ldr	x21, [x21, _MMAL_TRUE@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x20]
	ldr	w2, [x21]
	bl	_mmal_port_parameter_set_boolean
LBB0_2:
	ldr	x0, [x19, #80]
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w1, [x20]
	ldr	w2, [x21]
	bl	_mmal_port_parameter_set_boolean
LBB0_4:
	add	x20, x19, #72
	mov	x0, x20
	bl	_vcos_semaphore_wait
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_6
LBB0_5:
	ldr	x22, [x19, #8]
	b	LBB0_33
LBB0_6:
Lloh6:
	adrp	x24, _MMAL_SUCCESS@GOTPAGE
Lloh7:
	ldr	x24, [x24, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh8:
	adrp	x25, _MMAL_CONNECTION_FLAG_TUNNELLING@GOTPAGE
Lloh9:
	ldr	x25, [x25, _MMAL_CONNECTION_FLAG_TUNNELLING@GOTPAGEOFF]
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
                                        ;       Child Loop BB0_16 Depth 3
                                        ;       Child Loop BB0_26 Depth 3
	ldr	x8, [x19, #8]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_28
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x26, #0
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	add	x26, x26, #1
	ldr	w8, [x19, #16]
	cmp	x26, x8
	b.hs	LBB0_28
LBB0_11:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_16 Depth 3
                                        ;       Child Loop BB0_26 Depth 3
	ldr	x8, [x19, #56]
	ldr	x21, [x8, x26, lsl #3]
	ldr	w8, [x21]
	ldr	w9, [x25]
	tst	w9, w8
	b.ne	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	ldr	w0, [x21, #32]
	bl	_mmal_queue_get
	cbz	x0, LBB0_23
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=2
	mov	x23, x0
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=3
	ldr	x0, [x21, #16]
	mov	x1, x23
	bl	_mmal_port_send_buffer
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_31
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=3
	ldr	w0, [x21, #32]
	bl	_mmal_queue_get
	mov	x23, x0
	cbz	x0, LBB0_23
LBB0_16:                                ;   Parent Loop BB0_7 Depth=1
                                        ;     Parent Loop BB0_11 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x8, [x23, #8]
	ldr	x1, [x21, #8]
	cbz	x8, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=3
	mov	x0, x21
	mov	x2, x23
	bl	_mmalplay_event_handle
	ldr	x8, [x24]
	cmp	x0, x8
	b.eq	LBB0_15
	b	LBB0_29
LBB0_18:                                ;   in Loop: Header=BB0_16 Depth=3
	ldr	x8, [x19, #24]
	cmp	x1, x8
	b.ne	LBB0_14
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=3
	ldr	x8, [x23]
	cbz	x8, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_16 Depth=3
	ldr	w8, [x19, #48]
	add	w8, w8, #1
	str	w8, [x19, #48]
LBB0_21:                                ;   in Loop: Header=BB0_16 Depth=3
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_14
; %bb.22:                               ;   in Loop: Header=BB0_16 Depth=3
	bl	_getchar
	b	LBB0_14
LBB0_23:                                ;   in Loop: Header=BB0_11 Depth=2
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_10
; %bb.24:                               ;   in Loop: Header=BB0_11 Depth=2
	ldr	w0, [x8]
	bl	_mmal_queue_get
	cbz	x0, LBB0_10
; %bb.25:                               ;   in Loop: Header=BB0_11 Depth=2
	mov	x23, x0
LBB0_26:                                ;   Parent Loop BB0_7 Depth=1
                                        ;     Parent Loop BB0_11 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x0, [x21, #8]
	mov	x1, x23
	bl	_mmal_port_send_buffer
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_30
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=3
	ldr	x8, [x21, #24]
	ldr	w0, [x8]
	bl	_mmal_queue_get
	mov	x23, x0
	cbnz	x0, LBB0_26
	b	LBB0_10
LBB0_28:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_vcos_semaphore_wait
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_7
	b	LBB0_5
LBB0_29:
	mov	x22, x0
	b	LBB0_33
LBB0_30:
	mov	x22, x0
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_LOG_ERROR
	ldr	x8, [x21, #24]
	ldr	w0, [x8]
	b	LBB0_32
LBB0_31:
	mov	x22, x0
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_LOG_ERROR
	ldr	w0, [x21, #32]
LBB0_32:
	mov	x1, x23
	bl	_mmal_queue_put_back
LBB0_33:
	bl	_vcos_getmicrosecs
	ldr	x8, [x19]
	sub	x8, x0, x8
	str	x8, [x19]
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_36
; %bb.34:
Lloh14:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x22, x8
	b.ne	LBB0_36
; %bb.35:
Lloh17:
	adrp	x8, _MMALPLAY_STILL_IMAGE_PAUSE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MMALPLAY_STILL_IMAGE_PAUSE@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_vcos_sleep
LBB0_36:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%p, %s"

	.comm	_MMAL_PARAMETER_CLOCK_ACTIVE,4,2 ; @MMAL_PARAMETER_CLOCK_ACTIVE
	.comm	_MMAL_TRUE,4,2                  ; @MMAL_TRUE
	.comm	_MMAL_CONNECTION_FLAG_TUNNELLING,4,2 ; @MMAL_CONNECTION_FLAG_TUNNELLING
l_.str.1:                               ; @.str.1
	.asciz	"mmal_port_send_buffer failed (%i)"

	.comm	_MMALPLAY_STILL_IMAGE_PAUSE,4,2 ; @MMALPLAY_STILL_IMAGE_PAUSE
.subsections_via_symbols
