	.file	"572818.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"./backlight"
	.section	.data.rel.local,"aw"
	.align 8
	.type	argv0, @object
	.size	argv0, 8
argv0:
	.quad	.LC0
	.section	.rodata
	.align 8
.LC1:
	.string	"/sys/devices/platform/backlight/backlight/backlight/brightness"
	.section	.data.rel.local
	.align 8
	.type	backlight_file, @object
	.size	backlight_file, 8
backlight_file:
	.quad	.LC1
	.section	.rodata
	.align 8
.LC2:
	.string	"/sys/devices/platform/backlight/backlight/backlight/max_brightness"
	.section	.data.rel.local
	.align 8
	.type	max_backlight_file, @object
	.size	max_backlight_file, 8
max_backlight_file:
	.quad	.LC2
	.globl	max_brightness
	.data
	.align 4
	.type	max_brightness, @object
	.size	max_brightness, 4
max_brightness:
	.long	10
	.section	.rodata
.LC3:
	.string	"usage: %s COMMAND [VALUE]\n"
.LC4:
	.string	"  COMMAND = {get, set}"
	.align 8
.LC5:
	.string	"    get         ... prints current raw backlight level"
	.align 8
.LC6:
	.string	"    get_percent ... prints current percentage backlight level"
	.align 8
.LC7:
	.string	"    set         ... sets backlight level to raw VALUE_RAW"
	.align 8
.LC8:
	.string	"    set_percent ... sets backlight level to percentage VALUE_PCT"
.LC9:
	.string	"  VALUE_RAW = [0..%d]\n"
.LC10:
	.string	"  VALUE_PCT = [0..100]"
	.text
	.globl	print_usage
	.type	print_usage, @function
