	.file	"extr_mixer_scarlett_gen2.c_scarlett2_meter_ctl_get.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	scarlett2_meter_ctl_get, @function
scarlett2_meter_ctl_get:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	.cfi_offset 13, -24
	mov	r13, rsi
	push	r12
	push	rbx
	sub	rsp, 24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	rbx, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR SCARLETT2_NUM_METERS[rip]
	mov	rsi, rsp
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L3
.L16:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L16
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L17
.L4:
	mov	r12, rsp
	mov	edi, DWORD PTR 4[rbx]
	mov	rsi, r12
	call	scarlett2_usb_get_meter_levels@PLT
	test	eax, eax
	js	.L1
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	jle	.L8
	mov	rcx, QWORD PTR 0[r13]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edx, DWORD PTR [r12+rax*4]
	mov	DWORD PTR [rcx+rax*4], edx
	add	rax, 1
	cmp	DWORD PTR [rbx], eax
	jg	.L7
.L8:
	xor	eax, eax
.L1:
	mov	rdi, QWORD PTR -40[rbp]
	xor	rdi, QWORD PTR fs:40
	jne	.L18
	lea	rsp, -24[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	scarlett2_meter_ctl_get, .-scarlett2_meter_ctl_get
	.comm	SCARLETT2_NUM_METERS,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_mixer_scarlett_gen2.c_scarlett2_meter_ctl_get.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	scarlett2_meter_ctl_get, %function
scarlett2_meter_ctl_get:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #12
	ldr	r3, .L11
	ldr	r5, [r0]
	ldr	r3, [r3]
	mov	r6, r1
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r4, sp
	ldr	r3, .L11+4
	mov	r1, r4
	ldr	r0, [r5, #4]
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	bl	scarlett2_usb_get_meter_levels
	cmp	r0, #0
	blt	.L1
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L5
	mov	r3, #0
	ldr	r2, [r6]
	sub	r1, r4, #4
	sub	r2, r2, #4
.L4:
	ldr	r0, [r1, #4]!
	add	r3, r3, #1
	str	r0, [r2, #4]!
	ldr	r0, [r5]
	cmp	r0, r3
	bgt	.L4
.L5:
	mov	r0, #0
.L1:
	ldr	r3, .L11+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	SCARLETT2_NUM_METERS
	.word	.LC0
	.size	scarlett2_meter_ctl_get, .-scarlett2_meter_ctl_get
	.comm	SCARLETT2_NUM_METERS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
