xunge/DecIR huggingface dataset:
void *test_anti_range_117(signed char n) {
  extern void *alloc_anti_range_117(signed char) __attribute__((alloc_size(1)));
  if ((-0x7f - 1) + 2 <= n && n <= 0)
    n = (-0x7f - 1) + 2 - 1;
  return alloc_anti_range_117(n);
}


x86 assembly (clang, -O0):
<test_anti_range_117>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0xffffff82,%eax
cmp    %ecx,%eax
jg     1140 <test_anti_range_117+0x30>
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jg     1140 <test_anti_range_117+0x30>
movb   $0x81,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <alloc_anti_range_117@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_117>:
lea    0x7e(%rdi),%eax
cmp    $0x7f,%al
mov    $0x81,%eax
cmovae %edi,%eax
movsbl %al,%edi
jmp    1030 <alloc_anti_range_117@plt>

LLVM IR (-O0):
define i8* @test_anti_range_117(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 -126, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
store i8 -127, i8* %2
br label %11
11: ; preds = %10, %6, %1
%12 = load i8, i8* %2
%13 = call i8* @alloc_anti_range_117(i8 signext %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @test_anti_range_117(i8 signext %0) {
%2 = add i8 %0, 126
%3 = icmp ult i8 %2, 127
%4 = select i1 %3, i8 -127, i8 %0
%5 = tail call i8* @alloc_anti_range_117(i8 signext %4)
ret i8* %5
}
/* Variables and functions */
int getchar();
void waiter_n() {
  int input;
  input = 0;
  while (input != 'n') {
    input = getchar();
  }
  return;
}


x86 assembly (clang, -O0):
<waiter_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x6e,-0x4(%rbp)
je     1138 <waiter_n+0x28>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x4(%rbp)
jmp    111f <waiter_n+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<waiter_n>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0x6e,%eax
jne    1120 <waiter_n+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @waiter_n() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %5, %0
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 110
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = call i32 (...) @getchar()
store i32 %6, i32* %1
br label %2
7: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @waiter_n() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @getchar()
%3 = icmp eq i32 %2, 110
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int abs(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int a = -15;
  printf("a is :%d\n", a);
  printf("abs(a) is :%d\n", abs(a));
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xfffffff1,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%esi
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xfffffff1,%esi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0xf,%esi
call   1030 <printf@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"a is :%d\0A\00"
@.str.1 = [15 x i8] c"abs(a) is :%d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 -15)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 15)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Type definitions */
struct adaptee {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void adaptee_specific_request(struct adaptee *adaptee) {
  printf("adaptee::specific_request()\n");
}


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

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

LLVM IR (-O0):
%struct.adaptee = type { i32 }
@.str = [29 x i8] c"adaptee::specific_request()\0A\00"
define void @adaptee_specific_request(%struct.adaptee* %0) {
%2 = alloca %struct.adaptee*
store %struct.adaptee* %0, %struct.adaptee** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.adaptee = type { i32 }
@str = [28 x i8] c"adaptee::specific_request()\00"
define void @adaptee_specific_request(%struct.adaptee* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int read_multprec_start_system(int decimals) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(493, &decimals, b, c);
  return fail;
}


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

x86 assembly (clang, -O2):
<read_multprec_start_system>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1ed,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @read_multprec_start_system(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 493, i32* %2, i32* undef, double* undef)
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t bit_rotr_u32(uint32_t x, int r) {
  return ((x >> r) | (x << (32 - r)));
}


x86 assembly (clang, -O0):
<bit_rotr_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_rotr_u32>:
mov    %esi,%ecx
mov    %edi,%eax
sar    %cl,%eax
neg    %cl
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @bit_rotr_u32(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 = ashr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = shl i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @bit_rotr_u32(i32 %0, i32 %1) {
%3 = ashr i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
char *leading(char *line) {
  while (line && *line == ' ') {
    line++;
  }
  return line;
}


x86 assembly (clang, -O0):
<leading>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1128 <leading+0x28>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1138 <leading+0x38>
jmp    1149 <leading+0x49>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <leading+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<leading>:
test   %rdi,%rdi
je     111e <leading+0x1e>
add    $0xffffffffffffffff,%rdi
nopl   0x0(%rax)
lea    0x1(%rdi),%rax
cmpb   $0x20,0x1(%rdi)
mov    %rax,%rdi
je     1110 <leading+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @leading(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %7, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 32
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %3, label %8
8: ; preds = %3, %1
%9 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %9
}
int test_imm_D6int8_mem(signed char *val) {
  return ((*val) & (0xD6 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_D6int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 214
%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_D6int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -42
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printAge();
int main() {
  printAge();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <printAge@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @printAge()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @printAge()
ret i32 0
}
void fillscr(n, str) char *str;
int n;
{
  while (n-- > 0) {
    putline(str);
  }
}


x86 assembly (clang, -O0):
<fillscr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jle    1143 <fillscr+0x33>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <putline@plt>
jmp    111f <fillscr+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fillscr>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    1132 <fillscr+0x22>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x1,%ebp
nop
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <putline@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1120 <fillscr+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @fillscr(i32 %0, i8* %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = add nsw i32 %5, -1
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @putline to i32 (i8*, ...)*)(i8* %1)
%8 = icmp ugt i32 %5, 1
br i1 %8, label %4, label %9
9: ; preds = %4, %2
ret void
}
int GE_OP(int x, int y) { return x >= y; }


x86 assembly (clang, -O0):
<GE_OP>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GE_OP>:
xor    %eax,%eax
cmp    %esi,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @GE_OP(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 = icmp sge i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @GE_OP(i32 %0, i32 %1) {
%3 = icmp sge i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int symlink(const char *oldpath, const char *newpath) {
  if (oldpath) {
  }
  if (newpath) {
  }
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<symlink>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     111c <symlink+0x1c>
jmp    111c <symlink+0x1c>
cmpq   $0x0,-0x10(%rbp)
je     112c <symlink+0x2c>
jmp    112c <symlink+0x2c>
mov    0x2eb5(%rip),%rax
mov    (%rax),%ecx
mov    0x2e9c(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<symlink>:
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 @symlink(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %2
br label %8
8: ; preds = %7, %2
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %12
11: ; preds = %8
br label %12
12: ; preds = %11, %8
%13 = load i32, i32* @ENOSYS
store i32 %13, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @symlink(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
void *test_anti_range_77(unsigned short n) {
  extern void *alloc_anti_range_77(unsigned short)
      __attribute__((alloc_size(1)));
  if (1 <= n && n <= 1)
    n = 1 - 1;
  return alloc_anti_range_77(n);
}


x86 assembly (clang, -O0):
<test_anti_range_77>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
jg     1143 <test_anti_range_77+0x33>
movzwl -0x2(%rbp),%eax
cmp    $0x1,%eax
jg     1143 <test_anti_range_77+0x33>
movw   $0x0,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
call   1030 <alloc_anti_range_77@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_77>:
xor    %eax,%eax
cmp    $0x1,%di
cmove  %eax,%edi
jmp    1030 <alloc_anti_range_77@plt>

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

LLVM IR (-O2):
define i8* @test_anti_range_77(i16 zeroext %0) {
%2 = icmp eq i16 %0, 1
%3 = select i1 %2, i16 0, i16 %0
%4 = tail call i8* @alloc_anti_range_77(i16 zeroext %3)
ret i8* %4
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
int /*<<< orphan*/ F_OK;
int access(char const *, int /*<<< orphan*/);
int8_t file_exists(const char *filename) {
  int i = access(filename, F_OK);
  return (i == 0) ? 1 : 0;
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@F_OK = global i32 0
define i32 @file_exists(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @F_OK
%6 = call i32 @access(i8* %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
ret i32 %10
}

LLVM IR (-O2):
@F_OK = global i32 0
define i32 @file_exists(i8* nocapture %0) {
%2 = load i32, i32* @F_OK
%3 = tail call i32 @access(i8* %0, i32 %2)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void DPRINT(int level, char *fmt, ...) {}


x86 assembly (clang, -O0):
<DPRINT>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @DPRINT(i32 %0, i8* %1, ...) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @DPRINT(i32 %0, i8* nocapture %1, ...) {
ret void
}
/* Variables and functions */
int mus_format2bytes(int);
int sound_bytes_per_sample(int format) { return (mus_format2bytes(format)); }


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

x86 assembly (clang, -O2):
<sound_bytes_per_sample>:
jmp    1030 <mus_format2bytes@plt>

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

LLVM IR (-O2):
define i32 @sound_bytes_per_sample(i32 %0) {
%2 = tail call i32 @mus_format2bytes(i32 %0)
ret i32 %2
}
char n2c(int num) {
  if (num == -1)
    return '.';
  if (num < 10)
    return '0' + num;
  else if (num < 10 + 26)
    return 'a' + num - 10;
  else
    return 'A' + num - 10 - 26;
  return '?';
}


x86 assembly (clang, -O0):
<n2c>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    111a <n2c+0x1a>
movb   $0x2e,-0x1(%rbp)
jmp    115c <n2c+0x5c>
cmpl   $0xa,-0x8(%rbp)
jge    1132 <n2c+0x32>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    115c <n2c+0x5c>
cmpl   $0x24,-0x8(%rbp)
jge    114d <n2c+0x4d>
mov    -0x8(%rbp),%eax
add    $0x61,%eax
sub    $0xa,%eax
mov    %al,-0x1(%rbp)
jmp    115c <n2c+0x5c>
mov    -0x8(%rbp),%eax
add    $0x41,%eax
sub    $0xa,%eax
sub    $0x1a,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<n2c>:
cmp    $0xffffffff,%edi
je     110f <n2c+0xf>
mov    %edi,%eax
cmp    $0x9,%edi
jg     1112 <n2c+0x12>
add    $0x30,%al
ret
mov    $0x2e,%al
ret
cmp    $0x23,%eax
ja     111a <n2c+0x1a>
add    $0x57,%al
ret
add    $0x1d,%al
ret

LLVM IR (-O0):
define signext i8 @n2c(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %7
6: ; preds = %1
store i8 46, i8* %2
br label %28
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 10
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i32, i32* %3
%12 = add nsw i32 48, %11
%13 = trunc i32 %12 to i8
store i8 %13, i8* %2
br label %28
14: ; preds = %7
%15 = load i32, i32* %3
%16 = icmp slt i32 %15, 36
br i1 %16, label %17, label %22
17: ; preds = %14
%18 = load i32, i32* %3
%19 = add nsw i32 97, %18
%20 = sub nsw i32 %19, 10
%21 = trunc i32 %20 to i8
store i8 %21, i8* %2
br label %28
22: ; preds = %14
%23 = load i32, i32* %3
%24 = add nsw i32 65, %23
%25 = sub nsw i32 %24, 10
%26 = sub nsw i32 %25, 26
%27 = trunc i32 %26 to i8
store i8 %27, i8* %2
br label %28
28: ; preds = %22, %17, %10, %6
%29 = load i8, i8* %2
ret i8 %29
}

LLVM IR (-O2):
define signext i8 @n2c(i32 %0) {
%2 = icmp eq i32 %0, -1
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = icmp slt i32 %0, 10
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = trunc i32 %0 to i8
%7 = add i8 %6, 48
br label %15
8: ; preds = %3
%9 = icmp ult i32 %0, 36
%10 = trunc i32 %0 to i8
br i1 %9, label %11, label %13
11: ; preds = %8
%12 = add nuw nsw i8 %10, 87
br label %15
13: ; preds = %8
%14 = add i8 %10, 29
br label %15
15: ; preds = %1, %13, %11, %5
%16 = phi i8 [ %7, %5 ], [ %12, %11 ], [ %14, %13 ], [ 46, %1 ]
ret i8 %16
}
/* Variables and functions */
int max(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a[] = {3, 6, 1, 8, 2};
  printf("%d\n", max(a, 5));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecc(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1040 <max@plt>
mov    %eax,%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xee6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1040 <max@plt>
lea    0xec7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [5 x i32] [i32 3, i32 6, i32 1, i32 8, i32 2]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @max(i32* %3, i32 5)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [5 x i32] [i32 3, i32 6, i32 1, i32 8, i32 2]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @max(i32* %3, i32 5)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
int /*<<< orphan*/ system(char *);
Action() {
  char cCommand[1024];
  sprintf(cCommand,
          "blat.exe Test.txt -subject \"Test Complete\" -to name@mail.com "
          "-server mailserver.domain.com -f username@mailserver.domain.com -iu "
          "username -ipw password");
  system(cCommand);
  return 0;
}


x86 assembly (clang, -O0):
<Action>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
lea    -0x400(%rbp),%rdi
lea    0xec7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x400(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Action>:
push   %rbx
sub    $0x400,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    $0x98,%edx
mov    %rbx,%rdi
call   1040 <memcpy@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [152 x i8] c"blat.exe Test.txt -subject \22Test Complete\22 -to name@mail.com -server mailserver.domain.com -f username@mailserver.domain.com -iu username -ipw password\00"
define i32 @Action() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [152 x i8] c"blat.exe Test.txt -subject \22Test Complete\22 -to name@mail.com -server mailserver.domain.com -f username@mailserver.domain.com -iu username -ipw password\00"
define i32 @Action() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32 @system(i8* %2)
ret i32 0
}
int test_imm_4Bint16_mem(short *val) {
  return ((*val) & (0x4B << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_4Bint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, 75
%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_4Bint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 75
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
__attribute__((__always___)) int rte_xtest(void) {
  unsigned char out;
  asm volatile(".byte 0x0f,0x01,0xd6 ; setnz %0" : "=r"(out)::"memory");
  return out;
}


x86 assembly (clang, -O0):
<rte_xtest>:
push   %rbp
mov    %rsp,%rbp
xtest
setne  %al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rte_xtest>:
xtest
setne  %al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @rte_xtest() {
%1 = alloca i8
%2 = call i8 asm sideeffect ".byte 0x0f,0x01,0xd6 ; setnz $0", "=r,~{memory},~{dirflag},~{fpsr},~{flags}"()
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @rte_xtest() {
%1 = tail call i8 asm sideeffect ".byte 0x0f,0x01,0xd6 ; setnz $0", "=r,~{memory},~{dirflag},~{fpsr},~{flags}"()
%2 = zext i8 %1 to i32
ret i32 %2
}
unsigned int compare_and_swap32_value(volatile unsigned int *address,
                                      unsigned int old_value,
                                      unsigned int new_value) {
  unsigned long prev = 0;
  asm volatile("lock ; "
               "cmpxchgl %k1,%2"
               : "=a"(prev)
               : "r"(new_value), "m"(*address), "0"(old_value)
               : "memory");
  return prev;
}


x86 assembly (clang, -O0):
<compare_and_swap32_value>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%eax
lock cmpxchg %ecx,(%rdx)
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_and_swap32_value>:
mov    %esi,%eax
lock cmpxchg %edx,(%rdi)
ret

LLVM IR (-O0):
define i32 @compare_and_swap32_value(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i64 0, i64* %7
%8 = load i32, i32* %6
%9 = load i32*, i32** %4
%10 = load i32, i32* %5
%11 = zext i32 %10 to i64
%12 = call i64 asm sideeffect "lock ; cmpxchgl ${1:k},$2", "={ax},r,*m,0,~{memory},~{dirflag},~{fpsr},~{flags}"(i32 %8, i32* elementtype(i32) %9, i64 %11)
store i64 %12, i64* %7
%13 = load i64, i64* %7
%14 = trunc i64 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @compare_and_swap32_value(i32* %0, i32 %1, i32 %2) {
%4 = zext i32 %1 to i64
%5 = tail call i64 asm sideeffect "lock ; cmpxchgl ${1:k},$2", "={ax},r,*m,0,~{memory},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32* elementtype(i32) %0, i64 %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_CIPHER_CTX;
typedef int /*<<< orphan*/ EVP_CIPHER;

/* Variables and functions */
int /*<<< orphan*/ EVP_CIPHER_CTX_init(int /*<<< orphan*/ *);
int EVP_CipherInit_ex(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                      int /*<<< orphan*/ *, unsigned char const *,
                      unsigned char const *, int);
int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
                   const unsigned char *key, const unsigned char *iv, int enc) {
  if (cipher)
    EVP_CIPHER_CTX_init(ctx);
  return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, enc);
}


x86 assembly (clang, -O0):
<EVP_CipherInit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1150 <EVP_CipherInit+0x30>
mov    -0x8(%rbp),%rdi
call   1030 <EVP_CIPHER_CTX_init@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x24(%rbp),%r9d
xor    %eax,%eax
mov    %eax,%edx
call   1040 <EVP_CipherInit_ex@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EVP_CipherInit>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r14d
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%rbx
mov    %rdi,%rbp
test   %rsi,%rsi
je     1144 <EVP_CipherInit+0x24>
mov    %rbp,%rdi
call   1030 <EVP_CIPHER_CTX_init@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
xor    %edx,%edx
mov    %r12,%rcx
mov    %r15,%r8
mov    %r14d,%r9d
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <EVP_CipherInit_ex@plt>

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

LLVM IR (-O2):
define i32 @EVP_CipherInit(i32* %0, i32* %1, i8* %2, i8* %3, i32 %4) {
%6 = icmp eq i32* %1, null
br i1 %6, label %9, label %7
7: ; preds = %5
%8 = tail call i32 @EVP_CIPHER_CTX_init(i32* %0)
br label %9
9: ; preds = %7, %5
%10 = tail call i32 @EVP_CipherInit_ex(i32* %0, i32* %1, i32* null, i8* %2, i8* %3, i32 %4)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ m_std_error();
m_error(int flags) {
  m_std_error();
  if (flags == -2) {
    exit(EXIT_FAILURE);
  }
  if (flags == -3) {
    _exit(EXIT_FAILURE);
  }
  if (flags == -4) {
  }
}


x86 assembly (clang, -O0):
<m_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <m_std_error@plt>
cmpl   $0xfffffffe,-0x8(%rbp)
jne    115a <m_error+0x2a>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
cmpl   $0xfffffffd,-0x8(%rbp)
jne    1172 <m_error+0x42>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>
cmpl   $0xfffffffc,-0x8(%rbp)
jne    1181 <m_error+0x51>
jmp    1181 <m_error+0x51>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_error>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <m_std_error@plt>
cmp    $0xfffffffd,%ebx
je     1146 <m_error+0x16>
cmp    $0xfffffffe,%ebx
je     1154 <m_error+0x24>
pop    %rbx
ret
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define i32 @m_error(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (...) @m_std_error()
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, -2
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* @EXIT_FAILURE
%9 = call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, -3
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @_exit(i32 %14)
unreachable
16: ; preds = %10
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, -4
br i1 %18, label %19, label %20
19: ; preds = %16
br label %20
20: ; preds = %19, %16
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define i32 @m_error(i32 %0) {
%2 = tail call i32 (...) @m_std_error()
switch i32 %0, label %9 [
i32 -2, label %3
i32 -3, label %6
]
3: ; preds = %1
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
6: ; preds = %1
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @_exit(i32 %7)
unreachable
9: ; preds = %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ execv(char *, char **);
int /*<<< orphan*/ perror(char *);
int main(void) {
  char *argv[] = {"ls", "-al", NULL};
  execv("/bin/ls", argv);
  perror("execv");
  return -1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2cca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cc7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cc4(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1040 <execv@plt>
lea    0xea5(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0x2ce5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0x2cc9(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xec2(%rip),%rdi
mov    %rsp,%rsi
call   1040 <execv@plt>
lea    0xebb(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"ls\00"
@.str.1 = [4 x i8] c"-al\00"
@__const.main.argv = [3 x i8*] [i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* null]
@.str.2 = [8 x i8] c"/bin/ls\00"
@.str.3 = [6 x i8] c"execv\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i8*]
store i32 0, i32* %1
%3 = bitcast [3 x i8*]* %2 to i8*
%4 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 0
%5 = call i32 @execv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8** %4)
%6 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [3 x i8] c"ls\00"
@.str.1 = [4 x i8] c"-al\00"
@__const.main.argv = [3 x i8*] [i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* null]
@.str.2 = [8 x i8] c"/bin/ls\00"
@.str.3 = [6 x i8] c"execv\00"
define i32 @main() {
%1 = alloca [3 x i8*]
%2 = bitcast [3 x i8*]* %1 to i8*
%3 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 0
%4 = call i32 @execv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8** %3)
%5 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 -1
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void quicly_byte_to_hex(char *dst, uint8_t v) {
  dst[0] = "0123456789abcdef"[v >> 4];
  dst[1] = "0123456789abcdef"[v & 0xf];
}


x86 assembly (clang, -O0):
<quicly_byte_to_hex>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x4,%eax
movslq %eax,%rcx
lea    0xee5(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
and    $0xf,%eax
movslq %eax,%rcx
lea    0xecc(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicly_byte_to_hex>:
mov    %esi,%eax
sar    $0x4,%eax
cltq
lea    0xef2(%rip),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,(%rdi)
and    $0xf,%esi
mov    (%rsi,%rcx,1),%al
mov    %al,0x1(%rdi)
ret

LLVM IR (-O0):
@.str = [17 x i8] c"0123456789abcdef\00"
define void @quicly_byte_to_hex(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i32, i32* %4
%13 = and i32 %12, 15
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %14
%16 = load i8, i8* %15
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 1
store i8 %16, i8* %18
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"0123456789abcdef\00"
define void @quicly_byte_to_hex(i8* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 4
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %4
%6 = load i8, i8* %5
store i8 %6, i8* %0
%7 = and i32 %1, 15
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %10, i8* %11
ret void
}
int quotation_mark_is_escaped(int nbraces, const char *p, const char *startp) {
  if (nbraces != 0)
    return 1;
  if (p != startp && *(p - 1) == '\\')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<quotation_mark_is_escaped>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1125 <quotation_mark_is_escaped+0x25>
movl   $0x1,-0x4(%rbp)
jmp    1157 <quotation_mark_is_escaped+0x57>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     1150 <quotation_mark_is_escaped+0x50>
mov    -0x10(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x5c,%eax
jne    1150 <quotation_mark_is_escaped+0x50>
movl   $0x1,-0x4(%rbp)
jmp    1157 <quotation_mark_is_escaped+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<quotation_mark_is_escaped>:
mov    $0x1,%eax
test   %edi,%edi
je     110a <quotation_mark_is_escaped+0xa>
ret
cmp    %rdx,%rsi
je     1115 <quotation_mark_is_escaped+0x15>
cmpb   $0x5c,-0x1(%rsi)
je     1109 <quotation_mark_is_escaped+0x9>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @quotation_mark_is_escaped(i32 %0, i8* %1, i8* readnone %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %5, label %12
5: ; preds = %3
%6 = icmp eq i8* %1, %2
br i1 %6, label %11, label %7
7: ; preds = %5
%8 = getelementptr inbounds i8, i8* %1, i64 -1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 92
br i1 %10, label %12, label %11
11: ; preds = %7, %5
br label %12
12: ; preds = %7, %3, %11
%13 = phi i32 [ 0, %11 ], [ 1, %3 ], [ 1, %7 ]
ret i32 %13
}
/* Variables and functions */
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int);
void functionA(void) {
  int a = omp_get_thread_num();
  printf("This is function A!  Executed by Core %d\n", a);
}


x86 assembly (clang, -O0):
<functionA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<functionA>:
push   %rax
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"This is function A! Executed by Core %d\0A\00"
define void @functionA() {
%1 = alloca i32
%2 = call i32 (...) @omp_get_thread_num()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"This is function A! Executed by Core %d\0A\00"
define void @functionA() {
%1 = tail call i32 (...) @omp_get_thread_num()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void store_NMI_vector(unsigned short *high, unsigned short *low) {}


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

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

LLVM IR (-O0):
define void @store_NMI_vector(i16* %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 @store_NMI_vector(i16* nocapture %0, i16* nocapture %1) {
ret void
}
void gtk_list_store_iter_is_valid() {}


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

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

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

LLVM IR (-O2):
define void @gtk_list_store_iter_is_valid() {
ret void
}
int intmin(register int x, register int y) { return x < y ? x : y; }


x86 assembly (clang, -O0):
<intmin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <intmin+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <intmin+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intmin>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @intmin(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 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @intmin(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
unsigned int unsignedint_ignoring_unsignedshort(unsigned int x,
                                                unsigned short y) {
  return x;
}


x86 assembly (clang, -O0):
<unsignedint_ignoring_unsignedshort>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsignedint_ignoring_unsignedshort>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @unsignedint_ignoring_unsignedshort(i32 returned %0, i16 zeroext %1) {
ret i32 %0
}
/* Variables and functions */
char const *fdt_get_alias_namelen(void const *, char const *,
                                  int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
const char *fdt_get_alias(const void *fdt, const char *name) {
  return fdt_get_alias_namelen(fdt, name, strlen(name));
}


x86 assembly (clang, -O0):
<fdt_get_alias>:
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 <fdt_get_alias_namelen@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdt_get_alias>:
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 <fdt_get_alias_namelen@plt>

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

LLVM IR (-O2):
define i8* @fdt_get_alias(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i8* @fdt_get_alias_namelen(i8* %0, i8* %1, i32 %3)
ret i8* %4
}
void g_async_queue_push() {}


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

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

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

LLVM IR (-O2):
define void @g_async_queue_push() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  for (int c = 1; c < argc; ++c)
    puts(argv[c]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1158 <main+0x48>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <puts@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1142 <main+0x32>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1030 <puts@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
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 1, i32* %6
br label %7
7: ; preds = %18, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i8**, i8*** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i32 @puts(i8* %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %7
21: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %7
6: ; preds = %7, %2
ret i32 0
7: ; preds = %4, %7
%8 = phi i64 [ 1, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @puts(i8* dereferenceable(1) %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}