xunge/DecIR huggingface dataset:
/* Variables and functions */
int isst_send_mbox_command(int, int, int, int /*<<< orphan*/, int,
                           unsigned int *);
int isst_set_tdp_level_msr(int, int);
int isst_set_tdp_level(int cpu, int tdp_level) {
  unsigned int resp;
  int ret;
  ret = isst_send_mbox_command(cpu, 0x7f, 0x08, 0, tdp_level, &resp);
  if (ret)
    return isst_set_tdp_level_msr(cpu, tdp_level);
  return 0;
}


x86 assembly (clang, -O0):
<isst_set_tdp_level>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%r8d
mov    $0x7f,%esi
mov    $0x8,%edx
xor    %ecx,%ecx
lea    -0x10(%rbp),%r9
call   1030 <isst_send_mbox_command@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     116a <isst_set_tdp_level+0x4a>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <isst_set_tdp_level_msr@plt>
mov    %eax,-0x4(%rbp)
jmp    1171 <isst_set_tdp_level+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isst_set_tdp_level>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%r14d
mov    %edi,%ebp
xor    %ebx,%ebx
lea    0xc(%rsp),%r9
mov    $0x7f,%esi
mov    $0x8,%edx
xor    %ecx,%ecx
mov    %r14d,%r8d
call   1030 <isst_send_mbox_command@plt>
test   %eax,%eax
je     1158 <isst_set_tdp_level+0x38>
mov    %ebp,%edi
mov    %r14d,%esi
call   1040 <isst_set_tdp_level_msr@plt>
mov    %eax,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @isst_set_tdp_level(i32 %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @isst_send_mbox_command(i32 %0, i32 127, i32 8, i32 0, i32 %1, i32* %3)
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = call i32 @isst_set_tdp_level_msr(i32 %0, i32 %1)
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ %8, %7 ], [ 0, %2 ]
ret i32 %10
}
/* Variables and functions */
int f373(int *);
int f374(int *p) { return f373(p); }


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

x86 assembly (clang, -O2):
<f374>:
jmp    1030 <f373@plt>

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

LLVM IR (-O2):
define i32 @f374(i32* %0) {
%2 = tail call i32 @f373(i32* %0)
ret i32 %2
}
int pathconN_nm8_work(int *sz_arg, int *sz_res, int *sz_iw, int *sz_w) {
  if (sz_arg)
    *sz_arg = 1;
  if (sz_res)
    *sz_res = 2;
  if (sz_iw)
    *sz_iw = 0;
  if (sz_w)
    *sz_w = 0;
  return 0;
}


