	.file	"extr_aachba.c_aac_construct_hbacmd.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	aac_construct_hbacmd, @function
aac_construct_hbacmd:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	edx, 96
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rax, QWORD PTR 16[rsi]
	xor	esi, esi
	mov	r12, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, r12
	mov	r14, QWORD PTR [rax]
	call	memset@PLT
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, 128
	je	.L2
	sub	eax, 130
	cmp	eax, 1
	ja	.L3
	mov	DWORD PTR [r12], 1
.L3:
	mov	rax, QWORD PTR 16[rbp]
	mov	rbx, QWORD PTR 48[r12]
	mov	edi, DWORD PTR [rax]
	call	cpu_to_le32@PLT
	mov	rdi, rbp
	mov	QWORD PTR 8[rbx], rax
	call	scmd_channel@PLT
	mov	edi, eax
	call	aac_logical_to_phys@PLT
	mov	rdi, rbp
	movsx	rbx, eax
	call	scmd_id@PLT
	mov	rdx, QWORD PTR [r14]
	mov	esi, DWORD PTR 8[rbp]
	cdqe
	mov	edi, DWORD PTR 40[r12]
	mov	rdx, QWORD PTR [rdx+rbx*8]
	mov	eax, DWORD PTR [rdx+rax*4]
	mov	edx, DWORD PTR 4[rbp]
	mov	DWORD PTR 44[r12], eax
	call	memcpy@PLT
	mov	rdi, rbp
	call	scsi_bufflen@PLT
	mov	edi, eax
	call	cpu_to_le32@PLT
	mov	rbx, QWORD PTR 0[r13]
	mov	ecx, 32
	mov	QWORD PTR 32[r12], rax
	mov	edi, ebx
	sar	edi, cl
	call	cpu_to_le32@PLT
	mov	edi, ebx
	mov	QWORD PTR 24[r12], rax
	call	cpu_to_le32@PLT
	mov	edi, DWORD PTR FW_ERROR_BUFFER_SIZE[rip]
	mov	QWORD PTR 16[r12], rax
	call	cpu_to_le32@PLT
	mov	QWORD PTR 8[r12], rax
	mov	rax, r12
	pop	rbx
	.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
.L2:
	.cfi_restore_state
	mov	DWORD PTR [r12], 2
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	aac_construct_hbacmd, .-aac_construct_hbacmd
	.comm	FW_ERROR_BUFFER_SIZE,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_aachba.c_aac_construct_hbacmd.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	aac_construct_hbacmd, %function
aac_construct_hbacmd:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r1
	ldr	r5, [r0, #4]
	mov	r2, #96
	mov	r0, r5
	mov	r1, #0
	bl	memset
	ldr	r3, [r4]
	cmp	r3, #128
	beq	.L2
	sub	r3, r3, #130
	cmp	r3, #1
	movls	r3, #1
	strls	r3, [r5]
.L3:
	ldr	r3, [r4, #12]
	ldr	r0, [r3]
	bl	cpu_to_le32
	mov	r3, #0
	str	r0, [r3, #4]
	.inst	0xe7f000f0
.L2:
	mov	r3, #2
	str	r3, [r5]
	b	.L3
	.size	aac_construct_hbacmd, .-aac_construct_hbacmd
	.comm	FW_ERROR_BUFFER_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
