	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_read_cim_obq                ## -- Begin function t4_read_cim_obq
	.p2align	4, 0x90
_t4_read_cim_obq:                       ## @t4_read_cim_obq
	.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
	movq	%rcx, %r14
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %r13
	movl	(%rdi), %edi
	callq	_is_t4
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	_CIM_NUM_OBQ_T5@GOTPCREL(%rip), %rax
	testb	$3, %r14b
	je	LBB0_4
	jmp	LBB0_5
LBB0_1:
	movq	_CIM_NUM_OBQ@GOTPCREL(%rip), %rax
	testb	$3, %r14b
	jne	LBB0_5
LBB0_4:
	movl	(%rax), %eax
	decl	%eax
	cmpl	%r12d, %eax
	jb	LBB0_5
## %bb.6:
	movq	_CIM_QUEUE_CONFIG_REF_A@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_OBQSELECT_F@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r12d, %edi
	callq	_QUENUMSELECT_V
	orl	%eax, %ebx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_t4_write_reg
	movq	_CIM_QUEUE_CONFIG_CTRL_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_t4_read_reg
	movq	%rax, %rbx
	movl	%ebx, %edi
	callq	_CIMQBASE_G
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_CIMQSIZE_G
                                        ## kill: def $eax killed $eax def $rax
	shll	$6, %eax
	cmpq	%r14, %rax
	cmovbq	%rax, %r14
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	testq	%r14, %r14
	je	LBB0_7
## %bb.8:
	shll	$6, %r12d
	xorl	%r15d, %r15d
	movq	_CIM_OBQ_DBG_CFG_A@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r12,%r15), %edi
	movl	(%r14), %ebx
	callq	_OBQDBGADDR_V
	movq	_OBQDBGEN_F@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_t4_write_reg
	movl	(%r14), %esi
	movq	_OBQDBGBUSY_F@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	movl	$2, %r8d
	movl	$1, %r9d
	callq	_t4_wait_op_done
	testl	%eax, %eax
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_CIM_OBQ_DBG_DATA_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_t4_read_reg
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r15,4)
	incq	%r15
	cmpq	%r15, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_9
## %bb.12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %ebx
	jmp	LBB0_13
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_7:
	xorl	%ebx, %ebx
LBB0_13:
	movq	_CIM_OBQ_DBG_CFG_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_t4_write_reg
	jmp	LBB0_14
LBB0_10:
	movl	%eax, %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CIM_NUM_OBQ,4,2                ## @CIM_NUM_OBQ
	.comm	_CIM_NUM_OBQ_T5,4,2             ## @CIM_NUM_OBQ_T5
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CIM_QUEUE_CONFIG_REF_A,4,2     ## @CIM_QUEUE_CONFIG_REF_A
	.comm	_OBQSELECT_F,4,2                ## @OBQSELECT_F
	.comm	_CIM_QUEUE_CONFIG_CTRL_A,4,2    ## @CIM_QUEUE_CONFIG_CTRL_A
	.comm	_CIM_OBQ_DBG_CFG_A,4,2          ## @CIM_OBQ_DBG_CFG_A
	.comm	_OBQDBGEN_F,4,2                 ## @OBQDBGEN_F
	.comm	_OBQDBGBUSY_F,4,2               ## @OBQDBGBUSY_F
	.comm	_CIM_OBQ_DBG_DATA_A,4,2         ## @CIM_OBQ_DBG_DATA_A
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_read_cim_obq                ; -- Begin function t4_read_cim_obq
	.p2align	2
_t4_read_cim_obq:                       ; @t4_read_cim_obq
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_is_t4
Lloh0:
	adrp	x8, _CIM_NUM_OBQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CIM_NUM_OBQ@GOTPAGEOFF]
Lloh2:
	adrp	x9, _CIM_NUM_OBQ_T5@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CIM_NUM_OBQ_T5@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	tst	x21, #0x3
	b.ne	LBB0_7
; %bb.1:
	ldr	w8, [x8]
	sub	w8, w8, #1
	cmp	w8, w22
	b.lo	LBB0_7
