#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 */
struct Sinlist {
  int dummy;
};

/* Variables and functions */
struct Sinlist *bubble_Sinlist(struct Sinlist *);
int /*<<< orphan*/ help();
int /*<<< orphan*/ outputtofile(struct Sinlist *, char *);
struct Sinlist *readfile_Sinlist(char *);
int main(int argc, char *argv[]) {
  if (argc == 4) {
    struct Sinlist *Sinlist = readfile_Sinlist(argv[1]);
    Sinlist = bubble_Sinlist(Sinlist);
    outputtofile(Sinlist, argv[3]);
  } else {
    help();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
jne    1194 <main+0x54>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <readfile_Sinlist@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <bubble_Sinlist@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
call   1040 <outputtofile@plt>
jmp    119b <main+0x5b>
mov    $0x0,%al
call   1060 <help@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x4,%edi
jne    1168 <main+0x28>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1030 <readfile_Sinlist@plt>
mov    %rax,%rdi
call   1050 <bubble_Sinlist@plt>
mov    0x18(%rbx),%rsi
mov    %rax,%rdi
call   1040 <outputtofile@plt>
jmp    116f <main+0x2f>
xor    %eax,%eax
call   1060 <help@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.Sinlist = type { i32 }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.Sinlist*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 4
br i1 %8, label %9, label %21
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call %struct.Sinlist* @readfile_Sinlist(i8* %12)
store %struct.Sinlist* %13, %struct.Sinlist** %6
%14 = load %struct.Sinlist*, %struct.Sinlist** %6
%15 = call %struct.Sinlist* @bubble_Sinlist(%struct.Sinlist* %14)
store %struct.Sinlist* %15, %struct.Sinlist** %6
%16 = load %struct.Sinlist*, %struct.Sinlist** %6
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 3
%19 = load i8*, i8** %18
%20 = call i32 @outputtofile(%struct.Sinlist* %16, i8* %19)
br label %23
21: ; preds = %2
%22 = call i32 (...) @help()
br label %23
23: ; preds = %21, %9
ret i32 0
}

LLVM IR (-O2):
%struct.Sinlist = type { i32 }
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 4
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call %struct.Sinlist* @readfile_Sinlist(i8* %6)
%8 = tail call %struct.Sinlist* @bubble_Sinlist(%struct.Sinlist* %7)
%9 = getelementptr inbounds i8*, i8** %1, i64 3
%10 = load i8*, i8** %9
%11 = tail call i32 @outputtofile(%struct.Sinlist* %8, i8* %10)
br label %14
12: ; preds = %2
%13 = tail call i32 (...) @help()
br label %14
14: ; preds = %12, %4
ret i32 0
}