	.file	"extr_pci-common.c_get_phb_number.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"ibm,opal-phbid"
.LC1:
	.string	"reg"
	.text
	.p2align 4
	.type	get_phb_number, @function
get_phb_number:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	rsi, .LC0[rip]
	mov	r12, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	rdx, 4[rsp]
	call	of_property_read_u64@PLT
	test	eax, eax
	jne	.L18
.L2:
	mov	esi, DWORD PTR MAX_PHBS[rip]
	mov	edi, DWORD PTR phb_bitmap[rip]
	lea	r12d, -1[rsi]
	and	r12d, DWORD PTR 4[rsp]
	jns	.L19
.L3:
	call	find_first_zero_bit@PLT
	xor	edi, edi
	cmp	DWORD PTR MAX_PHBS[rip], eax
	setle	dil
	mov	r12d, eax
	call	BUG_ON@PLT
	mov	esi, DWORD PTR phb_bitmap[rip]
	mov	edi, r12d
	call	set_bit@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L20
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	mov	esi, edi
	mov	edi, r12d
	call	test_and_set_bit@PLT
	test	eax, eax
	je	.L1
	mov	esi, DWORD PTR MAX_PHBS[rip]
	mov	edi, DWORD PTR phb_bitmap[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L18:
	mov	edx, 1
	mov	rcx, rsp
	lea	rsi, .LC1[rip]
	mov	rdi, r12
	call	of_property_read_u32_index@PLT
	mov	edx, DWORD PTR [rsp]
	mov	DWORD PTR 4[rsp], edx
	test	eax, eax
	je	.L2
	mov	esi, DWORD PTR MAX_PHBS[rip]
	mov	edi, DWORD PTR phb_bitmap[rip]
	jmp	.L3
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	get_phb_number, .-get_phb_number
	.comm	phb_bitmap,4,4
	.comm	MAX_PHBS,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_pci-common.c_get_phb_number.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ibm,opal-phbid\000"
	.align	2
.LC1:
	.ascii	"reg\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_phb_number, %function
get_phb_number:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L20
	sub	sp, sp, #16
	ldr	r1, .L20+4
	add	r2, sp, #8
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r4, r0
	bl	of_property_read_u64
	cmp	r0, #0
	ldr	r6, .L20+8
	bne	.L17
.L2:
	ldr	r1, [r6]
	ldr	r0, [sp, #8]
	ldr	r5, .L20+12
	sub	r4, r1, #1
	ands	r4, r4, r0
	ldr	r0, [r5]
	bpl	.L18
.L3:
	bl	find_first_zero_bit
	mov	r4, r0
	ldr	r0, [r6]
	cmp	r0, r4
	movgt	r0, #0
	movle	r0, #1
	bl	BUG_ON
	mov	r0, r4
	ldr	r1, [r5]
	bl	set_bit
.L1:
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	mov	r0, r4
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L18:
	mov	r1, r0
	mov	r0, r4
	bl	test_and_set_bit
	cmp	r0, #0
	beq	.L1
	ldr	r1, [r6]
	ldr	r0, [r5]
	b	.L3
.L17:
	add	r3, sp, #4
	mov	r0, r4
	mov	r2, #1
	ldr	r1, .L20+16
	bl	of_property_read_u32_index
	ldr	r3, [sp, #4]
	cmp	r0, #0
	str	r3, [sp, #8]
	beq	.L2
	ldr	r5, .L20+12
	ldr	r1, [r6]
	ldr	r0, [r5]
	b	.L3
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC2
	.word	.LC0
	.word	MAX_PHBS
	.word	phb_bitmap
	.word	.LC1
	.size	get_phb_number, .-get_phb_number
	.comm	phb_bitmap,4,4
	.comm	MAX_PHBS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
