# clock_settime64 needed for 32 bits without sign bit
	.section	.text
	.intel_syntax
	.global	clock_settime
	.type	clock_settime, @function
clock_settime:
	push	%ebp
	mov	%ebp, %esp
	push	%ebx
	sub	%esp, 24		# Allocate space for a new record
	mov	%ebx, [%ebp + 12]	# Store remote record address in %ebx
	mov	%eax, [%ebx]		# %eax = ts.sec
	mov	[%ebp - 20], %eax	# Store it in local record
	mov	%eax, [%ebx + 4]	# %eax = ts.nsec
	mov	[%ebp - 12], %eax	# Store it in local record
	lea	%ecx, [%ebp - 20]	# Store local record address in %eax
	mov	%ebx, [%ebp + 8]	# Clock ID
	mov	%eax, 404		# clock_settime64 system call
	int	128
	pop	%ebx
	mov	%esp, %ebp		# Deallocate space
	pop	%ebp
	ret
