	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function schedule_post
_schedule_post:                         ## @schedule_post
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movl	%edi, %ebx
	movq	_alarm_handler_installed@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jne	LBB0_4
## %bb.1:
	movq	_SIGALRM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_alarm_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_signal
	movq	_SIG_ERR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_8
LBB0_3:
	movl	$1, (%r14)
LBB0_4:
	movq	_alarm_id@GOTPCREL(%rip), %rax
	cmpl	$-1, (%rax)
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_fail_err
	jmp	LBB0_9
LBB0_6:
	movl	%ebx, (%rax)
	leaq	-32(%rbp), %r14
	movq	%r14, %rdi
	movl	$8, %esi
	callq	_bzero
	movslq	%r15d, %rax
	imulq	$274877907, %rax, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	movl	%ecx, -32(%rbp)
	imull	$1000, %ecx, %ecx               ## imm = 0x3E8
	subl	%ecx, %eax
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	movl	%eax, -28(%rbp)
	movq	_ITIMER_REAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_setitimer
	testq	%rax, %rax
	jns	LBB0_10
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
LBB0_8:
	callq	_fail_errno
LBB0_9:
	movl	$-1, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_alarm_handler_installed,4,2    ## @alarm_handler_installed
	.comm	_SIGALRM,4,2                    ## @SIGALRM
	.comm	_alarm_handler,4,2              ## @alarm_handler
	.comm	_SIG_ERR,8,3                    ## @SIG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"signal(SIGALRM)"

	.comm	_alarm_id,4,2                   ## @alarm_id
L_.str.1:                               ## @.str.1
	.asciz	"ksem_post() already scheduled"

	.comm	_ITIMER_REAL,4,2                ## @ITIMER_REAL
L_.str.2:                               ## @.str.2
	.asciz	"setitimer"

	.no_dead_strip	_schedule_post
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function schedule_post
_schedule_post:                         ; @schedule_post
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _alarm_handler_installed@GOTPAGE
Lloh1:
	ldr	x21, [x21, _alarm_handler_installed@GOTPAGEOFF]
	ldr	w8, [x21]
	cbnz	w8, LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _SIGALRM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SIGALRM@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _alarm_handler@GOTPAGE
Lloh6:
	ldr	x8, [x8, _alarm_handler@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_signal
Lloh8:
	adrp	x8, _SIG_ERR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SIG_ERR@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.2:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_3:
	mov	w8, #1
	str	w8, [x21]
LBB0_4:
Lloh13:
	adrp	x8, _alarm_id@GOTPAGE
Lloh14:
	ldr	x8, [x8, _alarm_id@GOTPAGEOFF]
	ldr	w9, [x8]
	cmn	w9, #1
	b.eq	LBB0_6
; %bb.5:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_fail_err
	b	LBB0_10
LBB0_6:
	str	w20, [x8]
	add	x0, sp, #8
	mov	w1, #8
	bl	_bzero
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w19, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	mov	w9, #1000
	msub	w10, w8, w9, w19
	mul	w9, w10, w9
	stp	w8, w9, [sp, #8]
Lloh17:
	adrp	x8, _ITIMER_REAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ITIMER_REAL@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	add	x1, sp, #8
	mov	x2, #0
	bl	_setitimer
	tbnz	x0, #63, LBB0_8
; %bb.7:
	mov	w0, #0
	b	LBB0_11
LBB0_8:
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_9:
	bl	_fail_errno
LBB0_10:
	mov	w0, #-1
LBB0_11:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_alarm_handler_installed,4,2    ; @alarm_handler_installed
	.comm	_SIGALRM,4,2                    ; @SIGALRM
	.comm	_alarm_handler,4,2              ; @alarm_handler
	.comm	_SIG_ERR,8,3                    ; @SIG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"signal(SIGALRM)"

	.comm	_alarm_id,4,2                   ; @alarm_id
l_.str.1:                               ; @.str.1
	.asciz	"ksem_post() already scheduled"

	.comm	_ITIMER_REAL,4,2                ; @ITIMER_REAL
l_.str.2:                               ; @.str.2
	.asciz	"setitimer"

	.no_dead_strip	_schedule_post
.subsections_via_symbols
