	.file	"extr_cmd64x.c_cmd64x_set_dma_mode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cmd64x_set_dma_mode, @function
cmd64x_set_dma_mode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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, 24
	.cfi_def_cfa_offset 80
	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
	mov	r13d, DWORD PTR 0[rbp]
	mov	DWORD PTR 4[rsp], 0
	mov	r14d, DWORD PTR UDIDETCR0[rip]
	mov	r12, rax
	and	r13d, 1
	cmp	QWORD PTR [rbx], 0
	je	.L3
	mov	r14d, DWORD PTR UDIDETCR1[rip]
.L3:
	lea	rdx, 4[rsp]
	mov	esi, r14d
	mov	rdi, r12
	mov	r15d, DWORD PTR 4[rbp]
	call	pci_read_config_byte@PLT
	test	r13d, r13d
	je	.L41
	mov	edx, DWORD PTR 4[rsp]
	lea	eax, -128[r15]
	and	dl, 53
	mov	DWORD PTR 4[rsp], edx
	cmp	eax, 8
	ja	.L7
	lea	rcx, .L19[rip]
	movsx	rax, DWORD PTR [rcx+rax*4]
	add	rax, rcx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L19:
	.long	.L27-.L19
	.long	.L8-.L19
	.long	.L10-.L19
	.long	.L12-.L19
	.long	.L14-.L19
	.long	.L28-.L19
	.long	.L17-.L19
	.long	.L17-.L19
	.long	.L17-.L19
	.text
	.p2align 4,,10
	.p2align 3
.L8:
	mov	eax, 74
	test	r13d, r13d
	jne	.L16
.L29:
	mov	eax, 21
	.p2align 4,,10
	.p2align 3
.L16:
	or	edx, eax
	mov	DWORD PTR 4[rsp], edx
.L7:
	mov	esi, r14d
	mov	rdi, r12
	call	pci_write_config_byte@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L42
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L41:
	.cfi_restore_state
	mov	edx, DWORD PTR 4[rsp]
	lea	eax, -128[r15]
	and	edx, -54
	mov	DWORD PTR 4[rsp], edx
	cmp	eax, 8
	ja	.L7
	lea	rcx, .L18[rip]
	movsx	rax, DWORD PTR [rcx+rax*4]
	add	rax, rcx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L18:
	.long	.L25-.L18
	.long	.L29-.L18
	.long	.L30-.L18
	.long	.L31-.L18
	.long	.L32-.L18
	.long	.L26-.L18
	.long	.L17-.L18
	.long	.L17-.L18
	.long	.L17-.L18
	.text
	.p2align 4,,10
	.p2align 3
.L17:
	mov	esi, r15d
	mov	rdi, rbp
	call	cmd64x_program_timings@PLT
	mov	edx, DWORD PTR 4[rsp]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L10:
	mov	eax, 138
	test	r13d, r13d
	jne	.L16
.L30:
	mov	eax, 37
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L12:
	mov	eax, 66
	test	r13d, r13d
	jne	.L16
.L31:
	mov	eax, 17
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L14:
	mov	eax, 130
	test	r13d, r13d
	jne	.L16
.L32:
	mov	eax, 33
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L25:
	mov	eax, 5
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L28:
	mov	eax, 194
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L26:
	mov	eax, 49
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L27:
	mov	eax, 10
	jmp	.L16
.L42:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	cmd64x_set_dma_mode, .-cmd64x_set_dma_mode
	.comm	UDIDETCR1,4,4
	.comm	UDIDETCR0,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_cmd64x.c_cmd64x_set_dma_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	cmd64x_set_dma_mode, %function
cmd64x_set_dma_mode:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L43
	mov	r6, r0
	sub	sp, sp, #8
	ldr	r0, [r0, #4]
	mov	r4, r1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	to_pci_dev
	mov	r3, #0
	ldr	r2, [r6]
	str	r3, [sp]
	cmp	r2, r3
	ldrne	r3, .L43+4
	ldreq	r3, .L43+8
	ldr	r6, [r4]
	ldr	r7, [r3]
	mov	r2, sp
	mov	r1, r7
	and	r6, r6, #1
	mov	r5, r0
	ldr	r8, [r4, #4]
	bl	pci_read_config_byte
	cmp	r6, #0
	beq	.L41
	ldr	r2, [sp]
	sub	r3, r8, #128
	bic	r2, r2, #202
	str	r2, [sp]
	cmp	r3, #8
	ldrls	pc, [pc, r3, asl #2]
	b	.L7
.L19:
	.word	.L27
	.word	.L8
	.word	.L10
	.word	.L12
	.word	.L14
	.word	.L28
	.word	.L17
	.word	.L17
	.word	.L17
.L8:
	cmp	r6, #0
	movne	r3, #74
	bne	.L16
.L29:
	mov	r3, #21
.L16:
	orr	r2, r2, r3
	str	r2, [sp]
.L7:
	mov	r1, r7
	mov	r0, r5
	bl	pci_write_config_byte
	ldr	r3, .L43
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L42
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L41:
	ldr	r2, [sp]
	sub	r3, r8, #128
	bic	r2, r2, #53
	str	r2, [sp]
	cmp	r3, #8
	ldrls	pc, [pc, r3, asl #2]
	b	.L7
.L18:
	.word	.L25
	.word	.L29
	.word	.L30
	.word	.L31
	.word	.L32
	.word	.L26
	.word	.L17
	.word	.L17
	.word	.L17
.L17:
	mov	r1, r8
	mov	r0, r4
	bl	cmd64x_program_timings
	ldr	r2, [sp]
	b	.L7
.L10:
	cmp	r6, #0
	movne	r3, #138
	bne	.L16
.L30:
	mov	r3, #37
	b	.L16
.L12:
	cmp	r6, #0
	movne	r3, #66
	bne	.L16
.L31:
	mov	r3, #17
	b	.L16
.L14:
	cmp	r6, #0
	movne	r3, #130
	bne	.L16
.L32:
	mov	r3, #33
	b	.L16
.L25:
	mov	r3, #5
	b	.L16
.L26:
	mov	r3, #49
	b	.L16
.L27:
	mov	r3, #10
	b	.L16
.L28:
	mov	r3, #194
	b	.L16
.L42:
	bl	__stack_chk_fail
.L44:
	.align	2
.L43:
	.word	.LC0
	.word	UDIDETCR1
	.word	UDIDETCR0
	.size	cmd64x_set_dma_mode, .-cmd64x_set_dma_mode
	.comm	UDIDETCR1,4,4
	.comm	UDIDETCR0,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
