xunge/DecIR huggingface dataset:
unsigned long long int rnd16(unsigned long long int x) {
  if (x == 0) {
    x = 1;
  } else {
    x ^= x << 13 & 0xffffULL;
    x ^= x >> 9 & 0xffffULL;
    x ^= x << 7 & 0xffffULL;
    if (x == 1)
      x = 0;
  }
  return x;
}


x86 assembly (clang, -O0):
<rnd16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1120 <rnd16+0x20>
movq   $0x1,-0x8(%rbp)
jmp    117a <rnd16+0x7a>
mov    -0x8(%rbp),%rax
shl    $0xd,%rax
and    $0xffff,%rax
xor    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x9,%rax
and    $0xffff,%rax
xor    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x7,%rax
and    $0xffff,%rax
xor    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x1,-0x8(%rbp)
jne    1175 <rnd16+0x75>
movq   $0x0,-0x8(%rbp)
jmp    117a <rnd16+0x7a>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd16>:
test   %rdi,%rdi
je     1131 <rnd16+0x31>
mov    %edi,%eax
shl    $0xd,%eax
movzwl %ax,%eax
xor    %rdi,%rax
mov    %eax,%ecx
shr    $0x9,%ecx
movzwl %cx,%ecx
xor    %rax,%rcx
mov    %ecx,%eax
shl    $0x7,%eax
movzwl %ax,%edx
xor    %rcx,%rdx
xor    %eax,%eax
cmp    $0x1,%rdx
cmovne %rdx,%rax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i64 @rnd16(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
store i64 1, i64* %2
br label %26
6: ; preds = %1
%7 = load i64, i64* %2
%8 = shl i64 %7, 13
%9 = and i64 %8, 65535
%10 = load i64, i64* %2
%11 = xor i64 %10, %9
store i64 %11, i64* %2
%12 = load i64, i64* %2
%13 = lshr i64 %12, 9
%14 = and i64 %13, 65535
%15 = load i64, i64* %2
%16 = xor i64 %15, %14
store i64 %16, i64* %2
%17 = load i64, i64* %2
%18 = shl i64 %17, 7
%19 = and i64 %18, 65535
%20 = load i64, i64* %2
%21 = xor i64 %20, %19
store i64 %21, i64* %2
%22 = load i64, i64* %2
%23 = icmp eq i64 %22, 1
br i1 %23, label %24, label %25
24: ; preds = %6
store i64 0, i64* %2
br label %25
25: ; preds = %24, %6
br label %26
26: ; preds = %25, %5
%27 = load i64, i64* %2
ret i64 %27
}

