	.file	"555908.c"
	.intel_syntax noprefix
	.text
	.globl	trx_path
	.bss
	.align 8
	.type	trx_path, @object
	.size	trx_path, 8
trx_path:
	.zero	8
	.globl	trx_offset
	.align 8
	.type	trx_offset, @object
	.size	trx_offset, 8
trx_offset:
	.zero	8
	.globl	partition
	.align 16
	.type	partition, @object
	.size	partition, 24
partition:
	.zero	24
	.text
	.type	otrx_min, @function
otrx_min:
.LFB6:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	cmp	QWORD PTR -16[rbp], rax
	cmovbe	rax, QWORD PTR -16[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	otrx_min, .-otrx_min
	.section	.rodata
	.align 32
	.type	crc32_tbl, @object
	.size	crc32_tbl, 1024
crc32_tbl:
	.long	0
	.long	1996959894
	.long	-301047508
	.long	-1727442502
	.long	124634137
	.long	1886057615
	.long	-379345611
	.long	-1637575261
	.long	249268274
	.long	2044508324
	.long	-522852066
	.long	-1747789432
	.long	162941995
	.long	2125561021
	.long	-407360249
	.long	-1866523247
	.long	498536548
	.long	1789927666
	.long	-205950648
	.long	-2067906082
	.long	450548861
	.long	1843258603
	.long	-187386543
	.long	-2083289657
	.long	325883990
	.long	1684777152
	.long	-43845254
	.long	-1973040660
	.long	335633487
	.long	1661365465
	.long	-99664541
	.long	-1928851979
	.long	997073096
	.long	1281953886
	.long	-715111964
	.long	-1570279054
	.long	1006888145
	.long	1258607687
	.long	-770865667
	.long	-1526024853
	.long	901097722
	.long	1119000684
	.long	-608450090
	.long	-1396901568
	.long	853044451
	.long	1172266101
	.long	-589951537
	.long	-1412350631
	.long	651767980
	.long	1373503546
	.long	-925412992
	.long	-1076862698
	.long	565507253
	.long	1454621731
	.long	-809855591
	.long	-1195530993
	.long	671266974
	.long	1594198024
	.long	-972236366
	.long	-1324619484
	.long	795835527
	.long	1483230225
	.long	-1050600021
	.long	-1234817731
	.long	1994146192
	.long	31158534
	.long	-1731059524
	.long	-271249366
	.long	1907459465
	.long	112637215
	.long	-1614814043
	.long	-390540237
	.long	2013776290
	.long	251722036
	.long	-1777751922
	.long	-519137256
	.long	2137656763
	.long	141376813
	.long	-1855689577
	.long	-429695999
	.long	1802195444
	.long	476864866
	.long	-2056965928
	.long	-228458418
	.long	1812370925
	.long	453092731
	.long	-2113342271
	.long	-183516073
	.long	1706088902
	.long	314042704
	.long	-1950435094
	.long	-54949764
	.long	1658658271
	.long	366619977
	.long	-1932296973
	.long	-69972891
	.long	1303535960
	.long	984961486
	.long	-1547960204
	.long	-725929758
	.long	1256170817
	.long	1037604311
	.long	-1529756563
	.long	-740887301
	.long	1131014506
	.long	879679996
	.long	-1385723834
	.long	-631195440
	.long	1141124467
	.long	855842277
	.long	-1442165665
	.long	-586318647
	.long	1342533948
	.long	654459306
	.long	-1106571248
	.long	-921952122
	.long	1466479909
	.long	544179635
	.long	-1184443383
	.long	-832445281
	.long	1591671054
	.long	702138776
	.long	-1328506846
	.long	-942167884
	.long	1504918807
	.long	783551873
	.long	-1212326853
	.long	-1061524307
	.long	-306674912
	.long	-1698712650
	.long	62317068
	.long	1957810842
	.long	-355121351
	.long	-1647151185
	.long	81470997
	.long	1943803523
	.long	-480048366
	.long	-1805370492
	.long	225274430
	.long	2053790376
	.long	-468791541
	.long	-1828061283
	.long	167816743
	.long	2097651377
	.long	-267414716
	.long	-2029476910
	.long	503444072
	.long	1762050814
	.long	-144550051
	.long	-2140837941
	.long	426522225
	.long	1852507879
	.long	-19653770
	.long	-1982649376
	.long	282753626
	.long	1742555852
	.long	-105259153
	.long	-1900089351
	.long	397917763
	.long	1622183637
	.long	-690576408
	.long	-1580100738
	.long	953729732
	.long	1340076626
	.long	-776247311
	.long	-1497606297
	.long	1068828381
	.long	1219638859
	.long	-670225446
	.long	-1358292148
	.long	906185462
	.long	1090812512
	.long	-547295293
	.long	-1469587627
	.long	829329135
	.long	1181335161
	.long	-882789492
	.long	-1134132454
	.long	628085408
	.long	1382605366
	.long	-871598187
	.long	-1156888829
	.long	570562233
	.long	1426400815
	.long	-977650754
	.long	-1296233688
	.long	733239954
	.long	1555261956
	.long	-1026031705
	.long	-1244606671
	.long	752459403
	.long	1541320221
	.long	-1687895376
	.long	-328994266
	.long	1969922972
	.long	40735498
	.long	-1677130071
	.long	-351390145
	.long	1913087877
	.long	83908371
	.long	-1782625662
	.long	-491226604
	.long	2075208622
	.long	213261112
	.long	-1831694693
	.long	-438977011
	.long	2094854071
	.long	198958881
	.long	-2032938284
	.long	-237706686
	.long	1759359992
	.long	534414190
	.long	-2118248755
	.long	-155638181
	.long	1873836001
	.long	414664567
	.long	-2012718362
	.long	-15766928
	.long	1711684554
	.long	285281116
	.long	-1889165569
	.long	-127750551
	.long	1634467795
	.long	376229701
	.long	-1609899400
	.long	-686959890
	.long	1308918612
	.long	956543938
	.long	-1486412191
	.long	-799009033
	.long	1231636301
	.long	1047427035
	.long	-1362007478
	.long	-640263460
	.long	1088359270
	.long	936918000
	.long	-1447252397
	.long	-558129467
	.long	1202900863
	.long	817233897
	.long	-1111625188
	.long	-893730166
	.long	1404277552
	.long	615818150
	.long	-1160759803
	.long	-841546093
	.long	1423857449
	.long	601450431
	.long	-1285129682
	.long	-1000256840
	.long	1567103746
	.long	711928724
	.long	-1274298825
	.long	-1022587231
	.long	1510334235
	.long	755167117
	.text
	.globl	otrx_crc32
	.type	otrx_crc32, @function
otrx_crc32:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], -1
	jmp	.L4
