xunge/DecIR huggingface dataset:
/* Variables and functions */
char getchar();
int /*<<< orphan*/ isalpha(char);
int /*<<< orphan*/ printf(char *);
char tolower(char);
int play_again(void) {
  char input;
  printf("\nDo you wish to play again? (y/n) ");
  while (!isalpha(input = getchar()))
    ;
  if (tolower(input) != 'n')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<play_again>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl %al,%edi
call   1060 <isalpha@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    117b <play_again+0x3b>
jmp    1180 <play_again+0x40>
jmp    1154 <play_again+0x14>
movsbl -0x5(%rbp),%edi
call   1050 <tolower@plt>
movsbl %al,%eax
cmp    $0x6e,%eax
je     11a1 <play_again+0x61>
movl   $0x1,-0x4(%rbp)
jmp    11a8 <play_again+0x68>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<play_again>:
push   %rbx
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
nopl   (%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
movsbl %al,%ebx
mov    %ebx,%edi
call   1060 <isalpha@plt>
test   %eax,%eax
je     1150 <play_again+0x10>
mov    %ebx,%edi
call   1050 <tolower@plt>
xor    %ecx,%ecx
cmp    $0x6e,%al
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"\0ADo you wish to play again? (y/n) \00"
define i32 @play_again() {
%1 = alloca i32
%2 = alloca i8
%3 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %9, %0
%5 = call signext i8 (...) @getchar()
store i8 %5, i8* %2
%6 = call i32 @isalpha(i8 signext %5)
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
br i1 %8, label %9, label %10
9: ; preds = %4
br label %4
10: ; preds = %4
%11 = load i8, i8* %2
%12 = call signext i8 @tolower(i8 signext %11)
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 110
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 1, i32* %1
br label %17
16: ; preds = %10
store i32 0, i32* %1
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
@.str = [35 x i8] c"\0ADo you wish to play again? (y/n) \00"
define i32 @play_again() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = tail call signext i8 (...) @getchar()
%4 = tail call i32 @isalpha(i8 signext %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = tail call signext i8 @tolower(i8 signext %3)
%8 = icmp ne i8 %7, 110
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_self();
pthread_t gen_posix_thread_self(void) { return pthread_self(); }


x86 assembly (clang, -O0):
<gen_posix_thread_self>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <pthread_self@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_posix_thread_self>:
xor    %eax,%eax
jmp    1030 <pthread_self@plt>

LLVM IR (-O0):
define i32 @gen_posix_thread_self() {
%1 = call i32 (...) @pthread_self()
ret i32 %1
}

LLVM IR (-O2):
define i32 @gen_posix_thread_self() {
%1 = tail call i32 (...) @pthread_self()
ret i32 %1
}
/* Variables and functions */
int fn_sq_ch_68_ch_97_ch_116_ch_97_ch_83_ch_111_ch_109_ch_101_ch_86_ch_97_ch_108_ch_117_ch_101_ch_115_ch_70_ch_114_ch_111_ch_109(
    char const *);
int fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_83_ch_111_ch_109_ch_101_ch_86_ch_97_ch_108_ch_117_ch_101_ch_115_ch_70_ch_114_ch_111_ch_109(
    const char *text) {
  int pos = 0;
  pos =
      fn_sq_ch_68_ch_97_ch_116_ch_97_ch_83_ch_111_ch_109_ch_101_ch_86_ch_97_ch_108_ch_117_ch_101_ch_115_ch_70_ch_114_ch_111_ch_109(
          text);
  if (pos != -1)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_83_ch_111_ch_109_ch_101_ch_86_ch_97_ch_108_ch_117_ch_101_ch_115_ch_70_ch_114_ch_111_ch_109>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fn_sq_ch_68_ch_97_ch_116_ch_97_ch_83_ch_111_ch_109_ch_101_ch_86_ch_97_ch_108_ch_117_ch_101_ch_115_ch_70_ch_114_ch_111_ch_109@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1144 <fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_83_ch_111_ch_109_ch_101_ch_86_ch_97_ch_108_ch_117_ch_101_ch_115_ch_70_ch_114_ch_111_ch_109+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_83_ch_111_ch_109_ch_101_ch_86_ch_97_ch_108_ch_117_ch_101_ch_115_ch_70_ch_114_ch_111_ch_109+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_83_ch_111_ch_109_ch_101_ch_86_ch_97_ch_108_ch_117_ch_101_ch_115_ch_70_ch_114_ch_111_ch_109>:
jmp    1030 <fn_sq_ch_68_ch_97_ch_116_ch_97_ch_83_ch_111_ch_109_ch_101_ch_86_ch_97_ch_108_ch_117_ch_101_ch_115_ch_70_ch_114_ch_111_ch_109@plt>

LLVM IR (-O0):
define i32 @fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_83_ch_111_ch_109_ch_101_ch_86_ch_97_ch_108_ch_117_ch_101_ch_115_ch_70_ch_114_ch_111_ch_109(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @fn_sq_ch_68_ch_97_ch_116_ch_97_ch_83_ch_111_ch_109_ch_101_ch_86_ch_97_ch_108_ch_117_ch_101_ch_115_ch_70_ch_114_ch_111_ch_109(i8* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %4
store i32 %10, i32* %2
br label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_83_ch_111_ch_109_ch_101_ch_86_ch_97_ch_108_ch_117_ch_101_ch_115_ch_70_ch_114_ch_111_ch_109(i8* %0) {
%2 = tail call i32 @fn_sq_ch_68_ch_97_ch_116_ch_97_ch_83_ch_111_ch_109_ch_101_ch_86_ch_97_ch_108_ch_117_ch_101_ch_115_ch_70_ch_114_ch_111_ch_109(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ sdTerminalInit();
void ioInit(void) { sdTerminalInit(); }


x86 assembly (clang, -O0):
<ioInit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <sdTerminalInit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ioInit>:
xor    %eax,%eax
jmp    1030 <sdTerminalInit@plt>

LLVM IR (-O0):
define void @ioInit() {
%1 = call i32 (...) @sdTerminalInit()
ret void
}

LLVM IR (-O2):
define void @ioInit() {
%1 = tail call i32 (...) @sdTerminalInit()
ret void
}
void qqsocket_end() {}


x86 assembly (clang, -O0):
<qqsocket_end>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qqsocket_end>:
ret

LLVM IR (-O0):
define void @qqsocket_end() {
ret void
}

LLVM IR (-O2):
define void @qqsocket_end() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void *uDMAControlBaseGet(void) {
  return ((void *)(*((volatile uint32_t *)(0x400FF008))));
}


x86 assembly (clang, -O0):
<uDMAControlBaseGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400ff008,%eax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAControlBaseGet>:
mov    0x400ff008,%rax
40
ret

LLVM IR (-O0):
define i8* @uDMAControlBaseGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074786312 to i64*)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}

LLVM IR (-O2):
define i8* @uDMAControlBaseGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074786312 to i64*)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ hash(int);
void test() {
  int i;
  for (i = 0; i <= 2; i++) {
    {
      hash(1);
      hash(i);
    };
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jg     1149 <test+0x39>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%edi
call   1030 <hash@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <test+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    $0x1,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
pop    %rax
jmp    1030 <hash@plt>

LLVM IR (-O0):
define void @test() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %9, %0
%3 = load i32, i32* %1
%4 = icmp sle i32 %3, 2
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = call i32 @hash(i32 1)
%7 = load i32, i32* %1
%8 = call i32 @hash(i32 %7)
br label %9
9: ; preds = %5
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
br label %2
12: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 @hash(i32 1)
%2 = tail call i32 @hash(i32 0)
%3 = tail call i32 @hash(i32 1)
%4 = tail call i32 @hash(i32 1)
%5 = tail call i32 @hash(i32 1)
%6 = tail call i32 @hash(i32 2)
ret void
}
/* Variables and functions */
scalar_t__ malloc(size_t);
char *ft_strnew(size_t size) {
  size_t i;
  char *s;
  i = 0;
  s = NULL;
  s = (char *)malloc(size * sizeof(char));
  if (s == NULL)
    return (NULL);
  while (i < size) {
    s[i] = '\0';
    i++;
  }
  return (s);
}


x86 assembly (clang, -O0):
<ft_strnew>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
shl    $0x0,%rdi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1155 <ft_strnew+0x45>
movq   $0x0,-0x8(%rbp)
jmp    118d <ft_strnew+0x7d>
jmp    115a <ft_strnew+0x4a>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1185 <ft_strnew+0x75>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    115a <ft_strnew+0x4a>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strnew>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
test   %rax,%rax
je     1148 <ft_strnew+0x28>
mov    %rax,%rbx
test   %r14,%r14
je     114a <ft_strnew+0x2a>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
jmp    114a <ft_strnew+0x2a>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @ft_strnew(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 0, i64* %4
store i8* null, i8** %5
%6 = load i64, i64* %3
%7 = mul i64 %6, 1
%8 = call i64 @malloc(i64 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %13
12: ; preds = %1
store i8* null, i8** %2
br label %26
13: ; preds = %1
br label %14
14: ; preds = %18, %13
%15 = load i64, i64* %4
%16 = load i64, i64* %3
%17 = icmp ult i64 %15, %16
br i1 %17, label %18, label %24
18: ; preds = %14
%19 = load i8*, i8** %5
%20 = load i64, i64* %4
%21 = getelementptr inbounds i8, i8* %19, i64 %20
store i8 0, i8* %21
%22 = load i64, i64* %4
%23 = add i64 %22, 1
store i64 %23, i64* %4
br label %14
24: ; preds = %14
%25 = load i8*, i8** %5
store i8* %25, i8** %2
br label %26
26: ; preds = %24, %12
%27 = load i8*, i8** %2
ret i8* %27
}

LLVM IR (-O2):
define i8* @ft_strnew(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = inttoptr i64 %2 to i8*
%4 = icmp eq i64 %2, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = icmp eq i64 %0, 0
br i1 %6, label %8, label %7
7: ; preds = %5
br label %8
8: ; preds = %7, %5, %1
%9 = phi i8* [ null, %1 ], [ %3, %5 ], [ %3, %7 ]
ret i8* %9
}
void rudder_right() {}


x86 assembly (clang, -O0):
<rudder_right>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rudder_right>:
ret

LLVM IR (-O0):
define void @rudder_right() {
ret void
}

LLVM IR (-O2):
define void @rudder_right() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void terminal_stop() { endwin(); }


x86 assembly (clang, -O0):
<terminal_stop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <endwin@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminal_stop>:
xor    %eax,%eax
jmp    1030 <endwin@plt>

LLVM IR (-O0):
define void @terminal_stop() {
%1 = call i32 (...) @endwin()
ret void
}

LLVM IR (-O2):
define void @terminal_stop() {
%1 = tail call i32 (...) @endwin()
ret void
}
/* Type definitions */
struct stat {
  int st_mode;
};

/* Variables and functions */
int __S_IFMT;
int __S_IFREG;
scalar_t__ stat(char *, struct stat *);
int isa_file(char *filename) {
  struct stat sbuf;
  if (stat(filename, &sbuf) >= 0 && (sbuf.st_mode & __S_IFMT) == __S_IFREG)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isa_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jl     115a <isa_file+0x4a>
mov    -0x18(%rbp),%eax
mov    0x2eab(%rip),%rcx
and    (%rcx),%eax
mov    0x2e92(%rip),%rcx
cmp    (%rcx),%eax
jne    115a <isa_file+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1161 <isa_file+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isa_file>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
test   %rax,%rax
js     113a <isa_file+0x2a>
mov    0x2ec3(%rip),%rax
mov    (%rax),%ecx
and    (%rsp),%ecx
mov    0x2ea7(%rip),%rdx
mov    $0x1,%eax
cmp    (%rdx),%ecx
je     113c <isa_file+0x2c>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@__S_IFMT = global i32 0
@__S_IFREG = global i32 0
define i32 @isa_file(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp sge i64 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %1
%9 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%10 = load i32, i32* %9
%11 = load i32, i32* @__S_IFMT
%12 = and i32 %10, %11
%13 = load i32, i32* @__S_IFREG
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %8
store i32 1, i32* %2
br label %17
16: ; preds = %8, %1
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@__S_IFMT = global i32 0
@__S_IFREG = global i32 0
define i32 @isa_file(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp sgt i64 %4, -1
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = load i32, i32* @__S_IFMT
%10 = and i32 %9, %8
%11 = load i32, i32* @__S_IFREG
%12 = icmp eq i32 %10, %11
br i1 %12, label %14, label %13
13: ; preds = %6, %1
br label %14
14: ; preds = %6, %13
%15 = phi i32 [ 0, %13 ], [ 1, %6 ]
ret i32 %15
}
/* Variables and functions */
int padcon_get_homotopy_continuation_parameter(int, double *);
int maximal_series_degree(void) {
  int fail, numdeg, dendeg;
  double val;
  fail = padcon_get_homotopy_continuation_parameter(2, &val);
  numdeg = (int)val;
  fail = padcon_get_homotopy_continuation_parameter(3, &val);
  dendeg = (int)val;
  return numdeg + dendeg;
}


x86 assembly (clang, -O0):
<maximal_series_degree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x2,%edi
lea    -0x18(%rbp),%rsi
call   1030 <padcon_get_homotopy_continuation_parameter@plt>
mov    %eax,-0x4(%rbp)
cvttsd2si -0x18(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x3,%edi
lea    -0x18(%rbp),%rsi
call   1030 <padcon_get_homotopy_continuation_parameter@plt>
mov    %eax,-0x4(%rbp)
cvttsd2si -0x18(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<maximal_series_degree>:
push   %rbp
push   %rbx
push   %rax
mov    %rsp,%rbx
mov    $0x2,%edi
mov    %rbx,%rsi
call   1030 <padcon_get_homotopy_continuation_parameter@plt>
cvttsd2si (%rsp),%ebp
mov    $0x3,%edi
mov    %rbx,%rsi
call   1030 <padcon_get_homotopy_continuation_parameter@plt>
cvttsd2si (%rsp),%eax
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @maximal_series_degree() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = call i32 @padcon_get_homotopy_continuation_parameter(i32 2, double* %4)
store i32 %5, i32* %1
%6 = load double, double* %4
%7 = fptosi double %6 to i32
store i32 %7, i32* %2
%8 = call i32 @padcon_get_homotopy_continuation_parameter(i32 3, double* %4)
store i32 %8, i32* %1
%9 = load double, double* %4
%10 = fptosi double %9 to i32
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = add nsw i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @maximal_series_degree() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @padcon_get_homotopy_continuation_parameter(i32 2, double* %1)
%4 = load double, double* %1
%5 = fptosi double %4 to i32
%6 = call i32 @padcon_get_homotopy_continuation_parameter(i32 3, double* %1)
%7 = load double, double* %1
%8 = fptosi double %7 to i32
%9 = add nsw i32 %8, %5
ret i32 %9
}
long get_total_frames(long long filesize) {
  return filesize / (80 * 150 * 12) - 1;
}


x86 assembly (clang, -O0):
<get_total_frames>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x23280,%ecx
cqto
idiv   %rcx
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_total_frames>:
mov    %rdi,%rax
movabs $0x3a4114b5225c6337,%rcx
14 41 3a
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0xf,%rdx
add    %rdx,%rax
add    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @get_total_frames(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sdiv i64 %3, 144000
%5 = sub nsw i64 %4, 1
ret i64 %5
}

LLVM IR (-O2):
define i64 @get_total_frames(i64 %0) {
%2 = sdiv i64 %0, 144000
%3 = add nsw i64 %2, -1
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char const *);
FILE *_fopen(const char *path, const char *mode) { return fopen(path, mode); }


x86 assembly (clang, -O0):
<_fopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fopen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fopen>:
jmp    1030 <fopen@plt>

LLVM IR (-O0):
define i32* @_fopen(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32* @fopen(i8* %5, i8* %6)
ret i32* %7
}

LLVM IR (-O2):
define noalias i32* @_fopen(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
ret i32* %3
}
double m_to_mile(int m) { return m / 1609.344; }


x86 assembly (clang, -O0):
<m_to_mile>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeec(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_to_mile>:
cvtsi2sd %edi,%xmm0
divsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @m_to_mile(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fdiv double %4, 0x409925604189374C
ret double %5
}

LLVM IR (-O2):
define double @m_to_mile(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fdiv double %2, 0x409925604189374C
ret double %3
}
void session_upd_topic(struct servermsg *msg, struct _session *session) {}


x86 assembly (clang, -O0):
<session_upd_topic>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<session_upd_topic>:
ret

LLVM IR (-O0):
%struct.servermsg = type opaque
%struct._session = type opaque
define void @session_upd_topic(%struct.servermsg* %0, %struct._session* %1) {
%3 = alloca %struct.servermsg*
%4 = alloca %struct._session*
store %struct.servermsg* %0, %struct.servermsg** %3
store %struct._session* %1, %struct._session** %4
ret void
}

LLVM IR (-O2):
%struct.servermsg = type opaque
%struct._session = type opaque
define void @session_upd_topic(%struct.servermsg* nocapture %0, %struct._session* nocapture %1) {
ret void
}
float Sleef_atanhf_u10(float x) { return __builtin_atanhf(x); }


x86 assembly (clang, -O0):
<Sleef_atanhf_u10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <atanhf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sleef_atanhf_u10>:
jmp    1030 <atanhf@plt>

LLVM IR (-O0):
define float @Sleef_atanhf_u10(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @atanhf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @Sleef_atanhf_u10(float %0) {
%2 = tail call float @atanhf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void fun1(char *a, char *b) { printf("%s + %s\n", a, b); }


x86 assembly (clang, -O0):
<fun1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun1>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%s + %s\0A\00"
define void @fun1(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s + %s\0A\00"
define void @fun1(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Type definitions */
typedef scalar_t__ uint_fast32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ mod_add(scalar_t__, int /*<<< orphan*/);
scalar_t__ mod_mac(scalar_t__, scalar_t__, int);
int /*<<< orphan*/ mod_mul_y(scalar_t__);
uint_fast32_t mod_mac_y(uint_fast32_t sum, uint_fast32_t a) {
  uint_fast32_t result = mod_add(sum, mod_mul_y(a));
  assert(result == mod_mac(sum, a, 104480));
  return result;
}


x86 assembly (clang, -O0):
<mod_mac_y>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <mod_mul_y@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
call   1060 <mod_add@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x19820,%edx
call   1030 <mod_mac@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod_mac_y>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <mod_mul_y@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <mod_add@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x19820,%edx
call   1030 <mod_mac@plt>
xor    %edi,%edi
cmp    %rax,%r15
sete   %dil
call   1050 <assert@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @mod_mac_y(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i32 @mod_mul_y(i64 %7)
%9 = call i64 @mod_add(i64 %6, i32 %8)
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = load i64, i64* %3
%12 = load i64, i64* %4
%13 = call i64 @mod_mac(i64 %11, i64 %12, i32 104480)
%14 = icmp eq i64 %10, %13
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = load i64, i64* %5
ret i64 %17
}

LLVM IR (-O2):
define i64 @mod_mac_y(i64 %0, i64 %1) {
%3 = tail call i32 @mod_mul_y(i64 %1)
%4 = tail call i64 @mod_add(i64 %0, i32 %3)
%5 = tail call i64 @mod_mac(i64 %0, i64 %1, i32 104480)
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret i64 %4
}
void wrn(n) {
  if (n < 0) {
    wrc('-');
    n = -n;
  }
  wrpn(n);
}


x86 assembly (clang, -O0):
<wrn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1149 <wrn+0x29>
mov    $0x2d,%edi
mov    $0x0,%al
call   1040 <wrc@plt>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <wrpn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrn>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jns    1135 <wrn+0x15>
mov    $0x2d,%edi
xor    %eax,%eax
call   1040 <wrc@plt>
neg    %ebx
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <wrpn@plt>

LLVM IR (-O0):
define void @wrn(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = call i32 (i32, ...) bitcast (i32 (...)* @wrc to i32 (i32, ...)*)(i32 45)
%7 = load i32, i32* %2
%8 = sub nsw i32 0, %7
store i32 %8, i32* %2
br label %9
9: ; preds = %5, %1
%10 = load i32, i32* %2
%11 = call i32 (i32, ...) bitcast (i32 (...)* @wrpn to i32 (i32, ...)*)(i32 %10)
ret void
}

LLVM IR (-O2):
define void @wrn(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @wrc to i32 (i32, ...)*)(i32 45)
%5 = sub nsw i32 0, %0
br label %6
6: ; preds = %3, %1
%7 = phi i32 [ %5, %3 ], [ %0, %1 ]
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @wrpn to i32 (i32, ...)*)(i32 %7)
ret void
}
void px_put_short_le(char *cp, short int sval) {
  *cp++ = sval & 0xff;
  *cp++ = (sval >> 8) & 0xff;
}


x86 assembly (clang, -O0):
<px_put_short_le>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movswl -0xa(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
movswl -0xa(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<px_put_short_le>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @px_put_short_le(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = sext i16 %5 to i32
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %3
store i8 %8, i8* %9
%11 = load i16, i16* %4
%12 = sext i16 %11 to i32
%13 = ashr i32 %12, 8
%14 = and i32 %13, 255
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %3
store i8 %15, i8* %16
ret void
}

LLVM IR (-O2):
define void @px_put_short_le(i8* nocapture writeonly %0, i16 signext %1) {
%3 = trunc i16 %1 to i8
%4 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %3, i8* %0
%5 = lshr i16 %1, 8
%6 = trunc i16 %5 to i8
store i8 %6, i8* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Show_library(int /*<<< orphan*/);
int /*<<< orphan*/ triList(int);
void IF_show_libnet(void) { Show_library(triList(32)); }


x86 assembly (clang, -O0):
<IF_show_libnet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
call   1040 <triList@plt>
mov    %eax,%edi
call   1030 <Show_library@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<IF_show_libnet>:
push   %rax
mov    $0x20,%edi
call   1040 <triList@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <Show_library@plt>

LLVM IR (-O0):
define void @IF_show_libnet() {
%1 = call i32 @triList(i32 32)
%2 = call i32 @Show_library(i32 %1)
ret void
}

LLVM IR (-O2):
define void @IF_show_libnet() {
%1 = tail call i32 @triList(i32 32)
%2 = tail call i32 @Show_library(i32 %1)
ret void
}
void AVOID_EMPTY_UNIT_WARNING_BY_GCC_KQUEUE() {}


x86 assembly (clang, -O0):
<AVOID_EMPTY_UNIT_WARNING_BY_GCC_KQUEUE>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AVOID_EMPTY_UNIT_WARNING_BY_GCC_KQUEUE>:
ret

LLVM IR (-O0):
define void @AVOID_EMPTY_UNIT_WARNING_BY_GCC_KQUEUE() {
ret void
}

LLVM IR (-O2):
define void @AVOID_EMPTY_UNIT_WARNING_BY_GCC_KQUEUE() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getpgrp();
scalar_t__ killpg(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(void) {
  if (killpg(getpgrp(), 0) != 0) {
    printf("Could not call killpg with sig = 0\n");
    return 1;
  }
  printf("Test PASSED\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <getpgrp@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <killpg@plt>
cmp    $0x0,%rax
je     1171 <main+0x41>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1184 <main+0x54>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <getpgrp@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <killpg@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
lea    0xeb0(%rip),%rax
lea    0xeb5(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Could not call killpg with sig = 0\0A\00"
@.str.1 = [13 x i8] c"Test PASSED\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getpgrp()
%3 = call i64 @killpg(i32 %2, i32 0)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %1
br label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %9
9: ; preds = %7, %5
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@str = [12 x i8] c"Test PASSED\00"
@str.2 = [35 x i8] c"Could not call killpg with sig = 0\00"
define i32 @main() {
%1 = tail call i32 (...) @getpgrp()
%2 = tail call i64 @killpg(i32 %1, i32 0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @str.2, i64 0, i64 0)
%5 = xor i1 %3, true
%6 = zext i1 %5 to i32
%7 = tail call i32 @puts(i8* dereferenceable(1) %4)
ret i32 %6
}
char *tc(int conditonal, char *tru, char *fals) {
  if (conditonal)
    return tru;
  else
    return fals;
}


x86 assembly (clang, -O0):
<tc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1126 <tc+0x26>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112e <tc+0x2e>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tc>:
mov    %rsi,%rax
test   %edi,%edi
cmove  %rdx,%rax
ret

LLVM IR (-O0):
define i8* @tc(i32 %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = load i32, i32* %5
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load i8*, i8** %6
store i8* %11, i8** %4
br label %14
12: ; preds = %3
%13 = load i8*, i8** %7
store i8* %13, i8** %4
br label %14
14: ; preds = %12, %10
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
define i8* @tc(i32 %0, i8* readnone %1, i8* readnone %2) {
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* %2, i8* %1
ret i8* %5
}
/* Variables and functions */
int errno;
int mkdir(char const *, int);
int /*<<< orphan*/ printf(char *, char const *, int, int, char *);
char *strerror(int);
void do_test(const char *path) {
  int retcode;
  errno = 0;
  retcode = mkdir(path, 0755);
  printf("mkdir(\"%s\") returns %d: errno = %d [%s]\n", path, retcode, errno,
         strerror(errno));
}


x86 assembly (clang, -O0):
<do_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    $0x1ed,%esi
call   1030 <mkdir@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    0x2e71(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    %rax,%r8
lea    0xe6a(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_test>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    0x2ea2(%rip),%rbp
movl   $0x0,0x0(%rbp)
mov    $0x1ed,%esi
call   1030 <mkdir@plt>
mov    %eax,%r14d
mov    0x0(%rbp),%ebp
mov    %ebp,%edi
call   1050 <strerror@plt>
lea    0xe9d(%rip),%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %ebp,%ecx
mov    %rax,%r8
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@errno = global i32 0
@.str = [41 x i8] c"mkdir(\22%s\22) returns %d: errno = %d [%s]\0A\00"
define void @do_test(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* @errno
%4 = load i8*, i8** %2
%5 = call i32 @mkdir(i8* %4, i32 493)
store i32 %5, i32* %3
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = load i32, i32* @errno
%9 = load i32, i32* @errno
%10 = call i8* @strerror(i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7, i32 %8, i8* %10)
ret void
}

LLVM IR (-O2):
@errno = global i32 0
@.str = [41 x i8] c"mkdir(\22%s\22) returns %d: errno = %d [%s]\0A\00"
define void @do_test(i8* %0) {
store i32 0, i32* @errno
%2 = tail call i32 @mkdir(i8* %0, i32 493)
%3 = load i32, i32* @errno
%4 = tail call i8* @strerror(i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %2, i32 %3, i8* %4)
ret void
}
/* Variables and functions */
int getline(char **, size_t *, int /*<<< orphan*/);
scalar_t__ malloc(size_t);
int /*<<< orphan*/ ratios(char *, int);
int /*<<< orphan*/ stdin;
int main() {
  char *s;
  int size;
  size_t n = 1;
  s = (char *)malloc(n);
  size = getline(&s, &n, stdin) - 1;
  ratios(s, size);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    0x2e94(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <getline@plt>
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <ratios@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movq   $0x1,0x10(%rsp)
mov    $0x1,%edi
call   1030 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    0x2e95(%rip),%rax
mov    (%rax),%edx
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1050 <getline@plt>
lea    -0x1(%rax),%esi
mov    0x8(%rsp),%rdi
call   1040 <ratios@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i8*
%2 = alloca i32
%3 = alloca i64
store i64 1, i64* %3
%4 = load i64, i64* %3
%5 = call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %1
%7 = load i32, i32* @stdin
%8 = call i32 @getline(i8** %1, i64* %3, i32 %7)
%9 = sub nsw i32 %8, 1
store i32 %9, i32* %2
%10 = load i8*, i8** %1
%11 = load i32, i32* %2
%12 = call i32 @ratios(i8* %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i8*
%2 = alloca i64
%3 = bitcast i8** %1 to i8*
%4 = bitcast i64* %2 to i8*
store i64 1, i64* %2
%5 = tail call i64 @malloc(i64 1)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %1
%7 = load i32, i32* @stdin
%8 = call i32 @getline(i8** %1, i64* %2, i32 %7)
%9 = add nsw i32 %8, -1
%10 = load i8*, i8** %1
%11 = call i32 @ratios(i8* %10, i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, int);
int fnet_set_nonblocking(int fd) {
  return fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
}


x86 assembly (clang, -O0):
<fnet_set_nonblocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    %eax,%edx
mov    0x2e99(%rip),%rax
or     (%rax),%edx
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnet_set_nonblocking>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2ebc(%rip),%rax
mov    (%rax),%ebp
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    0x2eb3(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_SETFL = global i32 0
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @fnet_set_nonblocking(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @F_SETFL
%5 = load i32, i32* %2
%6 = load i32, i32* @F_GETFL
%7 = call i32 @fcntl(i32 %5, i32 %6, i32 0)
%8 = load i32, i32* @O_NONBLOCK
%9 = or i32 %7, %8
%10 = call i32 @fcntl(i32 %3, i32 %4, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
@F_SETFL = global i32 0
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @fnet_set_nonblocking(i32 %0) {
%2 = load i32, i32* @F_SETFL
%3 = load i32, i32* @F_GETFL
%4 = tail call i32 @fcntl(i32 %0, i32 %3, i32 0)
%5 = load i32, i32* @O_NONBLOCK
%6 = or i32 %5, %4
%7 = tail call i32 @fcntl(i32 %0, i32 %2, i32 %6)
ret i32 %7
}
/* Type definitions */
struct dirent {
  int dummy;
};
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
struct dirent *readdir(int /*<<< orphan*/ *);
struct dirent *lisp_readdir(DIR *dir) {
  return readdir(dir);
}


x86 assembly (clang, -O0):
<lisp_readdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <readdir@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lisp_readdir>:
jmp    1030 <readdir@plt>

LLVM IR (-O0):
%struct.dirent = type { i32 }
define %struct.dirent* @lisp_readdir(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call %struct.dirent* @readdir(i32* %3)
ret %struct.dirent* %4
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
define %struct.dirent* @lisp_readdir(i32* %0) {
%2 = tail call %struct.dirent* @readdir(i32* %0)
ret %struct.dirent* %2
}
/* Variables and functions */
int /*<<< orphan*/ getit(int, char **, int, char *);
void reget(int argc, char *argv[]) { (void)getit(argc, argv, 1, "r+w"); }


x86 assembly (clang, -O0):
<reget>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
lea    0xece(%rip),%rcx
call   1030 <getit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reget>:
lea    0xee9(%rip),%rcx
mov    $0x1,%edx
jmp    1030 <getit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"r+w\00"
define void @reget(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = call i32 @getit(i32 %5, i8** %6, i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"r+w\00"
define void @reget(i32 %0, i8** %1) {
%3 = tail call i32 @getit(i32 %0, i8** %1, i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct rusage {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
scalar_t__ wait3(int *, int /*<<< orphan*/, struct rusage *);
void reaper(int sig) {
  int status;
  while (wait3(&status, WNOHANG, (struct rusage *)0) >= 0) {
  }
  return;
}


x86 assembly (clang, -O0):
<reaper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <wait3@plt>
cmp    $0x0,%rax
jl     1140 <reaper+0x30>
jmp    111b <reaper+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reaper>:
push   %r14
push   %rbx
push   %rax
mov    0x2ecd(%rip),%r14
lea    0x4(%rsp),%rbx
mov    (%r14),%esi
mov    %rbx,%rdi
xor    %edx,%edx
call   1030 <wait3@plt>
test   %rax,%rax
jns    1120 <reaper+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.rusage = type { i32 }
@WNOHANG = global i32 0
define void @reaper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* @WNOHANG
%6 = call i64 @wait3(i32* %3, i32 %5, %struct.rusage* null)
%7 = icmp sge i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %4
br label %4
9: ; preds = %4
ret void
}

LLVM IR (-O2):
%struct.rusage = type { i32 }
@WNOHANG = global i32 0
define void @reaper(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
br label %4
4: ; preds = %4, %1
%5 = load i32, i32* @WNOHANG
%6 = call i64 @wait3(i32* %2, i32 %5, %struct.rusage* null)
%7 = icmp sgt i64 %6, -1
br i1 %7, label %4, label %8
8: ; preds = %4
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ suma2(int, int, int *);
int main(int argc, char **argv) {
  int a = 4, b = 2, c;
  suma2(a, b, &c);
  printf("\na=%d  b=%d  c=%d\n\n", a, b, c);
  return (EXIT_SUCCESS);
}


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)
movl   $0x4,-0x14(%rbp)
movl   $0x2,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
lea    -0x1c(%rbp),%rdx
call   1040 <suma2@plt>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdx
mov    $0x4,%edi
mov    $0x2,%esi
call   1040 <suma2@plt>
mov    0x4(%rsp),%ecx
lea    0xec0(%rip),%rdi
mov    $0x4,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
mov    0x2e8a(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"\0Aa=%d b=%d c=%d\0A\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 4, i32* %6
store i32 2, i32* %7
%9 = load i32, i32* %6
%10 = load i32, i32* %7
%11 = call i32 @suma2(i32 %9, i32 %10, i32* %8)
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13, i32 %14)
%16 = load i32, i32* @EXIT_SUCCESS
ret i32 %16
}

LLVM IR (-O2):
@.str = [20 x i8] c"\0Aa=%d b=%d c=%d\0A\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @suma2(i32 4, i32 2, i32* %3)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 4, i32 2, i32 %6)
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}
void nonl() { int value; }


x86 assembly (clang, -O0):
<nonl>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nonl>:
ret

LLVM IR (-O0):
define void @nonl() {
%1 = alloca i32
ret void
}

LLVM IR (-O2):
define void @nonl() {
ret void
}
void ff_hevc_put_hevc_bi_w_epel_v4_10_sse4() {}


x86 assembly (clang, -O0):
<ff_hevc_put_hevc_bi_w_epel_v4_10_sse4>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ff_hevc_put_hevc_bi_w_epel_v4_10_sse4>:
ret

LLVM IR (-O0):
define void @ff_hevc_put_hevc_bi_w_epel_v4_10_sse4() {
ret void
}

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_v4_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ initHardware();
int /*<<< orphan*/ setServo(int);
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  initHardware();
  while (1) {
    setServo(0);
    sleep(1);
    setServo(25);
    sleep(1);
    setServo(50);
    sleep(1);
    setServo(75);
    sleep(1);
    setServo(100);
    sleep(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <initHardware@plt>
xor    %edi,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0x19,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0x32,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0x4b,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0x64,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    114d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <initHardware@plt>
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0x19,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0x32,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0x4b,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0x64,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @initHardware()
br label %7
7: ; preds = %2, %7
%8 = call i32 @setServo(i32 0)
%9 = call i32 @sleep(i32 1)
%10 = call i32 @setServo(i32 25)
%11 = call i32 @sleep(i32 1)
%12 = call i32 @setServo(i32 50)
%13 = call i32 @sleep(i32 1)
%14 = call i32 @setServo(i32 75)
%15 = call i32 @sleep(i32 1)
%16 = call i32 @setServo(i32 100)
%17 = call i32 @sleep(i32 1)
br label %7
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @initHardware()
br label %4
4: ; preds = %2, %4
%5 = tail call i32 @setServo(i32 0)
%6 = tail call i32 @sleep(i32 1)
%7 = tail call i32 @setServo(i32 25)
%8 = tail call i32 @sleep(i32 1)
%9 = tail call i32 @setServo(i32 50)
%10 = tail call i32 @sleep(i32 1)
%11 = tail call i32 @setServo(i32 75)
%12 = tail call i32 @sleep(i32 1)
%13 = tail call i32 @setServo(i32 100)
%14 = tail call i32 @sleep(i32 1)
br label %4
}
/* Variables and functions */
char *oauth_url_escape(char const *);
char *oauth_sign_plaintext(const char *m, const char *k) {
  return (oauth_url_escape(k));
}


x86 assembly (clang, -O0):
<oauth_sign_plaintext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <oauth_url_escape@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oauth_sign_plaintext>:
mov    %rsi,%rdi
jmp    1030 <oauth_url_escape@plt>

LLVM IR (-O0):
define i8* @oauth_sign_plaintext(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i8* @oauth_url_escape(i8* %5)
ret i8* %6
}

LLVM IR (-O2):
define i8* @oauth_sign_plaintext(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i8* @oauth_url_escape(i8* %1)
ret i8* %3
}