	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mc417_memory_write
_mc417_memory_write:                    ## @mc417_memory_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
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_MCI_MEMORY_DATA_BYTE0@GOTPCREL(%rip), %rax
	movl	%edx, %ecx
	shll	$8, %ecx
	movzwl	%cx, %ebx
	orl	(%rax), %ebx
	shll	$10, %ebx
	movl	%ebx, %edx
	orl	$133120, %edx                   ## imm = 0x20800
	movq	_ITVC_WRITE_DIR@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_set_itvc_reg
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	orl	$138240, %ebx                   ## imm = 0x21C00
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_set_itvc_reg
	movq	_MCI_MEMORY_DATA_BYTE1@GOTPCREL(%rip), %rax
	movl	%r12d, %ebx
	andl	$65280, %ebx                    ## imm = 0xFF00
	orl	(%rax), %ebx
	shll	$10, %ebx
	movl	%ebx, %edx
	orl	$133120, %edx                   ## imm = 0x20800
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_set_itvc_reg
	orl	$138240, %ebx                   ## imm = 0x21C00
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_set_itvc_reg
	movq	_MCI_MEMORY_DATA_BYTE2@GOTPCREL(%rip), %rax
	movl	%r12d, %ebx
	shrl	$8, %ebx
	andl	$65280, %ebx                    ## imm = 0xFF00
	orl	(%rax), %ebx
	shll	$10, %ebx
	movl	%ebx, %edx
	orl	$133120, %edx                   ## imm = 0x20800
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_set_itvc_reg
	orl	$138240, %ebx                   ## imm = 0x21C00
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_set_itvc_reg
	movq	_MCI_MEMORY_DATA_BYTE3@GOTPCREL(%rip), %rax
	shrl	$16, %r12d
	andl	$65280, %r12d                   ## imm = 0xFF00
	orl	(%rax), %r12d
	shll	$10, %r12d
	movl	%r12d, %edx
	orl	$133120, %edx                   ## imm = 0x20800
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_set_itvc_reg
	orl	$138240, %r12d                  ## imm = 0x21C00
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_set_itvc_reg
	movq	_MCI_MEMORY_ADDRESS_BYTE2@GOTPCREL(%rip), %rax
	movq	_MCI_MODE_MEMORY_WRITE@GOTPCREL(%rip), %rcx
	movl	%r14d, %ebx
	shrl	$8, %ebx
	andl	$16128, %ebx                    ## imm = 0x3F00
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	shll	$10, %ebx
	movl	%ebx, %edx
	orl	$133120, %edx                   ## imm = 0x20800
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_set_itvc_reg
	orl	$138240, %ebx                   ## imm = 0x21C00
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_set_itvc_reg
	movq	_MCI_MEMORY_ADDRESS_BYTE1@GOTPCREL(%rip), %rax
	movl	%r14d, %ebx
	andl	$65280, %ebx                    ## imm = 0xFF00
	orl	(%rax), %ebx
	shll	$10, %ebx
	movl	%ebx, %edx
	orl	$133120, %edx                   ## imm = 0x20800
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_set_itvc_reg
	orl	$138240, %ebx                   ## imm = 0x21C00
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_set_itvc_reg
	movq	_MCI_MEMORY_ADDRESS_BYTE0@GOTPCREL(%rip), %rax
	shll	$8, %r14d
	movzwl	%r14w, %ebx
	orl	(%rax), %ebx
	shll	$10, %ebx
	movl	%ebx, %edx
	orl	$133120, %edx                   ## imm = 0x20800
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_set_itvc_reg
	orl	$138240, %ebx                   ## imm = 0x21C00
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_set_itvc_reg
	movq	%r15, %rdi
	callq	_wait_for_mci_complete
	xorl	%eax, %eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MCI_MEMORY_DATA_BYTE0,4,2      ## @MCI_MEMORY_DATA_BYTE0
	.comm	_ITVC_WRITE_DIR,4,2             ## @ITVC_WRITE_DIR
	.comm	_MCI_MEMORY_DATA_BYTE1,4,2      ## @MCI_MEMORY_DATA_BYTE1
	.comm	_MCI_MEMORY_DATA_BYTE2,4,2      ## @MCI_MEMORY_DATA_BYTE2
	.comm	_MCI_MEMORY_DATA_BYTE3,4,2      ## @MCI_MEMORY_DATA_BYTE3
	.comm	_MCI_MEMORY_ADDRESS_BYTE2,4,2   ## @MCI_MEMORY_ADDRESS_BYTE2
	.comm	_MCI_MODE_MEMORY_WRITE,4,2      ## @MCI_MODE_MEMORY_WRITE
	.comm	_MCI_MEMORY_ADDRESS_BYTE1,4,2   ## @MCI_MEMORY_ADDRESS_BYTE1
	.comm	_MCI_MEMORY_ADDRESS_BYTE0,4,2   ## @MCI_MEMORY_ADDRESS_BYTE0
	.no_dead_strip	_mc417_memory_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mc417_memory_write
_mc417_memory_write:                    ; @mc417_memory_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	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	w23, #2048
	movk	w23, #2, lsl #16
Lloh0:
	adrp	x8, _MCI_MEMORY_DATA_BYTE0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MCI_MEMORY_DATA_BYTE0@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ubfiz	w9, w2, #8, #8
	orr	w8, w8, w9
	lsl	w25, w8, #10
	orr	w2, w25, w23
