xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ RotateByAmount(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  char str[100];
  scanf("%s", str);
  int n;
  scanf("%d", &n);
  RotateByAmount(str, n);
  printf("%s", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xea8(%rip),%rdi
lea    -0x74(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    -0x70(%rbp),%rdi
mov    -0x74(%rbp),%esi
call   1040 <RotateByAmount@plt>
lea    -0x70(%rbp),%rsi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x78,%rsp
lea    0xec2(%rip),%r14
lea    0x10(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xeac(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1040 <RotateByAmount@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call i32 @RotateByAmount(i8* %7, i32 %8)
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = bitcast i32* %2 to i8*
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = call i32 @RotateByAmount(i8* %3, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
void f_swap_v1(char *p, char *q) {
  char tmp = *p ^ *q;
  *p ^= tmp;
  *q ^= tmp;
}


x86 assembly (clang, -O0):
<f_swap_v1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%edx
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %edx,%ecx
mov    %cl,(%rax)
movsbl -0x11(%rbp),%edx
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_swap_v1>:
mov    (%rsi),%al
mov    (%rdi),%cl
xor    %al,%cl
mov    %al,(%rdi)
xor    %cl,(%rsi)
ret

LLVM IR (-O0):
define void @f_swap_v1(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = xor i32 %8, %11
%13 = trunc i32 %12 to i8
store i8 %13, i8* %5
%14 = load i8, i8* %5
%15 = sext i8 %14 to i32
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = xor i32 %18, %15
%20 = trunc i32 %19 to i8
store i8 %20, i8* %16
%21 = load i8, i8* %5
%22 = sext i8 %21 to i32
%23 = load i8*, i8** %4
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = xor i32 %25, %22
%27 = trunc i32 %26 to i8
store i8 %27, i8* %23
ret void
}

LLVM IR (-O2):
define void @f_swap_v1(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = xor i8 %4, %3
store i8 %4, i8* %0
%6 = load i8, i8* %1
%7 = xor i8 %5, %6
store i8 %7, i8* %1
ret void
}
/* Variables and functions */
unsigned long GetScrSize61();
unsigned long getscrsize() { return GetScrSize61(); }


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

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

LLVM IR (-O0):
define i64 @getscrsize() {
%1 = call i64 (...) @GetScrSize61()
ret i64 %1
}

LLVM IR (-O2):
define i64 @getscrsize() {
%1 = tail call i64 (...) @GetScrSize61()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *argv0) {
  fprintf(stderr, "Usage: %s {alpha map} {numer map} {file name}\n", argv0);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [47 x i8] c"Usage: %s {alpha map} {numer map} {file name}\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"Usage: %s {alpha map} {numer map} {file name}\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, ...);
int set_nonblocking(int fd) {
  int flags = fcntl(fd, F_GETFL);
  if (flags == -1) {
    return flags;
  }
  return fcntl(fd, F_SETFL, flags | O_NONBLOCK);
}


x86 assembly (clang, -O0):
<set_nonblocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1146 <set_nonblocking+0x36>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1168 <set_nonblocking+0x58>
mov    -0x8(%rbp),%edi
mov    0x2e88(%rip),%rax
mov    (%rax),%esi
mov    -0xc(%rbp),%edx
mov    0x2e8c(%rip),%rax
or     (%rax),%edx
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_nonblocking>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
call   1030 <fcntl@plt>
cmp    $0xffffffff,%eax
je     1146 <set_nonblocking+0x36>
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%esi
mov    0x2eb0(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %eax,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <fcntl@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @set_nonblocking(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* @F_GETFL
%7 = call i32 (i32, i32, ...) @fcntl(i32 %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = load i32, i32* %4
store i32 %11, i32* %2
br label %19
12: ; preds = %1
%13 = load i32, i32* %3
%14 = load i32, i32* @F_SETFL
%15 = load i32, i32* %4
%16 = load i32, i32* @O_NONBLOCK
%17 = or i32 %15, %16
%18 = call i32 (i32, i32, ...) @fcntl(i32 %13, i32 %14, i32 %17)
store i32 %18, i32* %2
br label %19
19: ; preds = %12, %10
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @set_nonblocking(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = load i32, i32* @F_SETFL
%7 = load i32, i32* @O_NONBLOCK
%8 = or i32 %7, %3
%9 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %6, i32 %8)
br label %10
10: ; preds = %1, %5
%11 = phi i32 [ %9, %5 ], [ -1, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printd(int);
int /*<<< orphan*/ printf(char *);
main() {
  printd(123);
  printf("\nPress any key to end...");
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7b,%edi
call   1030 <printd@plt>
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7b,%edi
call   1030 <printd@plt>
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"\0APress any key to end...\00"
define i32 @main() {
%1 = call i32 @printd(i32 123)
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"\0APress any key to end...\00"
define i32 @main() {
%1 = tail call i32 @printd(i32 123)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @getchar()
ret i32 0
}
int foo31() { return 31; }


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

x86 assembly (clang, -O2):
<foo31>:
mov    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @foo31() {
ret i32 31
}

LLVM IR (-O2):
define i32 @foo31() {
ret i32 31
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int supporting_set_structure(void) {
  int fail, *a, *b;
  double *c;
  fail = _ada_use_c2phc(110, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<supporting_set_structure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x6e,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<supporting_set_structure>:
mov    $0x6e,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @supporting_set_structure() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca double*
%5 = load i32*, i32** %2
%6 = load i32*, i32** %3
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 110, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %1
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @supporting_set_structure() {
%1 = tail call i32 @_ada_use_c2phc(i32 110, i32* undef, i32* undef, double* undef)
ret i32 %1
}
int is_repair(short card) {
  return card == 10 || card == 11 || card == 12 || card == -1;
}


x86 assembly (clang, -O0):
<is_repair>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x3(%rbp)
je     114e <is_repair+0x4e>
movswl -0x2(%rbp),%ecx
mov    $0x1,%al
cmp    $0xb,%ecx
mov    %al,-0x3(%rbp)
je     114e <is_repair+0x4e>
movswl -0x2(%rbp),%ecx
mov    $0x1,%al
cmp    $0xc,%ecx
mov    %al,-0x3(%rbp)
je     114e <is_repair+0x4e>
movswl -0x2(%rbp),%eax
cmp    $0xffffffff,%eax
sete   %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_repair>:
mov    %edi,%eax
add    $0xfffffff6,%eax
cmp    $0x3,%ax
setb   %al
cmp    $0xffff,%di
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_repair(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = icmp eq i32 %4, 10
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i16, i16* %2
%8 = sext i16 %7 to i32
%9 = icmp eq i32 %8, 11
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i16, i16* %2
%12 = sext i16 %11 to i32
%13 = icmp eq i32 %12, 12
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i16, i16* %2
%16 = sext i16 %15 to i32
%17 = icmp eq i32 %16, -1
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @is_repair(i16 signext %0) {
%2 = add i16 %0, -10
%3 = icmp ult i16 %2, 3
%4 = icmp eq i16 %0, -1
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
unsigned xrop3_54_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D | T;
  stk1 = S ^ stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_54_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_54_0_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
shl    $0x8,%esi
lea    0xff(%rsi),%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_54_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %7
%24 = or i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %6
%26 = load i32, i32* %9
%27 = xor i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
ret i32 %28
}

LLVM IR (-O2):
define i32 @xrop3_54_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = or i32 %6, 255
%8 = xor i32 %7, %4
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_srli_pi32(int /*<<< orphan*/, int);
__m64 test_mm_srli_pi32(__m64 a) { return _mm_srli_pi32(a, 3); }


x86 assembly (clang, -O0):
<test_mm_srli_pi32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
call   1030 <_mm_srli_pi32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_srli_pi32>:
mov    $0x3,%esi
jmp    1030 <_mm_srli_pi32@plt>

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

LLVM IR (-O2):
define i32 @test_mm_srli_pi32(i32 %0) {
%2 = tail call i32 @_mm_srli_pi32(i32 %0, i32 3)
ret i32 %2
}
void swap() {
  asm volatile("subq $0x10, %%r15\n\t"
               "popq %%rax\n\t"
               "movq %%rax, 0x8(%%r15)\n\t"
               "movq %%rsp, (%%r15)\n\t"
               "movq %%rsp, %%r13\n\t"
               "movq %%r14, %%rsp\n\t"
               "movq %%r13, %%r14\n\t"
               "movq %%r10, %%r9\n\t"
               "movq %%r11, %%r10\n\t"
               "movq %%r9, %%r11\n\t" ::
                   :);
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%r15
pop    %rax
mov    %rax,0x8(%r15)
mov    %rsp,(%r15)
mov    %rsp,%r13
mov    %r14,%rsp
mov    %r13,%r14
mov    %r10,%r9
mov    %r11,%r10
mov    %r9,%r11
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
sub    $0x10,%r15
pop    %rax
mov    %rax,0x8(%r15)
mov    %rsp,(%r15)
mov    %rsp,%r13
mov    %r14,%rsp
mov    %r13,%r14
mov    %r10,%r9
mov    %r11,%r10
mov    %r9,%r11
ret

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

LLVM IR (-O2):
define void @swap() {
tail call void asm sideeffect "subq $$0x10, %r15\0A\09popq %rax\0A\09movq %rax, 0x8(%r15)\0A\09movq %rsp, (%r15)\0A\09movq %rsp, %r13\0A\09movq %r14, %rsp\0A\09movq %r13, %r14\0A\09movq %r10, %r9\0A\09movq %r11, %r10\0A\09movq %r9, %r11\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void __stack_chk_fail(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<__stack_chk_fail>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <__stack_chk_fail+0x9>
jmp    1109 <__stack_chk_fail+0x9>

x86 assembly (clang, -O2):
<__stack_chk_fail>:
jmp    1100 <__stack_chk_fail>

LLVM IR (-O0):
define void @__stack_chk_fail() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @__stack_chk_fail() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
ssize_t flistxattr(int filedes, char *list, size_t size) {
  return (errno = ENOSYS, -1);
}


x86 assembly (clang, -O0):
<flistxattr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ed2(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb9(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flistxattr>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @flistxattr(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* @ENOSYS
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @flistxattr(i32 %0, i8* nocapture readnone %1, i64 %2) {
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: ./pblogd -f <filename> -i <interval>\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"Usage: ./pblogd -f <filename> -i <interval>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [44 x i8] c"Usage: ./pblogd -f <filename> -i <interval>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void mbcSetNoExtRAM8(uint16_t addr, uint8_t val) {
  (void)addr;
  (void)val;
}


x86 assembly (clang, -O0):
<mbcSetNoExtRAM8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @mbcSetNoExtRAM8(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @mbcSetNoExtRAM8(i32 %0, i32 %1) {
ret void
}
unsigned int _getMinPadding(unsigned int matrixSize, unsigned int cutoff) {
  unsigned int cnt = 0;
  while (matrixSize > cutoff) {
    matrixSize++;
    matrixSize >>= 1;
    cnt++;
  }
  return matrixSize << cnt;
}


x86 assembly (clang, -O0):
<_getMinPadding>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jbe    113d <_getMinPadding+0x3d>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <_getMinPadding+0x11>
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_getMinPadding>:
mov    %edi,%eax
xor    %ecx,%ecx
cmp    %esi,%edi
jbe    111c <_getMinPadding+0x1c>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
shr    %eax
add    $0x1,%ecx
cmp    %esi,%eax
ja     1110 <_getMinPadding+0x10>
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @_getMinPadding(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %10, %2
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = icmp ugt i32 %7, %8
br i1 %9, label %10, label %17
10: ; preds = %6
%11 = load i32, i32* %3
%12 = add i32 %11, 1
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = lshr i32 %13, 1
store i32 %14, i32* %3
%15 = load i32, i32* %5
%16 = add i32 %15, 1
store i32 %16, i32* %5
br label %6
17: ; preds = %6
%18 = load i32, i32* %3
%19 = load i32, i32* %5
%20 = shl i32 %18, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @_getMinPadding(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, %1
br i1 %3, label %4, label %11
4: ; preds = %2, %4
%5 = phi i32 [ %9, %4 ], [ 0, %2 ]
%6 = phi i32 [ %8, %4 ], [ %0, %2 ]
%7 = add i32 %6, 1
%8 = lshr i32 %7, 1
%9 = add i32 %5, 1
%10 = icmp ugt i32 %8, %1
br i1 %10, label %4, label %11
11: ; preds = %4, %2
%12 = phi i32 [ %0, %2 ], [ %8, %4 ]
%13 = phi i32 [ 0, %2 ], [ %9, %4 ]
%14 = shl i32 %12, %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ hanoi(int, char, char);
int /*<<< orphan*/ hanoi_2(int, char, char, char);
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  hanoi_2(3, 'B', 'C', 'A');
  printf("==============\n");
  hanoi(3, 'B', 'C');
  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    $0x3,%edi
mov    $0x42,%esi
mov    $0x43,%edx
mov    $0x41,%ecx
call   1030 <hanoi_2@plt>
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0x42,%esi
mov    $0x43,%edx
call   1050 <hanoi@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x42,%esi
mov    $0x43,%edx
mov    $0x41,%ecx
call   1030 <hanoi_2@plt>
lea    0xeaf(%rip),%rdi
call   1040 <puts@plt>
mov    $0x3,%edi
mov    $0x42,%esi
mov    $0x43,%edx
call   1050 <hanoi@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"==============\0A\00"
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 @hanoi_2(i32 3, i8 signext 66, i8 signext 67, i8 signext 65)
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @hanoi(i32 3, i8 signext 66, i8 signext 67)
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"==============\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @hanoi_2(i32 3, i8 signext 66, i8 signext 67, i8 signext 65)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @hanoi(i32 3, i8 signext 66, i8 signext 67)
ret i32 0
}
unsigned int posterize_channel(unsigned int color, unsigned int bits) {
  return (color & ~((1 << bits) - 1)) | (color >> (8 - bits));
}


x86 assembly (clang, -O0):
<posterize_channel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x4(%rbp),%edx
mov    $0x8,%ecx
sub    -0x8(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<posterize_channel>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
shl    %cl,%eax
mov    $0x8,%dl
sub    %cl,%dl
mov    %edx,%ecx
shr    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @posterize_channel(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = sub nsw i32 %7, 1
%9 = xor i32 %8, -1
%10 = and i32 %5, %9
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = sub i32 8, %12
%14 = lshr i32 %11, %13
%15 = or i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @posterize_channel(i32 %0, i32 %1) {
%3 = shl nsw i32 -1, %1
%4 = and i32 %3, %0
%5 = sub i32 8, %1
%6 = lshr i32 %0, %5
%7 = or i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ pRender_PutDataWord(int, unsigned long, int);
void Render_PutDataWord(int HorizontalCount, unsigned long GraphicsData,
                        int Line) {
  pRender_PutDataWord(HorizontalCount, GraphicsData, Line);
}


x86 assembly (clang, -O0):
<Render_PutDataWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <pRender_PutDataWord@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Render_PutDataWord>:
jmp    1030 <pRender_PutDataWord@plt>

LLVM IR (-O0):
define void @Render_PutDataWord(i32 %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i64, i64* %5
%9 = load i32, i32* %6
%10 = call i32 @pRender_PutDataWord(i32 %7, i64 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @Render_PutDataWord(i32 %0, i64 %1, i32 %2) {
%4 = tail call i32 @pRender_PutDataWord(i32 %0, i64 %1, i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ mb_malloc(unsigned int);
int /*<<< orphan*/ memcpy(char *, char *, unsigned int);
char *mb_memdup(char *val, unsigned size) {
  char *result = 0;
  if (val != 0) {
    result = (char *)mb_malloc(size);
    memcpy(result, val, size);
  }
  return result;
}


x86 assembly (clang, -O0):
<mb_memdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115e <mb_memdup+0x3e>
mov    -0xc(%rbp),%edi
call   1030 <mb_malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mb_memdup>:
push   %rbp
push   %r14
push   %rbx
test   %rdi,%rdi
je     1149 <mb_memdup+0x29>
mov    %esi,%r14d
mov    %rdi,%rbp
mov    %esi,%edi
call   1030 <mb_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %r14d,%edx
call   1040 <memcpy@plt>
jmp    114b <mb_memdup+0x2b>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @mb_memdup(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i64 @mb_malloc(i32 %1)
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 @memcpy(i8* %6, i8* %0, i32 %1)
br label %8
8: ; preds = %4, %2
%9 = phi i8* [ %6, %4 ], [ null, %2 ]
ret i8* %9
}
/* Variables and functions */
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_ptr(int /*<<< orphan*/);
void cmd_initscr(int nargs, char **args) {
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(1);
  report_ptr(initscr());
}


x86 assembly (clang, -O0):
<cmd_initscr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1167 <cmd_initscr+0x27>
jmp    117f <cmd_initscr+0x3f>
mov    $0x1,%edi
call   1060 <report_count@plt>
mov    $0x0,%al
call   1030 <initscr@plt>
mov    %eax,%edi
call   1040 <report_ptr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_initscr>:
push   %rax
xor    %esi,%esi
call   1050 <check_arg_count@plt>
cmp    $0x1,%eax
jne    114f <cmd_initscr+0xf>
pop    %rax
ret
mov    $0x1,%edi
call   1060 <report_count@plt>
xor    %eax,%eax
call   1030 <initscr@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <report_ptr@plt>

LLVM IR (-O0):
define void @cmd_initscr(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 = call i32 @check_arg_count(i32 %5, i32 0)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %13
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 (...) @initscr()
%12 = call i32 @report_ptr(i32 %11)
br label %13
13: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @cmd_initscr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 (...) @initscr()
%8 = tail call i32 @report_ptr(i32 %7)
br label %9
9: ; preds = %2, %5
ret void
}
/* Variables and functions */
long double cosl(long double);
long double cbuiltin_cosl(long double x) { return cosl(x); }


x86 assembly (clang, -O0):
<cbuiltin_cosl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <cosl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuiltin_cosl>:
jmp    1030 <cosl@plt>

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

LLVM IR (-O2):
define x86_fp80 @cbuiltin_cosl(x86_fp80 %0) {
%2 = tail call x86_fp80 @cosl(x86_fp80 %0)
ret x86_fp80 %2
}
void av_md5_update() {}


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

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

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

LLVM IR (-O2):
define void @av_md5_update() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ base32_encode_into(void const *, unsigned int, char *);
int /*<<< orphan*/ base32_encode_length(unsigned int);
char *malloc(int /*<<< orphan*/);
char *base32_encode(const void *buf, unsigned int len) {
  char *tmp = malloc(base32_encode_length(len));
  base32_encode_into(buf, len, tmp);
  return tmp;
}


x86 assembly (clang, -O0):
<base32_encode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <base32_encode_length@plt>
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <base32_encode_into@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<base32_encode>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%edi
call   1050 <base32_encode_length@plt>
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %ebp,%esi
mov    %rax,%rdx
call   1030 <base32_encode_into@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @base32_encode(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = call i32 @base32_encode_length(i32 %6)
%8 = call i8* @malloc(i32 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = call i32 @base32_encode_into(i8* %9, i32 %10, i8* %11)
%13 = load i8*, i8** %5
ret i8* %13
}

LLVM IR (-O2):
define i8* @base32_encode(i8* %0, i32 %1) {
%3 = tail call i32 @base32_encode_length(i32 %1)
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 @base32_encode_into(i8* %0, i32 %1, i8* %4)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ MSG_NOSIGNAL;
int /*<<< orphan*/ send(int /*<<< orphan*/, void const *, size_t,
                        int /*<<< orphan*/);
ssize_t send_safe(int32_t sock, const void *buffer, size_t length) {
  return send(sock, buffer, length, MSG_NOSIGNAL);
}


x86 assembly (clang, -O0):
<send_safe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    0x2eab(%rip),%rax
mov    (%rax),%ecx
call   1030 <send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_safe>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <send@plt>

LLVM IR (-O0):
@MSG_NOSIGNAL = global i32 0
define i32 @send_safe(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = load i32, i32* @MSG_NOSIGNAL
%11 = call i32 @send(i32 %7, i8* %8, i64 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@MSG_NOSIGNAL = global i32 0
define i32 @send_safe(i32 %0, i8* %1, i64 %2) {
%4 = load i32, i32* @MSG_NOSIGNAL
%5 = tail call i32 @send(i32 %0, i8* %1, i64 %2, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void write_error(void) {
  do {
    perror("cannot write output file");
    exit(1);
  } while (0);
}


x86 assembly (clang, -O0):
<write_error>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <write_error+0x9>
lea    0xed0(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<write_error>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"cannot write output file\00"
define void @write_error() {
br label %1
1: ; preds = %0
%2 = call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
4: ; No predecessors!
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"cannot write output file\00"
define void @write_error() {
%1 = tail call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
double rmin(double a, double b) { return (a < b ? a : b); }


x86 assembly (clang, -O0):
<rmin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <rmin+0x31>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113b <rmin+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rmin>:
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @rmin(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %3
br label %12
10: ; preds = %2
%11 = load double, double* %4
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @rmin(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ cgetnamgid(int);
int /*<<< orphan*/ fputs(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void putgrpname(int gid) { fputs(cgetnamgid(gid), stdout); }


x86 assembly (clang, -O0):
<putgrpname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <cgetnamgid@plt>
mov    %eax,%edi
mov    0x2ea4(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putgrpname>:
push   %rax
call   1030 <cgetnamgid@plt>
mov    0x2eb3(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
pop    %rax
jmp    1040 <fputs@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @putgrpname(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cgetnamgid(i32 %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fputs(i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @putgrpname(i32 %0) {
%2 = tail call i32 @cgetnamgid(i32 %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputs(i32 %2, i32 %3)
ret void
}
void reverse_array(int arr[], int start, int end) {
  int temp;
  while (start < end) {
    temp = arr[start];
    arr[start] = arr[end];
    arr[end] = temp;
    start++;
    end--;
  }
}


x86 assembly (clang, -O0):
<reverse_array>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1163 <reverse_array+0x63>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    110e <reverse_array+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_array>:
cmp    %edx,%esi
jge    112e <reverse_array+0x2e>
movslq %esi,%rax
movslq %edx,%rcx
add    $0x1,%rax
xchg   %ax,%ax
mov    -0x4(%rdi,%rax,4),%edx
mov    (%rdi,%rcx,4),%esi
mov    %esi,-0x4(%rdi,%rax,4)
mov    %edx,(%rdi,%rcx,4)
add    $0xffffffffffffffff,%rcx
lea    0x1(%rax),%rdx
cmp    %rcx,%rax
mov    %rdx,%rax
jl     1110 <reverse_array+0x10>
ret

LLVM IR (-O0):
define void @reverse_array(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
br label %8
8: ; preds = %12, %3
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %36
12: ; preds = %8
%13 = load i32*, i32** %4
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
store i32 %17, i32* %7
%18 = load i32*, i32** %4
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
%22 = load i32, i32* %21
%23 = load i32*, i32** %4
%24 = load i32, i32* %5
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
%27 = load i32, i32* %7
%28 = load i32*, i32** %4
%29 = load i32, i32* %6
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i32, i32* %28, i64 %30
store i32 %27, i32* %31
%32 = load i32, i32* %5
%33 = add nsw i32 %32, 1
store i32 %33, i32* %5
%34 = load i32, i32* %6
%35 = add nsw i32 %34, -1
store i32 %35, i32* %6
br label %8
36: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @reverse_array(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = sext i32 %2 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ %7, %5 ], [ %16, %8 ]
%10 = phi i64 [ %6, %5 ], [ %15, %8 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %0, i64 %9
%14 = load i32, i32* %13
store i32 %14, i32* %11
store i32 %12, i32* %13
%15 = add nsw i64 %10, 1
%16 = add nsw i64 %9, -1
%17 = icmp slt i64 %15, %16
br i1 %17, label %8, label %18
18: ; preds = %8, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SHUT_RDWR;
int close(int);
int /*<<< orphan*/ printError(char *);
int shutdown(int, int /*<<< orphan*/);
int closeSocket(int sock) {
  if (shutdown(sock, SHUT_RDWR) == -1) {
    printError("Could not shutdown socket");
  }
  return close(sock);
}


x86 assembly (clang, -O0):
<closeSocket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
cmp    $0xffffffff,%eax
jne    1161 <closeSocket+0x31>
lea    0xea4(%rip),%rdi
call   1050 <printError@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeSocket>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
cmp    $0xffffffff,%eax
jne    1152 <closeSocket+0x22>
lea    0xeb3(%rip),%rdi
call   1050 <printError@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <close@plt>

LLVM IR (-O0):
@SHUT_RDWR = global i32 0
@.str = [26 x i8] c"Could not shutdown socket\00"
define i32 @closeSocket(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SHUT_RDWR
%5 = call i32 @shutdown(i32 %3, i32 %4)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @printError(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i32, i32* %2
%11 = call i32 @close(i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@SHUT_RDWR = global i32 0
@.str = [26 x i8] c"Could not shutdown socket\00"
define i32 @closeSocket(i32 %0) {
%2 = load i32, i32* @SHUT_RDWR
%3 = tail call i32 @shutdown(i32 %0, i32 %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @printError(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = tail call i32 @close(i32 %0)
ret i32 %8
}
void gdk_screen_get_default() {}


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

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

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

LLVM IR (-O2):
define void @gdk_screen_get_default() {
ret void
}
void packInt16(unsigned char *buffer, unsigned short value) {
  buffer[0] = value;
  buffer[1] = value >> 8;
}


x86 assembly (clang, -O0):
<packInt16>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%ax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @packInt16(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = trunc i16 %5 to i8
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
store i8 %6, i8* %8
%9 = load i16, i16* %4
%10 = zext i16 %9 to i32
%11 = ashr i32 %10, 8
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
ret void
}

LLVM IR (-O2):
define void @packInt16(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = trunc i16 %1 to i8
store i8 %3, i8* %0
%4 = lshr i16 %1, 8
%5 = trunc i16 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
/* Variables and functions */
float __nv_remquof(float, float, int *);
float remquof(float __a, float __b, int *__c) {
  return __nv_remquof(__a, __b, __c);
}


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

x86 assembly (clang, -O2):
<remquof>:
jmp    1030 <__nv_remquof@plt>

LLVM IR (-O0):
define float @remquof(float %0, float %1, i32* %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca i32*
store float %0, float* %4
store float %1, float* %5
store i32* %2, i32** %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load i32*, i32** %6
%10 = call float @__nv_remquof(float %7, float %8, i32* %9)
ret float %10
}

LLVM IR (-O2):
define float @remquof(float %0, float %1, i32* %2) {
%4 = tail call float @__nv_remquof(float %0, float %1, i32* %2)
ret float %4
}
int pinctrl_dt_to_map(struct pinctrl *p) { return 0; }


x86 assembly (clang, -O0):
<pinctrl_dt_to_map>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pinctrl_dt_to_map>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.pinctrl = type opaque
define i32 @pinctrl_dt_to_map(%struct.pinctrl* %0) {
%2 = alloca %struct.pinctrl*
store %struct.pinctrl* %0, %struct.pinctrl** %2
ret i32 0
}

LLVM IR (-O2):
%struct.pinctrl = type opaque
define i32 @pinctrl_dt_to_map(%struct.pinctrl* nocapture readnone %0) {
ret i32 0
}