	.file	"104556.c"
	.intel_syntax noprefix
	.text
	.data
	.align 8
	.type	id, @object
	.size	id, 9
id:
	.string	"@(#)$Id$"
	.section	.rodata
	.align 8
.LC0:
	.string	"%s (should be %d/%d): r/egid=%d/%d\n"
	.text
	.type	printgids, @function
printgids:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	call	getegid@PLT
	mov	ebx, eax
	call	getgid@PLT
	mov	esi, eax
	mov	ecx, DWORD PTR -32[rbp]
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r9d, ebx
	mov	r8d, esi
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	printgids, .-printgids
	.section	.rodata
.LC1:
	.string	"initial gids"
	.align 8
.LC2:
	.string	"SETUP ERROR: re-run set-group-ID guest"
.LC3:
	.string	"Use chgrp(1) and chmod(1)"
.LC4:
	.string	"For example, do this as root "
	.align 8
.LC5:
	.string	"(nobody is the name of a group in this example):"
.LC6:
	.string	"# chgrp nobody %s\n"
.LC7:
	.string	"# chmod g+s nobody %s\n"
.LC8:
	.string	"failure"
.LC9:
	.string	"ok"
.LC10:
	.string	"setgid(%d)=%d %s\n"
.LC11:
	.string	"after setgid()"
.LC12:
	.string	"MAYDAY!  Wrong effective gid"
.LC13:
	.string	"MAYDAY!  Wrong real gid"
	.align 8
.LC14:
	.string	"MAYDAY!  setgid(%d) succeeded (should have failed)\n"
	.align 8
.LC15:
	.string	"setgid(%d) failed (this is correct)\n"
.LC16:
	.string	"after setgid() to egid"
.LC17:
	.string	"setgid"
	.align 8
.LC18:
	.string	"\nThis system cannot use %s to give up set-group-ID rights\n"
	.align 8
.LC19:
	.string	"Maybe compile with -DHASSETEGID and try again"
	.align 8
.LC20:
	.string	"Maybe compile with -DHASSETREGID and try again"
	.align 8
.LC21:
	.string	"Maybe compile with -DHASSETRESGID and try again"
	.align 8
