xunge/DecIR huggingface dataset:
void inicializarProducciones(int producciones[250][50]) {
  int i, j;
  for (i = 0; 250 > i; ++i) {
    for (j = 0; 50 > j; ++j) {
      producciones[i][j] = -1;
    }
  }
}


x86 assembly (clang, -O0):
<inicializarProducciones>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0xfa,%eax
cmp    -0xc(%rbp),%eax
jle    1170 <inicializarProducciones+0x70>
movl   $0x0,-0x10(%rbp)
mov    $0x32,%eax
cmp    -0x10(%rbp),%eax
jle    115d <inicializarProducciones+0x5d>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0xc8,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1124 <inicializarProducciones+0x24>
jmp    1162 <inicializarProducciones+0x62>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <inicializarProducciones+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<inicializarProducciones>:
push   %rax
mov    $0xc350,%edx
mov    $0xff,%esi
call   1030 <memset@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @inicializarProducciones([50 x i32]* nocapture writeonly %0) {
%2 = bitcast [50 x i32]* %0 to i8*
ret void
}
void test_25_0(char *mem) { __atomic_sub_fetch(mem, 1, 4); }


x86 assembly (clang, -O0):
<test_25_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
movb   $0x1,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    %cl,%al
neg    %al
lock xadd %al,(%rdx)
sub    %cl,%al
mov    %al,-0xa(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_25_0>:
lock subb $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @test_25_0(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8 1, i8* %3
%6 = load i8, i8* %3
%7 = atomicrmw sub i8* %5, i8 %6 acq_rel
%8 = sub i8 %7, %6
store i8 %8, i8* %4
%9 = load i8, i8* %4
ret void
}

LLVM IR (-O2):
define void @test_25_0(i8* nocapture %0) {
%2 = atomicrmw sub i8* %0, i8 1 acq_rel
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal_error(char *, char *);
int f_gdt(int mode, unsigned char **sec, float *data, unsigned int ndata,
          char *inv_out, void **local) {
  fatal_error("GDT needs g2clib which was not installed", "");
  return 1;
}


x86 assembly (clang, -O0):
<f_gdt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
lea    0xecb(%rip),%rdi
lea    0xeec(%rip),%rsi
call   1030 <fatal_error@plt>
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [41 x i8] c"GDT needs g2clib which was not installed\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @f_gdt(i32 %0, i8** %1, float* %2, i32 %3, i8* %4, i8** %5) {
%7 = alloca i32
%8 = alloca i8**
%9 = alloca float*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8**
store i32 %0, i32* %7
store i8** %1, i8*** %8
store float* %2, float** %9
store i32 %3, i32* %10
store i8* %4, i8** %11
store i8** %5, i8*** %12
%13 = call i32 @fatal_error(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [41 x i8] c"GDT needs g2clib which was not installed\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @f_gdt(i32 %0, i8** nocapture readnone %1, float* nocapture readnone %2, i32 %3, i8* nocapture readnone %4, i8** nocapture readnone %5) {
%7 = tail call i32 @fatal_error(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void defaultPayloadDestructor(void *payload) {
  if (payload != NULL) {
    free(payload);
  }
}


x86 assembly (clang, -O0):
<defaultPayloadDestructor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <defaultPayloadDestructor+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<defaultPayloadDestructor>:
test   %rdi,%rdi
je     111a <defaultPayloadDestructor+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @defaultPayloadDestructor(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @defaultPayloadDestructor(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
unsigned int _get_next_pwr_of_two(unsigned int number) {
  unsigned int shift = 1, next = number - 1;
  for (; shift < sizeof(next); shift *= 2)
    next = next | next >> shift;
  return next + 1;
}


x86 assembly (clang, -O0):
<_get_next_pwr_of_two>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    $0x4,%rax
jae    1144 <_get_next_pwr_of_two+0x44>
mov    -0xc(%rbp),%eax
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1117 <_get_next_pwr_of_two+0x17>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_next_pwr_of_two>:
lea    -0x1(%rdi),%eax
mov    %eax,%ecx
shr    %ecx
or     %eax,%ecx
mov    %ecx,%eax
shr    $0x2,%eax
or     %ecx,%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @_get_next_pwr_of_two(i32 %0) {
%2 = add i32 %0, -1
%3 = lshr i32 %2, 1
%4 = or i32 %3, %2
%5 = lshr i32 %4, 2
%6 = or i32 %5, %4
%7 = add i32 %6, 1
ret i32 %7
}
/* Type definitions */
struct rx_nfa_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(char *);
void rx_free_nfa_state(struct rx_nfa_state *n) { free((char *)n); }


x86 assembly (clang, -O0):
<rx_free_nfa_state>:
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):
<rx_free_nfa_state>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.rx_nfa_state = type { i32 }
define void @rx_free_nfa_state(%struct.rx_nfa_state* %0) {
%2 = alloca %struct.rx_nfa_state*
store %struct.rx_nfa_state* %0, %struct.rx_nfa_state** %2
%3 = load %struct.rx_nfa_state*, %struct.rx_nfa_state** %2
%4 = bitcast %struct.rx_nfa_state* %3 to i8*
%5 = call i32 @free(i8* %4)
ret void
}

LLVM IR (-O2):
%struct.rx_nfa_state = type { i32 }
define void @rx_free_nfa_state(%struct.rx_nfa_state* nocapture %0) {
%2 = bitcast %struct.rx_nfa_state* %0 to i8*
%3 = tail call i32 @free(i8* %2)
ret void
}
/* Type definitions */
typedef scalar_t__ uint_least8_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_EQUALS_uint_least8_t(uint_least8_t const k1,
                                            uint_least8_t const k2) {
  return k1 == k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_EQUALS_uint_least8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_EQUALS_uint_least8_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_EQUALS_uint_least8_t(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ cprintf(char *, long);
void hexlzs(long n) {
  cprintf((32) <= 8 ? "%02lx" : (32) <= 16 ? "%04lx" : "%08lx", (n));
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%08lx\00"
define void @hexlzs(i64 %0) {
%2 = tail call i32 @cprintf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ yield();
void prog2() {
  print("inside prog2\n");
  while (!0) {
    print("2");
    yield();
  }
}


x86 assembly (clang, -O0):
<prog2>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <print@plt>
lea    0xed7(%rip),%rdi
call   1040 <print@plt>
mov    $0x0,%al
call   1030 <yield@plt>
jmp    1130 <prog2+0x10>

x86 assembly (clang, -O2):
<prog2>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1040 <print@plt>
lea    0xeda(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1040 <print@plt>
xor    %eax,%eax
call   1030 <yield@plt>
jmp    1140 <prog2+0x20>

LLVM IR (-O0):
@.str = [14 x i8] c"inside prog2\0A\00"
@.str.1 = [2 x i8] c"2\00"
define void @prog2() {
%1 = call i32 @print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @yield()
br label %2
}

LLVM IR (-O2):
@.str = [14 x i8] c"inside prog2\0A\00"
@.str.1 = [2 x i8] c"2\00"
define void @prog2() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = tail call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @yield()
br label %2
}
int utility_diff_within_delta(const double diff, const double delta) {
  return (((-delta) < diff) && (diff < delta));
}


x86 assembly (clang, -O0):
<utility_diff_within_delta>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jbe    1152 <utility_diff_within_delta+0x52>
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utility_diff_within_delta>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm1,%xmm2
ucomisd %xmm2,%xmm0
seta   %al
ucomisd %xmm0,%xmm1
seta   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @utility_diff_within_delta(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fneg double %5
%7 = load double, double* %3
%8 = fcmp olt double %6, %7
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load double, double* %3
%11 = load double, double* %4
%12 = fcmp olt double %10, %11
br label %13
13: ; preds = %9, %2
%14 = phi i1 [ false, %2 ], [ %12, %9 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @utility_diff_within_delta(double %0, double %1) {
%3 = fneg double %1
%4 = fcmp olt double %3, %0
%5 = fcmp olt double %0, %1
%6 = and i1 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
scalar_t__ stdin;
int system_stdin() { return (int)stdin; }


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

x86 assembly (clang, -O2):
<system_stdin>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@stdin = global i64 0
define i32 @system_stdin() {
%1 = load i64, i64* @stdin
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
@stdin = global i64 0
define i32 @system_stdin() {
%1 = load i64, i64* @stdin
%2 = trunc i64 %1 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ munlock(char *, size_t);
void free_workbuf(char *ptr, size_t size) {
  munlock(ptr, size);
  free(ptr);
}


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

x86 assembly (clang, -O2):
<free_workbuf>:
push   %rbx
mov    %rdi,%rbx
call   1030 <munlock@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <free@plt>

LLVM IR (-O0):
define void @free_workbuf(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @munlock(i8* %5, i64 %6)
%8 = load i8*, i8** %3
%9 = call i32 @free(i8* %8)
ret void
}

LLVM IR (-O2):
define void @free_workbuf(i8* %0, i64 %1) {
%3 = tail call i32 @munlock(i8* %0, i64 %1)
%4 = tail call i32 @free(i8* %0)
ret void
}
unsigned int reg_read8(unsigned int address) {
  unsigned char *mem = (unsigned char *)address;
  return *mem;
}


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

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

LLVM IR (-O0):
define i32 @reg_read8(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @reg_read8(i32 %0) {
%2 = zext i32 %0 to i64
%3 = inttoptr i64 %2 to i8*
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
ret i32 %5
}
void CRYPTO_get_mem_debug_options(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_get_mem_debug_options() {
ret void
}
/* Variables and functions */
char *strchr(char *, char);
scalar_t__ strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, scalar_t__);
void drop_space(char *input) {
  char *search, *modify;
  search = strchr(input, ' ');
  if (!search)
    return;
  modify = search;
  drop_space(++search);
  strncpy(modify, search, strlen(search) + 1);
}


x86 assembly (clang, -O0):
<drop_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1050 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116e <drop_space+0x2e>
jmp    11b4 <drop_space+0x74>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    %rdi,-0x10(%rbp)
call   1060 <drop_space@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1030 <strncpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drop_space>:
push   %r14
push   %rbx
push   %rax
mov    $0x20,%esi
call   1050 <strchr@plt>
test   %rax,%rax
je     1183 <drop_space+0x43>
mov    %rax,%r14
mov    %rax,%rbx
add    $0x1,%rbx
mov    %rbx,%rdi
call   1060 <drop_space@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strncpy@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @drop_space(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @strchr(i8* %5, i8 signext 32)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %10, label %9
9: ; preds = %1
br label %20
10: ; preds = %1
%11 = load i8*, i8** %3
store i8* %11, i8** %4
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %3
%14 = load i8*, i8** %4
%15 = load i8*, i8** %3
%16 = load i8*, i8** %3
%17 = call i64 @strlen(i8* %16)
%18 = add nsw i64 %17, 1
%19 = call i32 @strncpy(i8* %14, i8* %15, i64 %18)
br label %20
20: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
define void @drop_space(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 32)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %5
4: ; preds = %1, %5
ret void
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %2, i64 1
tail call void @drop_space(i8* %6)
%7 = tail call i64 @strlen(i8* %6)
%8 = add nsw i64 %7, 1
%9 = tail call i32 @strncpy(i8* %2, i8* %6, i64 %8)
br label %4
}
int main() {
  int a[4];
#pragma xmp nodes p[*]
  {
#pragma xmp template t[4]
#pragma xmp distribute t[block] onto p
#pragma xmp align a[i] with t[i]
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
store i32 0, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(int);
int round2(int);
char *charAlloc(int count) {
  return (char *)malloc(sizeof(char) * round2(count));
}


x86 assembly (clang, -O0):
<charAlloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <round2@plt>
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<charAlloc>:
push   %rax
call   1040 <round2@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @charAlloc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @round2(i32 %3)
%5 = sext i32 %4 to i64
%6 = mul i64 1, %5
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
define i8* @charAlloc(i32 %0) {
%2 = tail call i32 @round2(i32 %0)
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
int do_598() { return 598; }


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

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

LLVM IR (-O0):
define i32 @do_598() {
ret i32 598
}

LLVM IR (-O2):
define i32 @do_598() {
ret i32 598
}
/* Type definitions */
typedef int ssize_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ free(char *);
int getline(char **, size_t *, int /*<<< orphan*/ *);
char *mygetline(FILE *f) {
  char *buff = NULL;
  size_t size = 0;
  ssize_t rc = getline(&buff, &size, f);
  if (rc == -1) {
    if (buff)
      free(buff);
    return NULL;
  }
  return buff;
}


x86 assembly (clang, -O0):
<mygetline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rdx
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <getline@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0xffffffff,-0x24(%rbp)
jne    117b <mygetline+0x5b>
cmpq   $0x0,-0x18(%rbp)
je     116e <mygetline+0x4e>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
jmp    1183 <mygetline+0x63>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mygetline>:
sub    $0x18,%rsp
mov    %rdi,%rdx
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1040 <getline@plt>
mov    %eax,%ecx
mov    0x8(%rsp),%rax
cmp    $0xffffffff,%ecx
je     1159 <mygetline+0x39>
add    $0x18,%rsp
ret
test   %rax,%rax
je     1166 <mygetline+0x46>
mov    %rax,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i8* @mygetline(i32* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = bitcast i8** %2 to i8*
store i8* null, i8** %2
%5 = bitcast i64* %3 to i8*
store i64 0, i64* %3
%6 = call i32 @getline(i8** %2, i64* %3, i32* %0)
%7 = icmp eq i32 %6, -1
%8 = load i8*, i8** %2
br i1 %7, label %9, label %13
9: ; preds = %1
%10 = icmp eq i8* %8, null
br i1 %10, label %13, label %11
11: ; preds = %9
%12 = call i32 @free(i8* %8)
br label %13
13: ; preds = %1, %9, %11
%14 = phi i8* [ null, %11 ], [ null, %9 ], [ %8, %1 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ limits();
int /*<<< orphan*/ measure(int);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int main(int argc, char **argv) {
  int n = 0;
  if (argc != 2)
    return 111;
  sscanf(argv[1], "%d", &n);
  limits();
  measure(n);
  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)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1163 <main+0x33>
movl   $0x6f,-0x4(%rbp)
jmp    1191 <main+0x61>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe8e(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1050 <sscanf@plt>
mov    $0x0,%al
call   1030 <limits@plt>
mov    -0x14(%rbp),%edi
call   1040 <measure@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
mov    $0x6f,%ebx
cmp    $0x2,%edi
jne    116e <main+0x3e>
mov    0x8(%rsi),%rdi
lea    0xeae(%rip),%rsi
lea    0xc(%rsp),%rdx
call   1050 <sscanf@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <limits@plt>
mov    0xc(%rsp),%edi
call   1040 <measure@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
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
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 2
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 111, i32* %3
br label %18
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @sscanf(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%15 = call i32 (...) @limits()
%16 = load i32, i32* %6
%17 = call i32 @measure(i32 %16)
store i32 0, i32* %3
br label %18
18: ; preds = %10, %9
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = icmp eq i32 %0, 2
br i1 %5, label %6, label %13
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @sscanf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = call i32 (...) @limits()
%11 = load i32, i32* %3
%12 = call i32 @measure(i32 %11)
br label %13
13: ; preds = %2, %6
%14 = phi i32 [ 0, %6 ], [ 111, %2 ]
ret i32 %14
}
/* Type definitions */
struct qcc_stream_interval {
  int dummy;
};
struct qcc_list_node {
  int dummy;
};
struct qcc_list {
  int dummy;
};
struct qcc_interval_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ qcc_list_push_front(struct qcc_list *,
                                       struct qcc_list_node *);
void qcc_interval_data_push_front(struct qcc_interval_data *list,
                                  struct qcc_stream_interval *node) {
  qcc_list_push_front((struct qcc_list *)list, (struct qcc_list_node *)node);
}


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

x86 assembly (clang, -O2):
<qcc_interval_data_push_front>:
jmp    1030 <qcc_list_push_front@plt>

LLVM IR (-O0):
%struct.qcc_interval_data = type { i32 }
%struct.qcc_stream_interval = type { i32 }
%struct.qcc_list = type { i32 }
%struct.qcc_list_node = type { i32 }
define void @qcc_interval_data_push_front(%struct.qcc_interval_data* %0, %struct.qcc_stream_interval* %1) {
%3 = alloca %struct.qcc_interval_data*
%4 = alloca %struct.qcc_stream_interval*
store %struct.qcc_interval_data* %0, %struct.qcc_interval_data** %3
store %struct.qcc_stream_interval* %1, %struct.qcc_stream_interval** %4
%5 = load %struct.qcc_interval_data*, %struct.qcc_interval_data** %3
%6 = bitcast %struct.qcc_interval_data* %5 to %struct.qcc_list*
%7 = load %struct.qcc_stream_interval*, %struct.qcc_stream_interval** %4
%8 = bitcast %struct.qcc_stream_interval* %7 to %struct.qcc_list_node*
%9 = call i32 @qcc_list_push_front(%struct.qcc_list* %6, %struct.qcc_list_node* %8)
ret void
}

LLVM IR (-O2):
%struct.qcc_interval_data = type { i32 }
%struct.qcc_stream_interval = type { i32 }
%struct.qcc_list = type { i32 }
%struct.qcc_list_node = type { i32 }
define void @qcc_interval_data_push_front(%struct.qcc_interval_data* %0, %struct.qcc_stream_interval* %1) {
%3 = bitcast %struct.qcc_interval_data* %0 to %struct.qcc_list*
%4 = bitcast %struct.qcc_stream_interval* %1 to %struct.qcc_list_node*
%5 = tail call i32 @qcc_list_push_front(%struct.qcc_list* %3, %struct.qcc_list_node* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ INT_MAX;
scalar_t__ nrand(int /*<<< orphan*/);
int rand(void) { return (int)nrand(INT_MAX); }


x86 assembly (clang, -O0):
<rand>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <nrand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nrand@plt>

LLVM IR (-O0):
@INT_MAX = global i32 0
define i32 @rand() {
%1 = load i32, i32* @INT_MAX
%2 = call i64 @nrand(i32 %1)
%3 = trunc i64 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
@INT_MAX = global i32 0
define i32 @rand() {
%1 = load i32, i32* @INT_MAX
%2 = tail call i64 @nrand(i32 %1)
%3 = trunc i64 %2 to i32
ret i32 %3
}
int DummyCDGetStatus() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @DummyCDGetStatus() {
ret i32 0
}
/* Type definitions */
typedef unsigned int uint64_t;

/* Variables and functions */
uint64_t crotate_right(uint64_t v, unsigned k) {
  return (v >> k) | (v << (64 - k));
}


x86 assembly (clang, -O0):
<crotate_right>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x40,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<crotate_right>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
neg    %cl
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @crotate_right(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 = lshr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub i32 64, %9
%11 = shl i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @crotate_right(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = sub i32 64, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISREG(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
bool ace_fs_does_file_exist(const char *filepath) {
  struct stat sb;
  return stat(filepath, &sb) == 0 && S_ISREG(sb.st_mode);
}


x86 assembly (clang, -O0):
<ace_fs_does_file_exist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    115d <ace_fs_does_file_exist+0x3d>
mov    -0x10(%rbp),%edi
call   1040 <S_ISREG@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ace_fs_does_file_exist>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <ace_fs_does_file_exist+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1040 <S_ISREG@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @ace_fs_does_file_exist(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i64 @S_ISREG(i32 %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ false, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @ace_fs_does_file_exist(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISREG(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char **argv) {
  printf("Hello, Dolly!\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"Hello, Dolly!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ s_malloc_(size_t, char const *, int);
int /*<<< orphan*/ strcpy(char *, char const *);
size_t strlen(char const *);
char *s_str_dup_(const char *str, const char *file, int line) {
  size_t len = strlen(str);
  char *s = (char *)s_malloc_(len + 1, file, line);
  strcpy(s, str);
  return s;
}


x86 assembly (clang, -O0):
<s_str_dup_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <s_malloc_@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_str_dup_>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1050 <s_malloc_@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %rbp,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @s_str_dup_(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%9 = load i8*, i8** %4
%10 = call i64 @strlen(i8* %9)
store i64 %10, i64* %7
%11 = load i64, i64* %7
%12 = add i64 %11, 1
%13 = load i8*, i8** %5
%14 = load i32, i32* %6
%15 = call i64 @s_malloc_(i64 %12, i8* %13, i32 %14)
%16 = inttoptr i64 %15 to i8*
store i8* %16, i8** %8
%17 = load i8*, i8** %8
%18 = load i8*, i8** %4
%19 = call i32 @strcpy(i8* %17, i8* %18)
%20 = load i8*, i8** %8
ret i8* %20
}

LLVM IR (-O2):
define i8* @s_str_dup_(i8* %0, i8* %1, i32 %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = add i64 %4, 1
%6 = tail call i64 @s_malloc_(i64 %5, i8* %1, i32 %2)
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @strcpy(i8* %7, i8* %0)
ret i8* %7
}
int test_imm_77int8_reg(signed char val) {
  return ((val) & (-0x77 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_77int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff89,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_77int8_reg>:
test   $0x89,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_77int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -119
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_77int8_reg(i8 signext %0) {
%2 = and i8 %0, -119
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void hsAddScore(char *level, int score) { return; }


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

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

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

LLVM IR (-O2):
define void @hsAddScore(i8* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
struct pci_dev {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pci_get_drvdata(struct pci_dev *);
int /*<<< orphan*/ stop_atmel_card(int /*<<< orphan*/);
void atmel_pci_remove(struct pci_dev *pdev) {
  stop_atmel_card(pci_get_drvdata(pdev));
}


x86 assembly (clang, -O0):
<atmel_pci_remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <pci_get_drvdata@plt>
mov    %eax,%edi
call   1030 <stop_atmel_card@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atmel_pci_remove>:
push   %rax
call   1040 <pci_get_drvdata@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <stop_atmel_card@plt>

LLVM IR (-O0):
%struct.pci_dev = type { i32 }
define void @atmel_pci_remove(%struct.pci_dev* %0) {
%2 = alloca %struct.pci_dev*
store %struct.pci_dev* %0, %struct.pci_dev** %2
%3 = load %struct.pci_dev*, %struct.pci_dev** %2
%4 = call i32 @pci_get_drvdata(%struct.pci_dev* %3)
%5 = call i32 @stop_atmel_card(i32 %4)
ret void
}

LLVM IR (-O2):
%struct.pci_dev = type { i32 }
define void @atmel_pci_remove(%struct.pci_dev* %0) {
%2 = tail call i32 @pci_get_drvdata(%struct.pci_dev* %0)
%3 = tail call i32 @stop_atmel_card(i32 %2)
ret void
}
void WebPInitYUV444ConvertersSSE41(void) {}


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

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

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

LLVM IR (-O2):
define void @WebPInitYUV444ConvertersSSE41() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errorf(char *);
void *malloc(size_t);
int /*<<< orphan*/ sleep(int);
void *xmalloc(size_t size) {
  void *p;
  while ((p = malloc(size)) == NULL && size != 0) {
    errorf("out of memory");
    sleep(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,%rcx
mov    %rcx,-0x10(%rbp)
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    1166 <xmalloc+0x36>
cmpq   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1176 <xmalloc+0x46>
jmp    1191 <xmalloc+0x61>
lea    0xe83(%rip),%rdi
call   1030 <errorf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    113c <xmalloc+0xc>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rbx,%rbx
je     116f <xmalloc+0x3f>
test   %rax,%rax
jne    116f <xmalloc+0x3f>
lea    0xeb3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
call   1030 <errorf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    %rbx,%rdi
call   1040 <malloc@plt>
test   %rax,%rax
je     1150 <xmalloc+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
br label %4
4: ; preds = %13, %1
%5 = load i64, i64* %2
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i64, i64* %2
%10 = icmp ne i64 %9, 0
br label %11
11: ; preds = %8, %4
%12 = phi i1 [ false, %4 ], [ %10, %8 ]
br i1 %12, label %13, label %16
13: ; preds = %11
%14 = call i32 @errorf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @sleep(i32 1)
br label %4
16: ; preds = %11
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = icmp ne i64 %0, 0
%3 = tail call i8* @malloc(i64 %0)
%4 = icmp eq i8* %3, null
%5 = and i1 %2, %4
br i1 %5, label %6, label %11
6: ; preds = %1, %6
%7 = tail call i32 @errorf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @sleep(i32 1)
%9 = tail call i8* @malloc(i64 %0)
%10 = icmp eq i8* %9, null
br i1 %10, label %6, label %11
11: ; preds = %6, %1
%12 = phi i8* [ %3, %1 ], [ %9, %6 ]
ret i8* %12
}
/* Type definitions */
struct wpa_sm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rsn_preauth_candidate_process(struct wpa_sm *);
void wpa_sm_start_preauth(void *eloop_ctx, void *timeout_ctx) {
  struct wpa_sm *sm = eloop_ctx;
  rsn_preauth_candidate_process(sm);
}


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

x86 assembly (clang, -O2):
<wpa_sm_start_preauth>:
jmp    1030 <rsn_preauth_candidate_process@plt>

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

LLVM IR (-O2):
%struct.wpa_sm = type { i32 }
define void @wpa_sm_start_preauth(i8* %0, i8* nocapture readnone %1) {
%3 = bitcast i8* %0 to %struct.wpa_sm*
%4 = tail call i32 @rsn_preauth_candidate_process(%struct.wpa_sm* %3)
ret void
}
int value(ch) {
  return ('0' <= ch && ch <= '9')   ? (ch - '0')
         : ('A' <= ch && ch <= 'F') ? (ch - 'A' + 10)
         : ('a' <= ch && ch <= 'f') ? (ch - 'a' + 10)
                                    : 100;
}


x86 assembly (clang, -O0):
<value>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x30,%eax
cmp    -0x4(%rbp),%eax
jg     112d <value+0x2d>
cmpl   $0x39,-0x4(%rbp)
jg     112d <value+0x2d>
mov    -0x4(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    1198 <value+0x98>
mov    $0x41,%eax
cmp    -0x4(%rbp),%eax
jg     1156 <value+0x56>
cmpl   $0x46,-0x4(%rbp)
jg     1156 <value+0x56>
mov    -0x4(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0xc(%rbp)
jmp    1192 <value+0x92>
mov    $0x61,%eax
cmp    -0x4(%rbp),%eax
jg     117f <value+0x7f>
cmpl   $0x66,-0x4(%rbp)
jg     117f <value+0x7f>
mov    -0x4(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x10(%rbp)
jmp    118c <value+0x8c>
mov    $0x64,%eax
mov    %eax,-0x10(%rbp)
jmp    118c <value+0x8c>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<value>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
jb     1127 <value+0x27>
lea    -0x41(%rdi),%eax
cmp    $0x5,%eax
ja     1116 <value+0x16>
add    $0xffffffc9,%edi
mov    %edi,%eax
ret
lea    -0x61(%rdi),%eax
add    $0xffffffa9,%edi
cmp    $0x6,%eax
mov    $0x64,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @value(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 48, %3
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 48
br label %36
11: ; preds = %5, %1
%12 = load i32, i32* %2
%13 = icmp sle i32 65, %12
br i1 %13, label %14, label %21
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp sle i32 %15, 70
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load i32, i32* %2
%19 = sub nsw i32 %18, 65
%20 = add nsw i32 %19, 10
br label %34
21: ; preds = %14, %11
%22 = load i32, i32* %2
%23 = icmp sle i32 97, %22
br i1 %23, label %24, label %31
24: ; preds = %21
%25 = load i32, i32* %2
%26 = icmp sle i32 %25, 102
br i1 %26, label %27, label %31
27: ; preds = %24
%28 = load i32, i32* %2
%29 = sub nsw i32 %28, 97
%30 = add nsw i32 %29, 10
br label %32
31: ; preds = %24, %21
br label %32
32: ; preds = %31, %27
%33 = phi i32 [ %30, %27 ], [ 100, %31 ]
br label %34
34: ; preds = %32, %17
%35 = phi i32 [ %20, %17 ], [ %33, %32 ]
br label %36
36: ; preds = %34, %8
%37 = phi i32 [ %10, %8 ], [ %35, %34 ]
ret i32 %37
}

LLVM IR (-O2):
define i32 @value(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = add i32 %0, -65
%6 = icmp ult i32 %5, 6
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = add nsw i32 %0, -55
br label %14
9: ; preds = %4
%10 = add i32 %0, -97
%11 = icmp ult i32 %10, 6
%12 = add nsw i32 %0, -87
%13 = select i1 %11, i32 %12, i32 100
br label %14
14: ; preds = %1, %7, %9
%15 = phi i32 [ %8, %7 ], [ %13, %9 ], [ %2, %1 ]
ret i32 %15
}
void set_hardware_rx_gain(void) {}


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

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

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

LLVM IR (-O2):
define void @set_hardware_rx_gain() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
hello() { print("Hello World!"); }


x86 assembly (clang, -O0):
<hello>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <print@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World!\00"
define i32 @hello() {
%1 = alloca i32
%2 = call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World!\00"
define i32 @hello() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
int MyFunction() { return 42; }


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

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

LLVM IR (-O0):
define i32 @MyFunction() {
ret i32 42
}

LLVM IR (-O2):
define i32 @MyFunction() {
ret i32 42
}
void kputs(const char *s) {
  extern void uart_puts(const char *);
  uart_puts(s);
}


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

x86 assembly (clang, -O2):
<kputs>:
jmp    1030 <uart_puts@plt>

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

LLVM IR (-O2):
define void @kputs(i8* %0) {
tail call void @uart_puts(i8* %0)
ret void
}