	.file	"428976.c"
	.intel_syntax noprefix
	.text
	.globl	getopt_long_options
	.section	.rodata
.LC0:
	.string	"block-size"
.LC1:
	.string	"help"
	.section	.data.rel.local,"aw"
	.align 32
	.type	getopt_long_options, @object
	.size	getopt_long_options, 64
getopt_long_options:
	.quad	.LC0
	.long	1
	.zero	4
	.quad	0
	.long	98
	.zero	4
	.quad	.LC1
	.long	0
	.zero	4
	.quad	0
	.long	63
	.zero	4
	.globl	getopt_short_options
	.section	.rodata
	.type	getopt_short_options, @object
	.size	getopt_short_options, 4
getopt_short_options:
	.string	"b:?"
	.globl	tmp_file
	.bss
	.align 8
	.type	tmp_file, @object
	.size	tmp_file, 8
tmp_file:
	.zero	8
	.globl	dest_file
	.align 8
	.type	dest_file, @object
	.size	dest_file, 8
dest_file:
	.zero	8
	.globl	prog_name
	.align 8
	.type	prog_name, @object
	.size	prog_name, 8
prog_name:
	.zero	8
	.globl	buffer
	.align 8
	.type	buffer, @object
	.size	buffer, 8
buffer:
	.zero	8
	.globl	buffer2
	.align 8
	.type	buffer2, @object
	.size	buffer2, 8
buffer2:
	.zero	8
	.globl	block_size
	.data
	.align 8
	.type	block_size, @object
	.size	block_size, 8
block_size:
	.quad	1048576
	.globl	total_tmp
	.bss
	.align 8
	.type	total_tmp, @object
	.size	total_tmp, 8
total_tmp:
	.zero	8
	.globl	total_dest
	.align 8
	.type	total_dest, @object
	.size	total_dest, 8
total_dest:
	.zero	8
	.globl	total_in
	.align 8
	.type	total_in, @object
	.size	total_in, 8
total_in:
	.zero	8
	.globl	total_out
	.align 8
	.type	total_out, @object
	.size	total_out, 8
total_out:
	.zero	8
	.globl	total_out2
	.align 8
	.type	total_out2, @object
	.size	total_out2, 8
total_out2:
	.zero	8
	.text
	.globl	logit
	.type	logit, @function
logit:
.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, 240
	mov	QWORD PTR -216[rbp], rdi
	mov	DWORD PTR -220[rbp], esi
	mov	DWORD PTR -224[rbp], edx
	mov	QWORD PTR -232[rbp], rcx
	mov	QWORD PTR -144[rbp], r8
	mov	QWORD PTR -136[rbp], r9
	test	al, al
	je	.L2
	movaps	XMMWORD PTR -128[rbp], xmm0
	movaps	XMMWORD PTR -112[rbp], xmm1
	movaps	XMMWORD PTR -96[rbp], xmm2
	movaps	XMMWORD PTR -80[rbp], xmm3
	movaps	XMMWORD PTR -64[rbp], xmm4
	movaps	XMMWORD PTR -48[rbp], xmm5
	movaps	XMMWORD PTR -32[rbp], xmm6
	movaps	XMMWORD PTR -16[rbp], xmm7
