	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function clock_adjust_clocks
_clock_adjust_clocks:                   ## @clock_adjust_clocks
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	leaq	-40(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	callq	_clock_get_mt_off_avg
	testl	%eax, %eax
	je	LBB0_12
## %bb.1:
	movq	-40(%rbp), %rax
	movl	20(%rax), %eax
	movl	%eax, 100(%rbx)
	movq	-48(%rbp), %rax
	movl	20(%rax), %eax
	movl	%eax, 96(%rbx)
	movq	8(%r15), %rax
	movl	(%rax), %edi
	callq	_mmal_port_clock_media_time_get
	movq	(%rbx), %r12
	movq	%r14, (%rbx)
	cmpq	$0, 88(%rbx)
	je	LBB0_3
## %bb.2:
	movq	_MMAL_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 88(%rbx)
	movq	-40(%rbp), %rax
	movq	(%rax), %rax
	subq	64(%rbx), %rax
	movq	%rax, 8(%rbx)
	movq	%rax, 16(%rbx)
	movq	%r15, %rdi
	callq	_clock_stop_clocks
	addq	8(%rbx), %r14
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_clock_start_clocks
	jmp	LBB0_10
LBB0_3:
	movq	-48(%rbp), %rax
	movq	(%rax), %rdi
	subq	64(%rbx), %rdi
	movq	-40(%rbp), %rax
	movq	(%rax), %rsi
	subq	24(%rbx), %rsi
	callq	_MIN
	movq	%rax, %rcx
	movq	%rax, 16(%rbx)
	xorl	%eax, %eax
	movq	%r14, %rdx
	subq	%r12, %rdx
	cmovgq	%rdx, %rax
	imulq	72(%rbx), %rax
	movq	80(%rbx), %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_4
## %bb.5:
	cqto
	idivq	%rsi
	jmp	LBB0_6
LBB0_4:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
LBB0_6:
	movq	8(%rbx), %rdx
	subq	%rdx, %rcx
	movq	%rcx, 32(%rbx)
	movq	%rax, %rdx
	negq	%rdx
	cmpq	%rdx, %rcx
	jl	LBB0_8
## %bb.7:
	movq	%rax, %rdx
	cmpq	%rax, %rcx
	jle	LBB0_9
LBB0_8:
	movq	%rdx, 32(%rbx)
LBB0_9:
	movq	-40(%rbp), %rax
	movl	8(%rax), %eax
	movb	44(%rbx), %cl
	shll	%cl, %eax
	sarl	$2, %eax
	movl	$1048576, %edi                  ## imm = 0x100000
	subl	%eax, %edi
	xorl	%esi, %esi
	callq	_MAX
	movl	%eax, 40(%rbx)
	cltq
	imulq	32(%rbx), %rax
	shrq	$20, %rax
	movq	-40(%rbp), %rcx
	imull	12(%rcx), %eax
	shll	$8, %eax
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	16(%rcx)
	sarl	$8, %eax
	movl	%eax, 48(%rbx)
	movslq	%eax, %rsi
	addq	8(%rbx), %rsi
	movq	%rsi, 8(%rbx)
	addq	%r14, %rsi
	movq	%r15, %rdi
	callq	_clock_set_media_time
LBB0_10:
	movq	(%r15), %rax
	movq	(%rax), %rax
	cmpq	$0, 56(%rax)
	je	LBB0_12
## %bb.11:
	movl	52(%rax), %esi
	movq	%r15, %rdi
	callq	_clock_set_scale
LBB0_12:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_FALSE,8,3                 ## @MMAL_FALSE
	.no_dead_strip	_clock_adjust_clocks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function clock_adjust_clocks
_clock_adjust_clocks:                   ; @clock_adjust_clocks
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x21, [x8]
	add	x2, sp, #8
	mov	x3, sp
	bl	_clock_get_mt_off_avg
	cbz	w0, LBB0_9
; %bb.1:
	ldr	x8, [sp, #8]
	ldr	w8, [x8, #20]
	str	w8, [x21, #100]
	ldr	x8, [sp]
	ldr	w8, [x8, #20]
	str	w8, [x21, #96]
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_mmal_port_clock_media_time_get
	ldr	x22, [x21]
	str	x20, [x21]
	ldr	x8, [x21, #88]
	cbz	x8, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _MMAL_FALSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMAL_FALSE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [x21, #88]
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
	ldr	x9, [x21, #64]
	sub	x8, x8, x9
	stp	x8, x8, [x21, #8]
	mov	x0, x19
	bl	_clock_stop_clocks
	ldr	x8, [x21, #8]
	add	x1, x8, x20
	mov	x0, x19
	bl	_clock_start_clocks
	b	LBB0_7
LBB0_3:
	ldr	x8, [sp]
	ldr	x8, [x8]
	ldr	x9, [x21, #64]
	sub	x0, x8, x9
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
	ldr	x9, [x21, #24]
	sub	x1, x8, x9
	bl	_MIN
	str	x0, [x21, #16]
	subs	x8, x20, x22
	csel	x8, x8, xzr, gt
	ldp	x9, x10, [x21, #72]
	mul	x8, x9, x8
	sdiv	x8, x8, x10
	ldr	x9, [x21, #8]
	sub	x9, x0, x9
	str	x9, [x21, #32]
	neg	x10, x8
	cmp	x9, x10
	b.lt	LBB0_5
; %bb.4:
	mov	x10, x8
	cmp	x9, x8
	b.le	LBB0_6
LBB0_5:
	str	x10, [x21, #32]
LBB0_6:
	ldr	x8, [sp, #8]
	ldr	w8, [x8, #8]
	ldr	w9, [x21, #44]
	lsl	w8, w8, w9
	mov	w9, #1048576
	sub	w0, w9, w8, asr #2
	mov	w1, #0
	bl	_MAX
                                        ; kill: def $w0 killed $w0 def $x0
	str	w0, [x21, #40]
	ldr	x8, [x21, #32]
	sxtw	x9, w0
	mul	x8, x8, x9
	lsr	x8, x8, #20
	ldr	x9, [sp, #8]
	ldp	w10, w9, [x9, #12]
	mul	w8, w10, w8
	lsl	w8, w8, #8
	sdiv	w8, w8, w9
	asr	w8, w8, #8
	str	w8, [x21, #48]
	ldr	x9, [x21, #8]
	add	x8, x9, w8, sxtw
	str	x8, [x21, #8]
	add	x1, x8, x20
	mov	x0, x19
	bl	_clock_set_media_time
LBB0_7:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x9, [x8, #56]
	cbz	x9, LBB0_9
; %bb.8:
	ldr	w1, [x8, #52]
	mov	x0, x19
	bl	_clock_set_scale
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_FALSE,8,3                 ; @MMAL_FALSE
	.no_dead_strip	_clock_adjust_clocks
.subsections_via_symbols
