xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *, int, char *);
void die(char *msg, char *file, int line) {
  printf("\n\nUnrecoverable error at %s:%d: %s\n\n", file, line, msg);
  abort();
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rcx
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    %rdi,%rcx
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"\0A\0AUnrecoverable error at %s:%d: %s\0A\0A\00"
define void @die(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i8*, i8** %4
%10 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i8* %9)
%11 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [37 x i8] c"\0A\0AUnrecoverable error at %s:%d: %s\0A\0A\00"
define void @die(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2, i8* %0)
%5 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ readNumBytesIntoBuffer(int, void *);
void readInt(void *buffer) { readNumBytesIntoBuffer(4, buffer); }


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

x86 assembly (clang, -O2):
<readInt>:
mov    %rdi,%rsi
mov    $0x4,%edi
jmp    1030 <readNumBytesIntoBuffer@plt>

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

LLVM IR (-O2):
define void @readInt(i8* %0) {
%2 = tail call i32 @readNumBytesIntoBuffer(i32 4, i8* %0)
ret void
}
void s3c_pm_debug_init_uart(void) {}


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

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

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

LLVM IR (-O2):
define void @s3c_pm_debug_init_uart() {
ret void
}
/* Type definitions */
struct termios {
  int /*<<< orphan*/ c_ospeed;
};
typedef int /*<<< orphan*/ speed_t;

/* Variables and functions */
int /*<<< orphan*/ _DIAGASSERT(int /*<<< orphan*/);
speed_t cfgetospeed(const struct termios *t) {
  _DIAGASSERT(t != NULL);
  return (t->c_ospeed);
}


x86 assembly (clang, -O0):
<cfgetospeed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <_DIAGASSERT@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfgetospeed>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <_DIAGASSERT@plt>
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
define i32 @cfgetospeed(%struct.termios* %0) {
%2 = alloca %struct.termios*
store %struct.termios* %0, %struct.termios** %2
%3 = load %struct.termios*, %struct.termios** %2
%4 = icmp ne %struct.termios* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @_DIAGASSERT(i32 %5)
%7 = load %struct.termios*, %struct.termios** %2
%8 = getelementptr inbounds %struct.termios, %struct.termios* %7, i32 0, i32 0
%9 = load i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
%struct.termios = type { i32 }
define i32 @cfgetospeed(%struct.termios* %0) {
%2 = icmp ne %struct.termios* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @_DIAGASSERT(i32 %3)
%5 = getelementptr inbounds %struct.termios, %struct.termios* %0, i64 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void EMACTimestampDisable(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x400EC000);
  (*((volatile uint32_t *)(ui32Base + 0x00000700))) &= ~0x00000001;
}


x86 assembly (clang, -O0):
<EMACTimestampDisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x400ec000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x700,%eax
cltq
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACTimestampDisable>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x400ec000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
andl   $0xfffffffe,0x700(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @EMACTimestampDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1074708480
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1792
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = and i32 %11, -2
store volatile i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @EMACTimestampDisable(i32 %0) {
%2 = icmp eq i32 %0, 1074708480
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i32 %0, 1792
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, -2
store volatile i32 %9, i32* %7
ret void
}
/* Variables and functions */
char *doublestring(char *);
char *stringpow(char *number, int grade) {
  char *result;
  int i;
  result = number;
  for (i = 2; i <= grade; i++) {
    result = doublestring(result);
  }
  return result;
}


x86 assembly (clang, -O0):
<stringpow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x2,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1155 <stringpow+0x45>
mov    -0x18(%rbp),%rdi
call   1030 <doublestring@plt>
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112e <stringpow+0x1e>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringpow>:
push   %rbx
mov    %rdi,%rax
cmp    $0x2,%esi
jl     112d <stringpow+0x1d>
mov    %esi,%ebx
add    $0xffffffff,%ebx
xchg   %ax,%ax
mov    %rax,%rdi
call   1030 <doublestring@plt>
add    $0xffffffff,%ebx
jne    1120 <stringpow+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @stringpow(i8* %0, i32 %1) {
%3 = icmp slt i32 %1, 2
br i1 %3, label %10, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %8, %4 ], [ 2, %2 ]
%6 = phi i8* [ %7, %4 ], [ %0, %2 ]
%7 = tail call i8* @doublestring(i8* %6)
%8 = add nuw i32 %5, 1
%9 = icmp eq i32 %5, %1
br i1 %9, label %10, label %4
10: ; preds = %4, %2
%11 = phi i8* [ %0, %2 ], [ %7, %4 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ jffs2_lzo_exit();
int /*<<< orphan*/ jffs2_rtime_exit();
int /*<<< orphan*/ jffs2_zlib_exit();
int jffs2_compressors_exit(void) {
  jffs2_rtime_exit();
  jffs2_zlib_exit();
  jffs2_lzo_exit();
  return 0;
}


x86 assembly (clang, -O0):
<jffs2_compressors_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <jffs2_rtime_exit@plt>
mov    $0x0,%al
call   1030 <jffs2_zlib_exit@plt>
mov    $0x0,%al
call   1040 <jffs2_lzo_exit@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jffs2_compressors_exit>:
push   %rax
xor    %eax,%eax
call   1050 <jffs2_rtime_exit@plt>
xor    %eax,%eax
call   1030 <jffs2_zlib_exit@plt>
xor    %eax,%eax
call   1040 <jffs2_lzo_exit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @jffs2_compressors_exit() {
%1 = call i32 (...) @jffs2_rtime_exit()
%2 = call i32 (...) @jffs2_zlib_exit()
%3 = call i32 (...) @jffs2_lzo_exit()
ret i32 0
}

LLVM IR (-O2):
define i32 @jffs2_compressors_exit() {
%1 = tail call i32 (...) @jffs2_rtime_exit()
%2 = tail call i32 (...) @jffs2_zlib_exit()
%3 = tail call i32 (...) @jffs2_lzo_exit()
ret i32 0
}
int range_norm(float r, float w, int m) { return m; }


x86 assembly (clang, -O0):
<range_norm>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @range_norm(float %0, float %1, i32 %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca i32
store float %0, float* %4
store float %1, float* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @range_norm(float %0, float %1, i32 returned %2) {
ret i32 %2
}
cbuf24(f, n) { return (cbuf(f, n, 24)); }


x86 assembly (clang, -O0):
<cbuf24>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x18,%edx
mov    $0x0,%al
call   1030 <cbuf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuf24>:
mov    $0x18,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf24(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %5, i32 %6, i32 24)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cbuf24(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 24)
ret i32 %3
}
void gtk_icon_size_register() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_size_register() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int fork();
int fork_a_child(void) {
  switch (fork()) {
  case -1:
    return -1;
  case 0:
    return 0;
  default:
    _exit(EXIT_SUCCESS);
  }
}


x86 assembly (clang, -O0):
<fork_a_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <fork@plt>
mov    %eax,%ecx
mov    %ecx,-0x8(%rbp)
sub    $0xffffffff,%eax
je     1152 <fork_a_child+0x32>
jmp    1142 <fork_a_child+0x22>
mov    -0x8(%rbp),%eax
test   %eax,%eax
je     115e <fork_a_child+0x3e>
jmp    116a <fork_a_child+0x4a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1178 <fork_a_child+0x58>
movl   $0x0,-0x4(%rbp)
jmp    1178 <fork_a_child+0x58>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fork_a_child>:
push   %rax
xor    %eax,%eax
call   1040 <fork@plt>
cmp    $0xffffffff,%eax
je     1133 <fork_a_child+0x13>
test   %eax,%eax
jne    1135 <fork_a_child+0x15>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @fork_a_child() {
%1 = alloca i32
%2 = call i32 (...) @fork()
switch i32 %2, label %5 [
i32 -1, label %3
i32 0, label %4
]
3: ; preds = %0
store i32 -1, i32* %1
br label %8
4: ; preds = %0
store i32 0, i32* %1
br label %8
5: ; preds = %0
%6 = load i32, i32* @EXIT_SUCCESS
%7 = call i32 @_exit(i32 %6)
unreachable
8: ; preds = %4, %3
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @fork_a_child() {
%1 = tail call i32 (...) @fork()
switch i32 %1, label %3 [
i32 -1, label %6
i32 0, label %2
]
2: ; preds = %0
br label %6
3: ; preds = %0
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @_exit(i32 %4)
unreachable
6: ; preds = %0, %2
%7 = phi i32 [ 0, %2 ], [ %1, %0 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int log_success(char *msg) {
  printf("SUCCESS: %s\n", msg);
  return 0;
}


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

x86 assembly (clang, -O2):
<log_success>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"SUCCESS: %s\0A\00"
define i32 @log_success(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
short yearlength(short year) {
  int res = 364;
  if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
    res++;
  return res;
}


x86 assembly (clang, -O0):
<yearlength>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movl   $0x16c,-0x8(%rbp)
movswl -0x2(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    113c <yearlength+0x3c>
movswl -0x2(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1151 <yearlength+0x51>
movswl -0x2(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115a <yearlength+0x5a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<yearlength>:
test   $0x3,%dil
sete   %al
imul   $0x5c29,%edi,%ecx
lea    0x51c(%rcx),%edx
ror    $0x2,%dx
movzwl %dx,%edx
cmp    $0x28f,%edx
setae  %dl
and    %al,%dl
add    $0x510,%ecx
ror    $0x4,%cx
movzwl %cx,%eax
cmp    $0xa3,%eax
setb   %al
or     %dl,%al
movzbl %al,%eax
or     $0x16c,%eax
ret

LLVM IR (-O0):
define signext i16 @yearlength(i16 signext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
store i32 364, i32* %3
%4 = load i16, i16* %2
%5 = sext i16 %4 to i32
%6 = srem i32 %5, 4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i16, i16* %2
%10 = sext i16 %9 to i32
%11 = srem i32 %10, 100
%12 = icmp ne i32 %11, 0
br i1 %12, label %18, label %13
13: ; preds = %8, %1
%14 = load i16, i16* %2
%15 = sext i16 %14 to i32
%16 = srem i32 %15, 400
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %13, %8
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %21
21: ; preds = %18, %13
%22 = load i32, i32* %3
%23 = trunc i32 %22 to i16
ret i16 %23
}

LLVM IR (-O2):
define signext i16 @yearlength(i16 signext %0) {
%2 = and i16 %0, 3
%3 = icmp eq i16 %2, 0
%4 = srem i16 %0, 100
%5 = icmp ne i16 %4, 0
%6 = and i1 %3, %5
%7 = srem i16 %0, 400
%8 = icmp eq i16 %7, 0
%9 = or i1 %8, %6
%10 = select i1 %9, i16 365, i16 364
ret i16 %10
}
/* Variables and functions */
void *realloc(void *, size_t);
int /*<<< orphan*/ vmefail();
void *xrealloc(void *ptr, size_t size) {
  register void *value;
  value = realloc(ptr, size);
  if (value == NULL)
    vmefail();
  return value;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1153 <xrealloc+0x33>
mov    $0x0,%al
call   1040 <vmefail@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <xrealloc+0x15>
xor    %eax,%eax
call   1040 <vmefail@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 (...) @vmefail()
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @vmefail()
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bzero(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void getfiletime(struct stat *st, char *time) { bzero(time, strlen(time)); }


x86 assembly (clang, -O0):
<getfiletime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <bzero@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getfiletime>:
push   %rbx
mov    %rsi,%rbx
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <bzero@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define void @getfiletime(%struct.stat* %0, i8* %1) {
%3 = alloca %struct.stat*
%4 = alloca i8*
store %struct.stat* %0, %struct.stat** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @strlen(i8* %6)
%8 = call i32 @bzero(i8* %5, i32 %7)
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define void @getfiletime(%struct.stat* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @bzero(i8* %1, i32 %3)
ret void
}
/* Variables and functions */
int lp_internal_iconfig(int /*<<< orphan*/, char const *);
int lp_iconfig(const char *name) { return lp_internal_iconfig(0, name); }


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

x86 assembly (clang, -O2):
<lp_iconfig>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <lp_internal_iconfig@plt>

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

LLVM IR (-O2):
define i32 @lp_iconfig(i8* %0) {
%2 = tail call i32 @lp_internal_iconfig(i32 0, i8* %0)
ret i32 %2
}
void XShmCreateImage() {}


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

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

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

LLVM IR (-O2):
define void @XShmCreateImage() {
ret void
}
void waitforXFW(struct IsdnCardState *cs, int jade) {}


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

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

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

LLVM IR (-O2):
%struct.IsdnCardState = type opaque
define void @waitforXFW(%struct.IsdnCardState* nocapture %0, i32 %1) {
ret void
}
int traceslang_shutdown(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @traceslang_shutdown() {
ret i32 0
}
void dd_pbl_ios_gc_achievements_report(const char *name, float value) {}


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

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

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

LLVM IR (-O2):
define void @dd_pbl_ios_gc_achievements_report(i8* nocapture %0, float %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int n = 20;
  int x = (1 << 10) | (1 << n);
  printf("1025: %d\n", x >> 10);
  x <<= n;
  printf("1024: %d\n", x >> n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
or     $0x400,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
sar    $0xa,%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%ecx
sar    %cl,%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x401,%esi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x400,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"1025: %d\0A\00"
@.str.1 = [10 x i8] c"1024: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 20, i32* %2
%4 = load i32, i32* %2
%5 = shl i32 1, %4
%6 = or i32 1024, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = ashr i32 %7, 10
%9 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = shl i32 %11, %10
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = ashr i32 %13, %14
%16 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"1025: %d\0A\00"
@.str.1 = [10 x i8] c"1024: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1025)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 1024)
ret i32 0
}
int tuneToVOCFreqDiv(int tune) {
  int freq;
  switch (tune) {
  case 29:
    freq = 144;
    break;
  case 73:
    freq = 155;
    break;
  case 213:
    freq = 184;
    break;
  default:
    freq = 172;
  }
  return freq;
}


x86 assembly (clang, -O0):
<tuneToVOCFreqDiv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1d,%eax
je     113f <tuneToVOCFreqDiv+0x3f>
jmp    111b <tuneToVOCFreqDiv+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x49,%eax
je     114b <tuneToVOCFreqDiv+0x4b>
jmp    112c <tuneToVOCFreqDiv+0x2c>
mov    -0xc(%rbp),%eax
sub    $0xd5,%eax
je     1157 <tuneToVOCFreqDiv+0x57>
jmp    1163 <tuneToVOCFreqDiv+0x63>
movl   $0x90,-0x8(%rbp)
jmp    116a <tuneToVOCFreqDiv+0x6a>
movl   $0x9b,-0x8(%rbp)
jmp    116a <tuneToVOCFreqDiv+0x6a>
movl   $0xb8,-0x8(%rbp)
jmp    116a <tuneToVOCFreqDiv+0x6a>
movl   $0xac,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tuneToVOCFreqDiv>:
cmp    $0x1d,%edi
je     1118 <tuneToVOCFreqDiv+0x18>
cmp    $0xd5,%edi
je     111e <tuneToVOCFreqDiv+0x1e>
cmp    $0x49,%edi
jne    1124 <tuneToVOCFreqDiv+0x24>
mov    $0x9b,%eax
ret
mov    $0x90,%eax
ret
mov    $0xb8,%eax
ret
mov    $0xac,%eax
ret

LLVM IR (-O0):
define i32 @tuneToVOCFreqDiv(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %8 [
i32 29, label %5
i32 73, label %6
i32 213, label %7
]
5: ; preds = %1
store i32 144, i32* %3
br label %9
6: ; preds = %1
store i32 155, i32* %3
br label %9
7: ; preds = %1
store i32 184, i32* %3
br label %9
8: ; preds = %1
store i32 172, i32* %3
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @tuneToVOCFreqDiv(i32 %0) {
switch i32 %0, label %4 [
i32 29, label %5
i32 73, label %2
i32 213, label %3
]
2: ; preds = %1
br label %5
3: ; preds = %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %3, %2
%6 = phi i32 [ 172, %4 ], [ 184, %3 ], [ 155, %2 ], [ 144, %1 ]
ret i32 %6
}
void gtk_expander_set_use_markup() {}


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

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

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

LLVM IR (-O2):
define void @gtk_expander_set_use_markup() {
ret void
}
/* Type definitions */
struct inode {
  int dummy;
};

/* Variables and functions */
struct inode *namex(char *, int, char *);
struct inode *nameiparent(char *path, char *name) {
  return namex(path, 1, name);
}


x86 assembly (clang, -O0):
<nameiparent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x1,%esi
call   1030 <namex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nameiparent>:
mov    %rsi,%rdx
mov    $0x1,%esi
jmp    1030 <namex@plt>

LLVM IR (-O0):
%struct.inode = type { i32 }
define %struct.inode* @nameiparent(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call %struct.inode* @namex(i8* %5, i32 1, i8* %6)
ret %struct.inode* %7
}

LLVM IR (-O2):
%struct.inode = type { i32 }
define %struct.inode* @nameiparent(i8* %0, i8* %1) {
%3 = tail call %struct.inode* @namex(i8* %0, i32 1, i8* %1)
ret %struct.inode* %3
}
/* Variables and functions */
double exp(double);
double randn();
double FGauss(double Ftrue, double beta) {
  double Fval = Ftrue * exp(beta * randn());
  Fval += 1.01 * 1e-8;
  if (Ftrue < 1e-8) {
    Fval = Ftrue;
  }
  return Fval;
}


x86 assembly (clang, -O0):
<FGauss>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    $0x0,%al
call   1040 <randn@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe91(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe77(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    119e <FGauss+0x7e>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FGauss>:
sub    $0x28,%rsp
movsd  %xmm1,0x8(%rsp)
movapd %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1040 <randn@plt>
mulsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
movapd 0x10(%rsp),%xmm2
mulsd  %xmm2,%xmm0
addsd  0xeac(%rip),%xmm0
movapd %xmm2,%xmm1
cmpltsd 0xea7(%rip),%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @FGauss(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = call double (...) @randn()
%9 = fmul double %7, %8
%10 = call double @exp(double %9)
%11 = fmul double %6, %10
store double %11, double* %5
%12 = load double, double* %5
%13 = fadd double %12, 0x3E45B088A1E43BB6
store double %13, double* %5
%14 = load double, double* %3
%15 = fcmp olt double %14, 1.000000e-08
br i1 %15, label %16, label %18
16: ; preds = %2
%17 = load double, double* %3
store double %17, double* %5
br label %18
18: ; preds = %16, %2
%19 = load double, double* %5
ret double %19
}

LLVM IR (-O2):
define double @FGauss(double %0, double %1) {
%3 = tail call double (...) @randn()
%4 = fmul double %3, %1
%5 = tail call double @exp(double %4)
%6 = fmul double %5, %0
%7 = fadd double %6, 0x3E45B088A1E43BB6
%8 = fcmp olt double %0, 1.000000e-08
%9 = select i1 %8, double %0, double %7
ret double %9
}
void connection_established(int sock_fd) {}


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

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

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

LLVM IR (-O2):
define void @connection_established(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int __rt_sigprocmask(int how, const sigset_t *set, sigset_t *oldsetm, long nr) {
  return 0;
}


x86 assembly (clang, -O0):
<__rt_sigprocmask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @__rt_sigprocmask(i32 %0, i32* %1, i32* %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i64
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i64 %3, i64* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @__rt_sigprocmask(i32 %0, i32* nocapture readnone %1, i32* nocapture readnone %2, i64 %3) {
ret i32 0
}
/* Variables and functions */
scalar_t__ readStdInLine(char **);
void parent_func() {
  char *buffer[1024];
  while (readStdInLine(buffer)) {
  }
}


x86 assembly (clang, -O0):
<parent_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2000,%rsp
lea    -0x2000(%rbp),%rdi
call   1030 <readStdInLine@plt>
cmp    $0x0,%rax
je     1136 <parent_func+0x26>
jmp    111b <parent_func+0xb>
add    $0x2000,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parent_func>:
push   %rbx
sub    $0x2000,%rsp
mov    %rsp,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <readStdInLine@plt>
test   %rax,%rax
jne    1120 <parent_func+0x10>
add    $0x2000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @parent_func() {
%1 = alloca [1024 x i8*]
br label %2
2: ; preds = %6, %0
%3 = getelementptr inbounds [1024 x i8*], [1024 x i8*]* %1, i64 0, i64 0
%4 = call i64 @readStdInLine(i8** %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %2
br label %2
7: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @parent_func() {
%1 = alloca [1024 x i8*]
%2 = bitcast [1024 x i8*]* %1 to i8*
%3 = getelementptr inbounds [1024 x i8*], [1024 x i8*]* %1, i64 0, i64 0
br label %4
4: ; preds = %4, %0
%5 = call i64 @readStdInLine(i8** %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %4
7: ; preds = %4
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ ng_tofday_to_timestamp(struct timeval *);
int64_t ng_get_timestamp() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return ng_tofday_to_timestamp(&tv);
}


x86 assembly (clang, -O0):
<ng_get_timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
lea    -0x8(%rbp),%rdi
call   1030 <ng_tofday_to_timestamp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ng_get_timestamp>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    %rbx,%rdi
call   1030 <ng_tofday_to_timestamp@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @ng_get_timestamp() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = call i32 @ng_tofday_to_timestamp(%struct.timeval* %1)
ret i32 %3
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @ng_get_timestamp() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = call i32 @ng_tofday_to_timestamp(%struct.timeval* %1)
ret i32 %4
}
/* Type definitions */
struct lrt_trans {
  int dummy;
};

/* Variables and functions */
struct lrt_trans *lrt_trans_id2lt(uintptr_t i) {
  return (struct lrt_trans *)i;
}


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

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

LLVM IR (-O0):
%struct.lrt_trans = type { i32 }
define %struct.lrt_trans* @lrt_trans_id2lt(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to %struct.lrt_trans*
ret %struct.lrt_trans* %4
}

LLVM IR (-O2):
%struct.lrt_trans = type { i32 }
define %struct.lrt_trans* @lrt_trans_id2lt(i64 %0) {
%2 = inttoptr i64 %0 to %struct.lrt_trans*
ret %struct.lrt_trans* %2
}
/* Variables and functions */
char *_s2_f2cstr(char *, long);
int /*<<< orphan*/ free(char *);
int ss2lcm(char *, int, int);
int ss2lcm_(char *imapfile, int *startidx, int *maxn, long int textlen) {
  char *ttex = _s2_f2cstr(imapfile, textlen);
  int result = ss2lcm(ttex, *startidx, *maxn);
  free(ttex);
  return result;
}


x86 assembly (clang, -O0):
<ss2lcm_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <_s2_f2cstr@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
call   1040 <ss2lcm@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x2c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ss2lcm_>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rcx,%rsi
call   1050 <_s2_f2cstr@plt>
mov    %rax,%rbx
mov    (%r15),%esi
mov    (%r14),%edx
mov    %rax,%rdi
call   1040 <ss2lcm@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ss2lcm_(i8* %0, i32* %1, i32* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i32
store i8* %0, i8** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i64 %3, i64* %8
%11 = load i8*, i8** %5
%12 = load i64, i64* %8
%13 = call i8* @_s2_f2cstr(i8* %11, i64 %12)
store i8* %13, i8** %9
%14 = load i8*, i8** %9
%15 = load i32*, i32** %6
%16 = load i32, i32* %15
%17 = load i32*, i32** %7
%18 = load i32, i32* %17
%19 = call i32 @ss2lcm(i8* %14, i32 %16, i32 %18)
store i32 %19, i32* %10
%20 = load i8*, i8** %9
%21 = call i32 @free(i8* %20)
%22 = load i32, i32* %10
ret i32 %22
}

LLVM IR (-O2):
define i32 @ss2lcm_(i8* %0, i32* nocapture %1, i32* nocapture %2, i64 %3) {
%5 = tail call i8* @_s2_f2cstr(i8* %0, i64 %3)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = tail call i32 @ss2lcm(i8* %5, i32 %6, i32 %7)
%9 = tail call i32 @free(i8* %5)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR3F_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR3F_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

LLVM IR (-O0):
define void @U_WMR3F_swap(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_WMR3F_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
int main() {
  int x;
  x = 10;
  while (x)
    x = x - 1;
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112a <main+0x2a>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ rfftb1(size_t, double *, double *, double *, size_t *);
void rfftb(size_t n, double r[], double wsave[]) {
  if (n != 1)
    rfftb1(n, r, wsave, wsave + n, (size_t *)(wsave + 2 * n));
}


x86 assembly (clang, -O0):
<rfftb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x1,-0x8(%rbp)
je     1162 <rfftb+0x52>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x18(%rbp),%r8
mov    -0x8(%rbp),%rax
shl    $0x1,%rax
shl    $0x3,%rax
add    %rax,%r8
call   1030 <rfftb1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rfftb>:
cmp    $0x1,%rdi
jne    1117 <rfftb+0x7>
ret
lea    (%rdx,%rdi,8),%rcx
mov    %rdi,%r8
shl    $0x4,%r8
add    %rdx,%r8
jmp    1030 <rfftb1@plt>

LLVM IR (-O0):
define void @rfftb(i64 %0, double* %1, double* %2) {
%4 = alloca i64
%5 = alloca double*
%6 = alloca double*
store i64 %0, i64* %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load i64, i64* %4
%8 = icmp ne i64 %7, 1
br i1 %8, label %9, label %22
9: ; preds = %3
%10 = load i64, i64* %4
%11 = load double*, double** %5
%12 = load double*, double** %6
%13 = load double*, double** %6
%14 = load i64, i64* %4
%15 = getelementptr inbounds double, double* %13, i64 %14
%16 = load double*, double** %6
%17 = load i64, i64* %4
%18 = mul i64 2, %17
%19 = getelementptr inbounds double, double* %16, i64 %18
%20 = bitcast double* %19 to i64*
%21 = call i32 @rfftb1(i64 %10, double* %11, double* %12, double* %15, i64* %20)
br label %22
22: ; preds = %9, %3
ret void
}

LLVM IR (-O2):
define void @rfftb(i64 %0, double* %1, double* %2) {
%4 = icmp eq i64 %0, 1
br i1 %4, label %11, label %5
5: ; preds = %3
%6 = getelementptr inbounds double, double* %2, i64 %0
%7 = shl i64 %0, 1
%8 = getelementptr inbounds double, double* %2, i64 %7
%9 = bitcast double* %8 to i64*
%10 = tail call i32 @rfftb1(i64 %0, double* %1, double* %2, double* %6, i64* %9)
br label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
scalar_t__ memcmp(char *, char *, size_t);
int dict_key_equals(char *key1, size_t len1, char *key2, size_t len2) {
  if (len1 == len2 && (memcmp(key1, key2, len1) == 0))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<dict_key_equals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x28(%rbp),%rax
jne    115d <dict_key_equals+0x4d>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
jne    115d <dict_key_equals+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1164 <dict_key_equals+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dict_key_equals>:
cmp    %rcx,%rsi
jne    112e <dict_key_equals+0x1e>
push   %rax
mov    %rsi,%rax
mov    %rdx,%rsi
mov    %rax,%rdx
call   1030 <memcmp@plt>
test   %rax,%rax
lea    0x8(%rsp),%rsp
je     1131 <dict_key_equals+0x21>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @dict_key_equals(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = icmp eq i64 %1, %3
br i1 %5, label %6, label %9
6: ; preds = %4
%7 = tail call i64 @memcmp(i8* %0, i8* %2, i64 %1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %6, %4
br label %10
10: ; preds = %6, %9
%11 = phi i32 [ 0, %9 ], [ 1, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ DMAL_ReadUInt32(unsigned long, unsigned long *);
unsigned long ReadGx(unsigned long inRegAddr) {
  unsigned long data;
  DMAL_ReadUInt32(inRegAddr, &data);
  return data;
}


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

x86 assembly (clang, -O2):
<ReadGx>:
push   %rax
mov    %rsp,%rsi
call   1030 <DMAL_ReadUInt32@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @ReadGx(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i32 @DMAL_ReadUInt32(i64 %4, i64* %3)
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @ReadGx(i64 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = call i32 @DMAL_ReadUInt32(i64 %0, i64* %2)
%5 = load i64, i64* %2
ret i64 %5
}
void write_bsnl(int bsnl, void (*put)(char)) {
  while (bsnl-- > 0) {
    (*put)('\\');
    (*put)('\n');
  }
}


x86 assembly (clang, -O0):
<write_bsnl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jle    1138 <write_bsnl+0x38>
mov    $0x5c,%edi
call   *-0x10(%rbp)
mov    $0xa,%edi
call   *-0x10(%rbp)
jmp    110f <write_bsnl+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_bsnl>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    1126 <write_bsnl+0x26>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x1,%ebp
nop
mov    $0x5c,%edi
call   *%rbx
mov    $0xa,%edi
call   *%rbx
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1110 <write_bsnl+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @write_bsnl(i32 %0, void (i8)* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %8
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = add nsw i32 %5, -1
tail call void %1(i8 signext 92)
tail call void %1(i8 signext 10)
%7 = icmp ugt i32 %5, 1
br i1 %7, label %4, label %8
8: ; preds = %4, %2
ret void
}
/* Type definitions */
struct entity_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ destroy_mine(struct entity_t *);
void mine_rails_collision(struct entity_t *mine, struct entity_t *rails) {
  destroy_mine(mine);
}


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

x86 assembly (clang, -O2):
<mine_rails_collision>:
jmp    1030 <destroy_mine@plt>

LLVM IR (-O0):
%struct.entity_t = type { i32 }
define void @mine_rails_collision(%struct.entity_t* %0, %struct.entity_t* %1) {
%3 = alloca %struct.entity_t*
%4 = alloca %struct.entity_t*
store %struct.entity_t* %0, %struct.entity_t** %3
store %struct.entity_t* %1, %struct.entity_t** %4
%5 = load %struct.entity_t*, %struct.entity_t** %3
%6 = call i32 @destroy_mine(%struct.entity_t* %5)
ret void
}

LLVM IR (-O2):
%struct.entity_t = type { i32 }
define void @mine_rails_collision(%struct.entity_t* %0, %struct.entity_t* nocapture readnone %1) {
%3 = tail call i32 @destroy_mine(%struct.entity_t* %0)
ret void
}
int getUartDivisor(int baud, unsigned char *hi, unsigned char *lo) {
  *lo = ((48000000 / 16) / baud) & 0x00ff;
  *hi = (((48000000 / 16) / baud) & 0xff00) >> 8;
  return (0);
}


x86 assembly (clang, -O0):
<getUartDivisor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x2dc6c0,%eax
cltd
idivl  -0x4(%rbp)
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    $0x2dc6c0,%eax
cltd
idivl  -0x4(%rbp)
and    $0xff00,%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getUartDivisor>:
mov    %rdx,%rcx
mov    $0x2dc6c0,%eax
xor    %edx,%edx
idiv   %edi
mov    %al,(%rcx)
mov    %ah,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @getUartDivisor(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = sdiv i32 3000000, %7
%9 = and i32 %8, 255
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %6
store i8 %10, i8* %11
%12 = load i32, i32* %4
%13 = sdiv i32 3000000, %12
%14 = and i32 %13, 65280
%15 = ashr i32 %14, 8
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %5
store i8 %16, i8* %17
ret i32 0
}

LLVM IR (-O2):
define i32 @getUartDivisor(i32 %0, i8* nocapture writeonly %1, i8* nocapture writeonly %2) {
%4 = sdiv i32 3000000, %0
%5 = trunc i32 %4 to i8
store i8 %5, i8* %2
%6 = lshr i32 %4, 8
%7 = trunc i32 %6 to i8
store i8 %7, i8* %1
ret i32 0
}