	.file	"560855.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"This is a thread from process %ld\n"
	.align 8
.LC1:
	.string	"Thread failed to lock semaphore\n"
	.align 8
.LC2:
	.string	"Thread failed to unlock semaphore\n"
	.text
	.globl	threadout
	.type	threadout, @function
threadout:
.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, 1088
	mov	QWORD PTR -1080[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -1080[rbp]
	mov	QWORD PTR -1064[rbp], rax
	mov	QWORD PTR -1056[rbp], 0
	mov	QWORD PTR -1048[rbp], 10000000
	call	getpid@PLT
	movsx	rdx, eax
	lea	rax, -1040[rbp]
	mov	rcx, rdx
	lea	rdx, .LC0[rip]
	mov	esi, 1024
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	lea	rax, -1040[rbp]
	mov	QWORD PTR -1072[rbp], rax
	jmp	.L2
.L4:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 32
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	eax, 0
	jmp	.L8
.L2:
	mov	rax, QWORD PTR -1064[rbp]
	mov	rdi, rax
	call	sem_wait@PLT
	cmp	eax, -1
	je	.L4
	jmp	.L5
.L6:
	mov	rdx, QWORD PTR stderr[rip]
	mov	rax, QWORD PTR -1072[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	add	QWORD PTR -1072[rbp], 1
	lea	rax, -1056[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	nanosleep@PLT
.L5:
	mov	rax, QWORD PTR -1072[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L6
	mov	rax, QWORD PTR -1064[rbp]
	mov	rdi, rax
	call	sem_post@PLT
	cmp	eax, -1
	jne	.L7
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 34
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
.L7:
	mov	eax, 0
.L8:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	threadout, .-threadout
	.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	"560855.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"This is a thread from process %ld\012\000"
	.align	2
.LC1:
	.ascii	"Thread failed to lock semaphore\012\000"
	.align	2
.LC2:
	.ascii	"Thread failed to unlock semaphore\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	threadout
	.syntax unified
	.arm
	.fpu softvfp
	.type	threadout, %function
threadout:
	@ args = 0, pretend = 0, frame = 1056
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1056
	str	r0, [fp, #-1056]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-1056]
	str	r3, [fp, #-1044]
	mov	r3, #0
	str	r3, [fp, #-1040]
	ldr	r3, .L10+4
	str	r3, [fp, #-1036]
	bl	getpid
	mov	r3, r0
	sub	r0, fp, #1024
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r2, .L10+8
	mov	r1, #1024
	bl	snprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [fp, #-1048]
	b	.L2
.L4:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L2
	ldr	r3, .L10+12
	ldr	r3, [r3]
	mov	r2, #32
	mov	r1, #1
	ldr	r0, .L10+16
	bl	fwrite
	mov	r3, #0
	b	.L8
.L2:
	ldr	r0, [fp, #-1044]
	bl	sem_wait
	mov	r3, r0
	cmn	r3, #1
	beq	.L4
	b	.L5
.L6:
	ldr	r3, [fp, #-1048]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L10+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	fputc
	ldr	r3, [fp, #-1048]
	add	r3, r3, #1
	str	r3, [fp, #-1048]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r1, #0
	mov	r0, r3
	bl	nanosleep
.L5:
	ldr	r3, [fp, #-1048]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L6
	ldr	r0, [fp, #-1044]
	bl	sem_post
	mov	r3, r0
	cmn	r3, #1
	bne	.L7
	ldr	r3, .L10+12
	ldr	r3, [r3]
	mov	r2, #34
	mov	r1, #1
	ldr	r0, .L10+20
	bl	fwrite
.L7:
	mov	r3, #0
.L8:
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC3
	.word	10000000
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.size	threadout, .-threadout
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
