	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_file
_read_file:                             ## @read_file
	.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	%rsi, %r15
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_fseek
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	_JERRY_LOG_LEVEL_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_jerry_port_log
LBB0_8:
	movq	%rbx, %rdi
	callq	_fclose
	jmp	LBB0_13
LBB0_1:
	movq	_JERRY_LOG_LEVEL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_jerry_port_log
LBB0_13:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rbx, %rdi
	callq	_ftell
	movq	%rax, %r12
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	callq	_rewind
	movq	%r12, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	movq	%rax, %r13
	movq	%rax, %rdi
	movl	$1, %esi
	movq	%r12, %rdx
	movq	%rbx, %rcx
	callq	_fread
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	cmpq	%r12, %rax
	jne	LBB0_11
## %bb.12:
	movq	%rbx, %rdi
	callq	_fclose
	movq	%r12, (%r15)
	movq	%r13, %r15
	jmp	LBB0_13
LBB0_5:
	movq	_JERRY_LOG_LEVEL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_jerry_port_log
	jmp	LBB0_8
LBB0_7:
	movq	_JERRY_LOG_LEVEL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_jerry_port_log
	jmp	LBB0_8
LBB0_11:
	movq	_JERRY_LOG_LEVEL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_jerry_port_log
	movq	%r13, %rdi
	callq	_free
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r"

	.comm	_JERRY_LOG_LEVEL_ERROR,4,2      ## @JERRY_LOG_LEVEL_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Error: cannot open file: %s\n"

	.comm	_SEEK_END,4,2                   ## @SEEK_END
L_.str.2:                               ## @.str.2
	.asciz	"Failed to seek (error: %d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to get the file size(error %ld)\n"

L_.str.4:                               ## @.str.4
	.asciz	"Out of memory error\n"

L_.str.5:                               ## @.str.5
	.asciz	"Error: failed to read file: %s\n"

	.no_dead_strip	_read_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_file
_read_file:                             ; @read_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_fseek
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_8
; %bb.2:
Lloh5:
	adrp	x8, _JERRY_LOG_LEVEL_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _JERRY_LOG_LEVEL_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	x0, [sp]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x8
LBB0_3:
	bl	_jerry_port_log
LBB0_4:
	mov	x0, x19
	bl	_fclose
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x8, _JERRY_LOG_LEVEL_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _JERRY_LOG_LEVEL_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	str	x20, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_jerry_port_log
LBB0_6:
	mov	x22, #0
LBB0_7:
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
LBB0_8:
	mov	x0, x19
	bl	_ftell
	mov	x23, x0
	tbnz	x0, #63, LBB0_13
; %bb.9:
	mov	x0, x19
	bl	_rewind
	mov	x0, x23
	bl	_malloc
	mov	x22, x0
	cbz	x0, LBB0_14
; %bb.10:
	mov	x0, x22
	mov	w1, #1
	mov	x2, x23
	mov	x3, x19
	bl	_fread
	cbz	x0, LBB0_15
; %bb.11:
	cmp	x0, x23
	b.ne	LBB0_15
; %bb.12:
	mov	x0, x19
	bl	_fclose
	str	x23, [x21]
	b	LBB0_7
LBB0_13:
Lloh15:
	adrp	x8, _JERRY_LOG_LEVEL_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _JERRY_LOG_LEVEL_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	str	x23, [sp]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_3
LBB0_14:
Lloh20:
	adrp	x8, _JERRY_LOG_LEVEL_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _JERRY_LOG_LEVEL_ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_jerry_port_log
	mov	x0, x19
	bl	_fclose
	b	LBB0_7
LBB0_15:
Lloh25:
	adrp	x8, _JERRY_LOG_LEVEL_ERROR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _JERRY_LOG_LEVEL_ERROR@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	str	x20, [sp]
Lloh28:
	adrp	x1, l_.str.5@PAGE
Lloh29:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_jerry_port_log
	mov	x0, x22
	bl	_free
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

	.comm	_JERRY_LOG_LEVEL_ERROR,4,2      ; @JERRY_LOG_LEVEL_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Error: cannot open file: %s\n"

	.comm	_SEEK_END,4,2                   ; @SEEK_END
l_.str.2:                               ; @.str.2
	.asciz	"Failed to seek (error: %d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to get the file size(error %ld)\n"

l_.str.4:                               ; @.str.4
	.asciz	"Out of memory error\n"

l_.str.5:                               ; @.str.5
	.asciz	"Error: failed to read file: %s\n"

	.no_dead_strip	_read_file
.subsections_via_symbols
