	.file	"extr_targ-log-merge.c_main.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"(none)"
.LC1:
	.string	"hviu:t:"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"fatal: cannot change user to %s\n"
	.section	.rodata.str1.1
.LC3:
	.string	"cannot open %s: %m\n"
.LC4:
	.string	"cannot create %s: %m\n"
.LC5:
	.string	"stdout"
	.section	.rodata.str1.8
	.align 8
.LC6:
	.string	"copying from position %lld of file %s\n"
	.align 8
.LC7:
	.string	"transferred %lld bytes from %s\n"
	.section	.rodata.str1.1
.LC8:
	.string	"error syncing %s: %m"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rax, QWORD PTR [rsi]
	lea	rbx, .L5[rip]
	mov	QWORD PTR progname[rip], rax
.L43:
	lea	rdx, .LC1[rip]
	mov	rsi, rbp
	mov	edi, r12d
	call	getopt@PLT
	cmp	eax, -1
	je	.L50
	sub	eax, 104
	cmp	eax, 14
	ja	.L43
	movsx	rax, DWORD PTR [rbx+rax*4]
	add	rax, rbx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L5:
	.long	.L13-.L5
	.long	.L8-.L5
	.long	.L43-.L5
	.long	.L43-.L5
	.long	.L43-.L5
	.long	.L43-.L5
	.long	.L43-.L5
	.long	.L43-.L5
	.long	.L43-.L5
	.long	.L43-.L5
	.long	.L43-.L5
	.long	.L43-.L5
	.long	.L7-.L5
	.long	.L6-.L5
	.long	.L4-.L5
	.section	.text.startup
.L13:
	xor	eax, eax
	call	usage@PLT
	mov	eax, 2
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	mov	QWORD PTR verbosity[rip], 1
	jmp	.L43
.L6:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR username[rip], rax
	jmp	.L43
.L7:
	mov	rdi, QWORD PTR optarg[rip]
	call	atoi@PLT
	mov	DWORD PTR time_offset[rip], eax
	jmp	.L43
.L8:
	mov	DWORD PTR addr_ext_size[rip], 29
	jmp	.L43
.L50:
	mov	eax, DWORD PTR optind[rip]
	cmp	eax, r12d
	jge	.L13
	add	eax, 3
	cmp	eax, r12d
	jl	.L13
	cmp	DWORD PTR time_offset[rip], 0
	jle	.L51
.L15:
	xor	edi, edi
	call	time@PLT
	movsx	rdx, DWORD PTR time_offset[rip]
	mov	rdi, QWORD PTR username[rip]
	sub	rax, rdx
	mov	QWORD PTR time_threshold[rip], rax
	movsx	rax, DWORD PTR optind[rip]
	mov	rax, QWORD PTR 0[rbp+rax*8]
	mov	QWORD PTR src_fname[rip], rax
	test	rdi, rdi
	je	.L16
	call	change_user@PLT
	test	rax, rax
	js	.L52
.L16:
	mov	esi, DWORD PTR O_RDONLY[rip]
	mov	rdi, QWORD PTR src_fname[rip]
	xor	eax, eax
	call	open@PLT
	mov	rdx, QWORD PTR src_fname[rip]
	mov	QWORD PTR src_fd[rip], rax
	test	rax, rax
	js	.L48
	movsx	rax, DWORD PTR optind[rip]
	lea	edx, 2[rax]
	cmp	edx, r12d
	jl	.L53
.L19:
	lea	edx, 1[rax]
	cmp	edx, r12d
	jl	.L54
	lea	rax, .LC5[rip]
	mov	DWORD PTR targ_fd[rip], 1
	mov	QWORD PTR targ_fname[rip], rax
.L23:
	xor	eax, eax
	call	process_record@PLT
	test	rax, rax
	jns	.L23
	xor	eax, eax
	call	flush_out@PLT
	cmp	DWORD PTR mode[rip], 2
	je	.L55
.L24:
	mov	edi, DWORD PTR targ_fd[rip]
	cmp	edi, 1
	je	.L30
.L34:
	call	fdatasync@PLT
	test	rax, rax
	js	.L56
.L31:
	mov	edi, DWORD PTR targ_fd[rip]
	call	close@PLT
