xunge/DecIR huggingface dataset:
void wx11nt(aspect, justif) float *aspect;
int *justif;
{ wx11ii(aspect, justif); }


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

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

LLVM IR (-O0):
define void @wx11nt(float* %0, i32* %1) {
%3 = alloca float*
%4 = alloca i32*
store float* %0, float** %3
store i32* %1, i32** %4
%5 = load float*, float** %3
%6 = load i32*, i32** %4
%7 = call i32 (float*, i32*, ...) bitcast (i32 (...)* @wx11ii to i32 (float*, i32*, ...)*)(float* %5, i32* %6)
ret void
}

LLVM IR (-O2):
define void @wx11nt(float* %0, i32* %1) {
%3 = tail call i32 (float*, i32*, ...) bitcast (i32 (...)* @wx11ii to i32 (float*, i32*, ...)*)(float* %0, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void BuildWord(char *pchWord) {
  int i;
  char *pch = pchWord;
  do {
    i = *pch;
    pch++;
  } while (i != '\0');
  printf("%s\n", pchWord);
}


x86 assembly (clang, -O0):
<BuildWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1124 <BuildWord+0x14>
mov    -0x8(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @BuildWord(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %4
br label %6
6: ; preds = %12, %1
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
store i32 %9, i32* %3
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %4
br label %12
12: ; preds = %6
%13 = load i32, i32* %3
%14 = icmp ne i32 %13, 0
br i1 %14, label %6, label %15
15: ; preds = %12
%16 = load i8*, i8** %2
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @BuildWord(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
func() {
  int x = 15;
  printf("x=%d", x);
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xf,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
lea    0xee9(%rip),%rdi
mov    $0xf,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"x=%d\00"
define i32 @func() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 15)
ret i32 undef
}
void foo772(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo772(i32 %0) {
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t __UHADD16(uint32_t x, uint32_t y) {
  int32_t r, s;
  r = ((((x << 16) >> 16) + ((y << 16) >> 16)) >> 1) & 0x0000FFFF;
  s = ((((x) >> 16) + ((y) >> 16)) >> 1) & 0x0000FFFF;
  return ((s << 16) | (r));
}


x86 assembly (clang, -O0):
<__UHADD16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x10,%eax
sar    $0x10,%eax
mov    -0x8(%rbp),%ecx
shl    $0x10,%ecx
sar    $0x10,%ecx
add    %ecx,%eax
sar    $0x1,%eax
and    $0xffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
mov    -0x8(%rbp),%ecx
sar    $0x10,%ecx
add    %ecx,%eax
sar    $0x1,%eax
and    $0xffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x10,%eax
or     -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__UHADD16>:
movswl %di,%eax
movswl %si,%ecx
add    %eax,%ecx
shr    %ecx
movzwl %cx,%ecx
sar    $0x10,%edi
sar    $0x10,%esi
lea    (%rsi,%rdi,1),%eax
and    $0xfffffffe,%eax
shl    $0xf,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @__UHADD16(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = shl i32 %7, 16
%9 = ashr i32 %8, 16
%10 = load i32, i32* %4
%11 = shl i32 %10, 16
%12 = ashr i32 %11, 16
%13 = add nsw i32 %9, %12
%14 = ashr i32 %13, 1
%15 = and i32 %14, 65535
store i32 %15, i32* %5
%16 = load i32, i32* %3
%17 = ashr i32 %16, 16
%18 = load i32, i32* %4
%19 = ashr i32 %18, 16
%20 = add nsw i32 %17, %19
%21 = ashr i32 %20, 1
%22 = and i32 %21, 65535
store i32 %22, i32* %6
%23 = load i32, i32* %6
%24 = shl i32 %23, 16
%25 = load i32, i32* %5
%26 = or i32 %24, %25
ret i32 %26
}

LLVM IR (-O2):
define i32 @__UHADD16(i32 %0, i32 %1) {
%3 = shl i32 %0, 16
%4 = ashr exact i32 %3, 16
%5 = shl i32 %1, 16
%6 = ashr exact i32 %5, 16
%7 = add nsw i32 %6, %4
%8 = lshr i32 %7, 1
%9 = and i32 %8, 65535
%10 = ashr i32 %0, 16
%11 = ashr i32 %1, 16
%12 = add nsw i32 %11, %10
%13 = shl nsw i32 %12, 15
%14 = and i32 %13, -65536
%15 = or i32 %9, %14
ret i32 %15
}
/* Type definitions */
struct xdg_popup {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
void *wl_proxy_get_user_data(struct wl_proxy *);
void *xdg_popup_get_user_data(struct xdg_popup *xdg_popup) {
  return wl_proxy_get_user_data((struct wl_proxy *)xdg_popup);
}


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

x86 assembly (clang, -O2):
<xdg_popup_get_user_data>:
jmp    1030 <wl_proxy_get_user_data@plt>

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

LLVM IR (-O2):
%struct.xdg_popup = type { i32 }
%struct.wl_proxy = type { i32 }
define i8* @xdg_popup_get_user_data(%struct.xdg_popup* %0) {
%2 = bitcast %struct.xdg_popup* %0 to %struct.wl_proxy*
%3 = tail call i8* @wl_proxy_get_user_data(%struct.wl_proxy* %2)
ret i8* %3
}
void do_rest(void) {}


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

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

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

LLVM IR (-O2):
define void @do_rest() {
ret void
}
int test_imm_05uint8_reg(unsigned char val) {
  return ((val) & (-0x05 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_05uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -5
%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_05uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -5
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void *qe_malloc_dup(const void *src, size_t size) {
  void *p = malloc(size);
  if (p)
    memcpy(p, src, size);
  return p;
}


x86 assembly (clang, -O0):
<qe_malloc_dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1159 <qe_malloc_dup+0x39>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qe_malloc_dup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1149 <qe_malloc_dup+0x29>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @qe_malloc_dup(i8* %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @memcpy(i8* %3, i8* %0, i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
char *zlibVersion();
void testzlibVersion(void) {
  const char *str = NULL;
  str = zlibVersion();
  if (str == NULL)
    printf("zlibversion(): Error\n");
  printf("zlibVersion: %s\n", str);
}


x86 assembly (clang, -O0):
<testzlibVersion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <zlibVersion@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1154 <testzlibVersion+0x34>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testzlibVersion>:
push   %rbx
xor    %eax,%eax
call   1050 <zlibVersion@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114c <testzlibVersion+0x1c>
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
lea    0xead(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"zlibversion(): Error\0A\00"
@.str.1 = [17 x i8] c"zlibVersion: %s\0A\00"
define void @testzlibVersion() {
%1 = alloca i8*
store i8* null, i8** %1
%2 = call i8* (...) @zlibVersion()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = load i8*, i8** %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@.str.1 = [17 x i8] c"zlibVersion: %s\0A\00"
@str = [21 x i8] c"zlibversion(): Error\00"
define void @testzlibVersion() {
%1 = tail call i8* (...) @zlibVersion()
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret void
}
void obcshare_decoder(void) {}


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

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

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

LLVM IR (-O2):
define void @obcshare_decoder() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log2f(int);
int roundf(int /*<<< orphan*/);
int log2i(int a) { return roundf(log2f(a)); }


x86 assembly (clang, -O0):
<log2i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <log2f@plt>
mov    %eax,%edi
call   1040 <roundf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @log2i(i32 %0) {
%2 = tail call i32 @log2f(i32 %0)
%3 = tail call i32 @roundf(i32 %2)
ret i32 %3
}
double *NewDouble(size, message)
int size;
char *message;
{
  double *ptr;
  if (size <= 0)
    size = 1;
  ptr = (double *)Calloc(size, sizeof(double), message);
  return (ptr);
}


x86 assembly (clang, -O0):
<NewDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1130 <NewDouble+0x20>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <Calloc@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NewDouble>:
push   %rax
mov    %rsi,%rdx
test   %edi,%edi
mov    $0x1,%eax
cmovle %eax,%edi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <Calloc@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define double* @NewDouble(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca double*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = icmp sle i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 1, i32* %3
br label %9
9: ; preds = %8, %2
%10 = load i32, i32* %3
%11 = load i8*, i8** %4
%12 = call i32 (i32, i64, i8*, ...) bitcast (i32 (...)* @Calloc to i32 (i32, i64, i8*, ...)*)(i32 %10, i64 8, i8* %11)
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to double*
store double* %14, double** %5
%15 = load double*, double** %5
ret double* %15
}

LLVM IR (-O2):
define double* @NewDouble(i32 %0, i8* %1) {
%3 = icmp sgt i32 %0, 1
%4 = select i1 %3, i32 %0, i32 1
%5 = tail call i32 (i32, i64, i8*, ...) bitcast (i32 (...)* @Calloc to i32 (i32, i64, i8*, ...)*)(i32 %4, i64 8, i8* %1)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to double*
ret double* %7
}
unsigned power(int x, int y) {
  return (y < 1) ? 1 : (y == 1) ? x : power(x, y--);
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    1135 <power+0x25>
mov    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1166 <power+0x56>
cmpl   $0x1,-0x8(%rbp)
jne    114a <power+0x3a>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1160 <power+0x50>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
call   1030 <power@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
cmp    $0x2,%esi
jge    1120 <power+0x20>
cmp    $0x1,%esi
mov    $0x1,%eax
cmove  %edi,%eax
ret
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
jmp    1120 <power+0x20>

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

LLVM IR (-O2):
define i32 @power(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 2
br i1 %3, label %5, label %4
4: ; preds = %2, %4
br label %4
5: ; preds = %2
%6 = icmp eq i32 %1, 1
%7 = select i1 %6, i32 %0, i32 1
ret i32 %7
}
void emit_headers(char *in) { (void)in; }


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

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

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

LLVM IR (-O2):
define void @emit_headers(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
int /*<<< orphan*/ pmu_set_active_clk(int, int, int, int);
int /*<<< orphan*/ pmu_set_adc_period(int);
int /*<<< orphan*/ pmu_set_sar_override(int);
int /*<<< orphan*/ pmu_set_sleep_clk(int, int, int, int);
void pmu_set_clk_init() {
  pmu_set_active_clk(0xA, 0x1, 0x10, 0x2);
  pmu_set_sleep_clk(0xF, 0x0, 0x1, 0x1);
  mbus_remote_register_write(0x6, 0x05,
                             ((0 << 13) | (0 << 12) | (1 << 11) | (0 << 10) |
                              (0 << 9) | (0 << 8) | (0 << 7) | (0x45)));
  delay(100);
  pmu_set_sar_override(0x3F);
  pmu_set_adc_period(1);
}


x86 assembly (clang, -O0):
<pmu_set_clk_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
mov    $0x1,%esi
mov    $0x10,%edx
mov    $0x2,%ecx
call   1040 <pmu_set_active_clk@plt>
mov    $0xf,%edi
xor    %esi,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <pmu_set_sleep_clk@plt>
mov    $0x6,%edi
mov    $0x5,%esi
mov    $0x845,%edx
call   1060 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1050 <delay@plt>
mov    $0x3f,%edi
call   1070 <pmu_set_sar_override@plt>
mov    $0x1,%edi
call   1080 <pmu_set_adc_period@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_set_clk_init>:
push   %rax
mov    $0xa,%edi
mov    $0x1,%esi
mov    $0x10,%edx
mov    $0x2,%ecx
call   1040 <pmu_set_active_clk@plt>
mov    $0xf,%edi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1030 <pmu_set_sleep_clk@plt>
mov    $0x6,%edi
mov    $0x5,%esi
mov    $0x845,%edx
call   1060 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1050 <delay@plt>
mov    $0x3f,%edi
call   1070 <pmu_set_sar_override@plt>
mov    $0x1,%edi
pop    %rax
jmp    1080 <pmu_set_adc_period@plt>

LLVM IR (-O0):
define void @pmu_set_clk_init() {
%1 = call i32 @pmu_set_active_clk(i32 10, i32 1, i32 16, i32 2)
%2 = call i32 @pmu_set_sleep_clk(i32 15, i32 0, i32 1, i32 1)
%3 = call i32 @mbus_remote_register_write(i32 6, i32 5, i32 2117)
%4 = call i32 @delay(i32 100)
%5 = call i32 @pmu_set_sar_override(i32 63)
%6 = call i32 @pmu_set_adc_period(i32 1)
ret void
}

LLVM IR (-O2):
define void @pmu_set_clk_init() {
%1 = tail call i32 @pmu_set_active_clk(i32 10, i32 1, i32 16, i32 2)
%2 = tail call i32 @pmu_set_sleep_clk(i32 15, i32 0, i32 1, i32 1)
%3 = tail call i32 @mbus_remote_register_write(i32 6, i32 5, i32 2117)
%4 = tail call i32 @delay(i32 100)
%5 = tail call i32 @pmu_set_sar_override(i32 63)
%6 = tail call i32 @pmu_set_adc_period(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x5e() {
  Assert_real((isbdigit(94) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              475, ("isbdigit should be 0 for ^"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x5e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5e,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x1db,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x5e>:
push   %rax
mov    $0x5e,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x1db,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for ^\00"
define void @t_isbdigit_0x5e() {
%1 = call i64 @isbdigit(i32 94)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 475, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for ^\00"
define void @t_isbdigit_0x5e() {
%1 = tail call i64 @isbdigit(i32 94)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 475, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct siphash {
  int dummy;
};
typedef int /*<<< orphan*/ p;

/* Variables and functions */
int /*<<< orphan*/ siphash24_compress(void const **, int, struct siphash *);
void trivial_hash_func(const void *p, struct siphash *state) {
  siphash24_compress(&p, sizeof(p), state);
}


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

x86 assembly (clang, -O2):
<trivial_hash_func>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,(%rsp)
mov    %rsp,%rdi
mov    $0x8,%esi
call   1030 <siphash24_compress@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.siphash = type { i32 }
define void @trivial_hash_func(i8* %0, %struct.siphash* %1) {
%3 = alloca i8*
%4 = alloca %struct.siphash*
store i8* %0, i8** %3
store %struct.siphash* %1, %struct.siphash** %4
%5 = load %struct.siphash*, %struct.siphash** %4
%6 = call i32 @siphash24_compress(i8** %3, i32 8, %struct.siphash* %5)
ret void
}

LLVM IR (-O2):
%struct.siphash = type { i32 }
define void @trivial_hash_func(i8* %0, %struct.siphash* %1) {
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @siphash24_compress(i8** %3, i32 8, %struct.siphash* %1)
ret void
}
/* Variables and functions */
char getchar();
void inflush(void) {
  while (getchar() != '\n')
    ;
}


x86 assembly (clang, -O0):
<inflush>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <inflush+0x9>
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1131 <inflush+0x21>
jmp    1119 <inflush+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<inflush>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <inflush+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @inflush() {
br label %1
1: ; preds = %5, %0
%2 = call signext i8 (...) @getchar()
%3 = sext i8 %2 to i32
%4 = icmp ne i32 %3, 10
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @inflush() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ R();
int /*<<< orphan*/ T();
void E() {
  T();
  R();
}


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

x86 assembly (clang, -O2):
<E>:
push   %rax
xor    %eax,%eax
call   1030 <T@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <R@plt>

LLVM IR (-O0):
define void @E() {
%1 = call i32 (...) @T()
%2 = call i32 (...) @R()
ret void
}

LLVM IR (-O2):
define void @E() {
%1 = tail call i32 (...) @T()
%2 = tail call i32 (...) @R()
ret void
}
int fun756() { return 756; }


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

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

LLVM IR (-O0):
define i32 @fun756() {
ret i32 756
}

LLVM IR (-O2):
define i32 @fun756() {
ret i32 756
}
/* Variables and functions */
int syscall_2(int, long, int);
int open(const char *name, int flags) {
  return syscall_2(4, (long int)name, flags);
}


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

x86 assembly (clang, -O2):
<open>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x4,%edi
jmp    1030 <syscall_2@plt>

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

LLVM IR (-O2):
define i32 @open(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = tail call i32 @syscall_2(i32 4, i64 %3, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void h3() { printf("H3\n"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"H3\0A\00"
define void @h3() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [3 x i8] c"H3\00"
define void @h3() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ key;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int *malloc(int);
int *create_int_key(int key) {
  int *ret = malloc(sizeof(key));
  assert(0 != ret);
  (*ret) = key;
  return ret;
}


x86 assembly (clang, -O0):
<create_int_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_int_key>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1030 <assert@plt>
mov    %ebp,(%rbx)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32* @create_int_key(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = call i32* @malloc(i32 4)
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = icmp ne i32* null, %5
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %2
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32*, i32** %3
ret i32* %11
}

LLVM IR (-O2):
define noalias i32* @create_int_key(i32 %0) {
%2 = tail call i32* @malloc(i32 4)
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
store i32 %0, i32* %2
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ randomize();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
void init() {
  srand(time(0));
  randomize();
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x0,%al
call   1050 <randomize@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <randomize@plt>

LLVM IR (-O0):
define void @init() {
%1 = call i32 @time(i32 0)
%2 = call i32 @srand(i32 %1)
%3 = call i32 (...) @randomize()
ret void
}

LLVM IR (-O2):
define void @init() {
%1 = tail call i32 @time(i32 0)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @randomize()
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int int16_t;

/* Variables and functions */
void bigendian_to_s16(int16_t *dst, uint8_t *src) {
  *dst = (((int16_t)src[0]) << 8) | (int16_t)src[1];
}


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

x86 assembly (clang, -O2):
<bigendian_to_s16>:
mov    (%rsi),%eax
shl    $0x8,%eax
or     0x8(%rsi),%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @bigendian_to_s16(i32* %0, i64* %1) {
%3 = alloca i32*
%4 = alloca i64*
store i32* %0, i32** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = getelementptr inbounds i64, i64* %5, i64 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 8
%10 = load i64*, i64** %4
%11 = getelementptr inbounds i64, i64* %10, i64 1
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
%14 = or i32 %9, %13
%15 = load i32*, i32** %3
store i32 %14, i32* %15
ret void
}

LLVM IR (-O2):
define void @bigendian_to_s16(i32* nocapture writeonly %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = trunc i64 %3 to i32
%5 = shl i32 %4, 8
%6 = getelementptr inbounds i64, i64* %1, i64 1
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = or i32 %5, %8
store i32 %9, i32* %0
ret void
}
/* Type definitions */
typedef int uint64_t;
struct timespec {
  scalar_t__ tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
uint64_t get_real_time_us(void) {
  struct timespec ts;
  clock_gettime(CLOCK_REALTIME, &ts);
  return ((uint64_t)ts.tv_sec * 1000000) + ((uint64_t)ts.tv_nsec / 1000);
}


x86 assembly (clang, -O0):
<get_real_time_us>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x8(%rbp),%rax
imul   $0xf4240,%eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_real_time_us>:
sub    $0x18,%rsp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
imul   $0xf4240,0x10(%rsp),%ecx
movslq 0x8(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
add    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@CLOCK_REALTIME = global i32 0
define i32 @get_real_time_us() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_REALTIME
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = mul nsw i32 %6, 1000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%9 = load i64, i64* %8
%10 = trunc i64 %9 to i32
%11 = sdiv i32 %10, 1000
%12 = add nsw i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@CLOCK_REALTIME = global i32 0
define i32 @get_real_time_us() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = mul nsw i32 %7, 1000000
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = sdiv i32 %11, 1000
%13 = add nsw i32 %12, %8
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void g_error(char *message) { printf("%s: %s\n", "free", message); }


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

x86 assembly (clang, -O2):
<g_error>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee7(%rip),%rsi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [5 x i8] c"free\00"
define void @g_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_wfd_params_config_usage(void) {
  printf("\nUsage : wfd_params_config <CONFIG_FILE>\n");
  printf("\nIssue set or get request using parameters in the CONFIG_FILE.\n");
  return;
}


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

x86 assembly (clang, -O2):
<print_wfd_params_config_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"\0AUsage : wfd_params_config <CONFIG_FILE>\0A\00"
@.str.1 = [64 x i8] c"\0AIssue set or get request using parameters in the CONFIG_FILE.\0A\00"
define void @print_wfd_params_config_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [41 x i8] c"\0AUsage : wfd_params_config <CONFIG_FILE>\00"
@str.2 = [63 x i8] c"\0AIssue set or get request using parameters in the CONFIG_FILE.\00"
define void @print_wfd_params_config_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void double_print(double val) { printf("%lf", val); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define void @double_print(double %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int setuid(uid_t uid) {
  do {
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<setuid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    110c <setuid+0xc>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @setuid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1
br label %4
4: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @setuid(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ writeCommand1parm(char *, unsigned int);
void turnRight(unsigned int speed) {
  if (speed <= 100) {
    writeCommand1parm("TR", speed);
  }
}


x86 assembly (clang, -O0):
<turnRight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
ja     1134 <turnRight+0x24>
mov    -0x4(%rbp),%esi
lea    0xed1(%rip),%rdi
call   1030 <writeCommand1parm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<turnRight>:
cmp    $0x64,%edi
ja     1123 <turnRight+0x13>
mov    %edi,%esi
lea    0xee2(%rip),%rdi
jmp    1030 <writeCommand1parm@plt>
ret

LLVM IR (-O0):
@.str = [3 x i8] c"TR\00"
define void @turnRight(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ule i32 %3, 100
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @writeCommand1parm(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"TR\00"
define void @turnRight(i32 %0) {
%2 = icmp ult i32 %0, 101
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @writeCommand1parm(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %5
5: ; preds = %3, %1
ret void
}
short div_short(void) {
  short a = 4, b = 2;
  (void)_Generic((a / b), int : 0);
}


x86 assembly (clang, -O0):
<div_short>:
push   %rbp
mov    %rsp,%rbp
movw   $0x4,-0x4(%rbp)
movw   $0x2,-0x6(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @div_short() {
%1 = alloca i16
%2 = alloca i16
%3 = alloca i16
store i16 4, i16* %2
store i16 2, i16* %3
%4 = load i16, i16* %1
ret i16 %4
}

LLVM IR (-O2):
define signext i16 @div_short() {
ret i16 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ *boxUnsigned(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ millis();
uint32_t *arduinoMillis(uint32_t context_len, uint32_t *stackvar) {
  uint32_t value;
  value = millis();
  return boxUnsigned(context_len, value);
}


x86 assembly (clang, -O0):
<arduinoMillis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <millis@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1030 <boxUnsigned@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arduinoMillis>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <millis@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <boxUnsigned@plt>

LLVM IR (-O0):
define i32* @arduinoMillis(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = call i32 (...) @millis()
store i32 %6, i32* %5
%7 = load i32, i32* %3
%8 = load i32, i32* %5
%9 = call i32* @boxUnsigned(i32 %7, i32 %8)
ret i32* %9
}

LLVM IR (-O2):
define i32* @arduinoMillis(i32 %0, i32* nocapture readnone %1) {
%3 = tail call i32 (...) @millis()
%4 = tail call i32* @boxUnsigned(i32 %0, i32 %3)
ret i32* %4
}
/* Variables and functions */
int /*<<< orphan*/ putstr(char *);
int serial_load(void *);
int /*<<< orphan*/ spi_flash_program(void *, int /*<<< orphan*/, int);
int main() {
  int len;
  putstr("SPI flash programmer\n");
  len = serial_load((void *)0x00100000);
  spi_flash_program((void *)0x00100000, 0, len);
  putstr("Done\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <putstr@plt>
mov    $0x100000,%edi
call   1040 <serial_load@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edx
mov    $0x100000,%edi
xor    %esi,%esi
call   1050 <spi_flash_program@plt>
lea    0xea8(%rip),%rdi
call   1030 <putstr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <putstr@plt>
mov    $0x100000,%edi
call   1040 <serial_load@plt>
mov    $0x100000,%edi
xor    %esi,%esi
mov    %eax,%edx
call   1050 <spi_flash_program@plt>
lea    0xeba(%rip),%rdi
call   1030 <putstr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"SPI flash programmer\0A\00"
@.str.1 = [6 x i8] c"Done\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @putstr(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @serial_load(i8* inttoptr (i64 1048576 to i8*))
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @spi_flash_program(i8* inttoptr (i64 1048576 to i8*), i32 0, i32 %5)
%7 = call i32 @putstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"SPI flash programmer\0A\00"
@.str.1 = [6 x i8] c"Done\0A\00"
define i32 @main() {
%1 = tail call i32 @putstr(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @serial_load(i8* inttoptr (i64 1048576 to i8*))
%3 = tail call i32 @spi_flash_program(i8* inttoptr (i64 1048576 to i8*), i32 0, i32 %2)
%4 = tail call i32 @putstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ read_size();
void do_overflow_stack() {
  char buf[0x10];
  uint32_t size = read_size();
  read(STDIN_FILENO, buf, size);
}


x86 assembly (clang, -O0):
<do_overflow_stack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1030 <read_size@plt>
mov    %eax,-0x14(%rbp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_overflow_stack>:
sub    $0x18,%rsp
xor    %eax,%eax
call   1030 <read_size@plt>
mov    0x2eae(%rip),%rcx
mov    (%rcx),%edi
mov    %rsp,%rsi
mov    %eax,%edx
call   1040 <read@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
define void @do_overflow_stack() {
%1 = alloca [16 x i8]
%2 = alloca i32
%3 = call i32 (...) @read_size()
store i32 %3, i32* %2
%4 = load i32, i32* @STDIN_FILENO
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%6 = load i32, i32* %2
%7 = call i32 @read(i32 %4, i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
define void @do_overflow_stack() {
%1 = alloca [16 x i8]
%2 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (...) @read_size()
%4 = load i32, i32* @STDIN_FILENO
%5 = call i32 @read(i32 %4, i8* %2, i32 %3)
ret void
}
/* Variables and functions */
double calc_taxes(float);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main(void) {
  float income;
  printf("Enter your income: ");
  scanf("%f", &income);
  printf("Taxes due: $%.2f\n", calc_taxes(income));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
call   1050 <calc_taxes@plt>
lea    0xea9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
call   1050 <calc_taxes@plt>
lea    0xeb5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Enter your income: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [18 x i8] c"Taxes due: $%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%5 = load float, float* %2
%6 = call double @calc_taxes(float %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Enter your income: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [18 x i8] c"Taxes due: $%.2f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = call double @calc_taxes(float %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double %6)
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_quaddobl_polyhedral_homotopy(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(475, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_quaddobl_polyhedral_homotopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1db,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_quaddobl_polyhedral_homotopy>:
mov    $0x1db,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @celcon_quaddobl_polyhedral_homotopy() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 475, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @celcon_quaddobl_polyhedral_homotopy() {
%1 = tail call i32 @_ada_use_c2phc(i32 475, i32* undef, i32* undef, double* undef)
ret i32 %1
}