	.file	"extr_tpm_tis.c_tpmtis_attach.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	tpmtis_attach, @function
tpmtis_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	ecx, DWORD PTR RF_ACTIVE[rip]
	mov	esi, DWORD PTR SYS_RES_MEMORY[rip]
	mov	edi, r12d
	mov	DWORD PTR 48[rax], r12d
	lea	rdx, 40[rax]
	mov	rbp, rax
	mov	QWORD PTR 40[rax], 0
	call	bus_alloc_resource_any@PLT
	mov	r13d, DWORD PTR ENXIO[rip]
	mov	QWORD PTR 32[rbp], rax
	test	rax, rax
	je	.L1
	mov	QWORD PTR 24[rbp], 0
	mov	esi, DWORD PTR SYS_RES_IRQ[rip]
	lea	rdx, 24[rbp]
	mov	edi, r12d
	mov	ecx, DWORD PTR RF_ACTIVE[rip]
	or	ecx, DWORD PTR RF_SHAREABLE[rip]
	call	bus_alloc_resource_any@PLT
	mov	QWORD PTR 16[rbp], rax
	mov	rsi, rax
	test	rax, rax
	je	.L4
	sub	rsp, 8
	.cfi_def_cfa_offset 40
	lea	rax, 12[rbp]
	mov	edx, DWORD PTR INTR_TYPE_MISC[rip]
	xor	ecx, ecx
	push	rax
	.cfi_def_cfa_offset 48
	mov	r8d, DWORD PTR tpmtis_intr_handler[rip]
	mov	r9, rbp
	mov	edi, r12d
	or	edx, DWORD PTR INTR_MPSAFE[rip]
	call	bus_setup_intr@PLT
	pop	rdx
	.cfi_def_cfa_offset 40
	pop	rcx
	.cfi_def_cfa_offset 32
	test	rax, rax
	je	.L5
.L4:
	mov	DWORD PTR 0[rbp], 0
.L6:
	mov	eax, DWORD PTR tpmtis_transmit[rip]
	mov	DWORD PTR 4[rbp], -1
	mov	rdi, rbp
	mov	DWORD PTR 8[rbp], eax
	call	tpm20_init@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L12
.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
.L12:
	.cfi_restore_state
	mov	edi, r12d
	call	tpmtis_detach@PLT
	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
.L5:
	.cfi_restore_state
	mov	rdi, rbp
	call	tpmtis_setup_intr@PLT
	mov	DWORD PTR 0[rbp], eax
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	tpmtis_attach, .-tpmtis_attach
	.comm	tpmtis_transmit,4,4
	.comm	tpmtis_intr_handler,4,4
	.comm	SYS_RES_MEMORY,4,4
	.comm	SYS_RES_IRQ,4,4
	.comm	RF_SHAREABLE,4,4
	.comm	RF_ACTIVE,4,4
	.comm	INTR_TYPE_MISC,4,4
	.comm	INTR_MPSAFE,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_tpm_tis.c_tpmtis_attach.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tpmtis_attach, %function
tpmtis_attach:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	sub	sp, sp, #20
	mov	r5, r0
	bl	device_get_softc
	mov	r6, #0
	mov	r2, r0
	ldr	r7, .L15
	ldr	r1, .L15+4
	str	r5, [r0, #32]
	mov	r4, r0
	ldr	r3, [r7]
	mov	r0, r5
	ldr	r1, [r1]
	str	r6, [r2, #28]!
	bl	bus_alloc_resource_any
	cmp	r0, r6
	str	r0, [r4, #24]
	beq	.L12
	mov	r2, r4
	ldr	r3, .L15+8
	ldr	r0, [r7]
	ldr	r3, [r3]
	ldr	r1, .L15+12
	orr	r3, r0, r3
	ldr	r1, [r1]
	mov	r0, r5
	str	r6, [r2, #20]!
	bl	bus_alloc_resource_any
	cmp	r0, #0
	mov	r1, r0
	str	r0, [r4, #16]
	streq	r0, [r4]
	beq	.L6
	ldr	r0, .L15+16
	ldr	r3, .L15+20
	ldr	r2, .L15+24
	ldr	ip, [r0]
	ldr	r2, [r2]
	ldr	r0, [r3]
	add	r3, r4, #12
	str	r0, [sp]
	str	r3, [sp, #8]
	mov	r0, r5
	mov	r3, r6
	str	r4, [sp, #4]
	orr	r2, ip, r2
	bl	bus_setup_intr
	cmp	r0, #0
	strne	r6, [r4]
	beq	.L13
.L6:
	mvn	r2, #0
	ldr	r3, .L15+28
	mov	r0, r4
	ldr	r3, [r3]
	str	r2, [r4, #4]
	str	r3, [r4, #8]
	bl	tpm20_init
	subs	r4, r0, #0
	bne	.L14
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L14:
	mov	r0, r5
	bl	tpmtis_detach
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L12:
	ldr	r3, .L15+32
	ldr	r4, [r3]
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L13:
	mov	r0, r4
	bl	tpmtis_setup_intr
	str	r0, [r4]
	b	.L6
.L16:
	.align	2
.L15:
	.word	RF_ACTIVE
	.word	SYS_RES_MEMORY
	.word	RF_SHAREABLE
	.word	SYS_RES_IRQ
	.word	INTR_TYPE_MISC
	.word	tpmtis_intr_handler
	.word	INTR_MPSAFE
	.word	tpmtis_transmit
	.word	ENXIO
	.size	tpmtis_attach, .-tpmtis_attach
	.comm	tpmtis_transmit,4,4
	.comm	tpmtis_intr_handler,4,4
	.comm	SYS_RES_MEMORY,4,4
	.comm	SYS_RES_IRQ,4,4
	.comm	RF_SHAREABLE,4,4
	.comm	RF_ACTIVE,4,4
	.comm	INTR_TYPE_MISC,4,4
	.comm	INTR_MPSAFE,4,4
	.comm	ENXIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
