	.file	"7948982.c"
	.intel_syntax noprefix
	.text
	.globl	insert_binary
	.type	insert_binary, @function
insert_binary:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	eax, esi
	mov	BYTE PTR -28[rbp], al
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR pos.0[rip]
	cmp	eax, 4
	jne	.L2
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	mov	rdi, rcx
	call	memmove@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], 32
	mov	DWORD PTR pos.0[rip], 0
.L2:
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	mov	rdi, rcx
	call	memmove@PLT
	mov	rax, QWORD PTR -24[rbp]
	movzx	edx, BYTE PTR -28[rbp]
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR pos.0[rip]
	add	eax, 1
	mov	DWORD PTR pos.0[rip], eax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	insert_binary, .-insert_binary
	.section	.rodata
.LC0:
	.string	"Usage: %s number\n"
.LC1:
	.string	"binary = %s\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, 1072
	mov	DWORD PTR -1060[rbp], edi
	mov	QWORD PTR -1072[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -1060[rbp], 1
	jg	.L4
	mov	rax, QWORD PTR -1072[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 0
	call	exit@PLT
.L4:
	lea	rax, -1040[rbp]
	mov	edx, 1024
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -1072[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -1052[rbp], eax
.L7:
	mov	eax, DWORD PTR -1052[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -1048[rbp], eax
	mov	eax, DWORD PTR -1052[rbp]
	cdq
	shr	edx, 31
	add	eax, edx
	and	eax, 1
	sub	eax, edx
	mov	DWORD PTR -1044[rbp], eax
	cmp	DWORD PTR -1044[rbp], 0
	je	.L5
	mov	edx, 49
	jmp	.L6
.L5:
	mov	edx, 48
.L6:
	lea	rax, -1040[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	insert_binary
	mov	eax, DWORD PTR -1048[rbp]
	mov	DWORD PTR -1052[rbp], eax
	cmp	DWORD PTR -1052[rbp], 0
	jne	.L7
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.local	pos.0
	.comm	pos.0,4,4
	.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	"7948982.c"
	.text
	.align	2
	.global	insert_binary
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert_binary, %function
insert_binary:
	@ 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]
	mov	r3, r1
	strb	r3, [fp, #-17]
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, .L3
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L2
	ldr	r3, [fp, #-16]
	add	r0, r3, #1
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-16]
	bl	memmove
	ldr	r3, [fp, #-16]
	mov	r2, #32
	strb	r2, [r3]
	ldr	r3, .L3
	mov	r2, #0
	str	r2, [r3]
.L2:
	ldr	r3, [fp, #-16]
	add	r0, r3, #1
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-16]
	bl	memmove
	ldr	r3, [fp, #-16]
	ldrb	r2, [fp, #-17]
	strb	r2, [r3]
	ldr	r3, .L3
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L3
	str	r3, [r2]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	pos.5300
	.size	insert_binary, .-insert_binary
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s number\012\000"
	.align	2
.LC1:
	.ascii	"binary = %s\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	sub	sp, sp, #8
	str	r0, [fp, #-1048]
	str	r1, [fp, #-1052]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-1048]
	cmp	r3, #1
	bgt	.L6
	ldr	r3, .L12+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-1052]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L12+8
	bl	fprintf
	mov	r0, #0
	bl	exit
.L6:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-1052]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-1044]
.L9:
	ldr	r3, [fp, #-1044]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-1040]
	ldr	r3, [fp, #-1044]
	cmp	r3, #0
	and	r3, r3, #1
	rsblt	r3, r3, #0
	str	r3, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	beq	.L7
	mov	r2, #49
	b	.L8
.L7:
	mov	r2, #48
.L8:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	insert_binary
	ldr	r3, [fp, #-1040]
	str	r3, [fp, #-1044]
	ldr	r3, [fp, #-1044]
	cmp	r3, #0
	bne	.L9
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L12+12
	bl	printf
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC2
	.word	stderr
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.local	pos.5300
	.comm	pos.5300,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
