	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ggenie_write_regs
_ggenie_write_regs:                     ## @ggenie_write_regs
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_ggenie@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movl	%edi, %edx
	movl	%esi, (%rax,%rdx,4)
	cmpl	$1, %edi
	je	LBB0_8
## %bb.1:
	testl	%edi, %edi
	jne	LBB0_9
## %bb.2:
	testl	$1024, %esi                     ## imm = 0x400
	jne	LBB0_3
## %bb.4:
	movl	24(%rcx), %edi
	movq	_m68k@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%edi, 24(%rdx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rdx)
	testl	$512, %esi                      ## imm = 0x200
	je	LBB0_6
## %bb.5:
	movq	_ggenie_read_byte@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	movq	%rdi, 16(%rdx)
	movq	_ggenie_read_word@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	movq	%rdi, 8(%rdx)
LBB0_6:
	testl	$256, %esi                      ## imm = 0x100
	jne	LBB0_10
LBB0_7:
	movq	_ggenie_write_byte@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rdx)
	movq	_ggenie_write_word@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	popq	%rbp
	retq
LBB0_8:
	orb	$1, 4(%rax)
LBB0_9:
	popq	%rbp
	retq
LBB0_3:
	movq	_cart@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	movq	_m68k@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%edi, 24(%rdx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rdx)
	testl	$256, %esi                      ## imm = 0x100
	je	LBB0_7
LBB0_10:
	movl	8(%rax), %edi
	andl	$63, %edi
	shll	$16, %edi
	orl	12(%rax), %edi
	movq	8(%rcx), %rsi
	movl	%edi, (%rsi)
	movl	20(%rax), %edi
	andl	$63, %edi
	shll	$16, %edi
	orl	24(%rax), %edi
	movl	%edi, 4(%rsi)
	movl	32(%rax), %edi
	andl	$63, %edi
	shll	$16, %edi
	orl	36(%rax), %edi
	movl	%edi, 8(%rsi)
	movl	44(%rax), %edi
	andl	$63, %edi
	shll	$16, %edi
	orl	48(%rax), %edi
	movl	%edi, 12(%rsi)
	movl	56(%rax), %edi
	andl	$63, %edi
	shll	$16, %edi
	orl	60(%rax), %edi
	movl	%edi, 16(%rsi)
	movl	68(%rax), %edi
	andl	$63, %edi
	shll	$16, %edi
	orl	72(%rax), %edi
	movl	%edi, 20(%rsi)
	movl	16(%rax), %esi
	movq	16(%rcx), %rcx
	movl	%esi, (%rcx)
	movl	28(%rax), %esi
	movl	%esi, 4(%rcx)
	movl	40(%rax), %esi
	movl	%esi, 8(%rcx)
	movl	52(%rax), %esi
	movl	%esi, 12(%rcx)
	movl	64(%rax), %esi
	movl	%esi, 16(%rcx)
	movl	76(%rax), %eax
	movl	%eax, 20(%rcx)
	movq	_m68k_unused_8_w@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rdx)
	movq	_m68k_unused_16_w@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	$1, %edi
	popq	%rbp
	jmp	_ggenie_switch                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ggenie,32,3                    ## @ggenie
	.comm	_cart,4,2                       ## @cart
	.comm	_m68k,8,3                       ## @m68k
	.comm	_ggenie_read_byte,8,3           ## @ggenie_read_byte
	.comm	_ggenie_read_word,8,3           ## @ggenie_read_word
	.comm	_m68k_unused_8_w,4,2            ## @m68k_unused_8_w
	.comm	_m68k_unused_16_w,4,2           ## @m68k_unused_16_w
	.comm	_ggenie_write_byte,4,2          ## @ggenie_write_byte
	.comm	_ggenie_write_word,4,2          ## @ggenie_write_word
	.no_dead_strip	_ggenie_write_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ggenie_write_regs
