	.file	"extr_pci_ahci.c_ahci_handle_cmd.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Unsupported cmd:%02x\n"
	.text
	.p2align 4
	.type	ahci_handle_cmd, @function
ahci_handle_cmd:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	eax, DWORD PTR ATA_S_BUSY[rip]
	or	DWORD PTR [rdi], eax
	mov	esi, DWORD PTR 8[rdx]
	lea	eax, -128[rsi]
	cmp	eax, 46
	ja	.L2
	lea	rcx, .L4[rip]
	movsx	rax, DWORD PTR [rcx+rax*4]
	add	rax, rcx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L4:
	.long	.L12-.L4
	.long	.L12-.L4
	.long	.L12-.L4
	.long	.L12-.L4
	.long	.L12-.L4
	.long	.L12-.L4
	.long	.L12-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L9-.L4
	.long	.L9-.L4
	.long	.L10-.L4
	.long	.L9-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L16-.L4
	.long	.L15-.L4
	.long	.L14-.L4
	.long	.L10-.L4
	.long	.L2-.L4
	.long	.L9-.L4
	.long	.L9-.L4
	.long	.L12-.L4
	.long	.L12-.L4
	.long	.L13-.L4
	.long	.L13-.L4
	.long	.L12-.L4
	.long	.L12-.L4
	.long	.L12-.L4
	.long	.L12-.L4
	.long	.L12-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L11-.L4
	.long	.L10-.L4
	.long	.L9-.L4
	.long	.L9-.L4
	.long	.L8-.L4
	.long	.L8-.L4
	.long	.L7-.L4
	.long	.L6-.L4
	.long	.L5-.L4
	.long	.L3-.L4
	.text
	.p2align 4,,10
	.p2align 3
.L14:
	mov	eax, DWORD PTR 52[rdx]
	and	eax, 31
	cmp	eax, DWORD PTR ATA_SFPDMA_DSM[rip]
	jne	.L10
	mov	esi, DWORD PTR 68[rdx]
	test	esi, esi
	jne	.L10
	mov	eax, DWORD PTR ATA_DSM_TRIM[rip]
	cmp	DWORD PTR 64[rdx], eax
	jne	.L10
	mov	ecx, DWORD PTR 44[rdx]
	test	ecx, ecx
	jne	.L10
	cmp	DWORD PTR 12[rdx], 1
	je	.L29
	.p2align 4,,10
	.p2align 3
.L10:
	mov	eax, DWORD PTR ATA_E_ABORT[rip]
	mov	ecx, DWORD PTR ATA_S_READY[rip]
	or	ecx, DWORD PTR ATA_S_ERROR[rip]
	sal	eax, 8
	or	ecx, eax
.L40:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	esi, r12d
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	ahci_write_fis_d2h@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	esi, r12d
	xor	ecx, ecx
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	ahci_handle_rw@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	ecx, DWORD PTR ATA_S_READY[rip]
	or	ecx, DWORD PTR ATA_S_DSC[rip]
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L2:
	lea	rdi, .LC0[rip]
	mov	QWORD PTR 8[rsp], rdx
	call	WPRINTF@PLT
	mov	eax, DWORD PTR ATA_E_ABORT[rip]
	mov	ecx, DWORD PTR ATA_S_READY[rip]
	or	ecx, DWORD PTR ATA_S_ERROR[rip]
	mov	rdx, QWORD PTR 8[rsp]
	sal	eax, 8
	or	ecx, eax
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L13:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	esi, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	ahci_handle_read_log@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	esi, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	ahci_handle_flush@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	r8d, DWORD PTR 44[rdx]
	test	r8d, r8d
	jne	.L10
	mov	eax, DWORD PTR ATA_DSM_TRIM[rip]
	cmp	DWORD PTR 12[rdx], eax
	jne	.L10
	mov	edi, DWORD PTR 52[rdx]
	test	edi, edi
	jne	.L10
	cmp	DWORD PTR 48[rdx], 1
	jne	.L10
.L29:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	esi, r12d
	mov	rdi, rbp
	xor	ecx, ecx
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	ahci_handle_dsm_trim@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	ecx, DWORD PTR ATA_S_READY[rip]
	mov	DWORD PTR 48[rdx], 255
	or	ecx, DWORD PTR ATA_S_DSC[rip]
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L5:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	esi, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	handle_identify@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	esi, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	handle_atapi_identify@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	eax, DWORD PTR 48[rdx]
	test	eax, eax
	je	.L25
	cmp	eax, 128
	jg	.L26
	lea	ecx, -1[rax]
	test	ecx, eax
	je	.L25
