	.file	"extr_pswitch.c_pswitch_attach.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"device_type"
.LC1:
	.string	"programmer-switch"
.LC2:
	.string	"could not get interrupt\n"
.LC3:
	.string	"could not allocate interrupt\n"
.LC4:
	.string	"could not setup interrupt\n"
.LC5:
	.string	"could not find correct node\n"
.LC6:
	.string	"interrupts"
	.text
	.p2align 4
	.type	pswitch_attach, @function
pswitch_attach:
.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
	mov	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 64
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	call	device_get_softc@PLT
	mov	edi, r12d
	mov	r13, rax
	call	macio_get_node@PLT
	mov	rdi, rax
	call	OF_child@PLT
	test	rax, rax
	je	.L2
	mov	rbp, rax
	lea	rbx, 16[rsp]
	lea	r14, .LC0[rip]
	.p2align 4,,10
	.p2align 3
.L4:
	mov	ecx, 32
	mov	rdx, rbx
	mov	rsi, r14
	mov	rdi, rbp
	call	OF_getprop@PLT
	cmp	eax, -1
	je	.L6
	lea	rsi, .LC1[rip]
	mov	rdi, rbx
	call	strcmp@PLT
	test	rax, rax
	je	.L21
.L6:
	mov	rdi, rbp
	call	OF_peer@PLT
	mov	rbp, rax
	test	rax, rax
	jne	.L4
.L2:
	lea	rsi, .LC5[rip]
	mov	edi, r12d
	call	device_printf@PLT
	mov	eax, DWORD PTR ENXIO[rip]