; %bb.2:
Lloh4:
	adrp	x8, _CIM_QUEUE_CONFIG_REF_A@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CIM_QUEUE_CONFIG_REF_A@GOTPAGEOFF]
Lloh6:
	ldr	w23, [x8]
Lloh7:
	adrp	x8, _OBQSELECT_F@GOTPAGE
Lloh8:
	ldr	x8, [x8, _OBQSELECT_F@GOTPAGEOFF]
Lloh9:
	ldr	w24, [x8]
	mov	x0, x22
	bl	_QUENUMSELECT_V
	orr	w2, w0, w24
	mov	x0, x19
	mov	x1, x23
	bl	_t4_write_reg
Lloh10:
	adrp	x8, _CIM_QUEUE_CONFIG_CTRL_A@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CIM_QUEUE_CONFIG_CTRL_A@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_t4_read_reg
	mov	x23, x0
	bl	_CIMQBASE_G
	mov	x22, x0
	mov	x0, x23
	bl	_CIMQSIZE_G
	lsl	w8, w0, #6
	cmp	x8, x21
	csel	x24, x8, x21, lo
Lloh13:
	adrp	x23, _CIM_OBQ_DBG_CFG_A@GOTPAGE
Lloh14:
	ldr	x23, [x23, _CIM_OBQ_DBG_CFG_A@GOTPAGEOFF]
	cbz	x24, LBB0_8
; %bb.3:
Lloh15:
	adrp	x25, _OBQDBGEN_F@GOTPAGE
Lloh16:
	ldr	x25, [x25, _OBQDBGEN_F@GOTPAGEOFF]
	lsl	w21, w22, #6
Lloh17:
	adrp	x26, _OBQDBGBUSY_F@GOTPAGE
Lloh18:
	ldr	x26, [x26, _OBQDBGBUSY_F@GOTPAGEOFF]
	mov	x27, x24
Lloh19:
	adrp	x28, _CIM_OBQ_DBG_DATA_A@GOTPAGE
Lloh20:
	ldr	x28, [x28, _CIM_OBQ_DBG_DATA_A@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w22, [x23]
	mov	x0, x21
	bl	_OBQDBGADDR_V
	ldr	w8, [x25]
	orr	w2, w8, w0
	mov	x0, x19
	mov	x1, x22
	bl	_t4_write_reg
	ldr	w1, [x23]
	ldr	w2, [x26]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #2
	mov	w5, #1
	bl	_t4_wait_op_done
	cbnz	w0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x28]
	mov	x0, x19
	bl	_t4_read_reg
	str	w0, [x20], #4
	add	w21, w21, #1
	subs	x27, x27, #1
	b.ne	LBB0_4
; %bb.6:
	mov	x22, x24
	b	LBB0_9
LBB0_7:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_11
LBB0_8:
	mov	w22, #0
LBB0_9:
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #0
	bl	_t4_write_reg
	b	LBB0_11
LBB0_10:
	mov	x22, x0
LBB0_11:
	mov	x0, x22
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_CIM_NUM_OBQ,4,2                ; @CIM_NUM_OBQ
	.comm	_CIM_NUM_OBQ_T5,4,2             ; @CIM_NUM_OBQ_T5
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CIM_QUEUE_CONFIG_REF_A,4,2     ; @CIM_QUEUE_CONFIG_REF_A
	.comm	_OBQSELECT_F,4,2                ; @OBQSELECT_F
	.comm	_CIM_QUEUE_CONFIG_CTRL_A,4,2    ; @CIM_QUEUE_CONFIG_CTRL_A
	.comm	_CIM_OBQ_DBG_CFG_A,4,2          ; @CIM_OBQ_DBG_CFG_A
	.comm	_OBQDBGEN_F,4,2                 ; @OBQDBGEN_F
	.comm	_OBQDBGBUSY_F,4,2               ; @OBQDBGBUSY_F
	.comm	_CIM_OBQ_DBG_DATA_A,4,2         ; @CIM_OBQ_DBG_DATA_A
.subsections_via_symbols
