	.file	"extr_ipmi.c_ipmi_attach.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"can't set up interrupt\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"can't establish configuration hook\n"
	.text
	.p2align 4
	.globl	ipmi_attach
	.type	ipmi_attach, @function
ipmi_attach:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	call	device_get_softc@PLT
	mov	rsi, QWORD PTR 32[rax]
	mov	rbp, rax
	test	rsi, rsi
	je	.L2
	mov	r8, QWORD PTR 24[rax]
	test	r8, r8
	je	.L2
	sub	rsp, 8
	.cfi_def_cfa_offset 40
	lea	rax, 16[rax]
	mov	edx, DWORD PTR INTR_TYPE_MISC[rip]
	xor	ecx, ecx
	push	rax
	.cfi_def_cfa_offset 48
	mov	r9, rbp
	mov	edi, r12d
	call	bus_setup_intr@PLT
	mov	r13d, eax
	pop	rax
	.cfi_def_cfa_offset 40
	pop	rdx
	.cfi_def_cfa_offset 32
	test	r13d, r13d
	jne	.L16
.L2:
	mov	rdi, rbp
	mov	esi, 4
	call	bzero@PLT
	mov	eax, DWORD PTR ipmi_startup[rip]
	mov	QWORD PTR 0[rbp], rbp
	mov	rdi, rbp
	mov	DWORD PTR 8[rbp], eax
	call	config_intrhook_establish@PLT
	test	rax, rax
	jne	.L17
	mov	DWORD PTR ipmi_attached[rip], 1
	xor	r13d, r13d
.L1:
	mov	eax, r13d
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	lea	rsi, .LC0[rip]
	mov	edi, r12d
	call	device_printf@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edi, r12d
	lea	rsi, .LC1[rip]
	call	device_printf@PLT
	mov	r13d, DWORD PTR ENOMEM[rip]
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	mov	eax, r13d
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ipmi_attach, .-ipmi_attach
	.comm	ipmi_startup,4,4
	.comm	ipmi_attached,4,4
	.comm	INTR_TYPE_MISC,4,4
	.comm	ENOMEM,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_ipmi.c_ipmi_attach.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"can't set up interrupt\012\000"
	.align	2
.LC1:
	.ascii	"can't establish configuration hook\012\000"
	.text
	.align	2
	.global	ipmi_attach
	.syntax unified
	.arm
	.fpu softvfp
	.type	ipmi_attach, %function
ipmi_attach:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	sub	sp, sp, #16
	mov	r6, r0
	bl	device_get_softc
	ldr	r1, [r0, #16]
	mov	r4, r0
	cmp	r1, #0
	beq	.L2
	ldr	r3, [r0, #12]
	cmp	r3, #0
	beq	.L2
	stm	sp, {r3, r4}
	ldr	r2, .L18
	add	r0, r0, #8
	ldr	r2, [r2]
	mov	r3, #0
	str	r0, [sp, #8]
	mov	r0, r6
	bl	bus_setup_intr
	subs	r5, r0, #0
	bne	.L16
.L2:
	mov	r1, #4
	mov	r0, r4
	bl	bzero
	ldr	r3, .L18+4
	mov	r0, r4
	ldr	r3, [r3]
	str	r4, [r4]
	str	r3, [r4, #4]
	bl	config_intrhook_establish
	subs	r5, r0, #0
	bne	.L17
	mov	r2, #1
	ldr	r3, .L18+8
	str	r2, [r3]
.L1:
	mov	r0, r5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L16:
	mov	r0, r6
	ldr	r1, .L18+12
	bl	device_printf
	b	.L1
.L17:
	mov	r0, r6
	ldr	r1, .L18+16
	bl	device_printf
	ldr	r3, .L18+20
	ldr	r5, [r3]
	mov	r0, r5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L19:
	.align	2
.L18:
	.word	INTR_TYPE_MISC
	.word	ipmi_startup
	.word	ipmi_attached
	.word	.LC0
	.word	.LC1
	.word	ENOMEM
	.size	ipmi_attach, .-ipmi_attach
	.comm	ipmi_startup,4,4
	.comm	ipmi_attached,4,4
	.comm	INTR_TYPE_MISC,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