.L30:
	cmp	QWORD PTR verbosity[rip], 0
	jle	.L33
	xor	eax, eax
	call	output_stats@PLT
.L33:
	mov	rax, QWORD PTR rptr[rip]
	cmp	QWORD PTR rend[rip], rax
	setg	al
	movzx	eax, al
	jmp	.L1
.L51:
	mov	DWORD PTR time_offset[rip], 86400
	jmp	.L15
.L53:
	mov	rdi, QWORD PTR 16[rbp+rax*8]
	mov	esi, DWORD PTR O_RDONLY[rip]
	xor	eax, eax
	mov	QWORD PTR curr_fname[rip], rdi
	call	open@PLT
	mov	DWORD PTR mode[rip], 1
	mov	rdx, rax
	mov	DWORD PTR curr_fd[rip], eax
	movsx	rax, DWORD PTR optind[rip]
	test	edx, edx
	jns	.L19
	mov	rdx, QWORD PTR curr_fname[rip]
.L48:
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L1
.L52:
	mov	rdx, QWORD PTR username[rip]
	test	rdx, rdx
	je	.L57
.L17:
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L1
.L54:
	mov	rdi, QWORD PTR 8[rbp+rax*8]
	mov	esi, DWORD PTR O_WRONLY[rip]
	mov	edx, 420
	xor	eax, eax
	or	esi, DWORD PTR O_APPEND[rip]
	or	esi, DWORD PTR O_CREAT[rip]
	mov	QWORD PTR targ_fname[rip], rdi
	call	open@PLT
	mov	DWORD PTR targ_fd[rip], eax
	test	eax, eax
	js	.L58
	mov	edx, DWORD PTR SEEK_END[rip]
	xor	esi, esi
	mov	edi, eax
	call	lseek@PLT
	xor	edi, edi
	test	rax, rax
	mov	QWORD PTR targ_orig_size[rip], rax
	setg	dil
	call	assert@PLT
	jmp	.L23
.L55:
	mov	rax, QWORD PTR rptr[rip]
	cmp	QWORD PTR rend[rip], rax
	jne	.L24
	xor	edi, edi
	cmp	QWORD PTR position[rip], 0
	setg	dil
	call	assert@PLT
	mov	rdx, QWORD PTR targ_orig_size[rip]
	add	rdx, QWORD PTR position[rip]
	cmp	QWORD PTR verbosity[rip], 0
	mov	QWORD PTR position[rip], rdx
	jle	.L25
	mov	rcx, QWORD PTR curr_fname[rip]
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC6[rip]
	xor	eax, eax
	call	fprintf@PLT
.L25:
	mov	edx, DWORD PTR SEEK_SET[rip]
	mov	rsi, QWORD PTR position[rip]
	mov	edi, DWORD PTR curr_fd[rip]
	call	lseek@PLT
	xor	edi, edi
	cmp	QWORD PTR position[rip], rax
	sete	dil
	call	assert@PLT
	jmp	.L29
.L26:
	mov	edi, DWORD PTR targ_fd[rip]
	mov	esi, DWORD PTR WB[rip]
	mov	edx, eax
	call	write@PLT
	xor	edi, edi
	cmp	ebx, eax
	sete	dil
	call	assert@PLT
.L29:
	mov	edx, DWORD PTR WRITE_BUFFER_SIZE[rip]
	mov	esi, DWORD PTR WB[rip]
	mov	edi, DWORD PTR curr_fd[rip]
	call	read@PLT
	mov	ebx, eax
	test	eax, eax
	jg	.L26
	sete	dil
	movzx	edi, dil
	call	assert@PLT
	cmp	QWORD PTR verbosity[rip], 0
	jg	.L59
	mov	edi, DWORD PTR targ_fd[rip]
	cmp	edi, 1
	je	.L33
	jmp	.L34
.L56:
	mov	rdx, QWORD PTR targ_fname[rip]
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC8[rip]
	xor	eax, eax
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
	jmp	.L31
.L58:
	mov	rdx, QWORD PTR targ_fname[rip]
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	xor	eax, eax
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L1
.L57:
	lea	rdx, .LC0[rip]
	jmp	.L17
