	.file	"26700003.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage: setpineled [red|green|blue|white] [0-255]\n"
	.text
	.globl	usage
	.type	usage, @function
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 stderr[rip]
	mov	rcx, rax
	mov	edx, 49
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	usage, .-usage
	.section	.rodata
.LC1:
	.string	"red"
.LC2:
	.string	"blue"
.LC3:
	.string	"green"
.LC4:
	.string	"white"
.LC5:
	.string	"flash"
.LC6:
	.string	"indicator"
	.align 8
.LC7:
	.string	"sh -c 'echo %d > /sys/class/leds/%s:%s/brightness'"
.LC8:
	.string	"setuid(0) failed\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	cmp	DWORD PTR -36[rbp], 1
	jg	.L3
	mov	eax, 0
	call	usage
	mov	eax, 1
	jmp	.L4
.L3:
	sub	DWORD PTR -36[rbp], 1
	mov	eax, DWORD PTR -36[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -36[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 0
	js	.L5
	cmp	DWORD PTR -28[rbp], 255
	jle	.L6
.L5:
	mov	eax, 0
	call	usage
	mov	eax, 1
	jmp	.L4
.L6:
	mov	eax, DWORD PTR -36[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -36[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L7
	mov	eax, 0
	call	usage
	mov	eax, 1
	jmp	.L4
.L7:
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L8
	lea	rax, .LC5[rip]
	mov	QWORD PTR -24[rbp], rax
	jmp	.L9
.L8:
	lea	rax, .LC6[rip]
	mov	QWORD PTR -24[rbp], rax
.L9:
	mov	edi, 80
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rsi, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	r8, rsi
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	edi, 0
	call	setuid@PLT
	test	eax, eax
	je	.L10
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 17
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
	mov	eax, 0
	jmp	.L4
.L10:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	system@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"26700003.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: setpineled [red|green|blue|white] [0-255]\012"
	.ascii	"\000"
	.text
	.align	2
	.global	usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
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	r2, #49
	mov	r1, #1
	ldr	r0, .L2+4
	bl	fwrite
	nop
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	stderr
	.word	.LC0
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC1:
	.ascii	"red\000"
	.align	2
.LC2:
	.ascii	"blue\000"
	.align	2
.LC3:
	.ascii	"green\000"
	.align	2
.LC4:
	.ascii	"white\000"
	.align	2
.LC5:
	.ascii	"flash\000"
	.align	2
.LC6:
	.ascii	"indicator\000"
	.align	2
.LC7:
	.ascii	"sh -c 'echo %d > /sys/class/leds/%s:%s/brightness'\000"
	.align	2
.LC8:
	.ascii	"setuid(0) failed\012\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, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bgt	.L5
	bl	usage
	mov	r3, #1
	b	.L6
.L5:
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	sub	r2, r3, #1
	str	r2, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	blt	.L7
	ldr	r3, [fp, #-16]
	cmp	r3, #255
	ble	.L8
.L7:
	bl	usage
	mov	r3, #1
	b	.L6
.L8:
	ldr	r3, [fp, #-24]
	sub	r2, r3, #1
	str	r2, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r1, .L14
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r1, .L14+4
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r1, .L14+8
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r1, .L14+12
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	bl	usage
	mov	r3, #1
	b	.L6
.L9:
	ldr	r1, .L14+12
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
	ldr	r3, .L14+16
	str	r3, [fp, #-20]
	b	.L11
.L10:
	ldr	r3, .L14+20
	str	r3, [fp, #-20]
.L11:
	mov	r0, #80
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	str	r3, [sp]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	ldr	r1, .L14+24
	ldr	r0, [fp, #-8]
	bl	sprintf
	mov	r0, #0
	bl	setuid
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	ldr	r3, .L14+28
	ldr	r3, [r3]
	mov	r2, #17
	mov	r1, #1
	ldr	r0, .L14+32
	bl	fwrite
	mov	r3, #0
	b	.L6
.L12:
	ldr	r0, [fp, #-8]
	bl	system
	mov	r3, r0
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	stderr
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
