	.file	"extr_g_eli_ctl.c_g_eli_ctl_resume.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"nargs"
.LC1:
	.string	"No '%s' argument."
.LC2:
	.string	"Invalid number of arguments."
.LC3:
	.string	"arg0"
.LC4:
	.string	"No 'arg%u' argument."
.LC5:
	.string	"key"
.LC6:
	.string	"Provider %s is invalid."
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC7:
	.string	"Cannot read metadata from %s (error=%d)."
	.section	.rodata.str1.1
.LC8:
	.string	"No valid keys on %s."
.LC9:
	.string	"Wrong key for %s."
	.section	.rodata.str1.8
	.align 8
.LC10:
	.string	"Cannot decrypt Master Key for %s (error=%d)."
	.section	.rodata.str1.1
.LC11:
	.string	"Using Master Key %u for %s."
.LC12:
	.string	"Device %s is not suspended."
.LC13:
	.string	"Resumed %s."
	.text
	.p2align 4
	.type	g_eli_ctl_resume, @function
g_eli_ctl_resume:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	.cfi_offset 15, -24
	mov	r15, rdi
	push	r14
	push	r13
	push	r12
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, rsi
	push	rbx
	sub	rsp, 88
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR G_ELI_DATAIVKEYLEN[rip]
	mov	rcx, rsp
	mov	r13, rsp
	mov	rbx, rax
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L28:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L28
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L29
.L4:
	xor	eax, eax
	mov	QWORD PTR -88[rbp], rsp
	call	g_topology_assert@PLT
	mov	edx, 4
	lea	rsi, .LC0[rip]
	mov	rdi, r15
	call	gctl_get_paraml@PLT
	test	rax, rax
	je	.L30
	cmp	DWORD PTR [rax], 1
	je	.L7
	lea	rsi, .LC2[rip]
	mov	rdi, r15
	xor	eax, eax
	call	gctl_error@PLT
