	.file	"extr_ui_shared.c_Menus_Activate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	Menus_Activate
	.type	Menus_Activate, @function
Menus_Activate:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rbx, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 32
	mov	rsi, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR WINDOW_HASFOCUS[rip]
	or	eax, DWORD PTR WINDOW_VISIBLE[rip]
	or	DWORD PTR 16[rdi], eax
	test	rsi, rsi
	jne	.L13
.L2:
	mov	rdi, QWORD PTR [rbx]
	test	rdi, rdi
	je	.L3
	cmp	QWORD PTR [rdi], 0
	jne	.L14
.L3:
	xor	eax, eax
	call	Display_CloseCinematics@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L15
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	rax, QWORD PTR DC[rip]
	mov	rsi, rdi
	call	[QWORD PTR [rax]]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	mov	QWORD PTR [rsp], rdi
	mov	rdi, rsp
	call	Item_RunScript@PLT
	jmp	.L2
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	Menus_Activate, .-Menus_Activate
	.comm	WINDOW_VISIBLE,4,4
	.comm	WINDOW_HASFOCUS,4,4
	.comm	DC,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ui_shared.c_Menus_Activate.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	Menus_Activate
	.syntax unified
	.arm
	.fpu softvfp
	.type	Menus_Activate, %function
Menus_Activate:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	mov	r4, r0
	ldr	r3, .L19
	ldr	r2, .L19+4
	ldr	r0, [r3]
	ldr	r2, [r2]
	ldmib	r4, {r1, r3}
	orr	r2, r2, r0
	orr	r3, r3, r2
	ldr	r2, .L19+8
	sub	sp, sp, #8
	cmp	r1, #0
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	str	r3, [r4, #8]
	bne	.L16
.L2:
	ldr	r1, [r4]
	cmp	r1, #0
	beq	.L3
	ldr	r3, [r1]
	cmp	r3, #0
	bne	.L17
.L3:
	bl	Display_CloseCinematics
	ldr	r3, .L19+8
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	add	sp, sp, #8
	@ sp needed
	pop	{r4, pc}
.L17:
	ldr	r3, .L19+12
	mov	r0, r1
	ldr	r3, [r3]
	ldr	r3, [r3]
	blx	r3
	b	.L3
.L16:
	mov	r0, sp
	str	r4, [sp]
	bl	Item_RunScript
	b	.L2
.L18:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	WINDOW_VISIBLE
	.word	WINDOW_HASFOCUS
	.word	.LC0
	.word	DC
	.size	Menus_Activate, .-Menus_Activate
	.comm	WINDOW_VISIBLE,4,4
	.comm	WINDOW_HASFOCUS,4,4
	.comm	DC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
