	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function CM_SetGridWrapWidth
LCPI0_0:
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_CM_SetGridWrapWidth:                   ## @CM_SetGridWrapWidth
	.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
	testl	%eax, %eax
	jle	LBB0_1
## %bb.4:
	movq	8(%rdi), %rcx
	movq	(%rcx), %r9
	movslq	16(%rdi), %rdx
	movq	-8(%rcx,%rdx,8), %r10
	movq	_WRAP_POINT_EPSILON@GOTPCREL(%rip), %rcx
	movss	(%rcx), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movaps	LCPI0_0(%rip), %xmm1            ## xmm1 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	xorps	%xmm0, %xmm1
	xorl	%esi, %esi
	movq	_qtrue@GOTPCREL(%rip), %r8
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r9,%rsi,8), %rcx
	movq	(%r10,%rsi,8), %rdx
	movss	(%rcx), %xmm2                   ## xmm2 = mem[0],zero,zero,zero
	subss	(%rdx), %xmm2
	ucomiss	%xmm2, %xmm1
	ja	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	ucomiss	%xmm0, %xmm2
	ja	LBB0_2
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movss	4(%rcx), %xmm2                  ## xmm2 = mem[0],zero,zero,zero
	subss	4(%rdx), %xmm2
	ucomiss	%xmm2, %xmm1
	ja	LBB0_2
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	ucomiss	%xmm0, %xmm2
	ja	LBB0_2
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movss	8(%rcx), %xmm2                  ## xmm2 = mem[0],zero,zero,zero
	subss	8(%rdx), %xmm2
	ucomiss	%xmm2, %xmm1
	ja	LBB0_2
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	ucomiss	%xmm0, %xmm2
	ja	LBB0_2
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	incq	%rsi
	cmpq	%rsi, %rax
	jne	LBB0_5
	jmp	LBB0_13
LBB0_1:
	xorl	%esi, %esi
LBB0_2:
	cmpl	%eax, %esi
	jne	LBB0_3
## %bb.12:
	movq	_qtrue@GOTPCREL(%rip), %r8
	jmp	LBB0_13
LBB0_3:
	movq	_qfalse@GOTPCREL(%rip), %r8
LBB0_13:
	movl	(%r8), %eax
	movl	%eax, 20(%rdi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WRAP_POINT_EPSILON,4,2         ## @WRAP_POINT_EPSILON
	.comm	_qtrue,4,2                      ## @qtrue
	.comm	_qfalse,4,2                     ## @qfalse
	.no_dead_strip	_CM_SetGridWrapWidth
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CM_SetGridWrapWidth
_CM_SetGridWrapWidth:                   ; @CM_SetGridWrapWidth
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x9, #0
	ldr	x11, [x0, #8]
	ldr	x10, [x11]
	ldrsw	x12, [x0, #16]
	add	x11, x11, x12, lsl #3
	ldur	x12, [x11, #-8]
Lloh0:
	adrp	x11, _WRAP_POINT_EPSILON@GOTPAGE
Lloh1:
	ldr	x11, [x11, _WRAP_POINT_EPSILON@GOTPAGEOFF]
Lloh2:
	ldr	s0, [x11]
	fneg	s1, s0
Lloh3:
	adrp	x11, _qtrue@GOTPAGE
Lloh4:
	ldr	x11, [x11, _qtrue@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x14, x9, #3
	ldr	x13, [x10, x14]
	ldr	x14, [x12, x14]
	ldr	s2, [x13]
	ldr	s3, [x14]
	fsub	s2, s2, s3
	fcmp	s2, s1
	fccmp	s2, s0, #0, pl
	b.gt	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	s2, [x13, #4]
	ldr	s3, [x14, #4]
	fsub	s2, s2, s3
	fcmp	s2, s1
	fccmp	s2, s0, #0, pl
	b.gt	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	s2, [x13, #8]
	ldr	s3, [x14, #8]
	fsub	s2, s2, s3
	fcmp	s2, s1
	fccmp	s2, s0, #0, pl
	b.gt	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_2
	b	LBB0_8
LBB0_6:
	mov	w9, #0
LBB0_7:
Lloh5:
	adrp	x10, _qfalse@GOTPAGE
Lloh6:
	ldr	x10, [x10, _qfalse@GOTPAGEOFF]
Lloh7:
	adrp	x11, _qtrue@GOTPAGE
Lloh8:
	ldr	x11, [x11, _qtrue@GOTPAGEOFF]
	cmp	w9, w8
	csel	x11, x11, x10, eq
LBB0_8:
	ldr	w8, [x11]
	str	w8, [x0, #20]
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_WRAP_POINT_EPSILON,4,2         ; @WRAP_POINT_EPSILON
	.comm	_qtrue,4,2                      ; @qtrue
	.comm	_qfalse,4,2                     ; @qfalse
	.no_dead_strip	_CM_SetGridWrapWidth
.subsections_via_symbols
