	.file	"extr_nvbl.c_nvbl_attach.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Could not alloc mem resource!\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"level"
.LC2:
	.string	"Backlight level (0-100)"
.LC3:
	.string	"I"
	.text
	.p2align 4
	.type	nvbl_attach, @function
nvbl_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
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	device_get_softc@PLT
	mov	esi, DWORD PTR SYS_RES_MEMORY[rip]
	mov	ecx, DWORD PTR RF_ACTIVE[rip]
	mov	edi, ebp
	or	ecx, DWORD PTR RF_SHAREABLE[rip]
	lea	rdx, 4[rsp]
	mov	rbx, rax
	mov	DWORD PTR 4[rsp], 16
	call	bus_alloc_resource_any@PLT
	mov	QWORD PTR [rbx], rax
	test	rax, rax
	je	.L8
	mov	rdi, rax
	mov	rax, QWORD PTR NVIDIA_MMIO_PMC[rip]
	lea	rsi, 4[rax]
	call	bus_read_stream_4@PLT
	test	eax, 16777217
	je	.L9
.L4:
	mov	edi, ebp
	call	device_get_sysctl_ctx@PLT
	mov	edi, ebp
	mov	r12, rax
	call	device_get_sysctl_tree@PLT
	mov	r14d, DWORD PTR nvbl_sysctl[rip]
	mov	ebp, DWORD PTR CTLTYPE_INT[rip]
	mov	rdi, rax
	mov	r13d, DWORD PTR OID_AUTO[rip]
	or	ebp, DWORD PTR CTLFLAG_RW[rip]
	call	SYSCTL_CHILDREN@PLT
	mov	r9, rbx
	mov	r8d, ebp
	mov	rdi, r12
	mov	esi, eax
	lea	rax, .LC2[rip]
	lea	rcx, .LC1[rip]
	mov	edx, r13d
	push	rax
	.cfi_def_cfa_offset 72
	lea	rax, .LC3[rip]
	push	rax
	.cfi_def_cfa_offset 80
	push	r14
	.cfi_def_cfa_offset 88
	push	0
	.cfi_def_cfa_offset 96
	call	SYSCTL_ADD_PROC@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 64
	xor	eax, eax
.L1:
	mov	rbx, QWORD PTR 8[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L10
	add	rsp, 16
	.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
.L9:
	.cfi_restore_state
	mov	rax, QWORD PTR NVIDIA_MMIO_PMC[rip]
	mov	rdi, QWORD PTR [rbx]
	mov	edx, 16777217
	lea	rsi, 4[rax]
	call	bus_write_stream_4@PLT
	xor	eax, eax
	call	mb@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	lea	rsi, .LC0[rip]
	mov	edi, ebp
	call	device_printf@PLT
	mov	eax, DWORD PTR ENXIO[rip]
	jmp	.L1
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	nvbl_attach, .-nvbl_attach
	.comm	nvbl_sysctl,4,4
	.comm	SYS_RES_MEMORY,4,4
	.comm	RF_SHAREABLE,4,4
	.comm	RF_ACTIVE,4,4
	.comm	OID_AUTO,4,4
	.comm	NVIDIA_MMIO_PMC,8,8
	.comm	ENXIO,4,4
	.comm	CTLTYPE_INT,4,4
	.comm	CTLFLAG_RW,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_nvbl.c_nvbl_attach.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Could not alloc mem resource!\012\000"
	.align	2
.LC1:
	.ascii	"level\000"
	.align	2
.LC2:
	.ascii	"Backlight level (0-100)\000"
	.align	2
.LC3:
	.ascii	"I\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nvbl_attach, %function
nvbl_attach:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L11
	sub	sp, sp, #32
	mov	r4, r0
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	bl	device_get_softc
	mov	ip, #16
	ldr	r2, .L11+4
	ldr	r3, .L11+8
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, .L11+12
	mov	r5, r0
	orr	r3, r1, r3
	mov	r0, r4
	ldr	r1, [r2]
	add	r2, sp, #24
	str	ip, [sp, #24]
	bl	bus_alloc_resource_any
	cmp	r0, #0
	str	r0, [r5]
	beq	.L8
	ldr	r6, .L11+16
	ldr	r1, [r6]
	add	r1, r1, #4
	bl	bus_read_stream_4
	ldr	r2, .L11+20
	tst	r0, r2
	beq	.L9
.L4:
	mov	r0, r4
	bl	device_get_sysctl_ctx
	mov	r6, r0
	mov	r0, r4
	bl	device_get_sysctl_tree
	bl	SYSCTL_CHILDREN
	mov	r4, #0
	ldr	r2, .L11+24
	ldr	r3, .L11+28
	mov	r1, r0
	ldr	r3, [r3]
	ldr	r0, [r2]
	ldr	r2, .L11+32
	orr	r3, r3, r0
	ldr	lr, [r2]
	ldr	ip, .L11+36
	str	r3, [sp]
	ldr	r2, .L11+40
	ldr	r3, .L11+44
	str	r5, [sp, #4]
	str	lr, [sp, #12]
	str	r4, [sp, #8]
	ldr	r2, [r2]
	mov	r0, r6
	str	r3, [sp, #16]
	str	ip, [sp, #20]
	ldr	r3, .L11+48
	bl	SYSCTL_ADD_PROC
	mov	r0, r4
.L1:
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, pc}
.L9:
	ldr	r1, [r6]
	ldr	r0, [r5]
	add	r1, r1, #4
	bl	bus_write_stream_4
	bl	mb
	b	.L4
.L8:
	mov	r0, r4
	ldr	r1, .L11+52
	bl	device_printf
	ldr	r3, .L11+56
	ldr	r0, [r3]
	b	.L1
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC4
	.word	RF_ACTIVE
	.word	RF_SHAREABLE
	.word	SYS_RES_MEMORY
	.word	NVIDIA_MMIO_PMC
	.word	16777217
	.word	CTLFLAG_RW
	.word	CTLTYPE_INT
	.word	nvbl_sysctl
	.word	.LC2
	.word	OID_AUTO
	.word	.LC3
	.word	.LC1
	.word	.LC0
	.word	ENXIO
	.size	nvbl_attach, .-nvbl_attach
	.comm	nvbl_sysctl,4,4
	.comm	SYS_RES_MEMORY,4,4
	.comm	RF_SHAREABLE,4,4
	.comm	RF_ACTIVE,4,4
	.comm	OID_AUTO,4,4
	.comm	NVIDIA_MMIO_PMC,4,4
	.comm	ENXIO,4,4
	.comm	CTLTYPE_INT,4,4
	.comm	CTLFLAG_RW,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
