	.file	"extr_t_sysv.c_waiter.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"waiter: semget"
.LC1:
	.string	"waiter: semop -1"
.LC2:
	.string	"WOO!  GOT THE SEMAPHORE!\n"
.LC3:
	.string	"waiter: semop +1"
	.text
	.p2align 4
	.globl	waiter
	.type	waiter, @function
waiter:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	edx, edx
	mov	esi, 1
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	sub	rsp, 40
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR semkey[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	semget@PLT
	mov	ebp, eax
	cmp	eax, -1
	je	.L8
.L2:
	mov	rax, QWORD PTR SEM_UNDO[rip]
	mov	r12, rsp
	mov	edx, 1
	mov	edi, ebp
	mov	rsi, r12
	mov	DWORD PTR [rsp], -1
	mov	QWORD PTR 16[rsp], 0
	mov	QWORD PTR 8[rsp], rax
	call	semop@PLT
	cmp	eax, -1
	je	.L9
.L3:
	lea	rdi, .LC2[rip]
	call	printf@PLT
	mov	edi, 1
	call	sleep@PLT
	mov	edx, 1
	mov	rsi, r12
	mov	edi, ebp
	mov	rax, QWORD PTR SEM_UNDO[rip]
	mov	DWORD PTR [rsp], 1
	mov	QWORD PTR 16[rsp], 0
	mov	QWORD PTR 8[rsp], rax
	call	semop@PLT
	cmp	eax, -1
	je	.L10
.L4:
	xor	edi, edi
	call	exit@PLT
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L11
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	lea	rsi, .LC0[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	lea	rsi, .LC3[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	lea	rsi, .LC1[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L3
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	waiter, .-waiter
	.comm	semkey,4,4
	.comm	SEM_UNDO,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_t_sysv.c_waiter.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"waiter: semget\000"
	.align	2
.LC1:
	.ascii	"waiter: semop -1\000"
	.align	2
.LC2:
	.ascii	"WOO!  GOT THE SEMAPHORE!\012\000"
	.align	2
.LC3:
	.ascii	"waiter: semop +1\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	waiter
	.syntax unified
	.arm
	.fpu softvfp
	.type	waiter, %function
waiter:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L12
	sub	sp, sp, #16
	ldr	r0, [r3]
	ldr	r3, .L12+4
	mov	r2, #0
	mov	r1, #1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	semget
	cmn	r0, #1
	mov	r4, r0
	beq	.L8
.L2:
	mov	r0, #0
	mvn	r3, #0
	ldr	r6, .L12+8
	str	r0, [sp, #8]
	ldr	r2, [r6]
	mov	r1, sp
	str	r2, [sp, #4]
	mov	r0, r4
	mov	r2, #1
	str	r3, [sp]
	bl	semop
	cmn	r0, #1
	beq	.L9
.L3:
	mov	r5, #1
	ldr	r0, .L12+12
	bl	printf
	mov	r0, r5
	bl	sleep
	mov	r3, #0
	ldr	ip, [r6]
	mov	r1, sp
	mov	r0, r4
	mov	r2, r5
	stm	sp, {r5, ip}
	str	r3, [sp, #8]
	bl	semop
	cmn	r0, #1
	beq	.L10
.L4:
	mov	r0, #0
	bl	exit
	ldr	r3, .L12+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L8:
	ldr	r1, .L12+16
	mov	r0, #1
	bl	err
	b	.L2
.L10:
	mov	r0, r5
	ldr	r1, .L12+20
	bl	err
	b	.L4
.L9:
	ldr	r1, .L12+24
	mov	r0, #1
	bl	err
	b	.L3
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	semkey
	.word	.LC4
	.word	SEM_UNDO
	.word	.LC2
	.word	.LC0
	.word	.LC3
	.word	.LC1
	.size	waiter, .-waiter
	.comm	semkey,4,4
	.comm	SEM_UNDO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
