	.file	"127559.c"
	.intel_syntax noprefix
	.text
	.local	errors
	.comm	errors,4,4
	.section	.rodata
.LC0:
	.string	":three"
.LC1:
	.string	",user%03d"
	.text
	.type	write_users, @function
write_users:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jne	.L2
	cmp	DWORD PTR -28[rbp], 3
	jne	.L3
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 6
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
.L3:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L4
.L5:
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -4[rbp], 1
.L4:
	cmp	DWORD PTR -4[rbp], 499
	jle	.L5
.L2:
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	write_users, .-write_users
	.section	.rodata
.LC2:
	.string	"w"
.LC3:
	.string	"one:x:1:one"
.LC4:
	.string	"two:x:2:two"
.LC5:
	.string	"three:x:3"
	.text
	.type	write_group, @function
write_group:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rax
	mov	edx, 11
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	ecx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 1
	mov	esi, ecx
	mov	rdi, rax
	call	write_users
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rax
	mov	edx, 11
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	ecx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 2
	mov	esi, ecx
	mov	rdi, rax
	call	write_users
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rax
	mov	edx, 9
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	mov	ecx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 3
	mov	esi, ecx
	mov	rdi, rax
	call	write_users
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	write_group, .-write_group
	.section	.rodata
.LC6:
	.string	"Error: Entry is empty"
.LC7:
	.string	"Ok: %s: %d\n"
	.align 8
.LC8:
	.string	"Error: %s: %d should be: %s: %d\n"
	.text
	.type	test_entry, @function
test_entry:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	QWORD PTR -24[rbp], rdx
	cmp	QWORD PTR -24[rbp], 0
	jne	.L8
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, DWORD PTR errors[rip]
	add	eax, 1
	mov	DWORD PTR errors[rip], eax
	jmp	.L7
.L8:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 16[rax]
	cmp	DWORD PTR -12[rbp], eax
	jne	.L10
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L10
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L7
.L10:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, DWORD PTR -12[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	mov	r8d, esi
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR errors[rip]
	add	eax, 1
	mov	DWORD PTR errors[rip], eax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	test_entry, .-test_entry
	.section	.rodata
.LC9:
	.string	"r"
.LC10:
	.string	"one"
.LC11:
	.string	"two"
.LC12:
	.string	"three"
	.text
	.type	test_fgetgrent, @function
test_fgetgrent:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fgetgrent@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	mov	esi, 1
	lea	rdi, .LC10[rip]
	call	test_entry
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fgetgrent@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	mov	esi, 2
	lea	rdi, .LC11[rip]
	call	test_entry
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fgetgrent@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	mov	esi, 3
	lea	rdi, .LC12[rip]
	call	test_entry
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	test_fgetgrent, .-test_fgetgrent
	.section	.rodata
.LC13:
	.string	"mkstemp failed: %m\n"
.LC14:
	.string	"Large group is group: %d\n"
.LC15:
	.string	"Not using a large group"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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
	movabs	rax, 8391178277819872303
	movabs	rdx, 7310018894790878815
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	movabs	rax, 6365935209748001902
	mov	QWORD PTR -32[rbp], rax
	mov	WORD PTR -24[rbp], 88
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	mkstemp@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], -1
	jne	.L13
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L19
.L13:
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -56[rbp], 0
	cmp	DWORD PTR -68[rbp], 1
	jle	.L15
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -56[rbp], eax
.L15:
	cmp	DWORD PTR -56[rbp], 3
	jle	.L16
	mov	DWORD PTR -56[rbp], 3
.L16:
	cmp	DWORD PTR -56[rbp], 0
	je	.L17
	mov	eax, DWORD PTR -56[rbp]
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L18
.L17:
	lea	rdi, .LC15[rip]
	call	puts@PLT
