	.file	"extr_mtk-cmdq-helper.c_cmdq_mbox_create.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"failed to request channel\n"
	.text
	.p2align 4
	.globl	cmdq_mbox_create
	.type	cmdq_mbox_create, @function
cmdq_mbox_create:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	mov	edi, 48
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	call	kzalloc@PLT
	mov	r12, QWORD PTR ENOMEM[rip]
	neg	r12
	test	rax, rax
	je	.L1
	cmp	QWORD PTR CMDQ_NO_TIMEOUT[rip], rbx
	mov	QWORD PTR 40[rax], rbx
	mov	r12, rax
	jne	.L10
.L4:
	mov	QWORD PTR 16[r12], rbp
	lea	rdi, 8[r12]
	mov	esi, r13d
	mov	QWORD PTR 24[r12], 0
	mov	DWORD PTR 8[r12], 0
	call	mbox_request_channel@PLT
	mov	DWORD PTR [r12], eax
	mov	edi, eax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L11
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	lea	rdi, 36[rax]
	call	spin_lock_init@PLT
	mov	esi, DWORD PTR cmdq_client_timeout[rip]
	lea	rdi, 32[r12]
	xor	edx, edx
	call	timer_setup@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	dev_err@PLT
	mov	edi, DWORD PTR [r12]
	call	PTR_ERR@PLT
	mov	rdi, r12
	mov	rbp, rax
	call	kfree@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	ERR_PTR@PLT
	.cfi_endproc
.LFE0:
	.size	cmdq_mbox_create, .-cmdq_mbox_create
	.comm	cmdq_client_timeout,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,8,8
	.comm	CMDQ_NO_TIMEOUT,8,8
	.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_mtk-cmdq-helper.c_cmdq_mbox_create.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to request channel\012\000"
	.text
	.align	2
	.global	cmdq_mbox_create
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmdq_mbox_create, %function
cmdq_mbox_create:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r1
	ldr	r1, .L13
	mov	r6, r0
	ldr	r1, [r1]
	mov	r0, #28
	mov	r5, r2
	bl	kzalloc
	subs	r4, r0, #0
	beq	.L10
	ldr	r3, .L13+4
	str	r5, [r4, #24]
	ldr	r3, [r3]
	cmp	r3, r5
	bne	.L11
.L4:
	mov	r3, #0
	mov	r0, r4
	str	r3, [r4, #12]
	mov	r1, r7
	str	r6, [r4, #8]
	str	r3, [r0, #4]!
	bl	mbox_request_channel
	str	r0, [r4]
	bl	IS_ERR
	cmp	r0, #0
	bne	.L12
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	add	r0, r4, #20
	bl	spin_lock_init
	ldr	r3, .L13+8
	mov	r2, #0
	ldr	r1, [r3]
	add	r0, r4, #16
	bl	timer_setup
	b	.L4
.L10:
	ldr	r3, .L13+12
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r1, .L13+16
	mov	r0, r6
	bl	dev_err
	ldr	r0, [r4]
	bl	PTR_ERR
	mov	r3, r0
	mov	r0, r4
	mov	r4, r3
	bl	kfree
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	ERR_PTR
.L14:
	.align	2
.L13:
	.word	GFP_KERNEL
	.word	CMDQ_NO_TIMEOUT
	.word	cmdq_client_timeout
	.word	ENOMEM
	.word	.LC0
	.size	cmdq_mbox_create, .-cmdq_mbox_create
	.comm	cmdq_client_timeout,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	CMDQ_NO_TIMEOUT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
