	.file	"432311.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Thread %d (loop #%d).\n"
	.text
	.globl	thread
	.type	thread, @function
thread:
.LFB0:
	.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L3:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	sleep@PLT
	add	DWORD PTR -4[rbp], 1
.L2:
	cmp	DWORD PTR -4[rbp], 2
	jle	.L3
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	thread, .-thread
	.section	.rodata
	.align 8
.LC1:
	.string	"Run with any argument to use sched_yield()."
.LC2:
	.string	"Running with sched_yield()."
.LC3:
	.string	"Joining thread (%d)"
.LC4:
	.string	": error: %s"
.LC5:
	.string	"."
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -68[rbp], 0
	lea	rdi, .LC1[rip]
	call	puts@PLT
	cmp	DWORD PTR -84[rbp], 1
	jle	.L6
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	DWORD PTR -68[rbp], 1
.L6:
	mov	DWORD PTR -72[rbp], 0
	jmp	.L7
.L9:
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, -48[rbp]
	lea	rdi, [rax+rdx]
	lea	rax, -72[rbp]
	mov	rcx, rax
	lea	rdx, thread[rip]
	mov	esi, 0
	call	pthread_create@PLT
	cmp	DWORD PTR -68[rbp], 0
	je	.L8
	call	sched_yield@PLT
.L8:
	mov	eax, DWORD PTR -72[rbp]
	add	eax, 1
	mov	DWORD PTR -72[rbp], eax
.L7:
	mov	eax, DWORD PTR -72[rbp]
	cmp	eax, 4
	jle	.L9
	mov	edi, 3
	call	sleep@PLT
	mov	DWORD PTR -64[rbp], 0
	jmp	.L10
.L13:
	mov	eax, DWORD PTR -64[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rdx, -56[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_join@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], 0
	je	.L11
	mov	eax, DWORD PTR -60[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	warnx@PLT
	jmp	.L12
.L11:
	lea	rdi, .LC5[rip]
	call	puts@PLT
.L12:
	add	DWORD PTR -64[rbp], 1
.L10:
	cmp	DWORD PTR -64[rbp], 4
	jle	.L13
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"432311.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Thread %d (loop #%d).\012\000"
	.text
	.align	2
	.global	thread
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread, %function
thread:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	mov	r1, r3
	ldr	r0, .L5
	bl	printf
	mov	r0, #1
	bl	sleep
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	ble	.L3
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.size	thread, .-thread
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Run with any argument to use sched_yield().\000"
	.align	2
.LC2:
	.ascii	"Running with sched_yield().\000"
	.align	2
.LC3:
	.ascii	"Joining thread (%d)\000"
	.align	2
.LC4:
	.ascii	": error: %s\000"
	.align	2
.LC5:
	.ascii	".\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-40]
	ldr	r0, .L18+4
	bl	puts
	ldr	r3, [fp, #-56]
	cmp	r3, #1
	ble	.L8
	ldr	r0, .L18+8
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-40]
.L8:
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L9
.L11:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	sub	r2, fp, #28
	add	r0, r2, r3
	sub	r3, fp, #48
	ldr	r2, .L18+12
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L10
	bl	sched_yield
.L10:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L9:
	ldr	r3, [fp, #-48]
	cmp	r3, #4
	ble	.L11
	mov	r0, #3
	bl	sleep
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L12
.L15:
	ldr	r1, [fp, #-36]
	ldr	r0, .L18+16
	bl	printf
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	sub	r2, fp, #28
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r2, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	pthread_join
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L13
	ldr	r0, [fp, #-32]
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L18+20
	bl	warnx
	b	.L14
.L13:
	ldr	r0, .L18+24
	bl	puts
.L14:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L12:
	ldr	r3, [fp, #-36]
	cmp	r3, #4
	ble	.L15
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC6
	.word	.LC1
	.word	.LC2
	.word	thread
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
