	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmal_clock_create_scheduling
_mmal_clock_create_scheduling:          ## @mmal_clock_create_scheduling
	.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, %rbx
	movq	_VCOS_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	leaq	24(%rdi), %r14
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mmal_clock_timer_create
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	28(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%edx, %edx
	callq	_vcos_semaphore_create
	movl	%eax, %r12d
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_3
## %bb.4:
	xorl	%eax, %eax
	callq	_mmal_list_create
	movq	%rax, 8(%rbx)
	xorl	%eax, %eax
	callq	_mmal_list_create
	movq	%rax, (%rbx)
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.5:
	testq	%rax, %rax
	je	LBB0_13
## %bb.6:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_CLOCK_REQUEST_SLOTS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_10
## %bb.7:
	movq	16(%rbx), %rax
	movq	%rsi, %rdi
	movq	%rax, %rsi
	callq	_mmal_list_push_back
	movq	_CLOCK_REQUEST_SLOTS@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	jb	LBB0_10
## %bb.8:
	movl	$1, %r14d
	movl	$4, %r13d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rdi
	movq	16(%rbx), %rsi
	addq	%r13, %rsi
	callq	_mmal_list_push_back
	incq	%r14
	movq	_CLOCK_REQUEST_SLOTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$4, %r13
	cmpq	%rax, %r14
	jb	LBB0_9
LBB0_10:
	leaq	36(%rbx), %r13
	movq	_mmal_clock_worker_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.4(%rip), %rsi
	movq	%r13, %rdi
	xorl	%edx, %edx
	movq	%rbx, %r8
	callq	_vcos_thread_create
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.12:
	movq	%r13, %rdi
	callq	_vcos_thread_get_priority
	movq	_VCOS_AFFINITY_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	orl	$1, %eax
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_vcos_thread_set_priority
	movq	_MMAL_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rbx
	jmp	LBB0_22
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_LOG_ERROR
	jmp	LBB0_14
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_LOG_ERROR
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str.3(%rip), %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_LOG_ERROR
	jmp	LBB0_14
LBB0_11:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_LOG_ERROR
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_14:
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_16
## %bb.15:
	leaq	28(%rbx), %rdi
	callq	_vcos_semaphore_delete
LBB0_16:
	testq	%r15, %r15
	je	LBB0_18
## %bb.17:
	movq	%r14, %rdi
	callq	_mmal_clock_timer_destroy
LBB0_18:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.19:
	callq	_mmal_list_destroy
LBB0_20:
	movq	(%rbx), %rdi
	movq	_MMAL_ENOSPC@GOTPCREL(%rip), %rbx
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.21:
	callq	_mmal_list_destroy
LBB0_22:
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_FALSE,8,3                 ## @MMAL_FALSE
	.comm	_VCOS_EINVAL,4,2                ## @VCOS_EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to create timer %p"

L_.str.1:                               ## @.str.1
	.asciz	"mmal-clock sema"

	.comm	_VCOS_SUCCESS,4,2               ## @VCOS_SUCCESS
L_.str.2:                               ## @.str.2
	.asciz	"failed to create event semaphore %d"

L_.str.3:                               ## @.str.3
	.asciz	"failed to create list %p %p"

	.comm	_CLOCK_REQUEST_SLOTS,4,2        ## @CLOCK_REQUEST_SLOTS
L_.str.4:                               ## @.str.4
	.asciz	"mmal-clock thread"

	.comm	_mmal_clock_worker_thread,4,2   ## @mmal_clock_worker_thread
L_.str.5:                               ## @.str.5
	.asciz	"failed to create worker thread"

	.comm	_VCOS_AFFINITY_MASK,4,2         ## @VCOS_AFFINITY_MASK
	.comm	_MMAL_TRUE,4,2                  ## @MMAL_TRUE
	.comm	_MMAL_SUCCESS,4,2               ## @MMAL_SUCCESS
	.comm	_MMAL_ENOSPC,4,2                ## @MMAL_ENOSPC
	.no_dead_strip	_mmal_clock_create_scheduling
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmal_clock_create_scheduling
_mmal_clock_create_scheduling:          ; @mmal_clock_create_scheduling
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, _VCOS_EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VCOS_EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	add	x20, x0, #24
	mov	x0, x20
	mov	x1, x19
	bl	_mmal_clock_timer_create
	mov	x21, x0
Lloh3:
	adrp	x24, _VCOS_SUCCESS@GOTPAGE
Lloh4:
	ldr	x24, [x24, _VCOS_SUCCESS@GOTPAGEOFF]
	cbz	x0, LBB0_10
; %bb.1:
	add	x0, x19, #28
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #0
	bl	_vcos_semaphore_create
	mov	x22, x0
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_11
; %bb.2:
	bl	_mmal_list_create
	str	x0, [x19, #8]
	bl	_mmal_list_create
	mov	x8, x0
	str	x0, [x19]
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_12
; %bb.3:
	cbz	x8, LBB0_12
; %bb.4:
Lloh7:
	adrp	x23, _CLOCK_REQUEST_SLOTS@GOTPAGE
Lloh8:
	ldr	x23, [x23, _CLOCK_REQUEST_SLOTS@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_8
; %bb.5:
	ldr	x1, [x19, #16]
	bl	_mmal_list_push_back
	ldr	w8, [x23]
	cmp	w8, #2
	b.lo	LBB0_8
; %bb.6:
	mov	w25, #1
	mov	w26, #4
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x0, x8, [x19, #8]
	add	x1, x8, x26
	bl	_mmal_list_push_back
	add	x25, x25, #1
	ldr	w8, [x23]
	add	x26, x26, #4
	cmp	x25, x8
	b.lo	LBB0_7
LBB0_8:
	add	x23, x19, #36
Lloh9:
	adrp	x8, _mmal_clock_worker_thread@GOTPAGE
Lloh10:
	ldr	x8, [x8, _mmal_clock_worker_thread@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x23
	mov	x2, #0
	mov	x4, x19
	bl	_vcos_thread_create
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_13
; %bb.9:
	mov	x0, x23
	bl	_vcos_thread_get_priority
Lloh14:
	adrp	x8, _VCOS_AFFINITY_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VCOS_AFFINITY_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	and	w8, w8, w0
	orr	w1, w8, #0x1
	mov	x0, x23
	bl	_vcos_thread_set_priority
Lloh17:
	adrp	x8, _MMAL_TRUE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MMAL_TRUE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x19, #32]
Lloh20:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
	b	LBB0_23
LBB0_10:
	str	x19, [sp]
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_14
LBB0_11:
	str	x22, [sp]
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_12:
	stp	x0, x8, [sp]
Lloh26:
	adrp	x0, l_.str.3@PAGE
Lloh27:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_14
LBB0_13:
Lloh28:
	adrp	x0, l_.str.5@PAGE
Lloh29:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_14:
	bl	_LOG_ERROR
	ldr	w8, [x24]
	cmp	w22, w8
	b.ne	LBB0_16
; %bb.15:
	add	x0, x19, #28
	bl	_vcos_semaphore_delete
LBB0_16:
	cbz	x21, LBB0_18
; %bb.17:
	mov	x0, x20
	bl	_mmal_clock_timer_destroy
LBB0_18:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_20
; %bb.19:
	bl	_mmal_list_destroy
LBB0_20:
	ldr	x0, [x19]
	cbz	x0, LBB0_22
; %bb.21:
	bl	_mmal_list_destroy
LBB0_22:
Lloh30:
	adrp	x8, _MMAL_ENOSPC@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MMAL_ENOSPC@GOTPAGEOFF]
LBB0_23:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_FALSE,8,3                 ; @MMAL_FALSE
	.comm	_VCOS_EINVAL,4,2                ; @VCOS_EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to create timer %p"

l_.str.1:                               ; @.str.1
	.asciz	"mmal-clock sema"

	.comm	_VCOS_SUCCESS,4,2               ; @VCOS_SUCCESS
l_.str.2:                               ; @.str.2
	.asciz	"failed to create event semaphore %d"

l_.str.3:                               ; @.str.3
	.asciz	"failed to create list %p %p"

	.comm	_CLOCK_REQUEST_SLOTS,4,2        ; @CLOCK_REQUEST_SLOTS
l_.str.4:                               ; @.str.4
	.asciz	"mmal-clock thread"

	.comm	_mmal_clock_worker_thread,4,2   ; @mmal_clock_worker_thread
l_.str.5:                               ; @.str.5
	.asciz	"failed to create worker thread"

	.comm	_VCOS_AFFINITY_MASK,4,2         ; @VCOS_AFFINITY_MASK
	.comm	_MMAL_TRUE,4,2                  ; @MMAL_TRUE
	.comm	_MMAL_SUCCESS,4,2               ; @MMAL_SUCCESS
	.comm	_MMAL_ENOSPC,4,2                ; @MMAL_ENOSPC
	.no_dead_strip	_mmal_clock_create_scheduling
.subsections_via_symbols
