xunge/DecIR huggingface dataset:
/* Variables and functions */
int can_direct_write(int address) {
  if ((address & 0xDFF00000) == 0x200000)
    return 1;
  if ((address & 0xDE000000) == 0x6000000)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<can_direct_write>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xdff00000,%eax
cmp    $0x200000,%eax
jne    1126 <can_direct_write+0x26>
movl   $0x1,-0x4(%rbp)
jmp    114c <can_direct_write+0x4c>
mov    -0x8(%rbp),%eax
and    $0xde000000,%eax
cmp    $0x6000000,%eax
jne    1145 <can_direct_write+0x45>
movl   $0x1,-0x4(%rbp)
jmp    114c <can_direct_write+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<can_direct_write>:
mov    %edi,%eax
and    $0xdff00000,%eax
cmp    $0x200000,%eax
sete   %al
and    $0xde000000,%edi
cmp    $0x6000000,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @can_direct_write(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, -537919488
%6 = icmp eq i32 %5, 2097152
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %14
8: ; preds = %1
%9 = load i32, i32* %3
%10 = and i32 %9, -570425344
%11 = icmp eq i32 %10, 100663296
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %14
13: ; preds = %8
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @can_direct_write(i32 %0) {
%2 = and i32 %0, -537919488
%3 = icmp eq i32 %2, 2097152
%4 = and i32 %0, -570425344
%5 = icmp eq i32 %4, 100663296
%6 = or i1 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
double pathcon_nm8_sq(double x) { return x * x; }


x86 assembly (clang, -O0):
<pathcon_nm8_sq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcon_nm8_sq>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @pathcon_nm8_sq(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @pathcon_nm8_sq(double %0) {
%2 = fmul double %0, %0
ret double %2
}
void txt_noteon(chan, pitch, vol) {
  prtime();
  printf("Note on, chan=%d pitch=%d vol=%d\n", chan + 1, pitch, vol);
}


x86 assembly (clang, -O0):
<txt_noteon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x0,%al
call   1040 <prtime@plt>
mov    -0x4(%rbp),%esi
add    $0x1,%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<txt_noteon>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <prtime@plt>
add    $0x1,%ebx
lea    0xec4(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Note on, chan=%d pitch=%d vol=%d\0A\00"
define void @txt_noteon(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 (...) @prtime()
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"Note on, chan=%d pitch=%d vol=%d\0A\00"
define void @txt_noteon(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @prtime()
%5 = add nsw i32 %0, 1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: logins [-admopstux] [-g group] [-l login]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [50 x i8] c"usage: logins [-admopstux] [-g group] [-l login]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [50 x i8] c"usage: logins [-admopstux] [-g group] [-l login]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ GenPrintInstr1Operand(int, int /*<<< orphan*/, int, int);
void GenJumpUncond(int label) { GenPrintInstr1Operand(0x17, 0, 0x82, label); }


x86 assembly (clang, -O0):
<GenJumpUncond>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x17,%edi
xor    %esi,%esi
mov    $0x82,%edx
call   1030 <GenPrintInstr1Operand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenJumpUncond>:
mov    %edi,%ecx
mov    $0x17,%edi
xor    %esi,%esi
mov    $0x82,%edx
jmp    1030 <GenPrintInstr1Operand@plt>

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

LLVM IR (-O2):
define void @GenJumpUncond(i32 %0) {
%2 = tail call i32 @GenPrintInstr1Operand(i32 23, i32 0, i32 130, i32 %0)
ret void
}
const char *db_drop_jesrcs_table_sql(void) {
  static const char *query = "DROP TABLE jesrcs";
  return query;
}


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

x86 assembly (clang, -O2):
<db_drop_jesrcs_table_sql>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@db_drop_jesrcs_table_sql.query = internal global i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i32 0, i32 0)
@.str = [18 x i8] c"DROP TABLE jesrcs\00"
define i8* @db_drop_jesrcs_table_sql() {
%1 = load i8*, i8** @db_drop_jesrcs_table_sql.query
ret i8* %1
}

LLVM IR (-O2):
@.str = [18 x i8] c"DROP TABLE jesrcs\00"
define i8* @db_drop_jesrcs_table_sql() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}
int getReturnValue(a)
int a;
{ return (a); }


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

x86 assembly (clang, -O2):
<getReturnValue>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @getReturnValue(i32 returned %0) {
ret i32 %0
}
char *Tcl_SignalId(sig)
int sig;
{
  switch (sig) {}
  return "unknown signal";
}


x86 assembly (clang, -O0):
<Tcl_SignalId>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Tcl_SignalId>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [15 x i8] c"unknown signal\00"
define i8* @Tcl_SignalId(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %4 [
]
4: ; preds = %1
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [15 x i8] c"unknown signal\00"
define i8* @Tcl_SignalId(i32 %0) {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *, char const *, char *);
char *strerror(int /*<<< orphan*/);
void myperror(const char *error) {
  printf("myperror:  %s:  %s\n", error, strerror(errno));
}


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

x86 assembly (clang, -O2):
<myperror>:
push   %rbx
mov    %rdi,%rbx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"myperror: %s: %s\0A\00"
@errno = global i32 0
define void @myperror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @errno
%5 = call i8* @strerror(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"myperror: %s: %s\0A\00"
@errno = global i32 0
define void @myperror(i8* %0) {
%2 = load i32, i32* @errno
%3 = tail call i8* @strerror(i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %3)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ key_click_percent;
};
typedef TYPE_1__ XKeyboardControl;

/* Variables and functions */
int get_XKeyboardControl_key_click_percent(void *_p) {
  return (int)((XKeyboardControl *)_p)->key_click_percent;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XKeyboardControl_key_click_percent(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
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XKeyboardControl_key_click_percent(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
unsigned xrop3_187_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = ~S;
  stk1 = D | stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_187_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_187_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %ecx,%eax
not    %eax
or     %edi,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_187_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %6
%23 = xor i32 %22, -1
store i32 %23, i32* %9
%24 = load i32, i32* %5
%25 = load i32, i32* %9
%26 = or i32 %24, %25
store i32 %26, i32* %8
%27 = load i32, i32* %8
%28 = load i32, i32* %6
%29 = xor i32 %28, -1
%30 = and i32 %27, %29
%31 = load i32, i32* %7
%32 = xor i32 %31, -1
%33 = and i32 %30, %32
%34 = load i32, i32* %5
%35 = load i32, i32* %6
%36 = and i32 %34, %35
%37 = or i32 %33, %36
%38 = load i32, i32* %5
%39 = load i32, i32* %7
%40 = and i32 %38, %39
%41 = or i32 %37, %40
ret i32 %41
}

LLVM IR (-O2):
define i32 @xrop3_187_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %10, %8
ret i32 %11
}
int isParamExist(char *param) { return param == (char *)-1 ? 0 : 1; }


x86 assembly (clang, -O0):
<isParamExist>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0xffffffffffffffff,%rsi
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isParamExist>:
xor    %eax,%eax
cmp    $0xffffffffffffffff,%rdi
setne  %al
ret

LLVM IR (-O0):
define i32 @isParamExist(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, inttoptr (i64 -1 to i8*)
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 0, i32 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @isParamExist(i8* readnone %0) {
%2 = icmp ne i8* %0, inttoptr (i64 -1 to i8*)
%3 = zext i1 %2 to i32
ret i32 %3
}
void ExttContentTypeAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttContentTypeAuxTable() {
ret void
}
int osal_snd_msg(int type, void *addr) { return -1; }


x86 assembly (clang, -O0):
<osal_snd_msg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @osal_snd_msg(i32 %0, i8* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ puts(char *);
int scanf(char *, int *);
int read_int() {
  int value = 0;
  while (true) {
    int result = scanf("%d\n", &value);
    if (result == (-1))
      abort();
    if (result == 1)
      break;
    puts("Please enter a number.");
  }
  return value;
}


x86 assembly (clang, -O0):
<read_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1163 <read_int+0x33>
mov    $0x0,%al
call   1030 <abort@plt>
cmpl   $0x1,-0x8(%rbp)
jne    1172 <read_int+0x42>
jmp    1183 <read_int+0x53>
lea    0xe8b(%rip),%rdi
call   1040 <puts@plt>
jmp    113f <read_int+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_int>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xeb8(%rip),%r14
lea    0xc(%rsp),%rbx
lea    0xeb0(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
je     117f <read_int+0x4f>
cmp    $0xffffffff,%eax
je     118d <read_int+0x5d>
mov    %r15,%rdi
call   1040 <puts@plt>
jmp    1160 <read_int+0x30>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [23 x i8] c"Please enter a number.\00"
define i32 @read_int() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %0, %13
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %3
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %13
12: ; preds = %9
br label %15
13: ; preds = %9
%14 = call i32 @puts(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %3
15: ; preds = %12
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [23 x i8] c"Please enter a number.\00"
define i32 @read_int() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
switch i32 %4, label %7 [
i32 -1, label %5
i32 1, label %9
]
5: ; preds = %3
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %3
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %3
9: ; preds = %3
%10 = load i32, i32* %1
ret i32 %10
}
dshort(short *x, short *y) { return x - y; }


x86 assembly (clang, -O0):
<dshort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
sar    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dshort>:
mov    %rdi,%rax
sub    %rsi,%rax
shr    %rax
ret

LLVM IR (-O0):
define i32 @dshort(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
store i16* %0, i16** %3
store i16* %1, i16** %4
%5 = load i16*, i16** %3
%6 = load i16*, i16** %4
%7 = ptrtoint i16* %5 to i64
%8 = ptrtoint i16* %6 to i64
%9 = sub i64 %7, %8
%10 = sdiv exact i64 %9, 2
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @dshort(i16* %0, i16* %1) {
%3 = ptrtoint i16* %0 to i64
%4 = ptrtoint i16* %1 to i64
%5 = sub i64 %3, %4
%6 = lshr exact i64 %5, 1
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
char **string_split_internal(char const *, char const *, int, int, int *,
                             int /*<<< orphan*/);
char **string_split(const char *string, const char *separators, int keep_eol,
                    int num_items_max, int *num_items) {
  return string_split_internal(string, separators, keep_eol, num_items_max,
                               num_items, 0);
}


x86 assembly (clang, -O0):
<string_split>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x20(%rbp),%r8
xor    %r9d,%r9d
call   1030 <string_split_internal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_split>:
xor    %r9d,%r9d
jmp    1030 <string_split_internal@plt>

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

LLVM IR (-O2):
define i8** @string_split(i8* %0, i8* %1, i32 %2, i32 %3, i32* %4) {
%6 = tail call i8** @string_split_internal(i8* %0, i8* %1, i32 %2, i32 %3, i32* %4, i32 0)
ret i8** %6
}
/* Variables and functions */
int /*<<< orphan*/ marker1();
int /*<<< orphan*/ marker2();
int /*<<< orphan*/ mvcle();
int main(void) {
  marker1();
  mvcle();
  marker2();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <marker1@plt>
mov    $0x0,%al
call   1030 <mvcle@plt>
mov    $0x0,%al
call   1040 <marker2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <marker1@plt>
xor    %eax,%eax
call   1030 <mvcle@plt>
xor    %eax,%eax
call   1040 <marker2@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @marker1()
%2 = tail call i32 (...) @mvcle()
%3 = tail call i32 (...) @marker2()
ret i32 0
}
/* Type definitions */
struct buffer {
  int dummy;
};
typedef int /*<<< orphan*/ data;

/* Variables and functions */
int /*<<< orphan*/ buffer_read(struct buffer *, int *, int);
int buffer_read_int(struct buffer *__restrict buf) {
  int data;
  buffer_read(buf, &data, sizeof(data));
  return data;
}


x86 assembly (clang, -O0):
<buffer_read_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <buffer_read@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_read_int>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <buffer_read@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.buffer = type { i32 }
define i32 @buffer_read_int(%struct.buffer* noalias %0) {
%2 = alloca %struct.buffer*
%3 = alloca i32
store %struct.buffer* %0, %struct.buffer** %2
%4 = load %struct.buffer*, %struct.buffer** %2
%5 = call i32 @buffer_read(%struct.buffer* %4, i32* %3, i32 4)
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define i32 @buffer_read_int(%struct.buffer* noalias %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @buffer_read(%struct.buffer* %0, i32* %2, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *print3(void *data) { printf("3 "); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"3 \00"
define i8* @print3(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
@.str = [3 x i8] c"3 \00"
define noalias i8* @print3(i8* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i8* undef
}
/* Variables and functions */
int milog_set_verbosity(int);
int mi2log_set_verbosity(int lvl) { return milog_set_verbosity(lvl); }


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

x86 assembly (clang, -O2):
<mi2log_set_verbosity>:
jmp    1030 <milog_set_verbosity@plt>

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

LLVM IR (-O2):
define i32 @mi2log_set_verbosity(i32 %0) {
%2 = tail call i32 @milog_set_verbosity(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void logger_error(char *msg) { printf("ERROR - %s\n", msg); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"ERROR - %s\0A\00"
define void @logger_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"ERROR - %s\0A\00"
define void @logger_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void g_value_take_param() {}


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

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

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

LLVM IR (-O2):
define void @g_value_take_param() {
ret void
}
/* Variables and functions */
int base64_decode(char const *, int /*<<< orphan*/, char *, int *);
int /*<<< orphan*/ strlen(char const *);
int base64_decode_str(char const *in, char *out, int *pflag) {
  int n = base64_decode(in, strlen(in), out, pflag);
  out[n] = 0;
  return n;
}


x86 assembly (clang, -O0):
<base64_decode_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1040 <base64_decode@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_decode_str>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r15,%rdx
mov    %r14,%rcx
call   1040 <base64_decode@plt>
cltq
movb   $0x0,(%r15,%rax,1)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @base64_decode_str(i8* %0, i8* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %4
%10 = call i32 @strlen(i8* %9)
%11 = load i8*, i8** %5
%12 = load i32*, i32** %6
%13 = call i32 @base64_decode(i8* %8, i32 %10, i8* %11, i32* %12)
store i32 %13, i32* %7
%14 = load i8*, i8** %5
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 0, i8* %17
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
define i32 @base64_decode_str(i8* %0, i8* %1, i32* %2) {
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i32 @base64_decode(i8* %0, i32 %4, i8* %1, i32* %2)
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %1, i64 %6
store i8 0, i8* %7
ret i32 %5
}
float revolutionsPerSecondToMotorPower(float revolutionsPerSecond) {
  return ((revolutionsPerSecond / (720 / 360.0)) * 100);
}


x86 assembly (clang, -O0):
<revolutionsPerSecondToMotorPower>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeee(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xeda(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<revolutionsPerSecondToMotorPower>:
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @revolutionsPerSecondToMotorPower(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fdiv double %4, 2.000000e+00
%6 = fmul double %5, 1.000000e+02
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @revolutionsPerSecondToMotorPower(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 5.000000e-01
%4 = fmul double %3, 1.000000e+02
%5 = fptrunc double %4 to float
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int *, int *);
int main(void) {
  int a = 2, b = 4;
  swap(&a, &b);
  printf("a=%i, b=%i\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <swap@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x2,0x4(%rsp)
movl   $0x4,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <swap@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"a=%i, b=%i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
store i32 4, i32* %3
%4 = call i32 @swap(i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"a=%i, b=%i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 2, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 4, i32* %2
%5 = call i32 @swap(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}
unsigned long long f(unsigned long long a) { return a & 0xffffffffffffcfffull; }


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

x86 assembly (clang, -O2):
<f>:
mov    %rdi,%rax
and    $0xffffffffffffcfff,%rax
ret

LLVM IR (-O0):
define i64 @f(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, -12289
ret i64 %4
}

LLVM IR (-O2):
define i64 @f(i64 %0) {
%2 = and i64 %0, -12289
ret i64 %2
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
int /*<<< orphan*/ toupper(int);
int main() {
  int c;
  while ((c = getchar()) != EOF) {
    putchar(toupper(c));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e98(%rip),%rcx
cmp    (%rcx),%eax
je     116c <main+0x3c>
mov    -0x8(%rbp),%edi
call   1040 <toupper@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <getchar@plt>
mov    0x2ea9(%rip),%rbx
cmp    (%rbx),%eax
je     1169 <main+0x39>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1040 <toupper@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    (%rbx),%eax
jne    1150 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = load i32, i32* %2
%9 = call i32 @toupper(i32 %8)
%10 = call i32 @putchar(i32 %9)
br label %3
11: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %11, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %8, %4 ], [ %1, %0 ]
%6 = tail call i32 @toupper(i32 %5)
%7 = tail call i32 @putchar(i32 %6)
%8 = tail call i32 (...) @getchar()
%9 = load i32, i32* @EOF
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %4
11: ; preds = %4, %0
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int border_width;
};
struct TYPE_4__ {
  TYPE_1__ xconfigure;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xconfigure_border_width(void *_p, int _v) {
  ((XEvent *)_p)->xconfigure.border_width = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xconfigure_border_width>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xconfigure_border_width(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xconfigure_border_width(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
__attribute__((noreturn)) void oom(const char *s) {
  fprintf(stderr, "Oom. %s\n", s);
  exit(100);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [9 x i8] c"Oom. %s\0A\00"
define void @oom(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 100)
unreachable
}
int next_packet(int n) {
  if (n + 1 < (16 + 1))
    return n + 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<next_packet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cmp    $0x11,%eax
jge    1124 <next_packet+0x24>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112b <next_packet+0x2b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_packet>:
lea    0x1(%rdi),%ecx
xor    %eax,%eax
cmp    $0x10,%edi
cmovl  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @next_packet(i32 %0) {
%2 = icmp slt i32 %0, 16
%3 = add nsw i32 %0, 1
%4 = select i1 %2, i32 %3, i32 0
ret i32 %4
}
unsigned getval_231() { return 3229929897U; }


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

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

LLVM IR (-O0):
define i32 @getval_231() {
ret i32 -1065037399
}

LLVM IR (-O2):
define i32 @getval_231() {
ret i32 -1065037399
}
int tgt_mod_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tgt_mod_init() {
ret i32 0
}
int foo(int *p) {
  int x = -10;
  if (p[0])
    x++;
  if (p[1])
    x++;
  if (p[2])
    x++;
  if (p[3])
    x++;
  x <<= 2;
  return (x > 0);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0xfffffff6,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     1125 <foo+0x25>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,0x4(%rax)
je     113c <foo+0x3c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,0x8(%rax)
je     1153 <foo+0x53>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,0xc(%rax)
je     116a <foo+0x6a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo(i32* nocapture %0) {
ret i32 0
}
double mul_double(double arg1, double arg2) { return arg1 * arg2; }


x86 assembly (clang, -O0):
<mul_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul_double>:
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @mul_double(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fmul double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @mul_double(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
/* Variables and functions */
scalar_t__ isempty(char const *);
const char *empty_to_null(const char *p) { return isempty(p) ? NULL : p; }


x86 assembly (clang, -O0):
<empty_to_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <isempty@plt>
cmp    $0x0,%rax
je     113a <empty_to_null+0x2a>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    1142 <empty_to_null+0x32>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty_to_null>:
push   %rbx
mov    %rdi,%rbx
call   1030 <isempty@plt>
xor    %ecx,%ecx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @empty_to_null(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @isempty(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %9
7: ; preds = %1
%8 = load i8*, i8** %2
br label %9
9: ; preds = %7, %6
%10 = phi i8* [ null, %6 ], [ %8, %7 ]
ret i8* %10
}

LLVM IR (-O2):
define i8* @empty_to_null(i8* %0) {
%2 = tail call i64 @isempty(i8* %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* %0, i8* null
ret i8* %4
}
int end() { return 1; }


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

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

LLVM IR (-O0):
define i32 @end() {
ret i32 1
}

LLVM IR (-O2):
define i32 @end() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ ighmm_mes_init_args(int, char **);
int /*<<< orphan*/ ighmm_mes_init_logfile(char *);
int /*<<< orphan*/ ighmm_mes_init_winfct(void (*)(char const *));
int /*<<< orphan*/ mes_process_alloc();
void ighmm_mes_init(char *logfile, void (*winfct)(const char *), int argc,
                    char *argv[]) {
  mes_process_alloc();
  ighmm_mes_init_args(argc, argv);
  ighmm_mes_init_logfile(logfile);
  ighmm_mes_init_winfct(winfct);
}


x86 assembly (clang, -O0):
<ighmm_mes_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x0,%al
call   1060 <mes_process_alloc@plt>
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1030 <ighmm_mes_init_args@plt>
mov    -0x8(%rbp),%rdi
call   1040 <ighmm_mes_init_logfile@plt>
mov    -0x10(%rbp),%rdi
call   1050 <ighmm_mes_init_winfct@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ighmm_mes_init>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%r15
xor    %eax,%eax
call   1060 <mes_process_alloc@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <ighmm_mes_init_args@plt>
mov    %r15,%rdi
call   1040 <ighmm_mes_init_logfile@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <ighmm_mes_init_winfct@plt>

LLVM IR (-O0):
define void @ighmm_mes_init(i8* %0, void (i8*)* %1, i32 %2, i8** %3) {
%5 = alloca i8*
%6 = alloca void (i8*)*
%7 = alloca i32
%8 = alloca i8**
store i8* %0, i8** %5
store void (i8*)* %1, void (i8*)** %6
store i32 %2, i32* %7
store i8** %3, i8*** %8
%9 = call i32 (...) @mes_process_alloc()
%10 = load i32, i32* %7
%11 = load i8**, i8*** %8
%12 = call i32 @ighmm_mes_init_args(i32 %10, i8** %11)
%13 = load i8*, i8** %5
%14 = call i32 @ighmm_mes_init_logfile(i8* %13)
%15 = load void (i8*)*, void (i8*)** %6
%16 = call i32 @ighmm_mes_init_winfct(void (i8*)* %15)
ret void
}

LLVM IR (-O2):
define void @ighmm_mes_init(i8* %0, void (i8*)* %1, i32 %2, i8** %3) {
%5 = tail call i32 (...) @mes_process_alloc()
%6 = tail call i32 @ighmm_mes_init_args(i32 %2, i8** %3)
%7 = tail call i32 @ighmm_mes_init_logfile(i8* %0)
%8 = tail call i32 @ighmm_mes_init_winfct(void (i8*)* %1)
ret void
}
/* Variables and functions */
double mjd_day(double);
double mjd_hr(double mj) { return ((mj - mjd_day(mj)) * 24.0); }


x86 assembly (clang, -O0):
<mjd_hr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <mjd_day@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  0xebb(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mjd_hr>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <mjd_day@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xed4(%rip),%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @mjd_hr(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call double @mjd_day(double %4)
%6 = fsub double %3, %5
%7 = fmul double %6, 2.400000e+01
ret double %7
}

LLVM IR (-O2):
define double @mjd_hr(double %0) {
%2 = tail call double @mjd_day(double %0)
%3 = fsub double %0, %2
%4 = fmul double %3, 2.400000e+01
ret double %4
}
void gtk_alignment_set_padding() {}


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

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

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

LLVM IR (-O2):
define void @gtk_alignment_set_padding() {
ret void
}
/* Variables and functions */
int copysignf(int, float);
int isPlusZerof(float x) { return x == 0 && copysignf(1, x) == 1; }


x86 assembly (clang, -O0):
<isPlusZerof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0x5(%rbp)
jne    1151 <isPlusZerof+0x41>
jp     1151 <isPlusZerof+0x41>
movss  -0x4(%rbp),%xmm0
mov    $0x1,%edi
call   1030 <copysignf@plt>
cmp    $0x1,%eax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPlusZerof>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1134 <isPlusZerof+0x24>
jp     1134 <isPlusZerof+0x24>
push   %rax
mov    $0x1,%edi
call   1030 <copysignf@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
sete   %al
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isPlusZerof(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp oeq float %3, 0.000000e+00
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load float, float* %2
%7 = call i32 @copysignf(i32 1, float %6)
%8 = icmp eq i32 %7, 1
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ false, %1 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @isPlusZerof(float %0) {
%2 = fcmp oeq float %0, 0.000000e+00
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i32 @copysignf(i32 1, float %0)
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ window;
};
typedef TYPE_1__ XColormapEvent;

/* Variables and functions */
unsigned long get_XColormapEvent_window(void *_p) {
  return (unsigned long)((XColormapEvent *)_p)->window;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XColormapEvent_window(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_XColormapEvent_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ mcf548x_init();
void __main(void) { mcf548x_init(); }


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

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

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

LLVM IR (-O2):
define void @__main() {
%1 = tail call i32 (...) @mcf548x_init()
ret void
}