	.file	"646218.c"
	.intel_syntax noprefix
	.text
	.globl	callbyref
	.type	callbyref, @function
callbyref:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR [rax], edx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	callbyref, .-callbyref
	.section	.rodata
.LC0:
	.string	"\nAfter Swapping:\n%d\n%d\n"
	.text
	.globl	callbyval
	.type	callbyval, @function
callbyval:
.LFB1:
	.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 -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -24[rbp], eax
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	callbyval, .-callbyval
	.section	.rodata
	.align 8
.LC1:
	.string	"How do you want to perform the swap:\n1.Call by Reference\n2.Call by Value"
.LC2:
	.string	"%d"
.LC3:
	.string	"\nEnter the numbers:"
.LC4:
	.string	"%d\n%d"
.LC5:
	.string	"\nBefore Swapping:\n%d\n%d\n"
.LC6:
	.string	"\nDo you want to continue: "
.LC7:
	.string	"%c"
.LC8:
	.string	"\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L7:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 1
	je	.L4
	cmp	eax, 2
	je	.L5
	jmp	.L6
.L4:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdx, -16[rbp]
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -16[rbp]
	lea	rax, -20[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	callbyref
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L6
.L5:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdx, -16[rbp]
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	call	callbyval
	nop
.L6:
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	call	getchar@PLT
	mov	BYTE PTR -21[rbp], al
	lea	rax, -21[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	movzx	eax, BYTE PTR -21[rbp]
	cmp	al, 121
	je	.L7
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"646218.c"
	.text
	.align	2
	.global	callbyref
	.syntax unified
	.arm
	.fpu softvfp
	.type	callbyref, %function
callbyref:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	callbyref, .-callbyref
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012After Swapping:\012%d\012%d\012\000"
	.text
	.align	2
	.global	callbyval
	.syntax unified
	.arm
	.fpu softvfp
	.type	callbyval, %function
callbyval:
	@ 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	r3, [fp, #-16]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-16]
	ldr	r0, .L3
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.size	callbyval, .-callbyval
	.section	.rodata
	.align	2
.LC1:
	.ascii	"How do you want to perform the swap:\0121.Call by R"
	.ascii	"eference\0122.Call by Value\000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"\012Enter the numbers:\000"
	.align	2
.LC4:
	.ascii	"%d\012%d\000"
	.align	2
.LC5:
	.ascii	"\012Before Swapping:\012%d\012%d\012\000"
	.align	2
.LC6:
	.ascii	"\012Do you want to continue: \000"
	.align	2
.LC7:
	.ascii	"%c\000"
	.align	2
.LC8:
	.ascii	"\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L9:
	ldr	r0, .L12+4
	bl	puts
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L12+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	beq	.L6
	cmp	r3, #2
	beq	.L7
	b	.L8
.L6:
	ldr	r0, .L12+12
	bl	puts
	sub	r2, fp, #16
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L12+16
	bl	__isoc99_scanf
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L12+20
	bl	printf
	sub	r2, fp, #16
	sub	r3, fp, #20
	mov	r1, r2
	mov	r0, r3
	bl	callbyref
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L12+24
	bl	printf
	b	.L8
.L7:
	ldr	r0, .L12+12
	bl	puts
	sub	r2, fp, #16
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L12+16
	bl	__isoc99_scanf
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L12+20
	bl	printf
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	mov	r1, r2
	mov	r0, r3
	bl	callbyval
	nop
.L8:
	ldr	r0, .L12+28
	bl	printf
	bl	getchar
	mov	r3, r0
	and	r3, r3, #255
	strb	r3, [fp, #-21]
	sub	r3, fp, #21
	mov	r1, r3
	ldr	r0, .L12+32
	bl	__isoc99_scanf
	ldr	r0, .L12+36
	bl	puts
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r3, #121
	beq	.L9
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC9
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC0
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
