	.file	"extr_vatpic.c_vatpic_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vatpic_write, @function
vatpic_write:
.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
	mov	r12d, ecx
	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, 8
	.cfi_def_cfa_offset 48
	mov	r13d, DWORD PTR [r9]
	call	VATPIC_LOCK@PLT
	test	DWORD PTR ICU_IMR_OFFSET[rip], r12d
	je	.L2
	mov	eax, DWORD PTR [rbx]
	mov	edx, r13d
	mov	rsi, rbx
	mov	rdi, rbp
	cmp	eax, 3
	je	.L3
	cmp	eax, 4
	je	.L4
	cmp	eax, 2
	je	.L15
	call	vatpic_ocw1@PLT
	mov	r12d, eax
	.p2align 4,,10
	.p2align 3
.L6:
	cmp	QWORD PTR 8[rbx], 0
	je	.L8
	mov	rdi, rbp
	call	vatpic_notify_intr@PLT
.L8:
	mov	rdi, rbp
	call	VATPIC_UNLOCK@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	r12d, r13d
	and	r12d, 16
	jne	.L16
	cmp	QWORD PTR 8[rbx], 0
	je	.L8
.L17:
	mov	edx, r13d
	and	r13d, 8
	mov	rsi, rbx
	mov	rdi, rbp
	je	.L9
	call	vatpic_ocw3@PLT
	mov	r12d, eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L15:
	call	vatpic_icw2@PLT
	mov	r12d, eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	call	vatpic_icw4@PLT
	mov	r12d, eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	mov	edx, r13d
	mov	rsi, rbx
	mov	rdi, rbp
	call	vatpic_icw1@PLT
	cmp	QWORD PTR 8[rbx], 0
	mov	r12d, eax
	je	.L8
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L3:
	call	vatpic_icw3@PLT
	mov	r12d, eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	call	vatpic_ocw2@PLT
	mov	r12d, eax
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	vatpic_write, .-vatpic_write
	.comm	ICU_IMR_OFFSET,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_vatpic.c_vatpic_write.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vatpic_write, %function
vatpic_write:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r3
	ldr	r3, [sp, #28]
	mov	r4, r1
	ldr	r7, [r3]
	mov	r5, r0
	bl	VATPIC_LOCK
	ldr	r3, .L24
	ldr	r3, [r3]
	tst	r6, r3
	beq	.L2
	ldr	r3, [r4]
	mov	r2, r7
	cmp	r3, #3
	mov	r1, r4
	mov	r0, r5
	beq	.L3
	cmp	r3, #4
	beq	.L4
	cmp	r3, #2
	beq	.L21
	bl	vatpic_ocw1
	mov	r6, r0
.L6:
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L8
	mov	r0, r5
	bl	vatpic_notify_intr
.L8:
	mov	r0, r5
	bl	VATPIC_UNLOCK
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ands	r6, r7, #16
	bne	.L22
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L8
.L23:
	tst	r7, #8
	mov	r2, r7
	mov	r1, r4
	mov	r0, r5
	beq	.L9
	bl	vatpic_ocw3
	mov	r6, r0
	b	.L6
.L21:
	bl	vatpic_icw2
	mov	r6, r0
	b	.L6
.L4:
	bl	vatpic_icw4
	mov	r6, r0
	b	.L6
.L22:
	mov	r2, r7
	mov	r1, r4
	mov	r0, r5
	bl	vatpic_icw1
	ldr	r3, [r4, #4]
	mov	r6, r0
	cmp	r3, #0
	beq	.L8
	b	.L23
.L3:
	bl	vatpic_icw3
	mov	r6, r0
	b	.L6
.L9:
	bl	vatpic_ocw2
	mov	r6, r0
	b	.L6
.L25:
	.align	2
.L24:
	.word	ICU_IMR_OFFSET
	.size	vatpic_write, .-vatpic_write
	.comm	ICU_IMR_OFFSET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
