	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CM_TransposeGrid
_CM_TransposeGrid:                      ## @CM_TransposeGrid
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movl	(%rdi), %eax
	movl	4(%rdi), %ecx
	cmpl	%ecx, %eax
	jle	LBB0_1
## %bb.3:
	testl	%ecx, %ecx
	jle	LBB0_21
## %bb.4:
	movl	$1, %r14d
	xorl	%r15d, %r15d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	movslq	%ecx, %rdx
	incq	%r14
	cmpq	%rdx, %r15
	jge	LBB0_21
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	%r15, %r12
	incq	%r15
	movslq	%eax, %rdx
	cmpq	%rdx, %r15
	jge	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movslq	%ecx, %rcx
	movq	16(%r13), %rax
	cmpq	%rcx, %r14
	jl	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rbx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rax,%rbx,8), %rcx
	movl	(%rcx,%r12,4), %edi
	movq	(%rax,%r12,8), %rax
	movl	(%rax,%rbx,4), %esi
	callq	_VectorCopy
	incq	%rbx
	movl	(%r13), %eax
	movl	4(%r13), %ecx
	cmpl	%ebx, %eax
	jle	LBB0_5
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movslq	%ecx, %rcx
	movq	16(%r13), %rax
	cmpq	%rcx, %rbx
	jge	LBB0_9
	jmp	LBB0_12
LBB0_1:
	testl	%eax, %eax
	jle	LBB0_21
## %bb.2:
	movl	$1, %r14d
	xorl	%r15d, %r15d
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_14 Depth=1
	movslq	%eax, %rdx
	incq	%r14
	cmpq	%rdx, %r15
	jge	LBB0_21
LBB0_14:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
	movq	%r15, %r12
	incq	%r15
	movslq	%ecx, %rdx
	cmpq	%rdx, %r15
	jge	LBB0_13
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movslq	%eax, %rcx
	movq	16(%r13), %rax
	cmpq	%rcx, %r14
	jl	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r14, %rbx
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_14 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rax,%r12,8), %rcx
	movl	(%rcx,%rbx,4), %edi
	movq	(%rax,%rbx,8), %rax
	movl	(%rax,%r12,4), %esi
	callq	_VectorCopy
	incq	%rbx
	movl	(%r13), %eax
	movl	4(%r13), %ecx
	cmpl	%ebx, %ecx
	jle	LBB0_13
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=2
	movslq	%eax, %rcx
	movq	16(%r13), %rax
	cmpq	%rcx, %rbx
	jge	LBB0_17
	jmp	LBB0_20
LBB0_21:
	movl	%ecx, (%r13)
	movl	%eax, 4(%r13)
	rolq	$32, 8(%r13)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	%r14, %rbx
LBB0_20:
	movq	(%rax,%rbx,8), %rax
	movl	(%rax,%r12,4), %edi
	callq	_VectorCopy
	movq	16(%r13), %rax
	movq	(%rax,%r12,8), %rcx
	movl	(%rcx,%rbx,4), %edi
	movq	(%rax,%rbx,8), %rax
	movl	(%rax,%r12,4), %esi
	callq	_VectorCopy
	ud2
LBB0_11:
	movq	%r14, %rbx
LBB0_12:
	movq	(%rax,%r12,8), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_VectorCopy
	movq	16(%r13), %rax
	movq	(%rax,%rbx,8), %rcx
	movl	(%rcx,%r12,4), %edi
	movq	(%rax,%r12,8), %rax
	movl	(%rax,%rbx,4), %esi
	callq	_VectorCopy
	ud2
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_CM_TransposeGrid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CM_TransposeGrid
_CM_TransposeGrid:                      ; @CM_TransposeGrid
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldp	w8, w9, [x0]
	cmp	w8, w9
	b.le	LBB0_9
; %bb.1:
	cmp	w9, #1
	b.lt	LBB0_17
; %bb.2:
	mov	x21, #0
	mov	w20, #1
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	cmp	x22, w9, sxtw
	mov	x21, x22
	b.ge	LBB0_17
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	add	x22, x21, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #16]
	cmp	x20, w9, sxtw
	b.lt	LBB0_20
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, x20
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x8, x23, lsl #3]
	ldr	w0, [x9, x21, lsl #2]
	ldr	x8, [x8, x21, lsl #3]
	ldr	w1, [x8, x23, lsl #2]
	bl	_VectorCopy
	add	x23, x23, #1
	ldp	w8, w9, [x19]
	cmp	w8, w23
	b.le	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	sxtw	x9, w9
	ldr	x8, [x19, #16]
	cmp	x23, x9
	b.ge	LBB0_7
	b	LBB0_21
LBB0_9:
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.10:
	mov	x21, #0
	mov	w20, #1
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x20, x20, #1
	cmp	x22, w8, sxtw
	mov	x21, x22
	b.ge	LBB0_17
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	add	x22, x21, #1
	cmp	x22, w9, sxtw
	b.ge	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x9, [x19, #16]
	cmp	x20, w8, sxtw
	b.lt	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x23, x20
LBB0_15:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x9, x21, lsl #3]
	ldr	w0, [x8, x23, lsl #2]
	ldr	x8, [x9, x23, lsl #3]
	ldr	w1, [x8, x21, lsl #2]
	bl	_VectorCopy
	add	x23, x23, #1
	ldp	w8, w9, [x19]
	cmp	w9, w23
	b.le	LBB0_11
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	sxtw	x8, w8
	ldr	x9, [x19, #16]
	cmp	x23, x8
	b.ge	LBB0_15
	b	LBB0_19
LBB0_17:
	stp	w9, w8, [x19]
	ldr	d0, [x19, #8]
	rev64.2s	v0, v0
	str	d0, [x19, #8]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_18:
	mov	x23, x20
LBB0_19:
	lsl	x20, x23, #3
	ldr	x8, [x9, x20]
	lsl	x22, x21, #2
	ldr	w0, [x8, x22]
	bl	_VectorCopy
	ldr	x8, [x19, #16]
	ldr	x9, [x8, x21, lsl #3]
	ldr	w0, [x9, x23, lsl #2]
	b	LBB0_22
LBB0_20:
	mov	x23, x20
LBB0_21:
	lsl	x20, x21, #3
	ldr	x8, [x8, x20]
	lsl	x22, x23, #2
	ldr	w0, [x8, x22]
	bl	_VectorCopy
	ldr	x8, [x19, #16]
	ldr	x9, [x8, x23, lsl #3]
	ldr	w0, [x9, x21, lsl #2]
LBB0_22:
	ldr	x8, [x8, x20]
	ldr	w1, [x8, x22]
	bl	_VectorCopy
	brk	#0x1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_CM_TransposeGrid
.subsections_via_symbols
