	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dochost_object_available       ## -- Begin function dochost_object_available
	.p2align	4, 0x90
_dochost_object_available:              ## @dochost_object_available
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_IUnknown_AddRef
	movq	%rbx, 16(%r14)
	movq	_IID_IOleObject@GOTPCREL(%rip), %rsi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_IUnknown_QueryInterface
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	-32(%rbp), %rdi
	leaq	-24(%rbp), %rsi
	callq	_IOleObject_GetUserClassID
	movl	%eax, %edi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	_CLSID_HTMLDocument@GOTPCREL(%rip), %rsi
	leaq	-24(%rbp), %rdi
	callq	_IsEqualGUID
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_9:
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %esi
	callq	_FIXME
	jmp	LBB0_10
LBB0_4:
	leaq	-24(%rbp), %rdi
	callq	_debugstr_guid
	movq	%rax, %rsi
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_TRACE
LBB0_6:
	movq	-32(%rbp), %rdi
	leaq	8(%r14), %rsi
	callq	_IOleObject_SetClientSite
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	callq	_FIXME
LBB0_8:
	movq	-32(%rbp), %rdi
	callq	_IOleObject_Release
LBB0_10:
	movl	$4, %edi
	callq	_heap_alloc
	movq	_object_available_proc@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_object_available_task_destr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_FALSE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_push_dochost_task
	leaq	-24(%rbp), %rsi
	movq	%r14, %rdi
	callq	_get_doc_ready_state
	movl	%eax, %edi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_16
## %bb.11:
	movq	-24(%rbp), %rsi
	movq	_READYSTATE_COMPLETE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	cmpq	%rax, %rsi
	jne	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_push_ready_state_task
	movq	-24(%rbp), %rsi
	movq	(%rbx), %rax
LBB0_13:
	cmpq	%rax, %rsi
	jne	LBB0_15
## %bb.14:
	cmpq	$0, (%r14)
	je	LBB0_18
LBB0_15:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_advise_prop_notif
	jmp	LBB0_18
LBB0_16:
	cmpq	$0, (%r14)
	jne	LBB0_18
## %bb.17:
	movq	_READYSTATE_COMPLETE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_push_ready_state_task
LBB0_18:
	movq	_S_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IID_IOleObject,4,2             ## @IID_IOleObject
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Got clsid %s\n"

	.comm	_CLSID_HTMLDocument,4,2         ## @CLSID_HTMLDocument
L_.str.1:                               ## @.str.1
	.asciz	"CLSID_HTMLDocument"

L_.str.2:                               ## @.str.2
	.asciz	"SetClientSite failed: %08x\n"

L_.str.3:                               ## @.str.3
	.asciz	"Could not get IOleObject iface: %08x\n"

	.comm	_object_available_proc,4,2      ## @object_available_proc
	.comm	_object_available_task_destr,4,2 ## @object_available_task_destr
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_READYSTATE_COMPLETE,8,3        ## @READYSTATE_COMPLETE
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_S_OK,4,2                       ## @S_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dochost_object_available       ; -- Begin function dochost_object_available
	.p2align	2
_dochost_object_available:              ; @dochost_object_available
	.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	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_IUnknown_AddRef
	str	x20, [x19, #16]
Lloh0:
	adrp	x1, _IID_IOleObject@GOTPAGE
Lloh1:
	ldr	x1, [x1, _IID_IOleObject@GOTPAGEOFF]
	mov	x2, sp
	mov	x0, x20
	bl	_IUnknown_QueryInterface
	mov	x20, x0
	bl	_SUCCEEDED
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x0, [sp]
	add	x1, sp, #8
	bl	_IOleObject_GetUserClassID
	bl	_SUCCEEDED
	cbz	x0, LBB0_7
; %bb.2:
Lloh2:
	adrp	x1, _CLSID_HTMLDocument@GOTPAGE
Lloh3:
	ldr	x1, [x1, _CLSID_HTMLDocument@GOTPAGEOFF]
	add	x0, sp, #8
	bl	_IsEqualGUID
	cbz	x0, LBB0_5
; %bb.3:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	bl	_FIXME
	b	LBB0_10
LBB0_5:
	add	x0, sp, #8
	bl	_debugstr_guid
	mov	x1, x0
LBB0_6:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
LBB0_7:
	ldr	x0, [sp]
	add	x1, x19, #8
	bl	_IOleObject_SetClientSite
	mov	x20, x0
	bl	_FAILED
	cbz	x0, LBB0_9
; %bb.8:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_FIXME
LBB0_9:
	ldr	x0, [sp]
	bl	_IOleObject_Release
LBB0_10:
	mov	w0, #4
	bl	_heap_alloc
	mov	x1, x0
Lloh12:
	adrp	x8, _object_available_proc@GOTPAGE
Lloh13:
	ldr	x8, [x8, _object_available_proc@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x8, _object_available_task_destr@GOTPAGE
Lloh16:
	ldr	x8, [x8, _object_available_task_destr@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
Lloh18:
	adrp	x8, _FALSE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh20:
	ldr	w4, [x8]
	mov	x0, x19
	bl	_push_dochost_task
	add	x1, sp, #8
	mov	x0, x19
	bl	_get_doc_ready_state
	bl	_SUCCEEDED
	cbz	x0, LBB0_16
; %bb.11:
	ldr	x1, [sp, #8]
Lloh21:
	adrp	x20, _READYSTATE_COMPLETE@GOTPAGE
Lloh22:
	ldr	x20, [x20, _READYSTATE_COMPLETE@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x1, x8
	b.ne	LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_push_ready_state_task
	ldr	x1, [sp, #8]
	ldr	x8, [x20]
LBB0_13:
	cmp	x1, x8
	b.ne	LBB0_15
; %bb.14:
	ldr	x8, [x19]
	cbz	x8, LBB0_18
LBB0_15:
Lloh23:
	adrp	x8, _TRUE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_advise_prop_notif
	b	LBB0_18
LBB0_16:
	ldr	x8, [x19]
	cbnz	x8, LBB0_18
; %bb.17:
Lloh26:
	adrp	x8, _READYSTATE_COMPLETE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _READYSTATE_COMPLETE@GOTPAGEOFF]
Lloh28:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_push_ready_state_task
LBB0_18:
Lloh29:
	adrp	x8, _S_OK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_IID_IOleObject,4,2             ; @IID_IOleObject
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Got clsid %s\n"

	.comm	_CLSID_HTMLDocument,4,2         ; @CLSID_HTMLDocument
l_.str.1:                               ; @.str.1
	.asciz	"CLSID_HTMLDocument"

l_.str.2:                               ; @.str.2
	.asciz	"SetClientSite failed: %08x\n"

l_.str.3:                               ; @.str.3
	.asciz	"Could not get IOleObject iface: %08x\n"

	.comm	_object_available_proc,4,2      ; @object_available_proc
	.comm	_object_available_task_destr,4,2 ; @object_available_task_destr
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_READYSTATE_COMPLETE,8,3        ; @READYSTATE_COMPLETE
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_S_OK,4,2                       ; @S_OK
.subsections_via_symbols