_ggenie_write_regs:                     ; @ggenie_write_regs
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x10, _ggenie@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ggenie@GOTPAGEOFF]
	ldr	x8, [x10]
	str	w1, [x8, w0, uxtw #2]
	cmp	w0, #1
	b.eq	LBB0_7
; %bb.1:
	cbnz	w0, LBB0_8
; %bb.2:
	tbnz	w1, #10, LBB0_9
; %bb.3:
	ldr	w11, [x10, #24]
Lloh2:
	adrp	x9, _m68k@GOTPAGE
Lloh3:
	ldr	x9, [x9, _m68k@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	str	w11, [x9, #24]
	stp	xzr, xzr, [x9, #8]
	tbz	w1, #9, LBB0_5
; %bb.4:
Lloh5:
	adrp	x11, _ggenie_read_byte@GOTPAGE
Lloh6:
	ldr	x11, [x11, _ggenie_read_byte@GOTPAGEOFF]
Lloh7:
	ldr	x11, [x11]
Lloh8:
	adrp	x12, _ggenie_read_word@GOTPAGE
Lloh9:
	ldr	x12, [x12, _ggenie_read_word@GOTPAGEOFF]
Lloh10:
	ldr	x12, [x12]
	stp	x12, x11, [x9, #8]
LBB0_5:
	tbnz	w1, #8, LBB0_10
LBB0_6:
Lloh11:
	adrp	x8, _ggenie_write_byte@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ggenie_write_byte@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x10, _ggenie_write_word@GOTPAGE
Lloh15:
	ldr	x10, [x10, _ggenie_write_word@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	stp	w10, w8, [x9]
	ret
LBB0_7:
	ldr	w9, [x8, #4]
	orr	w9, w9, #0x1
	str	w9, [x8, #4]
LBB0_8:
	ret
LBB0_9:
Lloh17:
	adrp	x9, _cart@GOTPAGE
Lloh18:
	ldr	x9, [x9, _cart@GOTPAGEOFF]
Lloh19:
	ldr	w11, [x9]
Lloh20:
	adrp	x9, _m68k@GOTPAGE
Lloh21:
	ldr	x9, [x9, _m68k@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	str	w11, [x9, #24]
	stp	xzr, xzr, [x9, #8]
	tbz	w1, #8, LBB0_6
LBB0_10:
	ldp	w11, w12, [x8, #8]
	ubfiz	w11, w11, #16, #6
	orr	w11, w11, w12
	ldp	x12, x10, [x10, #8]
	str	w11, [x12]
	ldp	w11, w13, [x8, #20]
	ubfiz	w11, w11, #16, #6
	orr	w11, w11, w13
	str	w11, [x12, #4]
	ldp	w11, w13, [x8, #32]
	ubfiz	w11, w11, #16, #6
	orr	w11, w11, w13
	str	w11, [x12, #8]
	ldp	w11, w13, [x8, #44]
	ubfiz	w11, w11, #16, #6
	orr	w11, w11, w13
	str	w11, [x12, #12]
	ldp	w11, w13, [x8, #56]
	ubfiz	w11, w11, #16, #6
	orr	w11, w11, w13
	str	w11, [x12, #16]
	ldp	w11, w13, [x8, #68]
	ubfiz	w11, w11, #16, #6
	orr	w11, w11, w13
	str	w11, [x12, #20]
	ldr	w11, [x8, #16]
	str	w11, [x10]
	ldr	w11, [x8, #28]
	str	w11, [x10, #4]
	ldr	w11, [x8, #40]
	str	w11, [x10, #8]
	ldr	w11, [x8, #52]
	str	w11, [x10, #12]
	ldr	w11, [x8, #64]
	str	w11, [x10, #16]
	ldr	w8, [x8, #76]
	str	w8, [x10, #20]
Lloh23:
	adrp	x8, _m68k_unused_8_w@GOTPAGE
Lloh24:
	ldr	x8, [x8, _m68k_unused_8_w@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x10, _m68k_unused_16_w@GOTPAGE
Lloh27:
	ldr	x10, [x10, _m68k_unused_16_w@GOTPAGEOFF]
Lloh28:
	ldr	w10, [x10]
	stp	w10, w8, [x9]
	mov	w0, #1
	b	_ggenie_switch
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_ggenie,32,3                    ; @ggenie
	.comm	_cart,4,2                       ; @cart
	.comm	_m68k,8,3                       ; @m68k
	.comm	_ggenie_read_byte,8,3           ; @ggenie_read_byte
	.comm	_ggenie_read_word,8,3           ; @ggenie_read_word
	.comm	_m68k_unused_8_w,4,2            ; @m68k_unused_8_w
	.comm	_m68k_unused_16_w,4,2           ; @m68k_unused_16_w
	.comm	_ggenie_write_byte,4,2          ; @ggenie_write_byte
	.comm	_ggenie_write_word,4,2          ; @ggenie_write_word
	.no_dead_strip	_ggenie_write_regs
.subsections_via_symbols
