	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_cpu_model
_set_cpu_model:                         ## @set_cpu_model
	.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
	cmpl	$0, 24(%rdi)
	je	LBB0_18
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	(%rdi), %r13
	testq	%r13, %r13
	je	LBB0_3
## %bb.2:
	cmpb	$0, (%r13)
	jne	LBB0_4
LBB0_3:
	movq	_cpu_models@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %r13
LBB0_4:
	movq	_cpu_curr_model@GOTPCREL(%rip), %r15
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.5:
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	(%rax), %rsi
	movq	%r13, %rdi
	callq	_r_str_casecmp
	testq	%rax, %rax
	je	LBB0_15
LBB0_7:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	_cpu_models@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.9:
	movl	$48, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_r_str_casecmp
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	movq	(%r12), %rax
	movq	(%rax,%r15), %rsi
	addq	$48, %r15
	testq	%rsi, %rsi
	jne	LBB0_10
	jmp	LBB0_13
LBB0_8:
	xorl	%ecx, %ecx
	jmp	LBB0_14
LBB0_11:
	movq	(%r12), %rax
LBB0_13:
	movl	%ebx, %ecx
	leaq	(%rcx,%rcx,2), %rdx
	shlq	$4, %rdx
	movq	(%rax,%rdx), %rdx
	testq	%rdx, %rdx
	cmoveq	%rdx, %rcx
	movq	_cpu_curr_model@GOTPCREL(%rip), %r15
