	.file	"extr_csr.c_remove_host.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	remove_host, @function
remove_host:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	push	rbx
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR CSR_BUS_INFO_SIZE[rip]
	mov	rsi, rsp
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L3
.L11:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L11
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L12
.L4:
	lea	rax, 3[rsp]
	mov	ecx, DWORD PTR CSR_CYC_CLK_ACC_SHIFT[rip]
	mov	edi, DWORD PTR 8[rbx]
	mov	r12, rax
	and	rax, -4
	shr	r12, 2
	mov	r13, rax
	mov	eax, DWORD PTR IEEE1394_BUSID_MAGIC[rip]
	sal	edi, cl
	mov	ecx, DWORD PTR CSR_MAX_REC_SHIFT[rip]
	mov	DWORD PTR 4[0+r12*4], eax
	mov	eax, DWORD PTR 12[rbx]
	sal	eax, cl
	or	edi, eax
	or	edi, DWORD PTR 16[rbx]
	call	cpu_to_be32@PLT
	mov	edi, DWORD PTR 20[rbx]
	mov	DWORD PTR 8[0+r12*4], eax
	call	cpu_to_be32@PLT
	mov	edi, DWORD PTR 24[rbx]
	mov	DWORD PTR 12[0+r12*4], eax
	call	cpu_to_be32@PLT
	mov	esi, DWORD PTR node_cap[rip]
	mov	DWORD PTR 16[0+r12*4], eax
	mov	rax, QWORD PTR 32[rbx]
	mov	edi, DWORD PTR [rax]
	call	csr1212_detach_keyval_from_directory@PLT
	mov	rdi, QWORD PTR 32[rbx]
	xor	edx, edx
	mov	rsi, r13
	call	csr1212_init_local_csr@PLT
	mov	DWORD PTR [rbx], 1
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	lea	rsp, -24[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	remove_host, .-remove_host
	.comm	node_cap,4,4
	.comm	IEEE1394_BUSID_MAGIC,4,4
	.comm	CSR_PMC_SHIFT,4,4
	.comm	CSR_MAX_ROM_SHIFT,4,4
	.comm	CSR_MAX_REC_SHIFT,4,4
	.comm	CSR_ISC_SHIFT,4,4
	.comm	CSR_IRMC_SHIFT,4,4
	.comm	CSR_GENERATION_SHIFT,4,4
	.comm	CSR_CYC_CLK_ACC_SHIFT,4,4
	.comm	CSR_CMC_SHIFT,4,4
	.comm	CSR_BUS_INFO_SIZE,4,4
	.comm	CSR_BMC_SHIFT,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_csr.c_remove_host.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	remove_host, %function
remove_host:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #8
	ldr	r3, .L6
	mov	r4, r0
	ldr	r3, [r3]
	ldr	r2, .L6+4
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r5, sp
	ldr	r1, .L6+8
	ldr	r3, [r0, #8]
	ldr	r0, [r2]
	ldr	ip, [r4, #4]
	ldr	r1, [r1]
	lsl	r3, r3, r0
	ldr	r2, .L6+12
	ldr	r0, [r4, #12]
	orr	r3, r3, ip, lsl r1
	ldr	r2, [r2]
	orr	r0, r3, r0
	ldr	r3, .L6+16
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	str	r2, [r5, #4]
	bl	cpu_to_be32
	mov	r3, r0
	ldr	r0, [r4, #16]
	str	r3, [r5, #8]
	bl	cpu_to_be32
	mov	r3, r0
	ldr	r0, [r4, #20]
	str	r3, [r5, #12]
	bl	cpu_to_be32
	ldr	r3, .L6+20
	ldr	r2, [r4, #24]
	str	r0, [r5, #16]
	ldr	r1, [r3]
	ldr	r0, [r2]
	bl	csr1212_detach_keyval_from_directory
	mov	r2, #0
	mov	r1, r5
	ldr	r0, [r4, #24]
	bl	csr1212_init_local_csr
	mov	r3, #1
	str	r3, [r4]
	ldr	r3, .L6+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L5
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L5:
	bl	__stack_chk_fail
.L7:
	.align	2
.L6:
	.word	CSR_BUS_INFO_SIZE
	.word	CSR_MAX_REC_SHIFT
	.word	CSR_CYC_CLK_ACC_SHIFT
	.word	IEEE1394_BUSID_MAGIC
	.word	.LC0
	.word	node_cap
	.size	remove_host, .-remove_host
	.comm	node_cap,4,4
	.comm	IEEE1394_BUSID_MAGIC,4,4
	.comm	CSR_PMC_SHIFT,4,4
	.comm	CSR_MAX_ROM_SHIFT,4,4
	.comm	CSR_MAX_REC_SHIFT,4,4
	.comm	CSR_ISC_SHIFT,4,4
	.comm	CSR_IRMC_SHIFT,4,4
	.comm	CSR_GENERATION_SHIFT,4,4
	.comm	CSR_CYC_CLK_ACC_SHIFT,4,4
	.comm	CSR_CMC_SHIFT,4,4
	.comm	CSR_BUS_INFO_SIZE,4,4
	.comm	CSR_BMC_SHIFT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
