	.file	"746838.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"badioctl"
.LC1:
	.string	"%s: "
.LC2:
	.string	": %s\n"
	.text
	.globl	fatal
	.type	fatal, @function
fatal:
.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, 224
	mov	QWORD PTR -216[rbp], rdi
	mov	QWORD PTR -168[rbp], rsi
	mov	QWORD PTR -160[rbp], rdx
	mov	QWORD PTR -152[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], 8
	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
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC0[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -208[rbp]
	mov	rcx, QWORD PTR -216[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	vfprintf@PLT
	mov	rax, QWORD PTR -216[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -216[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	je	.L3
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L3:
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	fatal, .-fatal
	.section	.rodata
.LC3:
	.string	"/dev/urandom"
.LC4:
	.string	"couldn't open /dev/urandom"
.LC5:
	.string	"mmap"
.LC6:
	.string	"/dev/dtrace/dtrace"
	.align 8
.LC7:
	.string	"couldn't open DTrace pseudo device"
	.text
	.globl	badioctl
	.type	badioctl, @function
badioctl:
.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, 96
	mov	DWORD PTR -84[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -72[rbp], -1
	mov	edi, 30
	call	sysconf@PLT
	mov	DWORD PTR -64[rbp], eax
	mov	DWORD PTR -68[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	esi, 0
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], -1
	jne	.L6
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	fatal
.L6:
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	mov	r9d, 0
	mov	r8d, -1
	mov	ecx, 34
	mov	edx, 3
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -56[rbp], rax
	cmp	QWORD PTR -56[rbp], -1
	jne	.L13
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	fatal
.L13:
	lea	rax, -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -32[rbp]
	cmp	rdx, rax
	jle	.L8
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, 0
	mov	edi, eax
	call	kill@PLT
	cmp	eax, -1
	jne	.L9
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 3
	jne	.L9
	mov	edi, 0
	call	exit@PLT
.L9:
	cmp	DWORD PTR -72[rbp], -1
	je	.L10
	mov	eax, DWORD PTR -72[rbp]
	mov	edi, eax
	call	close@PLT
.L10:
	mov	esi, 0
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -72[rbp], eax
	cmp	DWORD PTR -72[rbp], -1
	jne	.L11
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	fatal
.L11:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
.L8:
	mov	eax, DWORD PTR -68[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -68[rbp], edx
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 6
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 1000
	sub	eax, ecx
	mov	edx, eax
	test	edx, edx
	jne	.L12
	mov	eax, DWORD PTR -64[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR -60[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
.L12:
	lea	rcx, -76[rbp]
	mov	eax, DWORD PTR -60[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	ecx, DWORD PTR -76[rbp]
	mov	edx, ecx
	mov	eax, 4042322161
	imul	rax, rdx
	shr	rax, 32
	shr	eax, 4
	mov	edx, eax
	sal	edx, 4
	add	edx, eax
	mov	eax, ecx
	sub	eax, edx
	mov	DWORD PTR -76[rbp], eax
	mov	eax, DWORD PTR -76[rbp]
	add	eax, 1
	mov	DWORD PTR -76[rbp], eax
	mov	eax, DWORD PTR -76[rbp]
	or	eax, 1685352960
	mov	ecx, eax
	mov	rdx, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR -72[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	jmp	.L13
	.cfi_endproc
.LFE7:
	.size	badioctl, .-badioctl
	.section	.rodata
	.align 8
.LC8:
	.string	"badioctl: child died on signal %d; respawning.\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	getpid@PLT
	mov	DWORD PTR -16[rbp], eax
.L20:
	call	fork@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jne	.L17
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	badioctl
	jmp	.L17
.L18:
	nop
.L17:
	lea	rcx, -20[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	cmp	DWORD PTR -12[rbp], eax
	jne	.L18
	mov	eax, DWORD PTR -20[rbp]
	and	eax, 127
	test	eax, eax
	jne	.L19
	mov	eax, DWORD PTR -20[rbp]
	sar	eax, 8
	movzx	eax, al
	mov	edi, eax
	call	exit@PLT
.L19:
	mov	eax, DWORD PTR -20[rbp]
	and	eax, 127
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	jmp	.L20
	.cfi_endproc
.LFE8:
	.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	"746838.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"badioctl\000"
	.align	2
.LC1:
	.ascii	"%s: \000"
	.align	2
.LC2:
	.ascii	": %s\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	fatal
	.syntax unified
	.arm
	.fpu softvfp
	.type	fatal, %function
fatal:
	@ args = 4, pretend = 16, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 1
	push	{r0, r1, r2, r3}
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	ldr	r3, [fp, #4]
	str	r3, [fp, #-24]
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	add	r3, fp, #8
	str	r3, [fp, #-20]
	ldr	r3, .L4+4
	ldr	r3, [r3]
	ldr	r2, .L4+8
	ldr	r1, .L4+12
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L4+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	vfprintf
	ldr	r0, [fp, #-24]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L2
	ldr	r3, .L4+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L4+16
	mov	r0, r4
	bl	fprintf
.L2:
	mov	r0, #1
	bl	exit
.L5:
	.align	2
.L4:
	.word	.LC3
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	fatal, .-fatal
	.section	.rodata
	.align	2
.LC4:
	.ascii	"/dev/urandom\000"
	.align	2
.LC5:
	.ascii	"couldn't open /dev/urandom\000"
	.align	2
.LC6:
	.ascii	"mmap\000"
	.align	2
.LC7:
	.ascii	"/dev/dtrace/dtrace\000"
	.align	2
.LC8:
	.ascii	"couldn't open DTrace pseudo device\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	badioctl
	.syntax unified
	.arm
	.fpu softvfp
	.type	badioctl, %function
badioctl:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-56]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-44]
	mov	r0, #30
	bl	sysconf
	str	r0, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-40]
	sub	r3, fp, #16
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	mov	r1, #0
	ldr	r0, .L16+4
	bl	open
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmn	r3, #1
	bne	.L7
	ldr	r0, .L16+8
	bl	fatal
.L7:
	ldr	r1, [fp, #-36]
	mov	r3, #0
	str	r3, [sp, #4]
	mvn	r3, #0
	str	r3, [sp]
	mov	r3, #34
	mov	r2, #3
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L14
	ldr	r0, .L16+12
	bl	fatal
.L14:
	sub	r3, fp, #24
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	ble	.L9
	mov	r1, #0
	ldr	r0, [fp, #-56]
	bl	kill
	mov	r3, r0
	cmn	r3, #1
	bne	.L10
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L10
	mov	r0, #0
	bl	exit
.L10:
	ldr	r3, [fp, #-44]
	cmn	r3, #1
	beq	.L11
	ldr	r0, [fp, #-44]
	bl	close
.L11:
	mov	r1, #0
	ldr	r0, .L16+16
	bl	open
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmn	r3, #1
	bne	.L12
	ldr	r0, .L16+20
	bl	fatal
.L12:
	sub	r3, fp, #16
	sub	r2, fp, #24
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
.L9:
	ldr	r1, [fp, #-40]
	add	r3, r1, #1
	str	r3, [fp, #-40]
	ldr	r3, .L16+24
	smull	r2, r3, r1, r3
	asr	r2, r3, #6
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L13
	ldr	r3, [fp, #-36]
	mov	r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-32]
	bl	read
.L13:
	sub	r3, fp, #48
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	read
	ldr	r1, [fp, #-48]
	ldr	r3, .L16+28
	umull	r2, r3, r1, r3
	lsr	r2, r3, #4
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	sub	r2, r1, r3
	str	r2, [fp, #-48]
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
	ldr	r2, [fp, #-48]
	ldr	r3, .L16+32
	orr	r3, r2, r3
	ldr	r2, [fp, #-28]
	mov	r1, r3
	ldr	r0, [fp, #-44]
	bl	ioctl
	b	.L14
.L17:
	.align	2
.L16:
	.word	.LC9
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	274877907
	.word	-252645135
	.word	1685352960
	.size	badioctl, .-badioctl
	.section	.rodata
	.align	2
.LC10:
	.ascii	"badioctl: child died on signal %d; respawning.\012\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.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, #16
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	getpid
	str	r0, [fp, #-16]
.L23:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L20
	ldr	r0, [fp, #-16]
	bl	badioctl
	b	.L20
.L21:
	nop
.L20:
	sub	r3, fp, #20
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	waitpid
	mov	r2, r0
	ldr	r3, [fp, #-12]
	cmp	r3, r2
	bne	.L21
	ldr	r3, [fp, #-20]
	and	r3, r3, #127
	cmp	r3, #0
	bne	.L22
	ldr	r3, [fp, #-20]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r0, r3
	bl	exit
.L22:
	ldr	r3, [fp, #-20]
	and	r3, r3, #127
	mov	r1, r3
	ldr	r0, .L25+4
	bl	printf
	ldr	r3, .L25+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	b	.L23
.L26:
	.align	2
.L25:
	.word	.LC11
	.word	.LC10
	.word	stdout
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
