	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cudbg_get_ctxt_region_info
_cudbg_get_ctxt_region_info:            ## @cudbg_get_ctxt_region_info
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	-48(%rbp), %rsi
	callq	_cudbg_fill_meminfo
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_CTXT_EGRESS@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_CTXT_INGRESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jle	LBB0_2
LBB0_12:
	movq	_SGE_FLM_CFG_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_t4_read_reg
	movq	%rax, %rdi
	callq	_HDRSTARTFLQ_G
	movq	_CTXT_FLM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rcx,%rcx,2), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, (%rdi,%rdx,4)
	movq	_CUDBG_MAX_FL_QIDS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %ecx
	sarl	%cl, %esi
	movq	_SGE_CTXT_SIZE@GOTPCREL(%rip), %rax
	imull	(%rax), %esi
	movl	%esi, 4(%rdi,%rdx,4)
	movq	_CTXT_CNM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, (%rdi,%rax,4)
	movl	%esi, 4(%rdi,%rax,4)
	xorl	%eax, %eax
LBB0_13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	-64(%rbp), %r13
	leaq	-48(%rbp), %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r14,%r14,2), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	$0, (%rcx,%rax,4)
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	leaq	1(%r14), %rax
	movq	_CTXT_INGRESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r14
	movq	%rax, %r14
	jge	LBB0_12
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	-48(%rbp), %edi
	callq	_ARRAY_SIZE
	testq	%rax, %rax
	jle	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_cudbg_region@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r14,4), %ecx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%r13, %r8
	callq	_cudbg_get_mem_region
	testl	%eax, %eax
	je	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=2
	incq	%r15
	movl	-48(%rbp), %edi
	callq	_ARRAY_SIZE
	cmpq	%rax, %r15
	jl	LBB0_5
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	leaq	-60(%rbp), %rcx
	movq	%r13, %r8
	callq	_cudbg_get_mem_relative
	leaq	(%r14,%r14,2), %rcx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	leaq	(%rsi,%rcx,4), %rdx
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$0, (%rdx)
	jmp	LBB0_11
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, (%rdx)
	movl	-60(%rbp), %eax
	movl	%eax, 8(%rsi,%rcx,4)
	movl	-64(%rbp), %eax
	movl	%eax, 4(%rsi,%rcx,4)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax,%r14,4)
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_CTXT_EGRESS,8,3                ## @CTXT_EGRESS
	.comm	_CTXT_INGRESS,8,3               ## @CTXT_INGRESS
	.comm	_cudbg_region,8,3               ## @cudbg_region
	.comm	_SGE_FLM_CFG_A,4,2              ## @SGE_FLM_CFG_A
	.comm	_CTXT_FLM,8,3                   ## @CTXT_FLM
	.comm	_CUDBG_MAX_FL_QIDS,4,2          ## @CUDBG_MAX_FL_QIDS
	.comm	_SGE_CTXT_SIZE,4,2              ## @SGE_CTXT_SIZE
	.comm	_CTXT_CNM,8,3                   ## @CTXT_CNM
	.no_dead_strip	_cudbg_get_ctxt_region_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cudbg_get_ctxt_region_info
_cudbg_get_ctxt_region_info:            ; @cudbg_get_ctxt_region_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	mov	x1, sp
	bl	_cudbg_fill_meminfo
	cbnz	w0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _CTXT_EGRESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CTXT_EGRESS@GOTPAGEOFF]
Lloh2:
	ldr	x25, [x8]
Lloh3:
	adrp	x24, _CTXT_INGRESS@GOTPAGE
Lloh4:
	ldr	x24, [x24, _CTXT_INGRESS@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x25, x8
	b.le	LBB0_4
LBB0_2:
Lloh5:
	adrp	x8, _SGE_FLM_CFG_A@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SGE_FLM_CFG_A@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_t4_read_reg
	bl	_HDRSTARTFLQ_G
	mov	x8, x0
	mov	w0, #0
Lloh8:
	adrp	x9, _CTXT_FLM@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CTXT_FLM@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	mov	w10, #12
	madd	x9, x9, x10, x19
	mov	w11, #1
	str	w11, [x9]
Lloh11:
	adrp	x12, _CUDBG_MAX_FL_QIDS@GOTPAGE
Lloh12:
	ldr	x12, [x12, _CUDBG_MAX_FL_QIDS@GOTPAGEOFF]
Lloh13:
	ldr	w12, [x12]
	asr	w8, w12, w8
Lloh14:
	adrp	x12, _SGE_CTXT_SIZE@GOTPAGE
Lloh15:
	ldr	x12, [x12, _SGE_CTXT_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	w12, [x12]
	mul	w8, w8, w12
	str	w8, [x9, #4]
Lloh17:
	adrp	x9, _CTXT_CNM@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CTXT_CNM@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	madd	x9, x9, x10, x19
	stp	w11, w8, [x9]
LBB0_3:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_4:
	add	x8, sp, #8
	orr	x22, x8, #0x4
Lloh20:
	adrp	x26, _cudbg_region@GOTPAGE
Lloh21:
	ldr	x26, [x26, _cudbg_region@GOTPAGEOFF]
	mov	w27, #12
	mov	w28, #1
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	mul	x8, x25, x27
	str	wzr, [x19, x8]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x8, x25, #1
	ldr	x9, [x24]
	cmp	x25, x9
	mov	x25, x8
	b.ge	LBB0_2
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	w0, [sp]
	bl	_ARRAY_SIZE
	cmp	x0, #1
	b.lt	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x23, #0
LBB0_9:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x26]
	ldr	w3, [x8, x25, lsl #2]
	mov	x1, sp
	add	x4, sp, #8
	mov	x0, x20
	mov	x2, x23
	bl	_cudbg_get_mem_region
	cbz	w0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	add	x23, x23, #1
	ldr	w0, [sp]
	bl	_ARRAY_SIZE
	cmp	x23, x0
	b.lt	LBB0_9
	b	LBB0_5
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x1, sp
	add	x4, sp, #8
	mov	x0, x20
	mov	x2, x23
	mov	x3, x22
	bl	_cudbg_get_mem_relative
	madd	x8, x25, x27, x19
	cbz	w0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	str	wzr, [x8]
	b	LBB0_6
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	str	w28, [x8]
	ldr	d0, [sp, #8]
	madd	x8, x25, x27, x19
	stur	d0, [x8, #4]
	str	w23, [x21, x25, lsl #2]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_CTXT_EGRESS,8,3                ; @CTXT_EGRESS
	.comm	_CTXT_INGRESS,8,3               ; @CTXT_INGRESS
	.comm	_cudbg_region,8,3               ; @cudbg_region
	.comm	_SGE_FLM_CFG_A,4,2              ; @SGE_FLM_CFG_A
	.comm	_CTXT_FLM,8,3                   ; @CTXT_FLM
	.comm	_CUDBG_MAX_FL_QIDS,4,2          ; @CUDBG_MAX_FL_QIDS
	.comm	_SGE_CTXT_SIZE,4,2              ; @SGE_CTXT_SIZE
	.comm	_CTXT_CNM,8,3                   ; @CTXT_CNM
	.no_dead_strip	_cudbg_get_ctxt_region_info
.subsections_via_symbols
