	.file	"extr_triflex.c_triflex_set_mode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	triflex_set_mode, @function
triflex_set_mode:
.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
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	to_pci_dev@PLT
	cmp	QWORD PTR 0[rbp], 1
	mov	r13d, DWORD PTR [rbx]
	lea	rdx, 4[rsp]
	sbb	ebp, ebp
	mov	rdi, rax
	mov	DWORD PTR 4[rsp], 0
	mov	r12, rax
	and	ebp, -4
	and	r13d, 1
	add	ebp, 116
	mov	esi, ebp
	call	pci_read_config_dword@PLT
	mov	eax, DWORD PTR 4[rbx]
	mov	ecx, r13d
	xor	esi, esi
	sal	ecx, 4
	add	eax, -128
	cmp	eax, 10
	ja	.L3
	lea	rdx, CSWTCH.5[rip]
	mov	edx, DWORD PTR [rdx+rax*4]
	mov	esi, edx
	sal	esi, cl
.L3:
	mov	eax, 65535
	mov	rdi, r12
	sal	eax, cl
	mov	edx, eax
	not	edx
	and	edx, DWORD PTR 4[rsp]
	or	edx, esi
	mov	esi, ebp
	mov	DWORD PTR 4[rsp], edx
	call	pci_write_config_dword@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L10
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	triflex_set_mode, .-triflex_set_mode
	.section	.rodata
	.align 32
	.type	CSWTCH.5, @object
	.size	CSWTCH.5, 44
CSWTCH.5:
	.long	3855
	.long	3855
	.long	3855
	.long	514
	.long	516
	.long	1028
	.long	1288
	.long	2056
	.long	259
	.long	515
	.long	2056
	.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_triflex.c_triflex_set_mode.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	triflex_set_mode, %function
triflex_set_mode:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	mov	r5, #0
	ldr	r3, .L10
	sub	sp, sp, #8
	ldr	r0, [r0, #4]
	mov	r7, r1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	to_pci_dev
	ldr	r3, [r4]
	mov	r2, sp
	cmp	r3, r5
	movne	r8, #116
	moveq	r8, #112
	mov	r1, r8
	str	r5, [sp]
	mov	r6, r0
	ldr	r4, [r7]
	bl	pci_read_config_dword
	ldr	r3, [r7, #4]
	ldr	r0, .L10+4
	sub	r3, r3, #128
	cmp	r3, #10
	ldrls	r1, .L10+8
	and	r4, r4, #1
	ldrls	r5, [r1, r3, lsl #2]
	ldr	r3, [sp]
	lsl	r2, r4, #4
	lslls	r5, r5, r2
	bic	r2, r3, r0, lsl r2
	orr	r2, r2, r5
	mov	r1, r8
	mov	r0, r6
	str	r2, [sp]
	bl	pci_write_config_dword
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	bl	__stack_chk_fail
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	65535
	.word	.LANCHOR0
	.size	triflex_set_mode, .-triflex_set_mode
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
	.type	CSWTCH.5, %object
	.size	CSWTCH.5, 44
CSWTCH.5:
	.word	3855
	.word	3855
	.word	3855
	.word	514
	.word	516
	.word	1028
	.word	1288
	.word	2056
	.word	259
	.word	515
	.word	2056
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
