	.file	"extr_cap_getmode.c_main.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"1..27\n"
.LC1:
	.string	"fork() failed"
.LC2:
	.string	"waitpid() failed"
.LC3:
	.string	"pdfork() failed"
.LC4:
	.string	"pdwait() failed"
	.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
	lea	rdi, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	r12, rsp
	call	printf@PLT
	mov	rdi, r12
	mov	DWORD PTR [rsp], 666
	call	cap_getmode@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	CHECK@PLT
	xor	edi, edi
	cmp	DWORD PTR [rsp], 666
	setne	dil
	call	CHECK@PLT
	mov	eax, DWORD PTR [rsp]
	xor	edi, edi
	test	eax, eax
	sete	dil
	call	CHECK@PLT
	xor	edi, edi
	mov	QWORD PTR errno[rip], 0
	call	cap_getmode@PLT
	xor	edi, edi
	cmp	rax, -1
	sete	dil
	call	CHECK@PLT
	mov	rax, QWORD PTR EFAULT[rip]
	xor	edi, edi
	cmp	QWORD PTR errno[rip], rax
	sete	dil
	call	CHECK@PLT
	mov	edi, 3735929054
	mov	QWORD PTR errno[rip], 0
	call	cap_getmode@PLT
	xor	edi, edi
	cmp	rax, -1
	sete	dil
	call	CHECK@PLT
	mov	rax, QWORD PTR EFAULT[rip]
	xor	edi, edi
	cmp	QWORD PTR errno[rip], rax
	sete	dil
	call	CHECK@PLT
	call	fork@PLT
	mov	ebp, eax
	cmp	eax, -1
	je	.L2
	test	eax, eax
	jne	.L4
.L3:
	mov	rdi, r12
	mov	DWORD PTR [rsp], 666
	call	cap_getmode@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	CHECK@PLT
	xor	edi, edi
	cmp	DWORD PTR [rsp], 666
	setne	dil
	call	CHECK@PLT
	xor	edi, edi
	cmp	DWORD PTR [rsp], 0
	sete	dil
	call	CHECK@PLT
	xor	edi, edi
	call	exit@PLT
.L4:
	xor	edx, edx
	xor	esi, esi
	mov	edi, ebp
	call	waitpid@PLT
	cmp	eax, -1
	je	.L32
.L5:
	lea	rbp, 4[rsp]
	xor	esi, esi
	mov	rdi, rbp
	call	pdfork@PLT
	cmp	eax, -1
	je	.L6
	test	eax, eax
	je	.L7
.L8:
	mov	edi, DWORD PTR 4[rsp]
	call	pdwait@PLT
	cmp	eax, -1
	je	.L33
.L9:
	mov	edi, DWORD PTR 4[rsp]
	call	close@PLT
	xor	eax, eax
	call	cap_enter@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	CHECK@PLT
	mov	rdi, r12
	mov	DWORD PTR [rsp], 666
	call	cap_getmode@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	CHECK@PLT
	xor	edi, edi
	cmp	DWORD PTR [rsp], 666
	setne	dil
	call	CHECK@PLT
	xor	edi, edi
	cmp	DWORD PTR [rsp], 1
	sete	dil
	call	CHECK@PLT
	xor	edi, edi
	mov	QWORD PTR errno[rip], 0
	call	cap_getmode@PLT
	xor	edi, edi
	cmp	rax, -1
	sete	dil
	call	CHECK@PLT
	mov	rax, QWORD PTR EFAULT[rip]
	xor	edi, edi
	cmp	QWORD PTR errno[rip], rax
	sete	dil
	call	CHECK@PLT
	mov	edi, 3735929054
	mov	QWORD PTR errno[rip], 0
	call	cap_getmode@PLT
	xor	edi, edi
	cmp	rax, -1
	sete	dil
	call	CHECK@PLT
	xor	edi, edi
	mov	rax, QWORD PTR EFAULT[rip]
	cmp	QWORD PTR errno[rip], rax
	sete	dil
	call	CHECK@PLT
	call	fork@PLT
	cmp	eax, -1
	je	.L10
	test	eax, eax
	je	.L11
.L12:
	mov	edi, 1
	call	sleep@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	pdfork@PLT
	cmp	eax, -1
	je	.L13
	test	eax, eax
	je	.L14
.L15:
	mov	edi, DWORD PTR 4[rsp]
	call	pdwait@PLT
	cmp	eax, -1
	je	.L34
.L16:
	mov	edi, DWORD PTR 4[rsp]
	call	close@PLT
	xor	edi, edi
	call	exit@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L35
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	lea	rsi, .LC3[rip]
	mov	edi, 1
	call	err@PLT
