	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_file_handle
_get_file_handle:                       ## @get_file_handle
	.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	%rdi, %rbx
	testq	%rsi, %rsi
	jne	LBB0_1
## %bb.2:
	movq	_CREATE_NEW@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_CREATE_ALWAYS@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_create_file
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.4:
	xorl	%eax, %eax
	callq	_GetLastError
	movq	_ERROR_FILE_EXISTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	movq	_STRING_OVERWRITE_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_ask_confirm
	testl	%eax, %eax
	je	LBB0_9
## %bb.6:
	movq	_CREATE_ALWAYS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_create_file                    ## TAILCALL
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_7:
	movq	_FORMAT_MESSAGE_ALLOCATE_BUFFER@GOTPCREL(%rip), %rcx
	movq	_FORMAT_MESSAGE_FROM_SYSTEM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	orl	(%rcx), %edi
	movq	_FORMAT_MESSAGE_IGNORE_INSERTS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edi
	movq	$0, (%rsp)
	leaq	-16(%rbp), %r8
	xorl	%esi, %esi
	movq	%rax, %rdx
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	_FormatMessageW
	movq	-16(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_lstrlenW
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_output_writeconsole
	movq	-16(%rbp), %rdi
	callq	_LocalFree
	movl	$1, %edi
	callq	_exit
LBB0_9:
	movq	_STRING_CANCELLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_output_message
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_CREATE_ALWAYS,4,2              ## @CREATE_ALWAYS
	.comm	_CREATE_NEW,4,2                 ## @CREATE_NEW
	.comm	_INVALID_HANDLE_VALUE,8,3       ## @INVALID_HANDLE_VALUE
	.comm	_ERROR_FILE_EXISTS,8,3          ## @ERROR_FILE_EXISTS
	.comm	_STRING_OVERWRITE_FILE,4,2      ## @STRING_OVERWRITE_FILE
	.comm	_STRING_CANCELLED,4,2           ## @STRING_CANCELLED
	.comm	_FORMAT_MESSAGE_ALLOCATE_BUFFER,4,2 ## @FORMAT_MESSAGE_ALLOCATE_BUFFER
	.comm	_FORMAT_MESSAGE_FROM_SYSTEM,4,2 ## @FORMAT_MESSAGE_FROM_SYSTEM
	.comm	_FORMAT_MESSAGE_IGNORE_INSERTS,4,2 ## @FORMAT_MESSAGE_IGNORE_INSERTS
	.no_dead_strip	_get_file_handle
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_file_handle
_get_file_handle:                       ; @get_file_handle
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _CREATE_ALWAYS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CREATE_ALWAYS@GOTPAGEOFF]
Lloh2:
	adrp	x8, _CREATE_NEW@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CREATE_NEW@GOTPAGEOFF]
	cmp	x1, #0
	csel	x8, x8, x20, eq
	ldr	w1, [x8]
	bl	_create_file
Lloh4:
	adrp	x8, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.1:
	bl	_GetLastError
Lloh7:
	adrp	x8, _ERROR_FILE_EXISTS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERROR_FILE_EXISTS@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.2:
Lloh10:
	adrp	x8, _STRING_OVERWRITE_FILE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _STRING_OVERWRITE_FILE@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_ask_confirm
	cbz	w0, LBB0_6
; %bb.3:
	ldr	w1, [x20]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_create_file
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_5:
	mov	x2, x0
Lloh13:
	adrp	x8, _FORMAT_MESSAGE_ALLOCATE_BUFFER@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FORMAT_MESSAGE_ALLOCATE_BUFFER@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _FORMAT_MESSAGE_FROM_SYSTEM@GOTPAGE
Lloh17:
	ldr	x9, [x9, _FORMAT_MESSAGE_FROM_SYSTEM@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh19:
	adrp	x9, _FORMAT_MESSAGE_IGNORE_INSERTS@GOTPAGE
Lloh20:
	ldr	x9, [x9, _FORMAT_MESSAGE_IGNORE_INSERTS@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w0, w8, w9
	add	x4, sp, #8
	mov	x1, #0
	mov	w3, #0
	mov	w5, #0
	mov	x6, #0
	bl	_FormatMessageW
	ldr	x19, [sp, #8]
	mov	x0, x19
	bl	_lstrlenW
	mov	x1, x0
	mov	x0, x19
	bl	_output_writeconsole
	ldr	x0, [sp, #8]
	bl	_LocalFree
	mov	w0, #1
	bl	_exit
LBB0_6:
Lloh22:
	adrp	x8, _STRING_CANCELLED@GOTPAGE
Lloh23:
	ldr	x8, [x8, _STRING_CANCELLED@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_output_message
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_CREATE_ALWAYS,4,2              ; @CREATE_ALWAYS
	.comm	_CREATE_NEW,4,2                 ; @CREATE_NEW
	.comm	_INVALID_HANDLE_VALUE,8,3       ; @INVALID_HANDLE_VALUE
	.comm	_ERROR_FILE_EXISTS,8,3          ; @ERROR_FILE_EXISTS
	.comm	_STRING_OVERWRITE_FILE,4,2      ; @STRING_OVERWRITE_FILE
	.comm	_STRING_CANCELLED,4,2           ; @STRING_CANCELLED
	.comm	_FORMAT_MESSAGE_ALLOCATE_BUFFER,4,2 ; @FORMAT_MESSAGE_ALLOCATE_BUFFER
	.comm	_FORMAT_MESSAGE_FROM_SYSTEM,4,2 ; @FORMAT_MESSAGE_FROM_SYSTEM
	.comm	_FORMAT_MESSAGE_IGNORE_INSERTS,4,2 ; @FORMAT_MESSAGE_IGNORE_INSERTS
	.no_dead_strip	_get_file_handle
.subsections_via_symbols
