	.file	"extr_ps3pic.c_ps3pic_attach.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ps3pic_attach, @function
ps3pic_attach:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	device_get_softc@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	xor	ecx, ecx
	mov	edi, 128
	mov	rbx, rax
	mov	eax, DWORD PTR PAGE_SIZE[rip]
	mov	r8d, DWORD PTR BUS_SPACE_MAXADDR[rip]
	mov	r9d, 64
	mov	esi, DWORD PTR M_PS3PIC[rip]
	mov	edx, DWORD PTR M_NOWAIT[rip]
	push	rax
	.cfi_def_cfa_offset 64
	or	edx, DWORD PTR M_ZERO[rip]
	call	contigmalloc@PLT
	lea	rdi, 20[rsp]
	lea	rdx, 4[rax]
	mov	QWORD PTR 24[rbx], rax
	mov	QWORD PTR 40[rbx], rdx
	lea	rdx, 8[rax]
	add	rax, 12
	mov	QWORD PTR 16[rbx], rdx
	mov	QWORD PTR 32[rbx], rax
	call	lv1_get_logical_ppe_id@PLT
	xor	eax, eax
	call	mfctrl@PLT
	mov	edi, eax
	call	fls@PLT
	mov	rdi, QWORD PTR 24[rbx]
	mov	r12d, eax
	call	vtophys@PLT
	mov	edi, DWORD PTR 20[rsp]
	mov	esi, 32
	sub	esi, r12d
	mov	edx, eax
	call	lv1_configure_irq_state_bitmap@PLT
	mov	DWORD PTR [rbx], 63
	xor	esi, esi
	mov	edi, ebp
	mov	r8d, DWORD PTR FALSE[rip]
	mov	edx, 63
	mov	ecx, 1
	call	powerpc_register_pic@PLT
	pop	rax
	.cfi_def_cfa_offset 56
	pop	rdx
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L5
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ps3pic_attach, .-ps3pic_attach
	.comm	PAGE_SIZE,4,4
	.comm	M_ZERO,4,4
	.comm	M_PS3PIC,4,4
	.comm	M_NOWAIT,4,4
	.comm	FALSE,4,4
	.comm	BUS_SPACE_MAXADDR,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_ps3pic.c_ps3pic_attach.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ps3pic_attach, %function
ps3pic_attach:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L6
	sub	sp, sp, #28
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r5, r0
	bl	device_get_softc
	mov	r1, #64
	mov	r4, r0
	ldr	ip, .L6+4
	ldr	r0, .L6+8
	ldr	ip, [ip]
	ldr	r0, [r0]
	ldr	r2, .L6+12
	ldr	r3, .L6+16
	ldr	r2, [r2]
	ldr	r3, [r3]
	stm	sp, {r0, r1, ip}
	orr	r2, r2, r3
	ldr	r3, .L6+20
	mov	r0, #128
	ldr	r1, [r3]
	mov	r3, #0
	bl	contigmalloc
	add	r3, r0, #12
	add	r1, r0, #4
	add	r2, r0, #8
	str	r3, [r4, #16]
	str	r1, [r4, #20]
	str	r2, [r4, #8]
	str	r0, [r4, #12]
	add	r0, sp, #16
	bl	lv1_get_logical_ppe_id
	bl	mfctrl
	bl	fls
	mov	r6, r0
	ldr	r0, [r4, #12]
	ldr	r7, [sp, #16]
	bl	vtophys
	rsb	r1, r6, #32
	mov	r2, r0
	mov	r0, r7
	bl	lv1_configure_irq_state_bitmap
	mov	r2, #63
	ldr	r3, .L6+24
	mov	r0, r5
	ldr	r3, [r3]
	mov	r1, #0
	str	r2, [r4]
	str	r3, [sp]
	mov	r3, #1
	bl	powerpc_register_pic
	ldr	r3, .L6
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L5
	mov	r0, #0
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L5:
	bl	__stack_chk_fail
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	PAGE_SIZE
	.word	BUS_SPACE_MAXADDR
	.word	M_NOWAIT
	.word	M_ZERO
	.word	M_PS3PIC
	.word	FALSE
	.size	ps3pic_attach, .-ps3pic_attach
	.comm	PAGE_SIZE,4,4
	.comm	M_ZERO,4,4
	.comm	M_PS3PIC,4,4
	.comm	M_NOWAIT,4,4
	.comm	FALSE,4,4
	.comm	BUS_SPACE_MAXADDR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
