	.file	"extr_vfio_ccw_fsm.c_fsm_do_halt.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"haltIO"
	.text
	.p2align 4
	.type	fsm_do_halt, @function
fsm_do_halt:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	esi, esi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rbx, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	edi, DWORD PTR [rbx]
	call	spin_lock_irqsave@PLT
	lea	rsi, .LC0[rip]
	mov	edi, 2
	call	VFIO_CCW_TRACE_EVENT@PLT
	lea	rdi, 12[rbx]
	call	dev_name@PLT
	mov	edi, 2
	mov	rsi, rax
	call	VFIO_CCW_TRACE_EVENT@PLT
	mov	edi, DWORD PTR 8[rbx]
	call	hsch@PLT
	lea	rsi, 4[rsp]
	mov	edx, 4
	mov	edi, 2
	mov	DWORD PTR 4[rsp], eax
	call	VFIO_CCW_HEX_EVENT@PLT
	mov	r12d, DWORD PTR 4[rsp]
	cmp	r12d, 2
	jg	.L2
	test	r12d, r12d
	jg	.L3
	jne	.L5
	mov	eax, DWORD PTR SCSW_ACTL_HALT_PEND[rip]
	or	DWORD PTR 4[rbx], eax
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR [rbx]
	xor	esi, esi
	call	spin_unlock_irqrestore@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 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	cmp	r12d, 3
	jne	.L5
	mov	r12d, DWORD PTR ENODEV[rip]
	neg	r12d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	r12d, DWORD PTR EBUSY[rip]
	neg	r12d
	jmp	.L5
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	fsm_do_halt, .-fsm_do_halt
	.comm	SCSW_ACTL_HALT_PEND,4,4
	.comm	ENODEV,4,4
	.comm	EBUSY,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_vfio_ccw_fsm.c_fsm_do_halt.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"haltIO\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fsm_do_halt, %function
fsm_do_halt:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r5, [r0]
	ldr	r3, .L11
	mov	r4, r5
	sub	sp, sp, #12
	ldr	r0, [r4], #12
	mov	r1, #0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	spin_lock_irqsave
	ldr	r1, .L11+4
	mov	r0, #2
	bl	VFIO_CCW_TRACE_EVENT
	mov	r0, r4
	bl	dev_name
	mov	r1, r0
	mov	r0, #2
	bl	VFIO_CCW_TRACE_EVENT
	ldr	r0, [r5, #8]
	bl	hsch
	mov	r3, r0
	mov	r2, #4
	mov	r1, sp
	mov	r0, #2
	str	r3, [sp]
	bl	VFIO_CCW_HEX_EVENT
	ldr	r4, [sp]
	cmp	r4, #2
	bgt	.L2
	cmp	r4, #0
	bgt	.L3
	bne	.L5
	ldr	r2, .L11+8
	ldr	r3, [r5, #4]
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r5, #4]
.L5:
	mov	r1, #0
	ldr	r0, [r5]
	bl	spin_unlock_irqrestore
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L2:
	cmp	r4, #3
	ldreq	r3, .L11+12
	ldreq	r4, [r3]
	rsbeq	r4, r4, #0
	b	.L5
.L3:
	ldr	r3, .L11+16
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L5
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC1
	.word	.LC0
	.word	SCSW_ACTL_HALT_PEND
	.word	ENODEV
	.word	EBUSY
	.size	fsm_do_halt, .-fsm_do_halt
	.comm	SCSW_ACTL_HALT_PEND,4,4
	.comm	ENODEV,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
