	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bind_event_target
_bind_event_target:                     ## @bind_event_target
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	4(%rsi), %esi
	leaq	-48(%rbp), %rdx
	callq	_identifier_eval
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_exprval_to_value
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_9
## %bb.2:
	movl	-44(%rbp), %edi
	callq	_is_object_instance
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	-44(%rbp), %edi
	callq	_debugstr_jsval
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_FIXME
	movl	-44(%rbp), %edi
	callq	_jsval_release
LBB0_4:
	movl	-44(%rbp), %edi
	callq	_get_object
	movq	%rax, %r12
	movq	_IID_IBindEventHandler@GOTPCREL(%rip), %rsi
	leaq	-56(%rbp), %rdx
	movq	%rax, %rdi
	callq	_IDispatch_QueryInterface
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	-56(%rbp), %rdi
	movl	(%r15), %esi
	movq	%r14, %rdx
	callq	_IBindEventHandler_BindHandler
	movl	%eax, %r13d
	movq	-56(%rbp), %rdi
	callq	_IBindEventHandler_Release
	movl	%r13d, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %esi
	callq	_WARN
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_FIXME
LBB0_8:
	movq	%r12, %rdi
	callq	_IDispatch_Release
LBB0_9:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't bind to %s\n"

	.comm	_IID_IBindEventHandler,4,2      ## @IID_IBindEventHandler
L_.str.1:                               ## @.str.1
	.asciz	"BindEvent failed: %08x\n"

L_.str.2:                               ## @.str.2
	.asciz	"No IBindEventHandler, not yet supported binding\n"

	.no_dead_strip	_bind_event_target
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bind_event_target
_bind_event_target:                     ; @bind_event_target
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x2
	mov	x20, x1
	mov	x22, x0
	ldr	w1, [x1, #4]
	add	x2, sp, #20
	bl	_identifier_eval
	mov	x21, x0
	bl	_FAILED
	cbnz	x0, LBB0_9
; %bb.1:
	add	x1, sp, #20
	add	x2, sp, #16
	mov	x0, x22
	bl	_exprval_to_value
	mov	x21, x0
	bl	_FAILED
	cbnz	x0, LBB0_9
; %bb.2:
	ldr	w0, [sp, #16]
	bl	_is_object_instance
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w0, [sp, #16]
	bl	_debugstr_jsval
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FIXME
	ldr	w0, [sp, #16]
	bl	_jsval_release
LBB0_4:
	ldr	w0, [sp, #16]
	bl	_get_object
	mov	x22, x0
Lloh2:
	adrp	x1, _IID_IBindEventHandler@GOTPAGE
Lloh3:
	ldr	x1, [x1, _IID_IBindEventHandler@GOTPAGEOFF]
	add	x2, sp, #24
	bl	_IDispatch_QueryInterface
	mov	x21, x0
	bl	_SUCCEEDED
	cbz	x0, LBB0_7
; %bb.5:
	ldr	x0, [sp, #24]
	ldr	w1, [x20]
	mov	x2, x19
	bl	_IBindEventHandler_BindHandler
	mov	x21, x0
	ldr	x0, [sp, #24]
	bl	_IBindEventHandler_Release
	mov	x0, x21
	bl	_FAILED
	cbz	x0, LBB0_8
; %bb.6:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_WARN
	b	LBB0_8
LBB0_7:
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_FIXME
LBB0_8:
	mov	x0, x22
	bl	_IDispatch_Release
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't bind to %s\n"

	.comm	_IID_IBindEventHandler,4,2      ; @IID_IBindEventHandler
l_.str.1:                               ; @.str.1
	.asciz	"BindEvent failed: %08x\n"

l_.str.2:                               ; @.str.2
	.asciz	"No IBindEventHandler, not yet supported binding\n"

	.no_dead_strip	_bind_event_target
.subsections_via_symbols
