	.file	"140075.c"
	.intel_syntax noprefix
	.text
	.globl	buffer
	.bss
	.align 8
	.type	buffer, @object
	.size	buffer, 8
buffer:
	.zero	8
	.section	.rodata
	.align 8
.LC0:
	.string	"bin2s - By Sjeep\nUsage: bin2s infile outfile label\n"
.LC1:
	.string	"rb"
	.align 8
.LC2:
	.string	"Error opening %s for reading.\n"
.LC3:
	.string	"Failed to allocate memory."
.LC4:
	.string	"Failed to read file."
.LC5:
	.string	"w+"
.LC6:
	.string	"Failed to open/create %s.\n"
.LC7:
	.string	".sdata\n\n"
	.align 8
.LC8:
	.string	".globl size_%s\nsize_%s:\t.word %d\n\n"
.LC9:
	.string	".data\n\n"
.LC10:
	.string	".balign 16\n\n"
.LC11:
	.string	".globl %s\n"
.LC12:
	.string	"%s:\n\n"
.LC13:
	.string	"\n\t.byte 0x%02x"
.LC14:
	.string	", 0x%02x"
	.text
	.globl	main
	.type	main, @function
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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	cmp	DWORD PTR -36[rbp], 4
	je	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L3
.L4:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR buffer[rip], rax
	mov	rax, QWORD PTR buffer[rip]
	test	rax, rax
	jne	.L5
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L3
.L5:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR buffer[rip]
	mov	rcx, QWORD PTR -16[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	cmp	rax, rdx
	je	.L6
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L3
.L6:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L7
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L3
.L7:
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rax
	mov	edx, 8
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 24
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 24
	mov	rdx, QWORD PTR [rax]
	mov	esi, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	r8d, esi
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rax
	mov	edx, 12
	mov	esi, 1
	lea	rdi, .LC10[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 24
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 24
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -24[rbp], 0
	jmp	.L8
.L11:
	mov	eax, DWORD PTR -24[rbp]
	and	eax, 15
	test	eax, eax
	jne	.L9
	mov	rdx, QWORD PTR buffer[rip]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L10
.L9:
	mov	rdx, QWORD PTR buffer[rip]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L10:
	add	DWORD PTR -24[rbp], 1
.L8:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L11
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"140075.c"
	.text
	.comm	buffer,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"bin2s - By Sjeep\012Usage: bin2s infile outfile lab"
	.ascii	"el\012\000"
	.align	2
.LC1:
	.ascii	"rb\000"
	.align	2
.LC2:
	.ascii	"Error opening %s for reading.\012\000"
	.align	2
.LC3:
	.ascii	"Failed to allocate memory.\000"
	.align	2
.LC4:
	.ascii	"Failed to read file.\000"
	.align	2
.LC5:
	.ascii	"w+\000"
	.align	2
.LC6:
	.ascii	"Failed to open/create %s.\012\000"
	.align	2
.LC7:
	.ascii	".sdata\012\012\000"
	.align	2
.LC8:
	.ascii	".globl size_%s\012size_%s:\011.word %d\012\012\000"
	.align	2
.LC9:
	.ascii	".data\012\012\000"
	.align	2
.LC10:
	.ascii	".balign 16\012\012\000"
	.align	2
.LC11:
	.ascii	".globl %s\012\000"
	.align	2
.LC12:
	.ascii	"%s:\012\012\000"
	.align	2
.LC13:
	.ascii	"\012\011.byte 0x%02x\000"
	.align	2
.LC14:
	.ascii	", 0x%02x\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, #4
	beq	.L2
	ldr	r0, .L12
	bl	puts
	mov	r3, #1
	b	.L3
.L2:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L12+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L12+8
	bl	printf
	mov	r3, #1
	b	.L3
.L4:
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	fseek
	ldr	r0, [fp, #-16]
	bl	ftell
	str	r0, [fp, #-12]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	fseek
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L12+12
	str	r2, [r3]
	ldr	r3, .L12+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L12+16
	bl	puts
	mov	r3, #1
	b	.L3
.L5:
	ldr	r3, .L12+12
	ldr	r0, [r3]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	mov	r1, #1
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	beq	.L6
	ldr	r0, .L12+20
	bl	puts
	mov	r3, #1
	b	.L3
.L6:
	ldr	r0, [fp, #-16]
	bl	fclose
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L12+24
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L7
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L12+28
	bl	printf
	mov	r3, #1
	b	.L3
.L7:
	ldr	r3, [fp, #-8]
	mov	r2, #8
	mov	r1, #1
	ldr	r0, .L12+32
	bl	fwrite
	ldr	r3, [fp, #-28]
	add	r3, r3, #12
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #12
	ldr	r1, [r3]
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L12+36
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r3, [fp, #-8]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L12+40
	bl	fwrite
	ldr	r3, [fp, #-8]
	mov	r2, #12
	mov	r1, #1
	ldr	r0, .L12+44
	bl	fwrite
	ldr	r3, [fp, #-28]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L12+48
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r3, [fp, #-28]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L12+52
	ldr	r0, [fp, #-8]
	bl	fprintf
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L8
.L11:
	ldr	r3, [fp, #-20]
	and	r3, r3, #15
	cmp	r3, #0
	bne	.L9
	ldr	r3, .L12+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r1, .L12+56
	ldr	r0, [fp, #-8]
	bl	fprintf
	b	.L10
.L9:
	ldr	r3, .L12+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r1, .L12+60
	ldr	r0, [fp, #-8]
	bl	fprintf
.L10:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L8:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	blt	.L11
	ldr	r1, [fp, #-8]
	mov	r0, #10
	bl	fputc
	ldr	r0, [fp, #-8]
	bl	fclose
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	buffer
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
