#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long, int /*<<< orphan*/);
int /*<<< orphan*/ swap(unsigned long);
int main() {
  long unsigned int num;
  num = 5170984;
  printf("%lu      %lu\n", num, swap(num));
  num = 406567;
  printf("%lu       %lu\n", num, swap(num));
  num = 368750;
  printf("%lu       %lu\n", num, swap(num));
  num = 2369510;
  printf("%lu      %lu\n", num, swap(num));
  num = 2183293;
  printf("%lu      %lu\n", num, swap(num));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x4ee728,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <swap@plt>
mov    -0x38(%rbp),%rsi
mov    %eax,%edx
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
movq   $0x63427,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <swap@plt>
mov    -0x30(%rbp),%rsi
mov    %eax,%edx
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
movq   $0x5a06e,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <swap@plt>
mov    -0x28(%rbp),%rsi
mov    %eax,%edx
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
movq   $0x2427e6,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <swap@plt>
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
lea    0xe2a(%rip),%rdi
call   1030 <printf@plt>
movq   $0x21507d,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <swap@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
lea    0xdff(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x4ee728,%edi
call   1040 <swap@plt>
lea    0xecb(%rip),%r14
mov    $0x4ee728,%esi
mov    %r14,%rdi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x63427,%edi
call   1040 <swap@plt>
lea    0xeb9(%rip),%rbx
mov    $0x63427,%esi
mov    %rbx,%rdi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x5a06e,%edi
call   1040 <swap@plt>
mov    $0x5a06e,%esi
mov    %rbx,%rdi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x2427e6,%edi
call   1040 <swap@plt>
mov    $0x2427e6,%esi
mov    %r14,%rdi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x21507d,%edi
call   1040 <swap@plt>
mov    $0x21507d,%esi
mov    %r14,%rdi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%lu %lu\0A\00"
@.str.1 = [15 x i8] c"%lu %lu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 5170984, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = call i32 @swap(i64 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 %3, i32 %5)
store i64 406567, i64* %2
%7 = load i64, i64* %2
%8 = load i64, i64* %2
%9 = call i32 @swap(i64 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i64 %7, i32 %9)
store i64 368750, i64* %2
%11 = load i64, i64* %2
%12 = load i64, i64* %2
%13 = call i32 @swap(i64 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i64 %11, i32 %13)
store i64 2369510, i64* %2
%15 = load i64, i64* %2
%16 = load i64, i64* %2
%17 = call i32 @swap(i64 %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 %15, i32 %17)
store i64 2183293, i64* %2
%19 = load i64, i64* %2
%20 = load i64, i64* %2
%21 = call i32 @swap(i64 %20)
%22 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 %19, i32 %21)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"%lu %lu\0A\00"
@.str.1 = [15 x i8] c"%lu %lu\0A\00"
define i32 @main() {
%1 = tail call i32 @swap(i64 5170984)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 5170984, i32 %1)
%3 = tail call i32 @swap(i64 406567)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i64 406567, i32 %3)
%5 = tail call i32 @swap(i64 368750)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i64 368750, i32 %5)
%7 = tail call i32 @swap(i64 2369510)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 2369510, i32 %7)
%9 = tail call i32 @swap(i64 2183293)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 2183293, i32 %9)
ret i32 0
}