	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emit_loadreg                   ## -- Begin function emit_loadreg
	.p2align	4, 0x90
_emit_loadreg:                          ## @emit_loadreg
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
                                        ## kill: def $edi killed $edi def $rdi
	movq	_MMREG@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_memory_map@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	subl	_dynarec_local@GOTPCREL(%rip), %edi
	sarl	$2, %edi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_emit_movimm                    ## TAILCALL
LBB0_2:
	movq	_slave@GOTPCREL(%rip), %rax
	leal	(,%rdi,4), %ebx
	cmpq	$0, (%rax)
	movq	_slave_reg@GOTPCREL(%rip), %rax
	cmoveq	_master_reg@GOTPCREL(%rip), %rax
	movq	_CCREG@GOTPCREL(%rip), %rcx
	movl	_slave_cc@GOTPCREL(%rip), %edx
	cmovel	_master_cc@GOTPCREL(%rip), %edx
	addl	(%rax), %ebx
	cmpl	%edi, (%rcx)
	cmovel	%edx, %ebx
	subl	_dynarec_local@GOTPCREL(%rip), %ebx
	xorl	%edi, %edi
	cmpl	$4096, %ebx                     ## imm = 0x1000
	setl	%dil
	callq	_assert
	movq	_regname@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r14d, %r14
	movl	(%rax,%r14,4), %esi
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	callq	_assem_debug
	movq	_FP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	xorl	%edx, %edx
	callq	_rd_rn_rm
	orl	%eax, %ebx
	orl	$-443547648, %ebx               ## imm = 0xE5900000
	movl	%ebx, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_output_w32                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MMREG,4,2                      ## @MMREG
	.comm	_memory_map,8,3                 ## @memory_map
	.comm	_dynarec_local,4,2              ## @dynarec_local
	.comm	_slave,8,3                      ## @slave
	.comm	_slave_reg,8,3                  ## @slave_reg
	.comm	_master_reg,8,3                 ## @master_reg
	.comm	_CCREG,4,2                      ## @CCREG
	.comm	_slave_cc,4,2                   ## @slave_cc
	.comm	_master_cc,4,2                  ## @master_cc
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ldr %s,fp+%d\n"

	.comm	_regname,8,3                    ## @regname
	.comm	_FP,4,2                         ## @FP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emit_loadreg                   ; -- Begin function emit_loadreg
	.p2align	2
_emit_loadreg:                          ; @emit_loadreg
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x8, _MMREG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMREG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _memory_map@GOTPAGE
Lloh4:
	ldr	x8, [x8, _memory_map@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _dynarec_local@GOTPAGE
Lloh7:
	ldr	x9, [x9, _dynarec_local@GOTPAGEOFF]
	sub	w8, w8, w9
	asr	w0, w8, #2
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_emit_movimm
LBB0_2:
Lloh8:
	adrp	x8, _slave@GOTPAGE
Lloh9:
	ldr	x8, [x8, _slave@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _slave_reg@GOTPAGE
Lloh12:
	ldr	x9, [x9, _slave_reg@GOTPAGEOFF]
Lloh13:
	adrp	x10, _master_reg@GOTPAGE
Lloh14:
	ldr	x10, [x10, _master_reg@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	add	w8, w8, w0, lsl #2
Lloh15:
	adrp	x9, _CCREG@GOTPAGE
Lloh16:
	ldr	x9, [x9, _CCREG@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _slave_cc@GOTPAGE
Lloh19:
	ldr	x10, [x10, _slave_cc@GOTPAGEOFF]
Lloh20:
	adrp	x11, _master_cc@GOTPAGE
Lloh21:
	ldr	x11, [x11, _master_cc@GOTPAGEOFF]
	csel	w10, w11, w10, eq
	cmp	w9, w0
	csel	w8, w10, w8, eq
Lloh22:
	adrp	x9, _dynarec_local@GOTPAGE
Lloh23:
	ldr	x9, [x9, _dynarec_local@GOTPAGEOFF]
	sub	w20, w8, w9
	cmp	w20, #1, lsl #12                ; =4096
	cset	w0, lt
	bl	_assert
Lloh24:
	adrp	x8, _regname@GOTPAGE
Lloh25:
	ldr	x8, [x8, _regname@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	ldr	w1, [x8, w19, sxtw #2]
Lloh27:
	adrp	x0, l_.str@PAGE
Lloh28:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_assem_debug
Lloh29:
	adrp	x8, _FP@GOTPAGE
Lloh30:
	ldr	x8, [x8, _FP@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_rd_rn_rm
	orr	w8, w20, w0
	mov	w9, #-443547648
	orr	w0, w8, w9
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_output_w32
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MMREG,4,2                      ; @MMREG
	.comm	_memory_map,8,3                 ; @memory_map
	.comm	_dynarec_local,4,2              ; @dynarec_local
	.comm	_slave,8,3                      ; @slave
	.comm	_slave_reg,8,3                  ; @slave_reg
	.comm	_master_reg,8,3                 ; @master_reg
	.comm	_CCREG,4,2                      ; @CCREG
	.comm	_slave_cc,4,2                   ; @slave_cc
	.comm	_master_cc,4,2                  ; @master_cc
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ldr %s,fp+%d\n"

	.comm	_regname,8,3                    ; @regname
	.comm	_FP,4,2                         ; @FP
.subsections_via_symbols
