	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function HLPFILE_RtfAddGfxByIndex
_HLPFILE_RtfAddGfxByIndex:              ## @HLPFILE_RtfAddGfxByIndex
	.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	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	L_.str(%rip), %rdi
	movl	%edx, %esi
	callq	_WINE_TRACE
	leaq	L_.str.1(%rip), %rsi
	leaq	-64(%rbp), %r12
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_sprintf
	leaq	-72(%rbp), %rdx
	leaq	-80(%rbp), %rcx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_HLPFILE_FindSubFile
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	-72(%rbp), %rdx
	addq	$36, %rdx
	movq	%rdx, -72(%rbp)
	movq	-80(%rbp), %rcx
	subq	%rdx, %rcx
	shrq	$2, %rcx
	movq	%r14, %rdi
	movq	%r15, %rsi
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_HLPFILE_RtfAddGfxByAddr
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str.2(%rip), %rdi
	callq	_WINE_WARN
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Loading picture #%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"|bm%u"

L_.str.2:                               ## @.str.2
	.asciz	"no sub file\n"

	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_HLPFILE_RtfAddGfxByIndex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function HLPFILE_RtfAddGfxByIndex
_HLPFILE_RtfAddGfxByIndex:              ; @HLPFILE_RtfAddGfxByIndex
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x2
	bl	_WINE_TRACE
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #24
	mov	x2, x21
	bl	_sprintf
	add	x1, sp, #24
	add	x2, sp, #16
	add	x3, sp, #8
	mov	x0, x19
	bl	_HLPFILE_FindSubFile
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x8, [sp, #16]
	add	x2, x8, #36
	str	x2, [sp, #16]
	ldr	x8, [sp, #8]
	sub	x8, x8, x2
	lsr	x3, x8, #2
	mov	x0, x20
	mov	x1, x19
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_HLPFILE_RtfAddGfxByAddr
	b	LBB0_3
LBB0_2:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_WINE_WARN
Lloh9:
	adrp	x8, _FALSE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
LBB0_3:
	ldr	x8, [sp, #40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	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
	add	sp, sp, #96
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Loading picture #%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"|bm%u"

l_.str.2:                               ; @.str.2
	.asciz	"no sub file\n"

	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_HLPFILE_RtfAddGfxByIndex
.subsections_via_symbols
