	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_word
_read_word:                             ## @read_word
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	_BINLOAD_bin_file@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	leaq	-24(%rbp), %rdi
	movl	$1, %esi
	movl	$2, %edx
	callq	_fread
	cmpl	$2, %eax
	jne	LBB0_2
## %bb.1:
	movl	-20(%rbp), %eax
	shll	$8, %eax
	addl	-24(%rbp), %eax
	jmp	LBB0_6
LBB0_2:
	movq	(%rbx), %rdi
	callq	_fclose
	movq	$0, (%rbx)
	movq	_BINLOAD_start_binloading@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_FALSE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	leaq	L_.str(%rip), %rdi
	callq	_Log_print
	jmp	LBB0_5
LBB0_4:
	movl	$736, %edi                      ## imm = 0x2E0
	callq	_MEMORY_dGetWordAligned
	movq	_CPU_regPC@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_5:
	movl	$-1, %eax
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_8
## %bb.7:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BINLOAD_bin_file,8,3           ## @BINLOAD_bin_file
	.comm	_BINLOAD_start_binloading,8,3   ## @BINLOAD_start_binloading
	.comm	_FALSE,8,3                      ## @FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"binload: not valid BIN file"

	.comm	_CPU_regPC,4,2                  ## @CPU_regPC
	.no_dead_strip	_read_word
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_word
_read_word:                             ; @read_word
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
Lloh3:
	adrp	x19, _BINLOAD_bin_file@GOTPAGE
Lloh4:
	ldr	x19, [x19, _BINLOAD_bin_file@GOTPAGEOFF]
	ldr	x3, [x19]
	mov	x0, sp
	mov	w1, #1
	mov	w2, #2
	bl	_fread
	cmp	w0, #2
	b.ne	LBB0_2
; %bb.1:
	ldp	w8, w9, [sp]
	add	w0, w8, w9, lsl #8
	b	LBB0_6
LBB0_2:
	ldr	x0, [x19]
	bl	_fclose
	str	xzr, [x19]
Lloh5:
	adrp	x8, _BINLOAD_start_binloading@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BINLOAD_start_binloading@GOTPAGEOFF]
	ldr	x9, [x8]
	cbz	x9, LBB0_4
; %bb.3:
Lloh7:
	adrp	x9, _FALSE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _FALSE@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	str	x9, [x8]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Log_print
	b	LBB0_5
LBB0_4:
	mov	w0, #736
	bl	_MEMORY_dGetWordAligned
Lloh12:
	adrp	x8, _CPU_regPC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CPU_regPC@GOTPAGEOFF]
Lloh14:
	str	w0, [x8]
LBB0_5:
	mov	w0, #-1
LBB0_6:
	ldr	x8, [sp, #8]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_BINLOAD_bin_file,8,3           ; @BINLOAD_bin_file
	.comm	_BINLOAD_start_binloading,8,3   ; @BINLOAD_start_binloading
	.comm	_FALSE,8,3                      ; @FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"binload: not valid BIN file"

	.comm	_CPU_regPC,4,2                  ; @CPU_regPC
	.no_dead_strip	_read_word
.subsections_via_symbols
