	.file	"extr_chio.c_main.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"f:"
.LC1:
	.string	"%s: open"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"can't register cleanup function"
	.section	.rodata.str1.1
.LC3:
	.string	"unknown command: %s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.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
	lea	r12, .LC0[rip]
	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
	mov	rbx, rsi
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdx, r12
	mov	rsi, rbx
	mov	edi, ebp
	call	getopt@PLT
	cmp	eax, -1
	je	.L32
	cmp	eax, 102
	jne	.L3
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR changer_name[rip], rax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	xor	eax, eax
	call	usage@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L32:
	mov	rax, QWORD PTR optind[rip]
	lea	r12, [rbx+rax*8]
	sub	ebp, eax
	je	.L33
.L6:
	mov	rdi, QWORD PTR changer_name[rip]
	test	rdi, rdi
	je	.L34
.L7:
	mov	esi, DWORD PTR O_RDWR[rip]
	mov	edx, 384
	call	open@PLT
	mov	DWORD PTR changer_fd[rip], eax
	cmp	eax, -1
	je	.L35
.L8:
	mov	edi, DWORD PTR cleanup[rip]
	call	atexit@PLT
	test	rax, rax
	jne	.L36
.L9:
	mov	rax, QWORD PTR commands[rip]
	mov	rsi, QWORD PTR [rax]
	test	rsi, rsi
	je	.L19
	xor	ebx, ebx
	xor	r13d, r13d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L37:
	mov	rax, QWORD PTR commands[rip]
	add	r13, 16
	add	ebx, 1
	mov	rsi, QWORD PTR [rax+r13]
	test	rsi, rsi
	je	.L19
.L12:
	mov	rdi, QWORD PTR [r12]
	call	strcmp@PLT
	test	rax, rax
	jne	.L37
	mov	rax, QWORD PTR commands[rip]
	cmp	QWORD PTR [rax+r13], 0
	je	.L19
.L13:
	movsx	rbx, ebx
	sal	rbx, 4
	add	rax, rbx
	mov	rdi, QWORD PTR [rax]
	test	rdi, rdi
	je	.L18
.L17:
	mov	rdx, r12
	mov	esi, ebp
	call	[QWORD PTR 8[rax]]
	mov	edi, eax
	call	exit@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L33:
	.cfi_restore_state
	xor	eax, eax
	call	usage@PLT
	jmp	.L6
.L36:
	lea	rsi, .LC2[rip]
	mov	edi, 1
	xor	eax, eax
	call	err@PLT
	jmp	.L9
.L19:
	cmp	QWORD PTR [rax], 0
	je	.L20
	xor	r13d, r13d
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdx, QWORD PTR commands[rip]
	lea	eax, 1[r13]
	add	r13, 1
	cmp	QWORD PTR 16[rdx+r14], 0
	je	.L14
.L16:
	mov	rdi, QWORD PTR [r12]
	mov	r14, r13
	mov	ebx, r13d
	sal	r14, 4
	call	strlen@PLT
	mov	rdi, QWORD PTR [r12]
	mov	edx, eax
	mov	rax, QWORD PTR commands[rip]
	mov	rsi, QWORD PTR [rax+r14]
	call	strncmp@PLT
	test	rax, rax
	jne	.L15
	mov	rax, QWORD PTR commands[rip]
	jmp	.L13
.L35:
	mov	rdx, QWORD PTR changer_name[rip]
	lea	rsi, .LC1[rip]
	mov	edi, 1
	xor	eax, eax
	call	err@PLT
	jmp	.L8
.L34:
	mov	edi, DWORD PTR CHANGER_ENV_VAR[rip]
	call	getenv@PLT
	mov	QWORD PTR changer_name[rip], rax
	mov	rdi, rax
	test	rax, rax
	jne	.L7
	mov	rdi, QWORD PTR _PATH_CH[rip]
	mov	QWORD PTR changer_name[rip], rdi
	jmp	.L7
.L20:
	xor	eax, eax
.L14:
	movsx	rbx, eax
	sal	rbx, 4
.L18:
	mov	rdx, QWORD PTR [r12]
	mov	edi, 1
	lea	rsi, .LC3[rip]
	call	errx@PLT
	mov	rax, QWORD PTR commands[rip]
	add	rax, rbx
	mov	rdi, QWORD PTR [rax]
	jmp	.L17
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.comm	optind,8,8
	.comm	optarg,8,8
	.comm	commands,8,8
	.comm	cleanup,4,4
	.comm	changer_name,8,8
	.comm	changer_fd,4,4
	.comm	_PATH_CH,8,8
	.comm	O_RDWR,4,4
	.comm	CHANGER_ENV_VAR,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_chio.c_main.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"f:\000"
	.align	2