.LC22:
	.string	"\nIt is possible to use %s on this system\n"
	.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -24[rbp], 0
	call	getgid@PLT
	mov	DWORD PTR -20[rbp], eax
	call	getegid@PLT
	mov	DWORD PTR -16[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printgids
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jne	.L3
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	setgid@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L4
	lea	rax, .LC8[rip]
	jmp	.L5
.L4:
	lea	rax, .LC9[rip]
.L5:
	mov	esi, DWORD PTR -20[rbp]
	mov	edx, DWORD PTR -12[rbp]
	mov	rcx, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printgids
	call	getegid@PLT
	cmp	DWORD PTR -20[rbp], eax
	je	.L6
	add	DWORD PTR -24[rbp], 1
	lea	rdi, .LC12[rip]
	call	puts@PLT
.L6:
	call	getgid@PLT
	cmp	DWORD PTR -20[rbp], eax
	je	.L7
	add	DWORD PTR -24[rbp], 1
	lea	rdi, .LC13[rip]
	call	puts@PLT
.L7:
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	setgid@PLT
	test	eax, eax
	jne	.L8
	add	DWORD PTR -24[rbp], 1
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L8:
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
.L9:
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printgids
	call	getegid@PLT
	cmp	DWORD PTR -20[rbp], eax
	je	.L10
	add	DWORD PTR -24[rbp], 1
	lea	rdi, .LC12[rip]
	call	puts@PLT
.L10:
	call	getgid@PLT
	cmp	DWORD PTR -20[rbp], eax
	je	.L11
	add	DWORD PTR -24[rbp], 1
	lea	rdi, .LC13[rip]
	call	puts@PLT
.L11:
	mov	edi, 10
	call	putchar@PLT
	cmp	DWORD PTR -24[rbp], 0
	jle	.L12
	lea	rsi, .LC17[rip]
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC19[rip]
	call	puts@PLT
	lea	rdi, .LC20[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	lea	rsi, .LC17[rip]
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.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	"104556.c"
	.text
	.data
	.align	2
	.type	id, %object
	.size	id, 9
id:
	.ascii	"@(#)$Id$\000"
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s (should be %d/%d): r/egid=%d/%d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	printgids, %function
printgids:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r4, [fp, #-28]
	ldr	r5, [fp, #-32]
	bl	getgid
	mov	r3, r0
	mov	r6, r3
	bl	getegid
	mov	r3, r0
	str	r3, [sp, #4]
	str	r6, [sp]
	mov	r3, r5
	mov	r2, r4
	ldr	r1, [fp, #-24]
	ldr	r0, .L2
	bl	printf
	nop
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	printgids, .-printgids
	.section	.rodata
	.align	2
.LC1:
	.ascii	"initial gids\000"
	.align	2
.LC2:
	.ascii	"SETUP ERROR: re-run set-group-ID guest\000"
	.align	2
.LC3:
	.ascii	"Use chgrp(1) and chmod(1)\000"
	.align	2
.LC4:
	.ascii	"For example, do this as root \000"
	.align	2
.LC5:
	.ascii	"(nobody is the name of a group in this example):\000"
	.align	2
.LC6:
	.ascii	"# chgrp nobody %s\012\000"
	.align	2
.LC7:
	.ascii	"# chmod g+s nobody %s\012\000"
	.align	2
.LC8:
	.ascii	"failure\000"
	.align	2
.LC9:
	.ascii	"ok\000"
	.align	2
.LC10:
	.ascii	"setgid(%d)=%d %s\012\000"
	.align	2
.LC11:
	.ascii	"after setgid()\000"
	.align	2
.LC12:
	.ascii	"MAYDAY!  Wrong effective gid\000"
	.align	2
.LC13:
	.ascii	"MAYDAY!  Wrong real gid\000"
	.align	2
.LC14:
	.ascii	"MAYDAY!  setgid(%d) succeeded (should have failed)\012"
	.ascii	"\000"
	.align	2
.LC15:
	.ascii	"setgid(%d) failed (this is correct)\012\000"
	.align	2
.LC16:
	.ascii	"after setgid() to egid\000"
	.align	2
.LC17:
	.ascii	"setgid\000"
	.align	2
.LC18:
	.ascii	"\012This system cannot use %s to give up set-group-"
	.ascii	"ID rights\012\000"
	.align	2
.LC19:
	.ascii	"Maybe compile with -DHASSETEGID and try again\000"
	.align	2
.LC20:
	.ascii	"Maybe compile with -DHASSETREGID and try again\000"
	.align	2
.LC21:
	.ascii	"Maybe compile with -DHASSETRESGID and try again\000"
	.align	2
.LC22:
	.ascii	"\012It is possible to use %s on this system\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-24]
	bl	getgid
	str	r0, [fp, #-20]
	bl	getegid
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-20]
	ldr	r0, .L15
	bl	printgids
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bne	.L5
	ldr	r0, .L15+4
	bl	puts
	ldr	r0, .L15+8
	bl	puts
	ldr	r0, .L15+12
	bl	printf
	ldr	r0, .L15+16
	bl	puts
	ldr	r1, [fp, #-12]
	ldr	r0, .L15+20
	bl	printf
	ldr	r1, [fp, #-12]
	ldr	r0, .L15+24
	bl	printf
	mov	r0, #1
	bl	exit
.L5:
	ldr	r0, [fp, #-20]
	bl	setgid
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L6
	ldr	r3, .L15+28
	b	.L7
.L6:
	ldr	r3, .L15+32
.L7:
	ldr	r2, [fp, #-8]
	ldr	r0, .L15+36
	bl	printf
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, .L15+40
	bl	printgids
	bl	getegid
	mov	r2, r0
	ldr	r3, [fp, #-20]
	cmp	r3, r2
	beq	.L8
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r0, .L15+44
	bl	puts
.L8:
	bl	getgid
	mov	r2, r0
	ldr	r3, [fp, #-20]
	cmp	r3, r2
	beq	.L9
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r0, .L15+48
	bl	puts
.L9:
	ldr	r0, [fp, #-16]
	bl	setgid
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r1, [fp, #-16]
	ldr	r0, .L15+52
	bl	printf
	b	.L11
.L10:
	ldr	r1, [fp, #-16]
	ldr	r0, .L15+56
	bl	printf
.L11:
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, .L15+60
	bl	printgids
	bl	getegid
	mov	r2, r0
	ldr	r3, [fp, #-20]
	cmp	r3, r2
	beq	.L12
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r0, .L15+44
	bl	puts
.L12:
	bl	getgid
	mov	r2, r0
	ldr	r3, [fp, #-20]
	cmp	r3, r2
	beq	.L13
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r0, .L15+48
	bl	puts
.L13:
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	ble	.L14
	ldr	r1, .L15+64
	ldr	r0, .L15+68
	bl	printf
	ldr	r0, .L15+72
	bl	puts
	ldr	r0, .L15+76
	bl	puts
	ldr	r0, .L15+80
	bl	puts
	mov	r0, #1
	bl	exit
.L14:
	ldr	r1, .L15+64
	ldr	r0, .L15+84
	bl	printf
	mov	r0, #0
	bl	exit
.L16:
	.align	2
.L15:
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
