	.file	"87636462.c"
	.intel_syntax noprefix
	.text
	.local	sstack
	.comm	sstack,8,8
	.local	ustack
	.comm	ustack,8,8
	.local	uc
	.comm	uc,968,32
	.local	sc
	.comm	sc,968,32
	.section	.rodata
.LC0:
	.string	"[OK]\tStack preserved"
	.section	.data.rel.local,"aw"
	.align 8
	.type	msg, @object
	.size	msg, 8
msg:
	.quad	.LC0
	.section	.rodata
.LC1:
	.string	"[FAIL]\tStack corrupted"
	.section	.data.rel.local
	.align 8
	.type	msg2, @object
	.size	msg2, 8
msg2:
	.quad	.LC1
	.section	.rodata
	.align 8
.LC2:
	.string	"[FAIL]\tSP is not on sigaltstack"
.LC3:
	.string	"the_stack_data/87636462.c"
.LC4:
	.string	"aa"
.LC5:
	.string	"[RUN]\tsignal USR1"
.LC6:
	.string	"[FAIL]\tsigaltstack()"
	.align 8
.LC7:
	.string	"[FAIL]\tss_flags=%x, should be SS_DISABLE\n"
	.align 8
.LC8:
	.string	"[OK]\tsigaltstack is disabled in sighandler"
.LC9:
	.string	"[RUN]\tAborting"
	.text
	.globl	my_usr1
	.type	my_usr1, @function
