	.file	"extr_hpsa.c_hpsa_add_sas_host.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	hpsa_add_sas_host, @function
hpsa_add_sas_host:
.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
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	mov	rdi, QWORD PTR 16[rdi]
	call	hpsa_alloc_sas_node@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	test	rax, rax
	je	.L1
	mov	esi, DWORD PTR 8[rbx]
	mov	rdi, rax
	mov	rbp, rax
	call	hpsa_alloc_sas_port@PLT
	mov	r12d, DWORD PTR ENODEV[rip]
	mov	r13, rax
	neg	r12d
	test	rax, rax
	je	.L5
	mov	rdi, rax
	call	hpsa_alloc_sas_phy@PLT
	mov	r12d, DWORD PTR ENODEV[rip]
	mov	r14, rax
	neg	r12d
	test	rax, rax
	je	.L7
	mov	rdi, rax
	call	hpsa_sas_port_add_phy@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L11
	mov	QWORD PTR [rbx], rbp
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rdi, r14
	call	hpsa_free_sas_phy@PLT
.L7:
	mov	rdi, r13
	call	hpsa_free_sas_port@PLT
.L5:
	mov	rdi, rbp
	call	hpsa_free_sas_node@PLT
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	ret
	.cfi_endproc
.LFE0:
	.size	hpsa_add_sas_host, .-hpsa_add_sas_host
	.comm	ENOMEM,4,4
	.comm	ENODEV,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_hpsa.c_hpsa_add_sas_host.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hpsa_add_sas_host, %function
hpsa_add_sas_host:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r0, [r0, #8]
	bl	hpsa_alloc_sas_node
	subs	r7, r0, #0
	beq	.L11
	ldr	r1, [r4, #4]
	bl	hpsa_alloc_sas_port
	subs	r6, r0, #0
	beq	.L12
	bl	hpsa_alloc_sas_phy
	subs	r8, r0, #0
	beq	.L13
	bl	hpsa_sas_port_add_phy
	subs	r5, r0, #0
	streq	r7, [r4]
	bne	.L14
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r3, .L15
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L5:
	mov	r0, r7
	bl	hpsa_free_sas_node
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	ldr	r3, .L15+4
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	ldr	r3, .L15
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L7:
	mov	r0, r6
	bl	hpsa_free_sas_port
	b	.L5
.L14:
	mov	r0, r8
	bl	hpsa_free_sas_phy
	b	.L7
.L16:
	.align	2
.L15:
	.word	ENODEV
	.word	ENOMEM
	.size	hpsa_add_sas_host, .-hpsa_add_sas_host
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
