	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_timer_set                      ## -- Begin function timer_set
	.p2align	4, 0x90
_timer_set:                             ## @timer_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	%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	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rsi, %r15
	shrq	$32, %r15
	addq	$4, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_lock
	xorl	%eax, %eax
	callq	_timespec_now
	movl	%eax, %r13d
	testq	%r12, %r12
	je	LBB0_2
## %bb.1:
	movl	20(%rbx), %edi
	movl	%r13d, %esi
	callq	_timespec_subtract
	movl	%eax, (%r12)
	movl	12(%rbx), %eax
	movl	%eax, 4(%r12)
LBB0_2:
	movl	%r13d, 16(%rbx)
	movl	%r13d, %edi
	movl	%r14d, %esi
	callq	_timespec_add
	movl	%eax, 20(%rbx)
	movl	%r15d, 12(%rbx)
	movl	%r14d, %edi
	callq	_timespec_is_zero
	movl	(%rbx), %ecx
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	testl	%ecx, %ecx
	je	LBB0_7
## %bb.6:
	movl	$0, (%rbx)
	movl	8(%rbx), %edi
	movq	_SIGUSR1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pthread_kill
	jmp	LBB0_7
LBB0_3:
	testl	%ecx, %ecx
	jne	LBB0_7
## %bb.4:
	movl	$1, (%rbx)
	leaq	8(%rbx), %rdi
	movq	_timer_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movq	%rbx, %rcx
	callq	_pthread_create
	movl	8(%rbx), %edi
	callq	_pthread_detach
LBB0_7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_unlock
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_timer_thread,4,2               ## @timer_thread
	.comm	_SIGUSR1,4,2                    ## @SIGUSR1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_timer_set                      ; -- Begin function timer_set
	.p2align	2
_timer_set:                             ; @timer_set
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x2
	mov	x21, x1
	mov	x20, x0
	lsr	x25, x1, #32
	add	x19, x0, #4
	mov	x0, x19
	bl	_lock
	bl	_timespec_now
	mov	x23, x0
	cbz	x22, LBB0_2
; %bb.1:
	ldr	w0, [x20, #20]
	mov	w24, w23
	mov	x1, x24
	bl	_timespec_subtract
	ldr	w8, [x20, #12]
	stp	w0, w8, [x22]
	b	LBB0_3
LBB0_2:
	mov	w24, w23
LBB0_3:
	str	w23, [x20, #16]
	mov	x0, x24
	mov	x1, x21
	bl	_timespec_add
	str	w0, [x20, #20]
	str	w25, [x20, #12]
	mov	x0, x21
	bl	_timespec_is_zero
	ldr	w8, [x20]
	cbz	w0, LBB0_6
; %bb.4:
	cbz	w8, LBB0_8
; %bb.5:
	str	wzr, [x20]
	ldr	w0, [x20, #8]
Lloh0:
	adrp	x8, _SIGUSR1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIGUSR1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_pthread_kill
	b	LBB0_8
LBB0_6:
	cbnz	w8, LBB0_8
; %bb.7:
	mov	w8, #1
	str	w8, [x20]
	add	x0, x20, #8
Lloh3:
	adrp	x8, _timer_thread@GOTPAGE
Lloh4:
	ldr	x8, [x8, _timer_thread@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x1, #0
	mov	x3, x20
	bl	_pthread_create
	ldr	w0, [x20, #8]
	bl	_pthread_detach
LBB0_8:
	mov	x0, x19
	bl	_unlock
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_timer_thread,4,2               ; @timer_thread
	.comm	_SIGUSR1,4,2                    ; @SIGUSR1
.subsections_via_symbols
