	.file	"1085019.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Thread 1"
	.text
	.globl	attr_thread1
	.type	attr_thread1, @function
attr_thread1:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	sleep@PLT
	mov	eax, 1
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	attr_thread1, .-attr_thread1
	.section	.rodata
.LC1:
	.string	"Thread 2"
	.text
	.globl	attr_thread2
	.type	attr_thread2, @function
attr_thread2:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, 1
	call	sleep@PLT
	mov	eax, 2
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	attr_thread2, .-attr_thread2
	.section	.rodata
.LC2:
	.string	"Setdetachstate\n"
.LC3:
	.string	"res1 = %p\n"
.LC4:
	.string	"res2 = %p\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	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
	lea	rax, -64[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_attr_setdetachstate@PLT
	mov	DWORD PTR -100[rbp], eax
	cmp	DWORD PTR -100[rbp], 0
	je	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 15
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rsi, -64[rbp]
	lea	rax, -96[rbp]
	mov	ecx, 0
	lea	rdx, attr_thread1[rip]
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -64[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	pthread_attr_setdetachstate@PLT
	mov	DWORD PTR -100[rbp], eax
	cmp	DWORD PTR -100[rbp], 0
	je	.L7
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 15
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	lea	rsi, -64[rbp]
	lea	rax, -88[rbp]
	mov	ecx, 0
	lea	rdx, attr_thread2[rip]
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	pthread_attr_destroy@PLT
	mov	rax, QWORD PTR -96[rbp]
	lea	rdx, -80[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -88[rbp]
	lea	rdx, -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -80[rbp]
	cmp	rax, 1
	jne	.L8
	mov	rax, QWORD PTR -72[rbp]
	cmp	rax, 2
	je	.L9
.L8:
	mov	eax, 1
	jmp	.L11
.L9:
	mov	eax, 0
.L11:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"1085019.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Thread 1\000"
	.text
	.align	2
	.global	attr_thread1
	.syntax unified
	.arm
	.fpu softvfp
	.type	attr_thread1, %function
attr_thread1:
	@ 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	r0, .L3
	bl	puts
	mov	r0, #1
	bl	sleep
	mov	r3, #1
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.size	attr_thread1, .-attr_thread1
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Thread 2\000"
	.text
	.align	2
	.global	attr_thread2
	.syntax unified
	.arm
	.fpu softvfp
	.type	attr_thread2, %function
attr_thread2:
	@ 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	r0, .L7
	bl	puts
	mov	r0, #1
	bl	sleep
	mov	r3, #2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC1
	.size	attr_thread2, .-attr_thread2
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Setdetachstate\012\000"
	.align	2
.LC3:
	.ascii	"res1 = %p\012\000"
	.align	2
.LC4:
	.ascii	"res2 = %p\012\000"
	.align	2
.LC5:
	.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, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #44
	mov	r0, r3
	bl	pthread_attr_init
	sub	r3, fp, #44
	mov	r1, #0
	mov	r0, r3
	bl	pthread_attr_setdetachstate
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	beq	.L10
	ldr	r3, .L17+4
	ldr	r3, [r3]
	mov	r2, #15
	mov	r1, #1
	ldr	r0, .L17+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L10:
	sub	r1, fp, #44
	sub	r0, fp, #64
	mov	r3, #0
	ldr	r2, .L17+12
	bl	pthread_create
	sub	r3, fp, #44
	mov	r1, #1
	mov	r0, r3
	bl	pthread_attr_setdetachstate
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	beq	.L11
	ldr	r3, .L17+4
	ldr	r3, [r3]
	mov	r2, #15
	mov	r1, #1
	ldr	r0, .L17+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L11:
	sub	r1, fp, #44
	sub	r0, fp, #60
	mov	r3, #0
	ldr	r2, .L17+16
	bl	pthread_create
	sub	r3, fp, #44
	mov	r0, r3
	bl	pthread_attr_destroy
	ldr	r3, [fp, #-64]
	sub	r2, fp, #56
	mov	r1, r2
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-60]
	sub	r2, fp, #52
	mov	r1, r2
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-56]
	mov	r1, r3
	ldr	r0, .L17+20
	bl	printf
	ldr	r3, [fp, #-52]
	mov	r1, r3
	ldr	r0, .L17+24
	bl	printf
	ldr	r3, [fp, #-56]
	cmp	r3, #1
	bne	.L12
	ldr	r3, [fp, #-52]
	cmp	r3, #2
	beq	.L13
.L12:
	mov	r3, #1
	b	.L15
.L13:
	mov	r3, #0
.L15:
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC5
	.word	stderr
	.word	.LC2
	.word	attr_thread1
	.word	attr_thread2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
