	.file	"14120.c"
	.intel_syntax noprefix
	.text
	.globl	delta
	.data
	.align 4
	.type	delta, @object
	.size	delta, 4
delta:
	.long	1
	.globl	step
	.bss
	.align 4
	.type	step, @object
	.size	step, 4
step:
	.zero	4
	.globl	change
	.align 4
	.type	change, @object
	.size	change, 4
change:
	.zero	4
	.text
	.globl	read_int
	.type	read_int, @function
read_int:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	DWORD PTR -68[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -68[rbp]
	mov	edx, 32
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -52[rbp], eax
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	read_int, .-read_int
	.section	.rodata
	.align 8
.LC0:
	.string	"/sys/class/backlight/gmux_backlight/max_brightness"
	.text
	.globl	get_max
	.type	get_max, @function
get_max:
.LFB7:
	.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	esi, 0
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	read_int
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	get_max, .-get_max
	.section	.rodata
.LC1:
	.string	"%d"
	.text
	.globl	write_int
	.type	write_int, @function
write_int:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	DWORD PTR -56[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, DWORD PTR -56[rbp]
	lea	rax, -48[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	write_int, .-write_int
	.globl	opts
	.type	opts, @function
opts:
.LFB9:
	.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	DWORD PTR -4[rbp], 0
	jmp	.L10
.L15:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -5[rbp], al
	movsx	eax, BYTE PTR -5[rbp]
	cmp	eax, 117
	je	.L11
	cmp	eax, 117
	jg	.L12
	cmp	eax, 100
	je	.L13
	cmp	eax, 115
	je	.L14
	jmp	.L12
.L11:
	mov	DWORD PTR delta[rip], 1
	jmp	.L12
.L13:
	mov	DWORD PTR delta[rip], -1
	jmp	.L12
.L14:
	mov	DWORD PTR delta[rip], 1
	add	DWORD PTR -4[rbp], 1
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR change[rip], eax
	nop
.L12:
	add	DWORD PTR -4[rbp], 1
.L10:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L15
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	opts, .-opts
	.section	.rodata
.LC2:
	.string	"Invalid"
	.align 8
.LC3:
	.string	"/sys/class/backlight/gmux_backlight/brightness"
.LC4:
	.string	"open"
	.align 8
.LC5:
	.string	"delta = %d, step = %d change = %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rdx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	opts
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], 0
	jle	.L18
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -16[rbp]
	jmp	.L19
.L18:
	mov	eax, 0
	call	get_max
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx, 2
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR step[rip], eax
	mov	esi, 2
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], -1
	jne	.L20
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, 2
	jmp	.L19
.L20:
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	read_int
	mov	DWORD PTR -4[rbp], eax
	mov	ecx, DWORD PTR change[rip]
	mov	edx, DWORD PTR step[rip]
	mov	eax, DWORD PTR delta[rip]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR change[rip]
	test	eax, eax
	jg	.L21
	mov	edx, DWORD PTR delta[rip]
	mov	eax, DWORD PTR step[rip]
	imul	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	jmp	.L22
.L21:
	mov	eax, DWORD PTR change[rip]
.L22:
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jns	.L23
	mov	DWORD PTR -20[rbp], 0
.L23:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jle	.L24
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR -20[rbp], eax
.L24:
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, edx
	mov	edi, eax
	call	write_int
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"14120.c"
	.text
	.global	delta
	.data
	.align	2
	.type	delta, %object
	.size	delta, 4
delta:
	.word	1
	.global	step
	.bss
	.align	2
	.type	step, %object
	.size	step, 4
step:
	.space	4
	.global	change
	.align	2
	.type	change, %object
	.size	change, 4
change:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_int
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_int, %function
read_int:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #40
	mov	r2, #32
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	read
	str	r0, [fp, #-44]
	sub	r3, fp, #40
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.size	read_int, .-read_int
	.section	.rodata
	.align	2
.LC1:
	.ascii	"/sys/class/backlight/gmux_backlight/max_brightness\000"
	.text
	.align	2
	.global	get_max
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_max, %function
get_max:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r1, #0
	ldr	r0, .L8
	bl	open
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-12]
	bl	read_int
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	close
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC1
	.size	get_max, .-get_max
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	write_int
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_int, %function
write_int:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #40
	ldr	r2, [fp, #-52]
	ldr	r1, .L13+4
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #40
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	write
	mov	r3, r0
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC3
	.word	.LC2
	.size	write_int, .-write_int
	.align	2
	.global	opts
	.syntax unified
	.arm
	.fpu softvfp
	.type	opts, %function
opts:
	@ 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]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L16
.L21:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldrb	r3, [r3]
	strb	r3, [fp, #-9]
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #117
	beq	.L17
	cmp	r3, #117
	bgt	.L18
	cmp	r3, #100
	beq	.L19
	cmp	r3, #115
	beq	.L20
	b	.L18
.L17:
	ldr	r3, .L23
	mov	r2, #1
	str	r2, [r3]
	b	.L18
.L19:
	ldr	r3, .L23
	mvn	r2, #0
	str	r2, [r3]
	b	.L18
.L20:
	ldr	r3, .L23
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L23+4
	str	r3, [r2]
	nop
.L18:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L16:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L21
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	delta
	.word	change
	.size	opts, .-opts
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Invalid\000"
	.align	2
.LC5:
	.ascii	"/sys/class/backlight/gmux_backlight/brightness\000"
	.align	2
.LC6:
	.ascii	"open\000"
	.align	2
.LC7:
	.ascii	"delta = %d, step = %d change = %d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	opts
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	ble	.L26
	ldr	r0, .L33
	bl	puts
	ldr	r3, [fp, #-20]
	b	.L27
.L26:
	bl	get_max
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r2, .L33+4
	smull	r1, r2, r3, r2
	asr	r2, r2, #2
	asr	r3, r3, #31
	sub	r3, r2, r3
	ldr	r2, .L33+8
	str	r3, [r2]
	mov	r1, #2
	ldr	r0, .L33+12
	bl	open
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L28
	ldr	r0, .L33+16
	bl	perror
	mov	r3, #2
	b	.L27
.L28:
	ldr	r0, [fp, #-12]
	bl	read_int
	str	r0, [fp, #-8]
	ldr	r3, .L33+20
	ldr	r1, [r3]
	ldr	r3, .L33+8
	ldr	r2, [r3]
	ldr	r3, .L33+24
	ldr	r3, [r3]
	ldr	r0, .L33+28
	bl	printf
	ldr	r3, .L33+24
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L29
	ldr	r3, .L33+20
	ldr	r3, [r3]
	ldr	r2, .L33+8
	ldr	r2, [r2]
	mul	r2, r3, r2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	b	.L30
.L29:
	ldr	r3, .L33+24
	ldr	r3, [r3]
.L30:
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bge	.L31
	mov	r3, #0
	str	r3, [fp, #-24]
.L31:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	ble	.L32
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-24]
.L32:
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-12]
	bl	write_int
	ldr	r0, [fp, #-12]
	bl	close
	mov	r3, #0
.L27:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC4
	.word	1717986919
	.word	step
	.word	.LC5
	.word	.LC6
	.word	delta
	.word	change
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