.L18:
	mov	edx, DWORD PTR -56[rbp]
	lea	rax, -48[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	write_group
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	test_fgetgrent
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	remove@PLT
	mov	eax, DWORD PTR errors[rip]
	test	eax, eax
	setne	al
	movzx	eax, al
.L19:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"127559.c"
	.text
	.local	errors
	.comm	errors,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	":three\000"
	.align	2
.LC1:
	.ascii	",user%03d\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_users, %function
write_users:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bne	.L2
	ldr	r3, [fp, #-20]
	cmp	r3, #3
	bne	.L3
	ldr	r3, [fp, #-16]
	mov	r2, #6
	mov	r1, #1
	ldr	r0, .L6
	bl	fwrite
.L3:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L4
.L5:
	ldr	r2, [fp, #-8]
	ldr	r1, .L6+4
	ldr	r0, [fp, #-16]
	bl	fprintf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L4:
	ldr	r3, [fp, #-8]
	cmp	r3, #500
	blt	.L5
.L2:
	ldr	r1, [fp, #-16]
	mov	r0, #10
	bl	fputc
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	.LC1
	.size	write_users, .-write_users
	.section	.rodata
	.align	2
.LC2:
	.ascii	"w\000"
	.align	2
.LC3:
	.ascii	"one:x:1:one\000"
	.align	2
.LC4:
	.ascii	"two:x:2:two\000"
	.align	2
.LC5:
	.ascii	"three:x:3\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_group, %function
write_group:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r1, .L9
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #11
	mov	r1, #1
	ldr	r0, .L9+4
	bl	fwrite
	mov	r2, #1
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-8]
	bl	write_users
	ldr	r3, [fp, #-8]
	mov	r2, #11
	mov	r1, #1
	ldr	r0, .L9+8
	bl	fwrite
	mov	r2, #2
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-8]
	bl	write_users
	ldr	r3, [fp, #-8]
	mov	r2, #9
	mov	r1, #1
	ldr	r0, .L9+12
	bl	fwrite
	mov	r2, #3
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-8]
	bl	write_users
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	write_group, .-write_group
	.section	.rodata
	.align	2
.LC6:
	.ascii	"Error: Entry is empty\000"
	.align	2
.LC7:
	.ascii	"Ok: %s: %d\012\000"
	.align	2
.LC8:
	.ascii	"Error: %s: %d should be: %s: %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_entry, %function
test_entry:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L12
	ldr	r0, .L15
	bl	puts
	ldr	r3, .L15+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L15+4
	str	r3, [r2]
	b	.L11
.L12:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bne	.L14
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L14
	ldr	r3, [fp, #-16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r2, r3
	ldr	r0, .L15+8
	bl	printf
	b	.L11
.L14:
	ldr	r3, [fp, #-16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	ldr	r3, [fp, #-8]
	ldr	r0, .L15+12
	bl	printf
	ldr	r3, .L15+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L15+4
	str	r3, [r2]
.L11:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC6
	.word	errors
	.word	.LC7
	.word	.LC8
	.size	test_entry, .-test_entry
	.section	.rodata
	.align	2
.LC9:
	.ascii	"r\000"
	.align	2
.LC10:
	.ascii	"one\000"
	.align	2
.LC11:
	.ascii	"two\000"
	.align	2
.LC12:
	.ascii	"three\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_fgetgrent, %function
test_fgetgrent:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r1, .L18
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-12]
	bl	fgetgrent
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	mov	r1, #1
	ldr	r0, .L18+4
	bl	test_entry
	ldr	r0, [fp, #-12]
	bl	fgetgrent
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	mov	r1, #2
	ldr	r0, .L18+8
	bl	test_entry
	ldr	r0, [fp, #-12]
	bl	fgetgrent
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	mov	r1, #3
	ldr	r0, .L18+12
	bl	test_entry
	ldr	r0, [fp, #-12]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	test_fgetgrent, .-test_fgetgrent
	.section	.rodata
	.align	2
.LC14:
	.ascii	"mkstemp failed: %m\012\000"
	.align	2
.LC15:
	.ascii	"Large group is group: %d\012\000"
	.align	2
.LC16:
	.ascii	"Not using a large group\000"
	.align	2
.LC13:
	.ascii	"/tmp/tst_fgetgrent.XXXXXX\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L29+4
	sub	ip, fp, #36
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stmia	ip!, {r0, r1}
	strh	r2, [ip]	@ movhi
	sub	r3, fp, #36
	mov	r0, r3
	bl	mkstemp
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmn	r3, #1
	bne	.L21
	ldr	r0, .L29+8
	bl	printf
	mov	r3, #1
	b	.L27
.L21:
	ldr	r0, [fp, #-40]
	bl	close
	mov	r3, #0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-48]
	cmp	r3, #1
	ble	.L23
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-44]
.L23:
	ldr	r3, [fp, #-44]
	cmp	r3, #3
	ble	.L24
	mov	r3, #3
	str	r3, [fp, #-44]
.L24:
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L25
	ldr	r1, [fp, #-44]
	ldr	r0, .L29+12
	bl	printf
	b	.L26
.L25:
	ldr	r0, .L29+16
	bl	puts
.L26:
	sub	r3, fp, #36
	ldr	r1, [fp, #-44]
	mov	r0, r3
	bl	write_group
	sub	r3, fp, #36
	mov	r0, r3
	bl	test_fgetgrent
	sub	r3, fp, #36
	mov	r0, r3
	bl	remove
	ldr	r3, .L29+20
	ldr	r3, [r3]
	cmp	r3, #0
	movne	r3, #1
	moveq	r3, #0
	and	r3, r3, #255
.L27:
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L28
	bl	__stack_chk_fail
.L28:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC17
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	errors
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
