	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_mapping
_create_mapping:                        ## @create_mapping
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movl	%edi, %r14d
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	_HEAP_ZERO_MEMORY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	movl	$24, %edx
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	%r12, 16(%rax)
	movq	_GENERIC_READ@GOTPCREL(%rip), %rax
	testq	%r12, %r12
	je	LBB0_3
## %bb.2:
	movq	_GENERIC_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
LBB0_3:
	orl	(%rax), %r15d
	movq	_OPEN_EXISTING@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$0, (%rsp)
	movl	%r14d, %edi
	movl	%r15d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	_CreateFileW
	movq	%rax, (%rbx)
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_GetFileSize
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_map_file_into_memory
	testq	%rax, %rax
	jne	LBB0_7
LBB0_5:
	movq	%rbx, %rdi
	callq	_destroy_mapping
LBB0_6:
	xorl	%ebx, %ebx
LBB0_7:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HEAP_ZERO_MEMORY,4,2           ## @HEAP_ZERO_MEMORY
	.comm	_GENERIC_READ,4,2               ## @GENERIC_READ
	.comm	_GENERIC_WRITE,4,2              ## @GENERIC_WRITE
	.comm	_OPEN_EXISTING,4,2              ## @OPEN_EXISTING
	.comm	_INVALID_HANDLE_VALUE,8,3       ## @INVALID_HANDLE_VALUE
	.no_dead_strip	_create_mapping
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_mapping
_create_mapping:                        ; @create_mapping
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	mov	x20, x0
	bl	_GetProcessHeap
Lloh0:
	adrp	x8, _HEAP_ZERO_MEMORY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HEAP_ZERO_MEMORY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #24
	bl	_HeapAlloc
	mov	x19, x0
	cbz	x0, LBB0_4
; %bb.1:
	str	x21, [x19, #16]
Lloh3:
	adrp	x8, _GENERIC_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GENERIC_READ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _GENERIC_WRITE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _GENERIC_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	x21, #0
	csel	w9, wzr, w9, eq
	orr	w1, w9, w8
Lloh9:
	adrp	x8, _OPEN_EXISTING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OPEN_EXISTING@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	x3, #0
	mov	w5, #0
	mov	w6, #0
	bl	_CreateFileW
	str	x0, [x19]
Lloh12:
	adrp	x8, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_3
; %bb.2:
	mov	x1, #0
	bl	_GetFileSize
	str	w0, [x19, #8]
	mov	x0, x19
	bl	_map_file_into_memory
	cbnz	x0, LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_destroy_mapping
	mov	x19, #0
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_HEAP_ZERO_MEMORY,4,2           ; @HEAP_ZERO_MEMORY
	.comm	_GENERIC_READ,4,2               ; @GENERIC_READ
	.comm	_GENERIC_WRITE,4,2              ; @GENERIC_WRITE
	.comm	_OPEN_EXISTING,4,2              ; @OPEN_EXISTING
	.comm	_INVALID_HANDLE_VALUE,8,3       ; @INVALID_HANDLE_VALUE
	.no_dead_strip	_create_mapping
.subsections_via_symbols
