	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function l4_calibrate
_l4_calibrate:                          ## @l4_calibrate
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	(%rdi), %r15
	movl	(%r15), %edi
	leaq	-48(%rbp), %rsi
	callq	_l4_getcal
	movq	%rax, %rcx
	movl	$-1, %eax
	testq	%rcx, %rcx
	jne	LBB0_10
## %bb.1:
	movl	-48(%rbp), %r9d
	movl	(%r14), %eax
	imull	%r9d, %eax
	cltq
	imulq	$1374389535, %rax, %rsi         ## imm = 0x51EB851F
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$38, %rsi
	addl	%eax, %esi
	cmpl	$255, %esi
	movl	$255, %edi
	cmovgel	%edi, %esi
	cmpl	$2, %esi
	movl	$1, %ecx
	cmovll	%ecx, %esi
	movl	(%rbx), %eax
	movl	$-1, %r8d
	movl	$-1, %edx
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	imull	%r9d, %eax
	cltd
	idivl	%esi
	cmpl	$252, %eax
	movl	$252, %edx
	cmovll	%eax, %edx
LBB0_3:
	movl	%edx, (%rbx)
	movl	%esi, -48(%rbp)
	movl	-44(%rbp), %edx
	movl	4(%r14), %eax
	imull	%edx, %eax
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rsi
	shrq	$63, %rsi
	sarq	$38, %rax
	addl	%esi, %eax
	cmpl	$255, %eax
	cmovll	%eax, %edi
	cmpl	$2, %edi
	cmovgel	%edi, %ecx
	movl	4(%rbx), %eax
	testl	%eax, %eax
	js	LBB0_5
## %bb.4:
	imull	%edx, %eax
	cltd
	idivl	%ecx
	cmpl	$252, %eax
	movl	$252, %r8d
	cmovll	%eax, %r8d
LBB0_5:
	movl	%r8d, 4(%rbx)
	movl	%ecx, -44(%rbp)
	movl	-40(%rbp), %r9d
	movl	8(%r14), %eax
	imull	%r9d, %eax
	cltq
	imulq	$1374389535, %rax, %rsi         ## imm = 0x51EB851F
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$38, %rsi
	addl	%eax, %esi
	cmpl	$255, %esi
	movl	$255, %edi
	cmovgel	%edi, %esi
	cmpl	$2, %esi
	movl	$1, %ecx
	cmovll	%ecx, %esi
	movl	8(%rbx), %eax
	movl	$-1, %r8d
	movl	$-1, %edx
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	imull	%r9d, %eax
	cltd
	idivl	%esi
	cmpl	$252, %eax
	movl	$252, %edx
	cmovll	%eax, %edx
LBB0_7:
	movl	%edx, 8(%rbx)
	movl	%esi, -40(%rbp)
	movl	-36(%rbp), %edx
	movl	12(%r14), %eax
	imull	%edx, %eax
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rsi
	shrq	$63, %rsi
	sarq	$38, %rax
	addl	%esi, %eax
	cmpl	$255, %eax
	cmovll	%eax, %edi
	cmpl	$2, %edi
	cmovgel	%edi, %ecx
	movl	12(%rbx), %eax
	testl	%eax, %eax
	js	LBB0_9
## %bb.8:
	imull	%edx, %eax
	cltd
	idivl	%ecx
	cmpl	$252, %eax
	movl	$252, %r8d
	cmovll	%eax, %r8d
LBB0_9:
	movl	%r8d, 12(%rbx)
	movl	%ecx, -36(%rbp)
	movl	(%r15), %edi
	leaq	-48(%rbp), %rsi
	callq	_l4_setcal
	movq	%rax, %rcx
	xorl	%eax, %eax
	negq	%rcx
	sbbl	%eax, %eax
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_12
## %bb.11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_l4_calibrate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function l4_calibrate
_l4_calibrate:                          ; @l4_calibrate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x2
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x21, [x0]
	ldr	w0, [x21]
	add	x1, sp, #8
	bl	_l4_getcal
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #-1
	b	LBB0_15
LBB0_2:
	ldr	w8, [x20]
	ldr	w11, [sp, #8]
	mul	w9, w11, w8
	mov	w8, #34079
	movk	w8, #20971, lsl #16
	smull	x9, w9, w8
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w10, w9, w10
	mov	w9, #255
	cmp	w10, #255
	csel	w10, w10, w9, lt
	cmp	w10, #1
	csinc	w10, w10, wzr, gt
	ldr	w12, [x19]
	tbnz	w12, #31, LBB0_4
; %bb.3:
	mul	w11, w12, w11
	sdiv	w11, w11, w10
	mov	w12, #252
	cmp	w11, #252
	csel	w11, w11, w12, lt
	b	LBB0_5
LBB0_4:
	mov	w11, #-1
LBB0_5:
	str	w11, [x19]
	str	w10, [sp, #8]
	ldr	w11, [x20, #4]
	ldr	w10, [sp, #12]
	mul	w11, w10, w11
	smull	x8, w11, w8
	lsr	x11, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w11
	cmp	w8, #255
	csel	w8, w8, w9, lt
	cmp	w8, #1
	csinc	w8, w8, wzr, gt
	ldr	w9, [x19, #4]
	tbnz	w9, #31, LBB0_7
; %bb.6:
	mul	w9, w9, w10
	sdiv	w9, w9, w8
	mov	w10, #252
	cmp	w9, #252
	csel	w9, w9, w10, lt
	b	LBB0_8
LBB0_7:
	mov	w9, #-1
LBB0_8:
	str	w9, [x19, #4]
	str	w8, [sp, #12]
	ldr	w8, [x20, #8]
	ldr	w11, [sp, #16]
	mul	w9, w11, w8
	mov	w8, #34079
	movk	w8, #20971, lsl #16
	smull	x9, w9, w8
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w10, w9, w10
	mov	w9, #255
	cmp	w10, #255
	csel	w10, w10, w9, lt
	cmp	w10, #1
	csinc	w10, w10, wzr, gt
	ldr	w12, [x19, #8]
	tbnz	w12, #31, LBB0_10
; %bb.9:
	mul	w11, w12, w11
	sdiv	w11, w11, w10
	mov	w12, #252
	cmp	w11, #252
	csel	w11, w11, w12, lt
	b	LBB0_11
LBB0_10:
	mov	w11, #-1
LBB0_11:
	str	w11, [x19, #8]
	str	w10, [sp, #16]
	ldr	w11, [x20, #12]
	ldr	w10, [sp, #20]
	mul	w11, w10, w11
	smull	x8, w11, w8
	lsr	x11, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w11
	cmp	w8, #255
	csel	w8, w8, w9, lt
	cmp	w8, #1
	csinc	w8, w8, wzr, gt
	ldr	w9, [x19, #12]
	tbnz	w9, #31, LBB0_13
; %bb.12:
	mul	w9, w9, w10
	sdiv	w9, w9, w8
	mov	w10, #252
	cmp	w9, #252
	csel	w9, w9, w10, lt
	b	LBB0_14
LBB0_13:
	mov	w9, #-1
LBB0_14:
	str	w9, [x19, #12]
	str	w8, [sp, #20]
	ldr	w0, [x21]
	add	x1, sp, #8
	bl	_l4_setcal
	cmp	x0, #0
	csetm	w0, ne
LBB0_15:
	ldr	x8, [sp, #24]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	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
	add	sp, sp, #80
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_l4_calibrate
.subsections_via_symbols
