xunge/DecIR huggingface dataset:
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int socklen_t;
typedef int /*<<< orphan*/ cli_addr;

/* Variables and functions */
int accept(int, struct sockaddr *, int *);
int /*<<< orphan*/ error(char *);
int make_connection(int server) {
  socklen_t clilen;
  int client;
  struct sockaddr_in cli_addr;
  clilen = sizeof(cli_addr);
  client = accept(server, (struct sockaddr *)&cli_addr, &clilen);
  if (client < 0)
    error("ERROR on accept");
  return client;
}


x86 assembly (clang, -O0):
<make_connection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <accept@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    115b <make_connection+0x3b>
lea    0xeaa(%rip),%rdi
call   1030 <error@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_connection>:
push   %rbx
sub    $0x10,%rsp
movl   $0x4,0x4(%rsp)
lea    0x8(%rsp),%rsi
lea    0x4(%rsp),%rdx
call   1040 <accept@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    114e <make_connection+0x2e>
lea    0xeb7(%rip),%rdi
call   1030 <error@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [16 x i8] c"ERROR on accept\00"
define i32 @make_connection(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sockaddr_in
store i32 %0, i32* %2
store i32 4, i32* %3
%6 = load i32, i32* %2
%7 = bitcast %struct.sockaddr_in* %5 to %struct.sockaddr*
%8 = call i32 @accept(i32 %6, %struct.sockaddr* %7, i32* %3)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = call i32 @error(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %1
%14 = load i32, i32* %4
ret i32 %14
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [16 x i8] c"ERROR on accept\00"
define i32 @make_connection(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr_in
%4 = bitcast i32* %2 to i8*
%5 = bitcast %struct.sockaddr_in* %3 to i8*
store i32 4, i32* %2
%6 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%7 = call i32 @accept(i32 %0, %struct.sockaddr* %6, i32* %2)
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @error(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
ret i32 %7
}
/* Variables and functions */
int t4a(int *p) { return *p; }


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

x86 assembly (clang, -O2):
<t4a>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @t4a(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int strlen(char *);
int ESDPlaySoundFile(char *SoundFilePath, int Vol) {
  int result, fd;
  if ((SoundFilePath ? strlen(SoundFilePath) : 0) < 1)
    return (0);
  return (0);
}


x86 assembly (clang, -O0):
<ESDPlaySoundFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113b <ESDPlaySoundFile+0x2b>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x20(%rbp)
jmp    1145 <ESDPlaySoundFile+0x35>
xor    %eax,%eax
mov    %eax,-0x20(%rbp)
jmp    1145 <ESDPlaySoundFile+0x35>
mov    -0x20(%rbp),%eax
cmp    $0x1,%eax
jge    115d <ESDPlaySoundFile+0x4d>
movl   $0x0,-0x4(%rbp)
jmp    1164 <ESDPlaySoundFile+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ESDPlaySoundFile>:
test   %rdi,%rdi
je     111f <ESDPlaySoundFile+0xf>
push   %rax
call   1030 <strlen@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ESDPlaySoundFile(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @strlen(i8* %0)
br label %6
6: ; preds = %4, %2
ret i32 0
}
int LtnGetIndex_(char c) { return c - 'A'; }


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

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

LLVM IR (-O0):
define i32 @LtnGetIndex_(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub nsw i32 %4, 65
ret i32 %5
}

LLVM IR (-O2):
define i32 @LtnGetIndex_(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -65
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  unsigned int i;
  for (i = 0; i < 100; i++) {
    sleep(1);
    printf("%d\n", i);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jae    116e <main+0x4e>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    -0x14(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xed3(%rip),%r14
nopl   (%rax)
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x64,%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %7, %3 ]
%5 = tail call i32 @sleep(i32 1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%7 = add nuw nsw i32 %4, 1
%8 = icmp eq i32 %7, 100
br i1 %8, label %9, label %3
9: ; preds = %3
ret i32 0
}
/* Variables and functions */
double util_walltime();
void util_read_real_time(void *it) {
  double *t = (double *)it;
  *t = util_walltime();
}


x86 assembly (clang, -O0):
<util_read_real_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <util_walltime@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_read_real_time>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <util_walltime@plt>
movsd  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @util_read_real_time(i8* %0) {
%2 = alloca i8*
%3 = alloca double*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to double*
store double* %5, double** %3
%6 = call double (...) @util_walltime()
%7 = load double*, double** %3
store double %6, double* %7
ret void
}

LLVM IR (-O2):
define void @util_read_real_time(i8* nocapture writeonly %0) {
%2 = bitcast i8* %0 to double*
%3 = tail call double (...) @util_walltime()
store double %3, double* %2
ret void
}
/* Type definitions */
struct XorrisO {
  int dummy;
};

/* Variables and functions */
int Xorriso_jigdo_interpreter(struct XorrisO *, char *, char *,
                              int /*<<< orphan*/);
int Xorriso_option_jigdo(struct XorrisO *xorriso, char *aspect, char *arg,
                         int flag) {
  int ret;
  ret = Xorriso_jigdo_interpreter(xorriso, aspect, arg, 0);
  return (ret);
}


x86 assembly (clang, -O0):
<Xorriso_option_jigdo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <Xorriso_jigdo_interpreter@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Xorriso_option_jigdo>:
xor    %ecx,%ecx
jmp    1030 <Xorriso_jigdo_interpreter@plt>

LLVM IR (-O0):
%struct.XorrisO = type { i32 }
define i32 @Xorriso_option_jigdo(%struct.XorrisO* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca %struct.XorrisO*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store %struct.XorrisO* %0, %struct.XorrisO** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load %struct.XorrisO*, %struct.XorrisO** %5
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = call i32 @Xorriso_jigdo_interpreter(%struct.XorrisO* %10, i8* %11, i8* %12, i32 0)
store i32 %13, i32* %9
%14 = load i32, i32* %9
ret i32 %14
}

LLVM IR (-O2):
%struct.XorrisO = type { i32 }
define i32 @Xorriso_option_jigdo(%struct.XorrisO* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @Xorriso_jigdo_interpreter(%struct.XorrisO* %0, i8* %1, i8* %2, i32 0)
ret i32 %5
}
void *get_nondet_ptr(void) {
  void *a;
  return a;
}


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

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

LLVM IR (-O0):
define i8* @get_nondet_ptr() {
%1 = alloca i8*
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
define noalias i8* @get_nondet_ptr() {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ digitalWrite(int, int);
int /*<<< orphan*/ exit(int);
int init();
int /*<<< orphan*/ pi_sleep(int);
int /*<<< orphan*/ pinMode(int, int);
int main(void) {
  if (init() == -1)
    exit(1);
  pinMode(4, 1);
  while (1) {
    digitalWrite(4, 1);
    pi_sleep(500);
    digitalWrite(4, 0);
    pi_sleep(500);
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <init@plt>
cmp    $0xffffffff,%eax
jne    1179 <main+0x29>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    $0x4,%edi
mov    $0x1,%esi
call   1060 <pinMode@plt>
mov    $0x4,%edi
mov    $0x1,%esi
call   1030 <digitalWrite@plt>
mov    $0x1f4,%edi
call   1040 <pi_sleep@plt>
mov    $0x4,%edi
xor    %esi,%esi
call   1030 <digitalWrite@plt>
mov    $0x1f4,%edi
call   1040 <pi_sleep@plt>
jmp    1188 <main+0x38>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <init@plt>
cmp    $0xffffffff,%eax
je     11a1 <main+0x51>
mov    $0x4,%edi
mov    $0x1,%esi
call   1060 <pinMode@plt>
nopl   0x0(%rax)
mov    $0x4,%edi
mov    $0x1,%esi
call   1030 <digitalWrite@plt>
mov    $0x1f4,%edi
call   1040 <pi_sleep@plt>
mov    $0x4,%edi
xor    %esi,%esi
call   1030 <digitalWrite@plt>
mov    $0x1f4,%edi
call   1040 <pi_sleep@plt>
jmp    1170 <main+0x20>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @init()
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @exit(i32 1)
unreachable
6: ; preds = %0
%7 = call i32 @pinMode(i32 4, i32 1)
br label %8
8: ; preds = %6, %8
%9 = call i32 @digitalWrite(i32 4, i32 1)
%10 = call i32 @pi_sleep(i32 500)
%11 = call i32 @digitalWrite(i32 4, i32 0)
%12 = call i32 @pi_sleep(i32 500)
br label %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @init()
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @exit(i32 1)
unreachable
5: ; preds = %0
%6 = tail call i32 @pinMode(i32 4, i32 1)
br label %7
7: ; preds = %5, %7
%8 = tail call i32 @digitalWrite(i32 4, i32 1)
%9 = tail call i32 @pi_sleep(i32 500)
%10 = tail call i32 @digitalWrite(i32 4, i32 0)
%11 = tail call i32 @pi_sleep(i32 500)
br label %7
}
unsigned long long int_hash(void *vlocation) {
  return (unsigned long long)*((int *)vlocation);
}


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

x86 assembly (clang, -O2):
<int_hash>:
movslq (%rdi),%rax
ret

LLVM IR (-O0):
define i64 @int_hash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @int_hash(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
ret i64 %4
}
__attribute__((always_)) unsigned char readb(const volatile void *addr) {
  return *(volatile unsigned char *)addr;
}


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

x86 assembly (clang, -O2):
<readb>:
mov    (%rdi),%al
ret

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

LLVM IR (-O2):
define zeroext i8 @readb(i8* %0) {
%2 = load volatile i8, i8* %0
ret i8 %2
}
/* Type definitions */
struct bufrdeco {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprint_sec0_info(char *, int, struct bufrdeco *);
void print_sec0_info(struct bufrdeco *b) {
  char caux[512];
  caux[0] = 0;
  sprint_sec0_info(caux, 512, b);
  printf("%s", caux);
}


x86 assembly (clang, -O0):
<print_sec0_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x210(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x200,%esi
call   1030 <sprint_sec0_info@plt>
lea    -0x210(%rbp),%rsi
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_sec0_info>:
push   %rbx
sub    $0x200,%rsp
mov    %rdi,%rdx
movb   $0x0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x200,%esi
call   1030 <sprint_sec0_info@plt>
lea    0xeba(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.bufrdeco = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @print_sec0_info(%struct.bufrdeco* %0) {
%2 = alloca %struct.bufrdeco*
%3 = alloca [512 x i8]
store %struct.bufrdeco* %0, %struct.bufrdeco** %2
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
store i8 0, i8* %4
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%6 = load %struct.bufrdeco*, %struct.bufrdeco** %2
%7 = call i32 @sprint_sec0_info(i8* %5, i32 512, %struct.bufrdeco* %6)
%8 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
%struct.bufrdeco = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @print_sec0_info(%struct.bufrdeco* %0) {
%2 = alloca [512 x i8]
%3 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
store i8 0, i8* %3
%4 = call i32 @sprint_sec0_info(i8* %3, i32 512, %struct.bufrdeco* %0)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
void gtk_hpaned_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_hpaned_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execute_file();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ print_version();
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  ((void)(argv));
  if (argc != 1) {
    fprintf(stderr, "%s: warn: ignoring arguments\n", argv[0]);
  }
  print_version();
  execute_file();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     116c <main+0x3c>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe99(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <print_version@plt>
mov    $0x0,%al
call   1050 <execute_file@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
je     114e <main+0x1e>
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xeb7(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <print_version@plt>
xor    %eax,%eax
call   1050 <execute_file@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"%s: warn: ignoring arguments\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %13)
br label %15
15: ; preds = %9, %2
%16 = call i32 (...) @print_version()
%17 = call i32 (...) @execute_file()
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"%s: warn: ignoring arguments\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %4, %2
%9 = tail call i32 (...) @print_version()
%10 = tail call i32 (...) @execute_file()
ret i32 0
}
/* Variables and functions */
int are_equal(int *, int *, int);
int /*<<< orphan*/ heapsort(int *, int);
int test_heapsort_reverse_sorted() {
  int input[] = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
  int expected[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  heapsort(input, 10);
  return are_equal(input, expected, 10);
}


x86 assembly (clang, -O0):
<test_heapsort_reverse_sorted>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x60(%rbp),%rdi
lea    0xed8(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1030 <heapsort@plt>
lea    -0x30(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0xa,%edx
call   1050 <are_equal@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_heapsort_reverse_sorted>:
push   %rbx
sub    $0x60,%rsp
mov    0xef4(%rip),%rax
mov    %rax,0x50(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
mov    0xf00(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <heapsort@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
call   1040 <are_equal@plt>
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.test_heapsort_reverse_sorted.input = [10 x i32] [i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0]
@__const.test_heapsort_reverse_sorted.expected = [10 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9]
define i32 @test_heapsort_reverse_sorted() {
%1 = alloca [10 x i32]
%2 = alloca [10 x i32]
%3 = bitcast [10 x i32]* %1 to i8*
%4 = bitcast [10 x i32]* %2 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%6 = call i32 @heapsort(i32* %5, i32 10)
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%9 = call i32 @are_equal(i32* %7, i32* %8, i32 10)
ret i32 %9
}

LLVM IR (-O2):
@__const.test_heapsort_reverse_sorted.input = [10 x i32] [i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0]
@__const.test_heapsort_reverse_sorted.expected = [10 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9]
define i32 @test_heapsort_reverse_sorted() {
%1 = alloca [10 x i32]
%2 = alloca [10 x i32]
%3 = bitcast [10 x i32]* %1 to i8*
%4 = bitcast [10 x i32]* %2 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%6 = call i32 @heapsort(i32* %5, i32 10)
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%8 = call i32 @are_equal(i32* %5, i32* %7, i32 10)
ret i32 %8
}
int main(void) {
  int a;
  int b;
  if (&a >= &a) {
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
scalar_t__ iswcntrl(int /*<<< orphan*/);
int wcwidth(int /*<<< orphan*/);
int mb_width_aux(wint_t wc) {
  int w = wcwidth(wc);
  return (w >= 0 ? w : iswcntrl(wc) ? 0 : 1);
}


x86 assembly (clang, -O0):
<mb_width_aux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <wcwidth@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     114b <mb_width_aux+0x2b>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1167 <mb_width_aux+0x47>
mov    -0x4(%rbp),%edi
call   1030 <iswcntrl@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mb_width_aux>:
push   %rbx
mov    %edi,%ebx
call   1040 <wcwidth@plt>
test   %eax,%eax
js     112e <mb_width_aux+0xe>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <iswcntrl@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mb_width_aux(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @wcwidth(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp sge i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32, i32* %3
br label %16
10: ; preds = %1
%11 = load i32, i32* %2
%12 = call i64 @iswcntrl(i32 %11)
%13 = icmp ne i64 %12, 0
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 0, i32 1
br label %16
16: ; preds = %10, %8
%17 = phi i32 [ %9, %8 ], [ %15, %10 ]
ret i32 %17
}

LLVM IR (-O2):
define i32 @mb_width_aux(i32 %0) {
%2 = tail call i32 @wcwidth(i32 %0)
%3 = icmp sgt i32 %2, -1
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @iswcntrl(i32 %0)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ %2, %1 ]
ret i32 %9
}
int rgbMap16To32(int sourcePixel) {
  return (((sourcePixel & 31) << 3) | ((sourcePixel & 992) << 6)) |
         ((sourcePixel & 31744) << 9);
}


x86 assembly (clang, -O0):
<rgbMap16To32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1f,%eax
shl    $0x3,%eax
mov    -0x4(%rbp),%ecx
and    $0x3e0,%ecx
shl    $0x6,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0x7c00,%ecx
shl    $0x9,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgbMap16To32>:
mov    %edi,%eax
and    $0x1f,%eax
mov    %edi,%ecx
shl    $0x6,%ecx
and    $0xf800,%ecx
lea    (%rcx,%rax,8),%eax
shl    $0x9,%edi
and    $0xf80000,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rgbMap16To32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 31
%5 = shl i32 %4, 3
%6 = load i32, i32* %2
%7 = and i32 %6, 992
%8 = shl i32 %7, 6
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 31744
%12 = shl i32 %11, 9
%13 = or i32 %9, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @rgbMap16To32(i32 %0) {
%2 = shl i32 %0, 3
%3 = and i32 %2, 248
%4 = shl i32 %0, 6
%5 = and i32 %4, 63488
%6 = or i32 %3, %5
%7 = shl i32 %0, 9
%8 = and i32 %7, 16252928
%9 = or i32 %6, %8
ret i32 %9
}
/* Variables and functions */
int EINVAL;
int /*<<< orphan*/ log_show_color(int);
int parse_boolean(char const *);
int log_show_color_from_string(const char *e) {
  int t;
  if ((t = parse_boolean(e)) < 0)
    return -EINVAL;
  log_show_color(t);
  return 0;
}


x86 assembly (clang, -O0):
<log_show_color_from_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <parse_boolean@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    1154 <log_show_color_from_string+0x34>
xor    %eax,%eax
mov    0x2e96(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <log_show_color_from_string+0x43>
mov    -0x14(%rbp),%edi
call   1030 <log_show_color@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_show_color_from_string>:
push   %rax
call   1040 <parse_boolean@plt>
test   %eax,%eax
js     1135 <log_show_color_from_string+0x15>
mov    %eax,%edi
call   1030 <log_show_color@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2ea4(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @log_show_color_from_string(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @parse_boolean(i8* %5)
store i32 %6, i32* %4
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* @EINVAL
%10 = sub nsw i32 0, %9
store i32 %10, i32* %2
br label %14
11: ; preds = %1
%12 = load i32, i32* %4
%13 = call i32 @log_show_color(i32 %12)
store i32 0, i32* %2
br label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @log_show_color_from_string(i8* %0) {
%2 = tail call i32 @parse_boolean(i8* %0)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
br label %9
7: ; preds = %1
%8 = tail call i32 @log_show_color(i32 %2)
br label %9
9: ; preds = %7, %4
%10 = phi i32 [ %6, %4 ], [ 0, %7 ]
ret i32 %10
}
int procLsInit_(int flags) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @procLsInit_(i32 %0) {
ret i32 0
}
/* Variables and functions */
int mirror_bits(int);
int mirror_2bytes(int v) {
  return mirror_bits(((v & 0xFF00) >> 8)) << 8 | mirror_bits(v & 0xFF);
}


x86 assembly (clang, -O0):
<mirror_2bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
and    $0xff00,%edi
sar    $0x8,%edi
call   1030 <mirror_bits@plt>
shl    $0x8,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
and    $0xff,%edi
call   1030 <mirror_bits@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mirror_2bytes>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%eax
movzbl %ah,%edi
mov    %eax,%ebp
call   1030 <mirror_bits@plt>
mov    %eax,%ebx
shl    $0x8,%ebx
movzbl %bpl,%edi
call   1030 <mirror_bits@plt>
or     %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @mirror_2bytes(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65280
%5 = ashr i32 %4, 8
%6 = call i32 @mirror_bits(i32 %5)
%7 = shl i32 %6, 8
%8 = load i32, i32* %2
%9 = and i32 %8, 255
%10 = call i32 @mirror_bits(i32 %9)
%11 = or i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @mirror_2bytes(i32 %0) {
%2 = lshr i32 %0, 8
%3 = and i32 %2, 255
%4 = tail call i32 @mirror_bits(i32 %3)
%5 = shl i32 %4, 8
%6 = and i32 %0, 255
%7 = tail call i32 @mirror_bits(i32 %6)
%8 = or i32 %5, %7
ret i32 %8
}
struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd) {
  return ((void *)0);
}


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

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

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

LLVM IR (-O2):
%struct.sysfs_dirent = type opaque
define noalias %struct.sysfs_dirent* @sysfs_get(%struct.sysfs_dirent* nocapture readnone %0) {
ret %struct.sysfs_dirent* null
}
void iwl_rfkill_unregister(struct iwl_priv *priv) {}


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

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

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

LLVM IR (-O2):
%struct.iwl_priv = type opaque
define void @iwl_rfkill_unregister(%struct.iwl_priv* nocapture %0) {
ret void
}
/* Variables and functions */
int rnd(int);
int spread(int nm) { return nm - nm / 20 + rnd(nm / 10); }


x86 assembly (clang, -O0):
<spread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <rnd@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spread>:
push   %rbx
movslq %edi,%rax
imul   $0xffffffff99999999,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
lea    (%rax,%rcx,1),%ebx
imul   $0x66666667,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x22,%rdi
add    %eax,%edi
call   1030 <rnd@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @spread(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 20
%6 = sub nsw i32 %3, %5
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 10
%9 = call i32 @rnd(i32 %8)
%10 = add nsw i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @spread(i32 %0) {
%2 = sdiv i32 %0, -20
%3 = add i32 %2, %0
%4 = sdiv i32 %0, 10
%5 = tail call i32 @rnd(i32 %4)
%6 = add nsw i32 %3, %5
ret i32 %6
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char const *);
char *_GeoIP_full_path_to(const char *file_name) {
  char *path = malloc(sizeof(char) * 1024);
  memset(path, 0, sizeof(char) * 1024);
  snprintf(path, sizeof(char) * 1024 - 1, "%s/%s", "/home/ivan/geoip.dat",
           file_name);
  return path;
}


x86 assembly (clang, -O0):
<_GeoIP_full_path_to>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x400,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1040 <memset@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%r8
mov    $0x3ff,%esi
lea    0xe92(%rip),%rdx
lea    0xe91(%rip),%rcx
call   1030 <snprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_GeoIP_full_path_to>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x400,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1040 <memset@plt>
lea    0xea6(%rip),%rdx
lea    0xea5(%rip),%rcx
mov    %rbx,%rdi
mov    $0x3ff,%esi
mov    %r14,%r8
call   1030 <snprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
@.str.1 = [21 x i8] c"/home/ivan/geoip.dat\00"
define i8* @_GeoIP_full_path_to(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i8* @malloc(i32 1024)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @memset(i8* %5, i32 0, i32 1024)
%7 = load i8*, i8** %3
%8 = load i8*, i8** %2
%9 = call i32 @snprintf(i8* %7, i32 1023, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
@.str.1 = [21 x i8] c"/home/ivan/geoip.dat\00"
define i8* @_GeoIP_full_path_to(i8* %0) {
%2 = tail call dereferenceable_or_null(1024) i8* @malloc(i32 1024)
%3 = tail call i32 @memset(i8* %2, i32 0, i32 1024)
%4 = tail call i32 @snprintf(i8* %2, i32 1023, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ add_cp_brows(char *, char *);
void c_add_cp_brows(char *v1, char *v2, void *t) { add_cp_brows(v1, v2); }


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

x86 assembly (clang, -O2):
<c_add_cp_brows>:
jmp    1030 <add_cp_brows@plt>

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

LLVM IR (-O2):
define void @c_add_cp_brows(i8* %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @add_cp_brows(i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ABMON_11;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_abmon_11() { return nl_langinfo(ABMON_11); }


x86 assembly (clang, -O0):
<langinfo_abmon_11>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<langinfo_abmon_11>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nl_langinfo@plt>

LLVM IR (-O0):
@ABMON_11 = global i32 0
define i8* @langinfo_abmon_11() {
%1 = load i32, i32* @ABMON_11
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@ABMON_11 = global i32 0
define i8* @langinfo_abmon_11() {
%1 = load i32, i32* @ABMON_11
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ALreverbState_Delete(void *ptr) { free(ptr); }


x86 assembly (clang, -O0):
<ALreverbState_Delete>:
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):
<ALreverbState_Delete>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @ALreverbState_Delete(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main() {
  printf("%.1lf\n", 8.0 / 5.0);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%.1lf\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double 1.600000e+00)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%.1lf\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double 1.600000e+00)
ret i32 0
}
/* Variables and functions */
__attribute__((__nonnull__)) bool path_is_absolute(const char *path) {
  return path[0] == '/';
}


x86 assembly (clang, -O0):
<path_is_absolute>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_is_absolute>:
xor    %eax,%eax
cmpb   $0x2f,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @path_is_absolute(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 47
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @path_is_absolute(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 47
%4 = zext i1 %3 to i32
ret i32 %4
}
void testClosureBIrV(void (*closure)(char, int), char a1, int a2) {
  (*closure)(a1, a2);
}


x86 assembly (clang, -O0):
<testClosureBIrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x9(%rbp),%cl
mov    -0x10(%rbp),%esi
movsbl %cl,%edi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureBIrV>:
mov    %rdi,%rax
mov    %esi,%edi
mov    %edx,%esi
jmp    *%rax

LLVM IR (-O0):
define void @testClosureBIrV(void (i8, i32)* %0, i8 signext %1, i32 %2) {
%4 = alloca void (i8, i32)*
%5 = alloca i8
%6 = alloca i32
store void (i8, i32)* %0, void (i8, i32)** %4
store i8 %1, i8* %5
store i32 %2, i32* %6
%7 = load void (i8, i32)*, void (i8, i32)** %4
%8 = load i8, i8* %5
%9 = load i32, i32* %6
ret void
}

LLVM IR (-O2):
define void @testClosureBIrV(void (i8, i32)* nocapture %0, i8 signext %1, i32 %2) {
tail call void %0(i8 signext %1, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int _ftrylockfile_stub(int /*<<< orphan*/ *);
int ftrylockfile(FILE *fp) { return _ftrylockfile_stub(fp); }


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

x86 assembly (clang, -O2):
<ftrylockfile>:
jmp    1030 <_ftrylockfile_stub@plt>

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

LLVM IR (-O2):
define i32 @ftrylockfile(i32* %0) {
%2 = tail call i32 @_ftrylockfile_stub(i32* %0)
ret i32 %2
}
/* Variables and functions */
float mean(int *, int);
int /*<<< orphan*/ printf(char *, float);
int main() {
  int my_array[5] = {5, 5, 5, 5, 5};
  float my_array_average;
  my_array_average = mean(my_array, 5);
  printf("my_array_average: %f\n", my_array_average);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1040 <mean@plt>
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.my_array = [5 x i32] [i32 5, i32 5, i32 5, i32 5, i32 5]
@.str = [22 x i8] c"my_array_average: %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca float
store i32 0, i32* %1
%4 = bitcast [5 x i32]* %2 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%6 = call float @mean(i32* %5, i32 5)
store float %6, float* %3
%7 = load float, float* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.my_array = [5 x i32] [i32 5, i32 5, i32 5, i32 5, i32 5]
@.str = [22 x i8] c"my_array_average: %f\0A\00"
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call float @mean(i32* %3, i32 5)
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ eembed_str_to_u64(char const *, char **, int);
uint64_t eembed_hex_to_ulong(const char *str, char **endptr) {
  int base16 = 16;
  return eembed_str_to_u64(str, endptr, base16);
}


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

x86 assembly (clang, -O2):
<eembed_hex_to_ulong>:
mov    $0x10,%edx
jmp    1030 <eembed_str_to_u64@plt>

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

LLVM IR (-O2):
define i32 @eembed_hex_to_ulong(i8* %0, i8** %1) {
%3 = tail call i32 @eembed_str_to_u64(i8* %0, i8** %1, i32 16)
ret i32 %3
}
int *ivector(nl, nh)
int nl, nh;
{
  int *v;
  v = (int *)calloc((unsigned)(nh - nl + 1), sizeof(int));
  if (!v)
    nrerror("Allocation failure in vector().\n");
  return (v - nl);
}


x86 assembly (clang, -O0):
<ivector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
mov    %eax,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1162 <ivector+0x42>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <nrerror@plt>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivector>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
sub    %edi,%esi
lea    0x1(%rsi),%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114a <ivector+0x2a>
lea    0xebd(%rip),%rdi
xor    %eax,%eax
call   1030 <nrerror@plt>
movslq %ebp,%rax
shl    $0x2,%rax
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Allocation failure in vector().\0A\00"
define i32* @ivector(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = zext i32 %9 to i64
%11 = call i8* @calloc(i64 %10, i64 4)
%12 = bitcast i8* %11 to i32*
store i32* %12, i32** %5
%13 = load i32*, i32** %5
%14 = icmp ne i32* %13, null
br i1 %14, label %17, label %15
15: ; preds = %2
%16 = call i32 (i8*, ...) bitcast (i32 (...)* @nrerror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15, %2
%18 = load i32*, i32** %5
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = sub i64 0, %20
%22 = getelementptr inbounds i32, i32* %18, i64 %21
ret i32* %22
}

LLVM IR (-O2):
@.str = [33 x i8] c"Allocation failure in vector().\0A\00"
define i32* @ivector(i32 %0, i32 %1) {
%3 = sub i32 1, %0
%4 = add i32 %3, %1
%5 = zext i32 %4 to i64
%6 = tail call i8* @calloc(i64 %5, i64 4)
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @nrerror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = bitcast i8* %6 to i32*
%12 = sext i32 %0 to i64
%13 = sub nsw i64 0, %12
%14 = getelementptr inbounds i32, i32* %11, i64 %13
ret i32* %14
}