	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t3_sge_cqcntxt_op              ## -- Begin function t3_sge_cqcntxt_op
	.p2align	4, 0x90
_t3_sge_cqcntxt_op:                     ## @t3_sge_cqcntxt_op
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_A_SG_CONTEXT_CMD@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_t3_read_reg
	movq	_F_CONTEXT_CMD_BUSY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_2:
	movq	_A_SG_CONTEXT_DATA0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$16, %ebx
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_t3_write_reg
	movl	(%r13), %r13d
	movl	%r12d, %edi
	callq	_V_CONTEXT_CMD_OPCODE
	movl	%eax, %ebx
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movl	%r14d, %edi
	callq	_V_CONTEXT
	orl	%eax, %ebx
	movq	_F_CQ@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%ebx, %edx
	callq	_t3_write_reg
	movq	_A_SG_CONTEXT_CMD@GOTPCREL(%rip), %rax
	movq	%rax, %r13
	movl	(%rax), %esi
	movq	_F_CONTEXT_CMD_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SG_CONTEXT_CMD_ATTEMPTS@GOTPCREL(%rip), %r14
	movl	(%r14), %r8d
	leaq	-52(%rbp), %rax
	movq	%rax, (%rsp)
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	movl	$1, %r9d
	callq	_t3_wait_op_done_val
	testq	%rax, %rax
	je	LBB0_4
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_4:
	addl	$-2, %r12d
	cmpl	$4, %r12d
	ja	LBB0_10
## %bb.5:
	cmpq	$0, (%r15)
	jle	LBB0_7
## %bb.6:
	movl	-52(%rbp), %edi
LBB0_9:
	callq	_G_CQ_INDEX
	movl	%eax, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	(%r13), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_V_CONTEXT_CMD_OPCODE
	movl	%eax, %r12d
	movq	_F_CQ@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_V_CONTEXT
	orl	%eax, %r12d
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	callq	_t3_write_reg
	movl	(%r13), %esi
	movq	_F_CONTEXT_CMD_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r14), %r8d
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	movl	$1, %r9d
	callq	_t3_wait_op_done
	testq	%rax, %rax
	jne	LBB0_3
## %bb.8:
	movq	_A_SG_CONTEXT_DATA0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_t3_read_reg
	movl	%eax, %edi
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_A_SG_CONTEXT_CMD,4,2           ## @A_SG_CONTEXT_CMD
	.comm	_F_CONTEXT_CMD_BUSY,4,2         ## @F_CONTEXT_CMD_BUSY
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_A_SG_CONTEXT_DATA0,4,2         ## @A_SG_CONTEXT_DATA0
	.comm	_F_CQ,4,2                       ## @F_CQ
	.comm	_SG_CONTEXT_CMD_ATTEMPTS,4,2    ## @SG_CONTEXT_CMD_ATTEMPTS
	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t3_sge_cqcntxt_op              ; -- Begin function t3_sge_cqcntxt_op
	.p2align	2
_t3_sge_cqcntxt_op:                     ; @t3_sge_cqcntxt_op
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x25, _A_SG_CONTEXT_CMD@GOTPAGE
Lloh1:
	ldr	x25, [x25, _A_SG_CONTEXT_CMD@GOTPAGEOFF]
	ldr	w1, [x25]
	bl	_t3_read_reg
Lloh2:
	adrp	x26, _F_CONTEXT_CMD_BUSY@GOTPAGE
Lloh3:
	ldr	x26, [x26, _F_CONTEXT_CMD_BUSY@GOTPAGEOFF]
	ldr	w8, [x26]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh6:
	adrp	x24, _A_SG_CONTEXT_DATA0@GOTPAGE
Lloh7:
	ldr	x24, [x24, _A_SG_CONTEXT_DATA0@GOTPAGEOFF]
	ldr	w1, [x24]
	lsl	w2, w22, #16
	mov	x0, x19
	bl	_t3_write_reg
	ldr	w22, [x25]
	mov	x0, x21
	bl	_V_CONTEXT_CMD_OPCODE
	mov	x23, x0
	mov	x0, x20
	bl	_V_CONTEXT
	orr	w8, w0, w23
Lloh8:
	adrp	x23, _F_CQ@GOTPAGE
Lloh9:
	ldr	x23, [x23, _F_CQ@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w2, w8, w9
	mov	x0, x19
	mov	x1, x22
	bl	_t3_write_reg
	ldr	w1, [x25]
	ldr	w2, [x26]
Lloh10:
	adrp	x22, _SG_CONTEXT_CMD_ATTEMPTS@GOTPAGE
Lloh11:
	ldr	x22, [x22, _SG_CONTEXT_CMD_ATTEMPTS@GOTPAGEOFF]
	ldr	w4, [x22]
	add	x6, sp, #12
	mov	x0, x19
	mov	w3, #0
	mov	w5, #1
	bl	_t3_wait_op_done_val
	cbz	x0, LBB0_6
LBB0_3:
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_6:
	sub	w8, w21, #2
	cmp	w8, #4
	b.hi	LBB0_10
; %bb.7:
	ldr	x8, [x19]
	cmp	x8, #1
	b.lt	LBB0_11
; %bb.8:
	ldr	w0, [sp, #12]
LBB0_9:
	bl	_G_CQ_INDEX
	b	LBB0_5
LBB0_10:
	mov	w0, #0
	b	LBB0_5
LBB0_11:
	ldr	w21, [x25]
	mov	w0, #0
	bl	_V_CONTEXT_CMD_OPCODE
	ldr	w8, [x23]
	orr	w23, w8, w0
	mov	x0, x20
	bl	_V_CONTEXT
	orr	w2, w23, w0
	mov	x0, x19
	mov	x1, x21
	bl	_t3_write_reg
	ldr	w1, [x25]
	ldr	w2, [x26]
	ldr	w4, [x22]
	mov	x0, x19
	mov	w3, #0
	mov	w5, #1
	bl	_t3_wait_op_done
	cbnz	x0, LBB0_3
; %bb.12:
	ldr	w1, [x24]
	mov	x0, x19
	bl	_t3_read_reg
	b	LBB0_9
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_A_SG_CONTEXT_CMD,4,2           ; @A_SG_CONTEXT_CMD
	.comm	_F_CONTEXT_CMD_BUSY,4,2         ; @F_CONTEXT_CMD_BUSY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_A_SG_CONTEXT_DATA0,4,2         ; @A_SG_CONTEXT_DATA0
	.comm	_F_CQ,4,2                       ; @F_CQ
	.comm	_SG_CONTEXT_CMD_ATTEMPTS,4,2    ; @SG_CONTEXT_CMD_ATTEMPTS
	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