x86 assembly (clang, -O0):
<pathconN_nm8_work>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1129 <pathconN_nm8_work+0x29>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113e <pathconN_nm8_work+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1153 <pathconN_nm8_work+0x53>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1168 <pathconN_nm8_work+0x68>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathconN_nm8_work>:
test   %rdi,%rdi
je     110b <pathconN_nm8_work+0xb>
movl   $0x1,(%rdi)
test   %rsi,%rsi
je     1116 <pathconN_nm8_work+0x16>
movl   $0x2,(%rsi)
test   %rdx,%rdx
je     1121 <pathconN_nm8_work+0x21>
movl   $0x0,(%rdx)
test   %rcx,%rcx
je     112c <pathconN_nm8_work+0x2c>
movl   $0x0,(%rcx)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @pathconN_nm8_work(i32* writeonly %0, i32* writeonly %1, i32* writeonly %2, i32* writeonly %3) {
%5 = icmp eq i32* %0, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i32 1, i32* %0
br label %7
7: ; preds = %6, %4
%8 = icmp eq i32* %1, null
br i1 %8, label %10, label %9
9: ; preds = %7
store i32 2, i32* %1
br label %10
10: ; preds = %9, %7
%11 = icmp eq i32* %2, null
br i1 %11, label %13, label %12
12: ; preds = %10
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10
%14 = icmp eq i32* %3, null
br i1 %14, label %16, label %15
15: ; preds = %13
store i32 0, i32* %3
br label %16
16: ; preds = %15, %13
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ass_tk(int);
int /*<<< orphan*/ pr_token(int);
int /*<<< orphan*/ sendtype(int);
void pr_npag() {
  ass_tk(19);
  sendtype(6);
  pr_token(19);
}


x86 assembly (clang, -O0):
<pr_npag>:
push   %rbp
mov    %rsp,%rbp
mov    $0x13,%edi
call   1030 <ass_tk@plt>
mov    $0x6,%edi
call   1050 <sendtype@plt>
mov    $0x13,%edi
call   1040 <pr_token@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr_npag>:
push   %rax
mov    $0x13,%edi
call   1030 <ass_tk@plt>
mov    $0x6,%edi
call   1050 <sendtype@plt>
mov    $0x13,%edi
pop    %rax
jmp    1040 <pr_token@plt>

LLVM IR (-O0):
define void @pr_npag() {
%1 = call i32 @ass_tk(i32 19)
%2 = call i32 @sendtype(i32 6)
%3 = call i32 @pr_token(i32 19)
ret void
}

LLVM IR (-O2):
define void @pr_npag() {
%1 = tail call i32 @ass_tk(i32 19)
%2 = tail call i32 @sendtype(i32 6)
%3 = tail call i32 @pr_token(i32 19)
ret void
}
/* Variables and functions */
int errno;
void errnop(int *saved_errno) {
  if (saved_errno != NULL)
    errno = *saved_errno;
}


x86 assembly (clang, -O0):
<errnop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1122 <errnop+0x22>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<errnop>:
test   %rdi,%rdi
je     1110 <errnop+0x10>
mov    (%rdi),%eax
mov    0x2ed2(%rip),%rcx
mov    %eax,(%rcx)
ret

LLVM IR (-O0):
@errno = global i32 0
define void @errnop(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
store i32 %7, i32* @errno
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@errno = global i32 0
define void @errnop(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = load i32, i32* %0
store i32 %4, i32* @errno
br label %5
5: ; preds = %3, %1
ret void
}
const char *SkipUntilWhiteSpace(const char *pSrc) {
  while (pSrc && (*pSrc)) {
    if ((*pSrc == ' ') || (*pSrc == '\t')) {
      break;
    }
    pSrc++;
  }
  return pSrc;
}


x86 assembly (clang, -O0):
<SkipUntilWhiteSpace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1128 <SkipUntilWhiteSpace+0x28>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1138 <SkipUntilWhiteSpace+0x38>
jmp    116e <SkipUntilWhiteSpace+0x6e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1158 <SkipUntilWhiteSpace+0x58>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
jne    115d <SkipUntilWhiteSpace+0x5d>
jmp    116e <SkipUntilWhiteSpace+0x6e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <SkipUntilWhiteSpace+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SkipUntilWhiteSpace>:
test   %rdi,%rdi
je     1134 <SkipUntilWhiteSpace+0x34>
mov    %rdi,%rax
movabs $0x100000201,%rcx
jmp    1124 <SkipUntilWhiteSpace+0x24>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rax
movzbl (%rax),%edx
cmp    $0x20,%rdx
ja     1120 <SkipUntilWhiteSpace+0x20>
bt     %rdx,%rcx
jae    1120 <SkipUntilWhiteSpace+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @SkipUntilWhiteSpace(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %24, %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 ne i32 %9, 0
br label %11
11: ; preds = %6, %3
%12 = phi i1 [ false, %3 ], [ %10, %6 ]
br i1 %12, label %13, label %27
13: ; preds = %11
%14 = load i8*, i8** %2
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 32
br i1 %17, label %23, label %18
18: ; preds = %13
%19 = load i8*, i8** %2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 9
br i1 %22, label %23, label %24
23: ; preds = %18, %13
br label %27
24: ; preds = %18
%25 = load i8*, i8** %2
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %2
br label %3
27: ; preds = %23, %11
%28 = load i8*, i8** %2
ret i8* %28
}

LLVM IR (-O2):
define i8* @SkipUntilWhiteSpace(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1, %6
%4 = phi i8* [ %7, %6 ], [ %0, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 0, label %8
i8 32, label %8
i8 9, label %8
]
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %4, i64 1
br label %3
8: ; preds = %3, %3, %3, %1
%9 = phi i8* [ null, %1 ], [ %4, %3 ], [ %4, %3 ], [ %4, %3 ]
ret i8* %9
}
void *obs_id_(void *data) { return data; }


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

x86 assembly (clang, -O2):
<obs_id_>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @obs_id_(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret i8* %3
}

LLVM IR (-O2):
define i8* @obs_id_(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char);
int main() {
  char letter, letter_1;
  letter = 'A';
  letter_1 = 66;
  printf("Char example 1 = %c\nChar example 2 = %c\n", letter, letter_1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
movb   $0x42,-0x6(%rbp)
mov    -0x5(%rbp),%al
lea    0xecf(%rip),%rdi
movsbl %al,%esi
movsbl -0x6(%rbp),%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [41 x i8] c"Char example 1 = %c\0AChar example 2 = %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
store i8 65, i8* %2
store i8 66, i8* %3
%4 = load i8, i8* %2
%5 = load i8, i8* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8 signext %4, i8 signext %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"Char example 1 = %c\0AChar example 2 = %c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8 signext 65, i8 signext 66)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int x;
  printf("Number please: ");
  scanf("%i", &x);
  printf("Thanks for the %i!\n", x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%esi
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Number please: \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [20 x i8] c"Thanks for the %i!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Number please: \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [20 x i8] c"Thanks for the %i!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%d\n", EOF);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @EOF
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void consume_whitespace(char **s) {
  while (**s == ' ')
    (*s)++;
}


x86 assembly (clang, -O0):
<consume_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    112e <consume_whitespace+0x2e>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1108 <consume_whitespace+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<consume_whitespace>:
mov    (%rdi),%rax
cmpb   $0x20,(%rax)
jne    111c <consume_whitespace+0x1c>
add    $0x1,%rax
nopl   0x0(%rax)
mov    %rax,(%rdi)
cmpb   $0x20,(%rax)
lea    0x1(%rax),%rax
je     1110 <consume_whitespace+0x10>
ret

LLVM IR (-O0):
define void @consume_whitespace(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
br label %3
3: ; preds = %9, %1
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 32
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load i8**, i8*** %2
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %10
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @consume_whitespace(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 32
br i1 %4, label %5, label %10
5: ; preds = %1, %5
%6 = phi i8* [ %7, %5 ], [ %2, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
store i8* %7, i8** %0
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 32
br i1 %9, label %5, label %10
10: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i2cWrite(int, int);
void PAC9685PwmOn() { i2cWrite(0x00, 0x00); }


x86 assembly (clang, -O0):
<PAC9685PwmOn>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
mov    %esi,%edi
call   1030 <i2cWrite@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PAC9685PwmOn>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <i2cWrite@plt>

LLVM IR (-O0):
define void @PAC9685PwmOn() {
%1 = call i32 @i2cWrite(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @PAC9685PwmOn() {
%1 = tail call i32 @i2cWrite(i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wmbusParser(char *, int);
void scaleForObix(void) {
  wmbusParser("\x01\x04\x01", sizeof("\x01\x04\x01") - 1);
  wmbusParser("\x01\x02\x01", sizeof("\x01\x02\x01") - 1);
  wmbusParser("\x05\x0FD\x47\x4a\x32\x65\x43",
              sizeof("\x05\x0FD\x47\x4a\x32\x65\x43") - 1);
}


x86 assembly (clang, -O0):
<scaleForObix>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x3,%esi
call   1030 <wmbusParser@plt>
lea    0xed8(%rip),%rdi
mov    $0x3,%esi
call   1030 <wmbusParser@plt>
lea    0xecb(%rip),%rdi
mov    $0x7,%esi
call   1030 <wmbusParser@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<scaleForObix>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x3,%esi
call   1030 <wmbusParser@plt>
lea    0xedb(%rip),%rdi
mov    $0x3,%esi
call   1030 <wmbusParser@plt>
lea    0xece(%rip),%rdi
mov    $0x7,%esi
pop    %rax
jmp    1030 <wmbusParser@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\01\04\01\00"
@.str.1 = [4 x i8] c"\01\02\01\00"
@.str.2 = [8 x i8] c"\05\FDGJ2eC\00"
define void @scaleForObix() {
%1 = call i32 @wmbusParser(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%2 = call i32 @wmbusParser(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%3 = call i32 @wmbusParser(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\01\04\01\00"
@.str.1 = [4 x i8] c"\01\02\01\00"
@.str.2 = [8 x i8] c"\05\FDGJ2eC\00"
define void @scaleForObix() {
%1 = tail call i32 @wmbusParser(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%2 = tail call i32 @wmbusParser(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%3 = tail call i32 @wmbusParser(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ luaL_nonnullarg(int);
int /*<<< orphan*/ lua_pushobject(int /*<<< orphan*/);
int /*<<< orphan*/ lua_rawgettable();
void rawgettable(void) {
  lua_pushobject(luaL_nonnullarg(1));
  lua_pushobject(luaL_nonnullarg(2));
  lua_pushobject(lua_rawgettable());
}


x86 assembly (clang, -O0):
<rawgettable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <luaL_nonnullarg@plt>
mov    %eax,%edi
call   1050 <lua_pushobject@plt>
mov    $0x2,%edi
call   1040 <luaL_nonnullarg@plt>
mov    %eax,%edi
call   1050 <lua_pushobject@plt>
mov    $0x0,%al
call   1030 <lua_rawgettable@plt>
mov    %eax,%edi
call   1050 <lua_pushobject@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rawgettable>:
push   %rax
mov    $0x1,%edi
call   1040 <luaL_nonnullarg@plt>
mov    %eax,%edi
call   1050 <lua_pushobject@plt>
mov    $0x2,%edi
call   1040 <luaL_nonnullarg@plt>
mov    %eax,%edi
call   1050 <lua_pushobject@plt>
xor    %eax,%eax
call   1030 <lua_rawgettable@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <lua_pushobject@plt>

LLVM IR (-O0):
define void @rawgettable() {
%1 = call i32 @luaL_nonnullarg(i32 1)
%2 = call i32 @lua_pushobject(i32 %1)
%3 = call i32 @luaL_nonnullarg(i32 2)
%4 = call i32 @lua_pushobject(i32 %3)
%5 = call i32 (...) @lua_rawgettable()
%6 = call i32 @lua_pushobject(i32 %5)
ret void
}

LLVM IR (-O2):
define void @rawgettable() {
%1 = tail call i32 @luaL_nonnullarg(i32 1)
%2 = tail call i32 @lua_pushobject(i32 %1)
%3 = tail call i32 @luaL_nonnullarg(i32 2)
%4 = tail call i32 @lua_pushobject(i32 %3)
%5 = tail call i32 (...) @lua_rawgettable()
%6 = tail call i32 @lua_pushobject(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ switch_on_bits(unsigned char *, int);
void CTRL_REGSB_BITSET_KXSD9_nor_op(unsigned char *data) {
  switch_on_bits(data, (0x40));
}


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

x86 assembly (clang, -O2):
<CTRL_REGSB_BITSET_KXSD9_nor_op>:
mov    $0x40,%esi
jmp    1030 <switch_on_bits@plt>

LLVM IR (-O0):
define void @CTRL_REGSB_BITSET_KXSD9_nor_op(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @switch_on_bits(i8* %3, i32 64)
ret void
}

LLVM IR (-O2):
define void @CTRL_REGSB_BITSET_KXSD9_nor_op(i8* %0) {
%2 = tail call i32 @switch_on_bits(i8* %0, i32 64)
ret void
}
/* Type definitions */
struct kobject {
  int dummy;
};
struct kobj_attribute {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ register_input_dev();
ssize_t register_device_store(struct kobject *kobj, struct kobj_attribute *attr,
                              const char *buf, size_t count) {
  register_input_dev();
  return 0;
}


x86 assembly (clang, -O0):
<register_device_store>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x0,%al
call   1030 <register_input_dev@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.kobject = type { i32 }
%struct.kobj_attribute = type { i32 }
define i32 @register_device_store(%struct.kobject* %0, %struct.kobj_attribute* %1, i8* %2, i64 %3) {
%5 = alloca %struct.kobject*
%6 = alloca %struct.kobj_attribute*
%7 = alloca i8*
%8 = alloca i64
store %struct.kobject* %0, %struct.kobject** %5
store %struct.kobj_attribute* %1, %struct.kobj_attribute** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = call i32 (...) @register_input_dev()
ret i32 0
}

LLVM IR (-O2):
%struct.kobject = type { i32 }
%struct.kobj_attribute = type { i32 }
define i32 @register_device_store(%struct.kobject* nocapture readnone %0, %struct.kobj_attribute* nocapture readnone %1, i8* nocapture readnone %2, i64 %3) {
%5 = tail call i32 (...) @register_input_dev()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ term_disable(int);
int /*<<< orphan*/ term_enable(int);
void set_echo(int onoff) {
  term_disable(0x0001);
  if (onoff)
    term_enable(0x0001);
}


x86 assembly (clang, -O0):
<set_echo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <term_disable@plt>
cmpl   $0x0,-0x4(%rbp)
je     1149 <set_echo+0x29>
mov    $0x1,%edi
call   1040 <term_enable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_echo>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
call   1030 <term_disable@plt>
test   %ebx,%ebx
je     113c <set_echo+0x1c>
mov    $0x1,%edi
pop    %rbx
jmp    1040 <term_enable@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @set_echo(i32 %0) {
%2 = tail call i32 @term_disable(i32 1)
%3 = icmp eq i32 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @term_enable(i32 1)
br label %6
6: ; preds = %4, %1
ret void
}
int adb_mouse_read(__attribute__((unused)) void *private) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @adb_mouse_read(i8* nocapture readnone %0) {
ret i32 -1
}
OP(dd, e2) {
  illegal_1();
  op_e2();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_e2@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP>:
push   %rax
xor    %eax,%eax
call   1030 <illegal_1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <op_e2@plt>

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_e2()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_e2()
ret i32 undef
}
__attribute__((no, noclone)) int f1(int x, int y) { return x % y; }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @f1(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 = srem i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @f1(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
ret i32 %3
}
/* Type definitions */
struct mux {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __connect_server(struct mux *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void __reconnect_timercb(int fd, short events, void *ctx) {
  fprintf(stdout, "muxconn: reconnecting to server...."
                  "\n");
  __connect_server((struct mux *)ctx);
}


x86 assembly (clang, -O0):
<__reconnect_timercb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %rdx,-0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <__connect_server@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__reconnect_timercb>:
push   %rbx
mov    %rdx,%rbx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <__connect_server@plt>

LLVM IR (-O0):
%struct.mux = type { i32 }
@stdout = global i32 0
@.str = [37 x i8] c"muxconn: reconnecting to server....\0A\00"
define void @__reconnect_timercb(i32 %0, i16 signext %1, i8* %2) {
%4 = alloca i32
%5 = alloca i16
%6 = alloca i8*
store i32 %0, i32* %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%7 = load i32, i32* @stdout
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%9 = load i8*, i8** %6
%10 = bitcast i8* %9 to %struct.mux*
%11 = call i32 @__connect_server(%struct.mux* %10)
ret void
}

LLVM IR (-O2):
%struct.mux = type { i32 }
@stdout = global i32 0
@.str = [37 x i8] c"muxconn: reconnecting to server....\0A\00"
define void @__reconnect_timercb(i32 %0, i16 signext %1, i8* %2) {
%4 = load i32, i32* @stdout
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%6 = bitcast i8* %2 to %struct.mux*
%7 = tail call i32 @__connect_server(%struct.mux* %6)
ret void
}
/* Variables and functions */
char *podstring(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char s1[] = "aabc";
  char s2[] = "abc";
  printf("%s", podstring(s1, s2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xec6(%rip),%al
mov    %al,-0x5(%rbp)
mov    0xeba(%rip),%eax
mov    %eax,-0xd(%rbp)
lea    -0x9(%rbp),%rdi
lea    -0xd(%rbp),%rsi
call   1040 <podstring@plt>
mov    %rax,%rsi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movb   $0x0,0x10(%rsp)
movl   $0x63626161,0xc(%rsp)
63
movl   $0x636261,0x14(%rsp)
lea    0xc(%rsp),%rdi
lea    0x14(%rsp),%rsi
call   1040 <podstring@plt>
lea    0xeb6(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.s1 = [5 x i8] c"aabc\00"
@__const.main.s2 = [4 x i8] c"abc\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca [4 x i8]
store i32 0, i32* %1
%4 = bitcast [5 x i8]* %2 to i8*
%5 = bitcast [4 x i8]* %3 to i8*
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%8 = call i8* @podstring(i8* %6, i8* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s1 = [5 x i8] c"aabc\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%4 = bitcast i32* %2 to i8*
store i32 6513249, i32* %2
%5 = call i8* @podstring(i8* %3, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_python_unsupported_msg();
int python_generate_script_unsupported(const char *outfile
                                       __attribute__((unused))) {
  print_python_unsupported_msg();
  return -1;
}


x86 assembly (clang, -O0):
<python_generate_script_unsupported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <print_python_unsupported_msg@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<python_generate_script_unsupported>:
push   %rax
xor    %eax,%eax
call   1030 <print_python_unsupported_msg@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @python_generate_script_unsupported(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @print_python_unsupported_msg()
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ cache_tick();
int /*<<< orphan*/ query_tick();
void tick_cb(void) {
  query_tick();
  cache_tick();
}


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

x86 assembly (clang, -O2):
<tick_cb>:
push   %rax
xor    %eax,%eax
call   1040 <query_tick@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <cache_tick@plt>

LLVM IR (-O0):
define void @tick_cb() {
%1 = call i32 (...) @query_tick()
%2 = call i32 (...) @cache_tick()
ret void
}

LLVM IR (-O2):
define void @tick_cb() {
%1 = tail call i32 (...) @query_tick()
%2 = tail call i32 (...) @cache_tick()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void __attribute__((no)) foo(void) { abort(); }


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

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @foo() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @foo() {
%1 = tail call i32 (...) @abort()
unreachable
}
int HelpItem3(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @HelpItem3() {
ret i32 0
}

LLVM IR (-O2):
define i32 @HelpItem3() {
ret i32 0
}
void ExttProductTypeAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttProductTypeAuxTable() {
ret void
}
char *assert_str(unsigned char val) {
  char *pstr;
  if ((val & 0x0f) == 0)
    pstr = "Deasserted";
  else
    pstr = "Asserted";
  return (pstr);
}


x86 assembly (clang, -O0):
<assert_str>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
cmp    $0x0,%eax
jne    112a <assert_str+0x2a>
lea    0xedf(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1135 <assert_str+0x35>
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_str>:
test   $0xf,%dil
lea    0xef5(%rip),%rcx
lea    0xef9(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Deasserted\00"
@.str.1 = [9 x i8] c"Asserted\00"
define i8* @assert_str(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8*
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = and i32 %5, 15
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %3
br label %10
9: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %10
10: ; preds = %9, %8
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [11 x i8] c"Deasserted\00"
@.str.1 = [9 x i8] c"Asserted\00"
define i8* @assert_str(i8 zeroext %0) {
%2 = and i8 %0, 15
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0)
ret i8* %4
}
/* Variables and functions */
int ndigits(size_t);
int /*<<< orphan*/ printf(char *, int, size_t);
int wrlnr(size_t stopat, size_t n) {
  int nd = ndigits(stopat);
  printf("%0*zu ", nd, n);
}


x86 assembly (clang, -O0):
<wrlnr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ndigits@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrlnr>:
push   %rbx
mov    %rsi,%rbx
call   1030 <ndigits@plt>
lea    0xed0(%rip),%rdi
mov    %eax,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"%0*zu \00"
define i32 @wrlnr(i64 %0, i64 %1) {
%3 = tail call i32 @ndigits(i64 %0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3, i64 %1)
ret i32 undef
}
/* Variables and functions */
size_t tolower(int);
void re_set_fastmap(char *fastmap, int icase, int ch) {
  fastmap[ch] = 1;
  if (icase)
    fastmap[tolower(ch)] = 1;
}


x86 assembly (clang, -O0):
<re_set_fastmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x1,(%rax,%rcx,1)
cmpl   $0x0,-0xc(%rbp)
je     1153 <re_set_fastmap+0x43>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <tolower@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
movb   $0x1,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<re_set_fastmap>:
push   %rbx
movslq %edx,%rax
movb   $0x1,(%rdi,%rax,1)
test   %esi,%esi
je     112a <re_set_fastmap+0x1a>
mov    %rdi,%rbx
mov    %edx,%edi
call   1030 <tolower@plt>
movb   $0x1,(%rbx,%rax,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @re_set_fastmap(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 1, i8* %5
%6 = icmp eq i32 %1, 0
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = tail call i64 @tolower(i32 %2)
%9 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 1, i8* %9
br label %10
10: ; preds = %7, %3
ret void
}
double _I_0(void) { return 0.0; }


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

x86 assembly (clang, -O2):
<_I_0>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @_I_0() {
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @_I_0() {
ret double 0.000000e+00
}
void unregister_tui_driver(const char *name) {}


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

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

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

LLVM IR (-O2):
define void @unregister_tui_driver(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int syscall(int);
int uv__epoll_create(void) { return syscall(213); }


x86 assembly (clang, -O0):
<uv__epoll_create>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd5,%edi
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uv__epoll_create>:
mov    $0xd5,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @uv__epoll_create() {
%1 = call i32 @syscall(i32 213)
ret i32 %1
}

LLVM IR (-O2):
define i32 @uv__epoll_create() {
%1 = tail call i32 @syscall(i32 213)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ japi_setfixlayout(int);
void j_setfixlayout(int arg0) { japi_setfixlayout(arg0); }


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

x86 assembly (clang, -O2):
<j_setfixlayout>:
jmp    1030 <japi_setfixlayout@plt>

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

LLVM IR (-O2):
define void @j_setfixlayout(i32 %0) {
%2 = tail call i32 @japi_setfixlayout(i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ sqrt(float);
int faster(int num) { return (int)sqrt((float)num); }


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

x86 assembly (clang, -O2):
<faster>:
cvtsi2ss %edi,%xmm0
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define i32 @faster(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to float
%5 = call i64 @sqrt(float %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @faster(i32 %0) {
%2 = sitofp i32 %0 to float
%3 = tail call i64 @sqrt(float %2)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void MemFree(void **ppvFree) {
  free(*ppvFree);
  *ppvFree = 0;
}


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

x86 assembly (clang, -O2):
<MemFree>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @MemFree(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = call i32 @free(i8* %4)
%6 = load i8**, i8*** %2
store i8* null, i8** %6
ret void
}

LLVM IR (-O2):
define void @MemFree(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @free(i8* %2)
store i8* null, i8** %0
ret void
}
int f_gt_mm1(float *a1, float *a2) { return (((*a1) > (*a2))); }


x86 assembly (clang, -O0):
<f_gt_mm1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomiss (%rax),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_gt_mm1>:
movss  (%rdi),%xmm0
xor    %eax,%eax
ucomiss (%rsi),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @f_gt_mm1(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = load float*, float** %4
%8 = load float, float* %7
%9 = fcmp ogt float %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @f_gt_mm1(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = fcmp ogt float %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ ft_printf(char *, int);
int main(void) {
  int number;
  number = 235;
  ft_printf("This is a number, %d\n", number);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xeb,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
call   1030 <ft_printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xeb,%esi
call   1030 <ft_printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"This is a number, %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 235, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ft_printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"This is a number, %d\0A\00"
define i32 @main() {
%1 = tail call i32 @ft_printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 235)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ scrputs(char *);
void scrclr(void) { scrputs("\033[2J"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2J\00"
define void @scrclr() {
%1 = call i32 @scrputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
define void @scrclr() {
%1 = tail call i32 @scrputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hash_table_create_test();
int /*<<< orphan*/ hash_table_insert_test();
int /*<<< orphan*/ printf(char *);
int main(void) {
  hash_table_create_test();
  hash_table_insert_test();
  printf("All hash table tests passed\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <hash_table_create_test@plt>
mov    $0x0,%al
call   1040 <hash_table_insert_test@plt>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <hash_table_create_test@plt>
xor    %eax,%eax
call   1040 <hash_table_insert_test@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"All hash table tests passed\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @hash_table_create_test()
%3 = call i32 (...) @hash_table_insert_test()
%4 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [28 x i8] c"All hash table tests passed\00"
define i32 @main() {
%1 = tail call i32 (...) @hash_table_create_test()
%2 = tail call i32 (...) @hash_table_insert_test()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void usb_amd_quirk_pll_enable(void) {}


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

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

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

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