	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_clock_create              ## -- Begin function mmal_clock_create
	.p2align	4, 0x90
_mmal_clock_create:                     ## @mmal_clock_create
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdx
	movl	$1, %edi
	movl	$40, %esi
	callq	_vcos_calloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movq	%rax, %rdi
	addq	$32, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_vcos_mutex_create
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.6:
	movq	_CLOCK_UPDATE_THRESHOLD_LOWER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_CLOCK_UPDATE_THRESHOLD_UPPER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_CLOCK_DISCONT_THRESHOLD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_CLOCK_DISCONT_DURATION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	$0, 8(%rbx)
	movq	_MMAL_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movabsq	$4294967297, %rsi               ## imm = 0x100000001
	movq	%rbx, %rdi
	callq	_mmal_clock_scale_set
	movq	%rbx, (%r14)
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_LOG_ERROR
	movq	_MMAL_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str.3(%rip), %rdi
	callq	_LOG_ERROR
	movq	%rbx, %rdi
	callq	_vcos_free
	movq	_MMAL_ENOSPC@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_EINVAL,4,2                ## @MMAL_EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mmal-clock"

L_.str.1:                               ## @.str.1
	.asciz	"failed to allocate memory"

	.comm	_MMAL_ENOMEM,4,2                ## @MMAL_ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"mmal-clock lock"

	.comm	_VCOS_SUCCESS,8,3               ## @VCOS_SUCCESS
L_.str.3:                               ## @.str.3
	.asciz	"failed to create lock mutex"

	.comm	_MMAL_ENOSPC,4,2                ## @MMAL_ENOSPC
	.comm	_CLOCK_UPDATE_THRESHOLD_LOWER,4,2 ## @CLOCK_UPDATE_THRESHOLD_LOWER
	.comm	_CLOCK_UPDATE_THRESHOLD_UPPER,4,2 ## @CLOCK_UPDATE_THRESHOLD_UPPER
	.comm	_CLOCK_DISCONT_THRESHOLD,4,2    ## @CLOCK_DISCONT_THRESHOLD
	.comm	_CLOCK_DISCONT_DURATION,4,2     ## @CLOCK_DISCONT_DURATION
	.comm	_MMAL_FALSE,4,2                 ## @MMAL_FALSE
	.comm	_MMAL_SUCCESS,4,2               ## @MMAL_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_clock_create              ; -- Begin function mmal_clock_create
	.p2align	2
_mmal_clock_create:                     ; @mmal_clock_create
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #1
	mov	w1, #40
	bl	_vcos_calloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	add	x0, x0, #32
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_vcos_mutex_create
Lloh4:
	adrp	x8, _VCOS_SUCCESS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VCOS_SUCCESS@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.3:
Lloh7:
	adrp	x8, _CLOCK_UPDATE_THRESHOLD_LOWER@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CLOCK_UPDATE_THRESHOLD_LOWER@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _CLOCK_UPDATE_THRESHOLD_UPPER@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CLOCK_UPDATE_THRESHOLD_UPPER@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _CLOCK_DISCONT_THRESHOLD@GOTPAGE
Lloh14:
	ldr	x10, [x10, _CLOCK_DISCONT_THRESHOLD@GOTPAGEOFF]
	stp	w9, w8, [x20, #24]
Lloh15:
	ldr	w8, [x10]
Lloh16:
	adrp	x9, _CLOCK_DISCONT_DURATION@GOTPAGE
Lloh17:
	ldr	x9, [x9, _CLOCK_DISCONT_DURATION@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #16]
	str	xzr, [x20, #8]
Lloh19:
	adrp	x8, _MMAL_FALSE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MMAL_FALSE@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x20, #4]
	mov	x0, x20
	mov	x1, #4294967297
	bl	_mmal_clock_scale_set
	str	x20, [x19]
Lloh22:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
Lloh24:
	adrp	x8, _MMAL_EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MMAL_EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh26:
	adrp	x0, l_.str.1@PAGE
Lloh27:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_LOG_ERROR
Lloh28:
	adrp	x8, _MMAL_ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MMAL_ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh30:
	adrp	x0, l_.str.3@PAGE
Lloh31:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_LOG_ERROR
	mov	x0, x20
	bl	_vcos_free
Lloh32:
	adrp	x8, _MMAL_ENOSPC@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MMAL_ENOSPC@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_EINVAL,4,2                ; @MMAL_EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mmal-clock"

l_.str.1:                               ; @.str.1
	.asciz	"failed to allocate memory"

	.comm	_MMAL_ENOMEM,4,2                ; @MMAL_ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"mmal-clock lock"

	.comm	_VCOS_SUCCESS,8,3               ; @VCOS_SUCCESS
l_.str.3:                               ; @.str.3
	.asciz	"failed to create lock mutex"

	.comm	_MMAL_ENOSPC,4,2                ; @MMAL_ENOSPC
	.comm	_CLOCK_UPDATE_THRESHOLD_LOWER,4,2 ; @CLOCK_UPDATE_THRESHOLD_LOWER
	.comm	_CLOCK_UPDATE_THRESHOLD_UPPER,4,2 ; @CLOCK_UPDATE_THRESHOLD_UPPER
	.comm	_CLOCK_DISCONT_THRESHOLD,4,2    ; @CLOCK_DISCONT_THRESHOLD
	.comm	_CLOCK_DISCONT_DURATION,4,2     ; @CLOCK_DISCONT_DURATION
	.comm	_MMAL_FALSE,4,2                 ; @MMAL_FALSE
	.comm	_MMAL_SUCCESS,4,2               ; @MMAL_SUCCESS
.subsections_via_symbols
