	.file	"236608.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/dev/smd%d"
.LC1:
	.string	"failed to open smd0 - %s\n"
.LC2:
	.string	"failed to write smd0 (%d) %s\n"
.LC3:
	.string	" "
.LC4:
	.string	"\r"
	.text
	.globl	smd_main
	.type	smd_main, @function
smd_main:
.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	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -64[rbp], 0
	sub	DWORD PTR -68[rbp], 1
	add	QWORD PTR -80[rbp], 8
	cmp	DWORD PTR -68[rbp], 0
	jle	.L2
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 45
	jne	.L2
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 1
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -64[rbp], eax
	sub	DWORD PTR -68[rbp], 1
	add	QWORD PTR -80[rbp], 8
.L2:
	mov	edx, DWORD PTR -64[rbp]
	lea	rax, -48[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -48[rbp]
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], 0
	jns	.L5
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L10
.L9:
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -56[rbp], eax
	mov	rax, QWORD PTR -80[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	edx, DWORD PTR -56[rbp]
	mov	eax, DWORD PTR -60[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	write@PLT
	mov	DWORD PTR -52[rbp], eax
	mov	eax, DWORD PTR -52[rbp]
	cmp	eax, DWORD PTR -56[rbp]
	je	.L6
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -52[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L10
.L6:
	sub	DWORD PTR -68[rbp], 1
	add	QWORD PTR -80[rbp], 8
	cmp	DWORD PTR -68[rbp], 0
	je	.L7
	lea	rax, .LC3[rip]
	jmp	.L8
.L7:
	lea	rax, .LC4[rip]
.L8:
	mov	ecx, DWORD PTR -60[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, ecx
	mov	eax, 0
	call	write@PLT
.L5:
	cmp	DWORD PTR -68[rbp], 0
	jg	.L9
	mov	eax, DWORD PTR -60[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	mov	eax, 0
.L10:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	smd_main, .-smd_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	"236608.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/smd%d\000"
	.align	2
.LC1:
	.ascii	"failed to open smd0 - %s\012\000"
	.align	2
.LC2:
	.ascii	"failed to write smd0 (%d) %s\012\000"
	.align	2
.LC3:
	.ascii	" \000"
	.align	2
.LC4:
	.ascii	"\015\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	smd_main
	.syntax unified
	.arm
	.fpu softvfp
	.type	smd_main, %function
smd_main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #68
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-72]
	sub	r3, r3, #1
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	ble	.L2
	ldr	r3, [fp, #-76]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	bne	.L2
	ldr	r3, [fp, #-76]
	ldr	r3, [r3]
	add	r3, r3, #1
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-64]
	ldr	r3, [fp, #-72]
	sub	r3, r3, #1
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	str	r3, [fp, #-76]
.L2:
	sub	r3, fp, #48
	ldr	r2, [fp, #-64]
	ldr	r1, .L12+4
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #48
	mov	r1, #1
	mov	r0, r3
	bl	open
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bge	.L5
	ldr	r3, .L12+8
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L12+12
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L10
.L9:
	ldr	r3, [fp, #-76]
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-76]
	ldr	r3, [r3]
	ldr	r2, [fp, #-56]
	mov	r1, r3
	ldr	r0, [fp, #-60]
	bl	write
	str	r0, [fp, #-52]
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	beq	.L6
	ldr	r3, .L12+8
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-52]
	ldr	r1, .L12+16
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L10
.L6:
	ldr	r3, [fp, #-72]
	sub	r3, r3, #1
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	beq	.L7
	ldr	r3, .L12+20
	b	.L8
.L7:
	ldr	r3, .L12+24
.L8:
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-60]
	bl	write
.L5:
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bgt	.L9
	ldr	r0, [fp, #-60]
	bl	close
	mov	r3, #0
.L10:
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC5
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	smd_main, .-smd_main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
