xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ emit_adc(int, int);
int /*<<< orphan*/ emit_shrimm(int, int, int);
void emit_addc(int s, int t, int sr) {
  emit_shrimm(sr, 1, sr);
  emit_adc(s, t);
  emit_adc(sr, sr);
}


x86 assembly (clang, -O0):
<emit_addc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%edx
mov    $0x1,%esi
call   1030 <emit_shrimm@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <emit_adc@plt>
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <emit_adc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_addc>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
mov    %edx,%edi
mov    $0x1,%esi
call   1030 <emit_shrimm@plt>
mov    %ebp,%edi
mov    %r14d,%esi
call   1040 <emit_adc@plt>
mov    %ebx,%edi
mov    %ebx,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <emit_adc@plt>

LLVM IR (-O0):
define void @emit_addc(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* %6
%8 = load i32, i32* %6
%9 = call i32 @emit_shrimm(i32 %7, i32 1, i32 %8)
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = call i32 @emit_adc(i32 %10, i32 %11)
%13 = load i32, i32* %6
%14 = load i32, i32* %6
%15 = call i32 @emit_adc(i32 %13, i32 %14)
ret void
}

LLVM IR (-O2):
define void @emit_addc(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @emit_shrimm(i32 %2, i32 1, i32 %2)
%5 = tail call i32 @emit_adc(i32 %0, i32 %1)
%6 = tail call i32 @emit_adc(i32 %2, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void check(char *a, char *b, int N) {
  int i;
  for (i = 0; i < N; i++)
    if (a[i] != b[i])
      abort();
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1170 <check+0x60>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     115d <check+0x4d>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1162 <check+0x52>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <check+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
push   %rax
test   %edx,%edx
jle    1132 <check+0x22>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax)
movzbl (%rdi,%rcx,1),%edx
cmp    (%rsi,%rcx,1),%dl
jne    1134 <check+0x24>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1120 <check+0x10>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ __softboundmpx_store_return_metadata(struct tm *, char *);
struct tm *localtime(int /*<<< orphan*/ const *);
__attribute__((__weak__, __always___)) struct tm *
softboundmpx_localtime(const time_t *timep) {
  struct tm *ret_ptr = localtime(timep);
  __softboundmpx_store_return_metadata(ret_ptr,
                                       (char *)ret_ptr + sizeof(struct tm));
  return ret_ptr;
}


x86 assembly (clang, -O0):
<softboundmpx_localtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x4,%rsi
call   1040 <__softboundmpx_store_return_metadata@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_localtime>:
push   %rbx
call   1030 <localtime@plt>
mov    %rax,%rbx
lea    0x4(%rax),%rsi
mov    %rax,%rdi
call   1040 <__softboundmpx_store_return_metadata@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define weak %struct.tm* @softboundmpx_localtime(i32* %0) {
%2 = alloca i32*
%3 = alloca %struct.tm*
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call %struct.tm* @localtime(i32* %4)
store %struct.tm* %5, %struct.tm** %3
%6 = load %struct.tm*, %struct.tm** %3
%7 = load %struct.tm*, %struct.tm** %3
%8 = bitcast %struct.tm* %7 to i8*
%9 = getelementptr inbounds i8, i8* %8, i64 4
%10 = call i32 @__softboundmpx_store_return_metadata(%struct.tm* %6, i8* %9)
%11 = load %struct.tm*, %struct.tm** %3
ret %struct.tm* %11
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define weak %struct.tm* @softboundmpx_localtime(i32* %0) {
%2 = tail call %struct.tm* @localtime(i32* %0)
%3 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 1
%4 = bitcast %struct.tm* %3 to i8*
%5 = tail call i32 @__softboundmpx_store_return_metadata(%struct.tm* %2, i8* %4)
ret %struct.tm* %2
}
char *lookup_state(char *state_char) {
  char *state;
  state = "UNKNOWN";
  if (state_char) {
    switch (state_char[0]) {
    case 'A':
      state = "ALLOCATED";
      break;
    case 'F':
      state = "FREE";
      break;
    }
  }
  return (state);
}


x86 assembly (clang, -O0):
<lookup_state>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1167 <lookup_state+0x67>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
sub    $0x41,%eax
je     1147 <lookup_state+0x47>
jmp    1136 <lookup_state+0x36>
mov    -0x14(%rbp),%eax
sub    $0x46,%eax
je     1157 <lookup_state+0x57>
jmp    1162 <lookup_state+0x62>
lea    0xeba(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1162 <lookup_state+0x62>
lea    0xeb4(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1167 <lookup_state+0x67>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lookup_state>:
test   %rdi,%rdi
je     1129 <lookup_state+0x29>
mov    (%rdi),%al
cmp    $0x46,%al
lea    0xf02(%rip),%rcx
lea    0xee9(%rip),%rdx
cmove  %rcx,%rdx
cmp    $0x41,%al
lea    0xee4(%rip),%rax
cmovne %rdx,%rax
ret
lea    0xed0(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"UNKNOWN\00"
@.str.1 = [10 x i8] c"ALLOCATED\00"
@.str.2 = [5 x i8] c"FREE\00"
define i8* @lookup_state(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
switch i32 %10, label %13 [
i32 65, label %11
i32 70, label %12
]
11: ; preds = %6
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %13
12: ; preds = %6
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %13
13: ; preds = %6, %12, %11
br label %14
14: ; preds = %13, %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [8 x i8] c"UNKNOWN\00"
@.str.1 = [10 x i8] c"ALLOCATED\00"
@.str.2 = [5 x i8] c"FREE\00"
define i8* @lookup_state(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 70
%6 = select i1 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
%7 = icmp eq i8 %4, 65
%8 = select i1 %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %6
br label %9
9: ; preds = %3, %1
%10 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %1 ], [ %8, %3 ]
ret i8* %10
}
/* Type definitions */
typedef int uint_fast32_t;
typedef scalar_t__ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t BigEndianReadU32(const uint8_t *bytes) {
  return (uint32_t)((uint_fast32_t)bytes[0] << 24 |
                    (uint_fast32_t)bytes[1] << 16 |
                    (uint_fast32_t)bytes[2] << 8 | (uint_fast32_t)bytes[3]);
}


x86 assembly (clang, -O0):
<BigEndianReadU32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x18(%rcx),%rcx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BigEndianReadU32>:
mov    (%rdi),%eax
mov    0x8(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x10(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0x18(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @BigEndianReadU32(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 0
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 24
%8 = load i64*, i64** %2
%9 = getelementptr inbounds i64, i64* %8, i64 1
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = shl i32 %11, 16
%13 = or i32 %7, %12
%14 = load i64*, i64** %2
%15 = getelementptr inbounds i64, i64* %14, i64 2
%16 = load i64, i64* %15
%17 = trunc i64 %16 to i32
%18 = shl i32 %17, 8
%19 = or i32 %13, %18
%20 = load i64*, i64** %2
%21 = getelementptr inbounds i64, i64* %20, i64 3
%22 = load i64, i64* %21
%23 = trunc i64 %22 to i32
%24 = or i32 %19, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @BigEndianReadU32(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32
%4 = shl i32 %3, 24
%5 = getelementptr inbounds i64, i64* %0, i64 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i64, i64* %0, i64 2
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i64, i64* %0, i64 3
%16 = load i64, i64* %15
%17 = trunc i64 %16 to i32
%18 = or i32 %14, %17
ret i32 %18
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void USBHostEndpointDataAck(uint32_t ui32Base, uint32_t ui32Endpoint) {
  ;

  ;
  if (ui32Endpoint == 0x00000000) {
    (*((volatile unsigned char *)(ui32Base + 0x00000102))) &= ~0x00000001;
  } else {
    (*((volatile unsigned char *)(ui32Base + 0x00000116 +
                                  (ui32Endpoint - 0x10)))) &= ~(0x00000001);
  }
}


x86 assembly (clang, -O0):
<USBHostEndpointDataAck>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    112d <USBHostEndpointDataAck+0x2d>
mov    -0x4(%rbp),%eax
add    $0x102,%eax
cltq
mov    (%rax),%cl
movzbl %cl,%ecx
and    $0xfffffffe,%ecx
mov    %cl,(%rax)
jmp    1149 <USBHostEndpointDataAck+0x49>
mov    -0x4(%rbp),%eax
add    $0x116,%eax
mov    -0x8(%rbp),%ecx
sub    $0x10,%ecx
add    %ecx,%eax
cltq
mov    (%rax),%cl
movzbl %cl,%ecx
and    $0xfffffffe,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBHostEndpointDataAck>:
lea    0x102(%rdi),%eax
test   %esi,%esi
lea    0x106(%rdi,%rsi,1),%ecx
cmove  %eax,%ecx
movslq %ecx,%rax
andb   $0xfe,(%rax)
ret

LLVM IR (-O0):
define void @USBHostEndpointDataAck(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %16
7: ; preds = %2
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 258
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
%12 = load volatile i8, i8* %11
%13 = zext i8 %12 to i32
%14 = and i32 %13, -2
%15 = trunc i32 %14 to i8
store volatile i8 %15, i8* %11
br label %28
16: ; preds = %2
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 278
%19 = load i32, i32* %4
%20 = sub nsw i32 %19, 16
%21 = add nsw i32 %18, %20
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to i8*
%24 = load volatile i8, i8* %23
%25 = zext i8 %24 to i32
%26 = and i32 %25, -2
%27 = trunc i32 %26 to i8
store volatile i8 %27, i8* %23
br label %28
28: ; preds = %16, %7
ret void
}

LLVM IR (-O2):
define void @USBHostEndpointDataAck(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = add i32 %0, 262
%5 = add i32 %4, %1
%6 = add nsw i32 %0, 258
%7 = select i1 %3, i32 %6, i32 %5
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
%10 = load volatile i8, i8* %9
%11 = and i8 %10, -2
store volatile i8 %11, i8* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(stderr, "usage:  %s [stream|dgram] port\n", progname);
  exit(1);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"usage: %s [stream|dgram] port\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
size_t max_bytes(size_t byte_count) { return (byte_count * 8 + 7 - 1) / 7; }


x86 assembly (clang, -O0):
<max_bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x3,%rax
add    $0x7,%rax
sub    $0x1,%rax
mov    $0x7,%ecx
xor    %edx,%edx
div    %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_bytes>:
lea    0x6(,%rdi,8),%rcx
movabs $0x2492492492492493,%rdx
49 92 24
mov    %rcx,%rax
mul    %rdx
sub    %rdx,%rcx
shr    %rcx
add    %rdx,%rcx
shr    $0x2,%rcx
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @max_bytes(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 %3, 8
%5 = add i64 %4, 7
%6 = sub i64 %5, 1
%7 = udiv i64 %6, 7
ret i64 %7
}

LLVM IR (-O2):
define i64 @max_bytes(i64 %0) {
%2 = shl i64 %0, 3
%3 = or i64 %2, 6
%4 = udiv i64 %3, 7
ret i64 %4
}
void glBlendFuncSeparate(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glBlendFuncSeparate() {
ret void
}
int is_within_JIS8(unsigned char uc) {
  int isin = 0;
  if ((uc >= 0x00 && uc <= 0x7F) || (uc >= 0xA0 && uc <= 0xDF)) {
    isin = 1;
  }
  return (isin);
}


x86 assembly (clang, -O0):
<is_within_JIS8>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jl     112b <is_within_JIS8+0x2b>
movzbl -0x1(%rbp),%eax
cmp    $0x7f,%eax
jle    1149 <is_within_JIS8+0x49>
movzbl -0x1(%rbp),%eax
cmp    $0xa0,%eax
jl     1150 <is_within_JIS8+0x50>
movzbl -0x1(%rbp),%eax
cmp    $0xdf,%eax
jg     1150 <is_within_JIS8+0x50>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_within_JIS8>:
test   %dil,%dil
setns  %al
add    $0x60,%dil
cmp    $0x40,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @is_within_JIS8(i8 zeroext %0) {
%2 = icmp sgt i8 %0, -1
%3 = add i8 %0, 96
%4 = icmp ult i8 %3, 64
%5 = or i1 %2, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(void) {
  int c;
  while ((c = getchar()) != EOF)
    if (c != 13)
      putchar(c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     115f <main+0x3f>
cmpl   $0xd,-0x8(%rbp)
je     115a <main+0x3a>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
jmp    1147 <main+0x27>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
je     1159 <main+0x39>
cmp    $0xd,%eax
je     1140 <main+0x20>
mov    %eax,%edi
call   1030 <putchar@plt>
jmp    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %9
%5 = phi i32 [ %10, %9 ], [ %1, %0 ]
%6 = icmp eq i32 %5, 13
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @putchar(i32 %5)
br label %9
9: ; preds = %7, %4
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %9, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SetTime(int);
int allStop(int seq) {
  SetTime(50);
  return 1;
}


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

x86 assembly (clang, -O2):
<allStop>:
push   %rax
mov    $0x32,%edi
call   1030 <SetTime@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @allStop(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @SetTime(i32 50)
ret i32 1
}

LLVM IR (-O2):
define i32 @allStop(i32 %0) {
%2 = tail call i32 @SetTime(i32 50)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freeMemory(void *p) { free(p); }


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

x86 assembly (clang, -O2):
<freeMemory>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freeMemory(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ bubbleSort(int *, int);
int /*<<< orphan*/ printArray(int *, int);
int /*<<< orphan*/ printf(char *);
int main() {
  int array[] = {89, 32, 20, 113, -15};
  int size = sizeof(array) / sizeof(array[0]);
  bubbleSort(array, size);
  printf("Sorted array: ");
  printArray(array, size);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb5(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x5,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1040 <bubbleSort@plt>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1050 <printArray@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0xed5(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xeba(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <bubbleSort@plt>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1050 <printArray@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.array = [5 x i32] [i32 89, i32 32, i32 20, i32 113, i32 -15]
@.str = [15 x i8] c"Sorted array: \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [5 x i32]* %2 to i8*
store i32 5, i32* %3
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %3
%7 = call i32 @bubbleSort(i32* %5, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%9 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%10 = load i32, i32* %3
%11 = call i32 @printArray(i32* %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array = [5 x i32] [i32 89, i32 32, i32 20, i32 113, i32 -15]
@.str = [15 x i8] c"Sorted array: \00"
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @bubbleSort(i32* %3, i32 5)
%5 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printArray(i32* %3, i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ process_can(int);
void CAN2_TX_IRQ_Handler(void) { process_can(1); }


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

x86 assembly (clang, -O2):
<CAN2_TX_IRQ_Handler>:
mov    $0x1,%edi
jmp    1030 <process_can@plt>

LLVM IR (-O0):
define void @CAN2_TX_IRQ_Handler() {
%1 = call i32 @process_can(i32 1)
ret void
}

LLVM IR (-O2):
define void @CAN2_TX_IRQ_Handler() {
%1 = tail call i32 @process_can(i32 1)
ret void
}
/* Variables and functions */
double exp(double);
double ThresholdPenalty(double tpf1, double tpf2, double timeprop) {
  if (tpf2 < 0)
    return (tpf1);
  return (tpf1 * exp(tpf2 * timeprop));
}


x86 assembly (clang, -O0):
<ThresholdPenalty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1144 <ThresholdPenalty+0x34>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    116e <ThresholdPenalty+0x5e>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ThresholdPenalty>:
movapd %xmm0,%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
ja     113e <ThresholdPenalty+0x2e>
push   %rax
mulsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
movsd  %xmm3,(%rsp)
call   1030 <exp@plt>
movsd  (%rsp),%xmm3
mulsd  %xmm0,%xmm3
add    $0x8,%rsp
movapd %xmm3,%xmm0
ret

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

LLVM IR (-O2):
define double @ThresholdPenalty(double %0, double %1, double %2) {
%4 = fcmp olt double %1, 0.000000e+00
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = fmul double %1, %2
%7 = tail call double @exp(double %6)
%8 = fmul double %7, %0
br label %9
9: ; preds = %3, %5
%10 = phi double [ %8, %5 ], [ %0, %3 ]
ret double %10
}
int GoapNoCost(const struct Agent *_Agent) { return 1; }


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

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

LLVM IR (-O0):
%struct.Agent = type opaque
define i32 @GoapNoCost(%struct.Agent* %0) {
%2 = alloca %struct.Agent*
store %struct.Agent* %0, %struct.Agent** %2
ret i32 1
}

LLVM IR (-O2):
%struct.Agent = type opaque
define i32 @GoapNoCost(%struct.Agent* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
struct trad_pkware {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct trad_pkware *);
void pkware_free(struct trad_pkware *ctx) { free(ctx); }


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

x86 assembly (clang, -O2):
<pkware_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.trad_pkware = type { i32 }
define void @pkware_free(%struct.trad_pkware* nocapture %0) {
%2 = tail call i32 @free(%struct.trad_pkware* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void ft_generic(void) { write(1, "Tu tu tu tu ; Tu tu tu tu\n", 26); }


x86 assembly (clang, -O0):
<ft_generic>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
mov    $0x1a,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_generic>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
mov    $0x1a,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Tu tu tu tu ; Tu tu tu tu\0A\00"
define void @ft_generic() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 26)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Tu tu tu tu ; Tu tu tu tu\0A\00"
define void @ft_generic() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 26)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
testTimes() { printf("%d * %d = %d\n", 10, 4, 10 * 4); }


x86 assembly (clang, -O0):
<testTimes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    $0xa,%esi
mov    $0x4,%edx
mov    $0x28,%ecx
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testTimes>:
lea    0xee9(%rip),%rdi
mov    $0xa,%esi
mov    $0x4,%edx
mov    $0x28,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"%d * %d = %d\0A\00"
define i32 @testTimes() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 10, i32 4, i32 40)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [14 x i8] c"%d * %d = %d\0A\00"
define i32 @testTimes() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 10, i32 4, i32 40)
ret i32 undef
}
/* Type definitions */
struct forf_env {
  int dummy;
};

/* Variables and functions */
long forf_pop_num(struct forf_env *);
int /*<<< orphan*/ forf_push_num(struct forf_env *, int);
void forf_proc_not(struct forf_env *env) {
  long a = forf_pop_num(env);
  forf_push_num(env, !a);
}


x86 assembly (clang, -O0):
<forf_proc_not>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <forf_pop_num@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
cmpq   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
call   1040 <forf_push_num@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forf_proc_not>:
push   %rbx
mov    %rdi,%rbx
call   1030 <forf_pop_num@plt>
xor    %esi,%esi
test   %rax,%rax
sete   %sil
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <forf_push_num@plt>

LLVM IR (-O0):
%struct.forf_env = type { i32 }
define void @forf_proc_not(%struct.forf_env* %0) {
%2 = alloca %struct.forf_env*
%3 = alloca i64
store %struct.forf_env* %0, %struct.forf_env** %2
%4 = load %struct.forf_env*, %struct.forf_env** %2
%5 = call i64 @forf_pop_num(%struct.forf_env* %4)
store i64 %5, i64* %3
%6 = load %struct.forf_env*, %struct.forf_env** %2
%7 = load i64, i64* %3
%8 = icmp ne i64 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
%11 = call i32 @forf_push_num(%struct.forf_env* %6, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.forf_env = type { i32 }
define void @forf_proc_not(%struct.forf_env* %0) {
%2 = tail call i64 @forf_pop_num(%struct.forf_env* %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @forf_push_num(%struct.forf_env* %0, i32 %4)
ret void
}
int cmp(const void *a, const void *b) {
  if (*(int *)a == *(int *)b)
    return 0;
  if (*(int *)a > *(int *)b)
    return 1;
  return -1;
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jne    112a <cmp+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    114f <cmp+0x4f>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    1148 <cmp+0x48>
movl   $0x1,-0x4(%rbp)
jmp    114f <cmp+0x4f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
mov    (%rdi),%eax
xor    %ecx,%ecx
xor    %edx,%edx
cmp    (%rsi),%eax
setg   %dl
lea    -0x1(%rdx,%rdx,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
%8 = icmp sgt i32 %4, %6
%9 = select i1 %8, i32 1, i32 -1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ pic_bulk_erase();
scalar_t__ pic_read_config();
int /*<<< orphan*/ stk500v2_cleanup();
int /*<<< orphan*/ stk500v2_failed();
int /*<<< orphan*/ stk500v2_ok();
void stk500v2_chip_erase_isp(void) {
  ;
  stk500v2_cleanup();
  if (pic_read_config() == 0) {
    pic_bulk_erase();
    stk500v2_ok();
    return;
  }
  stk500v2_failed();
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <stk500v2_cleanup@plt>
mov    $0x0,%al
call   1030 <pic_read_config@plt>
cmp    $0x0,%rax
jne    117f <stk500v2_chip_erase_isp+0x2f>
mov    $0x0,%al
call   1070 <pic_bulk_erase@plt>
mov    $0x0,%al
call   1040 <stk500v2_ok@plt>
jmp    1186 <stk500v2_chip_erase_isp+0x36>
mov    $0x0,%al
call   1050 <stk500v2_failed@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
xor    %eax,%eax
call   1060 <stk500v2_cleanup@plt>
xor    %eax,%eax
call   1030 <pic_read_config@plt>
test   %rax,%rax
je     116c <stk500v2_chip_erase_isp+0x1c>
xor    %eax,%eax
pop    %rcx
jmp    1050 <stk500v2_failed@plt>
xor    %eax,%eax
call   1070 <pic_bulk_erase@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <stk500v2_ok@plt>

LLVM IR (-O0):
define void @stk500v2_chip_erase_isp() {
%1 = call i32 (...) @stk500v2_cleanup()
%2 = call i64 (...) @pic_read_config()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = call i32 (...) @pic_bulk_erase()
%6 = call i32 (...) @stk500v2_ok()
br label %9
7: ; preds = %0
%8 = call i32 (...) @stk500v2_failed()
br label %9
9: ; preds = %7, %4
ret void
}

LLVM IR (-O2):
define void @stk500v2_chip_erase_isp() {
%1 = tail call i32 (...) @stk500v2_cleanup()
%2 = tail call i64 (...) @pic_read_config()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = tail call i32 (...) @pic_bulk_erase()
%6 = tail call i32 (...) @stk500v2_ok()
br label %9
7: ; preds = %0
%8 = tail call i32 (...) @stk500v2_failed()
br label %9
9: ; preds = %7, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kill();
void foo(unsigned int arg) {
  int a = arg - 3;
  unsigned int b = 4;
  int x = 0x1 << arg;
  if (a < 0)
    b = x;
  if (b >= 5)
    kill();
  ;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1148 <foo+0x38>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jb     1159 <foo+0x49>
mov    $0x0,%al
call   1030 <kill@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x80000003,%edi
jb     111f <foo+0xf>
xor    %eax,%eax
jmp    1030 <kill@plt>
ret

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = sub i32 %6, 3
store i32 %7, i32* %3
store i32 4, i32* %4
%8 = load i32, i32* %2
%9 = shl i32 1, %8
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %1
%13 = load i32, i32* %5
store i32 %13, i32* %4
br label %14
14: ; preds = %12, %1
%15 = load i32, i32* %4
%16 = icmp uge i32 %15, 5
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 (...) @kill()
br label %19
19: ; preds = %17, %14
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = icmp ugt i32 %0, -2147483646
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @kill()
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ out(char *);
int cmd_ping(void) {
  ;
  out("pong\n");
  return 1;
}


x86 assembly (clang, -O0):
<cmd_ping>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <out@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_ping>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <out@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"pong\0A\00"
define i32 @cmd_ping() {
%1 = call i32 @out(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [6 x i8] c"pong\0A\00"
define i32 @cmd_ping() {
%1 = tail call i32 @out(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int abs(int);
int pow(double, double);
int solution2() {
  int range, sum_of_naturals_squared, square_of_the_sum;
  range = 100 - 1 + 1;
  sum_of_naturals_squared = (range * (range + 1) * (2 * range + 1)) / 6;
  square_of_the_sum = pow((double)((100 + 1) * (100 - 1 + 1) / 2), (double)2);
  return abs(sum_of_naturals_squared - square_of_the_sum);
}


x86 assembly (clang, -O0):
<solution2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x64,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
movsd  0xea6(%rip),%xmm0
movsd  0xea6(%rip),%xmm1
call   1040 <pow@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <abs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solution2>:
push   %rax
movsd  0xee7(%rip),%xmm0
movsd  0xee7(%rip),%xmm1
call   1030 <pow@plt>
mov    $0x529ae,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
neg    %eax
cmovs  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solution2() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 100, i32* %1
%4 = load i32, i32* %1
%5 = load i32, i32* %1
%6 = add nsw i32 %5, 1
%7 = mul nsw i32 %4, %6
%8 = load i32, i32* %1
%9 = mul nsw i32 2, %8
%10 = add nsw i32 %9, 1
%11 = mul nsw i32 %7, %10
%12 = sdiv i32 %11, 6
store i32 %12, i32* %2
%13 = call i32 @pow(double 5.050000e+03, double 2.000000e+00)
store i32 %13, i32* %3
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = sub nsw i32 %14, %15
%17 = call i32 @abs(i32 %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @solution2() {
%1 = tail call i32 @pow(double 5.050000e+03, double 2.000000e+00)
%2 = sub nsw i32 338350, %1
%3 = tail call i32 @llvm.abs.i32(i32 %2, i1 true)
ret i32 %3
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
int fstat(int, struct stat *);
int fsize(int fd) {
  struct stat stat;
  int res = fstat(fd, &stat);
  return stat.st_size;
}


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

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

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @fsize(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.stat
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @fstat(i32 %5, %struct.stat* %3)
store i32 %6, i32* %4
%7 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @fsize(i32 %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @fstat(i32 %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}
/* Variables and functions */
double ceil(int /*<<< orphan*/);
int /*<<< orphan*/ fabs(double);
double lr_ceil0(double value, double rf) {
  double result;
  result = ceil(fabs(value * rf)) / rf;
  if (value < 0.0)
    return -result;
  return result;
}


x86 assembly (clang, -O0):
<lr_ceil0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
call   1040 <fabs@plt>
mov    %eax,%edi
call   1030 <ceil@plt>
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1186 <lr_ceil0+0x66>
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1190 <lr_ceil0+0x70>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lr_ceil0>:
sub    $0x28,%rsp
movsd  %xmm1,0x8(%rsp)
movapd %xmm0,0x10(%rsp)
mulsd  %xmm1,%xmm0
call   1040 <fabs@plt>
mov    %eax,%edi
call   1030 <ceil@plt>
divsd  0x8(%rsp),%xmm0
movapd 0xeb2(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
movapd 0x10(%rsp),%xmm3
cmpltsd %xmm2,%xmm3
movapd %xmm3,%xmm2
andnpd %xmm0,%xmm2
andpd  %xmm1,%xmm3
orpd   %xmm2,%xmm3
movapd %xmm3,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @lr_ceil0(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fmul double %7, %8
%10 = call i32 @fabs(double %9)
%11 = call double @ceil(i32 %10)
%12 = load double, double* %5
%13 = fdiv double %11, %12
store double %13, double* %6
%14 = load double, double* %4
%15 = fcmp olt double %14, 0.000000e+00
br i1 %15, label %16, label %19
16: ; preds = %2
%17 = load double, double* %6
%18 = fneg double %17
store double %18, double* %3
br label %21
19: ; preds = %2
%20 = load double, double* %6
store double %20, double* %3
br label %21
21: ; preds = %19, %16
%22 = load double, double* %3
ret double %22
}

LLVM IR (-O2):
define double @lr_ceil0(double %0, double %1) {
%3 = fmul double %0, %1
%4 = tail call i32 @fabs(double %3)
%5 = tail call double @ceil(i32 %4)
%6 = fdiv double %5, %1
%7 = fcmp olt double %0, 0.000000e+00
%8 = fneg double %6
%9 = select i1 %7, double %8, double %6
ret double %9
}
/* Variables and functions */
scalar_t__ pv_getnum_ll(char *);
int pv_getnum_i(char *str) { return (int)pv_getnum_ll(str); }


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

x86 assembly (clang, -O2):
<pv_getnum_i>:
jmp    1030 <pv_getnum_ll@plt>

LLVM IR (-O0):
define i32 @pv_getnum_i(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @pv_getnum_ll(i8* %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @pv_getnum_i(i8* %0) {
%2 = tail call i64 @pv_getnum_ll(i8* %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef unsigned int uint32_t;

/* Variables and functions */
unsigned int strtoul(char const *, char **, int);
bool parse_uint(unsigned int *dst, const char *src) {
  char *endPtr;
  uint32_t x = strtoul(src, &endPtr, 10);
  if (endPtr == src || *endPtr != '\0') {
    *dst = 0;
    return false;
  }
  *dst = x;
  return true;
}


x86 assembly (clang, -O0):
<parse_uint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     1153 <parse_uint+0x43>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1169 <parse_uint+0x59>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    1179 <parse_uint+0x69>
mov    -0x24(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_uint>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsp,%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    (%rsp),%rsi
cmp    %rbx,%rsi
je     1144 <parse_uint+0x34>
mov    %eax,%ecx
xor    %edx,%edx
xor    %eax,%eax
cmpb   $0x0,(%rsi)
sete   %al
cmove  %ecx,%edx
jmp    1148 <parse_uint+0x38>
xor    %edx,%edx
xor    %eax,%eax
mov    %edx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @parse_uint(i32* nocapture writeonly %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i32 @strtoul(i8* %1, i8** %3, i32 10)
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, %1
br i1 %7, label %13, label %8
8: ; preds = %2
%9 = load i8, i8* %6
%10 = icmp eq i8 %9, 0
%11 = select i1 %10, i32 %5, i32 0
%12 = zext i1 %10 to i32
br label %13
13: ; preds = %8, %2
%14 = phi i32 [ 0, %2 ], [ %11, %8 ]
%15 = phi i32 [ 0, %2 ], [ %12, %8 ]
store i32 %14, i32* %0
ret i32 %15
}
/* Type definitions */
struct ofpbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *ofpbuf_put_uninit(struct ofpbuf *, size_t);
void *ofpbuf_put_zeros(struct ofpbuf *b, size_t size) {
  void *dst = ofpbuf_put_uninit(b, size);
  memset(dst, 0, size);
  return dst;
}


x86 assembly (clang, -O0):
<ofpbuf_put_zeros>:
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 <ofpbuf_put_uninit@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ofpbuf_put_zeros>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <ofpbuf_put_uninit@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.ofpbuf = type { i32 }
define i8* @ofpbuf_put_zeros(%struct.ofpbuf* %0, i64 %1) {
%3 = alloca %struct.ofpbuf*
%4 = alloca i64
%5 = alloca i8*
store %struct.ofpbuf* %0, %struct.ofpbuf** %3
store i64 %1, i64* %4
%6 = load %struct.ofpbuf*, %struct.ofpbuf** %3
%7 = load i64, i64* %4
%8 = call i8* @ofpbuf_put_uninit(%struct.ofpbuf* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i64, i64* %4
%11 = call i32 @memset(i8* %9, i32 0, i64 %10)
%12 = load i8*, i8** %5
ret i8* %12
}

LLVM IR (-O2):
%struct.ofpbuf = type { i32 }
define i8* @ofpbuf_put_zeros(%struct.ofpbuf* %0, i64 %1) {
%3 = tail call i8* @ofpbuf_put_uninit(%struct.ofpbuf* %0, i64 %1)
%4 = tail call i32 @memset(i8* %3, i32 0, i64 %1)
ret i8* %3
}