	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_cim_write                   ## -- Begin function t4_cim_write
	.p2align	4, 0x90
_t4_cim_write:                          ## @t4_cim_write
	.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, %r14
	movl	%edx, %ebx
	movl	%esi, %r13d
	movq	%rdi, %r12
	movq	_CIM_HOST_ACC_CTRL_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_t4_read_reg
	movq	_HOSTBUSY_F@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_1
## %bb.3:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.4:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	decl	%ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_CIM_HOST_ACC_DATA_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r14,4), %edx
	movq	%r12, %rdi
	callq	_t4_write_reg
	movq	_CIM_HOST_ACC_CTRL_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HOSTWRITE_F@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	%r13d, %edx
	movq	%r12, %rdi
	callq	_t4_write_reg
	movq	_CIM_HOST_ACC_CTRL_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	movl	$5, %r8d
	movl	$2, %r9d
	callq	_t4_wait_op_done
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	addl	$4, %r13d
	leaq	1(%r14), %rcx
	cmpl	%r14d, %ebx
	movq	%rcx, %r14
	jne	LBB0_5
	jmp	LBB0_7
LBB0_2:
	xorl	%eax, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_CIM_HOST_ACC_CTRL_A,4,2        ## @CIM_HOST_ACC_CTRL_A
	.comm	_HOSTBUSY_F,4,2                 ## @HOSTBUSY_F
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_CIM_HOST_ACC_DATA_A,4,2        ## @CIM_HOST_ACC_DATA_A
	.comm	_HOSTWRITE_F,4,2                ## @HOSTWRITE_F
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_cim_write                   ; -- Begin function t4_cim_write
	.p2align	2
_t4_cim_write:                          ; @t4_cim_write
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x23, _CIM_HOST_ACC_CTRL_A@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CIM_HOST_ACC_CTRL_A@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_t4_read_reg
Lloh2:
	adrp	x24, _HOSTBUSY_F@GOTPAGE
Lloh3:
	ldr	x24, [x24, _HOSTBUSY_F@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
	cbz	w22, LBB0_5
; %bb.3:
	sub	w22, w22, #1
Lloh7:
	adrp	x25, _CIM_HOST_ACC_DATA_A@GOTPAGE
Lloh8:
	ldr	x25, [x25, _CIM_HOST_ACC_DATA_A@GOTPAGEOFF]
Lloh9:
	adrp	x26, _HOSTWRITE_F@GOTPAGE
Lloh10:
	ldr	x26, [x26, _HOSTWRITE_F@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	ldr	w2, [x19], #4
	mov	x0, x21
	bl	_t4_write_reg
	ldr	w1, [x23]
	ldr	w8, [x26]
	orr	w2, w8, w20
	mov	x0, x21
	bl	_t4_write_reg
	ldr	w1, [x23]
	ldr	w2, [x24]
	mov	x0, x21
	mov	w3, #0
	mov	w4, #5
	mov	w5, #2
	bl	_t4_wait_op_done
	add	w20, w20, #4
	cmp	w0, #0
	ccmp	w22, #0, #4, eq
	sub	w22, w22, #1
	b.ne	LBB0_4
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CIM_HOST_ACC_CTRL_A,4,2        ; @CIM_HOST_ACC_CTRL_A
	.comm	_HOSTBUSY_F,4,2                 ; @HOSTBUSY_F
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_CIM_HOST_ACC_DATA_A,4,2        ; @CIM_HOST_ACC_DATA_A
	.comm	_HOSTWRITE_F,4,2                ; @HOSTWRITE_F
.subsections_via_symbols