my_usr1:
.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	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	QWORD PTR -88[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, rsp
	mov	rax, QWORD PTR sstack[rip]
	cmp	rdx, rax
	jb	.L2
	mov	rax, QWORD PTR sstack[rip]
	add	rax, 8192
	mov	rdx, rsp
	cmp	rax, rdx
	ja	.L3
.L2:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	eax, 16
	sub	rax, 1
	add	rax, 1032
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L4:
	cmp	rsp, rdx
	je	.L5
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L4
.L5:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L6
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L6:
	mov	rax, rsp
	add	rax, 15
	shr	rax, 4
	sal	rax, 4
	mov	QWORD PTR -48[rbp], rax
	cmp	QWORD PTR -48[rbp], 0
	jne	.L7
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 49
	lea	rsi, .LC3[rip]
	lea	rdi, .LC4[rip]
	call	__assert_fail@PLT
.L7:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 512
	mov	QWORD PTR -40[rbp], rax
	mov	rdx, QWORD PTR msg[rip]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 128[rax], 1
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rax, -32[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	sigaltstack@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	je	.L8
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 2
	je	.L9
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L10
.L9:
	lea	rdi, .LC8[rip]
	call	puts@PLT
.L10:
	lea	rsi, uc[rip]
	lea	rdi, sc[rip]
	call	swapcontext@PLT
	endbr64
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 128[rax]
	test	eax, eax
	jne	.L13
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	my_usr1, .-my_usr1
	.section	.rodata
.LC10:
	.string	"[RUN]\tsignal USR2"
.LC11:
	.string	"[FAIL]\tsigaltstack re-used"
	.text
	.globl	my_usr2
	.type	my_usr2, @function
my_usr2:
.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, 64
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	eax, 16
	sub	rax, 1
	add	rax, 1032
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L15:
	cmp	rsp, rdx
	je	.L16
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L15
.L16:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L17
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L17:
	mov	rax, rsp
	add	rax, 15
	shr	rax, 4
	sal	rax, 4
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR msg[rip]
	mov	rdi, rax
	call	strlen@PLT
	mov	rcx, rax
	mov	rdx, QWORD PTR msg[rip]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	memmem@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L20
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	rdx, QWORD PTR msg2[rip]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 128[rax], 0
.L20:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	my_usr2, .-my_usr2
	.section	.rodata
.LC12:
	.string	"[RUN]\tswitched to user ctx"
	.text
	.type	switch_fn, @function
switch_fn:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	edi, 12
	call	raise@PLT
	lea	rdi, sc[rip]
	call	setcontext@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	switch_fn, .-switch_fn
	.section	.rodata
.LC13:
	.string	"mmap()"
	.align 8
.LC14:
	.string	"[OK]\tInitial sigaltstack state was SS_DISABLE"
	.align 8
.LC15:
	.string	"[FAIL]\tInitial sigaltstack state was %x; should have been SS_DISABLE\n"
	.align 8
.LC16:
	.string	"[NOTE]\tThe running kernel doesn't support SS_AUTODISARM"
	.align 8
.LC17:
	.string	"[FAIL]\tsigaltstack(SS_ONSTACK | SS_AUTODISARM)"
	.align 8
.LC18:
	.string	"[FAIL]\tss_flags=%x, should be SS_AUTODISARM\n"
	.align 8
.LC19:
	.string	"[OK]\tsigaltstack is still SS_AUTODISARM after signal"
.LC20:
	.string	"[OK]\tTest passed"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 208
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -160[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sigemptyset@PLT
	mov	DWORD PTR -24[rbp], 134217732
	lea	rax, my_usr1[rip]
	mov	QWORD PTR -160[rbp], rax
	lea	rax, -160[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 10
	call	sigaction@PLT
	lea	rax, my_usr2[rip]
	mov	QWORD PTR -160[rbp], rax
	lea	rax, -160[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 12
	call	sigaction@PLT
	mov	r9d, 0
	mov	r8d, -1
	mov	ecx, 131106
	mov	edx, 3
	mov	esi, 8192
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR sstack[rip], rax
	mov	rax, QWORD PTR sstack[rip]
	cmp	rax, -1
	jne	.L23
	lea	rdi, .LC13[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L34
.L23:
	lea	rax, -192[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	sigaltstack@PLT
	mov	DWORD PTR -196[rbp], eax
	cmp	DWORD PTR -196[rbp], 0
	je	.L25
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L25:
	mov	eax, DWORD PTR -184[rbp]
	cmp	eax, 2
	jne	.L26
	lea	rdi, .LC14[rip]
	call	puts@PLT
	mov	rax, QWORD PTR sstack[rip]
	mov	QWORD PTR -192[rbp], rax
	mov	QWORD PTR -176[rbp], 8192
	mov	DWORD PTR -184[rbp], -2147483647
	lea	rax, -192[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	sigaltstack@PLT
	mov	DWORD PTR -196[rbp], eax
	cmp	DWORD PTR -196[rbp], 0
	je	.L28
	jmp	.L36
.L26:
	mov	eax, DWORD PTR -184[rbp]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L34
.L36:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 22
	jne	.L29
	lea	rdi, .LC16[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L34
.L29:
	lea	rdi, .LC17[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L34
.L28:
	mov	r9d, 0
	mov	r8d, -1
	mov	ecx, 131106
	mov	edx, 3
	mov	esi, 8192
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR ustack[rip], rax
	mov	rax, QWORD PTR ustack[rip]
	cmp	rax, -1
	jne	.L30
	lea	rdi, .LC13[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L34
.L30:
	lea	rdi, uc[rip]
	call	getcontext@PLT
	endbr64
	mov	QWORD PTR uc[rip+8], 0
	mov	rax, QWORD PTR ustack[rip]
	mov	QWORD PTR uc[rip+16], rax
	mov	QWORD PTR uc[rip+32], 8192
	mov	edx, 0
	lea	rsi, switch_fn[rip]
	lea	rdi, uc[rip]
	mov	eax, 0
	call	makecontext@PLT
	mov	edi, 10
	call	raise@PLT
	lea	rax, -192[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	sigaltstack@PLT
	mov	DWORD PTR -196[rbp], eax
	cmp	DWORD PTR -196[rbp], 0
	je	.L32
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L32:
	mov	eax, DWORD PTR -184[rbp]
	cmp	eax, -2147483648
	je	.L33
	mov	eax, DWORD PTR -184[rbp]
	mov	esi, eax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L33:
	lea	rdi, .LC19[rip]
	call	puts@PLT
	lea	rdi, .LC20[rip]
	call	puts@PLT
	mov	eax, 0
.L34:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L35
	call	__stack_chk_fail@PLT
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.section	.rodata
	.align 8
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 8
__PRETTY_FUNCTION__.0:
	.string	"my_usr1"
	.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	"87636462.c"
	.text
	.local	sstack
	.comm	sstack,4,4
	.local	ustack
	.comm	ustack,4,4
	.local	uc
	.comm	uc,744,8
	.local	sc
	.comm	sc,744,8
	.section	.rodata
	.align	2
.LC0:
	.ascii	"[OK]\011Stack preserved\000"
	.data
	.align	2
	.type	msg, %object
	.size	msg, 4
msg:
	.word	.LC0
	.section	.rodata
	.align	2
.LC1:
	.ascii	"[FAIL]\011Stack corrupted\000"
	.data
	.align	2
	.type	msg2, %object
	.size	msg2, 4
msg2:
	.word	.LC1
	.section	.rodata
	.align	2
.LC2:
	.ascii	"[FAIL]\011SP is not on sigaltstack\000"
	.align	2
.LC3:
	.ascii	"the_stack_data/87636462.c\000"
	.align	2
.LC4:
	.ascii	"aa\000"
	.align	2
.LC5:
	.ascii	"[RUN]\011signal USR1\000"
	.align	2
.LC6:
	.ascii	"[FAIL]\011sigaltstack()\000"
	.align	2
.LC7:
	.ascii	"[FAIL]\011ss_flags=%x, should be SS_DISABLE\012\000"
	.align	2
.LC8:
	.ascii	"[OK]\011sigaltstack is disabled in sighandler\000"
	.align	2
.LC9:
	.ascii	"[RUN]\011Aborting\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	my_usr1
	.syntax unified
	.arm
	.fpu softvfp
	.type	my_usr1, %function
my_usr1:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, sp
	ldr	r2, .L11+4
	ldr	r2, [r2]
	cmp	r3, r2
	bcc	.L2
	ldr	r3, .L11+4
	ldr	r3, [r3]
	add	r3, r3, #8192
	mov	r2, sp
	cmp	r3, r2
	bhi	.L3
.L2:
	ldr	r0, .L11+8
	bl	puts
	mov	r0, #1
	bl	exit
.L3:
	sub	sp, sp, #1024
	mov	r3, sp
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L11+12
	mov	r2, #49
	ldr	r1, .L11+16
	ldr	r0, .L11+20
	bl	__assert_fail
.L4:
	ldr	r3, [fp, #-32]
	add	r3, r3, #512
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r2, .L11+24
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-28]
	mov	r2, #1
	str	r2, [r3, #128]
	ldr	r0, .L11+28
	bl	puts
	sub	r3, fp, #20
	mov	r1, r3
	mov	r0, #0
	bl	sigaltstack
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L5
	ldr	r0, .L11+32
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	beq	.L6
	ldr	r3, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L11+36
	bl	printf
	b	.L7
.L6:
	ldr	r0, .L11+40
	bl	puts
.L7:
	ldr	r1, .L11+44
	ldr	r0, .L11+48
	bl	swapcontext
	ldr	r3, [fp, #-28]
	mov	r0, r3
	bl	puts
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #128]
	cmp	r3, #0
	bne	.L10
	ldr	r0, .L11+52
	bl	puts
	mov	r0, #1
	bl	exit
.L10:
	nop
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC10
	.word	sstack
	.word	.LC2
	.word	__PRETTY_FUNCTION__.6069
	.word	.LC3
	.word	.LC4
	.word	msg
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	uc
	.word	sc
	.word	.LC9
	.size	my_usr1, .-my_usr1
	.section	.rodata
	.align	2
.LC11:
	.ascii	"[RUN]\011signal USR2\000"
	.align	2
.LC12:
	.ascii	"[FAIL]\011sigaltstack re-used\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	my_usr2
	.syntax unified
	.arm
	.fpu softvfp
	.type	my_usr2, %function
my_usr2:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r0, .L17+4
	bl	puts
	sub	sp, sp, #1024
	mov	r3, sp
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	str	r3, [fp, #-24]
	ldr	r3, .L17+8
	ldr	r4, [r3]
	ldr	r3, .L17+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r4
	mov	r1, #1024
	ldr	r0, [fp, #-24]
	bl	memmem
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L16
	ldr	r0, .L17+12
	bl	puts
	ldr	r3, [fp, #-20]
	ldr	r2, .L17+16
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-20]
	mov	r2, #0
	str	r2, [r3, #128]
.L16:
	nop
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC13
	.word	.LC11
	.word	msg
	.word	.LC12
	.word	msg2
	.size	my_usr2, .-my_usr2
	.section	.rodata
	.align	2
.LC14:
	.ascii	"[RUN]\011switched to user ctx\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	switch_fn, %function
switch_fn:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L20
	bl	puts
	mov	r0, #12
	bl	raise
	ldr	r0, .L20+4
	bl	setcontext
	nop
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC14
	.word	sc
	.size	switch_fn, .-switch_fn
	.section	.rodata
	.align	2
.LC15:
	.ascii	"mmap()\000"
	.align	2
.LC16:
	.ascii	"[OK]\011Initial sigaltstack state was SS_DISABLE\000"
	.align	2
.LC17:
	.ascii	"[FAIL]\011Initial sigaltstack state was %x; should "
	.ascii	"have been SS_DISABLE\012\000"
	.align	2
.LC18:
	.ascii	"[NOTE]\011The running kernel doesn't support SS_AUT"
	.ascii	"ODISARM\000"
	.align	2
.LC19:
	.ascii	"[FAIL]\011sigaltstack(SS_ONSTACK | SS_AUTODISARM)\000"
	.align	2
.LC20:
	.ascii	"[FAIL]\011ss_flags=%x, should be SS_AUTODISARM\012\000"
	.align	2
.LC21:
	.ascii	"[OK]\011sigaltstack is still SS_AUTODISARM after si"
	.ascii	"gnal\000"
	.align	2
.LC22:
	.ascii	"[OK]\011Test passed\000"
	.align	2
.LC23:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #168
	ldr	r3, .L37
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #148
	add	r3, r3, #4
	mov	r0, r3
	bl	sigemptyset
	ldr	r3, .L37+4
	str	r3, [fp, #-16]
	ldr	r3, .L37+8
	str	r3, [fp, #-148]
	sub	r3, fp, #148
	mov	r2, #0
	mov	r1, r3
	mov	r0, #10
	bl	sigaction
	ldr	r3, .L37+12
	str	r3, [fp, #-148]
	sub	r3, fp, #148
	mov	r2, #0
	mov	r1, r3
	mov	r0, #12
	bl	sigaction
	mov	r3, #0
	str	r3, [sp, #4]
	mvn	r3, #0
	str	r3, [sp]
	ldr	r3, .L37+16
	mov	r2, #3
	mov	r1, #8192
	mov	r0, #0
	bl	mmap
	mov	r3, r0
	ldr	r2, .L37+20
	str	r3, [r2]
	ldr	r3, .L37+20
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L23
	ldr	r0, .L37+24
	bl	perror
	mov	r3, #1
	b	.L34
.L23:
	sub	r3, fp, #160
	mov	r1, r3
	mov	r0, #0
	bl	sigaltstack
	str	r0, [fp, #-164]
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	beq	.L25
	ldr	r0, .L37+28
	bl	perror
	mov	r0, #1
	bl	exit
.L25:
	ldr	r3, [fp, #-156]
	cmp	r3, #2
	bne	.L26
	ldr	r0, .L37+32
	bl	puts
	ldr	r3, .L37+20
	ldr	r3, [r3]
	str	r3, [fp, #-160]
	mov	r3, #8192
	str	r3, [fp, #-152]
	mov	r3, #-2147483647
	str	r3, [fp, #-156]
	sub	r3, fp, #160
	mov	r1, #0
	mov	r0, r3
	bl	sigaltstack
	str	r0, [fp, #-164]
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	beq	.L28
	b	.L36
.L26:
	ldr	r3, [fp, #-156]
	mov	r1, r3
	ldr	r0, .L37+36
	bl	printf
	mov	r3, #1
	b	.L34
.L36:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #22
	bne	.L29
	ldr	r0, .L37+40
	bl	puts
	mov	r3, #0
	b	.L34
.L29:
	ldr	r0, .L37+44
	bl	perror
	mov	r3, #1
	b	.L34
.L28:
	mov	r3, #0
	str	r3, [sp, #4]
	mvn	r3, #0
	str	r3, [sp]
	ldr	r3, .L37+16
	mov	r2, #3
	mov	r1, #8192
	mov	r0, #0
	bl	mmap
	mov	r3, r0
	ldr	r2, .L37+48
	str	r3, [r2]
	ldr	r3, .L37+48
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L30
	ldr	r0, .L37+24
	bl	perror
	mov	r3, #1
	b	.L34
.L30:
	ldr	r0, .L37+52
	bl	getcontext
	ldr	r3, .L37+52
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L37+48
	ldr	r3, [r3]
	ldr	r2, .L37+52
	str	r3, [r2, #8]
	ldr	r3, .L37+52
	mov	r2, #8192
	str	r2, [r3, #16]
	mov	r2, #0
	ldr	r1, .L37+56
	ldr	r0, .L37+52
	bl	makecontext
	mov	r0, #10
	bl	raise
	sub	r3, fp, #160
	mov	r1, r3
	mov	r0, #0
	bl	sigaltstack
	str	r0, [fp, #-164]
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	beq	.L32
	ldr	r0, .L37+28
	bl	perror
	mov	r0, #1
	bl	exit
.L32:
	ldr	r3, [fp, #-156]
	cmp	r3, #-2147483648
	beq	.L33
	ldr	r3, [fp, #-156]
	mov	r1, r3
	ldr	r0, .L37+60
	bl	printf
	mov	r0, #1
	bl	exit
.L33:
	ldr	r0, .L37+64
	bl	puts
	ldr	r0, .L37+68
	bl	puts
	mov	r3, #0
.L34:
	ldr	r2, .L37
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L35
	bl	__stack_chk_fail
.L35:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L38:
	.align	2
.L37:
	.word	.LC23
	.word	134217732
	.word	my_usr1
	.word	my_usr2
	.word	131106
	.word	sstack
	.word	.LC15
	.word	.LC6
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	ustack
	.word	uc
	.word	switch_fn
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.6069, %object
	.size	__PRETTY_FUNCTION__.6069, 8
__PRETTY_FUNCTION__.6069:
	.ascii	"my_usr1\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