.L2:
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -184[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -208[rbp], 32
	mov	DWORD PTR -204[rbp], 48
	lea	rax, 16[rbp]
	mov	QWORD PTR -200[rbp], rax
	lea	rax, -176[rbp]
	mov	QWORD PTR -192[rbp], rax
	lea	rdx, -208[rbp]
	mov	rcx, QWORD PTR -232[rbp]
	mov	rax, QWORD PTR -216[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	vfprintf@PLT
	cmp	DWORD PTR -220[rbp], 0
	je	.L5
	mov	eax, DWORD PTR -224[rbp]
	mov	edi, eax
	call	exit@PLT
.L5:
	nop
	mov	rax, QWORD PTR -184[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	logit, .-logit
	.section	.rodata
.LC2:
	.string	"error reading tmp_file (%s)\n"
.LC3:
	.string	"error writing dest_file (%s)\n"
	.align 8
.LC4:
	.string	"error: something went wrong (total_tmp=%lld crt=%lld)\n"
	.align 8
.LC5:
	.string	"error truncating tmp_file (%s)\n"
	.text
	.globl	flush_tmp_to_dest
	.type	flush_tmp_to_dest, @function
flush_tmp_to_dest:
.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, 32
	mov	rax, QWORD PTR tmp_file[rip]
	mov	rdi, rax
	call	rewind@PLT
	mov	QWORD PTR -24[rbp], 0
	mov	rcx, QWORD PTR tmp_file[rip]
	mov	rax, QWORD PTR total_tmp[rip]
	sub	rax, QWORD PTR -24[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR block_size[rip]
	cmp	rdx, rax
	cmova	rdx, rax
	mov	rax, QWORD PTR buffer2[rip]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR tmp_file[rip]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	je	.L8
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rdx
	lea	rcx, .LC2[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
	jmp	.L8
.L12:
	mov	rcx, QWORD PTR dest_file[rip]
	mov	rax, QWORD PTR buffer2[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	add	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	je	.L9
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rdx
	lea	rcx, .LC3[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
.L9:
	mov	rax, QWORD PTR tmp_file[rip]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	jne	.L15
	mov	rcx, QWORD PTR tmp_file[rip]
	mov	rdx, QWORD PTR block_size[rip]
	mov	rax, QWORD PTR buffer2[rip]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR tmp_file[rip]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	je	.L8
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rdx
	lea	rcx, .LC2[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
.L8:
	cmp	QWORD PTR -16[rbp], 0
	jne	.L12
	jmp	.L11
.L15:
	nop
.L11:
	mov	rax, QWORD PTR total_tmp[rip]
	cmp	QWORD PTR -24[rbp], rax
	je	.L13
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR total_tmp[rip]
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	r9, rdx
	mov	r8, rcx
	lea	rcx, .LC4[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
.L13:
	mov	rdx, QWORD PTR total_dest[rip]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR total_dest[rip], rax
	mov	rax, QWORD PTR tmp_file[rip]
	mov	rdi, rax
	call	rewind@PLT
	mov	rax, QWORD PTR tmp_file[rip]
	mov	rdi, rax
	call	fileno@PLT
	mov	esi, 0
	mov	edi, eax
	call	ftruncate@PLT
	test	eax, eax
	je	.L14
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rdx
	lea	rcx, .LC5[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
.L14:
	mov	QWORD PTR total_tmp[rip], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	flush_tmp_to_dest, .-flush_tmp_to_dest
	.section	.rodata
.LC6:
	.string	"\nSynopsis:\n\n"
	.align 8
.LC7:
	.string	"  Copy stdin to dest_file via tmp_file.\n\n"
	.align 8
.LC8:
	.string	"  If tmp_file runs out of space, the program flushes its contents to dest_file,\n"
	.align 8
.LC9:
	.string	"  truncates tmp_file to zero length, and continues as before.\n\n"
	.align 8
.LC10:
	.string	"  If successful, all of stdin is in dest_file, and tmp_file is empty.\n\n"
.LC11:
	.string	"Options:\n\n"
.LC12:
	.string	"  -b | --block-size <size>\n"
	.align 8
.LC13:
	.string	"    Set block size for read/write operations.\n"
	.text
	.globl	usage
	.type	usage, @function
usage:
.LFB8:
	.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, 12
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 41
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 80
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 63
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 71
	mov	esi, 1
	lea	rdi, .LC10[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 10
	mov	esi, 1
	lea	rdi, .LC11[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 27
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 46
	mov	esi, 1
	lea	rdi, .LC13[rip]
	call	fwrite@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	usage, .-usage
	.section	.rodata
	.align 8
.LC14:
	.string	"error: block size to small (\"%s\" => %d)\n"
	.align 8
.LC15:
	.string	"Use: %s [tmp_file] [dest_file]\n"
	.align 8
.LC16:
	.string	"error: could not allocate buffer of size %d (%s)\n"
.LC17:
	.string	"w+"
	.align 8
.LC18:
	.string	"error: could not open file %s (%s)\n"
.LC19:
	.string	"error writing tmp_file (%s)\n"
.LC20:
	.string	"error reading stdin (%s)\n"
	.align 8
.LC21:
	.string	"warning: temp disk full (total_tmp:%lld)\n"
	.align 8
.LC22:
	.string	"warning: tmp_file cannot hold even a single block; bypassing it entirely\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR prog_name[rip], rax
	jmp	.L18
.L21:
	movsx	eax, BYTE PTR -13[rbp]
	cmp	eax, 98
	jne	.L19
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	atoi@PLT
	cdqe
	mov	QWORD PTR block_size[rip], rax
	mov	rax, QWORD PTR block_size[rip]
	cmp	rax, 63
	ja	.L18
	mov	rcx, QWORD PTR block_size[rip]
	mov	rdx, QWORD PTR optarg[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	r9, rcx
	mov	r8, rdx
	lea	rcx, .LC14[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
	jmp	.L18
.L19:
	mov	rdx, QWORD PTR prog_name[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rdx
	lea	rcx, .LC15[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	logit
	mov	eax, 0
	call	usage
	mov	edi, 0
	call	exit@PLT
.L18:
	mov	rsi, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	r8d, 0
	lea	rcx, getopt_long_options[rip]
	lea	rdx, getopt_short_options[rip]
	mov	edi, eax
	call	getopt_long@PLT
	mov	BYTE PTR -13[rbp], al
	cmp	BYTE PTR -13[rbp], -1
	jne	.L21
	mov	eax, DWORD PTR optind[rip]
	sub	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR optind[rip]
	cdqe
	sal	rax, 3
	add	QWORD PTR -32[rbp], rax
	cmp	DWORD PTR -20[rbp], 1
	jg	.L22
	mov	rdx, QWORD PTR prog_name[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rdx
	lea	rcx, .LC15[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
.L22:
	mov	rax, QWORD PTR block_size[rip]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR buffer[rip], rax
	mov	rax, QWORD PTR buffer[rip]
	test	rax, rax
	jne	.L23
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR block_size[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	r9, rdx
	mov	r8, rcx
	lea	rcx, .LC16[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
.L23:
	mov	rax, QWORD PTR block_size[rip]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR buffer2[rip], rax
	mov	rax, QWORD PTR buffer2[rip]
	test	rax, rax
	jne	.L24
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR block_size[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	r9, rdx
	mov	r8, rcx
	lea	rcx, .LC16[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
.L24:
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR tmp_file[rip], rax
	mov	rax, QWORD PTR tmp_file[rip]
	test	rax, rax
	jne	.L25
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	r9, rdx
	mov	r8, rcx
	lea	rcx, .LC18[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
.L25:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR dest_file[rip], rax
	mov	rax, QWORD PTR dest_file[rip]
	test	rax, rax
	jne	.L26
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	r9, rdx
	mov	r8, rcx
	lea	rcx, .LC18[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
.L26:
	mov	rcx, QWORD PTR tmp_file[rip]
	mov	rdx, QWORD PTR block_size[rip]
	mov	rax, QWORD PTR buffer[rip]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR block_size[rip]
	cmp	QWORD PTR -8[rbp], rax
	je	.L27
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 28
	je	.L28
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rdx
	lea	rcx, .LC19[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
.L28:
	mov	DWORD PTR -12[rbp], 1
	jmp	.L29
.L27:
	mov	DWORD PTR -12[rbp], 0
.L29:
	mov	rax, QWORD PTR tmp_file[rip]
	mov	rdi, rax
	call	rewind@PLT
	mov	rax, QWORD PTR tmp_file[rip]
	mov	rdi, rax
	call	fileno@PLT
	mov	esi, 0
	mov	edi, eax
	call	ftruncate@PLT
	test	eax, eax
	je	.L30
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rdx
	lea	rcx, .LC5[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
.L30:
	cmp	DWORD PTR -12[rbp], 0
	jne	.L31
	mov	QWORD PTR total_dest[rip], 0
	mov	rax, QWORD PTR total_dest[rip]
	mov	QWORD PTR total_tmp[rip], rax
	mov	rcx, QWORD PTR stdin[rip]
	mov	rdx, QWORD PTR block_size[rip]
	mov	rax, QWORD PTR buffer[rip]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR total_in[rip], rax
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	je	.L33
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rdx
	lea	rcx, .LC20[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
	jmp	.L33
.L38:
	mov	rcx, QWORD PTR tmp_file[rip]
	mov	rdx, QWORD PTR total_in[rip]
	mov	rax, QWORD PTR buffer[rip]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR total_out[rip], rax
	mov	rdx, QWORD PTR total_tmp[rip]
	mov	rax, QWORD PTR total_out[rip]
	add	rax, rdx
	mov	QWORD PTR total_tmp[rip], rax
	mov	rdx, QWORD PTR total_out[rip]
	mov	rax, QWORD PTR total_in[rip]
	cmp	rdx, rax
	je	.L34
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 28
	je	.L35
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rdx
	lea	rcx, .LC19[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
.L35:
	mov	rax, QWORD PTR total_tmp[rip]
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rdx
	lea	rcx, .LC21[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	logit
	mov	eax, 0
	call	flush_tmp_to_dest
	mov	rax, QWORD PTR dest_file[rip]
	mov	rdx, QWORD PTR total_in[rip]
	mov	rcx, QWORD PTR total_out[rip]
	sub	rdx, rcx
	mov	rsi, QWORD PTR buffer[rip]
	mov	rcx, QWORD PTR total_out[rip]
	lea	rdi, [rsi+rcx]
	mov	rcx, rax
	mov	esi, 1
	call	fwrite@PLT
	mov	QWORD PTR total_out2[rip], rax
	mov	rdx, QWORD PTR total_dest[rip]
	mov	rax, QWORD PTR total_out2[rip]
	add	rax, rdx
	mov	QWORD PTR total_dest[rip], rax
	mov	rax, QWORD PTR total_in[rip]
	mov	rcx, QWORD PTR total_out[rip]
	sub	rax, rcx
	mov	rdx, rax
	mov	rax, QWORD PTR total_out2[rip]
	cmp	rdx, rax
	je	.L34
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rdx
	lea	rcx, .LC3[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
.L34:
	mov	rax, QWORD PTR tmp_file[rip]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	jne	.L46
	mov	rcx, QWORD PTR stdin[rip]
	mov	rdx, QWORD PTR block_size[rip]
	mov	rax, QWORD PTR buffer[rip]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR total_in[rip], rax
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	je	.L33
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rdx
	lea	rcx, .LC20[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
.L33:
	mov	rax, QWORD PTR total_in[rip]
	test	rax, rax
	jne	.L38
	jmp	.L37
.L46:
	nop
.L37:
	mov	rax, QWORD PTR total_tmp[rip]
	test	rax, rax
	je	.L39
	mov	eax, 0
	call	flush_tmp_to_dest
	jmp	.L39
.L31:
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, .LC22[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	logit
	mov	rcx, QWORD PTR stdin[rip]
	mov	rdx, QWORD PTR block_size[rip]
	mov	rax, QWORD PTR buffer[rip]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR total_in[rip], rax
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	je	.L41
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rdx
	lea	rcx, .LC20[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
	jmp	.L41
.L44:
	mov	rcx, QWORD PTR dest_file[rip]
	mov	rdx, QWORD PTR total_in[rip]
	mov	rax, QWORD PTR buffer[rip]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR total_out[rip], rax
	mov	rdx, QWORD PTR total_tmp[rip]
	mov	rax, QWORD PTR total_out[rip]
	add	rax, rdx
	mov	QWORD PTR total_tmp[rip], rax
	mov	rdx, QWORD PTR total_out[rip]
	mov	rax, QWORD PTR total_in[rip]
	cmp	rdx, rax
	je	.L42
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rdx
	lea	rcx, .LC3[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
.L42:
	mov	rax, QWORD PTR tmp_file[rip]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	jne	.L47
	mov	rcx, QWORD PTR stdin[rip]
	mov	rdx, QWORD PTR block_size[rip]
	mov	rax, QWORD PTR buffer[rip]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR total_in[rip], rax
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	je	.L41
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rdx
	lea	rcx, .LC20[rip]
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	logit
.L41:
	mov	rax, QWORD PTR total_in[rip]
	test	rax, rax
	jne	.L44
	jmp	.L39
.L47:
	nop
.L39:
	mov	rax, QWORD PTR tmp_file[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR dest_file[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR buffer[rip]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR buffer2[rip]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"428976.c"
	.text
	.global	getopt_long_options
	.section	.rodata
	.align	2
.LC0:
	.ascii	"block-size\000"
	.align	2
.LC1:
	.ascii	"help\000"
	.data
	.align	2
	.type	getopt_long_options, %object
	.size	getopt_long_options, 32
getopt_long_options:
	.word	.LC0
	.word	1
	.word	0
	.word	98
	.word	.LC1
	.word	0
	.word	0
	.word	63
	.global	getopt_short_options
	.section	.rodata
	.align	2
	.type	getopt_short_options, %object
	.size	getopt_short_options, 4
getopt_short_options:
	.ascii	"b:?\000"
	.comm	tmp_file,4,4
	.comm	dest_file,4,4
	.comm	prog_name,4,4
	.comm	buffer,4,4
	.comm	buffer2,4,4
	.global	block_size
	.data
	.align	2
	.type	block_size, %object
	.size	block_size, 4
block_size:
	.word	1048576
	.comm	total_tmp,4,4
	.comm	total_dest,4,4
	.comm	total_in,4,4
	.comm	total_out,4,4
	.comm	total_out2,4,4
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	logit
	.syntax unified
	.arm
	.fpu softvfp
	.type	logit, %function
logit:
	@ args = 4, pretend = 4, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 1
	str	r3, [sp, #-4]!
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #28
	str	r0, [fp, #-20]
	str	r1, [fp, #-24]
	str	r2, [fp, #-28]
	ldr	r3, [fp, #4]
	str	r3, [fp, #-32]
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	mov	r3,#0
	add	r3, fp, #8
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-20]
	bl	vfprintf
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L4
	ldr	r0, [fp, #-28]
	bl	exit
.L4:
	nop
	ldr	r3, .L5
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #4
	bx	lr
.L6:
	.align	2
.L5:
	.word	.LC2
	.size	logit, .-logit
	.section	.rodata
	.align	2
.LC3:
	.ascii	"error reading tmp_file (%s)\012\000"
	.align	2
.LC4:
	.ascii	"error writing dest_file (%s)\012\000"
	.align	2
.LC5:
	.ascii	"error: something went wrong (total_tmp=%lld crt=%ll"
	.ascii	"d)\012\000"
	.align	2
.LC6:
	.ascii	"error truncating tmp_file (%s)\012\000"
	.text
	.align	2
	.global	flush_tmp_to_dest
	.syntax unified
	.arm
	.fpu softvfp
	.type	flush_tmp_to_dest, %function
flush_tmp_to_dest:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	ldr	r3, .L17
	ldr	r3, [r3]
	mov	r0, r3
	bl	rewind
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, .L17+4
	ldr	r0, [r3]
	ldr	r3, .L17+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	sub	r2, r2, r3
	ldr	r3, .L17+12
	ldr	r3, [r3]
	cmp	r2, r3
	movcc	r2, r2
	movcs	r2, r3
	ldr	r3, .L17
	ldr	r3, [r3]
	mov	r1, #1
	bl	fread
	str	r0, [fp, #-20]
	ldr	r3, .L17
	ldr	r3, [r3]
	mov	r0, r3
	bl	ferror
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r3, .L17+16
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	ldr	r3, .L17+20
	mov	r2, #1
	mov	r1, #1
	mov	r0, r4
	bl	logit
	b	.L9
.L13:
	ldr	r3, .L17+4
	ldr	r0, [r3]
	ldr	r3, .L17+24
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	mov	r1, #1
	bl	fwrite
	str	r0, [fp, #-16]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	beq	.L10
	ldr	r3, .L17+16
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	ldr	r3, .L17+28
	mov	r2, #1
	mov	r1, #1
	mov	r0, r4
	bl	logit
.L10:
	ldr	r3, .L17
	ldr	r3, [r3]
	mov	r0, r3
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	bne	.L16
	ldr	r3, .L17+4
	ldr	r0, [r3]
	ldr	r3, .L17+12
	ldr	r2, [r3]
	ldr	r3, .L17
	ldr	r3, [r3]
	mov	r1, #1
	bl	fread
	str	r0, [fp, #-20]
	ldr	r3, .L17
	ldr	r3, [r3]
	mov	r0, r3
	bl	ferror
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r3, .L17+16
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	ldr	r3, .L17+20
	mov	r2, #1
	mov	r1, #1
	mov	r0, r4
	bl	logit
.L9:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L13
	b	.L12
.L16:
	nop
.L12:
	ldr	r3, .L17+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	beq	.L14
	ldr	r3, .L17+16
	ldr	ip, [r3]
	ldr	r3, .L17+8
	ldr	r3, [r3]
	mov	r2, r3
	mov	r3, #0
	ldr	r1, [fp, #-24]
	mov	r0, r1
	mov	r1, #0
	str	r0, [sp, #8]
	str	r1, [sp, #12]
	stm	sp, {r2-r3}
	ldr	r3, .L17+32
	mov	r2, #1
	mov	r1, #1
	mov	r0, ip
	bl	logit
.L14:
	ldr	r3, .L17+36
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, .L17+36
	str	r3, [r2]
	ldr	r3, .L17
	ldr	r3, [r3]
	mov	r0, r3
	bl	rewind
	ldr	r3, .L17
	ldr	r3, [r3]
	mov	r0, r3
	bl	fileno
	mov	r3, r0
	mov	r1, #0
	mov	r0, r3
	bl	ftruncate
	mov	r3, r0
	cmp	r3, #0
	beq	.L15
	ldr	r3, .L17+16
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	ldr	r3, .L17+40
	mov	r2, #1
	mov	r1, #1
	mov	r0, r4
	bl	logit
.L15:
	ldr	r3, .L17+8
	mov	r2, #0
	str	r2, [r3]
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L18:
	.align	2
.L17:
	.word	tmp_file
	.word	buffer2
	.word	total_tmp
	.word	block_size
	.word	stderr
	.word	.LC3
	.word	dest_file
	.word	.LC4
	.word	.LC5
	.word	total_dest
	.word	.LC6
	.size	flush_tmp_to_dest, .-flush_tmp_to_dest
	.section	.rodata
	.align	2
.LC7:
	.ascii	"\012Synopsis:\012\012\000"
	.align	2
.LC8:
	.ascii	"  Copy stdin to dest_file via tmp_file.\012\012\000"
	.align	2
.LC9:
	.ascii	"  If tmp_file runs out of space, the program flushe"
	.ascii	"s its contents to dest_file,\012\000"
	.align	2
.LC10:
	.ascii	"  truncates tmp_file to zero length, and continues "
	.ascii	"as before.\012\012\000"
	.align	2
.LC11:
	.ascii	"  If successful, all of stdin is in dest_file, and "
	.ascii	"tmp_file is empty.\012\012\000"
	.align	2
.LC12:
	.ascii	"Options:\012\012\000"
	.align	2
.LC13:
	.ascii	"  -b | --block-size <size>\012\000"
	.align	2
.LC14:
	.ascii	"    Set block size for read/write operations.\012\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, .L20
	ldr	r3, [r3]
	mov	r2, #12
	mov	r1, #1
	ldr	r0, .L20+4
	bl	fwrite
	ldr	r3, .L20
	ldr	r3, [r3]
	mov	r2, #41
	mov	r1, #1
	ldr	r0, .L20+8
	bl	fwrite
	ldr	r3, .L20
	ldr	r3, [r3]
	mov	r2, #80
	mov	r1, #1
	ldr	r0, .L20+12
	bl	fwrite
	ldr	r3, .L20
	ldr	r3, [r3]
	mov	r2, #63
	mov	r1, #1
	ldr	r0, .L20+16
	bl	fwrite
	ldr	r3, .L20
	ldr	r3, [r3]
	mov	r2, #71
	mov	r1, #1
	ldr	r0, .L20+20
	bl	fwrite
	ldr	r3, .L20
	ldr	r3, [r3]
	mov	r2, #10
	mov	r1, #1
	ldr	r0, .L20+24
	bl	fwrite
	ldr	r3, .L20
	ldr	r3, [r3]
	mov	r2, #27
	mov	r1, #1
	ldr	r0, .L20+28
	bl	fwrite
	ldr	r3, .L20
	ldr	r3, [r3]
	mov	r2, #46
	mov	r1, #1
	ldr	r0, .L20+32
	bl	fwrite
	nop
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	stderr
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC15:
	.ascii	"error: block size to small (\"%s\" => %d)\012\000"
	.align	2
.LC16:
	.ascii	"Use: %s [tmp_file] [dest_file]\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	ldr	r2, .L28
	str	r3, [r2]
	b	.L23
.L27:
	ldr	r3, .L28+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L28+8
	str	r2, [r3]
	ldr	r3, .L28+8
	ldr	r3, [r3]
	cmp	r3, #63
	bhi	.L23
	ldr	r3, .L28+12
	ldr	r0, [r3]
	ldr	r3, .L28+4
	ldr	r3, [r3]
	ldr	r2, .L28+8
	ldr	r2, [r2]
	str	r2, [sp, #4]
	str	r3, [sp]
	ldr	r3, .L28+16
	mov	r2, #1
	mov	r1, #1
	bl	logit
	b	.L23
.L24:
	ldr	r3, .L28+12
	ldr	r0, [r3]
	ldr	r3, .L28
	ldr	r3, [r3]
	str	r3, [sp]
	ldr	r3, .L28+20
	mov	r2, #0
	mov	r1, #0
	bl	logit
	bl	usage
	mov	r0, #0
	bl	exit
.L23:
	mov	r3, #0
	str	r3, [sp]
	ldr	r3, .L28+24
	ldr	r2, .L28+28
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	getopt_long
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #98
	bne	.L24
	b	.L27
.L29:
	.align	2
.L28:
	.word	prog_name
	.word	optarg
	.word	block_size
	.word	stderr
	.word	.LC15
	.word	.LC16
	.word	getopt_long_options
	.word	getopt_short_options
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
