	.file	"extr_bus.c_nsim_bus_dev_new.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	nsim_bus_dev_new, @function
nsim_bus_dev_new:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, edi
	mov	edi, 32
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, esi
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	call	kzalloc@PLT
	test	rax, rax
	je	.L7
	mov	ecx, DWORD PTR GFP_KERNEL[rip]
	mov	edx, r12d
	mov	esi, r12d
	mov	rbp, rax
	lea	rdi, nsim_bus_dev_ids[rip]
	call	ida_alloc_range@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L3
	mov	DWORD PTR 8[rbp], eax
	lea	rax, nsim_bus[rip]
	lea	rdi, 8[rbp]
	mov	QWORD PTR 24[rbp], rax
	lea	rax, nsim_bus_dev_type[rip]
	mov	QWORD PTR 16[rbp], rax
	mov	DWORD PTR 0[rbp], ebx
	call	device_register@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L8
	mov	rax, rbp
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	esi, DWORD PTR 8[rbp]
	lea	rdi, nsim_bus_dev_ids[rip]
	call	ida_free@PLT
.L3:
	mov	rdi, rbp
	call	kfree@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	edi, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	ERR_PTR@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	edi, DWORD PTR ENOMEM[rip]
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	edi
	jmp	ERR_PTR@PLT
	.cfi_endproc
.LFE0:
	.size	nsim_bus_dev_new, .-nsim_bus_dev_new
	.comm	nsim_bus_dev_type,4,4
	.comm	nsim_bus_dev_ids,4,4
	.comm	nsim_bus,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_bus.c_nsim_bus_dev_new.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nsim_bus_dev_new, %function
nsim_bus_dev_new:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, .L9
	mov	r5, r0
	mov	r7, r1
	mov	r0, #16
	ldr	r1, [r6]
	bl	kzalloc
	subs	r4, r0, #0
	beq	.L7
	mov	r2, r5
	mov	r1, r5
	ldr	r3, [r6]
	ldr	r0, .L9+4
	bl	ida_alloc_range
	subs	r5, r0, #0
	blt	.L3
	mov	r0, r4
	ldr	r2, .L9+8
	ldr	r3, .L9+12
	str	r5, [r4, #4]
	str	r2, [r4, #12]
	str	r3, [r4, #8]
	str	r7, [r0], #4
	bl	device_register
	subs	r5, r0, #0
	bne	.L8
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	ldr	r1, [r4, #4]
	ldr	r0, .L9+4
	bl	ida_free
.L3:
	mov	r0, r4
	bl	kfree
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, lr}
	b	ERR_PTR
.L7:
	ldr	r3, .L9+16
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	ERR_PTR
.L10:
	.align	2
.L9:
	.word	GFP_KERNEL
	.word	nsim_bus_dev_ids
	.word	nsim_bus
	.word	nsim_bus_dev_type
	.word	ENOMEM
	.size	nsim_bus_dev_new, .-nsim_bus_dev_new
	.comm	nsim_bus_dev_type,4,4
	.comm	nsim_bus_dev_ids,4,4
	.comm	nsim_bus,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
