	.file	"extr_smartpqi_cam.c_os_add_device.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"IN\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"rescan failed (can't allocate CCB)\n"
	.align 8
.LC2:
	.string	"rescan failed (can't create path)\n"
	.section	.rodata.str1.1
.LC3:
	.string	"OUT\n"
	.text
	.p2align 4
	.globl	os_add_device
	.type	os_add_device, @function
os_add_device:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	lea	rdi, .LC0[rip]
	call	DBG_FUNC@PLT
	cmp	QWORD PTR 8[rbx], 0
	je	.L2
	xor	eax, eax
	call	xpt_alloc_ccb_nowait@PLT
	mov	r12, rax
	test	rax, rax
	je	.L7
	mov	edi, DWORD PTR [rbx]
	mov	r14d, DWORD PTR 0[rbp]
	mov	r13d, DWORD PTR 4[rbp]
	call	cam_sim_path@PLT
	xor	esi, esi
	mov	r8d, r14d
	mov	rdi, r12
	mov	edx, eax
	mov	ecx, r13d
	call	xpt_create_path@PLT
	cmp	rax, QWORD PTR CAM_REQ_CMP[rip]
	je	.L4
	lea	rdi, .LC2[rip]
	call	DBG_ERR@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, r12
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	xpt_free_ccb@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rdi, r12
	call	xpt_rescan@PLT
.L2:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	lea	rdi, .LC3[rip]
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	DBG_FUNC@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	pop	rbx
	.cfi_def_cfa_offset 40
	lea	rdi, .LC1[rip]
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	DBG_ERR@PLT
	.cfi_endproc
.LFE0:
	.size	os_add_device, .-os_add_device
	.comm	CAM_REQ_CMP,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_smartpqi_cam.c_os_add_device.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"IN\012\000"
	.align	2
.LC1:
	.ascii	"rescan failed (can't allocate CCB)\012\000"
	.align	2
.LC2:
	.ascii	"rescan failed (can't create path)\012\000"
	.align	2
.LC3:
	.ascii	"OUT\012\000"
	.text
	.align	2
	.global	os_add_device
	.syntax unified
	.arm
	.fpu softvfp
	.type	os_add_device, %function
os_add_device:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	sub	sp, sp, #8
	ldr	r0, .L11
	mov	r5, r1
	bl	DBG_FUNC
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L2
	bl	xpt_alloc_ccb_nowait
	subs	r6, r0, #0
	beq	.L10
	ldr	r0, [r4]
	bl	cam_sim_path
	ldr	r3, [r5]
	mov	r2, r0
	str	r3, [sp]
	ldr	r3, [r5, #4]
	mov	r1, #0
	mov	r0, r6
	bl	xpt_create_path
	ldr	r3, .L11+4
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L4
	ldr	r0, .L11+8
	bl	DBG_ERR
	mov	r0, r6
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, lr}
	b	xpt_free_ccb
.L4:
	mov	r0, r6
	bl	xpt_rescan
.L2:
	ldr	r0, .L11+12
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, lr}
	b	DBG_FUNC
.L10:
	ldr	r0, .L11+16
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, lr}
	b	DBG_ERR
.L12:
	.align	2
.L11:
	.word	.LC0
	.word	CAM_REQ_CMP
	.word	.LC2
	.word	.LC3
	.word	.LC1
	.size	os_add_device, .-os_add_device
	.comm	CAM_REQ_CMP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
