	.file	"175326.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"\nToo few arguments: "
.LC1:
	.string	"\nToo many arguments: "
	.align 8
.LC2:
	.string	"%s expects exactly one argument to be provided.\n\n"
	.align 8
.LC3:
	.string	"You must provide a valid integer to %s between 1 and %ld.\n\n"
.LC4:
	.string	"rb"
.LC5:
	.string	"/dev/urandom"
	.align 8
.LC6:
	.string	"\nUnable to open /dev/urandom.\n\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -52[rbp], 2
	je	.L2
	cmp	DWORD PTR -52[rbp], 1
	jne	.L3
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 20
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	jmp	.L4
.L3:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
.L4:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	usage
	jmp	.L9
.L2:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rcx, -32[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L6
	cmp	QWORD PTR -24[rbp], 0
	jle	.L6
	movabs	rax, 36028797018963967
	cmp	QWORD PTR -24[rbp], rax
	jle	.L7
.L6:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	movabs	rcx, 36028797018963967
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	usage
	jmp	.L9
.L7:
	lea	rsi, .LC4[rip]
	lea	rdi, .LC5[rip]
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 31
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	eax, 2
	jmp	.L9
.L8:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	generate_pad
	mov	DWORD PTR -36[rbp], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -36[rbp]
.L9:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC7:
	.string	"Usage: %s BYTES\n\n"
	.align 8
.LC8:
	.string	"Generates a one-time-pad from /dev/urandom which is large enough to\n"
	.align 8
.LC9:
	.string	"encrypt a message of length BYTES. The actual one-time-pad will be\n"
	.align 8
.LC10:
	.string	"256 times larger. The one-time-pad will be written to stdout.\n\n"
	.text
	.globl	usage
	.type	usage, @function
usage:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 68
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 67
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 63
	mov	esi, 1
	lea	rdi, .LC10[rip]
	call	fwrite@PLT
	mov	eax, 1
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	usage, .-usage
	.section	.rodata
	.align 8
.LC11:
	.string	"\nError reading from /dev/urandom.\n\n"
.LC12:
	.string	"\nError writing to stdout.\n\n"
	.text
	.globl	generate_pad
	.type	generate_pad, @function
generate_pad:
.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, 304
	mov	QWORD PTR -296[rbp], rdi
	mov	QWORD PTR -304[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -280[rbp], 0
	jmp	.L14
.L18:
	mov	rdx, QWORD PTR -296[rbp]
	lea	rax, -272[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 256
	mov	rdi, rax
	call	fread@PLT
	cmp	rax, 1
	je	.L15
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 35
	mov	esi, 1
	lea	rdi, .LC11[rip]
	call	fwrite@PLT
	mov	eax, 3
	jmp	.L19
.L15:
	mov	rdx, QWORD PTR stdout[rip]
	lea	rax, -272[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 256
	mov	rdi, rax
	call	fwrite@PLT
	cmp	rax, 1
	je	.L17
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 27
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	mov	eax, 4
	jmp	.L19
.L17:
	add	QWORD PTR -280[rbp], 1
.L14:
	mov	rax, QWORD PTR -280[rbp]
	cmp	rax, QWORD PTR -304[rbp]
	jl	.L18
	mov	eax, 0
.L19:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	generate_pad, .-generate_pad
	.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	"175326.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012Too few arguments: \000"
	.align	2
.LC1:
	.ascii	"\012Too many arguments: \000"
	.align	2
.LC2:
	.ascii	"%s expects exactly one argument to be provided.\012"
	.ascii	"\012\000"
	.align	2
.LC3:
	.ascii	"You must provide a valid integer to %s between 1 an"
	.ascii	"d %ld.\012\012\000"
	.align	2
.LC4:
	.ascii	"rb\000"
	.align	2
.LC5:
	.ascii	"/dev/urandom\000"
	.align	2
.LC6:
	.ascii	"\012Unable to open /dev/urandom.\012\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-32]
	cmp	r3, #2
	beq	.L2
	ldr	r3, [fp, #-32]
	cmp	r3, #1
	bne	.L3
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, .L11+8
	bl	fwrite
	b	.L4
.L3:
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L11+12
	bl	fwrite
.L4:
	ldr	r3, .L11+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L11+16
	bl	fprintf
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	mov	r0, r3
	bl	usage
	mov	r3, r0
	b	.L9
.L2:
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r1, fp, #24
	mov	r2, #10
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L6
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	ble	.L6
	ldr	r3, [fp, #-20]
	cmp	r3, #8388608
	blt	.L7
.L6:
	ldr	r3, .L11+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-36]
	ldr	r2, [r3]
	ldr	r3, .L11+20
	ldr	r1, .L11+24
	bl	fprintf
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	mov	r0, r3
	bl	usage
	mov	r3, r0
	b	.L9
.L7:
	ldr	r1, .L11+28
	ldr	r0, .L11+32
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r2, #31
	mov	r1, #1
	ldr	r0, .L11+36
	bl	fwrite
	mov	r3, #2
	b	.L9
.L8:
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	generate_pad
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	fclose
	ldr	r3, [fp, #-12]
.L9:
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC7
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	8388607
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Usage: %s BYTES\012\012\000"
	.align	2
.LC9:
	.ascii	"Generates a one-time-pad from /dev/urandom which is"
	.ascii	" large enough to\012\000"
	.align	2
.LC10:
	.ascii	"encrypt a message of length BYTES. The actual one-t"
	.ascii	"ime-pad will be\012\000"
	.align	2
.LC11:
	.ascii	"256 times larger. The one-time-pad will be written "
	.ascii	"to stdout.\012\012\000"
	.text
	.align	2
	.global	usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ 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]
	ldr	r3, .L15
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L15+4
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L15
	ldr	r3, [r3]
	mov	r2, #68
	mov	r1, #1
	ldr	r0, .L15+8
	bl	fwrite
	ldr	r3, .L15
	ldr	r3, [r3]
	mov	r2, #67
	mov	r1, #1
	ldr	r0, .L15+12
	bl	fwrite
	ldr	r3, .L15
	ldr	r3, [r3]
	mov	r2, #63
	mov	r1, #1
	ldr	r0, .L15+16
	bl	fwrite
	mov	r3, #1
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	stderr
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC12:
	.ascii	"\012Error reading from /dev/urandom.\012\012\000"
	.align	2
.LC13:
	.ascii	"\012Error writing to stdout.\012\012\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	generate_pad
	.syntax unified
	.arm
	.fpu softvfp
	.type	generate_pad, %function
generate_pad:
	@ args = 0, pretend = 0, frame = 272
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #272
	str	r0, [fp, #-272]
	str	r1, [fp, #-276]
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-268]
	b	.L18
.L22:
	sub	r0, fp, #264
	ldr	r3, [fp, #-272]
	mov	r2, #1
	mov	r1, #256
	bl	fread
	mov	r3, r0
	cmp	r3, #1
	beq	.L19
	ldr	r3, .L25+4
	ldr	r3, [r3]
	mov	r2, #35
	mov	r1, #1
	ldr	r0, .L25+8
	bl	fwrite
	mov	r3, #3
	b	.L23
.L19:
	ldr	r3, .L25+12
	ldr	r3, [r3]
	sub	r0, fp, #264
	mov	r2, #1
	mov	r1, #256
	bl	fwrite
	mov	r3, r0
	cmp	r3, #1
	beq	.L21
	ldr	r3, .L25+4
	ldr	r3, [r3]
	mov	r2, #27
	mov	r1, #1
	ldr	r0, .L25+16
	bl	fwrite
	mov	r3, #4
	b	.L23
.L21:
	ldr	r3, [fp, #-268]
	add	r3, r3, #1
	str	r3, [fp, #-268]
.L18:
	ldr	r2, [fp, #-268]
	ldr	r3, [fp, #-276]
	cmp	r2, r3
	blt	.L22
	mov	r3, #0
.L23:
	ldr	r2, .L25
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L24
	bl	__stack_chk_fail
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC14
	.word	stderr
	.word	.LC12
	.word	stdout
	.word	.LC13
	.size	generate_pad, .-generate_pad
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
