	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WriteClipboardFile             ## -- Begin function WriteClipboardFile
	.p2align	4, 0x90
_WriteClipboardFile:                    ## @WriteClipboardFile
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	_GENERIC_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CREATE_ALWAYS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_FILE_ATTRIBUTE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	$0, (%rsp)
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_CreateFileW
	movq	%rax, %r13
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jne	LBB0_2
LBB0_1:
	movq	_Globals@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ShowLastWin32Error
LBB0_23:
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_25
## %bb.24:
	movq	%r13, %rdi
	callq	_CloseHandle
LBB0_25:
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%eax, %eax
	callq	_CountClipboardFormats
	movl	%eax, %r14d
	leal	-128(%r15), %eax
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	cmpl	$2, %eax
	jae	LBB0_3
## %bb.11:
	movl	$128, -152(%rbp)
	jmp	LBB0_5
LBB0_3:
	cmpl	$130, %r15d
	jne	LBB0_12
## %bb.4:
	movl	$130, -152(%rbp)
LBB0_5:
	leaq	-192(%rbp), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	-152(%rbp), %rbx
	movl	%r14d, 4(%rbx)
	movq	_FILE_BEGIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_SetFilePointer
	leaq	-96(%rbp), %rcx
	movl	$40, %edx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	xorl	%r8d, %r8d
	callq	_WriteFile
	testl	%eax, %eax
	je	LBB0_1
## %bb.6:
	cmpq	$40, -96(%rbp)
	jne	LBB0_1
## %bb.7:
	movq	%r15, -112(%rbp)                ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	callq	_EnumClipboardFormats
	testq	%rax, %rax
	je	LBB0_23
## %bb.8:
	movq	%rax, %rbx
	movslq	%r14d, %rax
	leaq	(%rax,%rax,4), %rax
	leaq	40(,%rax,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testl	%r14d, %r14d
	cmovlel	%r15d, %r14d
	shlq	$3, %r14
	leaq	(%r14,%r14,4), %r15
	movq	$-40, %r14
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	%r13, -104(%rbp)                ## 8-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%rbx, %rdi
	callq	_EnumClipboardFormats
	movq	%rax, %rbx
	movq	%r12, %r14
	testq	%rax, %rax
	je	LBB0_23
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leaq	40(%r14), %r12
	cmpq	%r12, %r15
	je	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	leaq	-72(%rbp), %rcx
	callq	_ClipboardWriteMemory
	testl	%eax, %eax
	je	LBB0_22
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$2, -80(%rbp)                   ## 4-byte Folded Reload
	jae	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	$40, %esi
	callq	_ZeroMemory
	movq	%rbx, 32(%r15)
	movq	-72(%rbp), %rax
	movq	%rax, 24(%r15)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r15)
	movq	_Globals@GOTPCREL(%rip), %rax
	movl	4(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	8(%r15), %r13d
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movl	%r13d, %edi
	callq	_ARRAYSIZE
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%r13d, %ecx
	movq	-104(%rbp), %r13                ## 8-byte Reload
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$130, -112(%rbp)                ## 4-byte Folded Reload
	jne	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	$40, %esi
	callq	_ZeroMemory
	movq	%rbx, 32(%r15)
	movq	-72(%rbp), %rax
	movq	%rax, 24(%r15)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r15)
	movq	_Globals@GOTPCREL(%rip), %rax
	movl	4(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	8(%r15), %edi
	movl	%edi, -76(%rbp)                 ## 4-byte Spill
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	callq	_ARRAYSIZE
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
LBB0_18:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%eax, %r8d
	callq	_RetrieveClipboardFormatName
LBB0_19:                                ##   in Loop: Header=BB0_9 Depth=1
	addq	$80, %r14
	movq	_FILE_BEGIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_SetFilePointer
	movq	_INVALID_SET_FILE_POINTER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_1
## %bb.20:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	$40, %edx
	movq	%r13, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	leaq	-96(%rbp), %rcx
	xorl	%r8d, %r8d
	callq	_WriteFile
	testl	%eax, %eax
	je	LBB0_1
## %bb.21:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	-72(%rbp), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_22
LBB0_12:
	movq	_Globals@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rax), %esi
	movq	_ERROR_INVALID_FILE_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MB_ICONSTOP@GOTPCREL(%rip), %rax
	movq	_MB_OK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	orl	(%rax), %r8d
	xorl	%ecx, %ecx
	callq	_MessageBoxRes
	jmp	LBB0_23
