xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void pcap_free_tstamp_types(int *tstamp_type_list) { free(tstamp_type_list); }


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

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

LLVM IR (-O2):
define void @pcap_free_tstamp_types(i32* nocapture %0) {
%2 = tail call i32 @free(i32* %0)
ret void
}
void sys_flock_release(struct gf_flock *src) {}


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

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

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

LLVM IR (-O2):
%struct.gf_flock = type opaque
define void @sys_flock_release(%struct.gf_flock* nocapture %0) {
ret void
}
/* Variables and functions */
char *COM_SkipPath(char *);
int /*<<< orphan*/ Q_strncpyz(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void COM_StripFilename(char *in, char *out) {
  char *end;
  Q_strncpyz(out, in, strlen(in));
  end = COM_SkipPath(out);
  *end = 0;
}


x86 assembly (clang, -O0):
<COM_StripFilename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1050 <Q_strncpyz@plt>
mov    -0x10(%rbp),%rdi
call   1040 <COM_SkipPath@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<COM_StripFilename>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1050 <Q_strncpyz@plt>
mov    %r14,%rdi
call   1040 <COM_SkipPath@plt>
movb   $0x0,(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @COM_StripFilename(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @strlen(i8* %8)
%10 = call i32 @Q_strncpyz(i8* %6, i8* %7, i32 %9)
%11 = load i8*, i8** %4
%12 = call i8* @COM_SkipPath(i8* %11)
store i8* %12, i8** %5
%13 = load i8*, i8** %5
store i8 0, i8* %13
ret void
}

LLVM IR (-O2):
define void @COM_StripFilename(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @Q_strncpyz(i8* %1, i8* %0, i32 %3)
%5 = tail call i8* @COM_SkipPath(i8* %1)
store i8 0, i8* %5
ret void
}
void mtk_drm_debugfs_init(struct drm_device *dev,
                          struct mtk_drm_private *priv) {}


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

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

LLVM IR (-O0):
%struct.drm_device = type opaque
%struct.mtk_drm_private = type opaque
define void @mtk_drm_debugfs_init(%struct.drm_device* %0, %struct.mtk_drm_private* %1) {
%3 = alloca %struct.drm_device*
%4 = alloca %struct.mtk_drm_private*
store %struct.drm_device* %0, %struct.drm_device** %3
store %struct.mtk_drm_private* %1, %struct.mtk_drm_private** %4
ret void
}

LLVM IR (-O2):
%struct.drm_device = type opaque
%struct.mtk_drm_private = type opaque
define void @mtk_drm_debugfs_init(%struct.drm_device* nocapture %0, %struct.mtk_drm_private* nocapture %1) {
ret void
}
long read(int fd, void *buf, unsigned long count) {
  long res;
  asm volatile("int $0x85"
               : "=a"(res)
               : "a"(3), "b"(fd), "c"(buf), "d"(count)
               : "memory");
  return res;
}


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0xc(%rbp),%ebx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%rdx
mov    $0x3,%eax
int    $0x85
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
push   %rbx
mov    %rsi,%rcx
mov    %edi,%ebx
mov    $0x3,%eax
int    $0x85
pop    %rbx
ret

LLVM IR (-O0):
define i64 @read(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i64 asm sideeffect "int $$0x85", "={ax},{ax},{bx},{cx},{dx},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 3, i32 %8, i8* %9, i64 %10)
store i64 %11, i64* %7
%12 = load i64, i64* %7
ret i64 %12
}

LLVM IR (-O2):
define i64 @read(i32 %0, i8* %1, i64 %2) {
%4 = tail call i64 asm sideeffect "int $$0x85", "={ax},{ax},{bx},{cx},{dx},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 3, i32 %0, i8* %1, i64 %2)
ret i64 %4
}
/* Type definitions */
struct codec {
  int dummy;
};
typedef int ssize_t;

/* Variables and functions */
ssize_t null_seek(struct codec *c, ssize_t pos) { return -1; }


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

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

LLVM IR (-O0):
%struct.codec = type { i32 }
define i32 @null_seek(%struct.codec* %0, i32 %1) {
%3 = alloca %struct.codec*
%4 = alloca i32
store %struct.codec* %0, %struct.codec** %3
store i32 %1, i32* %4
ret i32 -1
}

LLVM IR (-O2):
%struct.codec = type { i32 }
define i32 @null_seek(%struct.codec* nocapture readnone %0, i32 %1) {
ret i32 -1
}
void fd_sha_initialize(void) {}


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

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

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

LLVM IR (-O2):
define void @fd_sha_initialize() {
ret void
}
void dead_result1(int *data) {
  int j;
  j = data[2];
  data[j] = 2;
}


x86 assembly (clang, -O0):
<dead_result1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x2,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dead_result1>:
movslq 0x8(%rdi),%rax
movl   $0x2,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @dead_result1(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 2
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %7, i64 %9
store i32 2, i32* %10
ret void
}

LLVM IR (-O2):
define void @dead_result1(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 2, i32* %5
ret void
}
/* Variables and functions */
int pigpio_command(int, int, unsigned int, unsigned int, int);
int wave_send_using_mode(int pi, unsigned wave_id, unsigned mode) {
  return pigpio_command(pi, 100, wave_id, mode, 1);
}


x86 assembly (clang, -O0):
<wave_send_using_mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x64,%esi
mov    $0x1,%r8d
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wave_send_using_mode>:
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x64,%esi
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

LLVM IR (-O0):
define i32 @wave_send_using_mode(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @pigpio_command(i32 %7, i32 100, i32 %8, i32 %9, i32 1)
ret i32 %10
}

LLVM IR (-O2):
define i32 @wave_send_using_mode(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @pigpio_command(i32 %0, i32 100, i32 %1, i32 %2, i32 1)
ret i32 %4
}
void foo_1_2_1_2_1_2_1_1_1() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
void end_dependency(FILE *f, const char *dependency) {
  if (dependency != NULL) {
    fprintf(f, "#endif // %s\n", dependency);
  }
}


x86 assembly (clang, -O0):
<end_dependency>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113f <end_dependency+0x2f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_dependency>:
test   %rsi,%rsi
je     1124 <end_dependency+0x14>
mov    %rsi,%rdx
lea    0xee1(%rip),%rsi
jmp    1030 <fprintf@plt>
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"#endif // %s\0A\00"
define void @end_dependency(i32* nocapture %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %6
6: ; preds = %4, %2
ret void
}
int main() {
  long long a;
  long long b = 1LL;
  int c = 3;
#pragma omp atomic capture
  a = b = c << b;
  if (b != 6LL || a != 6LL)
    __builtin_abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x18(%rbp)
movl   $0x3,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x18(%rbp),%rcx
shl    %cl,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    %rax,-0x10(%rbp)
cmpq   $0x6,-0x18(%rbp)
jne    1157 <main+0x47>
cmpq   $0x6,-0x10(%rbp)
je     115c <main+0x4c>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ sleep_device(int);
void hashlet_teardown(int fd) {
  sleep_device(fd);
  close(fd);
}


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

x86 assembly (clang, -O2):
<hashlet_teardown>:
push   %rbx
mov    %edi,%ebx
call   1030 <sleep_device@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <close@plt>

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

LLVM IR (-O2):
define void @hashlet_teardown(i32 %0) {
%2 = tail call i32 @sleep_device(i32 %0)
%3 = tail call i32 @close(i32 %0)
ret void
}
int oauth_b64_is_base64(char c) {
  if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ||
      (c >= '0' && c <= '9') || (c == '+') || (c == '/') || (c == '=')) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<oauth_b64_is_base64>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1124 <oauth_b64_is_base64+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jle    117f <oauth_b64_is_base64+0x7f>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     113e <oauth_b64_is_base64+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jle    117f <oauth_b64_is_base64+0x7f>
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1158 <oauth_b64_is_base64+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jle    117f <oauth_b64_is_base64+0x7f>
movsbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
je     117f <oauth_b64_is_base64+0x7f>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
je     117f <oauth_b64_is_base64+0x7f>
movsbl -0x5(%rbp),%eax
cmp    $0x3d,%eax
jne    118b <oauth_b64_is_base64+0x8b>
movl   $0x1,-0x4(%rbp)
jmp    1192 <oauth_b64_is_base64+0x92>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<oauth_b64_is_base64>:
mov    %edi,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
setb   %al
lea    -0x2f(%rdi),%ecx
cmp    $0xb,%cl
setb   %cl
or     %al,%cl
cmp    $0x3d,%dil
sete   %al
cmp    $0x2b,%dil
sete   %dl
or     %al,%dl
or     %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @oauth_b64_is_base64(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %39, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 122
br i1 %18, label %39, label %19
19: ; preds = %15, %11
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp sge i32 %21, 48
br i1 %22, label %23, label %27
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp sle i32 %25, 57
br i1 %26, label %39, label %27
27: ; preds = %23, %19
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 43
br i1 %30, label %39, label %31
31: ; preds = %27
%32 = load i8, i8* %3
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 47
br i1 %34, label %39, label %35
35: ; preds = %31
%36 = load i8, i8* %3
%37 = sext i8 %36 to i32
%38 = icmp eq i32 %37, 61
br i1 %38, label %39, label %40
39: ; preds = %35, %31, %27, %23, %15, %7
store i32 1, i32* %2
br label %41
40: ; preds = %35
store i32 0, i32* %2
br label %41
41: ; preds = %40, %39
%42 = load i32, i32* %2
ret i32 %42
}

LLVM IR (-O2):
define i32 @oauth_b64_is_base64(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = add i8 %0, -47
%6 = icmp ult i8 %5, 11
%7 = or i1 %6, %4
%8 = icmp eq i8 %0, 61
%9 = icmp eq i8 %0, 43
%10 = or i1 %8, %9
%11 = or i1 %10, %7
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printPrivate(char *);
void isAlreadyOpen(void) { printPrivate("That is already open.\n"); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"That is already open.\0A\00"
define void @isAlreadyOpen() {
%1 = call i32 @printPrivate(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"That is already open.\0A\00"
define void @isAlreadyOpen() {
%1 = tail call i32 @printPrivate(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
int main() {
  int a = 5;
  printf("%s(%d): a is %d\n", __func__, 11, a);
  helper_function(&a);
  printf("%s(%d): a is %d\n", __func__, 13, a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xec7(%rip),%rdi
lea    0xed1(%rip),%rsi
mov    $0xb,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x4(%rbp),%rdi
mov    $0x0,%al
call   1040 <helper_function@plt>
mov    -0x4(%rbp),%ecx
lea    0xe9f(%rip),%rdi
lea    0xea9(%rip),%rsi
mov    $0xd,%edx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movl   $0x5,0x4(%rsp)
lea    0xecd(%rip),%rbx
lea    0xed7(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0xb,%edx
mov    $0x5,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x4(%rsp),%rdi
xor    %eax,%eax
call   1040 <helper_function@plt>
mov    0x4(%rsp),%ecx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0xd,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [17 x i8] c"%s(%d): a is %d\0A\00"
@__func__.main = [5 x i8] c"main\00"
define i32 @main() {
%1 = alloca i32
store i32 5, i32* %1
%2 = load i32, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i32 11, i32 %2)
%4 = call i32 (i32*, ...) bitcast (i32 (...)* @helper_function to i32 (i32*, ...)*)(i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i32 13, i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"%s(%d): a is %d\0A\00"
@__func__.main = [5 x i8] c"main\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 5, i32* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i32 11, i32 5)
%4 = call i32 (i32*, ...) bitcast (i32 (...)* @helper_function to i32 (i32*, ...)*)(i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i32 13, i32 %5)
ret i32 0
}
void flush_write_buffer(void) {}


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

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

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

LLVM IR (-O2):
define void @flush_write_buffer() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ run_test();
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char const *argv[]) {
  int number_of_tests;
  scanf("%d", &number_of_tests);
  int i;
  for (i = 0; i < number_of_tests; ++i) {
    run_test();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    116e <main+0x4e>
mov    $0x0,%al
call   1030 <run_test@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    114d <main+0x2d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1150 <main+0x30>
xor    %ebx,%ebx
nop
xor    %eax,%eax
call   1030 <run_test@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     1140 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %2, %8
%9 = phi i32 [ %11, %8 ], [ 0, %2 ]
%10 = call i32 (...) @run_test()
%11 = add nuw nsw i32 %9, 1
%12 = load i32, i32* %3
%13 = icmp slt i32 %11, %12
br i1 %13, label %8, label %14
14: ; preds = %8, %2
ret i32 0
}
/* Type definitions */
typedef void *off_t;

/* Variables and functions */
void *__infer_nondet_int();
off_t lseek(int fildes, off_t offset, int whence) {
  int n;
  off_t tmp;
  n = __infer_nondet_int();
  tmp = __infer_nondet_int();
  if (n > 0)
    return tmp;
  else
    return (off_t)-1;
}


x86 assembly (clang, -O0):
<lseek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %rax,-0x28(%rbp)
cmpl   $0x0,-0x20(%rbp)
jle    114e <lseek+0x3e>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1159 <lseek+0x49>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lseek>:
push   %rbx
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
test   %ebx,%ebx
mov    $0xffffffffffffffff,%rcx
cmovle %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @lseek(i32 %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%10 = call i8* (...) @__infer_nondet_int()
%11 = ptrtoint i8* %10 to i32
store i32 %11, i32* %8
%12 = call i8* (...) @__infer_nondet_int()
store i8* %12, i8** %9
%13 = load i32, i32* %8
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %3
%16 = load i8*, i8** %9
store i8* %16, i8** %4
br label %18
17: ; preds = %3
store i8* inttoptr (i64 -1 to i8*), i8** %4
br label %18
18: ; preds = %17, %15
%19 = load i8*, i8** %4
ret i8* %19
}

LLVM IR (-O2):
define i8* @lseek(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i8* (...) @__infer_nondet_int()
%5 = ptrtoint i8* %4 to i64
%6 = trunc i64 %5 to i32
%7 = tail call i8* (...) @__infer_nondet_int()
%8 = icmp sgt i32 %6, 0
%9 = select i1 %8, i8* %7, i8* inttoptr (i64 -1 to i8*)
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *prog) {
  fprintf(stderr, "%s: [-l] in out\n", prog);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"%s: [-l] in out\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"%s: [-l] in out\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int util_maxpow2(int val) {
  if (val == 1)
    return 0;
  int result = 1;
  while (result <= val)
    result = result << 1;
  return result >> 1;
}


x86 assembly (clang, -O0):
<util_maxpow2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    111d <util_maxpow2+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1147 <util_maxpow2+0x47>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     113e <util_maxpow2+0x3e>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1124 <util_maxpow2+0x24>
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_maxpow2>:
xor    %eax,%eax
cmp    $0x1,%edi
je     111b <util_maxpow2+0x1b>
mov    $0x1,%ecx
nopl   0x0(%rax)
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
cmp    %edi,%eax
jle    1110 <util_maxpow2+0x10>
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @util_maxpow2(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = icmp sgt i32 %4, %0
%6 = shl i32 %4, 1
br i1 %5, label %7, label %3
7: ; preds = %3
%8 = ashr i32 %4, 1
br label %9
9: ; preds = %1, %7
%10 = phi i32 [ %8, %7 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
double mt_genrand_int32();
double mt_genrand_real1(void) {
  return mt_genrand_int32() * (1.0 / 4294967295.0);
}


x86 assembly (clang, -O0):
<mt_genrand_real1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <mt_genrand_int32@plt>
movsd  0xedd(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mt_genrand_real1>:
push   %rax
xor    %eax,%eax
call   1030 <mt_genrand_int32@plt>
mulsd  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @mt_genrand_real1() {
%1 = call double (...) @mt_genrand_int32()
%2 = fmul double %1, 0x3DF0000000100000
ret double %2
}

LLVM IR (-O2):
define double @mt_genrand_real1() {
%1 = tail call double (...) @mt_genrand_int32()
%2 = fmul double %1, 0x3DF0000000100000
ret double %2
}
int fun165() { return 165; }


x86 assembly (clang, -O0):
<fun165>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa5,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fun165() {
ret i32 165
}

LLVM IR (-O2):
define i32 @fun165() {
ret i32 165
}
/* Variables and functions */
scalar_t__ ft_strcmp(char const *, char const *);
int ft_strequ(char const *s1, char const *s2) {
  return (ft_strcmp(s1, s2) == 0 ? 1 : 0);
}


x86 assembly (clang, -O0):
<ft_strequ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ft_strcmp@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strequ>:
push   %rax
call   1030 <ft_strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ft_strequ(i8* %0, i8* %1) {
%3 = tail call i64 @ft_strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
float fabsf(float);
float custom_fp(float operand_a) { return fabsf(operand_a); }


x86 assembly (clang, -O0):
<custom_fp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xeeb(%rip),%xmm1
pand   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<custom_fp>:
andps  0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define float @custom_fp(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.fabs.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @custom_fp(float %0) {
%2 = tail call float @llvm.fabs.f32(float %0)
ret float %2
}
int opnum(char c) {
  return c == '*' ? 0 : c == '/' ? 1 : c == '+' ? 2 : c == '-' ? 3 : -1;
}


x86 assembly (clang, -O0):
<opnum>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x2a,%eax
jne    1121 <opnum+0x21>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1178 <opnum+0x78>
movsbl -0x1(%rbp),%eax
cmp    $0x2f,%eax
jne    113b <opnum+0x3b>
mov    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1172 <opnum+0x72>
movsbl -0x1(%rbp),%eax
cmp    $0x2b,%eax
jne    1155 <opnum+0x55>
mov    $0x2,%eax
mov    %eax,-0x10(%rbp)
jmp    116c <opnum+0x6c>
movsbl -0x1(%rbp),%edx
mov    $0xffffffff,%eax
mov    $0x3,%ecx
cmp    $0x2d,%edx
cmove  %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<opnum>:
cmp    $0x2a,%dil
je     1118 <opnum+0x18>
cmp    $0x2b,%dil
je     111b <opnum+0x1b>
cmp    $0x2f,%dil
jne    1121 <opnum+0x21>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret
mov    $0x2,%eax
ret
xor    %eax,%eax
cmp    $0x2d,%dil
sete   %al
lea    -0x1(,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @opnum(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 42
br i1 %5, label %6, label %7
6: ; preds = %1
br label %27
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 47
br i1 %10, label %11, label %12
11: ; preds = %7
br label %25
12: ; preds = %7
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 43
br i1 %15, label %16, label %17
16: ; preds = %12
br label %23
17: ; preds = %12
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 45
%21 = zext i1 %20 to i64
%22 = select i1 %20, i32 3, i32 -1
br label %23
23: ; preds = %17, %16
%24 = phi i32 [ 2, %16 ], [ %22, %17 ]
br label %25
25: ; preds = %23, %11
%26 = phi i32 [ 1, %11 ], [ %24, %23 ]
br label %27
27: ; preds = %25, %6
%28 = phi i32 [ 0, %6 ], [ %26, %25 ]
ret i32 %28
}

LLVM IR (-O2):
define i32 @opnum(i8 signext %0) {
switch i8 %0, label %2 [
i8 42, label %7
i8 47, label %5
i8 43, label %6
]
2: ; preds = %1
%3 = icmp eq i8 %0, 45
%4 = select i1 %3, i32 3, i32 -1
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %5, %2
%8 = phi i32 [ 0, %1 ], [ %4, %2 ], [ 1, %5 ], [ 2, %6 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ assert(void const *);
char const *object_class_get_name(int /*<<< orphan*/);
int /*<<< orphan*/ object_get_class(void const *);
const char *object_get_class_name(const void *self) {
  assert(self);
  return object_class_get_name(object_get_class(self));
}


x86 assembly (clang, -O0):
<object_get_class_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1040 <object_get_class@plt>
mov    %eax,%edi
call   1050 <object_class_get_name@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<object_get_class_name>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    %rbx,%rdi
call   1040 <object_get_class@plt>
mov    %eax,%edi
pop    %rbx
jmp    1050 <object_class_get_name@plt>

LLVM IR (-O0):
define i8* @object_get_class_name(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @assert(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @object_get_class(i8* %5)
%7 = call i8* @object_class_get_name(i32 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @object_get_class_name(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = tail call i32 @object_get_class(i8* %0)
%4 = tail call i8* @object_class_get_name(i32 %3)
ret i8* %4
}
int writemask_xyzw(const int writemask) { return (writemask == 0xF); }


x86 assembly (clang, -O0):
<writemask_xyzw>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xf,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<writemask_xyzw>:
xor    %eax,%eax
cmp    $0xf,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @writemask_xyzw(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 15
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @writemask_xyzw(i32 %0) {
%2 = icmp eq i32 %0, 15
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int strcasecmp(char *, char *);
void strcasecmp_diff_length_3() {
  char *x = "aBc";
  char *y = "abcde";
  clang_analyzer_eval(strcasecmp(x, y) == -1);
}


x86 assembly (clang, -O0):
<strcasecmp_diff_length_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcasecmp_diff_length_3>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcasecmp@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"aBc\00"
@.str.1 = [6 x i8] c"abcde\00"
define void @strcasecmp_diff_length_3() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strcasecmp(i8* %3, i8* %4)
%6 = icmp eq i32 %5, -1
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"aBc\00"
@.str.1 = [6 x i8] c"abcde\00"
define void @strcasecmp_diff_length_3() {
%1 = tail call i32 @strcasecmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32 %1, -1
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Variables and functions */
int cairo_code_draw_rgbLED_get_width();
int cairo_code_draw_rgb5x7_get_width() {
  return cairo_code_draw_rgbLED_get_width() * 5 * 1.3;
}


x86 assembly (clang, -O0):
<cairo_code_draw_rgb5x7_get_width>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <cairo_code_draw_rgbLED_get_width@plt>
imul   $0x5,%eax,%eax
cvtsi2sd %eax,%xmm0
movsd  0xed6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cairo_code_draw_rgb5x7_get_width>:
push   %rax
xor    %eax,%eax
call   1030 <cairo_code_draw_rgbLED_get_width@plt>
lea    (%rax,%rax,4),%eax
cvtsi2sd %eax,%xmm0
mulsd  0xed9(%rip),%xmm0
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cairo_code_draw_rgb5x7_get_width() {
%1 = call i32 (...) @cairo_code_draw_rgbLED_get_width()
%2 = mul nsw i32 %1, 5
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 1.300000e+00
%5 = fptosi double %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @cairo_code_draw_rgb5x7_get_width() {
%1 = tail call i32 (...) @cairo_code_draw_rgbLED_get_width()
%2 = mul nsw i32 %1, 5
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 1.300000e+00
%5 = fptosi double %4 to i32
ret i32 %5
}
void outsb(int port, const void *addr, int cnt) {
  asm volatile("cld; rep outsb"
               : "=S"(addr), "=c"(cnt)
               : "d"(port), "0"(addr), "1"(cnt)
               : "cc");
}


x86 assembly (clang, -O0):
<outsb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
cld
rep outsb %ds:(%rsi),(%dx)
mov    %rsi,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outsb>:
mov    %edx,%ecx
mov    %edi,%edx
cld
rep outsb %ds:(%rsi),(%dx)
ret

LLVM IR (-O0):
define void @outsb(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call { i8*, i32 } asm sideeffect "cld; rep outsb", "={si},={cx},{dx},0,1,~{cc},~{dirflag},~{fpsr},~{flags}"(i32 %7, i8* %8, i32 %9)
%11 = extractvalue { i8*, i32 } %10, 0
%12 = extractvalue { i8*, i32 } %10, 1
store i8* %11, i8** %5
store i32 %12, i32* %6
ret void
}

LLVM IR (-O2):
define void @outsb(i32 %0, i8* %1, i32 %2) {
%4 = tail call { i8*, i32 } asm sideeffect "cld; rep outsb", "={si},={cx},{dx},0,1,~{cc},~{dirflag},~{fpsr},~{flags}"(i32 %0, i8* %1, i32 %2)
ret void
}
unsigned int date_part(unsigned int *egn, unsigned int part) {
  return egn[part] * 10 + egn[part + 1];
}


x86 assembly (clang, -O0):
<date_part>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
imul   $0xa,(%rax,%rcx,4),%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x1,%edx
mov    %edx,%edx
add    (%rcx,%rdx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<date_part>:
mov    %esi,%eax
mov    (%rdi,%rax,4),%eax
lea    (%rax,%rax,4),%eax
add    %eax,%eax
add    $0x1,%esi
add    (%rdi,%rsi,4),%eax
ret

LLVM IR (-O0):
define i32 @date_part(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 = zext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = load i32, i32* %8
%10 = mul i32 %9, 10
%11 = load i32*, i32** %3
%12 = load i32, i32* %4
%13 = add i32 %12, 1
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %11, i64 %14
%16 = load i32, i32* %15
%17 = add i32 %10, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @date_part(i32* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = mul i32 %5, 10
%7 = add i32 %1, 1
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = add i32 %6, %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int strncmp(char *, char *, int);
void strncmp_2() {
  char *x = "123";
  char *y = "234";
  clang_analyzer_eval(strncmp(x, y, 3) == -1);
}


x86 assembly (clang, -O0):
<strncmp_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmp_2>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
@.str.1 = [4 x i8] c"234\00"
define void @strncmp_2() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strncmp(i8* %3, i8* %4, i32 3)
%6 = icmp eq i32 %5, -1
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
@.str.1 = [4 x i8] c"234\00"
define void @strncmp_2() {
%1 = tail call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%2 = icmp eq i32 %1, -1
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ pow(int /*<<< orphan*/, int /*<<< orphan*/);
int64_t int_pow(int64_t base, int64_t power) {
  return (int64_t)pow(base, power);
}


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

x86 assembly (clang, -O2):
<int_pow>:
jmp    1030 <pow@plt>

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

LLVM IR (-O2):
define i32 @int_pow(i32 %0, i32 %1) {
%3 = tail call i32 @pow(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
int syscall(int, int /*<<< orphan*/, size_t, int);
int shmget(key_t key, size_t size, int flag) {
  return syscall(307, key, size, flag);
}


x86 assembly (clang, -O0):
<shmget>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x133,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shmget>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x133,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @shmget(i32 %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i64, i64* %5
%9 = load i32, i32* %6
%10 = call i32 @syscall(i32 307, i32 %7, i64 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @shmget(i32 %0, i64 %1, i32 %2) {
%4 = tail call i32 @syscall(i32 307, i32 %0, i64 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void *malloc(size_t);
void *xmalloc(size_t size) {
  void *ret;
  ret = malloc(size);
  if (!ret)
    die("cannot allocate memory");
  return ret;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <xmalloc+0x30>
lea    0xeb5(%rip),%rdi
call   1040 <die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <xmalloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"cannot allocate memory\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @die(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [23 x i8] c"cannot allocate memory\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @die(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ write_err(char const *);
void error(const char *msg) {
  write_err("sysloguwrite: Error: ");
  write_err(msg);
  write_err("\n");
}


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

x86 assembly (clang, -O2):
<error>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
call   1030 <write_err@plt>
mov    %rbx,%rdi
call   1030 <write_err@plt>
lea    0xee7(%rip),%rdi
pop    %rbx
jmp    1030 <write_err@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"sysloguwrite: Error: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @write_err(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @write_err(i8* %4)
%6 = call i32 @write_err(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"sysloguwrite: Error: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @error(i8* %0) {
%2 = tail call i32 @write_err(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @write_err(i8* %0)
%4 = tail call i32 @write_err(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}