.L59:
	mov	edx, DWORD PTR SEEK_CUR[rip]
	mov	edi, DWORD PTR curr_fd[rip]
	xor	esi, esi
	mov	r12, QWORD PTR curr_fname[rip]
	call	lseek@PLT
	mov	edi, DWORD PTR stderr[rip]
	sub	rax, QWORD PTR position[rip]
	lea	rsi, .LC7[rip]
	mov	rdx, rax
	mov	rcx, r12
	xor	eax, eax
	call	fprintf@PLT
	jmp	.L24
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.comm	verbosity,8,8
	.comm	username,8,8
	.comm	time_threshold,8,8
	.comm	time_offset,4,4
	.comm	targ_orig_size,8,8
	.comm	targ_fname,8,8
	.comm	targ_fd,4,4
	.comm	stderr,4,4
	.comm	src_fname,8,8
	.comm	src_fd,8,8
	.comm	rptr,8,8
	.comm	rend,8,8
	.comm	progname,8,8
	.comm	position,8,8
	.comm	optind,4,4
	.comm	optarg,8,8
	.comm	mode,4,4
	.comm	curr_fname,8,8
	.comm	curr_fd,4,4
	.comm	addr_ext_size,4,4
	.comm	WRITE_BUFFER_SIZE,4,4
	.comm	WB,4,4
	.comm	SEEK_SET,4,4
	.comm	SEEK_END,4,4
	.comm	SEEK_CUR,4,4
	.comm	O_WRONLY,4,4
	.comm	O_RDONLY,4,4
	.comm	O_CREAT,4,4
	.comm	O_APPEND,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_targ-log-merge.c_main.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"(none)\000"
	.align	2
.LC1:
	.ascii	"hviu:t:\000"
	.align	2
.LC2:
	.ascii	"fatal: cannot change user to %s\012\000"
	.align	2
.LC3:
	.ascii	"cannot open %s: %m\012\000"
	.align	2
.LC4:
	.ascii	"cannot create %s: %m\012\000"
	.align	2
.LC5:
	.ascii	"stdout\000"
	.align	2
.LC6:
	.ascii	"copying from position %lld of file %s\012\000"
	.align	2
.LC7:
	.ascii	"transferred %lld bytes from %s\012\000"
	.align	2
.LC8:
	.ascii	"error syncing %s: %m\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	r4, r1
	mov	r5, r0
	ldr	r2, [r1]
	ldr	r3, .L60
	ldr	r6, .L60+4
	ldr	fp, .L60+8
	ldr	r7, .L60+12
	ldr	r10, .L60+16
	ldr	r9, .L60+20
	ldr	r8, .L60+24
	sub	sp, sp, #12
	str	r2, [r3]