.L26:
	mov	eax, DWORD PTR ATA_ERROR_ABORT[rip]
	mov	ecx, DWORD PTR ATA_S_ERROR[rip]
	or	ecx, DWORD PTR ATA_S_READY[rip]
	sal	eax, 8
	or	ecx, eax
	mov	DWORD PTR 0[rbp], ecx
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L15:
	mov	eax, DWORD PTR 12[rdx]
	mov	ecx, DWORD PTR ATA_S_READY[rip]
	cmp	eax, 143
	je	.L17
	jg	.L18
	cmp	eax, 141
	je	.L19
	cmp	eax, 142
	jne	.L21
.L24:
	or	ecx, DWORD PTR ATA_S_DSC[rip]
	mov	DWORD PTR 0[rbp], ecx
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L18:
	sub	eax, 144
	cmp	eax, 2
	jbe	.L24
.L21:
	mov	eax, DWORD PTR ATA_ERROR_ABORT[rip]
	or	ecx, DWORD PTR ATA_S_ERROR[rip]
	sal	eax, 8
	or	ecx, eax
	mov	DWORD PTR 0[rbp], ecx
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L11:
	mov	eax, DWORD PTR 12[rdi]
	test	eax, eax
	je	.L10
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	esi, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	handle_packet_cmd@PLT
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	mov	ecx, DWORD PTR ATA_S_DSC[rip]
	or	ecx, DWORD PTR ATA_S_READY[rip]
	mov	DWORD PTR 8[rbp], eax
	mov	DWORD PTR 0[rbp], ecx
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L19:
	mov	esi, DWORD PTR 48[rdx]
	mov	eax, esi
	and	eax, 248
	sub	eax, 135
	cmp	eax, 1
	ja	.L24
	and	esi, 7
	mov	DWORD PTR 4[rdi], esi
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L17:
	cmp	DWORD PTR 48[rdx], 151
	jne	.L21
	jmp	.L24
	.cfi_endproc
.LFE0:
	.size	ahci_handle_cmd, .-ahci_handle_cmd
	.comm	ATA_S_READY,4,4
	.comm	ATA_S_ERROR,4,4
	.comm	ATA_S_DSC,4,4
	.comm	ATA_S_BUSY,4,4
	.comm	ATA_SFPDMA_DSM,4,4
	.comm	ATA_E_ABORT,4,4
	.comm	ATA_ERROR_ABORT,4,4
	.comm	ATA_DSM_TRIM,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_pci_ahci.c_ahci_handle_cmd.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Unsupported cmd:%02x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ahci_handle_cmd, %function
