	.file	"extr_pm8001_hwi.c_pm8001_chip_smp_req.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pm8001_chip_smp_req, @function
pm8001_chip_smp_req:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	edx, 40
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	r12, QWORD PTR 8[rsi]
	xor	esi, esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	lea	r13, 16[rsp]
	mov	rax, QWORD PTR 8[r12]
	mov	rdi, r13
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rsp], rax
	call	memset@PLT
	mov	ecx, DWORD PTR DMA_TO_DEVICE[rip]
	mov	edi, DWORD PTR [rbx]
	mov	rsi, r12
	mov	edx, 1
	call	dma_map_sg@PLT
	test	eax, eax
	jne	.L2
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, r12
	lea	r14, 4[r12]
	call	sg_dma_len@PLT
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	edi, DWORD PTR [rbx]
	mov	rsi, r14
	mov	edx, 1
	mov	r15d, eax
	call	dma_map_sg@PLT
	test	eax, eax
	jne	.L4
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
.L5:
	mov	rsi, QWORD PTR 8[rbp]
	mov	ecx, DWORD PTR DMA_TO_DEVICE[rip]
	mov	edx, 1
	mov	edi, DWORD PTR [rbx]
	call	dma_unmap_sg@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, r14
	call	sg_dma_len@PLT
	or	r15d, eax
	and	r15d, 3
	je	.L6
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L7:
	mov	rax, QWORD PTR 8[rbp]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	edx, 1
	mov	edi, DWORD PTR [rbx]
	lea	rsi, 4[rax]
	call	dma_unmap_sg@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r9d, DWORD PTR OPC_INB_SMP_REQUEST[rip]
	mov	edi, DWORD PTR 0[rbp]
	mov	r15, QWORD PTR 8[rbx]
	mov	DWORD PTR 12[rsp], r9d
	call	cpu_to_le32@PLT
	mov	rdi, r12
	mov	QWORD PTR 16[rsp], rax
	call	sg_dma_address@PLT
	mov	rdi, rax
	call	cpu_to_le64@PLT
	mov	rdi, r12
	mov	QWORD PTR 48[rsp], rax
	call	sg_dma_len@PLT
	lea	edi, -4[rax]
	call	cpu_to_le32@PLT
	mov	rdi, r14
	mov	QWORD PTR 40[rsp], rax
	call	sg_dma_address@PLT
	mov	rdi, rax
	call	cpu_to_le64@PLT
	mov	rdi, r14
	mov	QWORD PTR 32[rsp], rax
	call	sg_dma_len@PLT
	lea	edi, -4[rax]
	call	cpu_to_le32@PLT
	mov	rsi, QWORD PTR 16[rsp]
	mov	rdx, r13
	mov	QWORD PTR 24[rsp], rax
	mov	rax, QWORD PTR [rsp]
	mov	edi, DWORD PTR [rax]
	call	build_smp_cmd@PLT
	mov	r9d, DWORD PTR 12[rsp]
	xor	r8d, r8d
	mov	rcx, r13
	mov	rsi, r15
	mov	rdi, rbx
	mov	edx, r9d
	call	pm8001_mpi_build_cmd@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	jmp	.L7
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pm8001_chip_smp_req, .-pm8001_chip_smp_req
	.comm	OPC_INB_SMP_REQUEST,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_FROM_DEVICE,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_pm8001_hwi.c_pm8001_chip_smp_req.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pm8001_chip_smp_req, %function
pm8001_chip_smp_req:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r6, [r1, #4]
	ldr	r7, .L15
	ldr	lr, [r6, #8]
	ldr	r8, .L15+4
	sub	sp, sp, #44
	mov	r5, r1
	mov	r4, r0
	mov	r1, r6
	mov	r2, #1
	ldr	r0, [r0]
	ldr	r3, [r7]
	ldr	r8, [r8]
	str	r8, [sp, #36]
	mov	r8,#0
	ldr	r9, [lr]
	str	ip, [sp, #16]
	str	ip, [sp, #20]
	str	ip, [sp, #24]
	str	ip, [sp, #28]
	str	ip, [sp, #32]
	bl	dma_map_sg
	cmp	r0, #0
	bne	.L2
	ldr	r3, .L15+8
	ldr	r6, [r3]
	rsb	r6, r6, #0
.L1:
	ldr	r3, .L15+4
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r6
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r0, r6
	bl	sg_dma_len
	ldr	r8, .L15+12
	add	fp, r6, #4
	mov	r10, r0
	mov	r1, fp
	mov	r2, #1
	ldr	r3, [r8]
	ldr	r0, [r4]
	bl	dma_map_sg
	cmp	r0, #0
	bne	.L4
	ldr	r3, .L15+8
	ldr	r6, [r3]
	rsb	r6, r6, #0
.L5:
	mov	r2, #1
	ldr	r3, [r7]
	ldr	r1, [r5, #4]
	ldr	r0, [r4]
	bl	dma_unmap_sg
	b	.L1
.L4:
	mov	r0, fp
	bl	sg_dma_len
	orr	r10, r0, r10
	ands	r10, r10, #3
	beq	.L6
	ldr	r3, .L15+16
	ldr	r6, [r3]
	rsb	r6, r6, #0
.L7:
	ldr	r1, [r5, #4]
	mov	r2, #1
	ldr	r3, [r8]
	ldr	r0, [r4]
	add	r1, r1, #4
	bl	dma_unmap_sg
	b	.L5
.L6:
	ldr	r3, .L15+20
	ldr	r0, [r5]
	ldr	r3, [r3]
	str	r3, [sp, #12]
	ldr	r3, [r4, #4]
	str	r3, [sp, #8]
	bl	cpu_to_le32
	mov	r2, r0
	mov	r0, r6
	str	r2, [sp, #16]
	bl	sg_dma_address
	bl	cpu_to_le64
	mov	r2, r0
	mov	r0, r6
	str	r2, [sp, #32]
	bl	sg_dma_len
	sub	r0, r0, #4
	bl	cpu_to_le32
	mov	r2, r0
	mov	r0, fp
	str	r2, [sp, #28]
	bl	sg_dma_address
	bl	cpu_to_le64
	mov	r2, r0
	mov	r0, fp
	str	r2, [sp, #24]
	bl	sg_dma_len
	sub	r0, r0, #4
	bl	cpu_to_le32
	mov	ip, r0
	ldr	r1, [sp, #16]
	ldr	r0, [r9]
	add	r2, sp, #16
	str	ip, [sp, #20]
	bl	build_smp_cmd
	ldr	r3, [sp, #12]
	mov	r0, r4
	mov	r2, r3
	ldr	r1, [sp, #8]
	str	r10, [sp]
	add	r3, sp, #16
	bl	pm8001_mpi_build_cmd
	subs	r6, r0, #0
	beq	.L1
	b	.L7
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	DMA_TO_DEVICE
	.word	.LC0
	.word	ENOMEM
	.word	DMA_FROM_DEVICE
	.word	EINVAL
	.word	OPC_INB_SMP_REQUEST
	.size	pm8001_chip_smp_req, .-pm8001_chip_smp_req
	.comm	OPC_INB_SMP_REQUEST,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
