	.file	"149845.c"
	.intel_syntax noprefix
	.text
	.local	counter
	.comm	counter,4,4
	.type	sig_handler, @function
sig_handler:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	edx, 15
	lea	rsi, msg.0[rip]
	mov	edi, 1
	mov	eax, 0
	call	write@PLT
	mov	eax, DWORD PTR counter[rip]
	add	eax, 1
	mov	DWORD PTR counter[rip], eax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sig_handler, .-sig_handler
	.section	.rodata
	.align 8
.LC0:
	.string	"Signal received while masked!\n"
.LC1:
	.string	"No signal received!\n"
.LC2:
	.string	"Signal received OK"
	.text
	.globl	main
	.type	main, @function
main:
.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, 480
	mov	DWORD PTR -468[rbp], edi
	mov	QWORD PTR -480[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -320[rbp]
	mov	edx, 152
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rax, sig_handler[rip]
	mov	QWORD PTR -320[rbp], rax
	lea	rax, -320[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sigemptyset@PLT
	mov	DWORD PTR -184[rbp], 268435456
	lea	rdx, -160[rbp]
	lea	rax, -320[rbp]
	mov	rsi, rax
	mov	edi, 2
	call	sigaction@PLT
	lea	rdx, -160[rbp]
	lea	rax, -320[rbp]
	mov	rsi, rax
	mov	edi, 15
	call	sigaction@PLT
	lea	rax, -448[rbp]
	mov	rdi, rax
	call	sigemptyset@PLT
	lea	rax, -448[rbp]
	mov	esi, 2
	mov	rdi, rax
	call	sigaddset@PLT
	lea	rax, -448[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 0
	call	sigprocmask@PLT
	call	fork@PLT
	mov	DWORD PTR -452[rbp], eax
	cmp	DWORD PTR -452[rbp], 0
	jns	.L3
	mov	rax, QWORD PTR -480[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 255
	call	exit@PLT
.L3:
	cmp	DWORD PTR -452[rbp], 0
	jle	.L4
	mov	edi, 3
	mov	eax, 0
	call	sleep@PLT
	mov	eax, DWORD PTR counter[rip]
	test	eax, eax
	je	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 30
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	lea	rax, -448[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 1
	call	sigprocmask@PLT
	mov	edi, 3
	mov	eax, 0
	call	sleep@PLT
	mov	eax, DWORD PTR counter[rip]
	test	eax, eax
	jne	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 20
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L4:
	mov	edi, 1
	mov	eax, 0
	call	sleep@PLT
	mov	eax, 0
	call	getppid@PLT
	mov	esi, 2
	mov	edi, eax
	call	kill@PLT
	mov	edi, 0
	call	_exit@PLT
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.data
	.align 16
	.type	msg.0, @object
	.size	msg.0, 16
msg.0:
	.string	"Signal handler\n"
	.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	"149845.c"
	.text
	.local	counter
	.comm	counter,4,4
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sig_handler, %function
sig_handler:
	@ 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]
	mov	r2, #15
	ldr	r1, .L2
	mov	r0, #1
	bl	write
	ldr	r3, .L2+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L2+4
	str	r3, [r2]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	msg.5642
	.word	counter
	.size	sig_handler, .-sig_handler
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Signal received while masked!\012\000"
	.align	2
.LC1:
	.ascii	"No signal received!\012\000"
	.align	2
.LC2:
	.ascii	"Signal received OK\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 424
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #424
	str	r0, [fp, #-424]
	str	r1, [fp, #-428]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #288
	mov	r2, #140
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, .L10+4
	str	r3, [fp, #-288]
	sub	r3, fp, #288
	add	r3, r3, #4
	mov	r0, r3
	bl	sigemptyset
	mov	r3, #268435456
	str	r3, [fp, #-156]
	sub	r2, fp, #148
	sub	r3, fp, #288
	mov	r1, r3
	mov	r0, #2
	bl	sigaction
	sub	r2, fp, #148
	sub	r3, fp, #288
	mov	r1, r3
	mov	r0, #15
	bl	sigaction
	sub	r3, fp, #416
	mov	r0, r3
	bl	sigemptyset
	sub	r3, fp, #416
	mov	r1, #2
	mov	r0, r3
	bl	sigaddset
	sub	r3, fp, #416
	mov	r2, #0
	mov	r1, r3
	mov	r0, #0
	bl	sigprocmask
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-420]
	ldr	r3, [fp, #-420]
	cmp	r3, #0
	bge	.L5
	ldr	r3, [fp, #-428]
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	mov	r0, #255
	bl	exit
.L5:
	ldr	r3, [fp, #-420]
	cmp	r3, #0
	ble	.L6
	mov	r0, #3
	bl	sleep
	ldr	r3, .L10+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L7
	ldr	r3, .L10+12
	ldr	r3, [r3]
	mov	r2, #30
	mov	r1, #1
	ldr	r0, .L10+16
	bl	fwrite
	mov	r0, #1
	bl	exit
.L7:
	sub	r3, fp, #416
	mov	r2, #0
	mov	r1, r3
	mov	r0, #1
	bl	sigprocmask
	mov	r0, #3
	bl	sleep
	ldr	r3, .L10+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L10+12
	ldr	r3, [r3]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, .L10+20
	bl	fwrite
	mov	r0, #1
	bl	exit
.L8:
	ldr	r0, .L10+24
	bl	puts
	mov	r0, #0
	bl	exit
.L6:
	mov	r0, #1
	bl	sleep
	bl	getppid
	mov	r3, r0
	mov	r1, #2
	mov	r0, r3
	bl	kill
	mov	r0, #0
	bl	_exit
.L11:
	.align	2
.L10:
	.word	.LC3
	.word	sig_handler
	.word	counter
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.data
	.align	2
	.type	msg.5642, %object
	.size	msg.5642, 16
msg.5642:
	.ascii	"Signal handler\012\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
