	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function HLPFILE_RtfAddMetaFile
_HLPFILE_RtfAddMetaFile:                ## @HLPFILE_RtfAddMetaFile
	.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	$312, %rsp                      ## imm = 0x138
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -328(%rbp)                ## 4-byte Spill
	movq	%rdx, %r12
	movq	%rsi, -344(%rbp)                ## 8-byte Spill
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -336(%rbp)
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_WINE_TRACE
	leaq	8(%r12), %rax
	movq	%rax, -312(%rbp)
	leaq	-312(%rbp), %rdi
	callq	_fetch_ushort
	movl	%eax, %r14d
	movq	-312(%rbp), %rdi
	xorl	%esi, %esi
	callq	_GET_USHORT
	movl	%eax, %ebx
	movq	-312(%rbp), %rdi
	movl	$2, %esi
	callq	_GET_USHORT
	leaq	L_.str.1(%rip), %rsi
	leaq	-304(%rbp), %r15
	movq	%r15, %rdi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	callq	_sprintf
	movq	%r13, -320(%rbp)                ## 8-byte Spill
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_HLPFILE_RtfAddControl
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	addq	$16, -312(%rbp)
	leaq	-312(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_fetch_ulong
	movl	%eax, -324(%rbp)                ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_fetch_ulong
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_fetch_ulong
	movl	%eax, %r15d
	movq	-312(%rbp), %rdi
	xorl	%esi, %esi
	callq	_GET_UINT
	movl	%eax, %r14d
	movq	-312(%rbp), %rdi
	movl	$4, %esi
	callq	_GET_UINT
	movl	%eax, %ebx
	addq	$32, -312(%rbp)
	movq	-320(%rbp), %rdi                ## 8-byte Reload
	movq	-344(%rbp), %rsi                ## 8-byte Reload
	movq	%r12, %rdx
	movl	%r15d, %ecx
	movl	%eax, %r8d
	callq	_HLPFILE_AddHotSpotLinks
	movq	-312(%rbp), %r8
	subq	%r12, %r8
	shrq	$2, %r8
	movl	%ebx, (%rsp)
	movl	-324(%rbp), %ebx                ## 4-byte Reload
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%r14d, %ecx
                                        ## kill: def $r8d killed $r8d killed $r8
	movl	%r15d, %r9d
	xorl	%eax, %eax
	callq	_WINE_TRACE
	movslq	%r14d, %rax
	leaq	(%r12,%rax,4), %rdi
	leaq	-336(%rbp), %r8
	movl	%r13d, %esi
	movl	%ebx, %edx
	movl	-328(%rbp), %ecx                ## 4-byte Reload
	callq	_HLPFILE_DecompressGfx
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	-320(%rbp), %rdi                ## 8-byte Reload
	movq	%rax, %rsi
	movl	%ebx, %edx
	callq	_HLPFILE_RtfAddHexBytes
	testq	%rax, %rax
	movl	$0, %ebx
	je	LBB0_5
## %bb.4:
	leaq	L_.str.3(%rip), %rsi
	movq	-320(%rbp), %rdi                ## 8-byte Reload
	callq	_HLPFILE_RtfAddControl
	xorl	%ebx, %ebx
	testq	%rax, %rax
	setne	%bl
LBB0_5:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	-336(%rbp), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapFree
	jmp	LBB0_6
LBB0_1:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	%ebx, %eax
	addq	$312, %rsp                      ## imm = 0x138
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Loading metafile\n"

L_.str.1:                               ## @.str.1
	.asciz	"{\\pict\\wmetafile%u\\picw%u\\pich%u"

	.comm	_FALSE,4,2                      ## @FALSE
L_.str.2:                               ## @.str.2
	.asciz	"sz=%u csz=%u offs=%u/%u,%u/%u\n"

L_.str.3:                               ## @.str.3
	.asciz	"}"

	.no_dead_strip	_HLPFILE_RtfAddMetaFile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function HLPFILE_RtfAddMetaFile
_HLPFILE_RtfAddMetaFile:                ; @HLPFILE_RtfAddMetaFile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #432
	.cfi_def_cfa_offset 432
	stp	x28, x27, [sp, #336]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #352]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #368]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #384]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #400]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #416]            ; 16-byte Folded Spill
	add	x29, sp, #416
	.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, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	str	xzr, [sp, #56]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_WINE_TRACE
	add	x8, x21, #8
	str	x8, [sp, #64]
	add	x0, sp, #64
	bl	_fetch_ushort
	mov	x23, x0
	ldr	x0, [sp, #64]
	mov	w1, #0
	bl	_GET_USHORT
	mov	x24, x0
	ldr	x0, [sp, #64]
	mov	w1, #2
	bl	_GET_USHORT
	mov	x4, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #72
	mov	x2, x23
	mov	x3, x24
	bl	_sprintf
	add	x1, sp, #72
	mov	x0, x19
	bl	_HLPFILE_RtfAddControl
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [sp, #64]
	add	x8, x8, #16
	str	x8, [sp, #64]
	add	x0, sp, #64
	bl	_fetch_ulong
	mov	x23, x0
	add	x0, sp, #64
	bl	_fetch_ulong
	mov	x24, x0
	add	x0, sp, #64
	bl	_fetch_ulong
	mov	x25, x0
	ldr	x0, [sp, #64]
	mov	w1, #0
	bl	_GET_UINT
	mov	x26, x0
	ldr	x0, [sp, #64]
	mov	w1, #4
	bl	_GET_UINT
	mov	x27, x0
	ldr	x8, [sp, #64]
	add	x8, x8, #32
	str	x8, [sp, #64]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x25
	mov	x4, x27
	bl	_HLPFILE_AddHotSpotLinks
	ldr	x8, [sp, #64]
	sub	x8, x8, x21
	lsr	x8, x8, #2
	stp	x25, x27, [sp, #32]
	stp	x26, x8, [sp, #16]
	stp	x23, x24, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_WINE_TRACE
	add	x0, x21, w26, sxtw #2
	add	x4, sp, #56
	mov	x1, x24
	mov	x2, x23
	mov	x3, x20
	bl	_HLPFILE_DecompressGfx
	cbz	x0, LBB0_4
; %bb.2:
	mov	x1, x0
	mov	x0, x19
	mov	x2, x23
	bl	_HLPFILE_RtfAddHexBytes
	cbz	x0, LBB0_5
; %bb.3:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_HLPFILE_RtfAddControl
	cmp	x0, #0
	cset	w19, ne
	b	LBB0_6
LBB0_4:
Lloh11:
	adrp	x8, _FALSE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh13:
	ldr	w19, [x8]
	b	LBB0_7
LBB0_5:
	mov	w19, #0
LBB0_6:
	bl	_GetProcessHeap
	ldr	x2, [sp, #56]
	mov	w1, #0
	bl	_HeapFree
LBB0_7:
	ldur	x8, [x29, #-88]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x19
	ldp	x29, x30, [sp, #416]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #400]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #384]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #368]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #352]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #336]            ; 16-byte Folded Reload
	add	sp, sp, #432
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Loading metafile\n"

l_.str.1:                               ; @.str.1
	.asciz	"{\\pict\\wmetafile%u\\picw%u\\pich%u"

	.comm	_FALSE,4,2                      ; @FALSE
l_.str.2:                               ; @.str.2
	.asciz	"sz=%u csz=%u offs=%u/%u,%u/%u\n"

l_.str.3:                               ; @.str.3
	.asciz	"}"

	.no_dead_strip	_HLPFILE_RtfAddMetaFile
.subsections_via_symbols