.L3:
	mov	r2, r6
	mov	r1, r4
	mov	r0, r5
	bl	getopt
	cmn	r0, #1
	sub	r0, r0, #104
	beq	.L52
	cmp	r0, #14
	ldrls	pc, [pc, r0, asl #2]
	b	.L3
.L5:
	.word	.L13
	.word	.L8
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L7
	.word	.L6
	.word	.L4
.L13:
	bl	usage
	mov	r0, #2
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mov	r3, #1
	str	r3, [r8]
	b	.L3
.L6:
	ldr	r3, [r7]
	str	r3, [r9]
	b	.L3
.L7:
	ldr	r0, [r7]
	bl	atoi
	str	r0, [r10]
	b	.L3
.L8:
	mov	r3, #29
	str	r3, [fp]
	b	.L3
.L52:
	ldr	r7, .L60+28
	ldr	r3, [r7]
	cmp	r3, r5
	bge	.L13
	add	r3, r3, #3
	cmp	r3, r5
	blt	.L13
	ldr	r6, .L60+16
	mov	r0, #0
	ldr	r3, [r6]
	ldr	r8, .L60+20
	cmp	r3, #0
	ldrle	r3, .L60+32
	strle	r3, [r6]
	bl	time
	ldr	r3, [r6]
	ldr	r1, [r7]
	ldr	r2, [r8]
	ldr	r1, [r4, r1, lsl #2]
	sub	r3, r0, r3
	ldr	r6, .L60+36
	ldr	r0, .L60+40
	cmp	r2, #0
	str	r3, [r0]
	str	r1, [r6]
	beq	.L16
	mov	r0, r2
	bl	change_user
	cmp	r0, #0
	blt	.L53
.L16:
	ldr	r8, .L60+44
	ldr	r0, [r6]
	ldr	r1, [r8]
	bl	open
	ldr	r3, .L60+48
	cmp	r0, #0
	str	r0, [r3]
	blt	.L54
	ldr	r3, [r7]
	add	r3, r3, #2
	cmp	r3, r5
	blt	.L55
.L19:
	ldr	r3, [r7]
	add	r3, r3, #1
	cmp	r3, r5
	blt	.L56
	mov	r2, #1
	ldr	r4, .L60+52
	ldr	r5, .L60+56
	ldr	r3, .L60+60
	str	r2, [r4]
	str	r3, [r5]
.L23:
	bl	process_record
	cmp	r0, #0
	bge	.L23
	bl	flush_out
	ldr	r3, .L60+64
	ldr	r3, [r3]
	cmp	r3, #2
	beq	.L47
	ldr	r6, .L60+24
	ldr	r7, .L60+68
	ldr	r8, .L60+72
.L24:
	ldr	r0, [r4]
	cmp	r0, #1
	beq	.L30
.L34:
	bl	fdatasync
	cmp	r0, #0
	blt	.L57
.L31:
	ldr	r0, [r4]
	bl	close
.L30:
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L33
	bl	output_stats
.L33:
	ldr	r0, [r7]
	ldr	r3, [r8]
	cmp	r0, r3
	movle	r0, #0
	movgt	r0, #1
	b	.L1
.L55:
	ldr	r0, [r4, r3, lsl #2]
	ldr	r9, .L60+76
	ldr	r1, [r8]
	str	r0, [r9]
	bl	open
	mov	r6, #1
	ldr	r2, .L60+80
	ldr	r3, .L60+64
	cmp	r0, #0
	str	r0, [r2]
	str	r6, [r3]
	bge	.L19
	ldr	r3, .L60+84
	ldr	r2, [r9]
	ldr	r0, [r3]
	ldr	r1, .L60+88
	bl	fprintf
	mov	r0, r6
	b	.L1
.L53:
	ldr	r2, [r8]
	ldr	r1, .L60+92
	ldr	r3, .L60+84
	cmp	r2, #0
	moveq	r2, r1
	ldr	r0, [r3]
	ldr	r1, .L60+96
	bl	fprintf
	mov	r0, #1
	b	.L1
.L56:
	ldr	r0, .L60+100
	ldr	r2, .L60+104
	ldr	r1, .L60+108
	ldr	ip, [r0]
	ldr	r2, [r2]
	ldr	r1, [r1]
	ldr	r0, [r4, r3, lsl #2]
	orr	r2, r2, ip
	ldr	r5, .L60+56
	orr	r1, r2, r1
	mov	r2, #420
	str	r0, [r5]
	bl	open
	ldr	r4, .L60+52
	cmp	r0, #0
	str	r0, [r4]
	blt	.L58
	ldr	r3, .L60+112
	mov	r1, #0
	ldr	r2, [r3]
	bl	lseek
	mov	r3, r0
	cmp	r0, #0
	ldr	r2, .L60+116
	movle	r0, #0
	movgt	r0, #1
	str	r3, [r2]
	bl	assert
	b	.L23
.L47:
	ldr	r7, .L60+68
	ldr	r8, .L60+72
	ldr	r2, [r7]
	ldr	r3, [r8]
	cmp	r2, r3
	beq	.L48
	ldr	r6, .L60+24
	b	.L24
.L54:
	ldr	r3, .L60+84
	ldr	r2, [r6]
	ldr	r0, [r3]
	ldr	r1, .L60+88
	bl	fprintf
	mov	r0, #1
	b	.L1
.L57:
	ldr	r3, .L60+84
	ldr	r2, [r5]
	ldr	r0, [r3]
	ldr	r1, .L60+120
	bl	fprintf
	mov	r0, #1
	bl	exit
	b	.L31
.L58:
	ldr	r3, .L60+84
	ldr	r2, [r5]
	ldr	r0, [r3]
	ldr	r1, .L60+124
	bl	fprintf
	mov	r0, #1
	b	.L1
.L48:
	ldr	fp, .L60+128
	ldr	r6, .L60+24
	ldr	r0, [fp]
	cmp	r0, #0
	movle	r0, #0
	movgt	r0, #1
	bl	assert
	ldr	r3, .L60+116
	ldr	r2, [fp]
	ldr	r1, [r3]
	ldr	r3, [r6]
	add	r2, r2, r1
	cmp	r3, #0
	str	r2, [fp]
	ble	.L25
	ldr	r1, .L60+84
	ldr	r3, .L60+76
	ldr	r0, [r1]
	ldr	r3, [r3]
	ldr	r1, .L60+132
	bl	fprintf
.L25:
	ldr	r3, .L60+136
	ldr	r10, .L60+80
	ldr	r2, [r3]
	ldr	r1, [fp]
	ldr	r0, [r10]
	bl	lseek
	ldr	r3, [fp]
	ldr	r9, .L60+140
	sub	r0, r3, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	str	r5, [sp, #4]
	b	.L29
.L26:
	mov	r2, r5
	ldr	r1, [r9]
	ldr	r0, [r4]
	bl	write
	sub	r0, r5, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
.L29:
	ldr	r3, .L60+144
	ldr	r1, [r9]
	ldr	r2, [r3]
	ldr	r0, [r10]
	bl	read
	subs	r5, r0, #0
	bgt	.L26
	moveq	r0, #1
	movne	r0, #0
	ldr	r5, [sp, #4]
	bl	assert
	ldr	r3, [r6]
	cmp	r3, #0
	bgt	.L59
	ldr	r0, [r4]
	cmp	r0, #1
	beq	.L33
	b	.L34
.L59:
	ldr	r2, .L60+148
	ldr	r3, .L60+84
	mov	r1, #0
	ldr	r0, [r10]
	ldr	r2, [r2]
	ldr	r9, [r3]
	bl	lseek
	mov	r1, r0
	ldr	r2, [fp]
	ldr	r3, .L60+76
	sub	r2, r1, r2
	mov	r0, r9
	ldr	r3, [r3]
	ldr	r1, .L60+152
	bl	fprintf
	b	.L24
.L61:
	.align	2
.L60:
	.word	progname
	.word	.LC1
	.word	addr_ext_size
	.word	optarg
	.word	time_offset
	.word	username
	.word	verbosity
	.word	optind
	.word	86400
	.word	src_fname
	.word	time_threshold
	.word	O_RDONLY
	.word	src_fd
	.word	targ_fd
	.word	targ_fname
	.word	.LC5
	.word	mode
	.word	rend
	.word	rptr
	.word	curr_fname
	.word	curr_fd
	.word	stderr
	.word	.LC3
	.word	.LC0
	.word	.LC2
	.word	O_APPEND
	.word	O_WRONLY
	.word	O_CREAT
	.word	SEEK_END
	.word	targ_orig_size
	.word	.LC8
	.word	.LC4
	.word	position
	.word	.LC6
	.word	SEEK_SET
	.word	WB
	.word	WRITE_BUFFER_SIZE
	.word	SEEK_CUR
	.word	.LC7
	.size	main, .-main
	.comm	verbosity,4,4
	.comm	username,4,4
	.comm	time_threshold,4,4
	.comm	time_offset,4,4
	.comm	targ_orig_size,4,4
	.comm	targ_fname,4,4
	.comm	targ_fd,4,4
	.comm	stderr,4,4
	.comm	src_fname,4,4
	.comm	src_fd,4,4
	.comm	rptr,4,4
	.comm	rend,4,4
	.comm	progname,4,4
	.comm	position,4,4
	.comm	optind,4,4
	.comm	optarg,4,4
	.comm	mode,4,4
	.comm	curr_fname,4,4
	.comm	curr_fd,4,4
	.comm	addr_ext_size,4,4
	.comm	WRITE_BUFFER_SIZE,4,4
	.comm	WB,4,4
	.comm	SEEK_SET,4,4
	.comm	SEEK_END,4,4
	.comm	SEEK_CUR,4,4
	.comm	O_WRONLY,4,4
	.comm	O_RDONLY,4,4
	.comm	O_CREAT,4,4
	.comm	O_APPEND,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
