	.file	"extr_en50221.c_MMIHandle.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"unsupported MMI mode %02x"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"unsupported display control command %02x"
	.align 8
.LC2:
	.string	"unexpected tag in MMIHandle (0x%x)"
	.text
	.p2align 4
	.type	MMIHandle, @function
MMIHandle:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, ecx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, esi
	mov	esi, ecx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	mov	rdi, rdx
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	APDUGetTag@PLT
	cmp	eax, 132
	je	.L2
	mov	edx, eax
	jg	.L3
	cmp	eax, 131
	jne	.L15
	mov	ecx, r14d
	mov	rdx, r12
	mov	esi, r13d
	mov	rdi, rbp
	call	MMIHandleEnq@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	cmp	eax, 133
	jne	.L6
	mov	esi, r13d
	mov	rdi, rbp
	call	SessionSendClose@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	cmp	eax, 128
	jg	.L17
.L6:
	mov	edi, DWORD PTR 0[rbp]
	lea	rsi, .LC2[rip]
	call	msg_Err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	lea	rsi, 4[rsp]
	mov	rdi, r12
	call	APDUGetLength@PLT
	mov	edx, DWORD PTR 4[rsp]
	test	edx, edx
	jle	.L1
	mov	r8d, DWORD PTR [rax]
	cmp	r8d, 128
	jne	.L9
	mov	r8d, DWORD PTR 4[rax]
	cmp	edx, 2
	jne	.L10
	cmp	DWORD PTR MM_HIGH_LEVEL[rip], r8d
	jne	.L10
	mov	esi, r13d
	mov	rdi, rbp
	call	MMIDisplayReply@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, r8d
	lea	rsi, .LC0[rip]
	call	msg_Err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	r8d, r14d
	mov	rcx, r12
	mov	esi, r13d
	mov	rdi, rbp
	call	MMIHandleMenu@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, r8d
	lea	rsi, .LC1[rip]
	call	msg_Err@PLT
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	MMIHandle, .-MMIHandle
	.comm	MM_HIGH_LEVEL,4,4
	.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_en50221.c_MMIHandle.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"unsupported MMI mode %02x\000"
	.align	2
.LC1:
	.ascii	"unsupported display control command %02x\000"
	.align	2
.LC2:
	.ascii	"unexpected tag in MMIHandle (0x%x)\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	MMIHandle, %function
MMIHandle:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r5, r3
	mov	r6, r1
	mov	r1, r3
	ldr	r3, .L16
	sub	sp, sp, #20
	mov	r7, r0
	mov	r0, r2
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r4, r2
	bl	APDUGetTag
	sub	r3, r0, #129
	cmp	r3, #4
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L7
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L7:
	mov	r2, r0
	mov	r3, r4
	mov	r1, r6
	mov	r0, r7
	str	r5, [sp]
	bl	MMIHandleMenu
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L6:
	mov	r3, r5
	mov	r2, r4
	mov	r1, r6
	mov	r0, r7
	bl	MMIHandleEnq
	b	.L1
.L5:
	mov	r0, r4
	add	r1, sp, #8
	bl	APDUGetLength
	ldr	r3, [sp, #8]
	cmp	r3, #0
	ble	.L1
	ldr	r2, [r0]
	cmp	r2, #128
	bne	.L9
	cmp	r3, #2
	ldr	r2, [r0, #4]
	bne	.L10
	ldr	r3, .L16+4
	ldr	r3, [r3]
	cmp	r3, r2
	bne	.L10
	mov	r1, r6
	mov	r0, r7
	bl	MMIDisplayReply
	b	.L1
.L3:
	mov	r1, r6
	mov	r0, r7
	bl	SessionSendClose
	b	.L1
.L10:
	ldr	r0, [r7]
	ldr	r1, .L16+8
	bl	msg_Err
	b	.L1
.L9:
	ldr	r0, [r7]
	ldr	r1, .L16+12
	bl	msg_Err
	b	.L1
.L15:
	bl	__stack_chk_fail
.L2:
	mov	r2, r0
	ldr	r1, .L16+16
	ldr	r0, [r7]
	bl	msg_Err
	b	.L1
.L17:
	.align	2
.L16:
	.word	.LC3
	.word	MM_HIGH_LEVEL
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	MMIHandle, .-MMIHandle
	.comm	MM_HIGH_LEVEL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