.L7:
	mov	rdi, r12
	mov	DWORD PTR [rsp], 666
	call	cap_getmode@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	CHECK@PLT
	xor	edi, edi
	cmp	DWORD PTR [rsp], 666
	setne	dil
	call	CHECK@PLT
	xor	edi, edi
	cmp	DWORD PTR [rsp], 0
	sete	dil
	call	CHECK@PLT
	xor	edi, edi
	call	exit@PLT
	jmp	.L8
.L10:
	lea	rsi, .LC1[rip]
	mov	edi, 1
	call	err@PLT
.L11:
	mov	rdi, r12
	mov	DWORD PTR [rsp], 666
	call	cap_getmode@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	CHECK@PLT
	xor	edi, edi
	cmp	DWORD PTR [rsp], 666
	setne	dil
	call	CHECK@PLT
	xor	edi, edi
	cmp	DWORD PTR [rsp], 1
	sete	dil
	call	CHECK@PLT
	xor	edi, edi
	call	exit@PLT
	jmp	.L12
.L13:
	lea	rsi, .LC3[rip]
	mov	edi, 1
	call	err@PLT
.L14:
	mov	rdi, r12
	mov	DWORD PTR [rsp], 666
	call	cap_getmode@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	CHECK@PLT
	xor	edi, edi
	cmp	DWORD PTR [rsp], 666
	setne	dil
	call	CHECK@PLT
	xor	edi, edi
	cmp	DWORD PTR [rsp], 1
	sete	dil
	call	CHECK@PLT
	xor	edi, edi
	call	exit@PLT
	jmp	.L15
