xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ asc(char *);
int /*<<< orphan*/ eFree(char *);
char *popString();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basAsc() {
  char *string;
  string = popString();
  pushNumber(asc(string));
  eFree(string);
}


x86 assembly (clang, -O0):
<basAsc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popString@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <asc@plt>
mov    %eax,%edi
call   1060 <pushNumber@plt>
mov    -0x8(%rbp),%rdi
call   1040 <eFree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basAsc>:
push   %rbx
xor    %eax,%eax
call   1050 <popString@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <asc@plt>
mov    %eax,%edi
call   1060 <pushNumber@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <eFree@plt>

LLVM IR (-O0):
define void @basAsc() {
%1 = alloca i8*
%2 = call i8* (...) @popString()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @asc(i8* %3)
%5 = call i32 @pushNumber(i32 %4)
%6 = load i8*, i8** %1
%7 = call i32 @eFree(i8* %6)
ret void
}

LLVM IR (-O2):
define void @basAsc() {
%1 = tail call i8* (...) @popString()
%2 = tail call i32 @asc(i8* %1)
%3 = tail call i32 @pushNumber(i32 %2)
%4 = tail call i32 @eFree(i8* %1)
ret void
}
/* Variables and functions */
char __toupper(char);
void UpperStr(char *Str) {
  while (*Str) {
    *Str = __toupper(*Str);
    Str++;
  }
}


