xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
int main(int argc, char *argv[]) {
  int i;
  for (i = 0; i < argc; i++) {
    printf("argv[%d]=\"%s\"\n", i, argv[i]);
  }
  return argc;
}


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   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1162 <main+0x52>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edi,%r14d
test   %edi,%edi
jle    1147 <main+0x37>
mov    %rsi,%r12
mov    %r14d,%ebx
xor    %ebp,%ebp
lea    0xed2(%rip),%r15
xchg   %ax,%ax
mov    (%r12,%rbp,8),%rdx
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1130 <main+0x20>
mov    %r14d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"argv[%d]=\22%s\22\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i32, i32* %6
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %7
22: ; preds = %7
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
@.str = [15 x i8] c"argv[%d]=\22%s\22\0A\00"
define i32 @main(i32 returned %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void printToBinary(int integer, int bitLen, FILE *outputFile) {
  bitLen--;
  while (bitLen >= 0) {
    fprintf(outputFile, "%d", (integer >> bitLen) & 1);
    --bitLen;
  }
  return;
}


x86 assembly (clang, -O0):
<printToBinary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     115e <printToBinary+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
sar    %cl,%edx
and    $0x1,%edx
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    112b <printToBinary+0x1b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printToBinary>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    114d <printToBinary+0x3d>
mov    %rdx,%r14
mov    %esi,%ebx
mov    %edi,%ebp
add    $0x1,%ebx
lea    0xed4(%rip),%r15
nopl   0x0(%rax)
lea    -0x2(%rbx),%ecx
mov    %ebp,%edx
shr    %cl,%edx
and    $0x1,%edx
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <fprintf@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1130 <printToBinary+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @printToBinary(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32, i32* %5
%8 = add nsw i32 %7, -1
store i32 %8, i32* %5
br label %9
9: ; preds = %12, %3
%10 = load i32, i32* %5
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %21
12: ; preds = %9
%13 = load i32*, i32** %6
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = ashr i32 %14, %15
%17 = and i32 %16, 1
%18 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %5
%20 = add nsw i32 %19, -1
store i32 %20, i32* %5
br label %9
21: ; preds = %9
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @printToBinary(i32 %0, i32 %1, i32* nocapture %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %12
5: ; preds = %3, %5
%6 = phi i32 [ %7, %5 ], [ %1, %3 ]
%7 = add nsw i32 %6, -1
%8 = lshr i32 %0, %7
%9 = and i32 %8, 1
%10 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = icmp ugt i32 %6, 1
br i1 %11, label %5, label %12
12: ; preds = %5, %3
ret void
}
int comp_int_asc(const void *p_i1, const void *p_i2) {
  int i1 = *(int *)p_i1;
  int i2 = *(int *)p_i2;
  if (i1 < i2) {
    return -1;
  }
  if (i1 > i2) {
    return +1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<comp_int_asc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1136 <comp_int_asc+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <comp_int_asc+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    114e <comp_int_asc+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <comp_int_asc+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp_int_asc>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @comp_int_asc(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
store i32 %10, i32* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i32*
%13 = load i32, i32* %12
store i32 %13, i32* %7
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %24
18: ; preds = %2
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = icmp sgt i32 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @comp_int_asc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp sgt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
long long _popcnt64(unsigned long long);
long long test_popcnt64(unsigned long long __X) { return _popcnt64(__X); }


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

x86 assembly (clang, -O2):
<test_popcnt64>:
jmp    1030 <_popcnt64@plt>

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

LLVM IR (-O2):
define i64 @test_popcnt64(i64 %0) {
%2 = tail call i64 @_popcnt64(i64 %0)
ret i64 %2
}
/* Variables and functions */
int factor();
int multiply(int x) { return x * factor(); }


x86 assembly (clang, -O0):
<multiply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <factor@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
imul   %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiply>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <factor@plt>
imul   %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @multiply(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (...) @factor()
%5 = mul nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @multiply(i32 %0) {
%2 = tail call i32 (...) @factor()
%3 = mul nsw i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xad() {
  Assert_real((isalnum(173) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              870, ("isalnum should be 0 for 0xad"));
}


x86 assembly (clang, -O0):
<t_isalnum_0xad>:
push   %rbp
mov    %rsp,%rbp
mov    $0xad,%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x366,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0xad>:
push   %rax
mov    $0xad,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x366,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xad\00"
define void @t_isalnum_0xad() {
%1 = call i64 @isalnum(i32 173)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 870, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xad\00"
define void @t_isalnum_0xad() {
%1 = tail call i64 @isalnum(i32 173)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 870, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x69() {
  Assert_real((isxdigit(105) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              530, ("isxdigit should be 0 for i"));
}


x86 assembly (clang, -O0):
<t_isxdigit_0x69>:
push   %rbp
mov    %rsp,%rbp
mov    $0x69,%edi
call   1030 <isxdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x212,%edx
lea    0xf5c(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isxdigit_0x69>:
push   %rax
mov    $0x69,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x212,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for i\00"
define void @t_isxdigit_0x69() {
%1 = call i64 @isxdigit(i32 105)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 530, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for i\00"
define void @t_isxdigit_0x69() {
%1 = tail call i64 @isxdigit(i32 105)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 530, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void command(char direction) {
  switch (direction) {
  case 'f':
  case 'b':
  case 'l':
  case 'r':
  default:
    printf("Unknown direction");
  }
}


x86 assembly (clang, -O0):
<command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x62,%eax
je     1166 <command+0x56>
jmp    1133 <command+0x23>
mov    -0x8(%rbp),%eax
sub    $0x66,%eax
je     1166 <command+0x56>
jmp    1144 <command+0x34>
mov    -0x8(%rbp),%eax
sub    $0x6c,%eax
je     1166 <command+0x56>
jmp    1155 <command+0x45>
mov    -0x8(%rbp),%eax
sub    $0x72,%eax
jne    116b <command+0x5b>
jmp    1166 <command+0x56>
jmp    116b <command+0x5b>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<command>:
lea    0xee9(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Unknown direction\00"
define void @command(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
switch i32 %4, label %6 [
i32 102, label %5
i32 98, label %5
i32 108, label %5
i32 114, label %5
]
5: ; preds = %1, %1, %1, %1
br label %6
6: ; preds = %1, %5
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Unknown direction\00"
define void @command(i8 signext %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgcalr(void) { gen("call\t*%rax"); }


x86 assembly (clang, -O0):
<cgcalr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <gen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgcalr>:
lea    0xee9(%rip),%rdi
jmp    1030 <gen@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"call\09*%rax\00"
define void @cgcalr() {
%1 = call i32 @gen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"call\09*%rax\00"
define void @cgcalr() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
int cmd_do_internal(struct expr_t *cmd) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.expr_t = type opaque
define i32 @cmd_do_internal(%struct.expr_t* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ output_string(char *);
int /*<<< orphan*/ print_tab();
void output_with_tab(char *ptr) {
  print_tab();
  output_string(ptr);
}


x86 assembly (clang, -O0):
<output_with_tab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <print_tab@plt>
mov    -0x8(%rbp),%rdi
call   1030 <output_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_with_tab>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <print_tab@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <output_string@plt>

LLVM IR (-O0):
define void @output_with_tab(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @print_tab()
%4 = load i8*, i8** %2
%5 = call i32 @output_string(i8* %4)
ret void
}

LLVM IR (-O2):
define void @output_with_tab(i8* %0) {
%2 = tail call i32 (...) @print_tab()
%3 = tail call i32 @output_string(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ObjectPersistenceHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void ObjectPersistenceRequestUpdate() {
  UAVObjRequestUpdate(ObjectPersistenceHandle());
}


x86 assembly (clang, -O0):
<ObjectPersistenceRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ObjectPersistenceHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ObjectPersistenceRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <ObjectPersistenceHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @ObjectPersistenceRequestUpdate() {
%1 = call i32 (...) @ObjectPersistenceHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @ObjectPersistenceRequestUpdate() {
%1 = tail call i32 (...) @ObjectPersistenceHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ UDF_INIT;

/* Variables and functions */
void jfgetreal_deinit(UDF_INIT *initid) { return; }


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

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

LLVM IR (-O0):
define void @jfgetreal_deinit(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
ret void
}

LLVM IR (-O2):
define void @jfgetreal_deinit(i32* nocapture %0) {
ret void
}
char kernel__Char__prec(char self) {
  char var;
  char var1;
  var1 = self - 1;
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<kernel__Char__prec>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x1,%eax
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel__Char__prec>:
lea    -0x1(%rdi),%eax
ret

LLVM IR (-O0):
define signext i8 @kernel__Char__prec(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %6, 1
%8 = trunc i32 %7 to i8
store i8 %8, i8* %4
%9 = load i8, i8* %4
store i8 %9, i8* %3
br label %10
10: ; preds = %1
%11 = load i8, i8* %3
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @kernel__Char__prec(i8 signext %0) {
%2 = add i8 %0, -1
ret i8 %2
}
/* Variables and functions */
int dgt3000EndDisplay();
int dgtpicom_end_text() {
  int e;
  int sendCount = 0;
  while (1) {
    sendCount++;
    if (sendCount > 3) {
      return e;
    }
    e = dgt3000EndDisplay();
    if (e == 0)
      return 0;
  }
}


x86 assembly (clang, -O0):
<dgtpicom_end_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jle    113d <dgtpicom_end_text+0x2d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1162 <dgtpicom_end_text+0x52>
mov    $0x0,%al
call   1030 <dgt3000EndDisplay@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    115d <dgtpicom_end_text+0x4d>
movl   $0x0,-0x4(%rbp)
jmp    1162 <dgtpicom_end_text+0x52>
jmp    111f <dgtpicom_end_text+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dgtpicom_end_text>:
push   %rax
xor    %eax,%eax
call   1030 <dgt3000EndDisplay@plt>
test   %eax,%eax
je     112f <dgtpicom_end_text+0x1f>
xor    %eax,%eax
call   1030 <dgt3000EndDisplay@plt>
test   %eax,%eax
je     112f <dgtpicom_end_text+0x1f>
xor    %eax,%eax
pop    %rcx
jmp    1030 <dgt3000EndDisplay@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dgtpicom_end_text() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %3
br label %4
4: ; preds = %0, %16
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 1
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 3
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = load i32, i32* %2
store i32 %10, i32* %1
br label %17
11: ; preds = %4
%12 = call i32 (...) @dgt3000EndDisplay()
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 0, i32* %1
br label %17
16: ; preds = %11
br label %4
17: ; preds = %15, %9
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @dgtpicom_end_text() {
%1 = tail call i32 (...) @dgt3000EndDisplay()
%2 = icmp eq i32 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i32 (...) @dgt3000EndDisplay()
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 (...) @dgt3000EndDisplay()
br label %8
8: ; preds = %6, %3, %0
%9 = phi i32 [ 0, %0 ], [ 0, %3 ], [ %7, %6 ]
ret i32 %9
}
int lcp_receive_proto_reject(struct lcp_context *context) {
  context = context;
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.lcp_context = type opaque
define i32 @lcp_receive_proto_reject(%struct.lcp_context* nocapture readnone %0) {
ret i32 0
}
int is_prime_f(int a) {
  int i;
  for (i = 2; i < a / 2; ++i)
    if (a % i == 0)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_prime_f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    115b <is_prime_f+0x5b>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1148 <is_prime_f+0x48>
movl   $0x0,-0x4(%rbp)
jmp    1162 <is_prime_f+0x62>
jmp    114d <is_prime_f+0x4d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <is_prime_f+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_prime_f>:
mov    $0x1,%r8d
cmp    $0x6,%edi
jl     1130 <is_prime_f+0x30>
mov    %edi,%esi
shr    %esi
mov    $0x2,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%eax
cltd
idiv   %ecx
test   %edx,%edx
je     1134 <is_prime_f+0x34>
add    $0x1,%ecx
cmp    %ecx,%esi
jne    1120 <is_prime_f+0x20>
mov    %r8d,%eax
ret
xor    %r8d,%r8d
mov    %r8d,%eax
ret

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

LLVM IR (-O2):
define i32 @is_prime_f(i32 %0) {
%2 = icmp sgt i32 %0, 5
br i1 %2, label %3, label %12
3: ; preds = %1
%4 = lshr i32 %0, 1
br label %7
5: ; preds = %7
%6 = icmp eq i32 %11, %4
br i1 %6, label %12, label %7
7: ; preds = %3, %5
%8 = phi i32 [ %11, %5 ], [ 2, %3 ]
%9 = srem i32 %0, %8
%10 = icmp eq i32 %9, 0
%11 = add nuw nsw i32 %8, 1
br i1 %10, label %12, label %5
12: ; preds = %7, %5, %1
%13 = phi i32 [ 1, %1 ], [ 1, %5 ], [ 0, %7 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ sendsig(int);
int main(void) {
  sendsig(20);
  sendsig(30);
  sendsig(38);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x14,%edi
call   1030 <sendsig@plt>
mov    $0x1e,%edi
call   1030 <sendsig@plt>
mov    $0x26,%edi
call   1030 <sendsig@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x14,%edi
call   1030 <sendsig@plt>
mov    $0x1e,%edi
call   1030 <sendsig@plt>
mov    $0x26,%edi
call   1030 <sendsig@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @sendsig(i32 20)
%3 = call i32 @sendsig(i32 30)
%4 = call i32 @sendsig(i32 38)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sendsig(i32 20)
%2 = tail call i32 @sendsig(i32 30)
%3 = tail call i32 @sendsig(i32 38)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getch();
int getline(char *);
int /*<<< orphan*/ printf(char *, int);
main() {
  int d;
  char input[1000], *inputp;
  *inputp = input[0];
  d = getline(inputp);
  printf("%d", d);
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
mov    -0x3f0(%rbp),%cl
mov    -0x3f8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x3f8(%rbp),%rdi
call   1050 <getline@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getch@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

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

LLVM IR (-O2):
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ bswap_64(int /*<<< orphan*/);
uint64_t ntohll(uint64_t x) { return bswap_64(x); }


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

x86 assembly (clang, -O2):
<ntohll>:
jmp    1030 <bswap_64@plt>

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

LLVM IR (-O2):
define i32 @ntohll(i32 %0) {
%2 = tail call i32 @bswap_64(i32 %0)
ret i32 %2
}
/* Type definitions */
struct str_string {
  int dummy;
};

/* Variables and functions */
int str_string_append2(struct str_string *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int str_string_append(struct str_string *str, const char *cstr) {
  return str_string_append2(str, cstr, strlen(cstr));
}


x86 assembly (clang, -O0):
<str_string_append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <str_string_append2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_string_append>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <str_string_append2@plt>

LLVM IR (-O0):
%struct.str_string = type { i32 }
define i32 @str_string_append(%struct.str_string* %0, i8* %1) {
%3 = alloca %struct.str_string*
%4 = alloca i8*
store %struct.str_string* %0, %struct.str_string** %3
store i8* %1, i8** %4
%5 = load %struct.str_string*, %struct.str_string** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @str_string_append2(%struct.str_string* %5, i8* %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.str_string = type { i32 }
define i32 @str_string_append(%struct.str_string* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @str_string_append2(%struct.str_string* %0, i8* %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
char toupper(char const);
void to_upper(char *dst, const char *src) {
  for (; *src; src++, dst++) {
    *dst = toupper(*src);
  }
  *dst = '\0';
}


x86 assembly (clang, -O0):
<to_upper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115e <to_upper+0x4e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <to_upper+0x10>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_upper>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rsi),%al
test   %al,%al
je     114a <to_upper+0x3a>
mov    %rsi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,(%r14)
add    $0x1,%r14
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <to_upper+0x20>
movb   $0x0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @to_upper(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %14, %2
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %5
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = call signext i8 @toupper(i8 signext %11)
%13 = load i8*, i8** %3
store i8 %12, i8* %13
br label %14
14: ; preds = %9
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %4
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %3
br label %5
19: ; preds = %5
%20 = load i8*, i8** %3
store i8 0, i8* %20
ret void
}

LLVM IR (-O2):
define void @to_upper(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %12, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %1, %2 ]
%8 = phi i8* [ %11, %5 ], [ %0, %2 ]
%9 = tail call signext i8 @toupper(i8 signext %6)
store i8 %9, i8* %8
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = load i8, i8* %10
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %2
%15 = phi i8* [ %0, %2 ], [ %11, %5 ]
store i8 0, i8* %15
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ Visual;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_Visual(void *_p) {
  if (_p == NULL)
    abort();
  free((Visual *)_p);
}


x86 assembly (clang, -O0):
<free_Visual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_Visual+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_Visual>:
test   %rdi,%rdi
je     112a <free_Visual+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_Visual(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_Visual(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
/* Variables and functions */
int EOF;
int _inpchar(void **inp) {
  char result;
  char *buf = (char *)(*inp);
  result = *(buf++);
  *inp = (void *)buf;
  return ((result == '\0') ? EOF : result);
}


x86 assembly (clang, -O0):
<_inpchar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
movsbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jne    1150 <_inpchar+0x50>
mov    0x2ea2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
jmp    1157 <_inpchar+0x57>
movsbl -0x9(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_inpchar>:
mov    (%rdi),%rcx
movsbl (%rcx),%eax
add    $0x1,%rcx
mov    %rcx,(%rdi)
test   %eax,%eax
jne    111a <_inpchar+0x1a>
mov    0x2ed0(%rip),%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @_inpchar(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr inbounds i8, i8* %2, i64 1
%4 = load i8, i8* %2
store i8* %3, i8** %0
%5 = sext i8 %4 to i32
%6 = icmp eq i8 %4, 0
%7 = load i32, i32* @EOF
%8 = select i1 %6, i32 %7, i32 %5
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ init_noise_samples();
int /*<<< orphan*/ rnd_table_init();
int /*<<< orphan*/ softclip_table_init();
void tableinit(void) {
  softclip_table_init();
  rnd_table_init();
  init_noise_samples();
}


x86 assembly (clang, -O0):
<tableinit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <softclip_table_init@plt>
mov    $0x0,%al
call   1040 <rnd_table_init@plt>
mov    $0x0,%al
call   1030 <init_noise_samples@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tableinit>:
push   %rax
xor    %eax,%eax
call   1050 <softclip_table_init@plt>
xor    %eax,%eax
call   1040 <rnd_table_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <init_noise_samples@plt>

LLVM IR (-O0):
define void @tableinit() {
%1 = call i32 (...) @softclip_table_init()
%2 = call i32 (...) @rnd_table_init()
%3 = call i32 (...) @init_noise_samples()
ret void
}

LLVM IR (-O2):
define void @tableinit() {
%1 = tail call i32 (...) @softclip_table_init()
%2 = tail call i32 (...) @rnd_table_init()
%3 = tail call i32 (...) @init_noise_samples()
ret void
}
void print_dmatrix_to_file() {}


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

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

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

LLVM IR (-O2):
define void @print_dmatrix_to_file() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct sockaddr_in {
  int /*<<< orphan*/ sin_port;
};
struct sockaddr {
  int dummy;
};
typedef int socklen_t;
typedef int /*<<< orphan*/ address;

/* Variables and functions */
int /*<<< orphan*/ getsockname(int, struct sockaddr *, int *);
int /*<<< orphan*/ ntohs(int /*<<< orphan*/);
uint16_t which_port(int socket) {
  struct sockaddr_in address;
  socklen_t size = sizeof(address);
  getsockname(socket, (struct sockaddr *)&address, &size);
  return ntohs(address.sin_port);
}


x86 assembly (clang, -O0):
<which_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <getsockname@plt>
mov    -0x8(%rbp),%edi
call   1030 <ntohs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<which_port>:
push   %rax
movl   $0x4,0x4(%rsp)
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
call   1040 <getsockname@plt>
mov    (%rsp),%edi
call   1030 <ntohs@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @which_port(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr_in
%4 = alloca i32
store i32 %0, i32* %2
store i32 4, i32* %4
%5 = load i32, i32* %2
%6 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%7 = call i32 @getsockname(i32 %5, %struct.sockaddr* %6, i32* %4)
%8 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i32 @ntohs(i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @which_port(i32 %0) {
%2 = alloca %struct.sockaddr_in
%3 = alloca i32
%4 = bitcast %struct.sockaddr_in* %2 to i8*
%5 = bitcast i32* %3 to i8*
store i32 4, i32* %3
%6 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%7 = call i32 @getsockname(i32 %0, %struct.sockaddr* %6, i32* %3)
%8 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 0
%9 = load i32, i32* %8
%10 = call i32 @ntohs(i32 %9)
ret i32 %10
}
char *element_reference_number_get_heading(char *element_name, char *heading) {
  if (heading && *heading)
    return heading;
  else
    return element_name;
}


x86 assembly (clang, -O0):
<element_reference_number_get_heading>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1134 <element_reference_number_get_heading+0x34>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1134 <element_reference_number_get_heading+0x34>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    113c <element_reference_number_get_heading+0x3c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<element_reference_number_get_heading>:
test   %rsi,%rsi
je     110e <element_reference_number_get_heading+0xe>
mov    %rsi,%rax
cmpb   $0x0,(%rsi)
je     110e <element_reference_number_get_heading+0xe>
ret
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @element_reference_number_get_heading(i8* readnone %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i8, i8* %1
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4, %2
br label %8
8: ; preds = %4, %7
%9 = phi i8* [ %0, %7 ], [ %1, %4 ]
ret i8* %9
}
/* Type definitions */
struct ts_platform_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free_irq(unsigned int, void *);
void board_free_irq(const struct ts_platform_data *pdata, unsigned int irq,
                    void *dev_id) {
  free_irq(irq, dev_id);
}


x86 assembly (clang, -O0):
<board_free_irq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1030 <free_irq@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<board_free_irq>:
mov    %esi,%edi
mov    %rdx,%rsi
jmp    1030 <free_irq@plt>

LLVM IR (-O0):
%struct.ts_platform_data = type { i32 }
define void @board_free_irq(%struct.ts_platform_data* %0, i32 %1, i8* %2) {
%4 = alloca %struct.ts_platform_data*
%5 = alloca i32
%6 = alloca i8*
store %struct.ts_platform_data* %0, %struct.ts_platform_data** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = load i8*, i8** %6
%9 = call i32 @free_irq(i32 %7, i8* %8)
ret void
}

LLVM IR (-O2):
%struct.ts_platform_data = type { i32 }
define void @board_free_irq(%struct.ts_platform_data* nocapture readnone %0, i32 %1, i8* %2) {
%4 = tail call i32 @free_irq(i32 %1, i8* %2)
ret void
}
int test_imm_3Buint16_mem(unsigned short *val) {
  return ((*val) & (0x3B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Buint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0x3b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_3Buint16_mem>:
testb  $0x3b,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_3Buint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, 59
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_3Buint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 59
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct sembuf {
  int sem_op;
  scalar_t__ sem_num;
  scalar_t__ sem_flg;
};

/* Variables and functions */
int /*<<< orphan*/ semop(int, struct sembuf *, int);
void sem_op(int sem_id, int op) {
  struct sembuf sb;
  sb.sem_op = op;
  sb.sem_flg = 0;
  sb.sem_num = 0;
  semop(sem_id, &sb, 1);
}


x86 assembly (clang, -O0):
<sem_op>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sem_op>:
sub    $0x18,%rsp
mov    %esi,(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
mov    %rsp,%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i64, i64 }
define void @sem_op(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sembuf
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 0
store i32 %6, i32* %7
%8 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 2
store i64 0, i64* %8
%9 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 1
store i64 0, i64* %9
%10 = load i32, i32* %3
%11 = call i32 @semop(i32 %10, %struct.sembuf* %5, i32 1)
ret void
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i64, i64 }
define void @sem_op(i32 %0, i32 %1) {
%3 = alloca %struct.sembuf
%4 = bitcast %struct.sembuf* %3 to i8*
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 0
store i32 %1, i32* %5
%6 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 1
%7 = bitcast i64* %6 to i8*
%8 = call i32 @semop(i32 %0, %struct.sembuf* %3, i32 1)
ret void
}
void ff_hevc_put_hevc_uni_qpel_h32_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_h32_8_sse4() {
ret void
}
/* Variables and functions */
int mpVersion();
int bdVersion(void) { return mpVersion(); }


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

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

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

LLVM IR (-O2):
define i32 @bdVersion() {
%1 = tail call i32 (...) @mpVersion()
ret i32 %1
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void OneWireInit(uint32_t ui32Base, uint32_t ui32InitFlags) {
  ASSERT(ui32Base == 0x400B6000);
  (*((volatile uint32_t *)(ui32Base + 0x00000000))) = ui32InitFlags;
}


x86 assembly (clang, -O0):
<OneWireInit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x400b6000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x0,%eax
cltq
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OneWireInit>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x400b6000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebp,%rax
mov    %ebx,(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @OneWireInit(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 = icmp eq i32 %5, 1074487296
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 0
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store volatile i32 %9, i32* %13
ret void
}

LLVM IR (-O2):
define void @OneWireInit(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1074487296
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = sext i32 %0 to i64
%7 = inttoptr i64 %6 to i32*
store volatile i32 %1, i32* %7
ret void
}
void resetLedOnEffect(short ledNumber, short *data) {}


x86 assembly (clang, -O0):
<resetLedOnEffect>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @resetLedOnEffect(i16 signext %0, i16* %1) {
%3 = alloca i16
%4 = alloca i16*
store i16 %0, i16* %3
store i16* %1, i16** %4
ret void
}

LLVM IR (-O2):
define void @resetLedOnEffect(i16 signext %0, i16* nocapture %1) {
ret void
}