#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 nodes_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
struct nodes_t *range_expand(char *);
int /*<<< orphan*/ range_startup();
int main(int argc, char **argv) {
  struct nodes_t *result;
  long int i;
  char *compressed;
  if (argc < 2) {
    printf("argc is %d, needs args\n", argc);
    exit(1);
  }
  range_startup();
  printf("hello world\n");
  while (1) {
    result = range_expand(argv[1]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    117b <main+0x3b>
mov    -0x8(%rbp),%esi
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    $0x0,%al
call   1040 <range_startup@plt>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <range_expand@plt>
mov    %rax,-0x18(%rbp)
jmp    1190 <main+0x50>

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x1,%edi
jle    117b <main+0x2b>
mov    %rsi,%rbx
xor    %eax,%eax
call   1050 <range_startup@plt>
lea    0xeb1(%rip),%rdi
call   1040 <puts@plt>
nopl   0x0(%rax)
mov    0x8(%rbx),%rdi
call   1030 <range_expand@plt>
jmp    1170 <main+0x20>
mov    %edi,%esi
lea    0xe7c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
%struct.nodes_t = type { i32 }
@.str = [24 x i8] c"argc is %d, needs args\0A\00"
@.str.1 = [13 x i8] c"hello world\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.nodes_t*
%7 = alloca i64
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 2
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* %4
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %2
%16 = call i32 (...) @range_startup()
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %15, %18
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call %struct.nodes_t* @range_expand(i8* %21)
store %struct.nodes_t* %22, %struct.nodes_t** %6
br label %18
}

LLVM IR (-O2):
%struct.nodes_t = type { i32 }
@.str = [24 x i8] c"argc is %d, needs args\0A\00"
@str = [12 x i8] c"hello world\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
%8 = tail call i32 (...) @range_startup()
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%10 = getelementptr inbounds i8*, i8** %1, i64 1
br label %11
11: ; preds = %11, %7
%12 = load i8*, i8** %10
%13 = tail call %struct.nodes_t* @range_expand(i8* %12)
br label %11
}