xunge/DecIR huggingface dataset:
int check_args(int argc) {
  if (argc < 3 || argc > 3)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<check_args>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jl     111b <check_args+0x1b>
cmpl   $0x3,-0x8(%rbp)
jle    1127 <check_args+0x27>
movl   $0x0,-0x4(%rbp)
jmp    112e <check_args+0x2e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @check_args(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 3
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 3
br i1 %8, label %9, label %10
9: ; preds = %6, %1
store i32 0, i32* %2
br label %11
10: ; preds = %6
store i32 1, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @check_args(i32 %0) {
%2 = icmp eq i32 %0, 3
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ bne();
int /*<<< orphan*/ inc(int, int /*<<< orphan*/);
int /*<<< orphan*/ inx();
void jsr_inc16() {
  inc(5, 0);
  if (bne())
    goto no_carry;
  inx();
  inc(5, 0);
no_carry:;
}


x86 assembly (clang, -O0):
<jsr_inc16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
xor    %esi,%esi
call   1050 <inc@plt>
mov    $0x0,%al
call   1030 <bne@plt>
cmp    $0x0,%rax
je     1156 <jsr_inc16+0x26>
jmp    1169 <jsr_inc16+0x39>
mov    $0x0,%al
call   1040 <inx@plt>
mov    $0x5,%edi
xor    %esi,%esi
call   1050 <inc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<jsr_inc16>:
push   %rax
mov    $0x5,%edi
xor    %esi,%esi
call   1050 <inc@plt>
xor    %eax,%eax
call   1030 <bne@plt>
test   %rax,%rax
je     114b <jsr_inc16+0x1b>
pop    %rax
ret
xor    %eax,%eax
call   1040 <inx@plt>
mov    $0x5,%edi
xor    %esi,%esi
pop    %rax
jmp    1050 <inc@plt>

LLVM IR (-O0):
define void @jsr_inc16() {
%1 = call i32 @inc(i32 5, i32 0)
%2 = call i64 (...) @bne()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
br label %8
5: ; preds = %0
%6 = call i32 (...) @inx()
%7 = call i32 @inc(i32 5, i32 0)
br label %8
8: ; preds = %5, %4
ret void
}

LLVM IR (-O2):
define void @jsr_inc16() {
%1 = tail call i32 @inc(i32 5, i32 0)
%2 = tail call i64 (...) @bne()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = tail call i32 (...) @inx()
%6 = tail call i32 @inc(i32 5, i32 0)
br label %7
7: ; preds = %0, %4
ret void
}
/* Variables and functions */
void const *GppcFinfoV1();
const void *pg_finfo_userdata_describe(void) { return GppcFinfoV1(); }


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

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

LLVM IR (-O0):
define i8* @pg_finfo_userdata_describe() {
%1 = call i8* (...) @GppcFinfoV1()
ret i8* %1
}

LLVM IR (-O2):
define i8* @pg_finfo_userdata_describe() {
%1 = tail call i8* (...) @GppcFinfoV1()
ret i8* %1
}
void media_snd_stream_delete(struct snd_usb_substream *subs) {}


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

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

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

LLVM IR (-O2):
%struct.snd_usb_substream = type opaque
define void @media_snd_stream_delete(%struct.snd_usb_substream* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ lseek64(int, int /*<<< orphan*/, int);
off_t lseek(int fd, off_t offset, int whence) {
  return lseek64(fd, offset, whence);
}


x86 assembly (clang, -O0):
<lseek>:
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),%esi
mov    -0xc(%rbp),%edx
call   1030 <lseek64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lseek>:
jmp    1030 <lseek64@plt>

LLVM IR (-O0):
define i32 @lseek(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 @lseek64(i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @lseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @lseek64(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int read_int(char *);
int get_max_brightness() {
  return read_int("/sys/class/leds/smc::kbd_backlight/max_brightness");
}


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

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

LLVM IR (-O0):
@.str = [50 x i8] c"/sys/class/leds/smc::kbd_backlight/max_brightness\00"
define i32 @get_max_brightness() {
%1 = call i32 @read_int(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [50 x i8] c"/sys/class/leds/smc::kbd_backlight/max_brightness\00"
define i32 @get_max_brightness() {
%1 = tail call i32 @read_int(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
float to_fahrenheit(float c) { return (9 * c / 5) + 32; }


x86 assembly (clang, -O0):
<to_fahrenheit>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef7(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xee6(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xed6(%rip),%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_fahrenheit>:
mulss  0xef8(%rip),%xmm0
divss  0xef4(%rip),%xmm0
addss  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define float @to_fahrenheit(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float 9.000000e+00, %3
%5 = fdiv float %4, 5.000000e+00
%6 = fadd float %5, 3.200000e+01
ret float %6
}

LLVM IR (-O2):
define float @to_fahrenheit(float %0) {
%2 = fmul float %0, 9.000000e+00
%3 = fdiv float %2, 5.000000e+00
%4 = fadd float %3, 3.200000e+01
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
void cpy_2d_string(char *destination[], const char *source[], int argc) {
  int i;
  for (i = 1; i <= argc; i++)
    strcpy(destination[i], source[i]);
}


x86 assembly (clang, -O0):
<cpy_2d_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1161 <cpy_2d_string+0x51>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <cpy_2d_string+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpy_2d_string>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
jle    1146 <cpy_2d_string+0x36>
mov    %edx,%r12d
mov    %rsi,%r14
mov    %rdi,%r15
add    $0x1,%r12d
mov    $0x1,%ebx
xchg   %ax,%ax
mov    (%r15,%rbx,8),%rdi
mov    (%r14,%rbx,8),%rsi
call   1030 <strcpy@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <cpy_2d_string+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @cpy_2d_string(i8** nocapture %0, i8** nocapture %1, i32 %2) {
%4 = icmp slt i32 %2, 1
br i1 %4, label %17, label %5
5: ; preds = %3
%6 = add nuw i32 %2, 1
%7 = zext i32 %6 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ 1, %5 ], [ %15, %8 ]
%10 = getelementptr inbounds i8*, i8** %0, i64 %9
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8*, i8** %1, i64 %9
%13 = load i8*, i8** %12
%14 = tail call i32 @strcpy(i8* %11, i8* %13)
%15 = add nuw nsw i64 %9, 1
%16 = icmp eq i64 %15, %7
br i1 %16, label %17, label %8
17: ; preds = %8, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ SSL;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_TYPE_DESCRIPTOR;
int /*<<< orphan*/ *BIO_find_type(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ BIO_get_fd(int /*<<< orphan*/ *, int *);
int /*<<< orphan*/ *SSL_get_wbio(int /*<<< orphan*/ const *);
int SSL_get_wfd(const SSL *s) {
  int ret = -1;
  BIO *b, *r;
  b = SSL_get_wbio(s);
  r = BIO_find_type(b, BIO_TYPE_DESCRIPTOR);
  if (r != NULL)
    BIO_get_fd(r, &ret);
  return (ret);
}


x86 assembly (clang, -O0):
<SSL_get_wfd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <SSL_get_wbio@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
call   1040 <BIO_find_type@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     117e <SSL_get_wfd+0x4e>
mov    -0x20(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <BIO_get_fd@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSL_get_wfd>:
push   %rax
movl   $0xffffffff,0x4(%rsp)
ff
call   1030 <SSL_get_wbio@plt>
mov    0x2eab(%rip),%rcx
mov    (%rcx),%esi
mov    %rax,%rdi
call   1040 <BIO_find_type@plt>
test   %rax,%rax
je     1167 <SSL_get_wfd+0x37>
lea    0x4(%rsp),%rsi
mov    %rax,%rdi
call   1050 <BIO_get_fd@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@BIO_TYPE_DESCRIPTOR = global i32 0
define i32 @SSL_get_wfd(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
store i32* %0, i32** %2
store i32 -1, i32* %3
%6 = load i32*, i32** %2
%7 = call i32* @SSL_get_wbio(i32* %6)
store i32* %7, i32** %4
%8 = load i32*, i32** %4
%9 = load i32, i32* @BIO_TYPE_DESCRIPTOR
%10 = call i32* @BIO_find_type(i32* %8, i32 %9)
store i32* %10, i32** %5
%11 = load i32*, i32** %5
%12 = icmp ne i32* %11, null
br i1 %12, label %13, label %16
13: ; preds = %1
%14 = load i32*, i32** %5
%15 = call i32 @BIO_get_fd(i32* %14, i32* %3)
br label %16
16: ; preds = %13, %1
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@BIO_TYPE_DESCRIPTOR = global i32 0
define i32 @SSL_get_wfd(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 -1, i32* %2
%4 = tail call i32* @SSL_get_wbio(i32* %0)
%5 = load i32, i32* @BIO_TYPE_DESCRIPTOR
%6 = tail call i32* @BIO_find_type(i32* %4, i32 %5)
%7 = icmp eq i32* %6, null
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = call i32 @BIO_get_fd(i32* %6, i32* %2)
%10 = load i32, i32* %2
br label %11
11: ; preds = %8, %1
%12 = phi i32 [ %10, %8 ], [ -1, %1 ]
ret i32 %12
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ printf(char *, size_t, void *);
void *my_malloc(size_t size) {
  void *ptr = malloc(size);
  printf("Inside my_malloc(), size = %d, ptr = %p\n", size, ptr);
  return ptr;
}


x86 assembly (clang, -O0):
<my_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_malloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xeca(%rip),%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1030 <printf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [41 x i8] c"Inside my_malloc(), size = %d, ptr = %p\0A\00"
define i8* @my_malloc(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 i64, i64* %2
%7 = load i8*, i8** %3
%8 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 %6, i8* %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
@.str = [41 x i8] c"Inside my_malloc(), size = %d, ptr = %p\0A\00"
define i8* @my_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 %0, i8* %2)
ret i8* %2
}
int objc_compare_ptrs(const void *k1, const void *k2) { return (k1 == k2); }


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

x86 assembly (clang, -O2):
<objc_compare_ptrs>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @objc_compare_ptrs(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int renameat(int /*<<< orphan*/, char const *, int /*<<< orphan*/,
             char const *);
int rename(const char *oldpath, const char *newpath) {
  return renameat(AT_FDCWD, oldpath, AT_FDCWD, newpath);
}


x86 assembly (clang, -O0):
<rename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rcx
call   1030 <renameat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rename>:
mov    %rsi,%rcx
mov    %rdi,%rsi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
mov    %edi,%edx
jmp    1030 <renameat@plt>

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

LLVM IR (-O2):
@AT_FDCWD = global i32 0
define i32 @rename(i8* %0, i8* %1) {
%3 = load i32, i32* @AT_FDCWD
%4 = tail call i32 @renameat(i32 %3, i8* %0, i32 %3, i8* %1)
ret i32 %4
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int circ_compare16(uint16_t a, uint16_t b) {
  uint16_t c;
  c = b;
  c -= a;
  if (c > 0x8000)
    return 1;
  else if (c == 0)
    return 0;
  else
    return -1;
}


x86 assembly (clang, -O0):
<circ_compare16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x8000,-0x10(%rbp)
jle    1134 <circ_compare16+0x34>
movl   $0x1,-0x4(%rbp)
jmp    1151 <circ_compare16+0x51>
cmpl   $0x0,-0x10(%rbp)
jne    114a <circ_compare16+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1151 <circ_compare16+0x51>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<circ_compare16>:
sub    %edi,%esi
mov    %esi,%eax
neg    %eax
sbb    %ecx,%ecx
cmp    $0x8001,%esi
mov    $0x1,%eax
cmovl  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @circ_compare16(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
%4 = icmp sgt i32 %3, 32768
%5 = icmp ne i32 %3, 0
%6 = sext i1 %5 to i32
%7 = select i1 %4, i32 1, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char const *);
int /*<<< orphan*/ stdout;
void cubalog_(const char *s) {
  puts(s);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<cubalog_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cubalog_>:
push   %rax
call   1030 <puts@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @cubalog_(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @puts(i8* %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @cubalog_(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
double calcSunTrueLong(double);
int /*<<< orphan*/ degToRad(double);
double sin(int /*<<< orphan*/);
double calcSunApparentLong(double t) {
  double o = calcSunTrueLong(t);
  double omega = 125.04 - 1934.136 * t;
  double lambda = o - 0.00569 - 0.00478 * sin(degToRad(omega));
  return lambda;
}


x86 assembly (clang, -O0):
<calcSunApparentLong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <calcSunTrueLong@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb3(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe8d(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1050 <degToRad@plt>
mov    %eax,%edi
call   1030 <sin@plt>
movsd  -0x28(%rbp),%xmm1
movsd  0xe5e(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcSunApparentLong>:
push   %rax
movsd  %xmm0,(%rsp)
call   1040 <calcSunTrueLong@plt>
movsd  (%rsp),%xmm1
mulsd  0xeb8(%rip),%xmm1
addsd  0xeb8(%rip),%xmm1
addsd  0xeb8(%rip),%xmm0
movsd  %xmm0,(%rsp)
movapd %xmm1,%xmm0
call   1050 <degToRad@plt>
mov    %eax,%edi
call   1030 <sin@plt>
mulsd  0xea3(%rip),%xmm0
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @calcSunApparentLong(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %2
%6 = load double, double* %2
%7 = call double @calcSunTrueLong(double %6)
store double %7, double* %3
%8 = load double, double* %2
%9 = call double @llvm.fmuladd.f64(double 0xC09E388B43958106, double %8, double 1.250400e+02)
store double %9, double* %4
%10 = load double, double* %3
%11 = fsub double %10, 5.690000e-03
%12 = load double, double* %4
%13 = call i32 @degToRad(double %12)
%14 = call double @sin(i32 %13)
%15 = call double @llvm.fmuladd.f64(double -4.780000e-03, double %14, double %11)
store double %15, double* %5
%16 = load double, double* %5
ret double %16
}

LLVM IR (-O2):
define double @calcSunApparentLong(double %0) {
%2 = tail call double @calcSunTrueLong(double %0)
%3 = tail call double @llvm.fmuladd.f64(double %0, double 0xC09E388B43958106, double 1.250400e+02)
%4 = fadd double %2, -5.690000e-03
%5 = tail call i32 @degToRad(double %3)
%6 = tail call double @sin(i32 %5)
%7 = tail call double @llvm.fmuladd.f64(double %6, double -4.780000e-03, double %4)
ret double %7
}
long long atmc_fetch_and_add(volatile unsigned long long *address,
                             long long value) {
  int prev = value;
  asm volatile("lock ; "
               "xaddq %0, %1"
               : "+r"(value), "+m"(*address)
               :
               : "memory");
  return prev + value;
}


x86 assembly (clang, -O0):
<atmc_fetch_and_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
lock xadd %rax,(%rcx)
mov    %rax,-0x10(%rbp)
movslq -0x14(%rbp),%rax
add    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atmc_fetch_and_add>:
movslq %esi,%rax
lock xadd %rsi,(%rdi)
add    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @atmc_fetch_and_add(i64* %0, i64 %1) {
%3 = tail call i64 asm sideeffect "lock ; xaddq $0, $1", "=r,=*m,0,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %0, i64 %1, i64* elementtype(i64) %0)
%4 = shl i64 %1, 32
%5 = ashr exact i64 %4, 32
%6 = add nsw i64 %3, %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char);
int is_void(char *s) {
  while (*s != '\0') {
    if (!isspace(*s))
      return 0;
    s++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_void>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115e <is_void+0x4e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
jne    114d <is_void+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    1165 <is_void+0x55>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <is_void+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_void>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <is_void+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
je     1149 <is_void+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <is_void+0x20>
jmp    114b <is_void+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @is_void(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i32 @isspace(i8 signext %8)
%11 = icmp eq i32 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ carrega_config();
void interrupcao_usr1() {
  carrega_config();
  return;
}


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

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

LLVM IR (-O0):
define void @interrupcao_usr1() {
%1 = call i32 (...) @carrega_config()
ret void
}

LLVM IR (-O2):
define void @interrupcao_usr1() {
%1 = tail call i32 (...) @carrega_config()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ wcstok(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          int /*<<< orphan*/ **);
void uninitvar_wcstok(void) {
  wchar_t *s;
  const wchar_t *ct;
  wchar_t **ptr;
  (void)wcstok(s, ct, ptr);
}


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

x86 assembly (clang, -O2):
<uninitvar_wcstok>:
jmp    1030 <wcstok@plt>

LLVM IR (-O0):
define void @uninitvar_wcstok() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32**
%4 = load i32*, i32** %1
%5 = load i32*, i32** %2
%6 = load i32**, i32*** %3
%7 = call i32 @wcstok(i32* %4, i32* %5, i32** %6)
ret void
}

LLVM IR (-O2):
define void @uninitvar_wcstok() {
%1 = tail call i32 @wcstok(i32* undef, i32* undef, i32** undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *prec_to_RxRxRxRx(char *target, double r) {
  sprintf(target, "%04d", (int)(r * 10.0 + 0.5));
  return target;
}


x86 assembly (clang, -O0):
<prec_to_RxRxRxRx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
movsd  0xece(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeca(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edx
lea    0xec3(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prec_to_RxRxRxRx>:
push   %rbx
mov    %rdi,%rbx
mulsd  0xee4(%rip),%xmm0
addsd  0xee4(%rip),%xmm0
cvttsd2si %xmm0,%edx
lea    0xee1(%rip),%rsi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%04d\00"
define i8* @prec_to_RxRxRxRx(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load i8*, i8** %3
%6 = load double, double* %4
%7 = call double @llvm.fmuladd.f64(double %6, double 1.000000e+01, double 5.000000e-01)
%8 = fptosi double %7 to i32
%9 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [5 x i8] c"%04d\00"
define i8* @prec_to_RxRxRxRx(i8* returned writeonly %0, double %1) {
%3 = tail call double @llvm.fmuladd.f64(double %1, double 1.000000e+01, double 5.000000e-01)
%4 = fptosi double %3 to i32
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i8* %0
}
int foo(volatile int *f) { return *f; }


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

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

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

LLVM IR (-O2):
define i32 @foo(i32* %0) {
%2 = load volatile i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ second_column(long **, long **);
int /*<<< orphan*/ transpose(long **);
void second_one_loop(long A[3][3], long P[3][3], long Q[3][3]) {
  second_column(A, P);
  transpose(A);
  second_column(A, Q);
  transpose(A);
}


x86 assembly (clang, -O0):
<second_one_loop>:
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 <second_column@plt>
mov    -0x8(%rbp),%rdi
call   1040 <transpose@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <second_column@plt>
mov    -0x8(%rbp),%rdi
call   1040 <transpose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<second_one_loop>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <second_column@plt>
mov    %rbx,%rdi
call   1040 <transpose@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <second_column@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <transpose@plt>

LLVM IR (-O0):
define void @second_one_loop([3 x i64]* %0, [3 x i64]* %1, [3 x i64]* %2) {
%4 = alloca [3 x i64]*
%5 = alloca [3 x i64]*
%6 = alloca [3 x i64]*
store [3 x i64]* %0, [3 x i64]** %4
store [3 x i64]* %1, [3 x i64]** %5
store [3 x i64]* %2, [3 x i64]** %6
%7 = load [3 x i64]*, [3 x i64]** %4
%8 = bitcast [3 x i64]* %7 to i64**
%9 = load [3 x i64]*, [3 x i64]** %5
%10 = bitcast [3 x i64]* %9 to i64**
%11 = call i32 @second_column(i64** %8, i64** %10)
%12 = load [3 x i64]*, [3 x i64]** %4
%13 = bitcast [3 x i64]* %12 to i64**
%14 = call i32 @transpose(i64** %13)
%15 = load [3 x i64]*, [3 x i64]** %4
%16 = bitcast [3 x i64]* %15 to i64**
%17 = load [3 x i64]*, [3 x i64]** %6
%18 = bitcast [3 x i64]* %17 to i64**
%19 = call i32 @second_column(i64** %16, i64** %18)
%20 = load [3 x i64]*, [3 x i64]** %4
%21 = bitcast [3 x i64]* %20 to i64**
%22 = call i32 @transpose(i64** %21)
ret void
}

LLVM IR (-O2):
define void @second_one_loop([3 x i64]* %0, [3 x i64]* %1, [3 x i64]* %2) {
%4 = bitcast [3 x i64]* %0 to i64**
%5 = bitcast [3 x i64]* %1 to i64**
%6 = tail call i32 @second_column(i64** %4, i64** %5)
%7 = tail call i32 @transpose(i64** %4)
%8 = bitcast [3 x i64]* %2 to i64**
%9 = tail call i32 @second_column(i64** %4, i64** %8)
%10 = tail call i32 @transpose(i64** %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void fail4(void) { abort(); }


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

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

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

LLVM IR (-O2):
define void @fail4() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ sigaddset(int /*<<< orphan*/ *, int);
void xadd(sigset_t *set, int sig) {
  if (sigaddset(set, sig) != 0)
    abort();
}


x86 assembly (clang, -O0):
<xadd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <sigaddset@plt>
cmp    $0x0,%rax
je     114c <xadd+0x2c>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xadd>:
push   %rax
call   1040 <sigaddset@plt>
test   %rax,%rax
jne    112d <xadd+0xd>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @xadd(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 i64 @sigaddset(i32* %5, i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @xadd(i32* %0, i32 %1) {
%3 = tail call i64 @sigaddset(i32* %0, i32 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret void
}
/* Variables and functions */
bool ident_check(char c) {
  if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
      (c >= '0' && c <= '9') || c == '_')
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<ident_check>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1124 <ident_check+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jle    1165 <ident_check+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     113e <ident_check+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jle    1165 <ident_check+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1158 <ident_check+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jle    1165 <ident_check+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
jne    1171 <ident_check+0x71>
movl   $0x1,-0x4(%rbp)
jmp    1178 <ident_check+0x78>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ident_check>:
mov    %edi,%ecx
and    $0xdf,%cl
add    $0xbf,%cl
mov    $0x1,%eax
cmp    $0x1a,%cl
jb     1126 <ident_check+0x26>
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
cmp    $0x5f,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ident_check(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, 97
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, 122
br i1 %10, label %31, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 65
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, 90
br i1 %18, label %31, 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 %31, label %27
27: ; preds = %23, %19
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 95
br i1 %30, label %31, label %32
31: ; preds = %27, %23, %15, %7
store i32 1, i32* %2
br label %33
32: ; preds = %27
store i32 0, i32* %2
br label %33
33: ; preds = %32, %31
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @ident_check(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = add i8 %0, -48
%7 = icmp ult i8 %6, 10
%8 = icmp eq i8 %0, 95
%9 = or i1 %8, %7
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %5, %1
%12 = phi i32 [ 1, %1 ], [ %10, %5 ]
ret i32 %12
}
/* Type definitions */
struct gengetopt_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clear_given(struct gengetopt_args_info *);
void cmdline_parser_release(struct gengetopt_args_info *args_info) {
  clear_given(args_info);
}


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

x86 assembly (clang, -O2):
<cmdline_parser_release>:
jmp    1030 <clear_given@plt>

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

LLVM IR (-O2):
%struct.gengetopt_args_info = type { i32 }
define void @cmdline_parser_release(%struct.gengetopt_args_info* %0) {
%2 = tail call i32 @clear_given(%struct.gengetopt_args_info* %0)
ret void
}
double dot(int g[], double x, double y) { return g[0] * x + g[1] * y; }


x86 assembly (clang, -O0):
<dot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2sdl (%rax),%xmm0
movsd  -0x10(%rbp),%xmm2
mov    -0x8(%rbp),%rax
cvtsi2sdl 0x4(%rax),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot>:
cvtsi2sdl (%rdi),%xmm2
cvtsi2sdl 0x4(%rdi),%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @dot(i32* %0, double %1, double %2) {
%4 = alloca i32*
%5 = alloca double
%6 = alloca double
store i32* %0, i32** %4
store double %1, double* %5
store double %2, double* %6
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = sitofp i32 %9 to double
%11 = load double, double* %5
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
%15 = sitofp i32 %14 to double
%16 = load double, double* %6
%17 = fmul double %15, %16
%18 = call double @llvm.fmuladd.f64(double %10, double %11, double %17)
ret double %18
}

LLVM IR (-O2):
define double @dot(i32* nocapture %0, double %1, double %2) {
%4 = load i32, i32* %0
%5 = sitofp i32 %4 to double
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = fmul double %8, %2
%10 = tail call double @llvm.fmuladd.f64(double %5, double %1, double %9)
ret double %10
}
int do_099() { return 99; }


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

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

LLVM IR (-O0):
define i32 @do_099() {
ret i32 99
}

LLVM IR (-O2):
define i32 @do_099() {
ret i32 99
}
void dfn_aci(_Complex int i) {}


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

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

LLVM IR (-O0):
define void @dfn_aci(i64 %0) {
%2 = alloca { i32, i32 }
%3 = bitcast { i32, i32 }* %2 to i64*
store i64 %0, i64* %3
ret void
}

LLVM IR (-O2):
define void @dfn_aci(i64 %0) {
ret void
}
void crash_kexec(struct pt_regs *regs) {}


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

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

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

LLVM IR (-O2):
%struct.pt_regs = type opaque
define void @crash_kexec(%struct.pt_regs* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sobel(unsigned char *, int, int);
void change(unsigned char *data, int cols, int rows) {
  sobel(data, cols, rows);
}


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

x86 assembly (clang, -O2):
<change>:
jmp    1030 <sobel@plt>

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

LLVM IR (-O2):
define void @change(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @sobel(i8* %0, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check_messages(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
__attribute__((noreturn)) void mount_error(int fd, const char *s) {
  check_messages(fd);
  fprintf(stderr, "%s: %m\n", s);
  exit(1);
}


x86 assembly (clang, -O0):
<mount_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <check_messages@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xea5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<mount_error>:
push   %rbx
mov    %rsi,%rbx
call   1050 <check_messages@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xeb7(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %m\0A\00"
define void @mount_error(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = call i32 @check_messages(i32 %5)
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %m\0A\00"
define void @mount_error(i32 %0, i8* %1) {
%3 = tail call i32 @check_messages(i32 %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int f1();
int f2() { return f1(); }


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

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

LLVM IR (-O0):
define i32 @f2() {
%1 = call i32 (...) @f1()
ret i32 %1
}

LLVM IR (-O2):
define i32 @f2() {
%1 = tail call i32 (...) @f1()
ret i32 %1
}
char *strchrnul(const char *s, int c) {
  char *p = (void *)0;
  for (; *s; s++) {
    if (*s == c)
      return (char *)s;
  }
  if (*s == c)
    return (char *)s;
  return (char *)(p ? p : s);
}


x86 assembly (clang, -O0):
<strchrnul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1153 <strchrnul+0x53>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    113d <strchrnul+0x3d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1198 <strchrnul+0x98>
jmp    1142 <strchrnul+0x42>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1113 <strchrnul+0x13>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    1170 <strchrnul+0x70>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1198 <strchrnul+0x98>
cmpq   $0x0,-0x20(%rbp)
je     1188 <strchrnul+0x88>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1190 <strchrnul+0x90>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchrnul>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movsbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %ecx,%ecx
je     1120 <strchrnul+0x20>
cmp    %esi,%ecx
jne    1110 <strchrnul+0x10>
ret

LLVM IR (-O0):
define i8* @strchrnul(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* null, i8** %6
br label %7
7: ; preds = %20, %2
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %23
11: ; preds = %7
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = load i32, i32* %5
%16 = icmp eq i32 %14, %15
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = load i8*, i8** %4
store i8* %18, i8** %3
br label %40
19: ; preds = %11
br label %20
20: ; preds = %19
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %4
br label %7
23: ; preds = %7
%24 = load i8*, i8** %4
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = load i32, i32* %5
%28 = icmp eq i32 %26, %27
br i1 %28, label %29, label %31
29: ; preds = %23
%30 = load i8*, i8** %4
store i8* %30, i8** %3
br label %40
31: ; preds = %23
%32 = load i8*, i8** %6
%33 = icmp ne i8* %32, null
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = load i8*, i8** %6
br label %38
36: ; preds = %31
%37 = load i8*, i8** %4
br label %38
38: ; preds = %36, %34
%39 = phi i8* [ %35, %34 ], [ %37, %36 ]
store i8* %39, i8** %3
br label %40
40: ; preds = %38, %29, %17
%41 = load i8*, i8** %3
ret i8* %41
}

LLVM IR (-O2):
define i8* @strchrnul(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %10, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = sext i8 %5 to i32
%8 = icmp eq i32 %7, %1
%9 = or i1 %6, %8
%10 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %9, label %11, label %3
11: ; preds = %3
ret i8* %4
}
void cap_str(char *p) {
  while (*p != '\0') {
    unsigned char c;
    c = (unsigned char)*p;
    if ((c >= 'a' && c <= 'z') || (c >= 0xe0 && c <= 0xfe))
      *p = c & ~0x20;
    p++;
  }
}


x86 assembly (clang, -O0):
<cap_str>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1179 <cap_str+0x79>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
cmp    $0x61,%eax
jl     113b <cap_str+0x3b>
movzbl -0x9(%rbp),%eax
cmp    $0x7a,%eax
jle    1159 <cap_str+0x59>
movzbl -0x9(%rbp),%eax
cmp    $0xe0,%eax
jl     1168 <cap_str+0x68>
movzbl -0x9(%rbp),%eax
cmp    $0xfe,%eax
jg     1168 <cap_str+0x68>
movzbl -0x9(%rbp),%eax
and    $0xffffffdf,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <cap_str+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cap_str>:
mov    (%rdi),%al
test   %al,%al
je     1132 <cap_str+0x32>
add    $0x1,%rdi
jmp    1120 <cap_str+0x20>
nopl   0x0(%rax)
and    $0xdf,%al
mov    %al,-0x1(%rdi)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     1132 <cap_str+0x32>
lea    -0x61(%rax),%ecx
cmp    $0x1a,%cl
jb     1110 <cap_str+0x10>
lea    0x20(%rax),%ecx
cmp    $0x1e,%cl
ja     1115 <cap_str+0x15>
jmp    1110 <cap_str+0x10>
ret

LLVM IR (-O0):
define void @cap_str(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
br label %4
4: ; preds = %33, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %36
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
store i8 %11, i8* %3
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %19
15: ; preds = %9
%16 = load i8, i8* %3
%17 = zext i8 %16 to i32
%18 = icmp sle i32 %17, 122
br i1 %18, label %27, label %19
19: ; preds = %15, %9
%20 = load i8, i8* %3
%21 = zext i8 %20 to i32
%22 = icmp sge i32 %21, 224
br i1 %22, label %23, label %33
23: ; preds = %19
%24 = load i8, i8* %3
%25 = zext i8 %24 to i32
%26 = icmp sle i32 %25, 254
br i1 %26, label %27, label %33
27: ; preds = %23, %15
%28 = load i8, i8* %3
%29 = zext i8 %28 to i32
%30 = and i32 %29, -33
%31 = trunc i32 %30 to i8
%32 = load i8*, i8** %2
store i8 %31, i8* %32
br label %33
33: ; preds = %27, %23, %19
%34 = load i8*, i8** %2
%35 = getelementptr inbounds i8, i8* %34, i32 1
store i8* %35, i8** %2
br label %4
36: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @cap_str(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %18, label %4
4: ; preds = %1, %14
%5 = phi i8 [ %16, %14 ], [ %2, %1 ]
%6 = phi i8* [ %15, %14 ], [ %0, %1 ]
%7 = add i8 %5, -97
%8 = icmp ult i8 %7, 26
%9 = add i8 %5, 32
%10 = icmp ult i8 %9, 31
%11 = or i1 %8, %10
br i1 %11, label %12, label %14
12: ; preds = %4
%13 = and i8 %5, -33
store i8 %13, i8* %6
br label %14
14: ; preds = %4, %12
%15 = getelementptr inbounds i8, i8* %6, i64 1
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %4
18: ; preds = %14, %1
ret void
}