.L5:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	xor	eax, DWORD PTR -4[rbp]
	movzx	eax, al
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, crc32_tbl[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	shr	eax, 8
	xor	eax, edx
	mov	DWORD PTR -4[rbp], eax
	add	QWORD PTR -24[rbp], 1
	sub	QWORD PTR -32[rbp], 1
.L4:
	cmp	QWORD PTR -32[rbp], 0
	jne	.L5
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	otrx_crc32, .-otrx_crc32
	.section	.rodata
.LC0:
	.string	"o:"
	.text
	.type	otrx_check_parse_options, @function
otrx_check_parse_options:
.LFB8:
	.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
	jmp	.L8
.L9:
	cmp	DWORD PTR -4[rbp], 111
	jne	.L8
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	atoi@PLT
	cdqe
	mov	QWORD PTR trx_offset[rip], rax
	nop
.L8:
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	lea	rdx, .LC0[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L9
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	otrx_check_parse_options, .-otrx_check_parse_options
	.section	.rodata
.LC1:
	.string	"No TRX file passed\n"
.LC2:
	.string	"r"
.LC3:
	.string	"Couldn't open %s\n"
.LC4:
	.string	"Couldn't read %s header\n"
.LC5:
	.string	"Invalid TRX magic: 0x%08x\n"
	.align 8
.LC6:
	.string	"Length read from TRX too low (%zu B)\n"
	.align 8
.LC7:
	.string	"Couldn't read last %zd B of data from %s\n"
	.align 8
.LC8:
	.string	"Invalid data crc32: 0x%08x instead of 0x%08x\n"
.LC9:
	.string	"Found a valid TRX version %d\n"
	.text
	.type	otrx_check, @function
otrx_check:
.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, 1136
	mov	DWORD PTR -1124[rbp], edi
	mov	QWORD PTR -1136[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1100[rbp], 0
	cmp	DWORD PTR -1124[rbp], 2
	jg	.L11
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 19
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	DWORD PTR -1100[rbp], -22
	jmp	.L12
.L11:
	mov	rax, QWORD PTR -1136[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR trx_path[rip], rax
	mov	DWORD PTR optind[rip], 3
	mov	rdx, QWORD PTR -1136[rbp]
	mov	eax, DWORD PTR -1124[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	otrx_check_parse_options
	mov	rax, QWORD PTR trx_path[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1088[rbp], rax
	cmp	QWORD PTR -1088[rbp], 0
	jne	.L13
	mov	rdx, QWORD PTR trx_path[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -1100[rbp], -13
	jmp	.L12
.L13:
	mov	rax, QWORD PTR trx_offset[rip]
	mov	rcx, rax
	mov	rax, QWORD PTR -1088[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -1088[rbp]
	lea	rax, -1072[rbp]
	mov	rcx, rdx
	mov	edx, 28
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -1080[rbp], rax
	cmp	QWORD PTR -1080[rbp], 28
	je	.L14
	mov	rdx, QWORD PTR trx_path[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -1100[rbp], -5
	jmp	.L15
.L14:
	mov	eax, DWORD PTR -1072[rbp]
	cmp	eax, 810697800
	je	.L16
	mov	edx, DWORD PTR -1072[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -1100[rbp], -22
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -1068[rbp]
	mov	eax, eax
	mov	QWORD PTR -1096[rbp], rax
	cmp	QWORD PTR -1096[rbp], 27
	ja	.L17
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -1096[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -1100[rbp], -22
	jmp	.L15
.L17:
	mov	DWORD PTR -1108[rbp], -1
	mov	rax, QWORD PTR trx_offset[rip]
	add	rax, 12
	mov	rcx, rax
	mov	rax, QWORD PTR -1088[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	sub	QWORD PTR -1096[rbp], 12
	jmp	.L18
.L21:
	mov	DWORD PTR -1104[rbp], 0
	jmp	.L19
.L20:
	mov	eax, DWORD PTR -1104[rbp]
	cdqe
	movzx	eax, BYTE PTR -1040[rbp+rax]
	movzx	eax, al
	xor	eax, DWORD PTR -1108[rbp]
	movzx	eax, al
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, crc32_tbl[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -1108[rbp]
	shr	eax, 8
	xor	eax, edx
	mov	DWORD PTR -1108[rbp], eax
	add	DWORD PTR -1104[rbp], 1
.L19:
	mov	eax, DWORD PTR -1104[rbp]
	cdqe
	cmp	QWORD PTR -1080[rbp], rax
	ja	.L20
	mov	rax, QWORD PTR -1080[rbp]
	sub	QWORD PTR -1096[rbp], rax
.L18:
	mov	rax, QWORD PTR -1096[rbp]
	mov	rsi, rax
	mov	edi, 1024
	call	otrx_min
	mov	rsi, rax
	mov	rdx, QWORD PTR -1088[rbp]
	lea	rax, -1040[rbp]
	mov	rcx, rdx
	mov	rdx, rsi
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -1080[rbp], rax
	cmp	QWORD PTR -1080[rbp], 0
	jne	.L21
	cmp	QWORD PTR -1096[rbp], 0
	je	.L22
	mov	rcx, QWORD PTR trx_path[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -1096[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -1100[rbp], -5
	jmp	.L15
.L22:
	mov	eax, DWORD PTR -1064[rbp]
	cmp	DWORD PTR -1108[rbp], eax
	je	.L23
	mov	ecx, DWORD PTR -1064[rbp]
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -1108[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -1100[rbp], -22
	jmp	.L15
.L23:
	movzx	eax, WORD PTR -1058[rbp]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
.L15:
	mov	rax, QWORD PTR -1088[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L12:
	mov	eax, DWORD PTR -1100[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	otrx_check, .-otrx_check
	.type	otrx_create_parse_options, @function
otrx_create_parse_options:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	otrx_create_parse_options, .-otrx_create_parse_options
	.section	.rodata
.LC10:
	.string	"Couldn't write %zu B to %s\n"
	.text
	.type	otrx_create_append_file, @function
otrx_create_append_file:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 192
	mov	QWORD PTR -184[rbp], rdi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -168[rbp], 0
	mov	rax, QWORD PTR -192[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -160[rbp], rax
	cmp	QWORD PTR -160[rbp], 0
	jne	.L30
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -192[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, -13
	jmp	.L34
.L33:
	mov	rcx, QWORD PTR -184[rbp]
	mov	rdx, QWORD PTR -152[rbp]
	lea	rax, -144[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	cmp	QWORD PTR -152[rbp], rax
	je	.L31
	mov	rcx, QWORD PTR trx_path[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -152[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	QWORD PTR -168[rbp], -5
	jmp	.L32
.L31:
	mov	rdx, QWORD PTR -168[rbp]
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	mov	QWORD PTR -168[rbp], rax
.L30:
	mov	rdx, QWORD PTR -160[rbp]
	lea	rax, -144[rbp]
	mov	rcx, rdx
	mov	edx, 128
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -152[rbp], rax
	cmp	QWORD PTR -152[rbp], 0
	jne	.L33
.L32:
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -168[rbp]
.L34:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L35
	call	__stack_chk_fail@PLT
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	otrx_create_append_file, .-otrx_create_append_file
	.type	otrx_create_append_zeros, @function
otrx_create_append_zeros:
.LFB12:
	.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	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L37
	mov	rax, -12
	jmp	.L38
.L37:
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rcx, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	cmp	QWORD PTR -32[rbp], rax
	je	.L39
	mov	rcx, QWORD PTR trx_path[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -32[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, -5
	jmp	.L38
.L39:
	mov	rax, QWORD PTR -32[rbp]
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	otrx_create_append_zeros, .-otrx_create_append_zeros
	.type	otrx_create_align, @function
otrx_create_align:
.LFB13:
	.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -40[rbp]
	sub	rax, 1
	and	rax, QWORD PTR -32[rbp]
	test	rax, rax
	je	.L41
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, 0
	div	QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -40[rbp]
	sub	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	otrx_create_append_zeros
	jmp	.L42
.L41:
	mov	eax, 0
.L42:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	otrx_create_align, .-otrx_create_align
	.section	.rodata
	.align 8
.LC11:
	.string	"Couldn't write TRX header to %s\n"
.LC12:
	.string	"Couldn't alloc %zu B buffer\n"
	.align 8
.LC13:
	.string	"Couldn't read %zu B of data from %s\n"
	.text
	.type	otrx_create_write_hdr, @function
otrx_create_write_hdr:
.LFB14:
	.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	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], 810697800
	mov	rax, QWORD PTR -48[rbp]
	mov	WORD PTR 14[rax], 1
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rcx, rdx
	mov	edx, 28
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 28
	je	.L44
	mov	rdx, QWORD PTR trx_path[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -5
	jmp	.L45
.L44:
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	eax, eax
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L46
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -16[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -12
	jmp	.L45
.L46:
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rcx, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	je	.L47
	mov	rcx, QWORD PTR trx_path[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -16[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -12
	jmp	.L45
.L47:
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, -12[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 12
	mov	rsi, rdx
	mov	rdi, rax
	call	otrx_crc32
	mov	DWORD PTR -28[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR -28[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rcx, rdx
	mov	edx, 28
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 28
	je	.L48
	mov	rdx, QWORD PTR trx_path[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -5
	jmp	.L45
.L48:
	mov	eax, 0
.L45:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	otrx_create_write_hdr, .-otrx_create_write_hdr
	.section	.rodata
.LC14:
	.string	"w+"
	.align 8
.LC15:
	.string	"Reached TRX partitions limit, no place for %s\n"
.LC16:
	.string	"Failed to append file %s\n"
.LC17:
	.string	"Failed to append zeros\n"
	.align 8
.LC18:
	.string	"Current TRX length is 0x%zx, can't pad it with zeros to 0x%lx\n"
.LC19:
	.string	"f:b:"
	.text
	.type	otrx_create, @function
otrx_create:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 28
	mov	DWORD PTR -88[rbp], 0
	cmp	DWORD PTR -100[rbp], 2
	jg	.L50
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 19
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	DWORD PTR -88[rbp], -22
	jmp	.L51
.L50:
	mov	rax, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR trx_path[rip], rax
	mov	DWORD PTR optind[rip], 3
	mov	rdx, QWORD PTR -112[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	otrx_create_parse_options
	mov	rax, QWORD PTR trx_path[rip]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -64[rbp], rax
	cmp	QWORD PTR -64[rbp], 0
	jne	.L52
	mov	rdx, QWORD PTR trx_path[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -88[rbp], -13
	jmp	.L51
.L52:
	mov	rcx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	DWORD PTR optind[rip], 3
	jmp	.L53
.L66:
	cmp	DWORD PTR -84[rbp], 98
	je	.L54
	cmp	DWORD PTR -84[rbp], 102
	jne	.L55
	cmp	QWORD PTR -80[rbp], 2
	jbe	.L56
	mov	DWORD PTR -88[rbp], -28
	mov	rdx, QWORD PTR optarg[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L57
.L56:
	mov	rdx, QWORD PTR optarg[rip]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	otrx_create_append_file
	mov	QWORD PTR -56[rbp], rax
	cmp	QWORD PTR -56[rbp], 0
	jns	.L58
	mov	rdx, QWORD PTR optarg[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L59
.L58:
	mov	rax, QWORD PTR -80[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -80[rbp], rdx
	mov	rdx, QWORD PTR -72[rbp]
	add	rax, 4
	mov	DWORD PTR -48[rbp+rax*4], edx
	mov	rax, QWORD PTR -56[rbp]
	add	QWORD PTR -72[rbp], rax
.L59:
	mov	rcx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	rdi, rax
	call	otrx_create_align
	mov	QWORD PTR -56[rbp], rax
	cmp	QWORD PTR -56[rbp], 0
	jns	.L60
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC17[rip]
	call	fwrite@PLT
	jmp	.L55
.L60:
	mov	rax, QWORD PTR -56[rbp]
	add	QWORD PTR -72[rbp], rax
	jmp	.L55
.L54:
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	sub	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR -56[rbp], rax
	cmp	QWORD PTR -56[rbp], 0
	jns	.L62
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -72[rbp]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L69
.L62:
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	otrx_create_append_zeros
	mov	QWORD PTR -56[rbp], rax
	cmp	QWORD PTR -56[rbp], 0
	jns	.L64
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC17[rip]
	call	fwrite@PLT
	jmp	.L69
.L64:
	mov	rax, QWORD PTR -56[rbp]
	add	QWORD PTR -72[rbp], rax
.L69:
	nop
.L55:
	cmp	DWORD PTR -88[rbp], 0
	jne	.L70
.L53:
	mov	rcx, QWORD PTR -112[rbp]
	mov	eax, DWORD PTR -100[rbp]
	lea	rdx, .LC19[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], -1
	jne	.L66
	jmp	.L65
.L70:
	nop
.L65:
	mov	rax, QWORD PTR -72[rbp]
	mov	DWORD PTR -44[rbp], eax
	lea	rdx, -48[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	otrx_create_write_hdr
.L57:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L51:
	mov	eax, DWORD PTR -88[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L68
	call	__stack_chk_fail@PLT
.L68:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	otrx_create, .-otrx_create
	.section	.rodata
.LC20:
	.string	"c:e:o:1:2:3:"
	.text
	.type	otrx_extract_parse_options, @function
otrx_extract_parse_options:
.LFB16:
	.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
	jmp	.L72
.L77:
	cmp	DWORD PTR -4[rbp], 111
	je	.L73
	cmp	DWORD PTR -4[rbp], 111
	jg	.L72
	cmp	DWORD PTR -4[rbp], 51
	je	.L74
	cmp	DWORD PTR -4[rbp], 51
	jg	.L72
	cmp	DWORD PTR -4[rbp], 49
	je	.L75
	cmp	DWORD PTR -4[rbp], 50
	je	.L76
	jmp	.L72
.L73:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	atoi@PLT
	cdqe
	mov	QWORD PTR trx_offset[rip], rax
	jmp	.L72
.L75:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR partition[rip], rax
	jmp	.L72
.L76:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR partition[rip+8], rax
	jmp	.L72
.L74:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR partition[rip+16], rax
	nop
.L72:
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	lea	rdx, .LC20[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L77
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	otrx_extract_parse_options, .-otrx_extract_parse_options
	.section	.rodata
.LC21:
	.string	"w"
	.align 8
.LC22:
	.string	"Extracted 0x%zx bytes into %s\n"
	.text
	.type	otrx_extract_copy, @function
otrx_extract_copy:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -64[rbp], rcx
	mov	DWORD PTR -28[rbp], 0
	mov	rax, QWORD PTR -64[rbp]
	lea	rsi, .LC21[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L79
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -64[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -28[rbp], -13
	jmp	.L80
.L79:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L81
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -56[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -28[rbp], -12
	jmp	.L82
.L81:
	mov	rcx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rcx, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	cmp	rax, QWORD PTR -56[rbp]
	je	.L83
	mov	rcx, QWORD PTR trx_path[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -56[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -28[rbp], -12
	jmp	.L84
.L83:
	mov	rcx, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, 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]
	cmp	rax, QWORD PTR -56[rbp]
	je	.L85
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -28[rbp], -12
	jmp	.L84
.L85:
	mov	rdx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rax
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
.L84:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
.L82:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L80:
	mov	eax, DWORD PTR -28[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	otrx_extract_copy, .-otrx_extract_copy
	.section	.rodata
	.align 8
.LC23:
	.string	"TRX doesn't contain partition %d, can't extract %s\n"
	.text
	.type	otrx_extract, @function
otrx_extract:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -76[rbp], 0
	cmp	DWORD PTR -84[rbp], 2
	jg	.L88
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 19
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	DWORD PTR -76[rbp], -22
	jmp	.L89
.L88:
	mov	rax, QWORD PTR -96[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR trx_path[rip], rax
	mov	DWORD PTR optind[rip], 3
	mov	rdx, QWORD PTR -96[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	otrx_extract_parse_options
	mov	rax, QWORD PTR trx_path[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -64[rbp], rax
	cmp	QWORD PTR -64[rbp], 0
	jne	.L90
	mov	rdx, QWORD PTR trx_path[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -76[rbp], -13
	jmp	.L89
.L90:
	mov	rax, QWORD PTR trx_offset[rip]
	mov	rcx, rax
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -64[rbp]
	lea	rax, -48[rbp]
	mov	rcx, rdx
	mov	edx, 28
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -56[rbp], rax
	cmp	QWORD PTR -56[rbp], 28
	je	.L91
	mov	rdx, QWORD PTR trx_path[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -76[rbp], -5
	jmp	.L92
.L91:
	mov	eax, DWORD PTR -48[rbp]
	cmp	eax, 810697800
	je	.L93
	mov	edx, DWORD PTR -48[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -76[rbp], -22
	jmp	.L92
.L93:
	mov	DWORD PTR -80[rbp], 0
	jmp	.L94
.L101:
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, partition[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	je	.L104
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	add	rax, 4
	mov	eax, DWORD PTR -48[rbp+rax*4]
	test	eax, eax
	jne	.L97
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, partition[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -80[rbp]
	lea	ecx, 1[rdx]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L96
.L97:
	cmp	DWORD PTR -80[rbp], 1
	jg	.L98
	mov	eax, DWORD PTR -80[rbp]
	add	eax, 1
	cdqe
	add	rax, 4
	mov	eax, DWORD PTR -48[rbp+rax*4]
	test	eax, eax
	jne	.L99
.L98:
	mov	eax, DWORD PTR -44[rbp]
	mov	edx, DWORD PTR -80[rbp]
	movsx	rdx, edx
	add	rdx, 4
	mov	edx, DWORD PTR -48[rbp+rdx*4]
	sub	eax, edx
	mov	eax, eax
	mov	QWORD PTR -72[rbp], rax
	jmp	.L100
.L99:
	mov	eax, DWORD PTR -80[rbp]
	add	eax, 1
	cdqe
	add	rax, 4
	mov	eax, DWORD PTR -48[rbp+rax*4]
	mov	edx, DWORD PTR -80[rbp]
	movsx	rdx, edx
	add	rdx, 4
	mov	edx, DWORD PTR -48[rbp+rdx*4]
	sub	eax, edx
	mov	eax, eax
	mov	QWORD PTR -72[rbp], rax
.L100:
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, partition[rip]
	mov	rcx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	add	rax, 4
	mov	eax, DWORD PTR -48[rbp+rax*4]
	mov	edx, eax
	mov	rax, QWORD PTR trx_offset[rip]
	lea	rsi, [rdx+rax]
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	otrx_extract_copy
	jmp	.L96
.L104:
	nop
.L96:
	add	DWORD PTR -80[rbp], 1
.L94:
	cmp	DWORD PTR -80[rbp], 2
	jle	.L101
	nop
.L92:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L89:
	mov	eax, DWORD PTR -76[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L103
	call	__stack_chk_fail@PLT
.L103:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	otrx_extract, .-otrx_extract
	.section	.rodata
.LC24:
	.string	"Usage:"
.LC25:
	.string	"Checking TRX file:"
	.align 8
.LC26:
	.string	"\totrx check <file> [options]\tcheck if file is a valid TRX"
	.align 8
.LC27:
	.string	"\t-o offset\t\t\toffset of TRX data in file (default: 0)"
.LC28:
	.string	"Creating new TRX file:"
	.align 8
.LC29:
	.string	"\totrx create <file> [options] [partitions]"
	.align 8
.LC30:
	.string	"\t-f file\t\t\t\t[partition] start new partition with content copied from file"
	.align 8
.LC31:
	.string	"\t-b offset\t\t\t[partition] append zeros to partition till reaching absolute offset"
.LC32:
	.string	"Extracting from TRX file:"
	.align 8
.LC33:
	.string	"\totrx extract <file> [options]\textract partitions from TRX file"
	.align 8
.LC34:
	.string	"\t-1 file\t\t\t\tfile to extract 1st partition to (optional)"
	.align 8
.LC35:
	.string	"\t-2 file\t\t\t\tfile to extract 2nd partition to (optional)"
	.align 8
.LC36:
	.string	"\t-3 file\t\t\t\tfile to extract 3rd partition to (optional)"
	.text
	.type	usage, @function
usage:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC24[rip]
	call	puts@PLT
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC25[rip]
	call	puts@PLT
	lea	rdi, .LC26[rip]
	call	puts@PLT
	lea	rdi, .LC27[rip]
	call	puts@PLT
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC28[rip]
	call	puts@PLT
	lea	rdi, .LC29[rip]
	call	puts@PLT
	lea	rdi, .LC30[rip]
	call	puts@PLT
	lea	rdi, .LC31[rip]
	call	puts@PLT
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC32[rip]
	call	puts@PLT
	lea	rdi, .LC33[rip]
	call	puts@PLT
	lea	rdi, .LC27[rip]
	call	puts@PLT
	lea	rdi, .LC34[rip]
	call	puts@PLT
	lea	rdi, .LC35[rip]
	call	puts@PLT
	lea	rdi, .LC36[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	usage, .-usage
	.section	.rodata
.LC37:
	.string	"check"
.LC38:
	.string	"create"
.LC39:
	.string	"extract"
	.text
	.globl	main
	.type	main, @function
main:
.LFB20:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	cmp	DWORD PTR -4[rbp], 1
	jle	.L107
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC37[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L108
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	otrx_check
	jmp	.L109
.L108:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC38[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L110
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	otrx_create
	jmp	.L109
.L110:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC39[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L107
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	otrx_extract
	jmp	.L109
.L107:
	mov	eax, 0
	call	usage
	mov	eax, 0
.L109:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.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	"555908.c"
	.text
	.comm	trx_path,4,4
	.global	trx_offset
	.bss
	.align	2
	.type	trx_offset, %object
	.size	trx_offset, 4
trx_offset:
	.space	4
	.global	partition
	.align	2
	.type	partition, %object
	.size	partition, 12
partition:
	.space	12
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	otrx_min, %function
otrx_min:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	movcc	r3, r2
	movcs	r3, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	otrx_min, .-otrx_min
	.section	.rodata
	.align	2
	.type	crc32_tbl, %object
	.size	crc32_tbl, 1024
crc32_tbl:
	.word	0
	.word	1996959894
	.word	-301047508
	.word	-1727442502
	.word	124634137
	.word	1886057615
	.word	-379345611
	.word	-1637575261
	.word	249268274
	.word	2044508324
	.word	-522852066
	.word	-1747789432
	.word	162941995
	.word	2125561021
	.word	-407360249
	.word	-1866523247
	.word	498536548
	.word	1789927666
	.word	-205950648
	.word	-2067906082
	.word	450548861
	.word	1843258603
	.word	-187386543
	.word	-2083289657
	.word	325883990
	.word	1684777152
	.word	-43845254
	.word	-1973040660
	.word	335633487
	.word	1661365465
	.word	-99664541
	.word	-1928851979
	.word	997073096
	.word	1281953886
	.word	-715111964
	.word	-1570279054
	.word	1006888145
	.word	1258607687
	.word	-770865667
	.word	-1526024853
	.word	901097722
	.word	1119000684
	.word	-608450090
	.word	-1396901568
	.word	853044451
	.word	1172266101
	.word	-589951537
	.word	-1412350631
	.word	651767980
	.word	1373503546
	.word	-925412992
	.word	-1076862698
	.word	565507253
	.word	1454621731
	.word	-809855591
	.word	-1195530993
	.word	671266974
	.word	1594198024
	.word	-972236366
	.word	-1324619484
	.word	795835527
	.word	1483230225
	.word	-1050600021
	.word	-1234817731
	.word	1994146192
	.word	31158534
	.word	-1731059524
	.word	-271249366
	.word	1907459465
	.word	112637215
	.word	-1614814043
	.word	-390540237
	.word	2013776290
	.word	251722036
	.word	-1777751922
	.word	-519137256
	.word	2137656763
	.word	141376813
	.word	-1855689577
	.word	-429695999
	.word	1802195444
	.word	476864866
	.word	-2056965928
	.word	-228458418
	.word	1812370925
	.word	453092731
	.word	-2113342271
	.word	-183516073
	.word	1706088902
	.word	314042704
	.word	-1950435094
	.word	-54949764
	.word	1658658271
	.word	366619977
	.word	-1932296973
	.word	-69972891
	.word	1303535960
	.word	984961486
	.word	-1547960204
	.word	-725929758
	.word	1256170817
	.word	1037604311
	.word	-1529756563
	.word	-740887301
	.word	1131014506
	.word	879679996
	.word	-1385723834
	.word	-631195440
	.word	1141124467
	.word	855842277
	.word	-1442165665
	.word	-586318647
	.word	1342533948
	.word	654459306
	.word	-1106571248
	.word	-921952122
	.word	1466479909
	.word	544179635
	.word	-1184443383
	.word	-832445281
	.word	1591671054
	.word	702138776
	.word	-1328506846
	.word	-942167884
	.word	1504918807
	.word	783551873
	.word	-1212326853
	.word	-1061524307
	.word	-306674912
	.word	-1698712650
	.word	62317068
	.word	1957810842
	.word	-355121351
	.word	-1647151185
	.word	81470997
	.word	1943803523
	.word	-480048366
	.word	-1805370492
	.word	225274430
	.word	2053790376
	.word	-468791541
	.word	-1828061283
	.word	167816743
	.word	2097651377
	.word	-267414716
	.word	-2029476910
	.word	503444072
	.word	1762050814
	.word	-144550051
	.word	-2140837941
	.word	426522225
	.word	1852507879
	.word	-19653770
	.word	-1982649376
	.word	282753626
	.word	1742555852
	.word	-105259153
	.word	-1900089351
	.word	397917763
	.word	1622183637
	.word	-690576408
	.word	-1580100738
	.word	953729732
	.word	1340076626
	.word	-776247311
	.word	-1497606297
	.word	1068828381
	.word	1219638859
	.word	-670225446
	.word	-1358292148
	.word	906185462
	.word	1090812512
	.word	-547295293
	.word	-1469587627
	.word	829329135
	.word	1181335161
	.word	-882789492
	.word	-1134132454
	.word	628085408
	.word	1382605366
	.word	-871598187
	.word	-1156888829
	.word	570562233
	.word	1426400815
	.word	-977650754
	.word	-1296233688
	.word	733239954
	.word	1555261956
	.word	-1026031705
	.word	-1244606671
	.word	752459403
	.word	1541320221
	.word	-1687895376
	.word	-328994266
	.word	1969922972
	.word	40735498
	.word	-1677130071
	.word	-351390145
	.word	1913087877
	.word	83908371
	.word	-1782625662
	.word	-491226604
	.word	2075208622
	.word	213261112
	.word	-1831694693
	.word	-438977011
	.word	2094854071
	.word	198958881
	.word	-2032938284
	.word	-237706686
	.word	1759359992
	.word	534414190
	.word	-2118248755
	.word	-155638181
	.word	1873836001
	.word	414664567
	.word	-2012718362
	.word	-15766928
	.word	1711684554
	.word	285281116
	.word	-1889165569
	.word	-127750551
	.word	1634467795
	.word	376229701
	.word	-1609899400
	.word	-686959890
	.word	1308918612
	.word	956543938
	.word	-1486412191
	.word	-799009033
	.word	1231636301
	.word	1047427035
	.word	-1362007478
	.word	-640263460
	.word	1088359270
	.word	936918000
	.word	-1447252397
	.word	-558129467
	.word	1202900863
	.word	817233897
	.word	-1111625188
	.word	-893730166
	.word	1404277552
	.word	615818150
	.word	-1160759803
	.word	-841546093
	.word	1423857449
	.word	601450431
	.word	-1285129682
	.word	-1000256840
	.word	1567103746
	.word	711928724
	.word	-1274298825
	.word	-1022587231
	.word	1510334235
	.word	755167117
	.text
	.align	2
	.global	otrx_crc32
	.syntax unified
	.arm
	.fpu softvfp
	.type	otrx_crc32, %function
otrx_crc32:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mvn	r3, #0
	str	r3, [fp, #-8]
	b	.L4
.L5:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	eor	r3, r3, r2
	and	r3, r3, #255
	ldr	r2, .L7
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-8]
	lsr	r3, r3, #8
	eor	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
.L4:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L5
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L8:
	.align	2
.L7:
	.word	crc32_tbl
	.size	otrx_crc32, .-otrx_crc32
	.section	.rodata
	.align	2
.LC0:
	.ascii	"o:\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	otrx_check_parse_options, %function
otrx_check_parse_options:
	@ 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]
	str	r1, [fp, #-20]
	b	.L10
.L11:
	ldr	r3, [fp, #-8]
	cmp	r3, #111
	bne	.L10
	ldr	r3, .L12
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L12+4
	str	r2, [r3]
	nop
.L10:
	ldr	r2, .L12+8
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	getopt
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L11
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	optarg
	.word	trx_offset
	.word	.LC0
	.size	otrx_check_parse_options, .-otrx_check_parse_options
	.section	.rodata
	.align	2
.LC1:
	.ascii	"No TRX file passed\012\000"
	.align	2
.LC2:
	.ascii	"r\000"
	.align	2
.LC3:
	.ascii	"Couldn't open %s\012\000"
	.align	2
.LC4:
	.ascii	"Couldn't read %s header\012\000"
	.align	2
.LC5:
	.ascii	"Invalid TRX magic: 0x%08x\012\000"
	.align	2
.LC6:
	.ascii	"Length read from TRX too low (%zu B)\012\000"
	.align	2
.LC7:
	.ascii	"Couldn't read last %zd B of data from %s\012\000"
	.align	2
.LC8:
	.ascii	"Invalid data crc32: 0x%08x instead of 0x%08x\012\000"
	.align	2
.LC9:
	.ascii	"Found a valid TRX version %d\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	otrx_check, %function
otrx_check:
	@ args = 0, pretend = 0, frame = 1088
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1088
	str	r0, [fp, #-1088]
	str	r1, [fp, #-1092]
	ldr	r3, .L30
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1072]
	ldr	r3, [fp, #-1088]
	cmp	r3, #2
	bgt	.L15
	ldr	r3, .L30+4
	ldr	r3, [r3]
	mov	r2, #19
	mov	r1, #1
	ldr	r0, .L30+8
	bl	fwrite
	mvn	r3, #21
	str	r3, [fp, #-1072]
	b	.L16
.L15:
	ldr	r3, [fp, #-1092]
	ldr	r3, [r3, #8]
	ldr	r2, .L30+12
	str	r3, [r2]
	ldr	r3, .L30+16
	mov	r2, #3
	str	r2, [r3]
	ldr	r1, [fp, #-1092]
	ldr	r0, [fp, #-1088]
	bl	otrx_check_parse_options
	ldr	r3, .L30+12
	ldr	r3, [r3]
	ldr	r1, .L30+20
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-1068]
	ldr	r3, [fp, #-1068]
	cmp	r3, #0
	bne	.L17
	ldr	r3, .L30+4
	ldr	r3, [r3]
	ldr	r2, .L30+12
	ldr	r2, [r2]
	ldr	r1, .L30+24
	mov	r0, r3
	bl	fprintf
	mvn	r3, #12
	str	r3, [fp, #-1072]
	b	.L16
.L17:
	ldr	r3, .L30+28
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-1068]
	bl	fseek
	sub	r0, fp, #1056
	sub	r0, r0, #4
	ldr	r3, [fp, #-1068]
	mov	r2, #28
	mov	r1, #1
	bl	fread
	str	r0, [fp, #-1064]
	ldr	r3, [fp, #-1064]
	cmp	r3, #28
	beq	.L18
	ldr	r3, .L30+4
	ldr	r3, [r3]
	ldr	r2, .L30+12
	ldr	r2, [r2]
	ldr	r1, .L30+32
	mov	r0, r3
	bl	fprintf
	mvn	r3, #4
	str	r3, [fp, #-1072]
	b	.L19
.L18:
	ldr	r3, [fp, #-1060]
	ldr	r2, .L30+36
	cmp	r3, r2
	beq	.L20
	ldr	r3, .L30+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-1060]
	ldr	r1, .L30+40
	mov	r0, r3
	bl	fprintf
	mvn	r3, #21
	str	r3, [fp, #-1072]
	b	.L19
.L20:
	ldr	r3, [fp, #-1056]
	str	r3, [fp, #-1084]
	ldr	r3, [fp, #-1084]
	cmp	r3, #27
	bhi	.L21
	ldr	r3, .L30+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-1084]
	ldr	r1, .L30+44
	mov	r0, r3
	bl	fprintf
	mvn	r3, #21
	str	r3, [fp, #-1072]
	b	.L19
.L21:
	mvn	r3, #0
	str	r3, [fp, #-1080]
	ldr	r3, .L30+28
	ldr	r3, [r3]
	add	r3, r3, #12
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-1068]
	bl	fseek
	ldr	r3, [fp, #-1084]
	sub	r3, r3, #12
	str	r3, [fp, #-1084]
	b	.L22
.L25:
	mov	r3, #0
	str	r3, [fp, #-1076]
	b	.L23
.L24:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1076]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-1080]
	eor	r3, r3, r2
	and	r3, r3, #255
	ldr	r2, .L30+48
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-1080]
	lsr	r3, r3, #8
	eor	r3, r3, r2
	str	r3, [fp, #-1080]
	ldr	r3, [fp, #-1076]
	add	r3, r3, #1
	str	r3, [fp, #-1076]
.L23:
	ldr	r3, [fp, #-1076]
	ldr	r2, [fp, #-1064]
	cmp	r2, r3
	bhi	.L24
	ldr	r2, [fp, #-1084]
	ldr	r3, [fp, #-1064]
	sub	r3, r2, r3
	str	r3, [fp, #-1084]
.L22:
	ldr	r1, [fp, #-1084]
	mov	r0, #1024
	bl	otrx_min
	mov	r2, r0
	sub	r0, fp, #1024
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r3, [fp, #-1068]
	mov	r1, #1
	bl	fread
	str	r0, [fp, #-1064]
	ldr	r3, [fp, #-1064]
	cmp	r3, #0
	bne	.L25
	ldr	r3, [fp, #-1084]
	cmp	r3, #0
	beq	.L26
	ldr	r3, .L30+4
	ldr	r0, [r3]
	ldr	r3, .L30+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-1084]
	ldr	r1, .L30+52
	bl	fprintf
	mvn	r3, #4
	str	r3, [fp, #-1072]
	b	.L19
.L26:
	ldr	r3, [fp, #-1052]
	ldr	r2, [fp, #-1080]
	cmp	r2, r3
	beq	.L27
	ldr	r3, .L30+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-1052]
	ldr	r2, [fp, #-1080]
	ldr	r1, .L30+56
	bl	fprintf
	mvn	r3, #21
	str	r3, [fp, #-1072]
	b	.L19
.L27:
	sub	r3, fp, #4
	sub	r3, r3, #1056
	ldrh	r3, [r3, #14]
	mov	r1, r3
	ldr	r0, .L30+60
	bl	printf
.L19:
	ldr	r0, [fp, #-1068]
	bl	fclose
.L16:
	ldr	r3, [fp, #-1072]
	ldr	r2, .L30
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L29
	bl	__stack_chk_fail
.L29:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC10
	.word	stderr
	.word	.LC1
	.word	trx_path
	.word	optind
	.word	.LC2
	.word	.LC3
	.word	trx_offset
	.word	.LC4
	.word	810697800
	.word	.LC5
	.word	.LC6
	.word	crc32_tbl
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	otrx_check, .-otrx_check
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	otrx_create_parse_options, %function
otrx_create_parse_options:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	otrx_create_parse_options, .-otrx_create_parse_options
	.section	.rodata
	.align	2
.LC11:
	.ascii	"Couldn't write %zu B to %s\012\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	otrx_create_append_file, %function
otrx_create_append_file:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #152
	str	r0, [fp, #-152]
	str	r1, [fp, #-156]
	ldr	r3, .L42
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-148]
	ldr	r1, .L42+4
	ldr	r0, [fp, #-156]
	bl	fopen
	str	r0, [fp, #-144]
	ldr	r3, [fp, #-144]
	cmp	r3, #0
	bne	.L36
	ldr	r3, .L42+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-156]
	ldr	r1, .L42+12
	mov	r0, r3
	bl	fprintf
	mvn	r3, #12
	b	.L40
.L39:
	sub	r0, fp, #136
	ldr	r3, [fp, #-152]
	ldr	r2, [fp, #-140]
	mov	r1, #1
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-140]
	cmp	r3, r2
	beq	.L37
	ldr	r3, .L42+8
	ldr	r0, [r3]
	ldr	r3, .L42+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-140]
	ldr	r1, .L42+20
	bl	fprintf
	mvn	r3, #4
	str	r3, [fp, #-148]
	b	.L38
.L37:
	ldr	r2, [fp, #-148]
	ldr	r3, [fp, #-140]
	add	r3, r2, r3
	str	r3, [fp, #-148]
.L36:
	sub	r0, fp, #136
	ldr	r3, [fp, #-144]
	mov	r2, #128
	mov	r1, #1
	bl	fread
	str	r0, [fp, #-140]
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	bne	.L39
.L38:
	ldr	r0, [fp, #-144]
	bl	fclose
	ldr	r3, [fp, #-148]
.L40:
	ldr	r2, .L42
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L41
	bl	__stack_chk_fail
.L41:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC12
	.word	.LC2
	.word	stderr
	.word	.LC3
	.word	trx_path
	.word	.LC11
	.size	otrx_create_append_file, .-otrx_create_append_file
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	otrx_create_append_zeros, %function
otrx_create_append_zeros:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L45
	mvn	r3, #11
	b	.L46
.L45:
	ldr	r2, [fp, #-20]
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	memset
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	mov	r1, #1
	ldr	r0, [fp, #-8]
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-20]
	cmp	r3, r2
	beq	.L47
	ldr	r3, .L48
	ldr	r0, [r3]
	ldr	r3, .L48+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	ldr	r1, .L48+8
	bl	fprintf
	mvn	r3, #4
	b	.L46
.L47:
	ldr	r3, [fp, #-20]
.L46:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L49:
	.align	2
.L48:
	.word	stderr
	.word	trx_path
	.word	.LC11
	.size	otrx_create_append_zeros, .-otrx_create_append_zeros
	.global	__aeabi_uidivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	otrx_create_align, %function
otrx_create_align:
	@ args = 0, pretend = 0, frame = 24
	@ 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]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-24]
	sub	r2, r3, #1
	ldr	r3, [fp, #-20]
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L51
	ldr	r3, [fp, #-20]
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	__aeabi_uidivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, [fp, #-24]
	sub	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	otrx_create_append_zeros
	mov	r3, r0
	b	.L52
.L51:
	mov	r3, #0
.L52:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	otrx_create_align, .-otrx_create_align
	.section	.rodata
	.align	2
.LC13:
	.ascii	"Couldn't write TRX header to %s\012\000"
	.align	2
.LC14:
	.ascii	"Couldn't alloc %zu B buffer\012\000"
	.align	2
.LC15:
	.ascii	"Couldn't read %zu B of data from %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	otrx_create_write_hdr, %function
otrx_create_write_hdr:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r2, .L59
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	mov	r2, #1
	strh	r2, [r3, #14]	@ movhi
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-24]
	bl	fseek
	ldr	r3, [fp, #-24]
	mov	r2, #28
	mov	r1, #1
	ldr	r0, [fp, #-28]
	bl	fwrite
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #28
	beq	.L54
	ldr	r3, .L59+4
	ldr	r3, [r3]
	ldr	r2, .L59+8
	ldr	r2, [r2]
	ldr	r1, .L59+12
	mov	r0, r3
	bl	fprintf
	mvn	r3, #4
	b	.L55
.L54:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L56
	ldr	r3, .L59+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, .L59+16
	mov	r0, r3
	bl	fprintf
	mvn	r3, #11
	b	.L55
.L56:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-24]
	bl	fseek
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	mov	r1, #1
	ldr	r0, [fp, #-12]
	bl	fread
	str	r0, [fp, #-20]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	beq	.L57
	ldr	r3, .L59+4
	ldr	r0, [r3]
	ldr	r3, .L59+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, .L59+20
	bl	fprintf
	mvn	r3, #11
	b	.L55
.L57:
	ldr	r3, [fp, #-12]
	add	r2, r3, #12
	ldr	r3, [fp, #-16]
	sub	r3, r3, #12
	mov	r1, r3
	mov	r0, r2
	bl	otrx_crc32
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #8]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-24]
	bl	fseek
	ldr	r3, [fp, #-24]
	mov	r2, #28
	mov	r1, #1
	ldr	r0, [fp, #-28]
	bl	fwrite
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #28
	beq	.L58
	ldr	r3, .L59+4
	ldr	r3, [r3]
	ldr	r2, .L59+8
	ldr	r2, [r2]
	ldr	r1, .L59+12
	mov	r0, r3
	bl	fprintf
	mvn	r3, #4
	b	.L55
.L58:
	mov	r3, #0
.L55:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L60:
	.align	2
.L59:
	.word	810697800
	.word	stderr
	.word	trx_path
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.size	otrx_create_write_hdr, .-otrx_create_write_hdr
	.section	.rodata
	.align	2
.LC16:
	.ascii	"w+\000"
	.align	2
.LC17:
	.ascii	"Reached TRX partitions limit, no place for %s\012\000"
	.align	2
.LC18:
	.ascii	"Failed to append file %s\012\000"
	.align	2
.LC19:
	.ascii	"Failed to append zeros\012\000"
	.align	2
.LC20:
	.ascii	"Current TRX length is 0x%zx, can't pad it with zero"
	.ascii	"s to 0x%lx\012\000"
	.align	2
.LC21:
	.ascii	"f:b:\000"
	.align	2
.LC22:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	otrx_create, %function
otrx_create:
	@ 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, .L83
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #44
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	str	r2, [r3, #16]
	str	r2, [r3, #20]
	str	r2, [r3, #24]
	mov	r3, #0
	str	r3, [fp, #-68]
	mov	r3, #28
	str	r3, [fp, #-64]
	mov	r3, #0
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-72]
	cmp	r3, #2
	bgt	.L62
	ldr	r3, .L83+4
	ldr	r3, [r3]
	mov	r2, #19
	mov	r1, #1
	ldr	r0, .L83+8
	bl	fwrite
	mvn	r3, #21
	str	r3, [fp, #-60]
	b	.L63
.L62:
	ldr	r3, [fp, #-76]
	ldr	r3, [r3, #8]
	ldr	r2, .L83+12
	str	r3, [r2]
	ldr	r3, .L83+16
	mov	r2, #3
	str	r2, [r3]
	ldr	r1, [fp, #-76]
	ldr	r0, [fp, #-72]
	bl	otrx_create_parse_options
	ldr	r3, .L83+12
	ldr	r3, [r3]
	ldr	r1, .L83+20
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L64
	ldr	r3, .L83+4
	ldr	r3, [r3]
	ldr	r2, .L83+12
	ldr	r2, [r2]
	ldr	r1, .L83+24
	mov	r0, r3
	bl	fprintf
	mvn	r3, #12
	str	r3, [fp, #-60]
	b	.L63
.L64:
	ldr	r3, [fp, #-64]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-56]
	bl	fseek
	ldr	r3, .L83+16
	mov	r2, #3
	str	r2, [r3]
	b	.L65
.L78:
	ldr	r3, [fp, #-52]
	cmp	r3, #98
	beq	.L66
	ldr	r3, [fp, #-52]
	cmp	r3, #102
	bne	.L67
	ldr	r3, [fp, #-68]
	cmp	r3, #2
	bls	.L68
	mvn	r3, #27
	str	r3, [fp, #-60]
	ldr	r3, .L83+4
	ldr	r3, [r3]
	ldr	r2, .L83+28
	ldr	r2, [r2]
	ldr	r1, .L83+32
	mov	r0, r3
	bl	fprintf
	b	.L69
.L68:
	ldr	r3, .L83+28
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-56]
	bl	otrx_create_append_file
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bge	.L70
	ldr	r3, .L83+4
	ldr	r3, [r3]
	ldr	r2, .L83+28
	ldr	r2, [r2]
	ldr	r1, .L83+36
	mov	r0, r3
	bl	fprintf
	b	.L71
.L70:
	ldr	r3, [fp, #-68]
	add	r2, r3, #1
	str	r2, [fp, #-68]
	add	r3, r3, #4
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [fp, #-64]
	str	r2, [r3, #-32]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	str	r3, [fp, #-64]
.L71:
	mov	r2, #4
	ldr	r1, [fp, #-64]
	ldr	r0, [fp, #-56]
	bl	otrx_create_align
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bge	.L72
	ldr	r3, .L83+4
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L83+40
	bl	fwrite
	b	.L67
.L72:
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	str	r3, [fp, #-64]
	b	.L67
.L66:
	ldr	r3, .L83+28
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-64]
	sub	r3, r2, r3
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bge	.L74
	ldr	r3, .L83+4
	ldr	r4, [r3]
	ldr	r3, .L83+28
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	mov	r3, r0
	ldr	r2, [fp, #-64]
	ldr	r1, .L83+44
	mov	r0, r4
	bl	fprintf
	b	.L81
.L74:
	ldr	r3, [fp, #-48]
	mov	r1, r3
	ldr	r0, [fp, #-56]
	bl	otrx_create_append_zeros
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bge	.L76
	ldr	r3, .L83+4
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L83+40
	bl	fwrite
	b	.L81
.L76:
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	str	r3, [fp, #-64]
.L81:
	nop
.L67:
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bne	.L82
.L65:
	ldr	r2, .L83+48
	ldr	r1, [fp, #-76]
	ldr	r0, [fp, #-72]
	bl	getopt
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmn	r3, #1
	bne	.L78
	b	.L77
.L82:
	nop
.L77:
	ldr	r3, [fp, #-64]
	str	r3, [fp, #-40]
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, [fp, #-56]
	bl	otrx_create_write_hdr
.L69:
	ldr	r0, [fp, #-56]
	bl	fclose
.L63:
	ldr	r3, [fp, #-60]
	ldr	r2, .L83
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L80
	bl	__stack_chk_fail
.L80:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L84:
	.align	2
.L83:
	.word	.LC22
	.word	stderr
	.word	.LC1
	.word	trx_path
	.word	optind
	.word	.LC16
	.word	.LC3
	.word	optarg
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.size	otrx_create, .-otrx_create
	.section	.rodata
	.align	2
.LC23:
	.ascii	"c:e:o:1:2:3:\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	otrx_extract_parse_options, %function
otrx_extract_parse_options:
	@ 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]
	str	r1, [fp, #-20]
	b	.L86
.L91:
	ldr	r3, [fp, #-8]
	cmp	r3, #111
	beq	.L87
	ldr	r3, [fp, #-8]
	cmp	r3, #111
	bgt	.L86
	ldr	r3, [fp, #-8]
	cmp	r3, #51
	beq	.L88
	ldr	r3, [fp, #-8]
	cmp	r3, #51
	bgt	.L86
	ldr	r3, [fp, #-8]
	cmp	r3, #49
	beq	.L89
	ldr	r3, [fp, #-8]
	cmp	r3, #50
	beq	.L90
	b	.L86
.L87:
	ldr	r3, .L92
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L92+4
	str	r2, [r3]
	b	.L86
.L89:
	ldr	r3, .L92
	ldr	r3, [r3]
	ldr	r2, .L92+8
	str	r3, [r2]
	b	.L86
.L90:
	ldr	r3, .L92
	ldr	r3, [r3]
	ldr	r2, .L92+8
	str	r3, [r2, #4]
	b	.L86
.L88:
	ldr	r3, .L92
	ldr	r3, [r3]
	ldr	r2, .L92+8
	str	r3, [r2, #8]
	nop
.L86:
	ldr	r2, .L92+12
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	getopt
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L91
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L93:
	.align	2
.L92:
	.word	optarg
	.word	trx_offset
	.word	partition
	.word	.LC23
	.size	otrx_extract_parse_options, .-otrx_extract_parse_options
	.section	.rodata
	.align	2
.LC24:
	.ascii	"w\000"
	.align	2
.LC25:
	.ascii	"Extracted 0x%zx bytes into %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	otrx_extract_copy, %function
otrx_extract_copy:
	@ args = 0, pretend = 0, frame = 32
	@ 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]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r1, .L103
	ldr	r0, [fp, #-36]
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L95
	ldr	r3, .L103+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	ldr	r1, .L103+8
	mov	r0, r3
	bl	fprintf
	mvn	r3, #12
	str	r3, [fp, #-20]
	b	.L96
.L95:
	ldr	r0, [fp, #-32]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L97
	ldr	r3, .L103+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-32]
	ldr	r1, .L103+12
	mov	r0, r3
	bl	fprintf
	mvn	r3, #11
	str	r3, [fp, #-20]
	b	.L98
.L97:
	ldr	r3, [fp, #-28]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	fseek
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-32]
	mov	r1, #1
	ldr	r0, [fp, #-12]
	bl	fread
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	beq	.L99
	ldr	r3, .L103+4
	ldr	r0, [r3]
	ldr	r3, .L103+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-32]
	ldr	r1, .L103+20
	bl	fprintf
	mvn	r3, #11
	str	r3, [fp, #-20]
	b	.L100
.L99:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-32]
	mov	r1, #1
	ldr	r0, [fp, #-12]
	bl	fwrite
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	beq	.L101
	ldr	r3, .L103+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	ldr	r1, .L103+24
	bl	fprintf
	mvn	r3, #11
	str	r3, [fp, #-20]
	b	.L100
.L101:
	ldr	r2, [fp, #-36]
	ldr	r1, [fp, #-32]
	ldr	r0, .L103+28
	bl	printf
.L100:
	ldr	r0, [fp, #-12]
	bl	free
.L98:
	ldr	r0, [fp, #-16]
	bl	fclose
.L96:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L104:
	.align	2
.L103:
	.word	.LC24
	.word	stderr
	.word	.LC3
	.word	.LC14
	.word	trx_path
	.word	.LC15
	.word	.LC11
	.word	.LC25
	.size	otrx_extract_copy, .-otrx_extract_copy
	.section	.rodata
	.align	2
.LC26:
	.ascii	"TRX doesn't contain partition %d, can't extract %s\012"
	.ascii	"\000"
	.align	2
.LC27:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	otrx_extract, %function
otrx_extract:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L123
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-64]
	cmp	r3, #2
	bgt	.L106
	ldr	r3, .L123+4
	ldr	r3, [r3]
	mov	r2, #19
	mov	r1, #1
	ldr	r0, .L123+8
	bl	fwrite
	mvn	r3, #21
	str	r3, [fp, #-52]
	b	.L107
.L106:
	ldr	r3, [fp, #-68]
	ldr	r3, [r3, #8]
	ldr	r2, .L123+12
	str	r3, [r2]
	ldr	r3, .L123+16
	mov	r2, #3
	str	r2, [r3]
	ldr	r1, [fp, #-68]
	ldr	r0, [fp, #-64]
	bl	otrx_extract_parse_options
	ldr	r3, .L123+12
	ldr	r3, [r3]
	ldr	r1, .L123+20
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L108
	ldr	r3, .L123+4
	ldr	r3, [r3]
	ldr	r2, .L123+12
	ldr	r2, [r2]
	ldr	r1, .L123+24
	mov	r0, r3
	bl	fprintf
	mvn	r3, #12
	str	r3, [fp, #-52]
	b	.L107
.L108:
	ldr	r3, .L123+28
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-44]
	bl	fseek
	sub	r0, fp, #36
	ldr	r3, [fp, #-44]
	mov	r2, #28
	mov	r1, #1
	bl	fread
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #28
	beq	.L109
	ldr	r3, .L123+4
	ldr	r3, [r3]
	ldr	r2, .L123+12
	ldr	r2, [r2]
	ldr	r1, .L123+32
	mov	r0, r3
	bl	fprintf
	mvn	r3, #4
	str	r3, [fp, #-52]
	b	.L110
.L109:
	ldr	r3, [fp, #-36]
	ldr	r2, .L123+36
	cmp	r3, r2
	beq	.L111
	ldr	r3, .L123+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	ldr	r1, .L123+40
	mov	r0, r3
	bl	fprintf
	mvn	r3, #21
	str	r3, [fp, #-52]
	b	.L110
.L111:
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L112
.L119:
	ldr	r2, .L123+44
	ldr	r3, [fp, #-56]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	beq	.L122
	ldr	r3, [fp, #-56]
	add	r3, r3, #4
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-32]
	cmp	r3, #0
	bne	.L115
	ldr	r3, [fp, #-56]
	add	r1, r3, #1
	ldr	r2, .L123+44
	ldr	r3, [fp, #-56]
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, r3
	ldr	r0, .L123+48
	bl	printf
	b	.L114
.L115:
	ldr	r3, [fp, #-56]
	cmp	r3, #1
	bgt	.L116
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	add	r3, r3, #4
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-32]
	cmp	r3, #0
	bne	.L117
.L116:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-56]
	add	r3, r3, #4
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-32]
	sub	r3, r2, r3
	str	r3, [fp, #-48]
	b	.L118
.L117:
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	add	r3, r3, #4
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-32]
	ldr	r3, [fp, #-56]
	add	r3, r3, #4
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-32]
	sub	r3, r2, r3
	str	r3, [fp, #-48]
.L118:
	ldr	r3, [fp, #-56]
	add	r3, r3, #4
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-32]
	ldr	r3, .L123+28
	ldr	r3, [r3]
	add	r1, r2, r3
	ldr	r2, .L123+44
	ldr	r3, [fp, #-56]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-48]
	ldr	r0, [fp, #-44]
	bl	otrx_extract_copy
	b	.L114
.L122:
	nop
.L114:
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L112:
	ldr	r3, [fp, #-56]
	cmp	r3, #2
	ble	.L119
	nop
.L110:
	ldr	r0, [fp, #-44]
	bl	fclose
.L107:
	ldr	r3, [fp, #-52]
	ldr	r2, .L123
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L121
	bl	__stack_chk_fail
.L121:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L124:
	.align	2
.L123:
	.word	.LC27
	.word	stderr
	.word	.LC1
	.word	trx_path
	.word	optind
	.word	.LC2
	.word	.LC3
	.word	trx_offset
	.word	.LC4
	.word	810697800
	.word	.LC5
	.word	partition
	.word	.LC26
	.size	otrx_extract, .-otrx_extract
	.section	.rodata
	.align	2
.LC28:
	.ascii	"Usage:\000"
	.align	2
.LC29:
	.ascii	"Checking TRX file:\000"
	.align	2
.LC30:
	.ascii	"\011otrx check <file> [options]\011check if file is"
	.ascii	" a valid TRX\000"
	.align	2
.LC31:
	.ascii	"\011-o offset\011\011\011offset of TRX data in file"
	.ascii	" (default: 0)\000"
	.align	2
.LC32:
	.ascii	"Creating new TRX file:\000"
	.align	2
.LC33:
	.ascii	"\011otrx create <file> [options] [partitions]\000"
	.align	2
.LC34:
	.ascii	"\011-f file\011\011\011\011[partition] start new pa"
	.ascii	"rtition with content copied from file\000"
	.align	2
.LC35:
	.ascii	"\011-b offset\011\011\011[partition] append zeros t"
	.ascii	"o partition till reaching absolute offset\000"
	.align	2
.LC36:
	.ascii	"Extracting from TRX file:\000"
	.align	2
.LC37:
	.ascii	"\011otrx extract <file> [options]\011extract partit"
	.ascii	"ions from TRX file\000"
	.align	2
.LC38:
	.ascii	"\011-1 file\011\011\011\011file to extract 1st part"
	.ascii	"ition to (optional)\000"
	.align	2
.LC39:
	.ascii	"\011-2 file\011\011\011\011file to extract 2nd part"
	.ascii	"ition to (optional)\000"
	.align	2
.LC40:
	.ascii	"\011-3 file\011\011\011\011file to extract 3rd part"
	.ascii	"ition to (optional)\000"
	.text
	.align	2
	.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	r0, .L126
	bl	puts
	mov	r0, #10
	bl	putchar
	ldr	r0, .L126+4
	bl	puts
	ldr	r0, .L126+8
	bl	puts
	ldr	r0, .L126+12
	bl	puts
	mov	r0, #10
	bl	putchar
	ldr	r0, .L126+16
	bl	puts
	ldr	r0, .L126+20
	bl	puts
	ldr	r0, .L126+24
	bl	puts
	ldr	r0, .L126+28
	bl	puts
	mov	r0, #10
	bl	putchar
	ldr	r0, .L126+32
	bl	puts
	ldr	r0, .L126+36
	bl	puts
	ldr	r0, .L126+12
	bl	puts
	ldr	r0, .L126+40
	bl	puts
	ldr	r0, .L126+44
	bl	puts
	ldr	r0, .L126+48
	bl	puts
	nop
	pop	{fp, pc}
.L127:
	.align	2
.L126:
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.word	.LC38
	.word	.LC39
	.word	.LC40
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC41:
	.ascii	"check\000"
	.align	2
.LC42:
	.ascii	"create\000"
	.align	2
.LC43:
	.ascii	"extract\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	ble	.L129
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L133
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L130
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	otrx_check
	mov	r3, r0
	b	.L131
.L130:
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L133+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L132
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	otrx_create
	mov	r3, r0
	b	.L131
.L132:
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L133+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L129
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	otrx_extract
	mov	r3, r0
	b	.L131
.L129:
	bl	usage
	mov	r3, #0
.L131:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L134:
	.align	2
.L133:
	.word	.LC41
	.word	.LC42
	.word	.LC43
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