ahci_handle_cmd:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	mov	r4, r0
	ldr	r0, .L47
	ldr	r3, [r4]
	ldr	r0, [r0]
	mov	r5, r1
	orr	r3, r3, r0
	str	r3, [r4]
	ldr	r1, [r2, #8]
	sub	sp, sp, #12
	sub	r3, r1, #128
	cmp	r3, #46
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L2
	.word	.L2
	.word	.L9
	.word	.L9
	.word	.L10
	.word	.L9
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L16
	.word	.L15
	.word	.L14
	.word	.L10
	.word	.L2
	.word	.L9
	.word	.L9
	.word	.L12
	.word	.L12
	.word	.L13
	.word	.L13
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L2
	.word	.L2
	.word	.L11
	.word	.L10
	.word	.L9
	.word	.L9
	.word	.L8
	.word	.L8
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L14:
	ldr	r1, .L47+4
	ldr	r3, [r2, #52]
	ldr	r1, [r1]
	and	r3, r3, #31
	cmp	r3, r1
	bne	.L10
	ldr	r3, [r2, #68]
	cmp	r3, #0
	bne	.L10
	ldr	r3, .L47+8
	ldr	r1, [r2, #64]
	ldr	r3, [r3]
	cmp	r1, r3
	bne	.L10
	ldr	r3, [r2, #44]
	cmp	r3, #0
	bne	.L10
	ldr	r3, [r2, #12]
	cmp	r3, #1
	beq	.L29
.L10:
	ldr	r1, .L47+12
	ldr	r3, .L47+16
	ldr	r0, .L47+20
	ldr	r1, [r1]
	ldr	r3, [r3]
	ldr	ip, [r0]
	orr	r3, r1, r3
.L44:
	mov	r1, r5
	mov	r0, r4
	orr	r3, r3, ip, lsl #8
.L43:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, lr}
	b	ahci_write_fis_d2h
.L12:
	mov	r1, r5
	mov	r0, r4
	mov	r3, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, lr}
	b	ahci_handle_rw
.L9:
	ldr	r1, .L47+12
	ldr	r3, .L47+24
	ldr	ip, [r1]
	ldr	r3, [r3]
	mov	r1, r5
	mov	r0, r4
	orr	r3, ip, r3
	b	.L43
.L2:
	ldr	r0, .L47+28
	str	r2, [sp, #4]
	bl	WPRINTF
	ldr	r1, .L47+12
	ldr	r3, .L47+16
	ldr	r0, .L47+20
	ldr	r1, [r1]
	ldr	r3, [r3]
	ldr	ip, [r0]
	ldr	r2, [sp, #4]
	orr	r3, r1, r3
	b	.L44
.L13:
	mov	r1, r5
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, lr}
	b	ahci_handle_read_log
.L8:
	mov	r1, r5
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, lr}
	b	ahci_handle_flush
.L7:
	ldr	r3, [r2, #44]
	cmp	r3, #0
	bne	.L10
	ldr	r3, .L47+8
	ldr	r1, [r2, #12]
	ldr	r3, [r3]
	cmp	r1, r3
	bne	.L10
	ldr	r3, [r2, #52]
	cmp	r3, #0
	bne	.L10
	ldr	r3, [r2, #48]
	cmp	r3, #1
	bne	.L10
.L29:
	mov	r1, r5
	mov	r0, r4
	mov	r3, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, lr}
	b	ahci_handle_dsm_trim
.L6:
	mov	ip, #255
	ldr	r1, .L47+12
	ldr	r3, .L47+24
	ldr	lr, [r1]
	ldr	r3, [r3]
	mov	r1, r5
	mov	r0, r4
	orr	r3, lr, r3
	str	ip, [r2, #48]
	b	.L43
.L5:
	mov	r1, r5
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, lr}
	b	handle_identify
.L3:
	mov	r1, r5
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, lr}
	b	handle_atapi_identify
.L16:
	ldr	r1, [r2, #48]
	cmp	r1, #0
	beq	.L25
	cmp	r1, #128
	bgt	.L26
	sub	r3, r1, #1
	tst	r3, r1
	beq	.L25
.L26:
	ldr	r3, .L47+16
	ldr	r0, .L47+12
	ldr	r1, .L47+32
	ldr	r3, [r3]
.L45:
	ldr	r0, [r0]
	ldr	r1, [r1]
	orr	r3, r3, r0
	orr	r3, r3, r1, lsl #8
	str	r3, [r4]
	b	.L27
.L15:
	ldr	r1, [r2, #12]
	ldr	r3, .L47+12
	sub	r1, r1, #141
	ldr	r3, [r3]
	cmp	r1, #5
	ldrls	pc, [pc, r1, asl #2]
	b	.L17
.L19:
	.word	.L21
	.word	.L24
	.word	.L20
	.word	.L24
	.word	.L24
	.word	.L24
.L11:
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L10
	mov	r1, r5
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, lr}
	b	handle_packet_cmd
.L21:
	ldr	r0, [r2, #48]
	and	r1, r0, #248
	sub	r1, r1, #135
	cmp	r1, #1
	andls	r0, r0, #7
	strls	r0, [r4, #4]
.L24:
	ldr	r1, .L47+24
	ldr	r1, [r1]
	orr	r3, r3, r1
	str	r3, [r4]
.L27:
	mov	r1, r5
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, lr}
	b	ahci_write_fis_d2h
.L25:
	ldr	r3, .L47+24
	ldr	r0, .L47+12
	ldr	r3, [r3]
	ldr	r0, [r0]
	str	r1, [r4, #8]
	orr	r3, r3, r0
	str	r3, [r4]
	b	.L27
.L20:
	ldr	r1, [r2, #48]
	cmp	r1, #151
	beq	.L24
	ldr	r1, .L47+16
	ldr	r0, .L47+32
	ldr	r1, [r1]
	ldr	r0, [r0]
	orr	r3, r3, r1
	orr	r3, r3, r0, lsl #8
	str	r3, [r4]
	b	.L27
.L17:
	ldr	r0, .L47+16
	ldr	r1, .L47+32
	b	.L45
.L48:
	.align	2
.L47:
	.word	ATA_S_BUSY
	.word	ATA_SFPDMA_DSM
	.word	ATA_DSM_TRIM
	.word	ATA_S_READY
	.word	ATA_S_ERROR
	.word	ATA_E_ABORT
	.word	ATA_S_DSC
	.word	.LC0
	.word	ATA_ERROR_ABORT
	.size	ahci_handle_cmd, .-ahci_handle_cmd
	.comm	ATA_S_READY,4,4
	.comm	ATA_S_ERROR,4,4
	.comm	ATA_S_DSC,4,4
	.comm	ATA_S_BUSY,4,4
	.comm	ATA_SFPDMA_DSM,4,4
	.comm	ATA_E_ABORT,4,4
	.comm	ATA_ERROR_ABORT,4,4
	.comm	ATA_DSM_TRIM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
