xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_QuaternionV4_init(void) {
  _hmt_register_covercase("HMM_QuaternionV4", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_QuaternionV4_init>:
lea    0xee9(%rip),%rdi
lea    0xef3(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"HMM_QuaternionV4\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_QuaternionV4_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"HMM_QuaternionV4\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_QuaternionV4_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void ext2_bit_clear(uint32_t *btbl, uint32_t bit_num) {
  int byte = (bit_num >> 5);
  int bit = (bit_num & 0x1F);
  btbl[byte] &= ~(1 << bit);
}


x86 assembly (clang, -O0):
<ext2_bit_clear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x5,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1f,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
and    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ext2_bit_clear>:
mov    %esi,%ecx
mov    %esi,%eax
sar    $0x5,%eax
mov    $0xfffffffe,%edx
rol    %cl,%edx
cltq
and    %edx,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @ext2_bit_clear(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = ashr i32 %7, 5
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = and i32 %9, 31
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = shl i32 1, %11
%13 = xor i32 %12, -1
%14 = load i32*, i32** %3
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
%18 = load i32, i32* %17
%19 = and i32 %18, %13
store i32 %19, i32* %17
ret void
}

LLVM IR (-O2):
define void @ext2_bit_clear(i32* nocapture %0, i32 %1) {
%3 = ashr i32 %1, 5
%4 = and i32 %1, 31
%5 = shl nuw i32 1, %4
%6 = xor i32 %5, -1
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = and i32 %9, %6
store i32 %10, i32* %8
ret void
}
void RotatePlane180() {}


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

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

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

LLVM IR (-O2):
define void @RotatePlane180() {
ret void
}
/* Variables and functions */
int read(int, unsigned char *, int);
int read_byte(int fd) {
  int ret;
  unsigned char value;
  do {
    ret = read(fd, &value, 1);
    if (ret < 0) {
      return ret;
    }
  } while (ret == 0);
  return value;
}


x86 assembly (clang, -O0):
<read_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0xd(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1144 <read_byte+0x34>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115a <read_byte+0x4a>
jmp    1149 <read_byte+0x39>
cmpl   $0x0,-0xc(%rbp)
je     111b <read_byte+0xb>
movzbl -0xd(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_byte>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x7(%rsp),%r14
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <read@plt>
test   %eax,%eax
js     113a <read_byte+0x2a>
je     1120 <read_byte+0x10>
movzbl 0x7(%rsp),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @read_byte(i32 %0) {
%2 = alloca i8
br label %3
3: ; preds = %6, %1
%4 = call i32 @read(i32 %0, i8* %2, i32 1)
%5 = icmp slt i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = icmp eq i32 %4, 0
br i1 %7, label %3, label %8
8: ; preds = %6
%9 = load i8, i8* %2
%10 = zext i8 %9 to i32
br label %11
11: ; preds = %3, %8
%12 = phi i32 [ %10, %8 ], [ %4, %3 ]
ret i32 %12
}
_Bool Long_safe_MINUS_sub(long x, long y, long *res) {
  return __builtin_ssubl_overflow(x, y, res);
}


x86 assembly (clang, -O0):
<Long_safe_MINUS_sub>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rax,%rdx
seto   %al
mov    %rdx,(%rcx)
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Long_safe_MINUS_sub>:
sub    %rsi,%rdi
seto   %al
mov    %rdi,(%rdx)
ret

LLVM IR (-O0):
define zeroext i1 @Long_safe_MINUS_sub(i64 %0, i64 %1, i64* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64*
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64* %2, i64** %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = load i64*, i64** %6
%10 = call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %7, i64 %8)
%11 = extractvalue { i64, i1 } %10, 1
%12 = extractvalue { i64, i1 } %10, 0
store i64 %12, i64* %9
ret i1 %11
}

LLVM IR (-O2):
define zeroext i1 @Long_safe_MINUS_sub(i64 %0, i64 %1, i64* nocapture writeonly %2) {
%4 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %0, i64 %1)
%5 = extractvalue { i64, i1 } %4, 1
%6 = extractvalue { i64, i1 } %4, 0
store i64 %6, i64* %2
ret i1 %5
}
/* Variables and functions */
int /*<<< orphan*/ board_flash_get_datafs_size();
int /*<<< orphan*/ board_flash_write_datafs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
char *malloc(int /*<<< orphan*/);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int board_flash_erase_datafs_common() {
  char *buf = malloc(board_flash_get_datafs_size());
  memset(buf, 0, board_flash_get_datafs_size());
  board_flash_write_datafs(buf, board_flash_get_datafs_size());
  free(buf);
  return 0;
}


x86 assembly (clang, -O0):
<board_flash_erase_datafs_common>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1070 <board_flash_get_datafs_size@plt>
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1070 <board_flash_get_datafs_size@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1070 <board_flash_get_datafs_size@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1050 <board_flash_write_datafs@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<board_flash_erase_datafs_common>:
push   %rbx
xor    %eax,%eax
call   1070 <board_flash_get_datafs_size@plt>
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1070 <board_flash_get_datafs_size@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %eax,%edx
call   1040 <memset@plt>
xor    %eax,%eax
call   1070 <board_flash_get_datafs_size@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <board_flash_write_datafs@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @board_flash_erase_datafs_common() {
%1 = alloca i8*
%2 = call i32 (...) @board_flash_get_datafs_size()
%3 = call i8* @malloc(i32 %2)
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = call i32 (...) @board_flash_get_datafs_size()
%6 = call i32 @memset(i8* %4, i32 0, i32 %5)
%7 = load i8*, i8** %1
%8 = call i32 (...) @board_flash_get_datafs_size()
%9 = call i32 @board_flash_write_datafs(i8* %7, i32 %8)
%10 = load i8*, i8** %1
%11 = call i32 @free(i8* %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @board_flash_erase_datafs_common() {
%1 = tail call i32 (...) @board_flash_get_datafs_size()
%2 = tail call i8* @malloc(i32 %1)
%3 = tail call i32 (...) @board_flash_get_datafs_size()
%4 = tail call i32 @memset(i8* %2, i32 0, i32 %3)
%5 = tail call i32 (...) @board_flash_get_datafs_size()
%6 = tail call i32 @board_flash_write_datafs(i8* %2, i32 %5)
%7 = tail call i32 @free(i8* %2)
ret i32 0
}
/* Type definitions */
typedef int int16_t;

/* Variables and functions */
int16_t GSM_ABS(int16_t a) {
  if (a > 0)
    return a;
  if (a == (-32767 - 1))
    return 32767;
  return -a;
}


x86 assembly (clang, -O0):
<GSM_ABS>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    111c <GSM_ABS+0x1c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113d <GSM_ABS+0x3d>
cmpl   $0xffff8000,-0x8(%rbp)
jne    1135 <GSM_ABS+0x35>
movl   $0x7fff,-0x4(%rbp)
jmp    113d <GSM_ABS+0x3d>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GSM_ABS>:
mov    %edi,%ecx
neg    %ecx
cmp    $0xffff8000,%edi
mov    $0x7fff,%eax
cmovne %ecx,%eax
test   %edi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @GSM_ABS(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = icmp eq i32 %0, -32768
%4 = sub nsw i32 0, %0
%5 = select i1 %3, i32 32767, i32 %4
%6 = select i1 %2, i32 %0, i32 %5
ret i32 %6
}
/* Type definitions */
struct utsname {
  int /*<<< orphan*/ nodename;
};

/* Variables and functions */
int /*<<< orphan*/ get_ip_address(int /*<<< orphan*/, char *);
int /*<<< orphan*/ uname(struct utsname *);
int get_our_ip_address(char *addr, int *family) {
  struct utsname info;
  uname(&info);
  get_ip_address(info.nodename, addr);
  return 0;
}


x86 assembly (clang, -O0):
<get_our_ip_address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
call   1030 <uname@plt>
mov    -0x18(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1040 <get_ip_address@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_our_ip_address>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rdi
call   1030 <uname@plt>
mov    0x8(%rsp),%edi
mov    %rbx,%rsi
call   1040 <get_ip_address@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.utsname = type { i32 }
define i32 @get_our_ip_address(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca %struct.utsname
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = call i32 @uname(%struct.utsname* %5)
%7 = getelementptr inbounds %struct.utsname, %struct.utsname* %5, i32 0, i32 0
%8 = load i32, i32* %7
%9 = load i8*, i8** %3
%10 = call i32 @get_ip_address(i32 %8, i8* %9)
ret i32 0
}

LLVM IR (-O2):
%struct.utsname = type { i32 }
define i32 @get_our_ip_address(i8* %0, i32* nocapture readnone %1) {
%3 = alloca %struct.utsname
%4 = bitcast %struct.utsname* %3 to i8*
%5 = call i32 @uname(%struct.utsname* %3)
%6 = getelementptr inbounds %struct.utsname, %struct.utsname* %3, i64 0, i32 0
%7 = load i32, i32* %6
%8 = tail call i32 @get_ip_address(i32 %7, i8* %0)
ret i32 0
}
int picosat_haveados(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @picosat_haveados() {
ret i32 0
}
/* Variables and functions */
scalar_t__ __udivdi3(unsigned long, unsigned long);
long __divdi3(long a, long b) {
  int s = 0;
  long r;
  if (a < 0) {
    s = 1;
    a = -a;
  }
  if (b < 0) {
    s ^= 1;
    b = -b;
  }
  r = (long)__udivdi3((unsigned long)a, (unsigned long)b);
  if (s)
    r = -r;
  return r;
}


x86 assembly (clang, -O0):
<__divdi3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1143 <__divdi3+0x33>
movl   $0x1,-0x14(%rbp)
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1161 <__divdi3+0x51>
mov    -0x14(%rbp),%eax
xor    $0x1,%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
sub    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__udivdi3@plt>
mov    %rax,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1186 <__divdi3+0x76>
xor    %eax,%eax
sub    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__divdi3>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
neg    %rdi
cmovs  %r14,%rdi
mov    %rsi,%rbx
neg    %rsi
cmovs  %rbx,%rsi
call   1030 <__udivdi3@plt>
mov    %rax,%rcx
neg    %rcx
xor    %r14,%rbx
cmovs  %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @__divdi3(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
%6 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
store i32 0, i32* %5
%7 = load i64, i64* %3
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
store i32 1, i32* %5
%10 = load i64, i64* %3
%11 = sub nsw i64 0, %10
store i64 %11, i64* %3
br label %12
12: ; preds = %9, %2
%13 = load i64, i64* %4
%14 = icmp slt i64 %13, 0
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load i32, i32* %5
%17 = xor i32 %16, 1
store i32 %17, i32* %5
%18 = load i64, i64* %4
%19 = sub nsw i64 0, %18
store i64 %19, i64* %4
br label %20
20: ; preds = %15, %12
%21 = load i64, i64* %3
%22 = load i64, i64* %4
%23 = call i64 @__udivdi3(i64 %21, i64 %22)
store i64 %23, i64* %6
%24 = load i32, i32* %5
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %20
%27 = load i64, i64* %6
%28 = sub nsw i64 0, %27
store i64 %28, i64* %6
br label %29
29: ; preds = %26, %20
%30 = load i64, i64* %6
ret i64 %30
}

LLVM IR (-O2):
define i64 @__divdi3(i64 %0, i64 %1) {
%3 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
%4 = tail call i64 @llvm.abs.i64(i64 %1, i1 true)
%5 = xor i64 %1, %0
%6 = tail call i64 @__udivdi3(i64 %3, i64 %4)
%7 = icmp sgt i64 %5, -1
%8 = sub nsw i64 0, %6
%9 = select i1 %7, i64 %6, i64 %8
ret i64 %9
}
int do_812() { return 812; }


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

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

LLVM IR (-O0):
define i32 @do_812() {
ret i32 812
}

LLVM IR (-O2):
define i32 @do_812() {
ret i32 812
}
void PWMDeadBandEnable(unsigned long ulBase, unsigned long ulGen,
                       unsigned short usRise, unsigned short usFall) {
  ;
  ;
  ;
  ;
  ulGen = ((ulBase) + (ulGen));
  (*((volatile unsigned long *)(ulGen + 0x0000002C))) = usRise;
  (*((volatile unsigned long *)(ulGen + 0x00000030))) = usFall;
  (*((volatile unsigned long *)(ulGen + 0x00000028))) |= 0x00000001;
}


x86 assembly (clang, -O0):
<PWMDeadBandEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %cx,%ax
mov    %dx,%cx
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cx,-0x12(%rbp)
mov    %ax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
movzwl -0x12(%rbp),%eax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %rcx,0x2c(%rax)
movzwl -0x14(%rbp),%eax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %rcx,0x30(%rax)
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rcx
or     $0x1,%rcx
mov    %rcx,0x28(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMDeadBandEnable>:
mov    %edx,%eax
mov    %rax,0x2c(%rsi,%rdi,1)
mov    %ecx,%eax
mov    %rax,0x30(%rsi,%rdi,1)
orq    $0x1,0x28(%rsi,%rdi,1)
ret

LLVM IR (-O0):
define void @PWMDeadBandEnable(i64 %0, i64 %1, i16 zeroext %2, i16 zeroext %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i16
%8 = alloca i16
store i64 %0, i64* %5
store i64 %1, i64* %6
store i16 %2, i16* %7
store i16 %3, i16* %8
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = add i64 %9, %10
store i64 %11, i64* %6
%12 = load i16, i16* %7
%13 = zext i16 %12 to i64
%14 = load i64, i64* %6
%15 = add i64 %14, 44
%16 = inttoptr i64 %15 to i64*
store volatile i64 %13, i64* %16
%17 = load i16, i16* %8
%18 = zext i16 %17 to i64
%19 = load i64, i64* %6
%20 = add i64 %19, 48
%21 = inttoptr i64 %20 to i64*
store volatile i64 %18, i64* %21
%22 = load i64, i64* %6
%23 = add i64 %22, 40
%24 = inttoptr i64 %23 to i64*
%25 = load volatile i64, i64* %24
%26 = or i64 %25, 1
store volatile i64 %26, i64* %24
ret void
}

LLVM IR (-O2):
define void @PWMDeadBandEnable(i64 %0, i64 %1, i16 zeroext %2, i16 zeroext %3) {
%5 = add i64 %1, %0
%6 = zext i16 %2 to i64
%7 = add i64 %5, 44
%8 = inttoptr i64 %7 to i64*
store volatile i64 %6, i64* %8
%9 = zext i16 %3 to i64
%10 = add i64 %5, 48
%11 = inttoptr i64 %10 to i64*
store volatile i64 %9, i64* %11
%12 = add i64 %5, 40
%13 = inttoptr i64 %12 to i64*
%14 = load volatile i64, i64* %13
%15 = or i64 %14, 1
store volatile i64 %15, i64* %13
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ si_addr;
};
typedef TYPE_1__ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, long);
void handler(int sig, siginfo_t *si, void *unused) {
  printf("Got SIGSEGV at address: 0x%lx\n", (long)si->si_addr);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handler>:
push   %rax
mov    (%rsi),%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64 }
@.str = [31 x i8] c"Got SIGSEGV at address: 0x%lx\0A\00"
@EXIT_FAILURE = global i32 0
define void @handler(i32 %0, %struct.TYPE_3__* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.TYPE_3__*
%6 = alloca i8*
store i32 %0, i32* %4
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %5
store i8* %2, i8** %6
%7 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%8 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %7, i32 0, i32 0
%9 = load i64, i64* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 %9)
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i64 }
@.str = [31 x i8] c"Got SIGSEGV at address: 0x%lx\0A\00"
@EXIT_FAILURE = global i32 0
define void @handler(i32 %0, %struct.TYPE_3__* nocapture %1, i8* nocapture readnone %2) {
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%5 = load i64, i64* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 %5)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ putOvalPartsPicture(double, double, double, double, char *);
void putOvalPicture(double cx, double cy, double rx, double ry) {
  putOvalPartsPicture(cx, cy, rx, ry, "");
}


x86 assembly (clang, -O0):
<putOvalPicture>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
lea    0xeb9(%rip),%rdi
call   1030 <putOvalPartsPicture@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @putOvalPicture(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = load double, double* %7
%12 = load double, double* %8
%13 = call i32 @putOvalPartsPicture(double %9, double %10, double %11, double %12, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @putOvalPicture(double %0, double %1, double %2, double %3) {
%5 = tail call i32 @putOvalPartsPicture(double %0, double %1, double %2, double %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void f(int x) { printf("%d\n", x + x); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
add    -0x4(%rbp),%esi
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    (%rdi,%rdi,1),%esi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @f(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void help(void) {
  char *help = ""
               "Usage: jail-cmdd [OPTION]...\n"
               "Start jail cmd proxy server.\n"
               "  -f            run forground.\n"
               "  -h            show this help message.\n"
               "\n";
  printf("%s", help);
}


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

x86 assembly (clang, -O2):
<help>:
lea    0xf6c(%rip),%rdi
lea    0xee2(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [131 x i8] c"Usage: jail-cmdd [OPTION]...\0AStart jail cmd proxy server.\0A -f run forground.\0A -h show this help message.\0A\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define void @help() {
%1 = alloca i8*
store i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret void
}

LLVM IR (-O2):
@.str = [131 x i8] c"Usage: jail-cmdd [OPTION]...\0AStart jail cmd proxy server.\0A -f run forground.\0A -h show this help message.\0A\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define void @help() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ obdata;
};
typedef TYPE_1__ XImage;

/* Variables and functions */
void *get_XImage_obdata(void *_p) { return (void *)((XImage *)_p)->obdata; }


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

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

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

LLVM IR (-O2):
define i8* @get_XImage_obdata(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
void __attribute__((weak)) tim8_cc_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<tim8_cc_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tim8_cc_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.tim8_cc_isr = [12 x i8] c"tim8_cc_isr\00"
define weak void @tim8_cc_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.tim8_cc_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.tim8_cc_isr = [12 x i8] c"tim8_cc_isr\00"
define weak void @tim8_cc_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.tim8_cc_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int syscall(int, int, int, int);
int ioprio_set(int which, int who, int ioprio) {
  return syscall(251, which, who, ioprio);
}


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

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

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

LLVM IR (-O2):
define i32 @ioprio_set(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @syscall(i32 251, i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ perror(char const *);
void die(const char *where) {
  perror(where);
  _exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
call   1040 <perror@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @die(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @_exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ emulate_time();
int /*<<< orphan*/ push_int(int /*<<< orphan*/);
void fn_time(void) { push_int(emulate_time()); }


x86 assembly (clang, -O0):
<fn_time>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <emulate_time@plt>
mov    %eax,%edi
call   1030 <push_int@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_time>:
push   %rax
xor    %eax,%eax
call   1040 <emulate_time@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <push_int@plt>

LLVM IR (-O0):
define void @fn_time() {
%1 = call i32 (...) @emulate_time()
%2 = call i32 @push_int(i32 %1)
ret void
}

LLVM IR (-O2):
define void @fn_time() {
%1 = tail call i32 (...) @emulate_time()
%2 = tail call i32 @push_int(i32 %1)
ret void
}
/* Variables and functions */
int f191(int *);
int f192(int *p) { return f191(p); }


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

x86 assembly (clang, -O2):
<f192>:
jmp    1030 <f191@plt>

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

LLVM IR (-O2):
define i32 @f192(i32* %0) {
%2 = tail call i32 @f191(i32* %0)
ret i32 %2
}
char dozenify(char num) {
  switch (num) {
  case 0:
  case 1:
  case 2:
  case 3:
  case 4:
  case 5:
  case 6:
  case 7:
  case 8:
  case 9:
    return (num % 10) + '0';
  case 10:
    return 'X';
  case 11:
    return 'E';
  }
}


x86 assembly (clang, -O0):
<dozenify>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0xa,%eax
jb     1141 <dozenify+0x41>
jmp    111f <dozenify+0x1f>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
je     115a <dozenify+0x5a>
jmp    1130 <dozenify+0x30>
mov    -0x8(%rbp),%eax
sub    $0xb,%eax
je     1163 <dozenify+0x63>
jmp    1167 <dozenify+0x67>
movsbl -0x2(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    %dl,%al
mov    %al,-0x1(%rbp)
jmp    1167 <dozenify+0x67>
movb   $0x58,-0x1(%rbp)
jmp    1167 <dozenify+0x67>
movb   $0x45,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dozenify>:
cmp    $0xa,%edi
jae    111d <dozenify+0x1d>
movzbl %dil,%eax
imul   $0xcd,%eax,%ecx
shr    $0xa,%ecx
and    $0xfffffffe,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
or     $0x30,%al
ret
mov    $0x58,%al
cmp    $0xb,%edi
jne    1126 <dozenify+0x26>
mov    $0x45,%al
ret

LLVM IR (-O0):
define signext i8 @dozenify(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %14 [
i32 0, label %6
i32 1, label %6
i32 2, label %6
i32 3, label %6
i32 4, label %6
i32 5, label %6
i32 6, label %6
i32 7, label %6
i32 8, label %6
i32 9, label %6
i32 10, label %12
i32 11, label %13
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = srem i32 %8, 10
%10 = add nsw i32 %9, 48
%11 = trunc i32 %10 to i8
store i8 %11, i8* %2
br label %14
12: ; preds = %1
store i8 88, i8* %2
br label %14
13: ; preds = %1
store i8 69, i8* %2
br label %14
14: ; preds = %6, %12, %13, %1
%15 = load i8, i8* %2
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @dozenify(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %7 [
i32 0, label %3
i32 1, label %3
i32 2, label %3
i32 3, label %3
i32 4, label %3
i32 5, label %3
i32 6, label %3
i32 7, label %3
i32 8, label %3
i32 9, label %3
i32 11, label %6
]
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
%4 = urem i8 %0, 10
%5 = or i8 %4, 48
br label %7
6: ; preds = %1
br label %7
7: ; preds = %3, %6, %1
%8 = phi i8 [ 69, %6 ], [ %5, %3 ], [ 88, %1 ]
ret i8 %8
}
/* Variables and functions */
int /*<<< orphan*/ op_write1(int);
void op_enc_rra(void) { op_write1(0x1f); }


x86 assembly (clang, -O0):
<op_enc_rra>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1f,%edi
call   1030 <op_write1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_enc_rra>:
mov    $0x1f,%edi
jmp    1030 <op_write1@plt>

LLVM IR (-O0):
define void @op_enc_rra() {
%1 = call i32 @op_write1(i32 31)
ret void
}

LLVM IR (-O2):
define void @op_enc_rra() {
%1 = tail call i32 @op_write1(i32 31)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_cache(int, char **);
int main(int argc, char *argv[]) {
  test_cache(argc, argv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <test_cache@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @test_cache(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int age = 19;
  int height = 67;
  printf("Age is %d \n", age);
  printf("Height is %d \n", height);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x13,-0x8(%rbp)
movl   $0x43,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xec6(%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    $0x13,%esi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x43,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"Age is %d \0A\00"
@.str.1 = [15 x i8] c"Height is %d \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 19)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 67)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/, int /*<<< orphan*/);
void version() {
  printf("'ga_nuc_region' in genome analysis tools version: %d.%d.%d\n", 1, 0,
         0);
  exit(0);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x1,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<version>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"'ga_nuc_region' in genome analysis tools version: %d.%d.%d\0A\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 0)
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [60 x i8] c"'ga_nuc_region' in genome analysis tools version: %d.%d.%d\0A\00"
define void @version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 0)
%2 = tail call i32 @exit(i32 0)
unreachable
}
void foo817() {}


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

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

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

LLVM IR (-O2):
define void @foo817() {
ret void
}
void caller_1_2_2_1_2_2_1() {}


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

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

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

LLVM IR (-O2):
define void @caller_1_2_2_1_2_2_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char, char, char);
int main(void) {
  int value;
  value = 0xAABBCCDD;
  printf("%#2x %#2x %#2x %#2x\n", *(char *)&value, *(((char *)&value) + 1),
         *(((char *)&value) + 2), *(((char *)&value) + 3));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xaabbccdd,-0x4(%rbp)
mov    -0x4(%rbp),%dl
mov    -0x3(%rbp),%cl
mov    -0x2(%rbp),%al
lea    0xed1(%rip),%rdi
movsbl %dl,%esi
movsbl %cl,%edx
movsbl %al,%ecx
movsbl -0x1(%rbp),%r8d
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    $0xffffffdd,%esi
mov    $0xffffffcc,%edx
mov    $0xffffffbb,%ecx
mov    $0xffffffaa,%r8d
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"%x %x %x %x\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 -1430532899, i32* %1
%2 = bitcast i32* %1 to i8*
%3 = load i8, i8* %2
%4 = bitcast i32* %1 to i8*
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
%7 = bitcast i32* %1 to i8*
%8 = getelementptr inbounds i8, i8* %7, i64 2
%9 = load i8, i8* %8
%10 = bitcast i32* %1 to i8*
%11 = getelementptr inbounds i8, i8* %10, i64 3
%12 = load i8, i8* %11
%13 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8 signext %3, i8 signext %6, i8 signext %9, i8 signext %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"%x %x %x %x\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8 signext -35, i8 signext -52, i8 signext -69, i8 signext -86)
ret i32 0
}
int main(void) {
  int i = 21, j;
  j = i--;
  return i + j;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x15,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 21, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
store i32 %5, i32* %2
store i32 %4, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = add nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
ret i32 41
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ checkInput(int *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int n;
  checkInput(&n);
  int i;
  for (i = 1; i <= n; i++) {
    printf("%d\n", i);
  }
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <checkInput@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1168 <main+0x48>
mov    -0xc(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <main+0x1f>
mov    0x2e71(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <checkInput@plt>
cmpl   $0x0,0x4(%rsp)
jle    1153 <main+0x33>
xor    %ebx,%ebx
lea    0xec2(%rip),%r14
xchg   %ax,%ax
add    $0x1,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmp    0x4(%rsp),%ebx
jl     1140 <main+0x20>
mov    0x2e86(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @checkInput(i32* %1)
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 1
br i1 %5, label %12, label %6
6: ; preds = %0, %6
%7 = phi i32 [ %9, %6 ], [ 1, %0 ]
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = add nuw nsw i32 %7, 1
%10 = load i32, i32* %1
%11 = icmp slt i32 %7, %10
br i1 %11, label %6, label %12
12: ; preds = %6, %0
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char const *, char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
FILE *k_fileopen(const char *Filename, const char *Mode) {
  FILE *fp;
  if (!(fp = fopen(Filename, Mode))) {
    fprintf(stderr, "Could not open file for %s: %s", Mode, Filename);
    exit(1);
  }
  return (fp);
}


x86 assembly (clang, -O0):
<k_fileopen>:
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   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1182 <k_fileopen+0x52>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xe8d(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<k_fileopen>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <fopen@plt>
test   %rax,%rax
je     114c <k_fileopen+0x1c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"Could not open file for %s: %s\00"
define i32* @k_fileopen(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32* @fopen(i8* %6, i8* %7)
store i32* %8, i32** %5
%9 = icmp ne i32* %8, null
br i1 %9, label %16, label %10
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i8*, i8** %4
%13 = load i8*, i8** %3
%14 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %13)
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %2
%17 = load i32*, i32** %5
ret i32* %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"Could not open file for %s: %s\00"
define noalias i32* @k_fileopen(i8* %0, i8* %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret i32* %3
}
/* Variables and functions */
double gsw_gibbs(int, int, int, double, double, double);
double gsw_rho_t_exact(double sa, double t, double p) {
  int n0, n1;
  n0 = 0;
  n1 = 1;
  return (1.e0 / gsw_gibbs(n0, n0, n1, sa, t, p));
}


x86 assembly (clang, -O0):
<gsw_rho_t_exact>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <gsw_gibbs@plt>
movaps %xmm0,%xmm1
movsd  0xea3(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsw_rho_t_exact>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <gsw_gibbs@plt>
movsd  0xed9(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @gsw_rho_t_exact(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
store i32 0, i32* %7
store i32 1, i32* %8
%9 = load i32, i32* %7
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = load double, double* %4
%13 = load double, double* %5
%14 = load double, double* %6
%15 = call double @gsw_gibbs(i32 %9, i32 %10, i32 %11, double %12, double %13, double %14)
%16 = fdiv double 1.000000e+00, %15
ret double %16
}

LLVM IR (-O2):
define double @gsw_rho_t_exact(double %0, double %1, double %2) {
%4 = tail call double @gsw_gibbs(i32 0, i32 0, i32 1, double %0, double %1, double %2)
%5 = fdiv double 1.000000e+00, %4
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
size_t ece_aesgcm_max_decrypted_length(uint32_t rs, size_t ciphertextLen) {
  (void)(rs);
  return ciphertextLen;
}


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

x86 assembly (clang, -O2):
<ece_aesgcm_max_decrypted_length>:
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @ece_aesgcm_max_decrypted_length(i32 %0, i64 returned %1) {
ret i64 %1
}
void cpu_caps_detect(void) {}


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

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

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

LLVM IR (-O2):
define void @cpu_caps_detect() {
ret void
}