LBB0_14:
	shlq	$4, %rcx
	leaq	(%rcx,%rcx,2), %rbx
	leaq	(%rax,%rbx), %rcx
	movq	%rcx, (%r15)
	movq	40(%rax,%rbx), %r13
	movq	32(%rax,%rbx), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	16(%rax,%rbx), %rdx
	movq	24(%rax,%rbx), %r15
	movl	24(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_i8051_reg_write
	movl	24(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdx
	movq	%r15, %r13
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	callq	_i8051_reg_write
	movl	24(%r14), %edi
	leaq	-128(%r15), %rdx
	leaq	L_.str.2(%rip), %rsi
	callq	_i8051_reg_write
	movl	24(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdx
	callq	_i8051_reg_write
	movl	24(%r14), %edi
	movq	(%r12), %rax
	movq	8(%rax,%rbx), %rdx
	leaq	L_.str.4(%rip), %rsi
	callq	_i8051_reg_write
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	cmpq	$0, 16(%r14)
	je	LBB0_18
LBB0_17:
	cmpq	$0, 8(%r14)
	je	LBB0_18
## %bb.19:
	movq	_I8051_IDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	$256, %ecx                      ## imm = 0x100
	movl	%ebx, %r8d
	callq	_map_cpu_memory
	movq	_I8051_SFR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	$128, %ecx
	movl	%ebx, %r8d
	callq	_map_cpu_memory
	movq	_I8051_XDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r13, %rdx
	movl	$65536, %ecx                    ## imm = 0x10000
	movl	%ebx, %r8d
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_map_cpu_memory                 ## TAILCALL
LBB0_15:
	movl	24(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_i8051_reg_read
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	24(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_i8051_reg_read
	movq	%rax, %r15
	subq	$-128, %r15
	movl	24(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_i8051_reg_read
	movq	%rax, %r13
	cmpq	$0, 16(%r14)
	jne	LBB0_17
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cpu_models,8,3                 ## @cpu_models
	.comm	_cpu_curr_model,8,3             ## @cpu_curr_model
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"_code"

L_.str.1:                               ## @.str.1
	.asciz	"_idata"

L_.str.2:                               ## @.str.2
	.asciz	"_sfr"

L_.str.3:                               ## @.str.3
	.asciz	"_xdata"

L_.str.4:                               ## @.str.4
	.asciz	"_pdata"

	.comm	_I8051_IDATA,4,2                ## @I8051_IDATA
	.comm	_I8051_SFR,4,2                  ## @I8051_SFR
	.comm	_I8051_XDATA,4,2                ## @I8051_XDATA
	.no_dead_strip	_set_cpu_model
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_cpu_model
_set_cpu_model:                         ; @set_cpu_model
	.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
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_18
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x24, _cpu_models@GOTPAGE
Lloh1:
	ldr	x24, [x24, _cpu_models@GOTPAGEOFF]
	cbz	x21, LBB0_3
; %bb.2:
	ldrb	w8, [x21]
	cbnz	w8, LBB0_4
LBB0_3:
	ldr	x8, [x24]
	ldr	x21, [x8]
LBB0_4:
Lloh2:
	adrp	x22, _cpu_curr_model@GOTPAGE
Lloh3:
	ldr	x22, [x22, _cpu_curr_model@GOTPAGEOFF]
	cbnz	w19, LBB0_7
; %bb.5:
	ldr	x8, [x22]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	x1, [x8]
	mov	x0, x21
	bl	_r_str_casecmp
	cbz	x0, LBB0_17
LBB0_7:
	ldr	x8, [x24]
	ldr	x1, [x8]
	cbz	x1, LBB0_11
; %bb.8:
	mov	x23, #0
	mov	w25, #48
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_r_str_casecmp
	cbz	x0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x23, x23, #1
	ldr	x8, [x24]
	ldr	x1, [x8, x25]
	add	x25, x25, #48
	cbnz	x1, LBB0_9
	b	LBB0_13
LBB0_11:
	mov	x9, #0
	b	LBB0_14
LBB0_12:
	ldr	x8, [x24]
LBB0_13:
	and	x9, x23, #0xffffffff
	mov	w10, #48
	mul	x10, x9, x10
	ldr	x10, [x8, x10]
	cmp	x10, #0
	csel	x9, xzr, x9, eq
LBB0_14:
	add	x9, x9, x9, lsl #1
	lsl	x25, x9, #4
	add	x8, x8, x25
	str	x8, [x22]
	ldp	x22, x21, [x8, #32]
	ldr	w0, [x20, #24]
	ldp	x2, x23, [x8, #16]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_i8051_reg_write
	ldr	w0, [x20, #24]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_i8051_reg_write
	ldr	w0, [x20, #24]
	sub	x2, x22, #128
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_i8051_reg_write
	ldr	w0, [x20, #24]
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x23
	bl	_i8051_reg_write
	ldr	w0, [x20, #24]
	ldr	x8, [x24]
	add	x8, x8, x25
	ldr	x2, [x8, #8]
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_i8051_reg_write
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_18
LBB0_15:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_18
; %bb.16:
Lloh14:
	adrp	x8, _I8051_IDATA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _I8051_IDATA@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	mov	w3, #256
	mov	x4, x19
	bl	_map_cpu_memory
Lloh17:
	adrp	x8, _I8051_SFR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _I8051_SFR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x22
	mov	w3, #128
	mov	x4, x19
	bl	_map_cpu_memory
Lloh20:
	adrp	x8, _I8051_XDATA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _I8051_XDATA@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x23
	mov	w3, #65536
	mov	x4, x19
	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
	b	_map_cpu_memory
LBB0_17:
	ldr	w0, [x20, #24]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_i8051_reg_read
	mov	x21, x0
	ldr	w0, [x20, #24]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_i8051_reg_read
	add	x22, x0, #128
	ldr	w0, [x20, #24]
Lloh27:
	adrp	x1, l_.str.3@PAGE
Lloh28:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_i8051_reg_read
	mov	x23, x0
	ldr	x8, [x20, #16]
	cbnz	x8, LBB0_15
LBB0_18:
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_cpu_models,8,3                 ; @cpu_models
	.comm	_cpu_curr_model,8,3             ; @cpu_curr_model
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"_code"

l_.str.1:                               ; @.str.1
	.asciz	"_idata"

l_.str.2:                               ; @.str.2
	.asciz	"_sfr"

l_.str.3:                               ; @.str.3
	.asciz	"_xdata"

l_.str.4:                               ; @.str.4
	.asciz	"_pdata"

	.comm	_I8051_IDATA,4,2                ; @I8051_IDATA
	.comm	_I8051_SFR,4,2                  ; @I8051_SFR
	.comm	_I8051_XDATA,4,2                ; @I8051_XDATA
	.no_dead_strip	_set_cpu_model
.subsections_via_symbols
