	.file	"extr_device_ops.c_ccw_device_halt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ccw_device_halt
	.type	ccw_device_halt, @function
ccw_device_halt:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	je	.L13
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	edi, DWORD PTR 8[rdi]
	test	edi, edi
	jne	.L3
.L16:
	mov	eax, DWORD PTR ENODEV[rip]
	neg	eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	rbp, rsi
	call	to_subchannel@PLT
	mov	rdi, rax
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L8
	mov	rax, QWORD PTR [rbx]
	mov	rax, QWORD PTR [rax]
	cmp	rax, QWORD PTR DEV_STATE_NOT_OPER[rip]
	je	.L16
	cmp	rax, QWORD PTR DEV_STATE_ONLINE[rip]
	je	.L7
	cmp	rax, QWORD PTR DEV_STATE_W4SENSE[rip]
	jne	.L8
.L7:
	call	cio_halt@PLT
	test	eax, eax
	jne	.L1
	mov	rdx, QWORD PTR [rbx]
	mov	QWORD PTR 8[rdx], rbp
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore 3
	.cfi_restore 6
	mov	eax, DWORD PTR ENODEV[rip]
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	ccw_device_halt, .-ccw_device_halt
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.comm	DEV_STATE_W4SENSE,8,8
	.comm	DEV_STATE_ONLINE,8,8
	.comm	DEV_STATE_NOT_OPER,8,8
	.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_device_ops.c_ccw_device_halt.c"
	.text
	.align	2
	.global	ccw_device_halt
	.syntax unified
	.arm
	.fpu softvfp
	.type	ccw_device_halt, %function
ccw_device_halt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	subs	r4, r0, #0
	beq	.L13
	ldr	r0, [r4, #4]
	cmp	r0, #0
	bne	.L3
.L13:
	ldr	r3, .L15
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L3:
	mov	r5, r1
	bl	to_subchannel
	ldr	r3, [r0]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [r4]
	ldr	r2, .L15+4
	ldr	r3, [r3]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L13
	ldr	r2, .L15+8
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L7
	ldr	r2, .L15+12
	ldr	r2, [r2]
	cmp	r3, r2
	bne	.L8
.L7:
	bl	cio_halt
	cmp	r0, #0
	ldreq	r3, [r4]
	streq	r5, [r3, #4]
	pop	{r4, r5, r6, pc}
.L8:
	ldr	r3, .L15+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L16:
	.align	2
.L15:
	.word	ENODEV
	.word	DEV_STATE_NOT_OPER
	.word	DEV_STATE_ONLINE
	.word	DEV_STATE_W4SENSE
	.word	EINVAL
	.size	ccw_device_halt, .-ccw_device_halt
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.comm	DEV_STATE_W4SENSE,4,4
	.comm	DEV_STATE_ONLINE,4,4
	.comm	DEV_STATE_NOT_OPER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
