	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_sge_ctxt_rd_bd              ## -- Begin function t4_sge_ctxt_rd_bd
	.p2align	4, 0x90
_t4_sge_ctxt_rd_bd:                     ## @t4_sge_ctxt_rd_bd
	.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	%rcx, %r12
	movl	%edx, %r13d
	movq	%rdi, %r14
	movq	_SGE_CTXT_CMD_A@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%esi, %edi
	callq	_CTXTQID_V
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_CTXTTYPE_V
	orl	%eax, %ebx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_t4_write_reg
	movq	_SGE_CTXT_CMD_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BUSY_F@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	movl	$3, %r8d
	movl	$1, %r9d
	callq	_t4_wait_op_done
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_1
LBB0_4:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_SGE_CTXT_DATA0_A@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_SGE_CTXT_DATA5_A@GOTPCREL(%rip), %r13
	cmpl	(%r13), %ebx
	jg	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_t4_read_reg
	movl	%eax, (%r12)
	addq	$4, %r12
	addl	$4, %ebx
	cmpl	(%r13), %ebx
	jle	LBB0_2
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_SGE_CTXT_CMD_A,4,2             ## @SGE_CTXT_CMD_A
	.comm	_BUSY_F,4,2                     ## @BUSY_F
	.comm	_SGE_CTXT_DATA0_A,4,2           ## @SGE_CTXT_DATA0_A
	.comm	_SGE_CTXT_DATA5_A,4,2           ## @SGE_CTXT_DATA5_A
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_sge_ctxt_rd_bd              ; -- Begin function t4_sge_ctxt_rd_bd
	.p2align	2
_t4_sge_ctxt_rd_bd:                     ; @t4_sge_ctxt_rd_bd
	.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, x3
	mov	x21, x2
	mov	x20, x0
Lloh0:
	adrp	x24, _SGE_CTXT_CMD_A@GOTPAGE
Lloh1:
	ldr	x24, [x24, _SGE_CTXT_CMD_A@GOTPAGEOFF]
	ldr	w22, [x24]
	mov	x0, x1
	bl	_CTXTQID_V
	mov	x23, x0
	mov	x0, x21
	bl	_CTXTTYPE_V
	orr	w2, w0, w23
	mov	x0, x20
	mov	x1, x22
	bl	_t4_write_reg
	ldr	w1, [x24]
Lloh2:
	adrp	x8, _BUSY_F@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BUSY_F@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w3, #0
	mov	w4, #3
	mov	w5, #1
	bl	_t4_wait_op_done
	mov	x21, x0
	cbz	w0, LBB0_2
LBB0_1:
	mov	x0, x21
	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_2:
Lloh5:
	adrp	x8, _SGE_CTXT_DATA0_A@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SGE_CTXT_DATA0_A@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
Lloh8:
	adrp	x23, _SGE_CTXT_DATA5_A@GOTPAGE
Lloh9:
	ldr	x23, [x23, _SGE_CTXT_DATA5_A@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	cmp	w22, w8
	b.gt	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_t4_read_reg
	str	w0, [x19], #4
	add	w22, w22, #4
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SGE_CTXT_CMD_A,4,2             ; @SGE_CTXT_CMD_A
	.comm	_BUSY_F,4,2                     ; @BUSY_F
	.comm	_SGE_CTXT_DATA0_A,4,2           ; @SGE_CTXT_DATA0_A
	.comm	_SGE_CTXT_DATA5_A,4,2           ; @SGE_CTXT_DATA5_A
.subsections_via_symbols
