	.file	"extr_spi-img-spfi.c_img_spfi_setup.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"can't request chipselect gpio %d\n"
	.align 8
.LC1:
	.string	"chipselect gpio %d setup failed (%d)\n"
	.text
	.p2align 4
	.type	img_spfi_setup, @function
img_spfi_setup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	r12d, DWORD PTR EINVAL[rip]
	call	spi_get_ctldata@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L18
.L2:
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	jne	.L5
	lea	r13, 8[rbx]
	mov	rdi, r13
	call	dev_name@PLT
	mov	esi, DWORD PTR GPIOF_OUT_INIT_LOW[rip]
	mov	edi, DWORD PTR 4[rbx]
	mov	edx, eax
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR SPI_CS_HIGH[rip], eax
	cmove	esi, DWORD PTR GPIOF_OUT_INIT_HIGH[rip]
	call	gpio_request_one@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L19
	mov	DWORD PTR 0[rbp], 1
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L5:
	.cfi_restore_state
	mov	edi, DWORD PTR 4[rbx]
	neg	r12d
	call	gpio_is_valid@PLT
	test	rax, rax
	je	.L1
	mov	eax, DWORD PTR [rbx]
	mov	esi, DWORD PTR GPIOF_OUT_INIT_LOW[rip]
	test	DWORD PTR SPI_CS_HIGH[rip], eax
	mov	edi, DWORD PTR 4[rbx]
	cmove	esi, DWORD PTR GPIOF_OUT_INIT_HIGH[rip]
	call	gpio_direction_output@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	mov	edx, DWORD PTR 4[rbx]
	mov	ecx, eax
	lea	rdi, 8[rbx]
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 4
	call	kzalloc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L20
	mov	DWORD PTR [rax], 0
	mov	rsi, rax
	mov	rdi, rbx
	call	spi_set_ctldata@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L19:
	mov	edx, DWORD PTR 4[rbx]
	mov	rdi, r13
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	dev_err@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L20:
	.cfi_restore_state
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	img_spfi_setup, .-img_spfi_setup
	.comm	SPI_CS_HIGH,4,4
	.comm	GPIOF_OUT_INIT_LOW,4,4
	.comm	GPIOF_OUT_INIT_HIGH,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,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_spi-img-spfi.c_img_spfi_setup.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"can't request chipselect gpio %d\012\000"
	.align	2
.LC1:
	.ascii	"chipselect gpio %d setup failed (%d)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	img_spfi_setup, %function
img_spfi_setup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L20
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	ldr	r4, [r3]
	bl	spi_get_ctldata
	subs	r5, r0, #0
	beq	.L17
.L2:
	ldr	r3, [r5]
	ldr	r7, [r6, #4]
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L20+4
	ldr	r2, [r6]
	ldr	r3, [r3]
	add	r8, r6, #8
	tst	r2, r3
	ldrne	r3, .L20+8
	ldreq	r3, .L20+12
	mov	r0, r8
	ldr	r4, [r3]
	bl	dev_name
	mov	r1, r4
	mov	r2, r0
	mov	r0, r7
	bl	gpio_request_one
	subs	r4, r0, #0
	moveq	r3, #1
	streq	r3, [r5]
	bne	.L18
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L18:
	mov	r0, r8
	ldr	r2, [r6, #4]
	ldr	r1, .L20+16
	bl	dev_err
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	mov	r0, r7
	bl	gpio_is_valid
	cmp	r0, #0
	rsbeq	r4, r4, #0
	beq	.L1
	ldr	r3, .L20+4
	ldr	r2, [r6]
	ldr	r3, [r3]
	ldr	r0, [r6, #4]
	tst	r2, r3
	ldrne	r3, .L20+8
	ldreq	r3, .L20+12
	ldr	r1, [r3]
	bl	gpio_direction_output
	subs	r4, r0, #0
	beq	.L1
	mov	r3, r4
	ldr	r2, [r6, #4]
	ldr	r1, .L20+20
	add	r0, r6, #8
	bl	dev_err
	b	.L1
.L17:
	ldr	r3, .L20+24
	mov	r0, #4
	ldr	r1, [r3]
	bl	kzalloc
	subs	r5, r0, #0
	beq	.L19
	mov	r3, #0
	mov	r1, r5
	mov	r0, r6
	str	r3, [r5]
	bl	spi_set_ctldata
	b	.L2
.L19:
	ldr	r3, .L20+28
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L21:
	.align	2
.L20:
	.word	EINVAL
	.word	SPI_CS_HIGH
	.word	GPIOF_OUT_INIT_LOW
	.word	GPIOF_OUT_INIT_HIGH
	.word	.LC0
	.word	.LC1
	.word	GFP_KERNEL
	.word	ENOMEM
	.size	img_spfi_setup, .-img_spfi_setup
	.comm	SPI_CS_HIGH,4,4
	.comm	GPIOF_OUT_INIT_LOW,4,4
	.comm	GPIOF_OUT_INIT_HIGH,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