print_usage:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR argv0[rip]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	eax, DWORD PTR max_brightness[rip]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC10[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_usage, .-print_usage
	.globl	print_usage_and_fail
	.type	print_usage_and_fail, @function
print_usage_and_fail:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	print_usage
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	print_usage_and_fail, .-print_usage_and_fail
	.section	.rodata
.LC11:
	.string	"r"
	.align 8
.LC12:
	.string	"Cannot open file '%s' for reading. Using the default max brightness '%d'.\n"
.LC13:
	.string	"%d"
	.text
	.globl	read_max_brightness
	.type	read_max_brightness, @function
read_max_brightness:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	rax, QWORD PTR max_backlight_file[rip]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L4
	mov	ecx, DWORD PTR max_brightness[rip]
	mov	rdx, QWORD PTR max_backlight_file[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L3
.L4:
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, max_brightness[rip]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	read_max_brightness, .-read_max_brightness
	.section	.rodata
	.align 8
.LC14:
	.string	"Cannot open file '%s' for reading.\n"
.LC15:
	.string	"%d\n"
.LC16:
	.string	"%s"
	.text
	.globl	command_get
	.type	command_get, @function
command_get:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 72
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	eax, edi
	mov	BYTE PTR -100[rbp], al
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	mov	rax, QWORD PTR backlight_file[rip]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -80[rbp], rax
	cmp	QWORD PTR -80[rbp], 0
	jne	.L7
	mov	rdx, QWORD PTR backlight_file[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	DWORD PTR -88[rbp], 255
	mov	eax, DWORD PTR -88[rbp]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -72[rbp], rdx
	movsx	rdx, eax
	mov	r14, rdx
	mov	r15d, 0
	movsx	rdx, eax
	mov	r12, rdx
	mov	r13d, 0
	cdqe
	mov	edx, 16
	sub	rdx, 1
	add	rax, rdx
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L8:
	cmp	rsp, rdx
	je	.L9
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L8
.L9:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L10
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L10:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -64[rbp], rax
	mov	rdx, QWORD PTR -80[rbp]
	mov	ecx, DWORD PTR -88[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	fgets@PLT
	cmp	BYTE PTR -100[rbp], 0
	je	.L11
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -84[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	imul	eax, eax, 100
	mov	esi, DWORD PTR max_brightness[rip]
	cdq
	idiv	esi
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L12
.L11:
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
.L12:
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rsp, rbx
	nop
	mov	rax, QWORD PTR -56[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	command_get, .-command_get
	.section	.rodata
	.align 8
.LC17:
	.string	"Cannot set root permissions via setuid(0).\n"
.LC18:
	.string	"w+"
	.align 8
.LC19:
	.string	"Cannot open file '%s' for writing.\n"
	.text
	.globl	command_set
	.type	command_set, @function
command_set:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	eax, esi
	mov	BYTE PTR -24[rbp], al
	mov	edi, 0
	call	setuid@PLT
	test	eax, eax
	je	.L15
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 43
	mov	esi, 1
	lea	rdi, .LC17[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	mov	rax, QWORD PTR backlight_file[rip]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L16
	mov	rdx, QWORD PTR backlight_file[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	cmp	BYTE PTR -24[rbp], 0
	je	.L17
	mov	eax, DWORD PTR max_brightness[rip]
	imul	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1374389535
	shr	rdx, 32
	sar	edx, 5
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	jmp	.L18
.L17:
	mov	eax, DWORD PTR -20[rbp]
.L18:
	mov	DWORD PTR -12[rbp], eax
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	command_set, .-command_set
	.section	.rodata
.LC20:
	.string	"get"
.LC21:
	.string	"get_percent"
.LC22:
	.string	"set"
.LC23:
	.string	"set_percent"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	eax, 0
	call	read_max_brightness
	cmp	DWORD PTR -20[rbp], 0
	jg	.L20
	mov	eax, 0
	call	print_usage_and_fail
.L20:
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR argv0[rip], rax
	cmp	DWORD PTR -20[rbp], 1
	jg	.L21
	mov	eax, 0
	call	print_usage_and_fail
.L21:
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L22
	cmp	DWORD PTR -20[rbp], 2
	jne	.L22
	mov	edi, 0
	call	command_get
	jmp	.L23
.L22:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC21[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L24
	cmp	DWORD PTR -20[rbp], 2
	jne	.L24
	mov	edi, 1
	call	command_get
	jmp	.L23
.L24:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L25
	cmp	DWORD PTR -20[rbp], 3
	jne	.L25
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], 0
	js	.L26
	mov	eax, DWORD PTR max_brightness[rip]
	cmp	DWORD PTR -16[rbp], eax
	jle	.L27
.L26:
	mov	eax, 0
	call	print_usage_and_fail
.L27:
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, 0
	mov	edi, eax
	call	command_set
	jmp	.L23
.L25:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC23[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L28
	cmp	DWORD PTR -20[rbp], 3
	jne	.L28
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	js	.L29
	cmp	DWORD PTR -12[rbp], 100
	jle	.L30
.L29:
	mov	eax, 0
	call	print_usage_and_fail
.L30:
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, 1
	mov	edi, eax
	call	command_set
	jmp	.L23
.L28:
	mov	eax, 0
	call	print_usage_and_fail
.L23:
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE11:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"572818.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"./backlight\000"
	.data
	.align	2
	.type	argv0, %object
	.size	argv0, 4
argv0:
	.word	.LC0
	.section	.rodata
	.align	2
.LC1:
	.ascii	"/sys/devices/platform/backlight/backlight/backlight"
	.ascii	"/brightness\000"
	.data
	.align	2
	.type	backlight_file, %object
	.size	backlight_file, 4
backlight_file:
	.word	.LC1
	.section	.rodata
	.align	2
.LC2:
	.ascii	"/sys/devices/platform/backlight/backlight/backlight"
	.ascii	"/max_brightness\000"
	.data
	.align	2
	.type	max_backlight_file, %object
	.size	max_backlight_file, 4
max_backlight_file:
	.word	.LC2
	.global	max_brightness
	.align	2
	.type	max_brightness, %object
	.size	max_brightness, 4
max_brightness:
	.word	10
	.section	.rodata
	.align	2
.LC3:
	.ascii	"usage: %s COMMAND [VALUE]\012\000"
	.align	2
.LC4:
	.ascii	"  COMMAND = {get, set}\000"
	.align	2
.LC5:
	.ascii	"    get         ... prints current raw backlight le"
	.ascii	"vel\000"
	.align	2
.LC6:
	.ascii	"    get_percent ... prints current percentage backl"
	.ascii	"ight level\000"
	.align	2
.LC7:
	.ascii	"    set         ... sets backlight level to raw VAL"
	.ascii	"UE_RAW\000"
	.align	2
.LC8:
	.ascii	"    set_percent ... sets backlight level to percent"
	.ascii	"age VALUE_PCT\000"
	.align	2
.LC9:
	.ascii	"  VALUE_RAW = [0..%d]\012\000"
	.align	2
.LC10:
	.ascii	"  VALUE_PCT = [0..100]\000"
	.text
	.align	2
	.global	print_usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_usage, %function
print_usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L2
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L2+4
	bl	printf
	ldr	r0, .L2+8
	bl	puts
	ldr	r0, .L2+12
	bl	puts
	ldr	r0, .L2+16
	bl	puts
	ldr	r0, .L2+20
	bl	puts
	ldr	r0, .L2+24
	bl	puts
	ldr	r3, .L2+28
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L2+32
	bl	printf
	ldr	r0, .L2+36
	bl	puts
	nop
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	argv0
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	max_brightness
	.word	.LC9
	.word	.LC10
	.size	print_usage, .-print_usage
	.align	2
	.global	print_usage_and_fail
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_usage_and_fail, %function
print_usage_and_fail:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	print_usage
	mov	r0, #1
	bl	exit
	.size	print_usage_and_fail, .-print_usage_and_fail
	.section	.rodata
	.align	2
.LC11:
	.ascii	"r\000"
	.align	2
.LC12:
	.ascii	"Cannot open file '%s' for reading. Using the defaul"
	.ascii	"t max brightness '%d'.\012\000"
	.align	2
.LC13:
	.ascii	"%d\000"
	.text
	.align	2
	.global	read_max_brightness
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_max_brightness, %function
read_max_brightness:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L8
	ldr	r3, [r3]
	ldr	r1, .L8+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L6
	ldr	r3, .L8+8
	ldr	r0, [r3]
	ldr	r3, .L8
	ldr	r2, [r3]
	ldr	r3, .L8+12
	ldr	r3, [r3]
	ldr	r1, .L8+16
	bl	fprintf
	b	.L5
.L6:
	ldr	r2, .L8+12
	ldr	r1, .L8+20
	ldr	r0, [fp, #-8]
	bl	__isoc99_fscanf
	ldr	r0, [fp, #-8]
	bl	fclose
.L5:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	max_backlight_file
	.word	.LC11
	.word	stderr
	.word	max_brightness
	.word	.LC12
	.word	.LC13
	.size	read_max_brightness, .-read_max_brightness
	.section	.rodata
	.align	2
.LC14:
	.ascii	"Cannot open file '%s' for reading.\012\000"
	.global	__aeabi_idiv
	.align	2
.LC15:
	.ascii	"%d\012\000"
	.align	2
.LC16:
	.ascii	"%s\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	command_get
	.syntax unified
	.arm
	.fpu softvfp
	.type	command_get, %function
command_get:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	mov	r3, r0
	strb	r3, [fp, #-37]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	ldr	r3, .L15+4
	ldr	r3, [r3]
	ldr	r1, .L15+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L11
	ldr	r3, .L15+12
	ldr	r3, [r3]
	ldr	r2, .L15+4
	ldr	r2, [r2]
	ldr	r1, .L15+16
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L11:
	mov	r3, #255
	str	r3, [fp, #-32]
	ldr	ip, [fp, #-32]
	sub	r3, ip, #1
	str	r3, [fp, #-28]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #0
	str	r3, [fp, #-24]
	ldr	r2, [fp, #-36]
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-24]
	bl	fgets
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L12
	ldr	r0, [fp, #-24]
	bl	atoi
	str	r0, [fp, #-20]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, .L15+20
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L15+24
	bl	printf
	b	.L13
.L12:
	ldr	r1, [fp, #-24]
	ldr	r0, .L15+28
	bl	printf
.L13:
	ldr	r0, [fp, #-36]
	bl	fclose
	mov	sp, r4
	nop
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC17
	.word	backlight_file
	.word	.LC11
	.word	stderr
	.word	.LC14
	.word	max_brightness
	.word	.LC15
	.word	.LC16
	.size	command_get, .-command_get
	.section	.rodata
	.align	2
.LC18:
	.ascii	"Cannot set root permissions via setuid(0).\012\000"
	.align	2
.LC19:
	.ascii	"w+\000"
	.align	2
.LC20:
	.ascii	"Cannot open file '%s' for writing.\012\000"
	.text
	.align	2
	.global	command_set
	.syntax unified
	.arm
	.fpu softvfp
	.type	command_set, %function
command_set:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, r1
	strb	r3, [fp, #-17]
	mov	r0, #0
	bl	setuid
	mov	r3, r0
	cmp	r3, #0
	beq	.L18
	ldr	r3, .L22
	ldr	r3, [r3]
	mov	r2, #43
	mov	r1, #1
	ldr	r0, .L22+4
	bl	fwrite
	mov	r0, #1
	bl	exit
.L18:
	ldr	r3, .L22+8
	ldr	r3, [r3]
	ldr	r1, .L22+12
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L19
	ldr	r3, .L22
	ldr	r3, [r3]
	ldr	r2, .L22+8
	ldr	r2, [r2]
	ldr	r1, .L22+16
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L19:
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L20
	ldr	r3, .L22+20
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	mul	r3, r2, r3
	ldr	r2, .L22+24
	smull	r1, r2, r3, r2
	asr	r2, r2, #5
	asr	r3, r3, #31
	sub	r3, r2, r3
	b	.L21
.L20:
	ldr	r3, [fp, #-16]
.L21:
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r1, .L22+28
	ldr	r0, [fp, #-12]
	bl	fprintf
	ldr	r0, [fp, #-12]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	stderr
	.word	.LC18
	.word	backlight_file
	.word	.LC19
	.word	.LC20
	.word	max_brightness
	.word	1374389535
	.word	.LC15
	.size	command_set, .-command_set
	.section	.rodata
	.align	2
.LC21:
	.ascii	"get\000"
	.align	2
.LC22:
	.ascii	"get_percent\000"
	.align	2
.LC23:
	.ascii	"set\000"
	.align	2
.LC24:
	.ascii	"set_percent\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	bl	read_max_brightness
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bgt	.L25
	bl	print_usage_and_fail
.L25:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	ldr	r2, .L36
	str	r3, [r2]
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bgt	.L26
	bl	print_usage_and_fail
.L26:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-16]
	ldr	r1, .L36+4
	ldr	r0, [fp, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L27
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	bne	.L27
	mov	r0, #0
	bl	command_get
	b	.L28
.L27:
	ldr	r1, .L36+8
	ldr	r0, [fp, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L29
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	bne	.L29
	mov	r0, #1
	bl	command_get
	b	.L28
.L29:
	ldr	r1, .L36+12
	ldr	r0, [fp, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L30
	ldr	r3, [fp, #-24]
	cmp	r3, #3
	bne	.L30
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L31
	ldr	r3, .L36+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	ble	.L32
.L31:
	bl	print_usage_and_fail
.L32:
	mov	r1, #0
	ldr	r0, [fp, #-12]
	bl	command_set
	b	.L28
.L30:
	ldr	r1, .L36+20
	ldr	r0, [fp, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L33
	ldr	r3, [fp, #-24]
	cmp	r3, #3
	bne	.L33
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	blt	.L34
	ldr	r3, [fp, #-8]
	cmp	r3, #100
	ble	.L35
.L34:
	bl	print_usage_and_fail
.L35:
	mov	r1, #1
	ldr	r0, [fp, #-8]
	bl	command_set
	b	.L28
.L33:
	bl	print_usage_and_fail
.L28:
	mov	r0, #0
	bl	exit
.L37:
	.align	2
.L36:
	.word	argv0
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	max_brightness
	.word	.LC24
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