x86 assembly (clang, -O0):
<UpperStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <UpperStr+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <__toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <UpperStr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpperStr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <UpperStr+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <__toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <UpperStr+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @UpperStr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @__toupper(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef scalar_t__ int_fast32_t;

/* Variables and functions */
bool SHAREMIND_SET_KEY_LESS_THAN_int_fast32_t(int_fast32_t const k1,
                                              int_fast32_t const k2) {
  return k1 < k2;
}


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

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

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_int_fast32_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_int_fast32_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
char *padding(void *tmp_blk, void *data, size_t size) {
  memset(tmp_blk, 0, (512 * 2));
  if (size > 0) {
    memcpy(tmp_blk, data, size);
  }
  return (char *)tmp_blk;
}


x86 assembly (clang, -O0):
<padding>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1030 <memset@plt>
cmpq   $0x0,-0x18(%rbp)
jbe    1160 <padding+0x40>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padding>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x400,%edx
call   1030 <memset@plt>
test   %r14,%r14
je     114d <padding+0x2d>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @padding(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = call i32 @memset(i8* %7, i32 0, i32 1024)
%9 = load i64, i64* %6
%10 = icmp ugt i64 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %3
%12 = load i8*, i8** %4
%13 = load i8*, i8** %5
%14 = load i64, i64* %6
%15 = call i32 @memcpy(i8* %12, i8* %13, i64 %14)
br label %16
16: ; preds = %11, %3
%17 = load i8*, i8** %4
ret i8* %17
}

LLVM IR (-O2):
define i8* @padding(i8* returned %0, i8* %1, i64 %2) {
%4 = tail call i32 @memset(i8* %0, i32 0, i32 1024)
%5 = icmp eq i64 %2, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
br label %8
8: ; preds = %6, %3
ret i8* %0
}
/* Variables and functions */
char isBefore(char *lpszA, char *lpszB) {
  if (lpszB == NULL)
    return 1;
  if (lpszA == NULL)
    return 0;
  if ((int)(lpszA - lpszB) < 0) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<isBefore>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1120 <isBefore+0x20>
movb   $0x1,-0x1(%rbp)
jmp    1155 <isBefore+0x55>
cmpq   $0x0,-0x10(%rbp)
jne    1134 <isBefore+0x34>
movb   $0x0,-0x1(%rbp)
jmp    1155 <isBefore+0x55>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x0,%eax
jge    1151 <isBefore+0x51>
movb   $0x1,-0x1(%rbp)
jmp    1155 <isBefore+0x55>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isBefore>:
test   %rsi,%rsi
je     1113 <isBefore+0x13>
mov    %rdi,%rax
test   %rdi,%rdi
je     1116 <isBefore+0x16>
sub    %esi,%eax
shr    $0x1f,%eax
ret
mov    $0x1,%al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define signext i8 @isBefore(i8* %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
store i8 1, i8* %3
br label %23
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %13
12: ; preds = %9
store i8 0, i8* %3
br label %23
13: ; preds = %9
%14 = load i8*, i8** %4
%15 = load i8*, i8** %5
%16 = ptrtoint i8* %14 to i64
%17 = ptrtoint i8* %15 to i64
%18 = sub i64 %16, %17
%19 = trunc i64 %18 to i32
%20 = icmp slt i32 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %13
store i8 1, i8* %3
br label %23
22: ; preds = %13
store i8 0, i8* %3
br label %23
23: ; preds = %22, %21, %12, %8
%24 = load i8, i8* %3
ret i8 %24
}

LLVM IR (-O2):
define signext i8 @isBefore(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = icmp eq i8* %0, null
br i1 %5, label %13, label %6
6: ; preds = %4
%7 = ptrtoint i8* %0 to i64
%8 = ptrtoint i8* %1 to i64
%9 = sub i64 %7, %8
%10 = lshr i64 %9, 31
%11 = trunc i64 %10 to i8
%12 = and i8 %11, 1
br label %13
13: ; preds = %6, %4, %2
%14 = phi i8 [ 1, %2 ], [ 0, %4 ], [ %12, %6 ]
ret i8 %14
}
/* Variables and functions */
int /*<<< orphan*/ xip_fpo_greaterequal_flt(int *, float, float);
int xil_fpo_greaterequal_flt(float a, float b) {
  int res_int;
  xip_fpo_greaterequal_flt(&res_int, a, b);
  return res_int;
}


x86 assembly (clang, -O0):
<xil_fpo_greaterequal_flt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
lea    -0xc(%rbp),%rdi
call   1030 <xip_fpo_greaterequal_flt@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xil_fpo_greaterequal_flt>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <xip_fpo_greaterequal_flt@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @xil_fpo_greaterequal_flt(float %0, float %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @xip_fpo_greaterequal_flt(i32* %3, float %0, float %1)
%6 = load i32, i32* %3
ret i32 %6
}
void _permcopy(char const **mode) { (*mode)++; }


x86 assembly (clang, -O0):
<_permcopy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_permcopy>:
addq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @_permcopy(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i32 1
store i8* %5, i8** %3
ret void
}

LLVM IR (-O2):
define void @_permcopy(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr inbounds i8, i8* %2, i64 1
store i8* %3, i8** %0
ret void
}
/* Type definitions */
struct timeval {
  unsigned long long tv_sec;
  unsigned long long tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
unsigned long long get_time(void) {
  struct timeval tv;
  unsigned long long time;
  gettimeofday(&tv, NULL);
  time = (tv.tv_sec * 1000000000ULL);
  time += (tv.tv_usec * 1000ULL);
  return time;
}


x86 assembly (clang, -O0):
<get_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3b9aca00,-0x10(%rbp),%rax
3b
mov    %rax,-0x18(%rbp)
imul   $0x3e8,-0x8(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3b9aca00,0x8(%rsp),%rcx
9a 3b
imul   $0x3e8,0x10(%rsp),%rax
add    %rcx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @get_time() {
%1 = alloca %struct.timeval
%2 = alloca i64
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000000000
store i64 %6, i64* %2
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%8 = load i64, i64* %7
%9 = mul i64 %8, 1000
%10 = load i64, i64* %2
%11 = add i64 %10, %9
store i64 %11, i64* %2
%12 = load i64, i64* %2
ret i64 %12
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @get_time() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i64, i64* %7
%9 = mul i64 %8, 1000
%10 = add i64 %9, %6
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ html(char *);
int /*<<< orphan*/ html_txt(char const *);
int /*<<< orphan*/ htmlf(char *, int, char *);
void html_intoption(int value, const char *text, int selected_value) {
  htmlf("<option value='%d'%s>", value,
        value == selected_value ? " selected='selected'" : "");
  html_txt(text);
  html("</option>");
}


x86 assembly (clang, -O0):
<html_intoption>:
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    -0x4(%rbp),%ecx
mov    -0x14(%rbp),%edi
lea    0xed8(%rip),%rdx
lea    0xebd(%rip),%rax
cmp    %edi,%ecx
cmove  %rax,%rdx
lea    0xe9a(%rip),%rdi
call   1040 <htmlf@plt>
mov    -0x10(%rbp),%rdi
call   1050 <html_txt@plt>
lea    0xeb0(%rip),%rdi
call   1030 <html@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<html_intoption>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
cmp    %edx,%edi
lea    0xed7(%rip),%rax
lea    0xee4(%rip),%rdx
cmove  %rax,%rdx
lea    0xeaf(%rip),%rdi
call   1040 <htmlf@plt>
mov    %rbx,%rdi
call   1050 <html_txt@plt>
lea    0xec6(%rip),%rdi
pop    %rbx
jmp    1030 <html@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"<option value='%d'%s>\00"
@.str.1 = [21 x i8] c" selected='selected'\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"</option>\00"
define void @html_intoption(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 i32, i32* %4
%9 = load i32, i32* %6
%10 = icmp eq i32 %8, %9
%11 = zext i1 %10 to i64
%12 = select i1 %10, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%13 = call i32 @htmlf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %12)
%14 = load i8*, i8** %5
%15 = call i32 @html_txt(i8* %14)
%16 = call i32 @html(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"<option value='%d'%s>\00"
@.str.1 = [21 x i8] c" selected='selected'\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"</option>\00"
define void @html_intoption(i32 %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %0, %2
%5 = select i1 %4, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%6 = tail call i32 @htmlf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %5)
%7 = tail call i32 @html_txt(i8* %1)
%8 = tail call i32 @html(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
ret void
}
void av_strcasecmp() {}


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

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

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

LLVM IR (-O2):
define void @av_strcasecmp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int n1, n2;
  scanf("%i %i", &n1, &n2);
  if (!(n2 % n1))
    printf("Sao Multiplos\n");
  else
    printf("Nao sao Multiplos\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    1164 <main+0x44>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
jmp    1170 <main+0x50>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%eax
cltd
idivl  0x4(%rsp)
test   %edx,%edx
lea    0xec0(%rip),%rax
lea    0xec7(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%i %i\00"
@.str.1 = [15 x i8] c"Sao Multiplos\0A\00"
@.str.2 = [19 x i8] c"Nao sao Multiplos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = srem i32 %5, %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %13
11: ; preds = %0
%12 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%i %i\00"
@str = [14 x i8] c"Sao Multiplos\00"
@str.3 = [18 x i8] c"Nao sao Multiplos\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %2
%7 = load i32, i32* %1
%8 = srem i32 %6, %7
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.3, i64 0, i64 0)
%11 = call i32 @puts(i8* dereferenceable(1) %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  for (int i = 0; i < argc; i++) {
    printf("%s ", argv[i]);
  }
  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)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115f <main+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1145 <main+0x35>
mov    %rsi,%r15
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %7
6: ; preds = %7, %2
ret i32 0
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
void debugfs_hw_del(struct ieee80211_local *local) {}


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

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

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

LLVM IR (-O2):
%struct.ieee80211_local = type opaque
define void @debugfs_hw_del(%struct.ieee80211_local* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void kitsune_register_var(const char *var_name, const char *funcname,
                          const char *filename, const char *namespace,
                          void *var_addr, size_t size, int auto_migrate) {
  printf("******NEW:  inside kit_reg_var:v2, called from %s\n", filename);
}


x86 assembly (clang, -O0):
<kitsune_register_var>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kitsune_register_var>:
lea    0xee9(%rip),%rdi
mov    %rdx,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [51 x i8] c"******NEW: inside kit_reg_var:v2, called from %s\0A\00"
define void @kitsune_register_var(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i64 %5, i32 %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i32
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i64 %5, i64* %13
store i32 %6, i32* %14
%15 = load i8*, i8** %10
%16 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [51 x i8] c"******NEW: inside kit_reg_var:v2, called from %s\0A\00"
define void @kitsune_register_var(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* %2, i8* nocapture readnone %3, i8* nocapture readnone %4, i64 %5, i32 %6) {
%8 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SHUT_RDWR;
int close(int);
int /*<<< orphan*/ shutdown(int, int /*<<< orphan*/);
int sam3tcpDisconnect(int fd) {
  if (fd >= 0) {
    shutdown(fd, SHUT_RDWR);
    return close(fd);
  }
  return -1;
}


x86 assembly (clang, -O0):
<sam3tcpDisconnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1156 <sam3tcpDisconnect+0x36>
mov    -0x8(%rbp),%edi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
mov    -0x8(%rbp),%edi
call   1040 <close@plt>
mov    %eax,-0x4(%rbp)
jmp    115d <sam3tcpDisconnect+0x3d>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sam3tcpDisconnect>:
test   %edi,%edi
js     113d <sam3tcpDisconnect+0x1d>
push   %rbx
mov    %edi,%ebx
mov    0x2ec2(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <close@plt>
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@SHUT_RDWR = global i32 0
define i32 @sam3tcpDisconnect(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = load i32, i32* @SHUT_RDWR
%9 = call i32 @shutdown(i32 %7, i32 %8)
%10 = load i32, i32* %3
%11 = call i32 @close(i32 %10)
store i32 %11, i32* %2
br label %13
12: ; preds = %1
store i32 -1, i32* %2
br label %13
13: ; preds = %12, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@SHUT_RDWR = global i32 0
define i32 @sam3tcpDisconnect(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = load i32, i32* @SHUT_RDWR
%5 = tail call i32 @shutdown(i32 %0, i32 %4)
%6 = tail call i32 @close(i32 %0)
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ -1, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ Reverse();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Napishi izrechenie/duma: ");
  Reverse();
  printf("\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <Reverse@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [26 x i8] c"Napishi izrechenie/duma: \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @Reverse()
%3 = tail call i32 @putchar(i32 10)
ret i32 0
}
void check_atari(void) {}


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

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

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

LLVM IR (-O2):
define void @check_atari() {
ret void
}
void glInvalidateSubFramebuffer(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glInvalidateSubFramebuffer() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ quick_sortR(int *, int /*<<< orphan*/, int);
void t_quick_sort_i(int n, int tab[]) { quick_sortR(tab, 0, n - 1); }


x86 assembly (clang, -O0):
<t_quick_sort_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1030 <quick_sortR@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_quick_sort_i>:
lea    -0x1(%rdi),%edx
mov    %rsi,%rdi
xor    %esi,%esi
jmp    1030 <quick_sortR@plt>

LLVM IR (-O0):
define void @t_quick_sort_i(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32, i32* %3
%7 = sub nsw i32 %6, 1
%8 = call i32 @quick_sortR(i32* %5, i32 0, i32 %7)
ret void
}

LLVM IR (-O2):
define void @t_quick_sort_i(i32 %0, i32* %1) {
%3 = add nsw i32 %0, -1
%4 = tail call i32 @quick_sortR(i32* %1, i32 0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int counter = 0;
  printf("decimal\thexadecimal\toctal\tchar\n");
  do
    printf("%d\t%x\t\t%o\t%c\n", counter, counter, counter, counter);
  while (counter++ < 255);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0x8(%rbp),%r8d
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0xff,%eax
jl     1134 <main+0x24>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xee4(%rip),%rdi
call   1030 <puts@plt>
lea    0xeca(%rip),%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %ebp,%edx
mov    %ebp,%ecx
mov    %ebp,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x100,%ebp
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"decimal\09hexadecimal\09octal\09char\0A\00"
@.str.1 = [14 x i8] c"%d\09%x\09\09%o\09%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %10, %0
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6, i32 %7, i32 %8)
br label %10
10: ; preds = %4
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
%13 = icmp slt i32 %11, 255
br i1 %13, label %4, label %14
14: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"%d\09%x\09\09%o\09%c\0A\00"
@str = [31 x i8] c"decimal\09hexadecimal\09octal\09char\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 %3, i32 %3, i32 %3)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 256
br i1 %6, label %7, label %2
7: ; preds = %2
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ time;
};
typedef TYPE_1__ XSelectionRequestEvent;

/* Variables and functions */
unsigned long get_XSelectionRequestEvent_time(void *_p) {
  return (unsigned long)((XSelectionRequestEvent *)_p)->time;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XSelectionRequestEvent_time(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XSelectionRequestEvent_time(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void ASN1_GENERALIZEDTIME_check(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_GENERALIZEDTIME_check() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getName(unsigned char **, int, char *, int /*<<< orphan*/ *,
                           int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ strlen(char *);
int f_var(int mode, unsigned char **sec, float *data, unsigned int ndata,
          char *inv_out, void **local) {
  if (mode >= 0) {
    getName(sec, mode, inv_out, NULL, NULL, NULL);
    inv_out += strlen(inv_out);
  }
  return 0;
}


x86 assembly (clang, -O0):
<f_var>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     117c <f_var+0x5c>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0x28(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%r9d
mov    %r9,%rcx
mov    %r9,%r8
call   1040 <getName@plt>
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_var>:
test   %edi,%edi
js     1148 <f_var+0x28>
push   %rbx
mov    %r8,%rbx
mov    %edi,%eax
mov    %rsi,%rdi
mov    %eax,%esi
mov    %r8,%rdx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <getName@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
pop    %rbx
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @f_var(i32 %0, i8** %1, float* nocapture readnone %2, i32 %3, i8* %4, i8** nocapture readnone %5) {
%7 = icmp sgt i32 %0, -1
br i1 %7, label %8, label %11
8: ; preds = %6
%9 = tail call i32 @getName(i8** %1, i32 %0, i8* %4, i32* null, i32* null, i32* null)
%10 = tail call i32 @strlen(i8* %4)
br label %11
11: ; preds = %8, %6
ret i32 0
}
/* Variables and functions */
int *test();
void func() { int *a1 = test(); }


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

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

LLVM IR (-O0):
define void @func() {
%1 = alloca i32*
%2 = call i32* (...) @test()
store i32* %2, i32** %1
ret void
}

LLVM IR (-O2):
define void @func() {
%1 = tail call i32* (...) @test()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ stdout;
void pident(int ident) {
  char b[ident + 1];
  memset(b, '\t', ident);
  b[ident] = 0;
  fputs(b, stdout);
}


x86 assembly (clang, -O0):
<pident>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x20(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x9,%esi
call   1040 <memset@plt>
mov    -0x20(%rbp),%rdi
movslq -0x4(%rbp),%rax
movb   $0x0,(%rdi,%rax,1)
mov    0x2e6c(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pident>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
mov    %edi,%r14d
lea    0x1(%r14),%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
mov    $0x9,%esi
mov    %r14d,%edx
call   1040 <memset@plt>
movslq %r14d,%rax
movb   $0x0,(%rax,%rbx,1)
mov    0x2e83(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1030 <fputs@plt>
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
define void @pident(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %3
%9 = alloca i8, i64 %7
store i64 %7, i64* %4
%10 = load i32, i32* %2
%11 = call i32 @memset(i8* %9, i8 signext 9, i32 %10)
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %9, i64 %13
store i8 0, i8* %14
%15 = load i32, i32* @stdout
%16 = call i32 @fputs(i8* %9, i32 %15)
%17 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @pident(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = zext i32 %2 to i64
%4 = alloca i8, i64 %3
%5 = call i32 @memset(i8* %4, i8 signext 9, i32 %0)
%6 = sext i32 %0 to i64
%7 = getelementptr inbounds i8, i8* %4, i64 %6
store i8 0, i8* %7
%8 = load i32, i32* @stdout
%9 = call i32 @fputs(i8* %4, i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add_cp_url(char *, char *);
void c_add_cp_url(char *v1, char *v2, void *t) { add_cp_url(v1, v2); }


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

x86 assembly (clang, -O2):
<c_add_cp_url>:
jmp    1030 <add_cp_url@plt>

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

LLVM IR (-O2):
define void @c_add_cp_url(i8* %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @add_cp_url(i8* %0, i8* %1)
ret void
}
void gtk_widget_set_sensitive() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_set_sensitive() {
ret void
}
/* Variables and functions */
float const sqrtf(float);
__attribute__((visibility("default"))) const float xsqrtf(float d) {
  return sqrtf(d);
}


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

x86 assembly (clang, -O2):
<xsqrtf>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     111d <xsqrtf+0xd>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrtf@plt>

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

LLVM IR (-O2):
define float @xsqrtf(float %0) {
%2 = tail call float @sqrtf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ inputerror(char *);
void outofmemory() { inputerror("out of memory while processing"); }


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"out of memory while processing\00"
define void @outofmemory() {
%1 = call i32 @inputerror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"out of memory while processing\00"
define void @outofmemory() {
%1 = tail call i32 @inputerror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}
void f4(void) {
  typedef int(*a1)[1];
  typedef a1(*a2)[2];
  typedef a2(*a3)[3];
  typedef a3(*a4)[4];
  int(*(*a)[2])[1];
  int(*(*(*(*foo)[4])[3])[2])[1];
  a4 boo;
  int k[1];
  int(*l)[1];
  int(*m[2])[1];
  a2 b;
  l = &k;
  m[0] = l;
  a = &m;
  b = a;
  a = (int(*(*)[2])[1])0;
  foo = (int(*(*(*(*)[4])[3])[2])[1])0;
  boo = foo;
  (void)b;
  (void)boo;
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
lea    -0x1c(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x40(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x48(%rbp)
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f4() {
%1 = alloca [2 x [1 x i32]*]*
%2 = alloca [4 x [3 x [2 x [1 x i32]*]*]*]*
%3 = alloca [4 x [3 x [2 x [1 x i32]*]*]*]*
%4 = alloca [1 x i32]
%5 = alloca [1 x i32]*
%6 = alloca [2 x [1 x i32]*]
%7 = alloca [2 x [1 x i32]*]*
store [1 x i32]* %4, [1 x i32]** %5
%8 = load [1 x i32]*, [1 x i32]** %5
%9 = getelementptr inbounds [2 x [1 x i32]*], [2 x [1 x i32]*]* %6, i64 0, i64 0
store [1 x i32]* %8, [1 x i32]** %9
store [2 x [1 x i32]*]* %6, [2 x [1 x i32]*]** %1
%10 = load [2 x [1 x i32]*]*, [2 x [1 x i32]*]** %1
store [2 x [1 x i32]*]* %10, [2 x [1 x i32]*]** %7
store [2 x [1 x i32]*]* null, [2 x [1 x i32]*]** %1
store [4 x [3 x [2 x [1 x i32]*]*]*]* null, [4 x [3 x [2 x [1 x i32]*]*]*]** %2
%11 = load [4 x [3 x [2 x [1 x i32]*]*]*]*, [4 x [3 x [2 x [1 x i32]*]*]*]** %2
store [4 x [3 x [2 x [1 x i32]*]*]*]* %11, [4 x [3 x [2 x [1 x i32]*]*]*]** %3
%12 = load [2 x [1 x i32]*]*, [2 x [1 x i32]*]** %7
%13 = load [4 x [3 x [2 x [1 x i32]*]*]*]*, [4 x [3 x [2 x [1 x i32]*]*]*]** %3
ret void
}

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

/* Variables and functions */
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
float minipack_unpack_float(void *ptr, size_t *sz) {
  *sz = 5;
  uint32_t value = *((uint32_t *)(ptr + 1));
  value = ntohl(value);
  float *float_value = (float *)&value;
  return *float_value;
}


x86 assembly (clang, -O0):
<minipack_unpack_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x5,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <ntohl@plt>
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minipack_unpack_float>:
push   %rax
movq   $0x5,(%rsi)
mov    0x1(%rdi),%edi
call   1030 <ntohl@plt>
movd   %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @minipack_unpack_float(i8* %0, i64* %1) {
%3 = alloca i8*
%4 = alloca i64*
%5 = alloca i32
%6 = alloca float*
store i8* %0, i8** %3
store i64* %1, i64** %4
%7 = load i64*, i64** %4
store i64 5, i64* %7
%8 = load i8*, i8** %3
%9 = getelementptr i8, i8* %8, i64 1
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
store i32 %11, i32* %5
%12 = load i32, i32* %5
%13 = call i32 @ntohl(i32 %12)
store i32 %13, i32* %5
%14 = bitcast i32* %5 to float*
store float* %14, float** %6
%15 = load float*, float** %6
%16 = load float, float* %15
ret float %16
}

LLVM IR (-O2):
define float @minipack_unpack_float(i8* nocapture %0, i64* nocapture writeonly %1) {
store i64 5, i64* %1
%3 = getelementptr i8, i8* %0, i64 1
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = tail call i32 @ntohl(i32 %5)
%7 = bitcast i32 %6 to float
ret float %7
}
/* Type definitions */
typedef enum weekday { ____Placeholder_weekday } weekday;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() {
  enum weekday {
    Sunday,
    Monday,
    Tuesday,
    Wednesday,
    Thursday,
    Friday,
    Saturday
  };
  enum weekday today;
  today = 0;
  if (today == Sunday) {
    printf("today is Sunday\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1135 <main+0x25>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"today is Sunday\0A\00"
define void @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* %1
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"today is Sunday\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello_do_something(void) { printf("Dosvedanya!\n"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Dosvedanya!\0A\00"
define void @hello_do_something() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"Dosvedanya!\00"
define void @hello_do_something() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ reg(void *, size_t, char const *, int);
void *ml_malloc(size_t size, const char *file, int line) {
  void *ptr = malloc(size);
  reg(ptr, size, file, line);
  return ptr;
}


x86 assembly (clang, -O0):
<ml_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1040 <reg@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ml_malloc>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%r15
mov    %rdi,%rbp
call   1030 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
call   1040 <reg@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @ml_malloc(i64 %0, i8* %1, i32 %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i64 %0, i64* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i64, i64* %4
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = load i64, i64* %4
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i32 @reg(i8* %10, i64 %11, i8* %12, i32 %13)
%15 = load i8*, i8** %7
ret i8* %15
}

LLVM IR (-O2):
define i8* @ml_malloc(i64 %0, i8* %1, i32 %2) {
%4 = tail call i8* @malloc(i64 %0)
%5 = tail call i32 @reg(i8* %4, i64 %0, i8* %1, i32 %2)
ret i8* %4
}