.L1:
	mov	rcx, QWORD PTR 56[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L22
	add	rsp, 64
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	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
.L21:
	.cfi_restore_state
	lea	rdx, 14[rsp]
	mov	ecx, 2
	lea	rsi, .LC6[rip]
	mov	rdi, rbp
	call	OF_getprop@PLT
	cmp	eax, -1
	je	.L23
	movsx	ecx, BYTE PTR 14[rsp]
	sub	rsp, 8
	.cfi_def_cfa_offset 120
	mov	edi, r12d
	lea	rdx, 8[r13]
	mov	eax, DWORD PTR RF_ACTIVE[rip]
	mov	QWORD PTR 8[r13], 0
	mov	r9d, 1
	mov	esi, DWORD PTR SYS_RES_IRQ[rip]
	mov	r8d, ecx
	push	rax
	.cfi_def_cfa_offset 128
	call	bus_alloc_resource@PLT
	mov	QWORD PTR 0[r13], rax
	mov	rsi, rax
	pop	rcx
	.cfi_def_cfa_offset 120
	pop	rdi
	.cfi_def_cfa_offset 112
	test	rax, rax
	je	.L24
	sub	rsp, 8
	.cfi_def_cfa_offset 120
	lea	rax, 16[r13]
	xor	r8d, r8d
	mov	r9d, r12d
	mov	edx, DWORD PTR INTR_TYPE_MISC[rip]
	mov	ecx, DWORD PTR pswitch_intr[rip]
	push	rax
	.cfi_def_cfa_offset 128
	mov	edi, r12d
	call	bus_setup_intr@PLT
	mov	r8, rax
	pop	rax
	.cfi_def_cfa_offset 120
	xor	eax, eax
	pop	rdx
	.cfi_def_cfa_offset 112
	test	r8, r8
	je	.L1
	lea	rsi, .LC4[rip]
	mov	edi, r12d
	call	device_printf@PLT
	mov	rdx, QWORD PTR 8[r13]
	mov	rcx, QWORD PTR 0[r13]
	mov	edi, r12d
	mov	esi, DWORD PTR SYS_RES_IRQ[rip]
	call	bus_release_resource@PLT
	mov	eax, DWORD PTR ENXIO[rip]
	jmp	.L1
.L24:
	lea	rsi, .LC3[rip]
	mov	edi, r12d
	call	device_printf@PLT
	mov	eax, DWORD PTR ENXIO[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rsi, .LC2[rip]
	mov	edi, r12d
	call	device_printf@PLT
	mov	eax, DWORD PTR ENXIO[rip]
	jmp	.L1
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pswitch_attach, .-pswitch_attach
	.comm	pswitch_intr,4,4
	.comm	SYS_RES_IRQ,4,4
	.comm	RF_ACTIVE,4,4
	.comm	INTR_TYPE_MISC,4,4
	.comm	ENXIO,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_pswitch.c_pswitch_attach.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"device_type\000"
	.align	2
.LC1:
	.ascii	"programmer-switch\000"
	.align	2
.LC2:
	.ascii	"could not get interrupt\012\000"
	.align	2
.LC3:
	.ascii	"could not allocate interrupt\012\000"
	.align	2
.LC4:
	.ascii	"could not setup interrupt\012\000"
	.align	2
.LC5:
	.ascii	"could not find correct node\012\000"
	.align	2
.LC6:
	.ascii	"interrupts\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pswitch_attach, %function
pswitch_attach:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L27
	sub	sp, sp, #60
	ldr	r3, [r3]
	str	r3, [sp, #52]
	mov	r3,#0
	mov	r7, r0
	bl	device_get_softc
	mov	r8, r0
	mov	r0, r7
	bl	macio_get_node
	bl	OF_child
	subs	r4, r0, #0
	beq	.L2
	ldr	r6, .L27+4
	ldr	r9, .L27+8
.L5:
	mov	r3, #32
	mov	r1, r6
	mov	r0, r4
	add	r2, sp, #20
	bl	OF_getprop
	cmn	r0, #1
	beq	.L3
	mov	r1, r9
	add	r0, sp, #20
	bl	strcmp
	subs	r5, r0, #0
	beq	.L4
.L3:
	mov	r0, r4
	bl	OF_peer
	subs	r4, r0, #0
	bne	.L5
.L2:
	mov	r0, r7
	ldr	r1, .L27+12
	bl	device_printf
	ldr	r3, .L27+16
	ldr	r0, [r3]
.L1:
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [sp, #52]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	add	sp, sp, #60
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L4:
	mov	r0, r4
	mov	r3, #2
	ldr	r1, .L27+20
	add	r2, sp, #16
	bl	OF_getprop
	cmn	r0, #1
	beq	.L25
	mov	r2, r8
	mov	r1, #1
	ldr	r0, .L27+24
	ldrb	r3, [sp, #16]	@ zero_extendqisi2
	ldr	r0, [r0]
	ldr	r4, .L27+28
	str	r5, [r2, #4]!
	str	r0, [sp, #8]
	str	r1, [sp, #4]
	str	r3, [sp]
	ldr	r1, [r4]
	mov	r0, r7
	bl	bus_alloc_resource
	cmp	r0, #0
	mov	r1, r0
	str	r0, [r8]
	beq	.L26
	stm	sp, {r5, r7}
	ldr	r3, .L27+32
	ldr	r2, .L27+36
	add	r0, r8, #8
	ldr	r3, [r3]
	ldr	r2, [r2]
	str	r0, [sp, #8]
	mov	r0, r7
	bl	bus_setup_intr
	cmp	r0, #0
	beq	.L1
	ldr	r1, .L27+40
	mov	r0, r7
	bl	device_printf
	ldr	r3, [r8]
	mov	r0, r7
	ldr	r1, [r4]
	ldr	r2, [r8, #4]
	bl	bus_release_resource
	ldr	r3, .L27+16
	ldr	r0, [r3]
	b	.L1
.L26:
	mov	r0, r7
	ldr	r1, .L27+44
	bl	device_printf
	ldr	r3, .L27+16
	ldr	r0, [r3]
	b	.L1
.L25:
	mov	r0, r7
	ldr	r1, .L27+48
	bl	device_printf
	ldr	r3, .L27+16
	ldr	r0, [r3]
	b	.L1
.L24:
	bl	__stack_chk_fail
.L28:
	.align	2
.L27:
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC5
	.word	ENXIO
	.word	.LC6
	.word	RF_ACTIVE
	.word	SYS_RES_IRQ
	.word	pswitch_intr
	.word	INTR_TYPE_MISC
	.word	.LC4
	.word	.LC3
	.word	.LC2
	.size	pswitch_attach, .-pswitch_attach
	.comm	pswitch_intr,4,4
	.comm	SYS_RES_IRQ,4,4
	.comm	RF_ACTIVE,4,4
	.comm	INTR_TYPE_MISC,4,4
	.comm	ENXIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
