	.file	"28621.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"-h"
.LC1:
	.string	"--help"
	.align 8
.LC2:
	.string	"Atomically exchange two files.\n\nUsage:\n        %s FILE1 FILE2\n        %s [-h | --help]\n"
.LC3:
	.string	"%s\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	cmp	DWORD PTR -36[rbp], 1
	sete	al
	mov	BYTE PTR -21[rbp], al
	cmp	DWORD PTR -36[rbp], 1
	jle	.L2
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L3
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L4
.L3:
	mov	eax, 1
	jmp	.L5
.L4:
	mov	eax, 0
.L5:
	mov	BYTE PTR -21[rbp], al
	and	BYTE PTR -21[rbp], 1
.L2:
	cmp	DWORD PTR -36[rbp], 3
	jne	.L6
	cmp	BYTE PTR -21[rbp], 0
	je	.L7
.L6:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	movzx	eax, BYTE PTR -21[rbp]
	xor	eax, 1
	movzx	eax, al
	jmp	.L8
.L7:
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	r8d, 2
	mov	rcx, rdx
	mov	edx, -100
	mov	rsi, rax
	mov	edi, -100
	call	renameat2@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jns	.L9
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L8
.L9:
	mov	eax, 0
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"28621.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"-h\000"
	.align	2
.LC1:
	.ascii	"--help\000"
	.align	2
.LC2:
	.ascii	"Atomically exchange two files.\012\012Usage:\012   "
	.ascii	"     %s FILE1 FILE2\012        %s [-h | --help]\012"
	.ascii	"\000"
	.align	2
.LC3:
	.ascii	"%s\012\000"
	.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	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, [fp, #-32]
	cmp	r3, #1
	moveq	r3, #1
	movne	r3, #0
	strb	r3, [fp, #-25]
	ldr	r3, [fp, #-32]
	cmp	r3, #1
	ble	.L2
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L10
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L3
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L10+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L4
.L3:
	mov	r3, #1
	b	.L5
.L4:
	mov	r3, #0
.L5:
	strb	r3, [fp, #-25]
	ldrb	r3, [fp, #-25]
	and	r3, r3, #1
	strb	r3, [fp, #-25]
.L2:
	ldr	r3, [fp, #-32]
	cmp	r3, #3
	bne	.L6
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L7
.L6:
	ldr	r3, [fp, #-36]
	ldr	r1, [r3]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r0, .L10+8
	bl	printf
	ldrb	r3, [fp, #-25]
	eor	r3, r3, #1
	and	r3, r3, #255
	b	.L8
.L7:
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-20]
	mov	r3, #2
	str	r3, [sp]
	ldr	r3, [fp, #-20]
	mvn	r2, #99
	ldr	r1, [fp, #-24]
	mvn	r0, #99
	bl	renameat2
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L9
	ldr	r3, .L10+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L10+16
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L8
.L9:
	mov	r3, #0
.L8:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	stderr
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