.L6:
	mov	rsp, r13
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L31
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	lea	rsi, .LC3[rip]
	mov	rdi, r15
	call	gctl_get_asciiparam@PLT
	mov	r14, rax
	test	rax, rax
	je	.L32
	lea	rdx, -64[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, r15
	call	gctl_get_param@PLT
	mov	r9, rax
	test	rax, rax
	je	.L9
	mov	eax, DWORD PTR G_ELI_USERKEYLEN[rip]
	cmp	DWORD PTR -64[rbp], eax
	je	.L10
.L9:
	lea	rdx, .LC5[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, r15
	xor	eax, eax
	call	gctl_error@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L29:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rsi, r14
	mov	rdi, r12
	mov	QWORD PTR -96[rbp], r9
	call	g_eli_find_device@PLT
	mov	r9, QWORD PTR -96[rbp]
	test	rax, rax
	je	.L33
	mov	rdi, QWORD PTR 8[rax]
	mov	QWORD PTR -112[rbp], r9
	mov	QWORD PTR -104[rbp], rax
	call	LIST_FIRST@PLT
	lea	r10, -68[rbp]
	mov	rdi, r12
	mov	rsi, QWORD PTR [rax]
	mov	rdx, r10
	mov	QWORD PTR -96[rbp], r10
	mov	QWORD PTR -120[rbp], rsi
	call	g_eli_read_metadata@PLT
	mov	r10, QWORD PTR -96[rbp]
	mov	r11, QWORD PTR -104[rbp]
	test	eax, eax
	mov	r9, QWORD PTR -112[rbp]
	jne	.L34
	mov	eax, DWORD PTR -68[rbp]
	test	eax, eax
	je	.L35
	mov	rdx, QWORD PTR -88[rbp]
	mov	rdi, r10
	mov	rsi, r9
	lea	rcx, -60[rbp]
	mov	QWORD PTR -112[rbp], r11
	mov	QWORD PTR -96[rbp], r10
	mov	QWORD PTR -104[rbp], r9
	call	g_eli_mkey_decrypt_any@PLT
	mov	r9, QWORD PTR -104[rbp]
	mov	esi, DWORD PTR -64[rbp]
	mov	r12d, eax
	mov	rdi, r9
	call	explicit_bzero@PLT
	cmp	r12d, -1
	mov	r10, QWORD PTR -96[rbp]
	mov	r11, QWORD PTR -112[rbp]
	je	.L36
	test	r12d, r12d
	jg	.L37
	mov	rax, QWORD PTR -120[rbp]
	movsx	rdx, DWORD PTR -60[rbp]
	lea	rsi, .LC11[rip]
	mov	edi, 1
	mov	QWORD PTR -104[rbp], r10
	mov	rcx, QWORD PTR [rax]
	xor	eax, eax
	mov	QWORD PTR -96[rbp], r11
	call	G_ELI_DEBUG@PLT
	mov	r11, QWORD PTR -96[rbp]
	lea	r12, 4[r11]
	mov	rdi, r12
	call	mtx_lock@PLT
	mov	r11, QWORD PTR -96[rbp]
	mov	r10, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR [r11]
	test	DWORD PTR G_ELI_FLAG_SUSPEND[rip], eax
	jne	.L16
	mov	rdx, r14
	lea	rsi, .LC12[rip]
	mov	rdi, r15
	xor	eax, eax
	mov	QWORD PTR -96[rbp], r10
	call	gctl_error@PLT
	mov	r10, QWORD PTR -96[rbp]
.L17:
	mov	rdi, r12
	mov	QWORD PTR -96[rbp], r10
	call	mtx_unlock@PLT
	mov	rdi, QWORD PTR -88[rbp]
	lea	esi, 0[0+rbx*4]
	call	explicit_bzero@PLT
	mov	r10, QWORD PTR -96[rbp]
	mov	esi, 4
	mov	rdi, r10
	call	explicit_bzero@PLT
	mov	rsp, r13
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L30:
	lea	rdx, .LC0[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, r15
	call	gctl_error@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L32:
	xor	edx, edx
	lea	rsi, .LC4[rip]
	mov	rdi, r15
	xor	eax, eax
	call	gctl_error@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L35:
	mov	rdi, r10
	mov	esi, 4
	call	explicit_bzero@PLT
	mov	rax, QWORD PTR -120[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, r15
	mov	rdx, QWORD PTR [rax]
	xor	eax, eax
	call	gctl_error@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L33:
	mov	rdx, r14
	lea	rsi, .LC6[rip]
	mov	rdi, r15
	xor	eax, eax
	call	gctl_error@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L34:
	mov	ecx, eax
	mov	rdx, r14
	lea	rsi, .LC7[rip]
	mov	rdi, r15
	xor	eax, eax
	call	gctl_error@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L37:
	mov	rdi, r10
	mov	esi, 4
	call	explicit_bzero@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	ecx, r12d
	mov	rdi, r15
	lea	rsi, .LC10[rip]
	mov	rdx, QWORD PTR [rax]
	xor	eax, eax
	call	gctl_error@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rsi, QWORD PTR -88[rbp]
	mov	rdi, r11
	mov	QWORD PTR -104[rbp], r10
	mov	QWORD PTR -96[rbp], r11
	call	g_eli_mkey_propagate@PLT
	mov	eax, DWORD PTR G_ELI_FLAG_SUSPEND[rip]
	mov	r11, QWORD PTR -96[rbp]
	lea	rsi, .LC13[rip]
	mov	edi, 1
	not	eax
	and	DWORD PTR [r11], eax
	mov	rax, QWORD PTR -120[rbp]
	mov	rdx, QWORD PTR [rax]
	xor	eax, eax
	call	G_ELI_DEBUG@PLT
	mov	r11, QWORD PTR -96[rbp]
	mov	rdi, r11
	call	wakeup@PLT
	mov	r10, QWORD PTR -104[rbp]
	jmp	.L17
.L36:
	mov	rdi, r10
	mov	esi, 4
	call	explicit_bzero@PLT
	mov	rax, QWORD PTR -120[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, r15
	mov	rdx, QWORD PTR [rax]
	xor	eax, eax
	call	gctl_error@PLT
	jmp	.L6
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	g_eli_ctl_resume, .-g_eli_ctl_resume
	.comm	G_ELI_USERKEYLEN,4,4
	.comm	G_ELI_FLAG_SUSPEND,4,4
	.comm	G_ELI_DATAIVKEYLEN,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_g_eli_ctl.c_g_eli_ctl_resume.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"nargs\000"
	.align	2
.LC1:
	.ascii	"No '%s' argument.\000"
	.align	2
.LC2:
	.ascii	"Invalid number of arguments.\000"
	.align	2
.LC3:
	.ascii	"arg0\000"
	.align	2
.LC4:
	.ascii	"No 'arg%u' argument.\000"
	.align	2
.LC5:
	.ascii	"key\000"
	.align	2
.LC6:
	.ascii	"Provider %s is invalid.\000"
	.align	2
.LC7:
	.ascii	"Cannot read metadata from %s (error=%d).\000"
	.align	2
.LC8:
	.ascii	"No valid keys on %s.\000"
	.align	2
.LC9:
	.ascii	"Wrong key for %s.\000"
	.align	2
.LC10:
	.ascii	"Cannot decrypt Master Key for %s (error=%d).\000"
	.align	2
.LC11:
	.ascii	"Using Master Key %u for %s.\000"
	.align	2
.LC12:
	.ascii	"Device %s is not suspended.\000"
	.align	2
.LC13:
	.ascii	"Resumed %s.\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	g_eli_ctl_resume, %function
g_eli_ctl_resume:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #28
	mov	r4, r0
	ldr	r3, .L31
	mov	r8, sp
	ldr	r5, [r3]
	mov	r6, r1
	lsl	r5, r5, #2
	add	r3, r5, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L31+4
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bl	g_topology_assert
	mov	r0, r4
	mov	r2, #4
	ldr	r1, .L31+8
	bl	gctl_get_paraml
	cmp	r0, #0
	beq	.L22
	ldr	r3, [r0]
	cmp	r3, #1
	bne	.L23
	mov	r0, r4
	ldr	r1, .L31+12
	bl	gctl_get_asciiparam
	subs	r7, r0, #0
	beq	.L24
	mov	r0, r4
	ldr	r1, .L31+16
	sub	r2, fp, #48
	bl	gctl_get_param
	subs	r9, r0, #0
	beq	.L6
	ldr	r3, .L31+20
	ldr	r2, [fp, #-48]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L7
.L6:
	mov	r0, r4
	ldr	r2, .L31+16
	ldr	r1, .L31+24
	bl	gctl_error
.L3:
	mov	sp, r8
.L1:
	ldr	r3, .L31+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L23:
	mov	r0, r4
	ldr	r1, .L31+28
	bl	gctl_error
	b	.L3
.L7:
	mov	r1, r7
	mov	r0, r6
	bl	g_eli_find_device
	subs	r3, r0, #0
	str	r3, [fp, #-56]
	beq	.L26
	ldr	r3, [fp, #-56]
	ldr	r0, [r3, #8]
	bl	LIST_FIRST
	ldr	r3, [r0]
	sub	r2, fp, #52
	mov	r1, r3
	mov	r0, r6
	str	r3, [fp, #-60]
	bl	g_eli_read_metadata
	subs	r3, r0, #0
	bne	.L27
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	beq	.L28
	mov	r10, sp
	mov	r1, r9
	mov	r2, r10
	sub	r3, fp, #44
	sub	r0, fp, #52
	bl	g_eli_mkey_decrypt_any
	mov	r6, r0
	ldr	r1, [fp, #-48]
	mov	r0, r9
	bl	explicit_bzero
	cmn	r6, #1
	beq	.L29
	cmp	r6, #0
	bgt	.L30
	ldr	ip, [fp, #-56]
	ldr	r3, [fp, #-60]
	add	r6, ip, #4
	ldr	r3, [r3]
	ldr	r2, [fp, #-44]
	ldr	r1, .L31+32
	mov	r0, #1
	bl	G_ELI_DEBUG
	mov	r0, r6
	bl	mtx_lock
	ldr	r9, .L31+36
	ldr	ip, [fp, #-56]
	ldr	r3, [r9]
	ldr	r2, [ip]
	tst	r2, r3
	bne	.L13
	mov	r2, r7
	mov	r0, r4
	ldr	r1, .L31+40
	bl	gctl_error
.L14:
	mov	r0, r6
	bl	mtx_unlock
	mov	r1, r5
	mov	r0, r10
	bl	explicit_bzero
	mov	r1, #4
	sub	r0, fp, #52
	bl	explicit_bzero
	mov	sp, r8
	b	.L1
.L22:
	mov	r0, r4
	ldr	r2, .L31+8
	ldr	r1, .L31+24
	bl	gctl_error
	b	.L3
.L24:
	mov	r2, r7
	mov	r0, r4
	ldr	r1, .L31+44
	bl	gctl_error
	b	.L3
.L28:
	mov	r1, #4
	sub	r0, fp, #52
	bl	explicit_bzero
	ldr	r3, [fp, #-60]
	mov	r0, r4
	ldr	r2, [r3]
	ldr	r1, .L31+48
	bl	gctl_error
	b	.L3
.L26:
	mov	r2, r7
	mov	r0, r4
	ldr	r1, .L31+52
	bl	gctl_error
	b	.L3
.L27:
	mov	r2, r7
	mov	r0, r4
	ldr	r1, .L31+56
	bl	gctl_error
	b	.L3
.L30:
	mov	r1, #4
	sub	r0, fp, #52
	bl	explicit_bzero
	ldr	r2, [fp, #-60]
	mov	r3, r6
	mov	r0, r4
	ldr	r2, [r2]
	ldr	r1, .L31+60
	bl	gctl_error
	b	.L3
.L13:
	ldr	r4, [fp, #-56]
	mov	r1, r10
	mov	r0, r4
	bl	g_eli_mkey_propagate
	ldr	r1, [r9]
	ldr	r3, [r4]
	ldr	r2, [fp, #-60]
	bic	r3, r3, r1
	ldr	r2, [r2]
	ldr	r1, .L31+64
	str	r3, [r4]
	mov	r0, #1
	bl	G_ELI_DEBUG
	mov	r0, r4
	bl	wakeup
	b	.L14
.L29:
	mov	r1, #4
	sub	r0, fp, #52
	bl	explicit_bzero
	ldr	r3, [fp, #-60]
	mov	r0, r4
	ldr	r2, [r3]
	ldr	r1, .L31+68
	bl	gctl_error
	b	.L3
.L25:
	bl	__stack_chk_fail
.L32:
	.align	2
.L31:
	.word	G_ELI_DATAIVKEYLEN
	.word	.LC14
	.word	.LC0
	.word	.LC3
	.word	.LC5
	.word	G_ELI_USERKEYLEN
	.word	.LC1
	.word	.LC2
	.word	.LC11
	.word	G_ELI_FLAG_SUSPEND
	.word	.LC12
	.word	.LC4
	.word	.LC8
	.word	.LC6
	.word	.LC7
	.word	.LC10
	.word	.LC13
	.word	.LC9
	.size	g_eli_ctl_resume, .-g_eli_ctl_resume
	.comm	G_ELI_USERKEYLEN,4,4
	.comm	G_ELI_FLAG_SUSPEND,4,4
	.comm	G_ELI_DATAIVKEYLEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
