	.file	"extr_guest.c_cxl_guest_init_adapter.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	cxl_guest_init_adapter
	.type	cxl_guest_init_adapter, @function
cxl_guest_init_adapter:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	eax, eax
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	call	cxl_alloc_adapter@PLT
	test	rax, rax
	je	.L11
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 4
	mov	rbp, rax
	call	kzalloc@PLT
	mov	QWORD PTR 24[rbp], rax
	test	rax, rax
	je	.L13
	mov	QWORD PTR 32[rbp], 0
	mov	rdi, r12
	mov	rsi, rbp
	mov	QWORD PTR [rax], r12
	mov	eax, DWORD PTR release_adapter[rip]
	mov	QWORD PTR 16[rbp], r12
	mov	DWORD PTR 8[rbp], eax
	call	dev_set_drvdata@PLT
	mov	DWORD PTR 0[rbp], 1
	mov	rsi, r13
	mov	rdi, rbp
	call	cxl_of_read_adapter_handle@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L14
.L4:
	mov	rdi, rbp
	call	free_adapter@PLT
.L7:
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	edi, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	ERR_PTR@PLT
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	rsi, r13
	mov	rdi, rbp
	call	cxl_of_read_adapter_properties@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L4
	mov	rdi, rbp
	call	properties_look_ok@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L4
	mov	rdi, rbp
	call	cxl_guest_add_chardev@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L4
	mov	rdi, rbp
	call	cxl_register_adapter@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L5
	mov	rdi, rbp
	call	cxl_sysfs_adapter_add@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L5
	mov	rdi, rbp
	call	cxl_adapter_context_unlock@PLT
	mov	rax, rbp
	pop	rbp
	.cfi_remember_state
	.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
.L13:
	.cfi_restore_state
	mov	rdi, rbp
	call	free_adapter@PLT
.L11:
	mov	edi, DWORD PTR ENOMEM[rip]
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	neg	edi
	jmp	ERR_PTR@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	lea	rdi, 8[rbp]
	call	device_unregister@PLT
	mov	rdi, rbp
	call	cxl_guest_remove_chardev@PLT
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	cxl_guest_init_adapter, .-cxl_guest_init_adapter
	.comm	release_adapter,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,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_guest.c_cxl_guest_init_adapter.c"
	.text
	.align	2
	.global	cxl_guest_init_adapter
	.syntax unified
	.arm
	.fpu softvfp
	.type	cxl_guest_init_adapter, %function
cxl_guest_init_adapter:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r6, r0
	mov	r5, r1
	bl	cxl_alloc_adapter
	subs	r4, r0, #0
	beq	.L11
	ldr	r3, .L15
	mov	r0, #4
	ldr	r1, [r3]
	bl	kzalloc
	cmp	r0, #0
	str	r0, [r4, #12]
	beq	.L13
	mov	r2, #0
	ldr	r3, .L15+4
	str	r2, [r4, #16]
	ldr	r3, [r3]
	mov	r1, r4
	str	r5, [r0]
	stmib	r4, {r3, r5}
	mov	r0, r5
	bl	dev_set_drvdata
	mov	r3, #1
	mov	r1, r6
	mov	r0, r4
	str	r3, [r4]
	bl	cxl_of_read_adapter_handle
	subs	r5, r0, #0
	beq	.L14
.L4:
	mov	r0, r4
	bl	free_adapter
.L7:
	mov	r0, r5
	pop	{r4, r5, r6, lr}
	b	ERR_PTR
.L14:
	mov	r1, r6
	mov	r0, r4
	bl	cxl_of_read_adapter_properties
	subs	r5, r0, #0
	bne	.L4
	mov	r0, r4
	bl	properties_look_ok
	subs	r5, r0, #0
	bne	.L4
	mov	r0, r4
	bl	cxl_guest_add_chardev
	subs	r5, r0, #0
	bne	.L4
	mov	r0, r4
	bl	cxl_register_adapter
	subs	r5, r0, #0
	bne	.L5
	mov	r0, r4
	bl	cxl_sysfs_adapter_add
	subs	r5, r0, #0
	bne	.L5
	mov	r0, r4
	bl	cxl_adapter_context_unlock
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L13:
	mov	r0, r4
	bl	free_adapter
.L11:
	pop	{r4, r5, r6, lr}
	ldr	r3, .L15+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	ERR_PTR
.L5:
	add	r0, r4, #4
	bl	device_unregister
	mov	r0, r4
	bl	cxl_guest_remove_chardev
	b	.L7
.L16:
	.align	2
.L15:
	.word	GFP_KERNEL
	.word	release_adapter
	.word	ENOMEM
	.size	cxl_guest_init_adapter, .-cxl_guest_init_adapter
	.comm	release_adapter,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
