	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function anal_pic_midrange_malloc
_anal_pic_midrange_malloc:              ## @anal_pic_midrange_malloc
	.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	%rdi, %rbx
	testl	%esi, %esi
	jne	LBB0_2
## %bb.1:
	testb	$1, _anal_pic_midrange_malloc.init_done(%rip)
	jne	LBB0_3
LBB0_2:
	leaq	4(%rbx), %r14
	movq	_mem_sram@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_PIC_MIDRANGE_ESIL_SRAM_START@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	$4096, %ecx                     ## imm = 0x1000
	callq	_cpu_memory_map
	movl	%eax, (%r15)
	movq	_mem_stack@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_PIC_MIDRANGE_ESIL_CSTACK_TOP@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%r14, %rdi
	movl	$32, %ecx
	callq	_cpu_memory_map
	movl	%eax, (%r15)
	movl	(%rbx), %edi
	movl	(%r12), %edx
	leaq	L_.str(%rip), %rsi
	callq	_pic_midrange_reg_write
	movl	(%rbx), %edi
	movl	(%r13), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_pic_midrange_reg_write
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	$31, %edx
	callq	_pic_midrange_reg_write
	movb	$1, _anal_pic_midrange_malloc.init_done(%rip)
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_anal_pic_midrange_malloc.init_done,1,2 ## @anal_pic_midrange_malloc.init_done
	.comm	_mem_sram,4,2                   ## @mem_sram
	.comm	_PIC_MIDRANGE_ESIL_SRAM_START,4,2 ## @PIC_MIDRANGE_ESIL_SRAM_START
	.comm	_mem_stack,4,2                  ## @mem_stack
	.comm	_PIC_MIDRANGE_ESIL_CSTACK_TOP,4,2 ## @PIC_MIDRANGE_ESIL_CSTACK_TOP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"_sram"

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

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

	.no_dead_strip	_anal_pic_midrange_malloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function anal_pic_midrange_malloc
_anal_pic_midrange_malloc:              ; @anal_pic_midrange_malloc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	adrp	x21, _anal_pic_midrange_malloc.init_done@PAGE
	cbnz	w1, LBB0_2
; %bb.1:
	ldrb	w8, [x21, _anal_pic_midrange_malloc.init_done@PAGEOFF]
	tbnz	w8, #0, LBB0_3
LBB0_2:
	add	x20, x19, #4
Lloh0:
	adrp	x22, _mem_sram@GOTPAGE
Lloh1:
	ldr	x22, [x22, _mem_sram@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x23, _PIC_MIDRANGE_ESIL_SRAM_START@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PIC_MIDRANGE_ESIL_SRAM_START@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x20
	mov	w3, #4096
	bl	_cpu_memory_map
	str	w0, [x22]
Lloh4:
	adrp	x22, _mem_stack@GOTPAGE
Lloh5:
	ldr	x22, [x22, _mem_stack@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh6:
	adrp	x24, _PIC_MIDRANGE_ESIL_CSTACK_TOP@GOTPAGE
Lloh7:
	ldr	x24, [x24, _PIC_MIDRANGE_ESIL_CSTACK_TOP@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x20
	mov	w3, #32
	bl	_cpu_memory_map
	str	w0, [x22]
	ldr	w0, [x19]
	ldr	w2, [x23]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_pic_midrange_reg_write
	ldr	w0, [x19]
	ldr	w2, [x24]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_pic_midrange_reg_write
	ldr	w0, [x19]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #31
	bl	_pic_midrange_reg_write
	mov	w8, #1
	strb	w8, [x21, _anal_pic_midrange_malloc.init_done@PAGEOFF]
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_anal_pic_midrange_malloc.init_done,1,2 ; @anal_pic_midrange_malloc.init_done
	.comm	_mem_sram,4,2                   ; @mem_sram
	.comm	_PIC_MIDRANGE_ESIL_SRAM_START,4,2 ; @PIC_MIDRANGE_ESIL_SRAM_START
	.comm	_mem_stack,4,2                  ; @mem_stack
	.comm	_PIC_MIDRANGE_ESIL_CSTACK_TOP,4,2 ; @PIC_MIDRANGE_ESIL_CSTACK_TOP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"_sram"

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

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

	.no_dead_strip	_anal_pic_midrange_malloc
.subsections_via_symbols