.LC1:
	.ascii	"%s: open\000"
	.align	2
.LC2:
	.ascii	"can't register cleanup function\000"
	.align	2
.LC3:
	.ascii	"unknown command: %s\000"
	.section	.text.startup,"ax",%progbits
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r0
	mov	r4, r1
	ldr	r7, .L39
	ldr	r5, .L39+4
	ldr	r8, .L39+8
	sub	sp, sp, #12
.L2:
	mov	r2, r5
	mov	r1, r4
	mov	r0, r6
	bl	getopt
	cmn	r0, #1
	beq	.L31
	cmp	r0, #102
	ldreq	r3, [r8]
	streq	r3, [r7]
	beq	.L2
.L3:
	bl	usage
	b	.L2
.L31:
	ldr	r3, .L39+12
	ldr	r5, [r3]
	subs	r6, r6, r5
	add	r9, r4, r5, lsl #2
	beq	.L32
.L6:
	ldr	r0, [r7]
	cmp	r0, #0
	beq	.L33
.L7:
	ldr	r3, .L39+16
	mov	r2, #384
	ldr	r1, [r3]
	bl	open
	ldr	r3, .L39+20
	cmn	r0, #1
	str	r0, [r3]
	beq	.L34
.L8:
	ldr	r3, .L39+24
	ldr	r0, [r3]
	bl	atexit
	cmp	r0, #0
	bne	.L35
.L9:
	ldr	r8, .L39+28
	ldr	r7, [r4, r5, lsl #2]
	ldr	r5, [r8]
	ldr	r10, [r5]
	cmp	r10, #0
	beq	.L16
	mov	r1, r10
	mov	r4, #0
	b	.L12
.L37:
	add	r4, r4, #1
	ldr	r1, [r5, r4, lsl #3]
	cmp	r1, #0
	beq	.L36
.L12:
	mov	r0, r7
	bl	strcmp
	cmp	r0, #0
	bne	.L37
.L11:
	ldr	r0, [r5, r4, lsl #3]
	add	r5, r5, r4, lsl #3
	cmp	r0, #0
	lsl	r4, r4, #3
	beq	.L15
.L14:
	mov	r2, r9
	mov	r1, r6
	ldr	r3, [r5, #4]
	blx	r3
	bl	exit
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L36:
	mov	r0, r7
	str	r1, [sp, #4]
	bl	strlen
	ldr	r1, [sp, #4]
	mov	fp, r0
	mov	r4, r1
	b	.L13
.L38:
	add	r4, r4, #1
	ldr	r10, [r5, r4, lsl #3]
	cmp	r10, #0
	beq	.L10
.L13:
	mov	r1, r10
	mov	r2, fp
	mov	r0, r7
	bl	strncmp
	cmp	r0, #0
	bne	.L38
	b	.L11
.L35:
	ldr	r1, .L39+32
	mov	r0, #1
	bl	err
	b	.L9
.L32:
	bl	usage
	b	.L6
.L34:
	ldr	r2, [r7]
	ldr	r1, .L39+36
	mov	r0, #1
	bl	err
	b	.L8
.L33:
	ldr	r3, .L39+40
	ldr	r0, [r3]
	bl	getenv
	cmp	r0, #0
	ldreq	r3, .L39+44
	str	r0, [r7]
	ldreq	r0, [r3]
	streq	r0, [r7]
	b	.L7
.L16:
	mov	r4, r10
.L10:
	lsl	r4, r4, #3
.L15:
	mov	r2, r7
	mov	r0, #1
	ldr	r1, .L39+48
	bl	errx
	ldr	r5, [r8]
	ldr	r0, [r5, r4]
	add	r5, r5, r4
	b	.L14
.L40:
	.align	2
.L39:
	.word	changer_name
	.word	.LC0
	.word	optarg
	.word	optind
	.word	O_RDWR
	.word	changer_fd
	.word	cleanup
	.word	commands
	.word	.LC2
	.word	.LC1
	.word	CHANGER_ENV_VAR
	.word	_PATH_CH
	.word	.LC3
	.size	main, .-main
	.comm	optind,4,4
	.comm	optarg,4,4
	.comm	commands,4,4
	.comm	cleanup,4,4
	.comm	changer_name,4,4
	.comm	changer_fd,4,4
	.comm	_PATH_CH,4,4
	.comm	O_RDWR,4,4
	.comm	CHANGER_ENV_VAR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