LLVM IR (-O2):
define i64 @rnd16(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = shl i64 %0, 13
%5 = and i64 %4, 57344
%6 = xor i64 %5, %0
%7 = lshr i64 %6, 9
%8 = and i64 %7, 65535
%9 = xor i64 %8, %6
%10 = shl i64 %9, 7
%11 = and i64 %10, 65408
%12 = xor i64 %11, %9
%13 = icmp eq i64 %12, 1
%14 = select i1 %13, i64 0, i64 %12
br label %15
15: ; preds = %1, %3
%16 = phi i64 [ %14, %3 ], [ 1, %1 ]
ret i64 %16
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int sn = 0;
  unsigned int x = 0;
  while (1) {
    sn = sn + (2);
    x++;
    assert(sn == x * (2) || sn == 0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%edx
shl    $0x1,%edx
mov    $0x1,%al
cmp    %edx,%ecx
mov    %al,-0xd(%rbp)
je     115f <main+0x4f>
cmpl   $0x0,-0x8(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
jmp    112d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <assert@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %0, %16
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 2
store i32 %6, i32* %2
%7 = load i32, i32* %3
%8 = add i32 %7, 1
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = mul i32 %10, 2
%12 = icmp eq i32 %9, %11
br i1 %12, label %16, label %13
13: ; preds = %4
%14 = load i32, i32* %2
%15 = icmp eq i32 %14, 0
br label %16
16: ; preds = %13, %4
%17 = phi i1 [ true, %4 ], [ %15, %13 ]
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
br label %4
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @assert(i32 1)
br label %1
}
void ble_rsp_hardware_i2c_write(
    const struct ble_msg_hardware_i2c_write_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_hardware_i2c_write_rsp_t = type opaque
define void @ble_rsp_hardware_i2c_write(%struct.ble_msg_hardware_i2c_write_rsp_t* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ XMapEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XMapEvent(void *_p) {
  if (_p == NULL)
    abort();
  free((XMapEvent *)_p);
}


x86 assembly (clang, -O0):
<free_XMapEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XMapEvent+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XMapEvent>:
test   %rdi,%rdi
je     112a <free_XMapEvent+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XMapEvent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XMapEvent(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ halt();
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int);
void __attribute__((cdecl)) irq__mc(unsigned cs, unsigned ip) {
  printf("irq_"
         "_mc"
         "!%x:%x",
         cs, ip);
  halt();
}


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

x86 assembly (clang, -O2):
<irq__mc>:
push   %rax
mov    %esi,%edx
mov    %edi,%esi
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <halt@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"irq__mc!%x:%x\00"
define void @irq__mc(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = call i32 (...) @halt()
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"irq__mc!%x:%x\00"
define void @irq__mc(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = tail call i32 (...) @halt()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_command(int);
void test_read_local_version_information(const void *test_data) {
  test_command(0x1001);
}


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

x86 assembly (clang, -O2):
<test_read_local_version_information>:
mov    $0x1001,%edi
jmp    1030 <test_command@plt>

LLVM IR (-O0):
define void @test_read_local_version_information(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @test_command(i32 4097)
ret void
}

LLVM IR (-O2):
define void @test_read_local_version_information(i8* nocapture readnone %0) {
%2 = tail call i32 @test_command(i32 4097)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcmp(void const *, void const *, size_t);
bool cutils_cshm_StaticHashMap_void_ptr_and_void_ptr_compare(const void *item1,
                                                             const void *item2,
                                                             size_t item_size) {
  return !memcmp(item1, item2, item_size);
}


x86 assembly (clang, -O0):
<cutils_cshm_StaticHashMap_void_ptr_and_void_ptr_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutils_cshm_StaticHashMap_void_ptr_and_void_ptr_compare>:
push   %rax
call   1030 <bcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cutils_cshm_StaticHashMap_void_ptr_and_void_ptr_compare(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @memcmp(i8* %7, i8* %8, i64 %9)
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @cutils_cshm_StaticHashMap_void_ptr_and_void_ptr_compare(i8* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @bcmp(i8* %0, i8* %1, i64 %2)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
void upCopy(char *new, char *old) {
  for (; '\0' != *old; old++) {
    if (*old <= 'Z' && 'A' <= *old) {
      *new = *old;
      new ++;
    }
  }
}


x86 assembly (clang, -O0):
<upCopy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     116f <upCopy+0x6f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jg     1159 <upCopy+0x59>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
jg     1159 <upCopy+0x59>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    115e <upCopy+0x5e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <upCopy+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<upCopy>:
mov    (%rsi),%al
test   %al,%al
je     112b <upCopy+0x2b>
add    $0x1,%rsi
jmp    111b <upCopy+0x1b>
nopl   0x0(%rax)
movzbl (%rsi),%eax
add    $0x1,%rsi
test   %al,%al
je     112b <upCopy+0x2b>
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     1110 <upCopy+0x10>
mov    %al,(%rdi)
add    $0x1,%rdi
jmp    1110 <upCopy+0x10>
ret

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

LLVM IR (-O2):
define void @upCopy(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %18, label %5
5: ; preds = %2, %13
%6 = phi i8 [ %16, %13 ], [ %3, %2 ]
%7 = phi i8* [ %15, %13 ], [ %1, %2 ]
%8 = phi i8* [ %14, %13 ], [ %0, %2 ]
%9 = add i8 %6, -65
%10 = icmp ult i8 %9, 26
br i1 %10, label %11, label %13
11: ; preds = %5
store i8 %6, i8* %8
%12 = getelementptr inbounds i8, i8* %8, i64 1
br label %13
13: ; preds = %5, %11
%14 = phi i8* [ %12, %11 ], [ %8, %5 ]
%15 = getelementptr inbounds i8, i8* %7, i64 1
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %5
18: ; preds = %13, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ euParse_all();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("main\n");
  euParse_all();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <euParse_all@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [5 x i8] c"main\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @euParse_all()
ret i32 0
}
int dns_cache_pollfd(struct dns_cache *cache) { return -1; }


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

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

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

LLVM IR (-O2):
%struct.dns_cache = type opaque
define i32 @dns_cache_pollfd(%struct.dns_cache* nocapture readnone %0) {
ret i32 -1
}
int picksite(char *z, int l, int begin, int gap, char *result) {
  int il = begin;
  for (il = 0, z += begin; il < l; il += gap, z += gap)
    *result++ = *z;
  return (0);
}


x86 assembly (clang, -O0):
<picksite>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1175 <picksite+0x75>
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x20(%rbp)
mov    %cl,(%rax)
mov    -0x14(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1133 <picksite+0x33>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<picksite>:
test   %esi,%esi
jle    1122 <picksite+0x22>
movslq %edx,%rax
add    %rax,%rdi
movslq %ecx,%rax
xor    %ecx,%ecx
nop
movzbl (%rdi,%rcx,1),%edx
mov    %dl,(%r8)
add    $0x1,%r8
add    %rax,%rcx
cmp    %esi,%ecx
jl     1110 <picksite+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @picksite(i8* nocapture %0, i32 %1, i32 %2, i32 %3, i8* nocapture writeonly %4) {
%6 = icmp sgt i32 %1, 0
br i1 %6, label %7, label %20
7: ; preds = %5
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = sext i32 %3 to i64
br label %11
11: ; preds = %7, %11
%12 = phi i32 [ 0, %7 ], [ %17, %11 ]
%13 = phi i8* [ %4, %7 ], [ %16, %11 ]
%14 = phi i8* [ %9, %7 ], [ %18, %11 ]
%15 = load i8, i8* %14
%16 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %15, i8* %13
%17 = add nsw i32 %12, %3
%18 = getelementptr inbounds i8, i8* %14, i64 %10
%19 = icmp slt i32 %17, %1
br i1 %19, label %11, label %20
20: ; preds = %11, %5
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bar(char const *const);
int main() {
  static const char *const foo[] = {"foo" + 1};
  bar(foo[0]);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee9(%rip),%rdi
call   1030 <bar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"foo\00"
define i32 @main() {
%1 = tail call i32 @bar(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 1))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
int _pr_error(char const *message, int ret) {
  fputs("pr"
        ": ",
        stderr);
  perror(message);
  return ret;
}


x86 assembly (clang, -O0):
<_pr_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_pr_error>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
lea    0xec8(%rip),%rdi
call   1030 <fputs@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"pr: \00"
@stderr = global i32 0
define i32 @_pr_error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @perror(i8* %7)
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
@.str = [5 x i8] c"pr: \00"
@stderr = global i32 0
define i32 @_pr_error(i8* nocapture %0, i32 returned %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @perror(i8* %0)
ret i32 %1
}
/* Type definitions */
union i2c_smbus_data {
  int byte;
};
typedef int __s32;

/* Variables and functions */
scalar_t__ i2c_smbus_access(int, int, int, int, union i2c_smbus_data *);
extern __s32 i2c_smbus_read_byte_data(int fd, int cmd) {
  union i2c_smbus_data data;
  if (i2c_smbus_access(fd, 1, cmd, 2, &data) <= 0) {
    return -1;
  } else {
    return 0x0FF & data.byte;
  }
}


x86 assembly (clang, -O0):
<i2c_smbus_read_byte_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%edx
mov    $0x1,%esi
mov    $0x2,%ecx
lea    -0x10(%rbp),%r8
call   1030 <i2c_smbus_access@plt>
cmp    $0x0,%rax
jg     114d <i2c_smbus_read_byte_data+0x3d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1158 <i2c_smbus_read_byte_data+0x48>
mov    -0x10(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_smbus_read_byte_data>:
push   %rax
mov    %esi,%edx
mov    %rsp,%r8
mov    $0x1,%esi
mov    $0x2,%ecx
call   1030 <i2c_smbus_access@plt>
test   %rax,%rax
movzbl (%rsp),%ecx
mov    $0xffffffff,%eax
cmovg  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%union.i2c_smbus_data = type { i32 }
define i32 @i2c_smbus_read_byte_data(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca %union.i2c_smbus_data
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i64 @i2c_smbus_access(i32 %7, i32 1, i32 %8, i32 2, %union.i2c_smbus_data* %6)
%10 = icmp sle i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %16
12: ; preds = %2
%13 = bitcast %union.i2c_smbus_data* %6 to i32*
%14 = load i32, i32* %13
%15 = and i32 255, %14
store i32 %15, i32* %3
br label %16
16: ; preds = %12, %11
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
%union.i2c_smbus_data = type { i32 }
define i32 @i2c_smbus_read_byte_data(i32 %0, i32 %1) {
%3 = alloca %union.i2c_smbus_data
%4 = bitcast %union.i2c_smbus_data* %3 to i8*
%5 = call i64 @i2c_smbus_access(i32 %0, i32 1, i32 %1, i32 2, %union.i2c_smbus_data* %3)
%6 = icmp slt i64 %5, 1
%7 = getelementptr inbounds %union.i2c_smbus_data, %union.i2c_smbus_data* %3, i64 0, i32 0
%8 = load i32, i32* %7
%9 = and i32 %8, 255
%10 = select i1 %6, i32 -1, i32 %9
ret i32 %10
}
long myrandom(limit)
long limit;
{
  if (limit < 1)
    return (0);
  if (limit < 2)
    return (0);
  return (random() % limit);
}


x86 assembly (clang, -O0):
<myrandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x1,-0x10(%rbp)
jge    1134 <myrandom+0x24>
movq   $0x0,-0x8(%rbp)
jmp    115f <myrandom+0x4f>
cmpq   $0x2,-0x10(%rbp)
jge    114c <myrandom+0x3c>
movq   $0x0,-0x8(%rbp)
jmp    115f <myrandom+0x4f>
mov    $0x0,%al
call   1030 <random@plt>
cltq
cqto
idivq  -0x10(%rbp)
mov    %rdx,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myrandom>:
push   %rbx
cmp    $0x2,%rdi
jge    111b <myrandom+0xb>
xor    %eax,%eax
pop    %rbx
ret
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <random@plt>
movslq %eax,%rcx
mov    %rcx,%rdx
or     %rbx,%rdx
shr    $0x20,%rdx
je     1141 <myrandom+0x31>
mov    %rcx,%rax
cqto
idiv   %rbx
mov    %rdx,%rax
pop    %rbx
ret
xor    %edx,%edx
div    %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @myrandom(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp slt i64 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 0, i64* %2
br label %16
7: ; preds = %1
%8 = load i64, i64* %3
%9 = icmp slt i64 %8, 2
br i1 %9, label %10, label %11
10: ; preds = %7
store i64 0, i64* %2
br label %16
11: ; preds = %7
%12 = call i32 (...) @random()
%13 = sext i32 %12 to i64
%14 = load i64, i64* %3
%15 = srem i64 %13, %14
store i64 %15, i64* %2
br label %16
16: ; preds = %11, %10, %6
%17 = load i64, i64* %2
ret i64 %17
}

LLVM IR (-O2):
define i64 @myrandom(i64 %0) {
%2 = icmp slt i64 %0, 2
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 (...) @random()
%5 = sext i32 %4 to i64
%6 = srem i64 %5, %0
br label %7
7: ; preds = %1, %3
%8 = phi i64 [ %6, %3 ], [ 0, %1 ]
ret i64 %8
}
float fr_(float *const r) { return (3.14159); }


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

x86 assembly (clang, -O2):
<fr_>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @fr_(float* %0) {
%2 = alloca float*
store float* %0, float** %2
ret float 0x400921FA00000000
}

LLVM IR (-O2):
define float @fr_(float* nocapture readnone %0) {
ret float 0x400921FA00000000
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strrepchar(char *, char, char);
int main(int argc, char **argv) {
  char str[] = "1-2-3-4";
  printf("%s =>", str);
  strrepchar(str, '-', '_');
  printf(" %s\n", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x18(%rbp),%rsi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
lea    -0x18(%rbp),%rdi
mov    $0x2d,%esi
mov    $0x5f,%edx
call   1040 <strrepchar@plt>
lea    -0x18(%rbp),%rsi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x342d332d322d31,%rax
mov    %rax,0x8(%rsp)
lea    0xec5(%rip),%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2d,%esi
mov    $0x5f,%edx
call   1040 <strrepchar@plt>
lea    0xea5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%s =>\00"
@.str.1 = [5 x i8] c" %s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
store i64 14686396613799217, i64* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @strrepchar(i8* %4, i8 signext 45, i8 signext 95)
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int generic_test(char const *, char const *, int, int);
int /*<<< orphan*/ test_title(char *);
int test7(void) {
  const char *rd, *wr;
  rd = wr = "uart16550";
  test_title("Test 7. Back-to-back, medium speed");
  return generic_test(rd, wr, 1, 5);
}


x86 assembly (clang, -O0):
<test7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec6(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xec5(%rip),%rdi
call   1040 <test_title@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
mov    $0x5,%ecx
call   1030 <generic_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test7>:
push   %rax
lea    0xee2(%rip),%rdi
call   1040 <test_title@plt>
lea    0xecc(%rip),%rdi
mov    %rdi,%rsi
mov    $0x1,%edx
mov    $0x5,%ecx
pop    %rax
jmp    1030 <generic_test@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"uart16550\00"
@.str.1 = [35 x i8] c"Test 7. Back-to-back, medium speed\00"
define i32 @test7() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = call i32 @test_title(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%4 = load i8*, i8** %1
%5 = load i8*, i8** %2
%6 = call i32 @generic_test(i8* %4, i8* %5, i32 1, i32 5)
ret i32 %6
}

LLVM IR (-O2):
@.str = [10 x i8] c"uart16550\00"
@.str.1 = [35 x i8] c"Test 7. Back-to-back, medium speed\00"
define i32 @test7() {
%1 = tail call i32 @test_title(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @generic_test(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1, i32 5)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ spinmatrix_multiply_T(void *, void const *, void const *);
void spinmatrix_multiply_T_avx(void *a, const void *b, const void *c) {
  spinmatrix_multiply_T(a, b, c);
  return;
}


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

x86 assembly (clang, -O2):
<spinmatrix_multiply_T_avx>:
jmp    1030 <spinmatrix_multiply_T@plt>

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

LLVM IR (-O2):
define void @spinmatrix_multiply_T_avx(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @spinmatrix_multiply_T(i8* %0, i8* %1, i8* %2)
ret void
}
void R_DrawStretchPoly(const struct poly_s *p, float x_offset, float y_offset) {
}


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

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

LLVM IR (-O0):
%struct.poly_s = type opaque
define void @R_DrawStretchPoly(%struct.poly_s* %0, float %1, float %2) {
%4 = alloca %struct.poly_s*
%5 = alloca float
%6 = alloca float
store %struct.poly_s* %0, %struct.poly_s** %4
store float %1, float* %5
store float %2, float* %6
ret void
}

LLVM IR (-O2):
%struct.poly_s = type opaque
define void @R_DrawStretchPoly(%struct.poly_s* nocapture %0, float %1, float %2) {
ret void
}
/* Variables and functions */
int pigpio_command(int, int, unsigned int, unsigned int, int);
int i2c_write_quick(int pi, unsigned handle, unsigned bit) {
  return pigpio_command(pi, 58, handle, bit, 1);
}


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

x86 assembly (clang, -O2):
<i2c_write_quick>:
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x3a,%esi
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

LLVM IR (-O0):
define i32 @i2c_write_quick(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 @pigpio_command(i32 %7, i32 58, i32 %8, i32 %9, i32 1)
ret i32 %10
}

LLVM IR (-O2):
define i32 @i2c_write_quick(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @pigpio_command(i32 %0, i32 58, i32 %1, i32 %2, i32 1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ msgErro(char *);
void erroDoisPt() { msgErro("Dois pontos esperado!!"); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"Dois pontos esperado!!\00"
define void @erroDoisPt() {
%1 = call i32 @msgErro(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Dois pontos esperado!!\00"
define void @erroDoisPt() {
%1 = tail call i32 @msgErro(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
__attribute__((address_space(1))) char *
ignore_non_default_address_space(__attribute__((address_space(1))) char *base,
                                 unsigned long offset) {
  return base + offset;
}


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

x86 assembly (clang, -O2):
<ignore_non_default_address_space>:
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i8 addrspace(1)* @ignore_non_default_address_space(i8 addrspace(1)* %0, i64 %1) {
%3 = alloca i8 addrspace(1)*
%4 = alloca i64
store i8 addrspace(1)* %0, i8 addrspace(1)** %3
store i64 %1, i64* %4
%5 = load i8 addrspace(1)*, i8 addrspace(1)** %3
%6 = load i64, i64* %4
%7 = getelementptr inbounds i8, i8 addrspace(1)* %5, i64 %6
ret i8 addrspace(1)* %7
}

LLVM IR (-O2):
define i8 addrspace(1)* @ignore_non_default_address_space(i8 addrspace(1)* readnone %0, i64 %1) {
%3 = getelementptr inbounds i8, i8 addrspace(1)* %0, i64 %1
ret i8 addrspace(1)* %3
}
char digit_to_char(char digit) {
  return (digit < 10) ? '0' + digit : 'A' + (digit - 10);
}


x86 assembly (clang, -O0):
<digit_to_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jge    1126 <digit_to_char+0x26>
movsbl -0x1(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <digit_to_char+0x33>
movsbl -0x1(%rbp),%eax
sub    $0xa,%eax
add    $0x41,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit_to_char>:
cmp    $0xa,%dil
mov    $0x30,%ecx
mov    $0x37,%eax
cmovl  %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @digit_to_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = add nsw i32 48, %8
br label %15
10: ; preds = %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 10
%14 = add nsw i32 65, %13
br label %15
15: ; preds = %10, %6
%16 = phi i32 [ %9, %6 ], [ %14, %10 ]
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @digit_to_char(i8 signext %0) {
%2 = icmp slt i8 %0, 10
%3 = select i1 %2, i8 48, i8 55
%4 = add i8 %3, %0
ret i8 %4
}
double force_kqqR2(double q, double Q, double radius) {
  return ((8.9875517873681764e+9 * q * Q) / (radius * radius));
}


x86 assembly (clang, -O0):
<force_kqqR2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xee5(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<force_kqqR2>:
mulsd  0xef8(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm2
divsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @force_kqqR2(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = fmul double 0x4200BD99415AF206, %7
%9 = load double, double* %5
%10 = fmul double %8, %9
%11 = load double, double* %6
%12 = load double, double* %6
%13 = fmul double %11, %12
%14 = fdiv double %10, %13
ret double %14
}

LLVM IR (-O2):
define double @force_kqqR2(double %0, double %1, double %2) {
%4 = fmul double %0, 0x4200BD99415AF206
%5 = fmul double %4, %1
%6 = fmul double %2, %2
%7 = fdiv double %5, %6
ret double %7
}
int ft_islower(int c) {
  if ((unsigned char)c >= 'a' && (unsigned char)c <= 'z')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzbl %al,%eax
cmp    $0x61,%eax
jl     1131 <ft_islower+0x31>
mov    -0x8(%rbp),%eax
movzbl %al,%eax
cmp    $0x7a,%eax
jg     1131 <ft_islower+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1138 <ft_islower+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_islower>:
movzbl %dil,%ecx
add    $0xffffff9f,%ecx
xor    %eax,%eax
cmp    $0x1a,%ecx
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_islower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = trunc i32 %4 to i8
%6 = zext i8 %5 to i32
%7 = icmp sge i32 %6, 97
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i32, i32* %3
%10 = trunc i32 %9 to i8
%11 = zext i8 %10 to i32
%12 = icmp sle i32 %11, 122
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 1, i32* %2
br label %15
14: ; preds = %8, %1
store i32 0, i32* %2
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @ft_islower(i32 %0) {
%2 = and i32 %0, 255
%3 = add nsw i32 %2, -97
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ strrev(char *);
int main() {
  char arr[100];
  scanf("%s", arr);
  strrev(arr);
  printf("%s", arr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1050 <strrev@plt>
lea    -0x70(%rbp),%rsi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
lea    0xec2(%rip),%r14
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1050 <strrev@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = call i32 @strrev(i8* %5)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @strrev(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *);
int main(void) {
  double n;
  scanf("%lf", &n);
  printf("%+.4E\n", n);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [7 x i8] c"%+.4E\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %4)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t read_32_le(unsigned char bytes[4]) {
  uint32_t result = 0;
  for (int i = 3; i >= 0; i--)
    result = (result << 8) | bytes[i];
  return result;
}


x86 assembly (clang, -O0):
<read_32_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1145 <read_32_le+0x45>
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <read_32_le+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @read_32_le(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 3, i32* %4
br label %5
5: ; preds = %18, %1
%6 = load i32, i32* %4
%7 = icmp sge i32 %6, 0
br i1 %7, label %8, label %21
8: ; preds = %5
%9 = load i32, i32* %3
%10 = shl i32 %9, 8
%11 = load i8*, i8** %2
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = or i32 %10, %16
store i32 %17, i32* %3
br label %18
18: ; preds = %8
%19 = load i32, i32* %4
%20 = add nsw i32 %19, -1
store i32 %20, i32* %4
br label %5
21: ; preds = %5
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @read_32_le(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %4, 16
%9 = shl nuw nsw i32 %7, 8
%10 = or i32 %8, %9
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = or i32 %10, %13
%15 = shl nuw i32 %14, 8
%16 = load i8, i8* %0
%17 = zext i8 %16 to i32
%18 = or i32 %15, %17
ret i32 %18
}
char *next_line(char *s) {
  while (*s && *s != '\n')
    s++;
  if (*s == '\n')
    s++;
  return s;
}


x86 assembly (clang, -O0):
<next_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     112d <next_line+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <next_line+0x3d>
jmp    114e <next_line+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <next_line+0x8>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    116a <next_line+0x6a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_line>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax),%ecx
test   %cl,%cl
je     1122 <next_line+0x22>
cmp    $0xa,%cl
je     1122 <next_line+0x22>
add    $0x1,%rax
jmp    1110 <next_line+0x10>
xor    %edx,%edx
cmp    $0xa,%cl
sete   %dl
add    %rdx,%rax
ret

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

LLVM IR (-O2):
define i8* @next_line(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 10, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
%8 = icmp eq i8 %4, 10
%9 = zext i1 %8 to i64
%10 = getelementptr i8, i8* %3, i64 %9
ret i8* %10
}
/* Variables and functions */
int _usage();
int getopt(int, char **, char *);
int main(int argc, char *argv[]) {
  int o;
  while ((o = getopt(argc, argv, "")) != -1)
    switch (o) {
    default:
      return _usage();
    }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xebc(%rip),%rdx
call   1040 <getopt@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     1164 <main+0x44>
mov    $0x0,%al
call   1030 <_usage@plt>
mov    %eax,-0x4(%rbp)
jmp    116b <main+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdx
call   1040 <getopt@plt>
cmp    $0xffffffff,%eax
je     113a <main+0x1a>
xor    %eax,%eax
pop    %rcx
jmp    1030 <_usage@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @getopt(i32 %8, i8** %9, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i32 %10, i32* %6
%11 = icmp ne i32 %10, -1
br i1 %11, label %12, label %16
12: ; preds = %7
%13 = load i32, i32* %6
switch i32 %13, label %14 [
]
14: ; preds = %12
%15 = call i32 (...) @_usage()
store i32 %15, i32* %3
br label %17
16: ; preds = %7
store i32 0, i32* %3
br label %17
17: ; preds = %16, %14
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, -1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @_usage()
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ 0, %2 ]
ret i32 %8
}