LBB0_10:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_assert
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_GENERIC_WRITE,4,2              ## @GENERIC_WRITE
	.comm	_CREATE_ALWAYS,4,2              ## @CREATE_ALWAYS
	.comm	_FILE_ATTRIBUTE_NORMAL,4,2      ## @FILE_ATTRIBUTE_NORMAL
	.comm	_INVALID_HANDLE_VALUE,8,3       ## @INVALID_HANDLE_VALUE
	.comm	_Globals,8,2                    ## @Globals
	.comm	_ERROR_INVALID_FILE_FORMAT,4,2  ## @ERROR_INVALID_FILE_FORMAT
	.comm	_MB_ICONSTOP,4,2                ## @MB_ICONSTOP
	.comm	_MB_OK,4,2                      ## @MB_OK
	.comm	_FILE_BEGIN,4,2                 ## @FILE_BEGIN
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_INVALID_SET_FILE_POINTER,8,3   ## @INVALID_SET_FILE_POINTER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WriteClipboardFile             ; -- Begin function WriteClipboardFile
	.p2align	2
_WriteClipboardFile:                    ; @WriteClipboardFile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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	x20, x1
Lloh0:
	adrp	x8, _GENERIC_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GENERIC_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _CREATE_ALWAYS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CREATE_ALWAYS@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
Lloh6:
	adrp	x8, _FILE_ATTRIBUTE_NORMAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FILE_ATTRIBUTE_NORMAL@GOTPAGEOFF]
Lloh8:
	ldr	w5, [x8]
	mov	w2, #0
	mov	x3, #0
	mov	x6, #0
	bl	_CreateFileW
	mov	x19, x0
