xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void sayhello(const char *msg) {
  if (!msg)
    printf("Hello, World!\n");
  else
    printf("Hello from %s\n", msg);
}


x86 assembly (clang, -O0):
<sayhello>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113a <sayhello+0x2a>
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    114c <sayhello+0x3c>
mov    -0x8(%rbp),%rsi
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sayhello>:
test   %rdi,%rdi
je     1136 <sayhello+0x16>
mov    %rdi,%rsi
lea    0xed1(%rip),%rdi
xor    %eax,%eax
jmp    1040 <printf@plt>
lea    0xed2(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
@.str.1 = [15 x i8] c"Hello from %s\0A\00"
define void @sayhello(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str.1 = [15 x i8] c"Hello from %s\0A\00"
@str = [14 x i8] c"Hello, World!\00"
define void @sayhello(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
br label %7
5: ; preds = %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putch(char const);
int strlen(char const *);
void puts(const char *text) {
  int i;
  for (i = 0; i < strlen(text); i++) {
    putch(text[i]);
  }
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    116e <puts+0x4e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <putch@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <puts+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    115d <puts+0x3d>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1040 <putch@plt>
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1140 <puts+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @puts(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call i32 @putch(i8 signext %7)
%9 = add nuw nsw i64 %5, 1
%10 = tail call i32 @strlen(i8* %0)
%11 = sext i32 %10 to i64
%12 = icmp slt i64 %9, %11
br i1 %12, label %4, label %13
13: ; preds = %4, %1
ret void
}
void fakeArDecodeAndPlaySample(char *sampleData, int sampleLength) {}


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

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

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

LLVM IR (-O2):
define void @fakeArDecodeAndPlaySample(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int __mib_chain_add(int, void *);
int _mib_chain_add(int id, const void *ptr) {
  return __mib_chain_add(id, (void *)ptr);
}


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

x86 assembly (clang, -O2):
<_mib_chain_add>:
jmp    1030 <__mib_chain_add@plt>

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

LLVM IR (-O2):
define i32 @_mib_chain_add(i32 %0, i8* %1) {
%3 = tail call i32 @__mib_chain_add(i32 %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int abs(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *);
int main() {
  int x1, y1, x2, y2;
  scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
  printf("%d\n", abs(x1 - x2) + abs(y1 - y2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
sub    -0x10(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
sub    -0x14(%rbp),%edi
call   1030 <abs@plt>
mov    -0x18(%rbp),%esi
add    %eax,%esi
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1040 <scanf@plt>
mov    0x14(%rsp),%eax
sub    0xc(%rsp),%eax
mov    %eax,%ecx
neg    %ecx
cmovs  %eax,%ecx
mov    0x10(%rsp),%eax
sub    0x8(%rsp),%eax
mov    %eax,%esi
neg    %esi
cmovs  %eax,%esi
add    %ecx,%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d%d%d%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = load i32, i32* %3
%12 = sub nsw i32 %10, %11
%13 = call i32 @llvm.abs.i32(i32 %12, i1 true)
%14 = load i32, i32* %2
%15 = load i32, i32* %4
%16 = sub nsw i32 %14, %15
%17 = call i32 @llvm.abs.i32(i32 %16, i1 true)
%18 = add nuw nsw i32 %17, %13
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %18)
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int intcelcon_set_type_of_mixture(int r, int *mix) {
  int fail, i;
  double *c;
  fail = _ada_use_c2phc4c(753, &r, mix, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<intcelcon_set_type_of_mixture>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x2f1,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @intcelcon_set_type_of_mixture(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%8 = load i32*, i32** %4
%9 = load double*, double** %7
%10 = call i32 @_ada_use_c2phc4c(i32 753, i32* %3, i32* %8, double* %9, i32 0)
store i32 %10, i32* %5
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @intcelcon_set_type_of_mixture(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc4c(i32 753, i32* %3, i32* %1, double* undef, i32 0)
ret i32 %4
}
void intif_itembound_req(int char_id, int aid, int guild_id) {}


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

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

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

LLVM IR (-O2):
define void @intif_itembound_req(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
char *wad_strcpy(char *, char const *);
char *wad_strcat(char *t, const char *s) {
  while (*t)
    t++;
  return wad_strcpy(t, s);
}


x86 assembly (clang, -O0):
<wad_strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113e <wad_strcat+0x2e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <wad_strcat+0x10>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <wad_strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wad_strcat>:
add    $0xffffffffffffffff,%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpb   $0x0,0x1(%rdi)
lea    0x1(%rdi),%rdi
jne    1120 <wad_strcat+0x10>
jmp    1030 <wad_strcpy@plt>

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

LLVM IR (-O2):
define i8* @wad_strcat(i8* %0, i8* %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = tail call i8* @wad_strcpy(i8* %4, i8* %1)
ret i8* %9
}
void av_packet_get_side_data() {}


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

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

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

LLVM IR (-O2):
define void @av_packet_get_side_data() {
ret void
}
/* Variables and functions */
bool nrf53_errata_69(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_69() {
ret i32 0
}
char *dgettext(const char *domainname, const char *msgid) {
  (void)domainname;
  return (char *)msgid;
}


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

x86 assembly (clang, -O2):
<dgettext>:
mov    %rsi,%rax
ret

LLVM IR (-O0):
define i8* @dgettext(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
ret i8* %6
}

LLVM IR (-O2):
define i8* @dgettext(i8* nocapture readnone %0, i8* readnone returned %1) {
ret i8* %1
}
/* Variables and functions */
size_t hash1(char *key, size_t num, size_t last) {
  size_t hashVal = 5381 + last;
  int c;
  while ((c = *key++) != '\0')
    hashVal = ((hashVal << 5) + hashVal) ^ c;
  return hashVal % num;
}


x86 assembly (clang, -O0):
<hash1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1505,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x24(%rbp)
cmp    $0x0,%eax
je     1158 <hash1+0x58>
mov    -0x20(%rbp),%rax
shl    $0x5,%rax
add    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
xor    %rcx,%rax
mov    %rax,-0x20(%rbp)
jmp    111e <hash1+0x1e>
mov    -0x20(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash1>:
mov    %rdx,%rax
add    $0x1505,%rax
mov    (%rdi),%cl
test   %cl,%cl
je     113c <hash1+0x3c>
add    $0x1,%rdi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
xor    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1120 <hash1+0x20>
mov    %rax,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1151 <hash1+0x51>
xor    %edx,%edx
div    %rsi
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i64 @hash1(i8* nocapture %0, i64 %1, i64 %2) {
%4 = add i64 %2, 5381
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %17, label %7
7: ; preds = %3, %7
%8 = phi i8 [ %15, %7 ], [ %5, %3 ]
%9 = phi i8* [ %11, %7 ], [ %0, %3 ]
%10 = phi i64 [ %14, %7 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = mul i64 %10, 33
%13 = sext i8 %8 to i64
%14 = xor i64 %12, %13
%15 = load i8, i8* %11
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %7
17: ; preds = %7, %3
%18 = phi i64 [ %4, %3 ], [ %14, %7 ]
%19 = urem i64 %18, %1
ret i64 %19
}
void point_sort(double *x1, double *x2) {
  if ((*x2) < (*x1)) {
    double t;
    t = (*x1);
    (*x1) = (*x2);
    (*x2) = t;
  }
}


x86 assembly (clang, -O0):
<point_sort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1150 <point_sort+0x50>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<point_sort>:
movsd  (%rsi),%xmm0
movsd  (%rdi),%xmm1
ucomisd %xmm0,%xmm1
jbe    1116 <point_sort+0x16>
movsd  %xmm0,(%rdi)
movsd  %xmm1,(%rsi)
ret

LLVM IR (-O0):
define void @point_sort(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %4
%7 = load double, double* %6
%8 = load double*, double** %3
%9 = load double, double* %8
%10 = fcmp olt double %7, %9
br i1 %10, label %11, label %19
11: ; preds = %2
%12 = load double*, double** %3
%13 = load double, double* %12
store double %13, double* %5
%14 = load double*, double** %4
%15 = load double, double* %14
%16 = load double*, double** %3
store double %15, double* %16
%17 = load double, double* %5
%18 = load double*, double** %4
store double %17, double* %18
br label %19
19: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
define void @point_sort(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = load double, double* %0
%5 = fcmp olt double %3, %4
br i1 %5, label %6, label %7
6: ; preds = %2
store double %3, double* %0
store double %4, double* %1
br label %7
7: ; preds = %6, %2
ret void
}
__attribute__((no)) int f2(int k) {
  int a[2] = {4, k + 6};
  asm("" : "+r"(a[0]));
  a[1]++;
  bar(a[0]);
  bar(a[1]);
  return a[0] + a[1];
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x6,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
mov    $0x4,%ebx
lea    0x7(%r14),%ebp
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <bar@plt>
lea    (%rbx,%r14,1),%eax
add    $0x7,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @f2(i32 %0) {
%2 = alloca i32
%3 = alloca [2 x i32]
store i32 %0, i32* %2
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
store i32 4, i32* %4
%5 = getelementptr inbounds i32, i32* %4, i64 1
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 6
store i32 %7, i32* %5
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%9 = load i32, i32* %8
%10 = call i32 asm "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %9)
store i32 %10, i32* %8
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%12 = load i32, i32* %11
%13 = add nsw i32 %12, 1
store i32 %13, i32* %11
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%15 = load i32, i32* %14
%16 = call i32 (i32, ...) bitcast (i32 (...)* @bar to i32 (i32, ...)*)(i32 %15)
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%18 = load i32, i32* %17
%19 = call i32 (i32, ...) bitcast (i32 (...)* @bar to i32 (i32, ...)*)(i32 %18)
%20 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%21 = load i32, i32* %20
%22 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%23 = load i32, i32* %22
%24 = add nsw i32 %21, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @f2(i32 %0) {
%2 = tail call i32 asm "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 4)
%3 = add nsw i32 %0, 7
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @bar to i32 (i32, ...)*)(i32 %2)
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @bar to i32 (i32, ...)*)(i32 %3)
%6 = add nsw i32 %2, %3
ret i32 %6
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ in;

/* Variables and functions */
void swap64_store(uint64_t *out, uint64_t in) {
  *out =
      ((uint64_t)((((uint64_t)(in) & (uint64_t)0x00000000000000ffULL) << 56) |
                  (((uint64_t)(in) & (uint64_t)0x000000000000ff00ULL) << 40) |
                  (((uint64_t)(in) & (uint64_t)0x0000000000ff0000ULL) << 24) |
                  (((uint64_t)(in) & (uint64_t)0x00000000ff000000ULL) << 8) |
                  (((uint64_t)(in) & (uint64_t)0x000000ff00000000ULL) >> 8) |
                  (((uint64_t)(in) & (uint64_t)0x0000ff0000000000ULL) >> 24) |
                  (((uint64_t)(in) & (uint64_t)0x00ff000000000000ULL) >> 40) |
                  (((uint64_t)(in) & (uint64_t)0xff00000000000000ULL) >> 56)));
}


x86 assembly (clang, -O0):
<swap64_store>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    $0x38,%ecx
shl    %cl,%eax
mov    -0xc(%rbp),%edx
and    $0xff00,%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
and    $0xff0000,%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
and    $0xff000000,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
and    $0x0,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
and    $0x0,%ecx
sar    $0x18,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%edx
and    $0x0,%edx
mov    $0x28,%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x0,%eax
mov    $0x38,%ecx
sar    %cl,%eax
mov    -0x10(%rbp),%ecx
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @swap64_store(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 255
%7 = shl i32 %6, 56
%8 = load i32, i32* %4
%9 = and i32 %8, 65280
%10 = shl i32 %9, 40
%11 = or i32 %7, %10
%12 = load i32, i32* %4
%13 = and i32 %12, 16711680
%14 = shl i32 %13, 24
%15 = or i32 %11, %14
%16 = load i32, i32* %4
%17 = and i32 %16, -16777216
%18 = shl i32 %17, 8
%19 = or i32 %15, %18
%20 = load i32, i32* %4
%21 = and i32 %20, 0
%22 = ashr i32 %21, 8
%23 = or i32 %19, %22
%24 = load i32, i32* %4
%25 = and i32 %24, 0
%26 = ashr i32 %25, 24
%27 = or i32 %23, %26
%28 = load i32, i32* %4
%29 = and i32 %28, 0
%30 = ashr i32 %29, 40
%31 = or i32 %27, %30
%32 = load i32, i32* %4
%33 = and i32 %32, 0
%34 = ashr i32 %33, 56
%35 = or i32 %31, %34
%36 = load i32*, i32** %3
store i32 %35, i32* %36
ret void
}

LLVM IR (-O2):
define void @swap64_store(i32* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
unsigned long long __infer_nondet_long_long_int();
unsigned long long int wcstoull(const wchar_t *nptr, wchar_t **endptr,
                                int base) {
  return __infer_nondet_long_long_int();
}


x86 assembly (clang, -O0):
<wcstoull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_long_long_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @wcstoull(i32* %0, i32** %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32**
%6 = alloca i32
store i32* %0, i32** %4
store i32** %1, i32*** %5
store i32 %2, i32* %6
%7 = call i64 (...) @__infer_nondet_long_long_int()
ret i64 %7
}

LLVM IR (-O2):
define i64 @wcstoull(i32* nocapture readnone %0, i32** nocapture readnone %1, i32 %2) {
%4 = tail call i64 (...) @__infer_nondet_long_long_int()
ret i64 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
size_t append_ascii_hex_add(uint8_t *dst, uint8_t arg) {
  if (arg == 1) {
    dst[0] = 0xfe;
    dst[1] = 0x01;
    return 2;
  }
  dst[0] = 0x80;
  dst[1] = 0x01;
  dst[2] = arg;
  return 3;
}


x86 assembly (clang, -O0):
<append_ascii_hex_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    1137 <append_ascii_hex_add+0x37>
mov    -0x10(%rbp),%rax
movl   $0xfe,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x1,0x4(%rax)
movq   $0x2,-0x8(%rbp)
jmp    115e <append_ascii_hex_add+0x5e>
mov    -0x10(%rbp),%rax
movl   $0x80,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x1,0x4(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
movq   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<append_ascii_hex_add>:
cmp    $0x1,%esi
jne    1118 <append_ascii_hex_add+0x18>
movl   $0xfe,(%rdi)
mov    $0x2,%eax
movl   $0x1,0x4(%rdi)
ret
movl   $0x80,(%rdi)
mov    %esi,0x8(%rdi)
mov    $0x3,%eax
movl   $0x1,0x4(%rdi)
ret

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

LLVM IR (-O2):
define i64 @append_ascii_hex_add(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 1
br i1 %3, label %4, label %5
4: ; preds = %2
store i32 254, i32* %0
br label %7
5: ; preds = %2
store i32 128, i32* %0
%6 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %1, i32* %6
br label %7
7: ; preds = %5, %4
%8 = phi i64 [ 2, %4 ], [ 3, %5 ]
%9 = getelementptr inbounds i32, i32* %0, i64 1
store i32 1, i32* %9
ret i64 %8
}
/* Variables and functions */
scalar_t__ build_tunnel();
int /*<<< orphan*/ use_tunnel();
void handle_tunnel(void) {
  if (build_tunnel() == 0) {
    use_tunnel();
  }
}


x86 assembly (clang, -O0):
<handle_tunnel>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <build_tunnel@plt>
cmp    $0x0,%rax
jne    113c <handle_tunnel+0x1c>
mov    $0x0,%al
call   1040 <use_tunnel@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_tunnel>:
push   %rax
xor    %eax,%eax
call   1030 <build_tunnel@plt>
test   %rax,%rax
je     112f <handle_tunnel+0xf>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <use_tunnel@plt>

LLVM IR (-O0):
define void @handle_tunnel() {
%1 = call i64 (...) @build_tunnel()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @use_tunnel()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @handle_tunnel() {
%1 = tail call i64 (...) @build_tunnel()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @use_tunnel()
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int *);
int /*<<< orphan*/ g(int *);
void i(int c[]) {
  f(c);
  g(c);
}


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

x86 assembly (clang, -O2):
<i>:
push   %rbx
mov    %rdi,%rbx
call   1030 <f@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <g@plt>

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

LLVM IR (-O2):
define void @i(i32* %0) {
%2 = tail call i32 @f(i32* %0)
%3 = tail call i32 @g(i32* %0)
ret void
}
/* Type definitions */
struct timeval {
  double tv_usec;
  double tv_sec;
};

/* Variables and functions */
double tv_to_double(struct timeval *tv) {
  double retval = tv->tv_usec;
  retval /= 1000000;
  return retval + tv->tv_sec;
}


x86 assembly (clang, -O0):
<tv_to_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xede(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x8(%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<tv_to_double>:
movsd  (%rdi),%xmm0
divsd  0xef4(%rip),%xmm0
addsd  0x8(%rdi),%xmm0
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
define double @tv_to_double(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
%3 = alloca double
store %struct.timeval* %0, %struct.timeval** %2
%4 = load %struct.timeval*, %struct.timeval** %2
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
%6 = load double, double* %5
store double %6, double* %3
%7 = load double, double* %3
%8 = fdiv double %7, 1.000000e+06
store double %8, double* %3
%9 = load double, double* %3
%10 = load %struct.timeval*, %struct.timeval** %2
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %10, i32 0, i32 1
%12 = load double, double* %11
%13 = fadd double %9, %12
ret double %13
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define double @tv_to_double(%struct.timeval* nocapture %0) {
%2 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%3 = load double, double* %2
%4 = fdiv double %3, 1.000000e+06
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%6 = load double, double* %5
%7 = fadd double %4, %6
ret double %7
}
void RTSemEventMultiSetSignaller(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSemEventMultiSetSignaller() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fwrite(void const *, unsigned int const, int,
                          int /*<<< orphan*/ *);
void sb_file_write(char const *filename, void const *ptr, unsigned const size) {
  FILE *f;
  f = fopen(filename, "wb");
  fwrite(ptr, size, 1, f);
  fclose(f);
}


x86 assembly (clang, -O0):
<sb_file_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb2(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rcx
mov    $0x1,%edx
call   1050 <fwrite@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sb_file_write>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
lea    0xebf(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    %r14d,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbp,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"wb\00"
define void @sb_file_write(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = call i32* @fopen(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %9, i32** %7
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = load i32*, i32** %7
%13 = call i32 @fwrite(i8* %10, i32 %11, i32 1, i32* %12)
%14 = load i32*, i32** %7
%15 = call i32 @fclose(i32* %14)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"wb\00"
define void @sb_file_write(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @fwrite(i8* %1, i32 %2, i32 1, i32* %4)
%6 = tail call i32 @fclose(i32* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ msm_ois_i2c_read(unsigned short, unsigned int *, int);
void RegRead(unsigned char RegAddrH, unsigned char RegAddrL,
             unsigned char *RegData) {
  unsigned short reg_addr;
  unsigned int reg_data;
  reg_addr = (RegAddrH << 8) | RegAddrL;
  msm_ois_i2c_read(reg_addr, &reg_data, 1);
  *RegData = (unsigned char)reg_data;
}


x86 assembly (clang, -O0):
<RegRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %rdx,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %ax,-0x12(%rbp)
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
movzwl -0x12(%rbp),%edi
call   1030 <msm_ois_i2c_read@plt>
mov    -0x18(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RegRead>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
shl    $0x8,%edi
or     %esi,%edi
lea    0xc(%rsp),%rsi
mov    $0x1,%edx
call   1030 <msm_ois_i2c_read@plt>
mov    0xc(%rsp),%al
mov    %al,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @RegRead(i8 zeroext %0, i8 zeroext %1, i8* %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8*
%7 = alloca i16
%8 = alloca i32
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8* %2, i8** %6
%9 = load i8, i8* %4
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
%15 = trunc i32 %14 to i16
store i16 %15, i16* %7
%16 = load i16, i16* %7
%17 = call i32 @msm_ois_i2c_read(i16 zeroext %16, i32* %8, i32 1)
%18 = load i32, i32* %8
%19 = trunc i32 %18 to i8
%20 = load i8*, i8** %6
store i8 %19, i8* %20
ret void
}

LLVM IR (-O2):
define void @RegRead(i8 zeroext %0, i8 zeroext %1, i8* nocapture writeonly %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = zext i8 %0 to i16
%7 = shl nuw i16 %6, 8
%8 = zext i8 %1 to i16
%9 = or i16 %7, %8
%10 = call i32 @msm_ois_i2c_read(i16 zeroext %9, i32* %4, i32 1)
%11 = load i32, i32* %4
%12 = trunc i32 %11 to i8
store i8 %12, i8* %2
ret void
}
/* Variables and functions */
#define AF_INET6 128
int /*<<< orphan*/ EAFNOSUPPORT;
int /*<<< orphan*/ errno;
int vinet_pton6w(char const *, void *);
int vinet_pton6(int af, const char *__restrict src, void *__restrict dst) {
  switch (af) {
  case AF_INET6:
    return (vinet_pton6w(src, dst));
  default:
    errno = EAFNOSUPPORT;
    return (-1);
  }
}


x86 assembly (clang, -O0):
<vinet_pton6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x80,%eax
jne    114b <vinet_pton6+0x3b>
jmp    1136 <vinet_pton6+0x26>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <vinet_pton6w@plt>
mov    %eax,-0x4(%rbp)
jmp    1164 <vinet_pton6+0x54>
mov    0x2e86(%rip),%rax
mov    (%rax),%ecx
mov    0x2e85(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vinet_pton6>:
cmp    $0x80,%edi
jne    1123 <vinet_pton6+0x13>
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <vinet_pton6w@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%eax
mov    0x2ead(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EAFNOSUPPORT = global i32 0
@errno = global i32 0
define i32 @vinet_pton6(i32 %0, i8* noalias %1, i8* noalias %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
switch i32 %8, label %13 [
i32 128, label %9
]
9: ; preds = %3
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = call i32 @vinet_pton6w(i8* %10, i8* %11)
store i32 %12, i32* %4
br label %15
13: ; preds = %3
%14 = load i32, i32* @EAFNOSUPPORT
store i32 %14, i32* @errno
store i32 -1, i32* %4
br label %15
15: ; preds = %13, %9
%16 = load i32, i32* %4
ret i32 %16
}

LLVM IR (-O2):
@EAFNOSUPPORT = global i32 0
@errno = global i32 0
define i32 @vinet_pton6(i32 %0, i8* noalias %1, i8* noalias %2) {
%4 = icmp eq i32 %0, 128
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @vinet_pton6w(i8* %1, i8* %2)
br label %9
7: ; preds = %3
%8 = load i32, i32* @EAFNOSUPPORT
store i32 %8, i32* @errno
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ -1, %7 ]
ret i32 %10
}
unsigned int rotl(unsigned int value, unsigned int shift) {
  return (value << shift) | (value >> (32 - shift));
}


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

x86 assembly (clang, -O2):
<rotl>:
mov    %esi,%ecx
mov    %edi,%eax
rol    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @rotl(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub i32 32, %1
%5 = lshr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int f1();
int main() {
  if (f1() != 2)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <f1@plt>
cmp    $0x2,%eax
je     1146 <main+0x26>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <f1@plt>
cmp    $0x2,%eax
jne    1131 <main+0x11>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @f1()
%3 = icmp ne i32 %2, 2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f1()
%2 = icmp eq i32 %1, 2
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
long double _Complex sub_long_double_rc(long double a, long double _Complex b) {
  return a - b;
}


x86 assembly (clang, -O0):
<sub_long_double_rc>:
push   %rbp
mov    %rsp,%rbp
lea    0x20(%rbp),%rax
fldt   0x10(%rbp)
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
fldt   (%rax)
fldt   0x10(%rax)
fxch   %st(2)
fsubp  %st,%st(1)
fxch   %st(1)
fchs
fxch   %st(1)
fstpt  -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub_long_double_rc>:
fldt   0x8(%rsp)
fldt   0x18(%rsp)
fsubrp %st,%st(1)
fldt   0x28(%rsp)
fchs
fxch   %st(1)
ret

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @sub_long_double_rc(x86_fp80 %0, { x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %1) {
%3 = alloca { x86_fp80, x86_fp80 }
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %4
%6 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %1, i32 0, i32 0
%7 = load x86_fp80, x86_fp80* %6
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %1, i32 0, i32 1
%9 = load x86_fp80, x86_fp80* %8
%10 = fsub x86_fp80 %5, %7
%11 = fneg x86_fp80 %9
%12 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 0
%13 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 1
store x86_fp80 %10, x86_fp80* %12
store x86_fp80 %11, x86_fp80* %13
%14 = load { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3
ret { x86_fp80, x86_fp80 } %14
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @sub_long_double_rc(x86_fp80 %0, { x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %1) {
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %1, i64 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %1, i64 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = fsub x86_fp80 %0, %4
%8 = fneg x86_fp80 %6
%9 = insertvalue { x86_fp80, x86_fp80 } poison, x86_fp80 %7, 0
%10 = insertvalue { x86_fp80, x86_fp80 } %9, x86_fp80 %8, 1
ret { x86_fp80, x86_fp80 } %10
}
/* Type definitions */
struct linked_mem_pool {
  int dummy;
};

/* Variables and functions */
int linked_mem_pool_feedback(struct linked_mem_pool *);
int virtual_machine_resource_pool_linked_feedback(void *pool_ptr) {
  struct linked_mem_pool *linked_mem_pool_ptr = pool_ptr;
  return linked_mem_pool_feedback(linked_mem_pool_ptr);
}


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

x86 assembly (clang, -O2):
<virtual_machine_resource_pool_linked_feedback>:
jmp    1030 <linked_mem_pool_feedback@plt>

LLVM IR (-O0):
%struct.linked_mem_pool = type { i32 }
define i32 @virtual_machine_resource_pool_linked_feedback(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.linked_mem_pool*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.linked_mem_pool*
store %struct.linked_mem_pool* %5, %struct.linked_mem_pool** %3
%6 = load %struct.linked_mem_pool*, %struct.linked_mem_pool** %3
%7 = call i32 @linked_mem_pool_feedback(%struct.linked_mem_pool* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.linked_mem_pool = type { i32 }
define i32 @virtual_machine_resource_pool_linked_feedback(i8* %0) {
%2 = bitcast i8* %0 to %struct.linked_mem_pool*
%3 = tail call i32 @linked_mem_pool_feedback(%struct.linked_mem_pool* %2)
ret i32 %3
}
/* Variables and functions */
char EOF;
char getchar();
void consume_comment() {
  char c;
  while ((c = getchar()) != EOF) {
    if (c == '*') {
      if (getchar() == '/') {
        break;
      }
    }
  }
}


x86 assembly (clang, -O0):
<consume_comment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl %al,%eax
mov    0x2ebc(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1166 <consume_comment+0x56>
movsbl -0x1(%rbp),%eax
cmp    $0x2a,%eax
jne    1161 <consume_comment+0x51>
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
cmp    $0x2f,%eax
jne    115c <consume_comment+0x4c>
jmp    1166 <consume_comment+0x56>
jmp    1161 <consume_comment+0x51>
jmp    1118 <consume_comment+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<consume_comment>:
push   %rbx
xor    %eax,%eax
call   1030 <getchar@plt>
mov    0x2ec9(%rip),%rbx
jmp    1137 <consume_comment+0x27>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    (%rbx),%al
je     114a <consume_comment+0x3a>
cmp    $0x2a,%al
jne    1130 <consume_comment+0x20>
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0x2f,%al
jne    1130 <consume_comment+0x20>
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i8 0
define void @consume_comment() {
%1 = alloca i8
br label %2
2: ; preds = %18, %0
%3 = call signext i8 (...) @getchar()
store i8 %3, i8* %1
%4 = sext i8 %3 to i32
%5 = load i8, i8* @EOF
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %4, %6
br i1 %7, label %8, label %19
8: ; preds = %2
%9 = load i8, i8* %1
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 42
br i1 %11, label %12, label %18
12: ; preds = %8
%13 = call signext i8 (...) @getchar()
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 47
br i1 %15, label %16, label %17
16: ; preds = %12
br label %19
17: ; preds = %12
br label %18
18: ; preds = %17, %8
br label %2
19: ; preds = %16, %2
ret void
}

LLVM IR (-O2):
@EOF = global i8 0
define void @consume_comment() {
%1 = tail call signext i8 (...) @getchar()
%2 = load i8, i8* @EOF
%3 = icmp eq i8 %1, %2
br i1 %3, label %14, label %4
4: ; preds = %0, %10
%5 = phi i8 [ %11, %10 ], [ %1, %0 ]
%6 = icmp eq i8 %5, 42
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = tail call signext i8 (...) @getchar()
%9 = icmp eq i8 %8, 47
br i1 %9, label %14, label %10
10: ; preds = %7, %4
%11 = tail call signext i8 (...) @getchar()
%12 = load i8, i8* @EOF
%13 = icmp eq i8 %11, %12
br i1 %13, label %14, label %4
14: ; preds = %10, %7, %0
ret void
}
void gtk_tree_view_column_set_expand() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_set_expand() {
ret void
}
/* Variables and functions */
scalar_t__ cd_get_tracks(int /*<<< orphan*/, int *);
int play(int, int);
int cd_play_from(int track) {
  int last;
  if (cd_get_tracks(0, &last) != 0)
    return -1;
  return play(track, last);
}


x86 assembly (clang, -O0):
<cd_play_from>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
xor    %edi,%edi
lea    -0xc(%rbp),%rsi
call   1040 <cd_get_tracks@plt>
cmp    $0x0,%rax
je     114c <cd_play_from+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <cd_play_from+0x3a>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <play@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cd_play_from>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0xc(%rsp),%rsi
xor    %edi,%edi
call   1040 <cd_get_tracks@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
jne    114b <cd_play_from+0x2b>
mov    0xc(%rsp),%esi
mov    %ebx,%edi
call   1030 <play@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @cd_play_from(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i64 @cd_get_tracks(i32 0, i32* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @play(i32 %0, i32 %7)
br label %9
9: ; preds = %1, %6
%10 = phi i32 [ %8, %6 ], [ -1, %1 ]
ret i32 %10
}
void RTHeapOffsetInit(void) {}


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

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

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

LLVM IR (-O2):
define void @RTHeapOffsetInit() {
ret void
}
/* Type definitions */
struct line {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct line *);
void free_line(struct line *l) { free(l); }


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

x86 assembly (clang, -O2):
<free_line>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.line = type { i32 }
define void @free_line(%struct.line* nocapture %0) {
%2 = tail call i32 @free(%struct.line* %0)
ret void
}