Lloh3:
	adrp	x22, _ITVC_WRITE_DIR@GOTPAGE
Lloh4:
	ldr	x22, [x22, _ITVC_WRITE_DIR@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_set_itvc_reg
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	w24, #7168
	movk	w24, #2, lsl #16
	orr	w2, w25, w24
	ldr	w1, [x22]
	mov	x0, x19
	bl	_set_itvc_reg
Lloh5:
	adrp	x8, _MCI_MEMORY_DATA_BYTE1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MCI_MEMORY_DATA_BYTE1@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	and	w9, w21, #0xff00
	orr	w8, w8, w9
	lsl	w25, w8, #10
	orr	w2, w25, w23
	ldr	w1, [x22]
	mov	x0, x19
	bl	_set_itvc_reg
	orr	w2, w25, w24
	ldr	w1, [x22]
	mov	x0, x19
	bl	_set_itvc_reg
Lloh8:
	adrp	x8, _MCI_MEMORY_DATA_BYTE2@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MCI_MEMORY_DATA_BYTE2@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	lsr	w9, w21, #8
	and	w9, w9, #0xff00
	orr	w8, w8, w9
	lsl	w25, w8, #10
	orr	w2, w25, w23
	ldr	w1, [x22]
	mov	x0, x19
	bl	_set_itvc_reg
	orr	w2, w25, w24
	ldr	w1, [x22]
	mov	x0, x19
	bl	_set_itvc_reg
Lloh11:
	adrp	x8, _MCI_MEMORY_DATA_BYTE3@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MCI_MEMORY_DATA_BYTE3@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	lsr	w9, w21, #16
	and	w9, w9, #0xff00
	orr	w8, w8, w9
	lsl	w21, w8, #10
	orr	w2, w21, w23
	ldr	w1, [x22]
	mov	x0, x19
	bl	_set_itvc_reg
	orr	w2, w21, w24
	ldr	w1, [x22]
	mov	x0, x19
	bl	_set_itvc_reg
Lloh14:
	adrp	x8, _MCI_MEMORY_ADDRESS_BYTE2@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MCI_MEMORY_ADDRESS_BYTE2@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _MCI_MODE_MEMORY_WRITE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MCI_MODE_MEMORY_WRITE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	lsr	w10, w20, #8
	and	w10, w10, #0x3f00
	orr	w8, w8, w10
	orr	w8, w8, w9
	lsl	w21, w8, #10
	orr	w2, w21, w23
	ldr	w1, [x22]
	mov	x0, x19
	bl	_set_itvc_reg
	orr	w2, w21, w24
	ldr	w1, [x22]
	mov	x0, x19
	bl	_set_itvc_reg
Lloh20:
	adrp	x8, _MCI_MEMORY_ADDRESS_BYTE1@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MCI_MEMORY_ADDRESS_BYTE1@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	and	w9, w20, #0xff00
	orr	w8, w8, w9
	lsl	w21, w8, #10
	orr	w2, w21, w23
	ldr	w1, [x22]
	mov	x0, x19
	bl	_set_itvc_reg
	orr	w2, w21, w24
	ldr	w1, [x22]
	mov	x0, x19
	bl	_set_itvc_reg
Lloh23:
	adrp	x8, _MCI_MEMORY_ADDRESS_BYTE0@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MCI_MEMORY_ADDRESS_BYTE0@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ubfiz	w9, w20, #8, #8
	orr	w8, w8, w9
	lsl	w20, w8, #10
	orr	w2, w20, w23
	ldr	w1, [x22]
	mov	x0, x19
	bl	_set_itvc_reg
	orr	w2, w20, w24
	ldr	w1, [x22]
	mov	x0, x19
	bl	_set_itvc_reg
	mov	x0, x19
	bl	_wait_for_mci_complete
	mov	w0, #0
LBB0_2:
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.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
	.cfi_endproc
                                        ; -- End function
	.comm	_MCI_MEMORY_DATA_BYTE0,4,2      ; @MCI_MEMORY_DATA_BYTE0
	.comm	_ITVC_WRITE_DIR,4,2             ; @ITVC_WRITE_DIR
	.comm	_MCI_MEMORY_DATA_BYTE1,4,2      ; @MCI_MEMORY_DATA_BYTE1
	.comm	_MCI_MEMORY_DATA_BYTE2,4,2      ; @MCI_MEMORY_DATA_BYTE2
	.comm	_MCI_MEMORY_DATA_BYTE3,4,2      ; @MCI_MEMORY_DATA_BYTE3
	.comm	_MCI_MEMORY_ADDRESS_BYTE2,4,2   ; @MCI_MEMORY_ADDRESS_BYTE2
	.comm	_MCI_MODE_MEMORY_WRITE,4,2      ; @MCI_MODE_MEMORY_WRITE
	.comm	_MCI_MEMORY_ADDRESS_BYTE1,4,2   ; @MCI_MEMORY_ADDRESS_BYTE1
	.comm	_MCI_MEMORY_ADDRESS_BYTE0,4,2   ; @MCI_MEMORY_ADDRESS_BYTE0
	.no_dead_strip	_mc417_memory_write
.subsections_via_symbols
