	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setitimer                      ## -- Begin function setitimer
	.p2align	4, 0x90
_setitimer:                             ## @setitimer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	leaq	L_.str(%rip), %rdi
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_error                          ## TAILCALL
LBB0_3:
	movq	%rsi, %rbx
	leaq	_setitimer.zero(%rip), %rsi
	movq	%rbx, %rdi
	callq	_is_timeval_eq
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:
	leaq	8(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_is_timeval_eq
	testq	%rax, %rax
	je	LBB0_5
LBB0_6:
	movq	_timer_thread@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	callq	_stop_timer_thread
LBB0_8:
	leaq	8(%rbx), %rdi
	leaq	_setitimer.zero(%rip), %rsi
	callq	_is_timeval_eq
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	_setitimer.zero(%rip), %rsi
	movq	%rbx, %rdi
	callq	_is_timeval_eq
	testq	%rax, %rax
	je	LBB0_10
## %bb.13:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_10:
	imull	$1000, 8(%rbx), %eax            ## imm = 0x3E8
	movslq	12(%rbx), %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	addl	%eax, %ecx
	movq	_timer_interval@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	leaq	_setitimer.zero(%rip), %rsi
	movq	%rbx, %rdi
	callq	_is_timeval_eq
	movq	_one_shot@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	cmpb	$0, _setitimer.atexit_done(%rip)
	jne	LBB0_12
## %bb.11:
	movq	_stop_timer_thread@GOTPCREL(%rip), %rdi
	callq	_atexit
	movb	$1, _setitimer.atexit_done(%rip)
LBB0_12:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_start_timer_thread             ## TAILCALL
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @setitimer.zero
_setitimer.zero:
	.space	8

.zerofill __DATA,__bss,_setitimer.atexit_done,1,2 ## @setitimer.atexit_done
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setitimer param 3 != NULL not implemented"

L_.str.1:                               ## @.str.1
	.asciz	"setitimer: it_interval must be zero or eq it_value"

	.comm	_timer_thread,8,3               ## @timer_thread
	.comm	_timer_interval,4,2             ## @timer_interval
	.comm	_one_shot,8,3                   ## @one_shot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setitimer                      ; -- Begin function setitimer
	.p2align	2
_setitimer:                             ; @setitimer
	.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	x2, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _errno@GOTPAGE
Lloh4:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh5:
	str	w8, [x9]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_error
LBB0_3:
	mov	x19, x1
Lloh8:
	adrp	x1, _setitimer.zero@PAGE
Lloh9:
	add	x1, x1, _setitimer.zero@PAGEOFF
	mov	x0, x19
	bl	_is_timeval_eq
	cbnz	x0, LBB0_5
; %bb.4:
	add	x1, x19, #8
	mov	x0, x19
	bl	_is_timeval_eq
	cbz	x0, LBB0_13
LBB0_5:
Lloh10:
	adrp	x8, _timer_thread@GOTPAGE
Lloh11:
	ldr	x8, [x8, _timer_thread@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
	bl	_stop_timer_thread
LBB0_7:
	add	x0, x19, #8
Lloh13:
	adrp	x1, _setitimer.zero@PAGE
Lloh14:
	add	x1, x1, _setitimer.zero@PAGEOFF
	bl	_is_timeval_eq
	cbz	x0, LBB0_10
; %bb.8:
Lloh15:
	adrp	x1, _setitimer.zero@PAGE
Lloh16:
	add	x1, x1, _setitimer.zero@PAGEOFF
	mov	x0, x19
	bl	_is_timeval_eq
	cbz	x0, LBB0_10
; %bb.9:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	w8, #1000
	ldp	w9, w10, [x19, #8]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	mov	w11, #19923
	movk	w11, #4194, lsl #16
	mul	x10, x10, x11
	lsr	x11, x10, #63
	asr	x10, x10, #38
	add	w10, w10, w11
	madd	w8, w9, w8, w10
Lloh17:
	adrp	x9, _timer_interval@GOTPAGE
Lloh18:
	ldr	x9, [x9, _timer_interval@GOTPAGEOFF]
Lloh19:
	str	w8, [x9]
Lloh20:
	adrp	x1, _setitimer.zero@PAGE
Lloh21:
	add	x1, x1, _setitimer.zero@PAGEOFF
	mov	x0, x19
	bl	_is_timeval_eq
Lloh22:
	adrp	x8, _one_shot@GOTPAGE
Lloh23:
	ldr	x8, [x8, _one_shot@GOTPAGEOFF]
Lloh24:
	str	x0, [x8]
	adrp	x19, _setitimer.atexit_done@PAGE
	ldrb	w8, [x19, _setitimer.atexit_done@PAGEOFF]
	tbnz	w8, #0, LBB0_12
; %bb.11:
Lloh25:
	adrp	x0, _stop_timer_thread@GOTPAGE
Lloh26:
	ldr	x0, [x0, _stop_timer_thread@GOTPAGEOFF]
	bl	_atexit
	mov	w8, #1
	strb	w8, [x19, _setitimer.atexit_done@PAGEOFF]
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_start_timer_thread
LBB0_13:
Lloh27:
	adrp	x8, _EINVAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _errno@GOTPAGE
Lloh31:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh32:
	str	w8, [x9]
Lloh33:
	adrp	x0, l_.str.1@PAGE
Lloh34:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotStr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @setitimer.zero
_setitimer.zero:
	.space	8

.zerofill __DATA,__bss,_setitimer.atexit_done,1,2 ; @setitimer.atexit_done
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setitimer param 3 != NULL not implemented"

l_.str.1:                               ; @.str.1
	.asciz	"setitimer: it_interval must be zero or eq it_value"

	.comm	_timer_thread,8,3               ; @timer_thread
	.comm	_timer_interval,4,2             ; @timer_interval
	.comm	_one_shot,8,3                   ; @one_shot
.subsections_via_symbols
