	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function file_register
_file_register:                         ## @file_register
	.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
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_GENERIC_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FILE_SHARE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_OPEN_EXISTING@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	$0, (%rsp)
	movl	%r15d, %edi
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	_CreateFileW
	movq	%rax, %r13
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jne	LBB0_1
## %bb.5:
	movl	%r15d, %edi
	callq	_debugstr_w
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_WARN
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%eax, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_HRESULT_FROM_WIN32             ## TAILCALL
LBB0_1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_GetFileSize
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_HeapAlloc
	movq	%rax, %r14
	movq	%r13, %rdi
	movq	%rax, %rsi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_ReadFile
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_CP_ACP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_MultiByteToWideChar
	movl	%eax, %r15d
	leal	1(%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	_HEAP_ZERO_MEMORY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leal	4(,%r15,4), %edx
	movl	%eax, %edi
	callq	_HeapAlloc
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%rax, %r12
	movq	_CP_ACP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	movq	%r12, %r8
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	callq	_MultiByteToWideChar
	movslq	%r15d, %rax
	movb	$0, (%r12,%rax)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_string_register
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r12, %rdx
	callq	_HeapFree
	jmp	LBB0_4
LBB0_3:
	movl	%r15d, %edi
	callq	_debugstr_w
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_WARN
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%eax, %edi
	callq	_HRESULT_FROM_WIN32
	movl	%eax, %ebx
LBB0_4:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_HeapFree
	movq	%r13, %rdi
	callq	_CloseHandle
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GENERIC_READ,4,2               ## @GENERIC_READ
	.comm	_FILE_SHARE_READ,4,2            ## @FILE_SHARE_READ
	.comm	_OPEN_EXISTING,4,2              ## @OPEN_EXISTING
	.comm	_INVALID_HANDLE_VALUE,8,3       ## @INVALID_HANDLE_VALUE
	.comm	_CP_ACP,4,2                     ## @CP_ACP
	.comm	_HEAP_ZERO_MEMORY,4,2           ## @HEAP_ZERO_MEMORY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read file %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"Could not open file %s\n"

	.no_dead_strip	_file_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function file_register
_file_register:                         ; @file_register
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x23, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _GENERIC_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GENERIC_READ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _FILE_SHARE_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FILE_SHARE_READ@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _OPEN_EXISTING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OPEN_EXISTING@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	mov	x0, x23
	mov	x3, #0
	mov	w5, #0
	mov	x6, #0
	bl	_CreateFileW
Lloh9:
	adrp	x8, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x23
	bl	_debugstr_w
	mov	x1, x0
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_WARN
	bl	_GetLastError
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_HRESULT_FROM_WIN32
LBB0_2:
	mov	x19, x0
	mov	x1, #0
	bl	_GetFileSize
	mov	x24, x0
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x24
	bl	_HeapAlloc
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x24
	mov	x3, #0
	mov	x4, #0
	bl	_ReadFile
	cbz	x0, LBB0_4
; %bb.3:
Lloh14:
	adrp	x27, _CP_ACP@GOTPAGE
Lloh15:
	ldr	x27, [x27, _CP_ACP@GOTPAGEOFF]
	ldr	w0, [x27]
	mov	w1, #0
	mov	x2, x20
	mov	x3, x24
	mov	x4, #0
	mov	w5, #0
	bl	_MultiByteToWideChar
	mov	x23, x0
	add	w25, w0, #1
	bl	_GetProcessHeap
Lloh16:
	adrp	x8, _HEAP_ZERO_MEMORY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HEAP_ZERO_MEMORY@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	lsl	w2, w25, #2
	bl	_HeapAlloc
	mov	x26, x0
	ldr	w0, [x27]
	mov	w1, #0
	mov	x2, x20
	mov	x3, x24
	mov	x4, x26
	mov	x5, x25
	bl	_MultiByteToWideChar
	strb	wzr, [x26, w23, sxtw]
	mov	x0, x22
	mov	x1, x26
	mov	x2, x21
	bl	_string_register
	mov	x21, x0
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x26
	bl	_HeapFree
	b	LBB0_5
LBB0_4:
	mov	x0, x23
	bl	_debugstr_w
	mov	x1, x0
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_WARN
	bl	_GetLastError
	bl	_HRESULT_FROM_WIN32
	mov	x21, x0
LBB0_5:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x20
	bl	_HeapFree
	mov	x0, x19
	bl	_CloseHandle
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_GENERIC_READ,4,2               ; @GENERIC_READ
	.comm	_FILE_SHARE_READ,4,2            ; @FILE_SHARE_READ
	.comm	_OPEN_EXISTING,4,2              ; @OPEN_EXISTING
	.comm	_INVALID_HANDLE_VALUE,8,3       ; @INVALID_HANDLE_VALUE
	.comm	_CP_ACP,4,2                     ; @CP_ACP
	.comm	_HEAP_ZERO_MEMORY,4,2           ; @HEAP_ZERO_MEMORY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read file %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"Could not open file %s\n"

	.no_dead_strip	_file_register
.subsections_via_symbols