.L2:
	lea	rsi, .LC1[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L3
.L33:
	lea	rsi, .LC4[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L9
.L32:
	lea	rsi, .LC2[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L5
.L34:
	lea	rsi, .LC4[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L16
.L35:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.comm	errno,8,8
	.comm	EFAULT,8,8
	.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_cap_getmode.c_main.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"1..27\012\000"
	.align	2
.LC1:
	.ascii	"fork() failed\000"
	.align	2
.LC2:
	.ascii	"waitpid() failed\000"
	.align	2
.LC3:
	.ascii	"pdfork() failed\000"
	.align	2
.LC4:
	.ascii	"pdwait() failed\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.section	.text.startup,"ax",%progbits
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L36
	sub	sp, sp, #20
	ldr	r4, .L36+4
	ldr	r0, .L36+8
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	printf
	add	r0, sp, #4
	str	r4, [sp, #4]
	bl	cap_getmode
	clz	r0, r0
	lsr	r0, r0, #5
	bl	CHECK
	ldr	r0, [sp, #4]
	mov	r5, #0
	subs	r0, r0, r4
	movne	r0, #1
	bl	CHECK
	ldr	r0, [sp, #4]
	ldr	r4, .L36+12
	clz	r0, r0
	lsr	r0, r0, #5
	bl	CHECK
	mov	r0, r5
	str	r5, [r4]
	bl	cap_getmode
	ldr	r6, .L36+16
	cmn	r0, #1
	movne	r0, #0
	moveq	r0, #1
	bl	CHECK
	ldr	r3, [r6]
	ldr	r0, [r4]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	CHECK
	ldr	r0, .L36+20
	str	r5, [r4]
	bl	cap_getmode
	cmn	r0, #1
	movne	r0, #0
	moveq	r0, #1
	bl	CHECK
	ldr	r3, [r6]
	ldr	r0, [r4]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	CHECK
	bl	fork
	cmn	r0, #1
	mov	r5, r0
	beq	.L2
	cmp	r0, #0
	bne	.L4
.L3:
	ldr	r7, .L36+4
	add	r0, sp, #4
	str	r7, [sp, #4]
	bl	cap_getmode
	clz	r0, r0
	lsr	r0, r0, #5
	bl	CHECK
	ldr	r0, [sp, #4]
	subs	r0, r0, r7
	movne	r0, #1
	bl	CHECK
	ldr	r0, [sp, #4]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	CHECK
	mov	r0, #0
	bl	exit
.L4:
	mov	r2, #0
	mov	r0, r5
	mov	r1, r2
	bl	waitpid
	cmn	r0, #1
	beq	.L32
.L5:
	mov	r1, #0
	add	r0, sp, #8
	bl	pdfork
	cmn	r0, #1
	beq	.L6
	cmp	r0, #0
	beq	.L7
.L8:
	ldr	r0, [sp, #8]
	bl	pdwait
	cmn	r0, #1
	beq	.L33
.L9:
	ldr	r0, [sp, #8]
	bl	close
	bl	cap_enter
	clz	r0, r0
	ldr	r7, .L36+4
	lsr	r0, r0, #5
	bl	CHECK
	add	r0, sp, #4
	str	r7, [sp, #4]
	bl	cap_getmode
	clz	r0, r0
	lsr	r0, r0, #5
	bl	CHECK
	ldr	r0, [sp, #4]
	mov	r5, #0
	subs	r0, r0, r7
	movne	r0, #1
	bl	CHECK
	ldr	r0, [sp, #4]
	sub	r0, r0, #1
	clz	r0, r0
	lsr	r0, r0, #5
	bl	CHECK
	mov	r0, r5
	str	r5, [r4]
	bl	cap_getmode
	cmn	r0, #1
	movne	r0, #0
	moveq	r0, #1
	bl	CHECK
	ldr	r3, [r6]
	ldr	r0, [r4]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	CHECK
	ldr	r0, .L36+20
	str	r5, [r4]
	bl	cap_getmode
	cmn	r0, #1
	movne	r0, #0
	moveq	r0, #1
	bl	CHECK
	ldr	r3, [r6]
	ldr	r0, [r4]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	CHECK
	bl	fork
	cmn	r0, #1
	beq	.L10
	cmp	r0, r5
	beq	.L11
.L12:
	mov	r0, #1
	bl	sleep
	mov	r1, #0
	add	r0, sp, #8
	bl	pdfork
	cmn	r0, #1
	beq	.L13
	cmp	r0, #0
	beq	.L14
.L15:
	ldr	r0, [sp, #8]
	bl	pdwait
	cmn	r0, #1
	beq	.L34
.L16:
	ldr	r0, [sp, #8]
	bl	close
	mov	r0, #0
	bl	exit
	ldr	r3, .L36
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L35
	mov	r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L6:
	mov	r0, #1
	ldr	r1, .L36+24
	bl	err
.L7:
	ldr	r5, .L36+4
	add	r0, sp, #4
	str	r5, [sp, #4]
	bl	cap_getmode
	clz	r0, r0
	lsr	r0, r0, #5
	bl	CHECK
	ldr	r0, [sp, #4]
	subs	r0, r0, r5
	movne	r0, #1
	bl	CHECK
	ldr	r0, [sp, #4]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	CHECK
	mov	r0, #0
	bl	exit
	b	.L8
.L10:
	mov	r0, #1
	ldr	r1, .L36+28
	bl	err
.L11:
	ldr	r4, .L36+4
	add	r0, sp, #4
	str	r4, [sp, #4]
	bl	cap_getmode
	clz	r0, r0
	lsr	r0, r0, #5
	bl	CHECK
	ldr	r0, [sp, #4]
	subs	r0, r0, r4
	movne	r0, #1
	bl	CHECK
	ldr	r0, [sp, #4]
	sub	r0, r0, #1
	clz	r0, r0
	lsr	r0, r0, #5
	bl	CHECK
	mov	r0, #0
	bl	exit
	b	.L12
.L13:
	mov	r0, #1
	ldr	r1, .L36+24
	bl	err
.L14:
	ldr	r4, .L36+4
	add	r0, sp, #4
	str	r4, [sp, #4]
	bl	cap_getmode
	clz	r0, r0
	lsr	r0, r0, #5
	bl	CHECK
	ldr	r0, [sp, #4]
	subs	r0, r0, r4
	movne	r0, #1
	bl	CHECK
	ldr	r0, [sp, #4]
	sub	r0, r0, #1
	clz	r0, r0
	lsr	r0, r0, #5
	bl	CHECK
	mov	r0, #0
	bl	exit
	b	.L15
.L2:
	ldr	r1, .L36+28
	mov	r0, #1
	bl	err
	b	.L3
.L33:
	ldr	r1, .L36+32
	mov	r0, #1
	bl	err
	b	.L9
.L32:
	ldr	r1, .L36+36
	mov	r0, #1
	bl	err
	b	.L5
.L34:
	ldr	r1, .L36+32
	mov	r0, #1
	bl	err
	b	.L16
.L35:
	bl	__stack_chk_fail
.L37:
	.align	2
.L36:
	.word	.LC5
	.word	666
	.word	.LC0
	.word	errno
	.word	EFAULT
	.word	-559038242
	.word	.LC3
	.word	.LC1
	.word	.LC4
	.word	.LC2
	.size	main, .-main
	.comm	errno,4,4
	.comm	EFAULT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
