	.file	"242801.c"
	.intel_syntax noprefix
	.text
	.globl	message
	.data
	.align 8
	.type	message, @object
	.size	message, 12
message:
	.string	"Hello World"
	.globl	thread_finished
	.bss
	.align 4
	.type	thread_finished, @object
	.size	thread_finished, 4
thread_finished:
	.zero	4
	.section	.rodata
.LC0:
	.string	"Attribute creation failed"
.LC1:
	.string	"Setting schedpolicy failed"
	.align 8
.LC2:
	.string	"Setting detached attribute failed"
.LC3:
	.string	"Thread creation failed"
	.align 8
.LC4:
	.string	"Waiting for thread to say it's finished..."
.LC5:
	.string	"Other thread finished, bye!"
	.text
	.globl	main
	.type	main, @function
main:
.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, 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	pthread_attr_init@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], 0
	je	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	lea	rax, -64[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_attr_setschedpolicy@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], 0
	je	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	lea	rax, -64[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	pthread_attr_setdetachstate@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], 0
	je	.L4
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	lea	rsi, -64[rbp]
	lea	rax, -72[rbp]
	lea	rcx, message[rip]
	lea	rdx, thread_function[rip]
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], 0
	je	.L5
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	edi, 0
	call	sched_get_priority_max@PLT
	mov	DWORD PTR -80[rbp], eax
	mov	edi, 0
	call	sched_get_priority_min@PLT
	mov	DWORD PTR -76[rbp], eax
	mov	eax, DWORD PTR -76[rbp]
	mov	DWORD PTR -88[rbp], eax
	lea	rdx, -88[rbp]
	lea	rax, -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_attr_setschedparam@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], 0
	je	.L6
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	pthread_attr_destroy@PLT
	jmp	.L7
.L8:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, 1
	call	sleep@PLT
.L7:
	mov	eax, DWORD PTR thread_finished[rip]
	test	eax, eax
	je	.L8
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC6:
	.string	"thread_function is running. Argument was %s\n"
	.align 8
.LC7:
	.string	"Second thread setting finished flag, and exiting now"
	.text
	.globl	thread_function
	.type	thread_function, @function
thread_function:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 4
	call	sleep@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	DWORD PTR thread_finished[rip], 1
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE7:
	.size	thread_function, .-thread_function
	.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	"242801.c"
	.text
	.global	message
	.data
	.align	2
	.type	message, %object
	.size	message, 12
message:
	.ascii	"Hello World\000"
	.global	thread_finished
	.bss
	.align	2
	.type	thread_finished, %object
	.size	thread_finished, 4
thread_finished:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Attribute creation failed\000"
	.align	2
.LC1:
	.ascii	"Setting schedpolicy failed\000"
	.align	2
.LC2:
	.ascii	"Setting detached attribute failed\000"
	.align	2
.LC3:
	.ascii	"Thread creation failed\000"
	.align	2
.LC4:
	.ascii	"Waiting for thread to say it's finished...\000"
	.align	2
.LC5:
	.ascii	"Other thread finished, bye!\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 = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #44
	mov	r0, r3
	bl	pthread_attr_init
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	beq	.L2
	ldr	r0, .L10+4
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	sub	r3, fp, #44
	mov	r1, #0
	mov	r0, r3
	bl	pthread_attr_setschedpolicy
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	beq	.L3
	ldr	r0, .L10+8
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	sub	r3, fp, #44
	mov	r1, #1
	mov	r0, r3
	bl	pthread_attr_setdetachstate
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	beq	.L4
	ldr	r0, .L10+12
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	sub	r1, fp, #44
	sub	r0, fp, #64
	ldr	r3, .L10+16
	ldr	r2, .L10+20
	bl	pthread_create
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	beq	.L5
	ldr	r0, .L10+24
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	mov	r0, #0
	bl	sched_get_priority_max
	str	r0, [fp, #-52]
	mov	r0, #0
	bl	sched_get_priority_min
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	str	r3, [fp, #-60]
	sub	r2, fp, #60
	sub	r3, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	pthread_attr_setschedparam
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	beq	.L6
	ldr	r0, .L10+8
	bl	perror
	mov	r0, #1
	bl	exit
.L6:
	sub	r3, fp, #44
	mov	r0, r3
	bl	pthread_attr_destroy
	b	.L7
.L8:
	ldr	r0, .L10+28
	bl	puts
	mov	r0, #1
	bl	sleep
.L7:
	ldr	r3, .L10+32
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L8
	ldr	r0, .L10+36
	bl	puts
	mov	r0, #0
	bl	exit
.L11:
	.align	2
.L10:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	message
	.word	thread_function
	.word	.LC3
	.word	.LC4
	.word	thread_finished
	.word	.LC5
	.size	main, .-main
	.section	.rodata
	.align	2
.LC7:
	.ascii	"thread_function is running. Argument was %s\012\000"
	.align	2
.LC8:
	.ascii	"Second thread setting finished flag, and exiting no"
	.ascii	"w\000"
	.text
	.align	2
	.global	thread_function
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_function, %function
thread_function:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L13
	bl	printf
	mov	r0, #4
	bl	sleep
	ldr	r0, .L13+4
	bl	puts
	ldr	r3, .L13+8
	mov	r2, #1
	str	r2, [r3]
	mov	r0, #0
	bl	pthread_exit
.L14:
	.align	2
.L13:
	.word	.LC7
	.word	.LC8
	.word	thread_finished
	.size	thread_function, .-thread_function
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