Lloh9:
	adrp	x25, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh10:
	ldr	x25, [x25, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_5
LBB0_1:
Lloh11:
	adrp	x8, _Globals@GOTPAGE
Lloh12:
	ldr	x8, [x8, _Globals@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_ShowLastWin32Error
LBB0_2:
	ldr	x8, [x25]
	cmp	x19, x8
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_CloseHandle
LBB0_4:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_5:
	bl	_CountClipboardFormats
	mov	x24, x0
	sub	w26, w20, #128
	cmp	w26, #2
	b.hs	LBB0_7
; %bb.6:
	mov	w8, #128
	b	LBB0_9
LBB0_7:
	cmp	w20, #130
	b.ne	LBB0_24
; %bb.8:
	mov	w8, #130
LBB0_9:
	str	w8, [sp, #72]
	add	x21, sp, #32
	add	x22, sp, #72
	str	w24, [x22, #4]
Lloh14:
	adrp	x8, _FILE_BEGIN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FILE_BEGIN@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	bl	_SetFilePointer
	add	x3, sp, #16
	mov	x0, x19
	mov	x1, x22
	mov	w2, #40
	mov	x4, #0
	bl	_WriteFile
	cbz	w0, LBB0_1
; %bb.10:
	ldr	x8, [sp, #16]
	cmp	x8, #40
	b.ne	LBB0_1
; %bb.11:
	str	w20, [sp, #8]                   ; 4-byte Folded Spill
	mov	x0, #0
	bl	_EnumClipboardFormats
	cbz	x0, LBB0_2
; %bb.12:
	mov	x22, x0
	mov	w8, #40
	smull	x9, w24, w8
	add	x23, x9, #40
	cmp	w24, #0
	csel	w9, w24, wzr, gt
	umull	x27, w9, w8
	mov	x28, #-40
	str	w26, [sp, #12]                  ; 4-byte Folded Spill
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x22
	bl	_EnumClipboardFormats
	mov	x22, x0
	mov	x28, x20
	cbz	x0, LBB0_2
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	add	x20, x28, #40
	cmp	x27, x20
	b.eq	LBB0_25
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x3, sp, #24
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_ClipboardWriteMemory
	cbz	w0, LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	cmp	w26, #2
	b.hs	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x21
	mov	w1, #40
	bl	_ZeroMemory
	ldr	x8, [sp, #24]
	stp	x8, x22, [x21, #24]
	str	x23, [x21, #16]
Lloh17:
	adrp	x8, _Globals@GOTPAGE
Lloh18:
	ldr	x8, [x8, _Globals@GOTPAGEOFF]
Lloh19:
	ldr	w24, [x8, #4]
Lloh20:
	adrp	x8, _TRUE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	cmp	w8, #130
	b.ne	LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x21
	mov	w1, #40
	bl	_ZeroMemory
	ldr	x8, [sp, #24]
	stp	x8, x22, [x21, #24]
	str	x23, [x21, #16]
Lloh22:
	adrp	x8, _Globals@GOTPAGE
Lloh23:
	ldr	x8, [x8, _Globals@GOTPAGEOFF]
Lloh24:
	ldr	w24, [x8, #4]
Lloh25:
	adrp	x8, _FALSE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_20:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	w25, [x8]
	ldr	w26, [x21, #8]
	mov	x0, x26
	bl	_ARRAYSIZE
	mov	x4, x0
	mov	x0, x24
	mov	x1, x22
	mov	x2, x25
Lloh27:
	adrp	x25, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh28:
	ldr	x25, [x25, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
	mov	x3, x26
	ldr	w26, [sp, #12]                  ; 4-byte Folded Reload
	bl	_RetrieveClipboardFormatName
LBB0_21:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x1, x28, #80
Lloh29:
	adrp	x8, _FILE_BEGIN@GOTPAGE
Lloh30:
	ldr	x8, [x8, _FILE_BEGIN@GOTPAGEOFF]
Lloh31:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_SetFilePointer
Lloh32:
	adrp	x8, _INVALID_SET_FILE_POINTER@GOTPAGE
Lloh33:
	ldr	x8, [x8, _INVALID_SET_FILE_POINTER@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_1
; %bb.22:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x3, sp, #16
	mov	x0, x19
	mov	x1, x21
	mov	w2, #40
	mov	x4, #0
	bl	_WriteFile
	cbz	w0, LBB0_1
; %bb.23:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [sp, #24]
	add	x23, x8, x23
	b	LBB0_13
LBB0_24:
Lloh35:
	adrp	x8, _Globals@GOTPAGE
Lloh36:
	ldr	x8, [x8, _Globals@GOTPAGEOFF]
	ldp	w0, w1, [x8]
Lloh37:
	adrp	x8, _ERROR_INVALID_FILE_FORMAT@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ERROR_INVALID_FILE_FORMAT@GOTPAGEOFF]
Lloh39:
	adrp	x9, _MB_ICONSTOP@GOTPAGE
Lloh40:
	ldr	x9, [x9, _MB_ICONSTOP@GOTPAGEOFF]
Lloh41:
	ldr	w2, [x8]
Lloh42:
	ldr	w8, [x9]
Lloh43:
	adrp	x9, _MB_OK@GOTPAGE
Lloh44:
	ldr	x9, [x9, _MB_OK@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	orr	w4, w9, w8
	mov	w3, #0
	bl	_MessageBoxRes
	b	LBB0_2
LBB0_25:
Lloh46:
	adrp	x8, _FALSE@GOTPAGE
Lloh47:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh48:
	ldr	w0, [x8]
	bl	_assert
	b	LBB0_2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh41
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_GENERIC_WRITE,4,2              ; @GENERIC_WRITE
	.comm	_CREATE_ALWAYS,4,2              ; @CREATE_ALWAYS
	.comm	_FILE_ATTRIBUTE_NORMAL,4,2      ; @FILE_ATTRIBUTE_NORMAL
	.comm	_INVALID_HANDLE_VALUE,8,3       ; @INVALID_HANDLE_VALUE
	.comm	_Globals,8,2                    ; @Globals
	.comm	_ERROR_INVALID_FILE_FORMAT,4,2  ; @ERROR_INVALID_FILE_FORMAT
	.comm	_MB_ICONSTOP,4,2                ; @MB_ICONSTOP
	.comm	_MB_OK,4,2                      ; @MB_OK
	.comm	_FILE_BEGIN,4,2                 ; @FILE_BEGIN
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_INVALID_SET_FILE_POINTER,8,3   ; @INVALID_SET_FILE_POINTER
.subsections_via_symbols
