	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bsd_check
_bsd_check:                             ## @bsd_check
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %eax
	xorl	%r8d, %r8d
	cmpl	4(%rdi), %eax
	jl	LBB0_11
## %bb.1:
	movq	_RATIO_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	8(%rdi), %esi
	cmpl	%ecx, %eax
	jge	LBB0_3
## %bb.2:
	cmpl	%ecx, %esi
	jl	LBB0_4
LBB0_3:
	movl	%eax, %ecx
	sarl	$2, %ecx
	subl	%ecx, %eax
	movl	%eax, (%rdi)
	movl	%esi, %ecx
	sarl	$2, %ecx
	subl	%ecx, %esi
	movl	%esi, 8(%rdi)
LBB0_4:
	movq	_CHECK_GAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	movl	%ecx, 4(%rdi)
	movq	16(%rdi), %rcx
	cmpq	24(%rdi), %rcx
	jl	LBB0_11
## %bb.5:
	movq	_RATIO_SCALE_LOG@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	testl	%esi, %esi
	je	LBB0_7
## %bb.6:
	xorl	%edx, %edx
	divl	%esi
LBB0_7:
	cmpl	32(%rdi), %eax
	jb	LBB0_9
## %bb.8:
	movq	_RATIO_SCALE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jb	LBB0_9
## %bb.10:
	movl	%eax, 32(%rdi)
	jmp	LBB0_11
LBB0_9:
	callq	_bsd_clear
	movl	$1, %r8d
LBB0_11:
	movl	%r8d, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RATIO_MAX,4,2                  ## @RATIO_MAX
	.comm	_CHECK_GAP,4,2                  ## @CHECK_GAP
	.comm	_RATIO_SCALE_LOG,4,2            ## @RATIO_SCALE_LOG
	.comm	_RATIO_SCALE,4,2                ## @RATIO_SCALE
	.no_dead_strip	_bsd_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bsd_check
_bsd_check:                             ; @bsd_check
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldp	w8, w9, [x0]
	cmp	w8, w9
	b.lt	LBB0_4
; %bb.1:
Lloh0:
	adrp	x9, _RATIO_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RATIO_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x9]
	ldr	w9, [x0, #8]
	cmp	w8, w10
	ccmp	w9, w10, #0, lt
	b.lt	LBB0_3
; %bb.2:
	sub	w8, w8, w8, asr #2
	str	w8, [x0]
	sub	w9, w9, w9, asr #2
	str	w9, [x0, #8]
LBB0_3:
Lloh3:
	adrp	x10, _CHECK_GAP@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CHECK_GAP@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	add	w10, w10, w8
	str	w10, [x0, #4]
	ldp	x10, x11, [x0, #16]
	cmp	x10, x11
	b.ge	LBB0_6
LBB0_4:
	mov	w8, #0
LBB0_5:
	mov	x0, x8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh6:
	adrp	x10, _RATIO_SCALE_LOG@GOTPAGE
Lloh7:
	ldr	x10, [x10, _RATIO_SCALE_LOG@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	lsl	w10, w8, w10
	cbz	w9, LBB0_8
; %bb.7:
	udiv	w10, w10, w9
LBB0_8:
	ldr	w8, [x0, #32]
Lloh9:
	adrp	x9, _RATIO_SCALE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RATIO_SCALE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w10, w8
	ccmp	w10, w9, #0, hs
	b.hs	LBB0_10
; %bb.9:
	bl	_bsd_clear
	mov	w8, #1
	b	LBB0_5
LBB0_10:
	mov	w8, #0
	str	w10, [x0, #32]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_RATIO_MAX,4,2                  ; @RATIO_MAX
	.comm	_CHECK_GAP,4,2                  ; @CHECK_GAP
	.comm	_RATIO_SCALE_LOG,4,2            ; @RATIO_SCALE_LOG
	.comm	_RATIO_SCALE,4,2                ; @RATIO_SCALE
	.no_dead_strip	_bsd_check
.subsections_via_symbols
