	.file	"65373.c"
	.intel_syntax noprefix
	.text
	.local	s_sem
	.comm	s_sem,8,8
	.local	s_d1
	.comm	s_d1,8,8
	.local	s_d2
	.comm	s_d2,8,8
	.local	s_d3
	.comm	s_d3,8,8
	.local	s_debug
	.comm	s_debug,4,4
	.local	s_do_printf
	.comm	s_do_printf,4,4
	.local	s_do_mutual_exclusion
	.comm	s_do_mutual_exclusion,4,4
	.section	.rodata
.LC0:
	.string	"the_stack_data/65373.c"
.LC1:
	.string	"0"
.LC2:
	.string	"dmp"
.LC3:
	.string	"/drd-sem-open-test-%d"
	.align 8
.LC4:
	.string	"Failed to create a semaphore with name %s\n"
	.align 8
.LC5:
	.string	"&s_d1 = %p; &s_d2 = %p; &s_d3 = %p\n"
.LC8:
	.string	"s_d2 = %g (should be 2)\n"
.LC9:
	.string	"s_d3 = %g (should be 5)\n"
	.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	jmp	.L2
.L7:
	cmp	DWORD PTR -60[rbp], 112
	je	.L3
	cmp	DWORD PTR -60[rbp], 112
	jg	.L4
	cmp	DWORD PTR -60[rbp], 100
	je	.L5
	cmp	DWORD PTR -60[rbp], 109
	je	.L6
	jmp	.L4
.L5:
	mov	DWORD PTR s_debug[rip], 1
	jmp	.L2
.L6:
	mov	DWORD PTR s_do_mutual_exclusion[rip], 1
	jmp	.L2
.L3:
	mov	DWORD PTR s_do_printf[rip], 1
	jmp	.L2
