	.file	"extr_scsi_enc_ses.c_ses_get_elm_devnames.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ses_get_elm_devnames, @function
ses_get_elm_devnames:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	r12d, DWORD PTR [rsi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR EINVAL[rip]
	test	r12d, r12d
	js	.L1
	mov	r13, rdi
	mov	edi, DWORD PTR [rdi]
	mov	rbx, rsi
	lea	rbp, 4[rsp]
	call	cam_periph_unlock@PLT
	mov	ecx, DWORD PTR SBUF_FIXEDLEN[rip]
	mov	edx, r12d
	xor	esi, esi
	mov	rdi, rbp
	call	sbuf_new@PLT
	mov	rdx, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 8[r13]
	mov	rcx, rbp
	mov	rdi, r13
	lea	rsi, [rax+rdx*4]
	mov	edx, DWORD PTR ses_elmdevname_callback[rip]
	call	ses_paths_iter@PLT
	mov	rdi, rbp
	call	sbuf_finish@PLT
	mov	rdi, rbp
	call	sbuf_len@PLT
	mov	r14d, DWORD PTR 24[rbx]
	mov	rdi, rbp
	mov	QWORD PTR 16[rbx], rax
	mov	r12, rax
	call	sbuf_data@PLT
	lea	rdx, 1[r12]
	mov	esi, r14d
	mov	edi, eax
	call	copyout@PLT
	mov	rdi, rbp
	call	sbuf_delete@PLT
	mov	edi, DWORD PTR 0[r13]
	call	cam_periph_lock@PLT
	xor	eax, eax
	cmp	QWORD PTR 16[rbx], 0
	jle	.L8
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L9
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.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
.L8:
	.cfi_restore_state
	mov	eax, DWORD PTR ENODEV[rip]
	jmp	.L1
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ses_get_elm_devnames, .-ses_get_elm_devnames
	.comm	ses_elmdevname_callback,4,4
	.comm	SBUF_FIXEDLEN,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,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_scsi_enc_ses.c_ses_get_elm_devnames.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ses_get_elm_devnames, %function
ses_get_elm_devnames:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r6, [r1]
	ldr	r3, .L10
	sub	sp, sp, #8
	cmp	r6, #0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	blt	.L8
	mov	r4, r1
	mov	r5, r0
	ldr	r0, [r0]
	bl	cam_periph_unlock
	ldr	r3, .L10+4
	mov	r2, r6
	mov	r1, #0
	ldr	r3, [r3]
	mov	r0, sp
	bl	sbuf_new
	ldr	r0, [r4, #4]
	ldr	r1, [r5, #4]
	ldr	r2, .L10+8
	add	r1, r1, r0, lsl #2
	ldr	r2, [r2]
	mov	r3, sp
	mov	r0, r5
	bl	ses_paths_iter
	mov	r0, sp
	bl	sbuf_finish
	mov	r0, sp
	bl	sbuf_len
	mov	r3, r0
	mov	r0, sp
	str	r3, [r4, #8]
	bl	sbuf_data
	ldr	r2, [r4, #8]
	ldr	r1, [r4, #12]
	add	r2, r2, #1
	bl	copyout
	mov	r0, sp
	bl	sbuf_delete
	ldr	r0, [r5]
	bl	cam_periph_lock
	ldr	r3, [r4, #8]
	cmp	r3, #0
	movgt	r0, #0
	ldrle	r3, .L10+12
	ldrle	r0, [r3]
.L1:
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L8:
	ldr	r3, .L10+16
	ldr	r0, [r3]
	b	.L1
.L9:
	bl	__stack_chk_fail
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	SBUF_FIXEDLEN
	.word	ses_elmdevname_callback
	.word	ENODEV
	.word	EINVAL
	.size	ses_get_elm_devnames, .-ses_get_elm_devnames
	.comm	ses_elmdevname_callback,4,4
	.comm	SBUF_FIXEDLEN,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
