	.file	"31733.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%s \n"
	.text
	.globl	handle_failure
	.type	handle_failure, @function
handle_failure:
.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	handle_failure, .-handle_failure
	.section	.rodata
.LC1:
	.string	"nobody"
.LC2:
	.string	"TEST FAILED (getpwuid FAILED)"
.LC3:
	.string	"username = %s uid = %ld \n"
.LC4:
	.string	"TEST FAILED (USER NOT FOUND)"
.LC5:
	.string	"TEST FAILED (setuid failed)"
.LC6:
	.string	"new username = %s uid = %ld\n"
	.align 8
.LC7:
	.string	"TEST PASSED (check application exits successfully)"
	.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, 32
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	lea	rax, .LC1[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	QWORD PTR -8[rbp], 0
	call	getuid@PLT
	mov	edi, eax
	call	getpwuid@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L4
	lea	rdi, .LC2[rip]
	call	handle_failure
	jmp	.L5
.L4:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	getpwnam@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L6
	lea	rdi, .LC4[rip]
	call	handle_failure
	jmp	.L5
.L6:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	setuid@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	je	.L7
	lea	rdi, .LC5[rip]
	call	handle_failure
	jmp	.L5
.L7:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, 0
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"31733.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s \012\000"
	.text
	.align	2
	.global	handle_failure
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_failure, %function
handle_failure:
	@ 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	r1, [fp, #-8]
	ldr	r0, .L3
	bl	printf
	mov	r3, #1
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.size	handle_failure, .-handle_failure
	.section	.rodata
	.align	2
.LC1:
	.ascii	"nobody\000"
	.align	2
.LC2:
	.ascii	"TEST FAILED (getpwuid FAILED)\000"
	.align	2
.LC3:
	.ascii	"username = %s uid = %ld \012\000"
	.align	2
.LC4:
	.ascii	"TEST FAILED (USER NOT FOUND)\000"
	.align	2
.LC5:
	.ascii	"TEST FAILED (setuid failed)\000"
	.align	2
.LC6:
	.ascii	"new username = %s uid = %ld\012\000"
	.align	2
.LC7:
	.ascii	"TEST PASSED (check application exits successfully)\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, .L10
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	bl	getuid
	mov	r3, r0
	mov	r0, r3
	bl	getpwuid
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L6
	ldr	r0, .L10+4
	bl	handle_failure
	mov	r3, r0
	b	.L7
.L6:
	ldr	r3, [fp, #-8]
	ldr	r1, [r3, #16]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r2, r3
	ldr	r0, .L10+8
	bl	printf
	ldr	r0, [fp, #-12]
	bl	getpwnam
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L8
	ldr	r0, .L10+12
	bl	handle_failure
	mov	r3, r0
	b	.L7
.L8:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	setuid
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L9
	ldr	r0, .L10+16
	bl	handle_failure
	mov	r3, r0
	b	.L7
.L9:
	ldr	r3, [fp, #-8]
	ldr	r1, [r3, #16]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r2, r3
	ldr	r0, .L10+20
	bl	printf
	ldr	r0, .L10+24
	bl	puts
	mov	r3, #0
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