.L4:
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 53
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	__assert_fail@PLT
.L2:
	mov	rcx, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR -68[rbp]
	lea	rdx, .LC2[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], -1
	jne	.L7
	call	getpid@PLT
	mov	edx, eax
	lea	rax, -48[rbp]
	mov	ecx, edx
	lea	rdx, .LC3[rip]
	mov	esi, 32
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	lea	rax, -48[rbp]
	mov	ecx, 1
	mov	edx, 384
	mov	esi, 192
	mov	rdi, rax
	mov	eax, 0
	call	sem_open@PLT
	mov	QWORD PTR s_sem[rip], rax
	mov	rax, QWORD PTR s_sem[rip]
	test	rax, rax
	jne	.L8
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -48[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	setlinebuf@PLT
	mov	eax, DWORD PTR s_debug[rip]
	test	eax, eax
	je	.L9
	lea	rcx, s_d3[rip]
	lea	rdx, s_d2[rip]
	lea	rsi, s_d1[rip]
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L9:
	movsd	xmm0, QWORD PTR .LC6[rip]
	movsd	QWORD PTR s_d1[rip], xmm0
	movsd	xmm0, QWORD PTR .LC7[rip]
	movsd	QWORD PTR s_d3[rip], xmm0
	lea	rax, -56[rbp]
	mov	ecx, 0
	lea	rdx, thread_func[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	edi, 1
	call	sleep@PLT
	mov	eax, DWORD PTR s_do_mutual_exclusion[rip]
	test	eax, eax
	je	.L10
	mov	rax, QWORD PTR s_sem[rip]
	mov	rdi, rax
	call	sem_wait@PLT
.L10:
	movsd	xmm1, QWORD PTR s_d3[rip]
	movsd	xmm0, QWORD PTR .LC6[rip]
	addsd	xmm0, xmm1
	movsd	QWORD PTR s_d3[rip], xmm0
	mov	eax, DWORD PTR s_do_mutual_exclusion[rip]
	test	eax, eax
	je	.L11
	mov	rax, QWORD PTR s_sem[rip]
	mov	rdi, rax
	call	sem_post@PLT
.L11:
	mov	rax, QWORD PTR -56[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	eax, DWORD PTR s_do_printf[rip]
	test	eax, eax
	je	.L12
	mov	rax, QWORD PTR s_d2[rip]
	movq	xmm0, rax
	lea	rdi, .LC8[rip]
	mov	eax, 1
	call	printf@PLT
.L12:
	mov	eax, DWORD PTR s_do_printf[rip]
	test	eax, eax
	je	.L13
	mov	rax, QWORD PTR s_d3[rip]
	movq	xmm0, rax
	lea	rdi, .LC9[rip]
	mov	eax, 1
	call	printf@PLT
.L13:
	mov	rax, QWORD PTR s_sem[rip]
	mov	rdi, rax
	call	sem_close@PLT
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	sem_unlink@PLT
	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
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC10:
	.string	"s_d1 = %g (should be 1)\n"
	.text
	.type	thread_func, @function
thread_func:
.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	eax, DWORD PTR s_do_printf[rip]
	test	eax, eax
	je	.L17
	mov	rax, QWORD PTR s_d1[rip]
	movq	xmm0, rax
	lea	rdi, .LC10[rip]
	mov	eax, 1
	call	printf@PLT
.L17:
	movsd	xmm0, QWORD PTR .LC11[rip]
	movsd	QWORD PTR s_d2[rip], xmm0
	mov	eax, DWORD PTR s_do_mutual_exclusion[rip]
	test	eax, eax
	je	.L18
	mov	rax, QWORD PTR s_sem[rip]
	mov	rdi, rax
	call	sem_wait@PLT
.L18:
	movsd	xmm1, QWORD PTR s_d3[rip]
	movsd	xmm0, QWORD PTR .LC6[rip]
	addsd	xmm0, xmm1
	movsd	QWORD PTR s_d3[rip], xmm0
	mov	eax, DWORD PTR s_do_mutual_exclusion[rip]
	test	eax, eax
	je	.L19
	mov	rax, QWORD PTR s_sem[rip]
	mov	rdi, rax
	call	sem_post@PLT
.L19:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	thread_func, .-thread_func
	.section	.rodata
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 5
__PRETTY_FUNCTION__.0:
	.string	"main"
	.align 8
.LC6:
	.long	0
	.long	1072693248
	.align 8
.LC7:
	.long	0
	.long	1074266112
	.align 8
.LC11:
	.long	0
	.long	1073741824
	.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	"65373.c"
	.text
	.local	s_sem
	.comm	s_sem,4,4
	.local	s_d1
	.comm	s_d1,8,8
	.local	s_d2
	.comm	s_d2,8,8
	.local	s_d3
	.comm	s_d3,8,8
	.local	s_debug
	.comm	s_debug,4,4
	.local	s_do_printf
	.comm	s_do_printf,4,4
	.local	s_do_mutual_exclusion
	.comm	s_do_mutual_exclusion,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"the_stack_data/65373.c\000"
	.align	2
.LC1:
	.ascii	"0\000"
	.align	2
.LC2:
	.ascii	"dmp\000"
	.align	2
.LC3:
	.ascii	"/drd-sem-open-test-%d\000"
	.align	2
.LC4:
	.ascii	"Failed to create a semaphore with name %s\012\000"
	.align	2
.LC5:
	.ascii	"&s_d1 = %p; &s_d2 = %p; &s_d3 = %p\012\000"
	.global	__aeabi_dadd
	.align	2
.LC6:
	.ascii	"s_d2 = %g (should be 2)\012\000"
	.align	2
.LC7:
	.ascii	"s_d3 = %g (should be 5)\012\000"
	.align	2
.LC8:
	.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, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L2
.L7:
	ldr	r3, [fp, #-44]
	cmp	r3, #112
	beq	.L3
	ldr	r3, [fp, #-44]
	cmp	r3, #112
	bgt	.L4
	ldr	r3, [fp, #-44]
	cmp	r3, #100
	beq	.L5
	ldr	r3, [fp, #-44]
	cmp	r3, #109
	beq	.L6
	b	.L4
.L5:
	ldr	r3, .L16+4
	mov	r2, #1
	str	r2, [r3]
	b	.L2
.L6:
	ldr	r3, .L16+8
	mov	r2, #1
	str	r2, [r3]
	b	.L2
.L3:
	ldr	r3, .L16+12
	mov	r2, #1
	str	r2, [r3]
	b	.L2
.L4:
	ldr	r3, .L16+16
	mov	r2, #53
	ldr	r1, .L16+20
	ldr	r0, .L16+24
	bl	__assert_fail
.L2:
	ldr	r2, .L16+28
	ldr	r1, [fp, #-60]
	ldr	r0, [fp, #-56]
	bl	getopt
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmn	r3, #1
	bne	.L7
	bl	getpid
	mov	r3, r0
	sub	r0, fp, #40
	ldr	r2, .L16+32
	mov	r1, #32
	bl	snprintf
	sub	r0, fp, #40
	mov	r3, #1
	mov	r2, #384
	mov	r1, #192
	bl	sem_open
	mov	r3, r0
	ldr	r2, .L16+36
	str	r3, [r2]
	ldr	r3, .L16+36
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L16+40
	ldr	r3, [r3]
	sub	r2, fp, #40
	ldr	r1, .L16+44
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L8:
	ldr	r3, .L16+48
	ldr	r3, [r3]
	mov	r0, r3
	bl	setlinebuf
	ldr	r3, .L16+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L9
	ldr	r3, .L16+52
	ldr	r2, .L16+56
	ldr	r1, .L16+60
	ldr	r0, .L16+64
	bl	printf
.L9:
	ldr	r1, .L16+60
	mov	r2, #0
	ldr	r3, .L16+68
	stm	r1, {r2-r3}
	ldr	r1, .L16+52
	mov	r2, #0
	ldr	r3, .L16+72
	stm	r1, {r2-r3}
	sub	r0, fp, #48
	mov	r3, #0
	ldr	r2, .L16+76
	mov	r1, #0
	bl	pthread_create
	mov	r0, #1
	bl	sleep
	ldr	r3, .L16+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L10
	ldr	r3, .L16+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	sem_wait
.L10:
	ldr	r3, .L16+52
	ldmia	r3, {r0-r1}
	mov	r2, #0
	ldr	r3, .L16+68
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L16+52
	stm	r1, {r2-r3}
	ldr	r3, .L16+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L11
	ldr	r3, .L16+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	sem_post
.L11:
	ldr	r3, [fp, #-48]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, .L16+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L12
	ldr	r3, .L16+56
	ldmia	r3, {r2-r3}
	ldr	r0, .L16+80
	bl	printf
.L12:
	ldr	r3, .L16+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L13
	ldr	r3, .L16+52
	ldmia	r3, {r2-r3}
	ldr	r0, .L16+84
	bl	printf
.L13:
	ldr	r3, .L16+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	sem_close
	sub	r3, fp, #40
	mov	r0, r3
	bl	sem_unlink
	mov	r3, #0
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC8
	.word	s_debug
	.word	s_do_mutual_exclusion
	.word	s_do_printf
	.word	__PRETTY_FUNCTION__.6333
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	s_sem
	.word	stderr
	.word	.LC4
	.word	stdout
	.word	s_d3
	.word	s_d2
	.word	s_d1
	.word	.LC5
	.word	1072693248
	.word	1074266112
	.word	thread_func
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.section	.rodata
	.align	2
.LC9:
	.ascii	"s_d1 = %g (should be 1)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_func, %function
thread_func:
	@ 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	r3, .L23
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L19
	ldr	r3, .L23+4
	ldmia	r3, {r2-r3}
	ldr	r0, .L23+8
	bl	printf
.L19:
	ldr	r1, .L23+12
	mov	r2, #0
	mov	r3, #1073741824
	stm	r1, {r2-r3}
	ldr	r3, .L23+16
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L20
	ldr	r3, .L23+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	sem_wait
.L20:
	ldr	r3, .L23+24
	ldmia	r3, {r0-r1}
	mov	r2, #0
	ldr	r3, .L23+28
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L23+24
	stm	r1, {r2-r3}
	ldr	r3, .L23+16
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L21
	ldr	r3, .L23+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	sem_post
.L21:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	s_do_printf
	.word	s_d1
	.word	.LC9
	.word	s_d2
	.word	s_do_mutual_exclusion
	.word	s_sem
	.word	s_d3
	.word	1072693248
	.size	thread_func, .-thread_func
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.6333, %object
	.size	__PRETTY_FUNCTION__.6333, 5
__PRETTY_FUNCTION__.6333:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
