	.file	"extr_aw_rsb.c_rsb_attach.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"rsb"
.LC1:
	.string	"cannot enable clock\n"
.LC2:
	.string	"cannot de-assert reset\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"cannot allocate resources for device\n"
	.section	.rodata.str1.1
.LC4:
	.string	"iicbus"
	.section	.rodata.str1.8
	.align 8
.LC5:
	.string	"cannot add iicbus child device\n"
	.text
	.p2align 4
	.type	rsb_attach, @function
rsb_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
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	device_get_softc@PLT
	mov	r13d, DWORD PTR MTX_DEF[rip]
	mov	edi, r12d
	mov	rbp, rax
	call	device_get_nameunit@PLT
	mov	ecx, r13d
	lea	rdx, .LC0[rip]
	mov	rdi, rbp
	mov	esi, eax
	call	mtx_init@PLT
	mov	esi, DWORD PTR compat_data[rip]
	mov	edi, r12d
	call	ofw_bus_search_compatible@PLT
	xor	edx, edx
	xor	esi, esi
	lea	rcx, 8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edi, r12d
	mov	DWORD PTR 40[rbp], eax
	call	clk_get_by_ofw_index@PLT
	test	rax, rax
	jne	.L2
	mov	rdi, QWORD PTR 8[rbp]
	lea	r14, 24[rbp]
	call	clk_enable@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L25
.L3:
	xor	edx, edx
	xor	esi, esi
	lea	rcx, 16[rbp]
	mov	edi, r12d
	call	hwreset_get_by_ofw_idx@PLT
	test	rax, rax
	je	.L26
.L5:
	mov	esi, DWORD PTR rsb_spec[rip]
	mov	rdx, r14
	mov	edi, r12d
	call	bus_alloc_resources@PLT
	test	rax, rax
	jne	.L27
	mov	edx, -1
	lea	rsi, .LC4[rip]
	mov	edi, r12d
	call	device_add_child@PLT
	mov	QWORD PTR 32[rbp], rax
	test	rax, rax
	je	.L28
	mov	edi, r12d
	xor	r13d, r13d
	call	bus_generic_attach@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
.L2:
	.cfi_restore_state
	lea	r14, 24[rbp]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rdi, QWORD PTR 16[rbp]
	call	hwreset_deassert@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L5
	lea	rsi, .LC2[rip]
	mov	edi, r12d
	call	device_printf@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L27:
	lea	rsi, .LC3[rip]
	mov	edi, r12d
	call	device_printf@PLT
	mov	r13d, DWORD PTR ENXIO[rip]
.L4:
	mov	esi, DWORD PTR rsb_spec[rip]
	mov	edi, r12d
	mov	rdx, r14
	call	bus_release_resources@PLT
	mov	rdi, QWORD PTR 16[rbp]
	test	rdi, rdi
	je	.L9
	call	hwreset_release@PLT
.L9:
	mov	rdi, QWORD PTR 8[rbp]
	test	rdi, rdi
	je	.L10
	call	clk_release@PLT
.L10:
	mov	rdi, rbp
	call	mtx_destroy@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
.L25:
	.cfi_restore_state
	lea	rsi, .LC1[rip]
	mov	edi, r12d
	call	device_printf@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L28:
	lea	rsi, .LC5[rip]
	mov	edi, r12d
	call	device_printf@PLT
	mov	r13d, DWORD PTR ENXIO[rip]
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	rsb_attach, .-rsb_attach
	.comm	rsb_spec,4,4
	.comm	compat_data,4,4
	.comm	MTX_DEF,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_aw_rsb.c_rsb_attach.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"rsb\000"
	.align	2
.LC1:
	.ascii	"cannot enable clock\012\000"
	.align	2
.LC2:
	.ascii	"cannot de-assert reset\012\000"
	.align	2
.LC3:
	.ascii	"cannot allocate resources for device\012\000"
	.align	2
.LC4:
	.ascii	"iicbus\000"
	.align	2
.LC5:
	.ascii	"cannot add iicbus child device\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rsb_attach, %function
rsb_attach:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	bl	device_get_softc
	mov	r4, r0
	mov	r0, r5
	bl	device_get_nameunit
	ldr	r3, .L29
	mov	r1, r0
	ldr	r2, .L29+4
	ldr	r3, [r3]
	mov	r0, r4
	bl	mtx_init
	ldr	r3, .L29+8
	mov	r0, r5
	ldr	r1, [r3]
	bl	ofw_bus_search_compatible
	mov	r2, #0
	ldr	r1, [r0]
	add	r3, r4, #4
	str	r1, [r4, #20]
	mov	r0, r5
	mov	r1, r2
	bl	clk_get_by_ofw_index
	cmp	r0, #0
	bne	.L2
	ldr	r0, [r4, #4]
	bl	clk_enable
	subs	r6, r0, #0
	add	r7, r4, #12
	bne	.L25
.L3:
	mov	r2, #0
	mov	r0, r5
	mov	r1, r2
	add	r3, r4, #8
	bl	hwreset_get_by_ofw_idx
	cmp	r0, #0
	beq	.L26
.L5:
	ldr	r8, .L29+12
	mov	r2, r7
	mov	r0, r5
	ldr	r1, [r8]
	bl	bus_alloc_resources
	subs	r6, r0, #0
	bne	.L27
	mvn	r2, #0
	mov	r0, r5
	ldr	r1, .L29+16
	bl	device_add_child
	cmp	r0, #0
	str	r0, [r4, #16]
	beq	.L28
	mov	r0, r5
	bl	bus_generic_attach
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	add	r7, r4, #12
	b	.L3
.L26:
	ldr	r0, [r4, #8]
	bl	hwreset_deassert
	subs	r6, r0, #0
	beq	.L5
	mov	r0, r5
	ldr	r1, .L29+20
	bl	device_printf
	ldr	r8, .L29+12
	b	.L4
.L27:
	mov	r0, r5
	ldr	r1, .L29+24
	bl	device_printf
	ldr	r3, .L29+28
	ldr	r6, [r3]
.L4:
	mov	r2, r7
	mov	r0, r5
	ldr	r1, [r8]
	bl	bus_release_resources
	ldr	r0, [r4, #8]
	cmp	r0, #0
	beq	.L9
	bl	hwreset_release
.L9:
	ldr	r0, [r4, #4]
	cmp	r0, #0
	beq	.L10
	bl	clk_release
.L10:
	mov	r0, r4
	bl	mtx_destroy
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L25:
	mov	r0, r5
	ldr	r1, .L29+32
	bl	device_printf
	ldr	r8, .L29+12
	b	.L4
.L28:
	mov	r0, r5
	ldr	r1, .L29+36
	bl	device_printf
	ldr	r3, .L29+28
	ldr	r6, [r3]
	b	.L4
.L30:
	.align	2
.L29:
	.word	MTX_DEF
	.word	.LC0
	.word	compat_data
	.word	rsb_spec
	.word	.LC4
	.word	.LC2
	.word	.LC3
	.word	ENXIO
	.word	.LC1
	.word	.LC5
	.size	rsb_attach, .-rsb_attach
	.comm	rsb_spec,4,4
	.comm	compat_data,4,4
	.comm	MTX_DEF,4,4
	.comm	ENXIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
