xunge/DecIR huggingface dataset:
/* Type definitions */
struct flashrom_flashctx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ programmer_delay(unsigned int const);
int spi_read_status_register(struct flashrom_flashctx *const);
int spi_poll_wip(struct flashrom_flashctx *const flash,
                 const unsigned int poll_delay) {
  while (spi_read_status_register(flash) & (0x01 << 0))
    programmer_delay(poll_delay);
  return 0;
}


x86 assembly (clang, -O0):
<spi_poll_wip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <spi_read_status_register@plt>
and    $0x1,%eax
cmp    $0x0,%eax
je     1151 <spi_poll_wip+0x31>
mov    -0xc(%rbp),%edi
call   1040 <programmer_delay@plt>
jmp    112f <spi_poll_wip+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_poll_wip>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
call   1030 <spi_read_status_register@plt>
test   $0x1,%al
je     1145 <spi_poll_wip+0x25>
mov    %ebp,%edi
call   1040 <programmer_delay@plt>
mov    %rbx,%rdi
jmp    1130 <spi_poll_wip+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.flashrom_flashctx = type { i32 }
define i32 @spi_poll_wip(%struct.flashrom_flashctx* %0, i32 %1) {
%3 = alloca %struct.flashrom_flashctx*
%4 = alloca i32
store %struct.flashrom_flashctx* %0, %struct.flashrom_flashctx** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %10, %2
%6 = load %struct.flashrom_flashctx*, %struct.flashrom_flashctx** %3
%7 = call i32 @spi_read_status_register(%struct.flashrom_flashctx* %6)
%8 = and i32 %7, 1
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %5
%11 = load i32, i32* %4
%12 = call i32 @programmer_delay(i32 %11)
br label %5
13: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
%struct.flashrom_flashctx = type { i32 }
define i32 @spi_poll_wip(%struct.flashrom_flashctx* %0, i32 %1) {
%3 = tail call i32 @spi_read_status_register(%struct.flashrom_flashctx* %0)
%4 = and i32 %3, 1
%5 = icmp eq i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %2, %6
%7 = tail call i32 @programmer_delay(i32 %1)
%8 = tail call i32 @spi_read_status_register(%struct.flashrom_flashctx* %0)
%9 = and i32 %8, 1
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %2
ret i32 0
}
void gb_float22_identity(float m[2][2]) {
  m[0][0] = 1;
  m[0][1] = 0;
  m[1][0] = 0;
  m[1][1] = 1;
}


x86 assembly (clang, -O0):
<gb_float22_identity>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0xeec(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movss  0xec4(%rip),%xmm0
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gb_float22_identity>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @gb_float22_identity([2 x float]* %0) {
%2 = alloca [2 x float]*
store [2 x float]* %0, [2 x float]** %2
%3 = load [2 x float]*, [2 x float]** %2
%4 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0
%5 = getelementptr inbounds [2 x float], [2 x float]* %4, i64 0, i64 0
store float 1.000000e+00, float* %5
%6 = load [2 x float]*, [2 x float]** %2
%7 = getelementptr inbounds [2 x float], [2 x float]* %6, i64 0
%8 = getelementptr inbounds [2 x float], [2 x float]* %7, i64 0, i64 1
store float 0.000000e+00, float* %8
%9 = load [2 x float]*, [2 x float]** %2
%10 = getelementptr inbounds [2 x float], [2 x float]* %9, i64 1
%11 = getelementptr inbounds [2 x float], [2 x float]* %10, i64 0, i64 0
store float 0.000000e+00, float* %11
%12 = load [2 x float]*, [2 x float]** %2
%13 = getelementptr inbounds [2 x float], [2 x float]* %12, i64 1
%14 = getelementptr inbounds [2 x float], [2 x float]* %13, i64 0, i64 1
store float 1.000000e+00, float* %14
ret void
}

LLVM IR (-O2):
define void @gb_float22_identity([2 x float]* nocapture writeonly %0) {
%2 = bitcast [2 x float]* %0 to <4 x float>*
store <4 x float> <float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, <4 x float>* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void freeHash(void *f1) { free(*(char **)f1); }


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

x86 assembly (clang, -O2):
<freeHash>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freeHash(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putdec(int, unsigned char);
void putdec16(unsigned char v) { putdec(10000, v); }


x86 assembly (clang, -O0):
<putdec16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x2710,%edi
movzbl -0x1(%rbp),%esi
call   1030 <putdec@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putdec16>:
mov    %edi,%esi
mov    $0x2710,%edi
jmp    1030 <putdec@plt>

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

LLVM IR (-O2):
define void @putdec16(i8 zeroext %0) {
%2 = tail call i32 @putdec(i32 10000, i8 zeroext %0)
ret void
}
void gtk_notebook_reorder_child() {}


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

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

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

LLVM IR (-O2):
define void @gtk_notebook_reorder_child() {
ret void
}
extern int int_cmp(const void *a, const void *b) {
  const int *ia = (const int *)a;
  const int *ib = (const int *)b;
  return *ia - *ib;
}


x86 assembly (clang, -O0):
<int_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @int_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = sub nsw i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @int_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}
void _charpointertorestype(s) char **s;
{
  int i;
  unsigned long l = 0;
  char *q;
  long lv, sv;
  for (q = *s, i = 0; i < 4; i++) {
    lv = q[i];
    sv = (3 - i) * 8;
    lv = lv << sv;
    l |= lv;
  }
  *(unsigned long *)s = l;
}


x86 assembly (clang, -O0):
<_charpointertorestype>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1177 <_charpointertorestype+0x77>
mov    -0x20(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbq (%rax,%rcx,1),%rax
mov    %rax,-0x28(%rbp)
mov    $0x3,%eax
sub    -0xc(%rbp),%eax
shl    $0x3,%eax
cltq
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
shl    %cl,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1122 <_charpointertorestype+0x22>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_charpointertorestype>:
mov    (%rdi),%rax
movsbq (%rax),%rcx
shl    $0x18,%rcx
movsbq 0x1(%rax),%rdx
shl    $0x10,%rdx
or     %rcx,%rdx
movsbq 0x2(%rax),%rcx
shl    $0x8,%rcx
movsbq 0x3(%rax),%rax
or     %rcx,%rax
or     %rdx,%rax
mov    %rax,(%rdi)
ret

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

LLVM IR (-O2):
define void @_charpointertorestype(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = sext i8 %3 to i64
%5 = shl nsw i64 %4, 24
%6 = getelementptr inbounds i8, i8* %2, i64 1
%7 = load i8, i8* %6
%8 = sext i8 %7 to i64
%9 = shl nsw i64 %8, 16
%10 = or i64 %9, %5
%11 = getelementptr inbounds i8, i8* %2, i64 2
%12 = load i8, i8* %11
%13 = sext i8 %12 to i64
%14 = shl nsw i64 %13, 8
%15 = or i64 %14, %10
%16 = getelementptr inbounds i8, i8* %2, i64 3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i64
%19 = or i64 %15, %18
%20 = bitcast i8** %0 to i64*
store i64 %19, i64* %20
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
regerr() { error("Illegal use of register"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"Illegal use of register\00"
define i32 @regerr() {
%1 = alloca i32
%2 = call i32 @error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [24 x i8] c"Illegal use of register\00"
define i32 @regerr() {
%1 = tail call i32 @error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
double tan(double);
double SDL_tan(double x) { return tan(x); }


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

x86 assembly (clang, -O2):
<SDL_tan>:
jmp    1030 <tan@plt>

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

LLVM IR (-O2):
define double @SDL_tan(double %0) {
%2 = tail call double @tan(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int xmms_strlist_len(char **data) {
  int i;
  if (data == NULL)
    abort();
  for (i = 0; data[i] != NULL; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<xmms_strlist_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112e <xmms_strlist_len+0x1e>
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     115b <xmms_strlist_len+0x4b>
jmp    114d <xmms_strlist_len+0x3d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1135 <xmms_strlist_len+0x25>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmms_strlist_len>:
push   %rax
test   %rdi,%rdi
je     112f <xmms_strlist_len+0x1f>
mov    $0xffffffff,%eax
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
cmpq   $0x0,(%rdi)
lea    0x8(%rdi),%rdi
jne    1120 <xmms_strlist_len+0x10>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @xmms_strlist_len(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, %5
%6 = phi i64 [ %10, %5 ], [ 0, %1 ]
%7 = getelementptr inbounds i8*, i8** %0, i64 %6
%8 = load i8*, i8** %7
%9 = icmp eq i8* %8, null
%10 = add nuw i64 %6, 1
br i1 %9, label %11, label %5
11: ; preds = %5
%12 = trunc i64 %6 to i32
ret i32 %12
}
/* Variables and functions */
int skip_chars(char *, int);
int skip_space(char *, int);
int skip_word(char *s, int len) {
  register int n;
  n = skip_chars(s, len);
  return (n + skip_space(s + n, len - n));
}


x86 assembly (clang, -O0):
<skip_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <skip_chars@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x10(%rbp),%rax
add    %rax,%rdi
mov    -0xc(%rbp),%esi
sub    -0x10(%rbp),%esi
call   1030 <skip_space@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_word>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <skip_chars@plt>
movslq %eax,%r14
add    %r14,%rbx
sub    %r14d,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <skip_space@plt>
add    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @skip_word(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @skip_chars(i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i8*, i8** %3
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = sub nsw i32 %14, %15
%17 = call i32 @skip_space(i8* %13, i32 %16)
%18 = add nsw i32 %9, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @skip_word(i8* %0, i32 %1) {
%3 = tail call i32 @skip_chars(i8* %0, i32 %1)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = sub nsw i32 %1, %3
%7 = tail call i32 @skip_space(i8* %5, i32 %6)
%8 = add nsw i32 %7, %3
ret i32 %8
}
void ERR_free_strings(void) {}


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

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

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

LLVM IR (-O2):
define void @ERR_free_strings() {
ret void
}
int ft_len_space(char *str) {
  int i;
  i = 0;
  while (str[i] != 0 && str[i] != ' ' && str[i] != '\t' && str[i] != '\n')
    i++;
  return (i);
}


x86 assembly (clang, -O0):
<ft_len_space>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
je     1172 <ft_len_space+0x72>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0xd(%rbp)
je     1172 <ft_len_space+0x72>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x9,%ecx
mov    %al,-0xd(%rbp)
je     1172 <ft_len_space+0x72>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1182 <ft_len_space+0x82>
jmp    1190 <ft_len_space+0x90>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <ft_len_space+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_len_space>:
xor    %eax,%eax
movabs $0x100000601,%rcx
jmp    1114 <ft_len_space+0x14>
xchg   %ax,%ax
add    $0x1,%rax
movzbl (%rdi,%rax,1),%edx
cmp    $0x20,%rdx
ja     1110 <ft_len_space+0x10>
bt     %rdx,%rcx
jae    1110 <ft_len_space+0x10>
ret

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

LLVM IR (-O2):
define i32 @ft_len_space(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ %7, %6 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 0, label %8
i8 32, label %8
i8 9, label %8
i8 10, label %8
]
6: ; preds = %2
%7 = add nuw i64 %3, 1
br label %2
8: ; preds = %2, %2, %2, %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
int test_imm_9Aint8_reg(signed char val) {
  return ((val) & (0x9A << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_9Aint8_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, 154
%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_9Aint8_reg(i8 signext %0) {
%2 = and i8 %0, -102
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
void nullf(const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @nullf(i8* nocapture %0, ...) {
ret void
}
int mdp4_overlay_writeback_on(struct platform_device *pdev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.platform_device = type opaque
define i32 @mdp4_overlay_writeback_on(%struct.platform_device* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ streq(char *, char *);
char *stringfix(char *type) {
  if (streq(type, "string")) {
    return ("wrapstring");
  } else {
    return (type);
  }
}


x86 assembly (clang, -O0):
<stringfix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xedd(%rip),%rsi
call   1030 <streq@plt>
cmp    $0x0,%rax
je     1146 <stringfix+0x36>
lea    0xec3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    114e <stringfix+0x3e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringfix>:
push   %rbx
mov    %rdi,%rbx
lea    0xee9(%rip),%rsi
call   1030 <streq@plt>
test   %rax,%rax
lea    0xed6(%rip),%rax
cmove  %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"string\00"
@.str.1 = [11 x i8] c"wrapstring\00"
define i8* @stringfix(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @streq(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
8: ; preds = %1
%9 = load i8*, i8** %3
store i8* %9, i8** %2
br label %10
10: ; preds = %8, %7
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [7 x i8] c"string\00"
@.str.1 = [11 x i8] c"wrapstring\00"
define i8* @stringfix(i8* %0) {
%2 = tail call i64 @streq(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0)
ret i8* %4
}
int rightChild(int i) { return (i << 1) + 2; }


x86 assembly (clang, -O0):
<rightChild>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rightChild>:
lea    (%rdi,%rdi,1),%eax
add    $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @rightChild(i32 %0) {
%2 = shl i32 %0, 1
%3 = add nsw i32 %2, 2
ret i32 %3
}
int mvpstb_get_vid_stc(unsigned long long *vstc) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mvpstb_get_vid_stc(i64* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void wait_one_bit_interval(void) { usleep(1000000 / 50); }


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

x86 assembly (clang, -O2):
<wait_one_bit_interval>:
mov    $0x4e20,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @wait_one_bit_interval() {
%1 = call i32 @usleep(i32 20000)
ret void
}

LLVM IR (-O2):
define void @wait_one_bit_interval() {
%1 = tail call i32 @usleep(i32 20000)
ret void
}
void clear_RnB() { (*(volatile unsigned char *)0x4E000020) |= (1 << 2); }


x86 assembly (clang, -O0):
<clear_RnB>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4e000020,%eax
mov    (%rax),%al
movzbl %al,%eax
or     $0x4,%eax
mov    %al,%cl
mov    $0x4e000020,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_RnB>:
orb    $0x4,0x4e000020
04
ret

LLVM IR (-O0):
define void @clear_RnB() {
%1 = load volatile i8, i8* inttoptr (i64 1308622880 to i8*)
%2 = zext i8 %1 to i32
%3 = or i32 %2, 4
%4 = trunc i32 %3 to i8
store volatile i8 %4, i8* inttoptr (i64 1308622880 to i8*)
ret void
}

LLVM IR (-O2):
define void @clear_RnB() {
%1 = load volatile i8, i8* inttoptr (i64 1308622880 to i8*)
%2 = or i8 %1, 4
store volatile i8 %2, i8* inttoptr (i64 1308622880 to i8*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void error(char *s) { exit((perror(s), -1)); }


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

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

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

LLVM IR (-O2):
define void @error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
double pow(int, int);
double sqrt(double);
double aperture(int exposure, double shutter) {
  return sqrt(pow(2, exposure) * shutter);
}


x86 assembly (clang, -O0):
<aperture>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x2,%edi
call   1030 <pow@plt>
mulsd  -0x10(%rbp),%xmm0
call   1040 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aperture>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %edi,%esi
mov    $0x2,%edi
call   1030 <pow@plt>
mulsd  (%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1147 <aperture+0x27>
sqrtsd %xmm0,%xmm0
pop    %rax
ret
pop    %rax
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @aperture(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
store i32 %0, i32* %3
store double %1, double* %4
%5 = load i32, i32* %3
%6 = call double @pow(i32 2, i32 %5)
%7 = load double, double* %4
%8 = fmul double %6, %7
%9 = call double @sqrt(double %8)
ret double %9
}

LLVM IR (-O2):
define double @aperture(i32 %0, double %1) {
%3 = tail call double @pow(i32 2, i32 %0)
%4 = fmul double %3, %1
%5 = tail call double @sqrt(double %4)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
void __attribute__((section(".inittext"))) puts(const char *str) {
  int n = 0;
  while (*str) {
    putchar(*str++);
    n++;
  }
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1155 <puts+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <puts+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <puts+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @puts(i8* %0) section ".inittext" {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
%13 = call i32 @putchar(i32 %12)
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @puts(i8* nocapture %0) section ".inittext" {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @putchar(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ftoa(char *, float);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  char result[50];
  float value;
  printf("Enter float:");
  scanf("%f", &value);
  ftoa(result, value);
  printf("Convert:%s\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
lea    -0x44(%rbp),%rsi
call   1050 <scanf@plt>
lea    -0x40(%rbp),%rdi
movss  -0x44(%rbp),%xmm0
call   1040 <ftoa@plt>
lea    -0x40(%rbp),%rsi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <ftoa@plt>
lea    0xea2(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Enter float:\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [12 x i8] c"Convert:%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [50 x i8]
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%7 = load float, float* %3
%8 = call i32 @ftoa(i8* %6, float %7)
%9 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Enter float:\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [12 x i8] c"Convert:%s\0A\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = alloca float
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%4 = bitcast float* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%7 = load float, float* %2
%8 = call i32 @ftoa(i8* %3, float %7)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Type definitions */
typedef int int8_t;
typedef int /*<<< orphan*/ input;

/* Variables and functions */
int /*<<< orphan*/ test_rebase(int, int *, int, int, int *, int /*<<< orphan*/);
void test_invalid_positive_digit(void) {
  int8_t input[] = {1, 2, 1, 0, 1, 0};
  int8_t expected[] = {0};
  test_rebase(2, input, (sizeof(input) / sizeof(input[0])), 10, expected, 0);
}


x86 assembly (clang, -O0):
<test_invalid_positive_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x24(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
lea    -0x20(%rbp),%rsi
lea    -0x24(%rbp),%r8
mov    $0x2,%edi
mov    $0x6,%edx
mov    $0xa,%ecx
xor    %r9d,%r9d
call   1040 <test_rebase@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_invalid_positive_digit>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%r8
mov    $0x2,%edi
mov    $0x6,%edx
mov    $0xa,%ecx
xor    %r9d,%r9d
call   1030 <test_rebase@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.test_invalid_positive_digit.input = [6 x i32] [i32 1, i32 2, i32 1, i32 0, i32 1, i32 0]
define void @test_invalid_positive_digit() {
%1 = alloca [6 x i32]
%2 = alloca [1 x i32]
%3 = bitcast [6 x i32]* %1 to i8*
%4 = bitcast [1 x i32]* %2 to i8*
%5 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
%7 = call i32 @test_rebase(i32 2, i32* %5, i32 6, i32 10, i32* %6, i32 0)
ret void
}

LLVM IR (-O2):
@__const.test_invalid_positive_digit.input = [6 x i32] [i32 1, i32 2, i32 1, i32 0, i32 1, i32 0]
define void @test_invalid_positive_digit() {
%1 = alloca [6 x i32]
%2 = alloca [1 x i32]
%3 = bitcast [6 x i32]* %1 to i8*
%4 = bitcast [1 x i32]* %2 to i8*
%5 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
store i32 0, i32* %5
%6 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%7 = call i32 @test_rebase(i32 2, i32* %6, i32 6, i32 10, i32* %5, i32 0)
ret void
}
void shiftaddr(int ri) {}


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

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

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

LLVM IR (-O2):
define void @shiftaddr(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ send_http_response(int, char *);
void send_200_ok(int clientsock) { send_http_response(clientsock, "200 OK"); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
call   1030 <send_http_response@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"200 OK\00"
define void @send_200_ok(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @send_http_response(i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"200 OK\00"
define void @send_200_ok(i32 %0) {
%2 = tail call i32 @send_http_response(i32 %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void print_help(char **argv) {
  fprintf(stderr,
          "Usage: %s [options] romfile\n"
          "Options:\n"
          "  -c\t\tPrint keyboard controls\n"
          "  -f\t\tStart in fullscreen mode\n"
          "  -h\t\tPrint help and exit\n"
          "  -s <scale>\tScale video output\n",
          argv[0]);
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    (%rdi),%rdx
lea    0xedd(%rip),%rsi
mov    %eax,%edi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [157 x i8] c"Usage: %s [options] romfile\0AOptions:\0A -c\09\09Print keyboard controls\0A -f\09\09Start in fullscreen mode\0A -h\09\09Print help and exit\0A -s <scale>\09Scale video output\0A\00"
define void @print_help(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i32, i32* @stderr
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [157 x i8] c"Usage: %s [options] romfile\0AOptions:\0A -c\09\09Print keyboard controls\0A -f\09\09Start in fullscreen mode\0A -h\09\09Print help and exit\0A -s <scale>\09Scale video output\0A\00"
define void @print_help(i8** nocapture %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %0
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
void _infix_operator_minus_u64_u64(unsigned long long lhs,
                                   unsigned long long rhs,
                                   unsigned long long *__rval_1) {
  *__rval_1 = lhs - rhs;
}


x86 assembly (clang, -O0):
<_infix_operator_minus_u64_u64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
sub    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @_infix_operator_minus_u64_u64(i64 %0, i64 %1, i64* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64*
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64* %2, i64** %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = sub i64 %7, %8
%10 = load i64*, i64** %6
store i64 %9, i64* %10
ret void
}

LLVM IR (-O2):
define void @_infix_operator_minus_u64_u64(i64 %0, i64 %1, i64* nocapture writeonly %2) {
%4 = sub i64 %0, %1
store i64 %4, i64* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int arg3(int a1, int a2, int a3) {
  printf("%d\n", a1 + a2 + a3);
  return a3;
}


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

x86 assembly (clang, -O2):
<arg3>:
push   %rbx
mov    %edx,%ebx
add    %edi,%esi
add    %edx,%esi
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @arg3(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 = add nsw i32 %7, %8
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %6
ret i32 %13
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @arg3(i32 %0, i32 %1, i32 returned %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 %2
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int fexist(char *filename) {
  struct stat s;
  if (stat(filename, &s))
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<fexist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
je     113f <fexist+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1146 <fexist+0x36>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @fexist(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %10
9: ; preds = %1
store i32 1, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @fexist(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
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ read_root_dir();
int ftree_refresh_root_node() { read_root_dir(); }


x86 assembly (clang, -O0):
<ftree_refresh_root_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <read_root_dir@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftree_refresh_root_node>:
xor    %eax,%eax
jmp    1030 <read_root_dir@plt>

LLVM IR (-O0):
define i32 @ftree_refresh_root_node() {
%1 = alloca i32
%2 = call i32 (...) @read_root_dir()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @ftree_refresh_root_node() {
%1 = tail call i32 (...) @read_root_dir()
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ time_internal_get(struct tm *);
int /*<<< orphan*/ time_set_nvrram(int /*<<< orphan*/ *, struct tm *);
void time_get(uint8_t *nvrram) {
  struct tm cur_time_tm;
  time_internal_get(&cur_time_tm);
  time_set_nvrram(nvrram, &cur_time_tm);
}


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

x86 assembly (clang, -O2):
<time_get>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <time_internal_get@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <time_set_nvrram@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define void @time_get(i32* %0) {
%2 = alloca i32*
%3 = alloca %struct.tm
store i32* %0, i32** %2
%4 = call i32 @time_internal_get(%struct.tm* %3)
%5 = load i32*, i32** %2
%6 = call i32 @time_set_nvrram(i32* %5, %struct.tm* %3)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define void @time_get(i32* %0) {
%2 = alloca %struct.tm
%3 = bitcast %struct.tm* %2 to i8*
%4 = call i32 @time_internal_get(%struct.tm* %2)
%5 = call i32 @time_set_nvrram(i32* %0, %struct.tm* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void set_unistyle(char *style) { printf("not implemented\n"); }


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

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

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

LLVM IR (-O2):
@str = [16 x i8] c"not implemented\00"
define void @set_unistyle(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
char test_70_0(char *mem) { return __atomic_fetch_xor(mem + 4, -1, 4); }


x86 assembly (clang, -O0):
<test_70_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0xff,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    %cl,-0xc(%rbp)
mov    0x4(%rax),%al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    -0xc(%rbp),%sil
mov    %al,%dl
xor    %sil,%dl
lock cmpxchg %dl,(%rcx)
sete   %cl
mov    %al,-0x19(%rbp)
test   $0x1,%cl
mov    %al,-0xb(%rbp)
jne    1152 <test_70_0+0x52>
jmp    1127 <test_70_0+0x27>
mov    -0x19(%rbp),%al
mov    %al,-0xa(%rbp)
movsbl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_70_0>:
mov    0x4(%rdi),%al
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
not    %cl
lock cmpxchg %cl,0x4(%rdi)
jne    1110 <test_70_0+0x10>
ret

LLVM IR (-O0):
define signext i8 @test_70_0(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 4
store i8 -1, i8* %3
%7 = load i8, i8* %3
%8 = atomicrmw xor i8* %6, i8 %7 acq_rel
store i8 %8, i8* %4
%9 = load i8, i8* %4
ret i8 %9
}

LLVM IR (-O2):
define signext i8 @test_70_0(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 4
%3 = atomicrmw xor i8* %2, i8 -1 acq_rel
ret i8 %3
}
/* Variables and functions */
scalar_t__ str_create();
void *_str_create() { return (void *)str_create(); }


x86 assembly (clang, -O0):
<_str_create>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <str_create@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_str_create>:
xor    %eax,%eax
jmp    1030 <str_create@plt>

LLVM IR (-O0):
define i8* @_str_create() {
%1 = call i64 (...) @str_create()
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}

LLVM IR (-O2):
define i8* @_str_create() {
%1 = tail call i64 (...) @str_create()
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *hilo2(void *arg) { printf("Hola2"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"Hola2\00"
define noalias i8* @hilo2(i8* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i8* undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ svga_write_common(int /*<<< orphan*/, int /*<<< orphan*/,
                                     int, void *);
void svga_write_linear(uint32_t addr, uint8_t val, void *p) {
  svga_write_common(addr, val, 1, p);
}


x86 assembly (clang, -O0):
<svga_write_linear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rcx
mov    $0x1,%edx
call   1030 <svga_write_common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svga_write_linear>:
mov    %rdx,%rcx
mov    $0x1,%edx
jmp    1030 <svga_write_common@plt>

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

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