	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_clock_scale_set           ## -- Begin function mmal_clock_scale_set
	.p2align	4, 0x90
_mmal_clock_scale_set:                  ## @mmal_clock_scale_set
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	shrq	$32, %rsi
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%ebx, %edx
	callq	_LOG_TRACE
	movq	%r14, %rdi
	callq	_LOCK
	movq	%r14, %rdi
	callq	_mmal_clock_update_local_time_locked
	movq	%rbx, 16(%r14)
	movq	%rbx, %rdi
	callq	_mmal_rational_to_fixed_16_16
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rcx
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	xorl	%edx, %edx
	idivq	%rcx
	jmp	LBB0_3
LBB0_2:
	movq	_Q16_ONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_3:
	movq	%rax, (%r14)
	movq	%r14, %rdi
	callq	_UNLOCK
	movq	%r14, %rdi
	callq	_mmal_clock_wake_thread
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"new scale %d/%d"

	.comm	_Q16_ONE,8,3                    ## @Q16_ONE
	.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_scale_set           ; -- Begin function mmal_clock_scale_set
	.p2align	2
_mmal_clock_scale_set:                  ; @mmal_clock_scale_set
	.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
	mov	x20, x1
	mov	x19, x0
	lsr	x1, x1, #32
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x2, x20
	bl	_LOG_TRACE
	mov	x0, x19
	bl	_LOCK
	mov	x0, x19
	bl	_mmal_clock_update_local_time_locked
	str	x20, [x19, #16]
	mov	x0, x20
	bl	_mmal_rational_to_fixed_16_16
	str	x0, [x19, #8]
	cbz	x0, LBB0_2
; %bb.1:
	mov	x8, #4294967296
	sdiv	x8, x8, x0
	b	LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _Q16_ONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _Q16_ONE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
LBB0_3:
	str	x8, [x19]
	mov	x0, x19
	bl	_UNLOCK
	mov	x0, x19
	bl	_mmal_clock_wake_thread
Lloh5:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh7:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"new scale %d/%d"

	.comm	_Q16_ONE,8,3                    ; @Q16_ONE
	.comm	_MMAL_SUCCESS,4,2               ; @MMAL_SUCCESS
.subsections_via_symbols
