xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
void err_fatal_simple_core(const char *func, const char *msg) {
  fprintf(stderr, "[%s] %s Abort!\n", func, msg);
  abort();
}


x86 assembly (clang, -O0):
<err_fatal_simple_core>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<err_fatal_simple_core>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"[%s] %s Abort!\0A\00"
define void @err_fatal_simple_core(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"[%s] %s Abort!\0A\00"
define void @err_fatal_simple_core(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%5 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ umount();
void umount_command(void) { umount(); }


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

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

LLVM IR (-O0):
define void @umount_command() {
%1 = call i32 (...) @umount()
ret void
}

LLVM IR (-O2):
define void @umount_command() {
%1 = tail call i32 (...) @umount()
ret void
}
int test_imm_33int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x33 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_33int64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x33,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_33int64_highword_mem>:
testb  $0x33,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_33int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 51
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_33int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 219043332096
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ CP15DCacheCleanFlush();
int /*<<< orphan*/ CP15ICacheFlush();
void cache_flush(void) {
  CP15DCacheCleanFlush();
  CP15ICacheFlush();
}


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

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

LLVM IR (-O0):
define void @cache_flush() {
%1 = call i32 (...) @CP15DCacheCleanFlush()
%2 = call i32 (...) @CP15ICacheFlush()
ret void
}

LLVM IR (-O2):
define void @cache_flush() {
%1 = tail call i32 (...) @CP15DCacheCleanFlush()
%2 = tail call i32 (...) @CP15ICacheFlush()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ide_remove_handlers(int);
void ide_sec_disable(void) { ide_remove_handlers(1); }


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

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

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

LLVM IR (-O2):
define void @ide_sec_disable() {
%1 = tail call i32 @ide_remove_handlers(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int fcntl(int, int /*<<< orphan*/, ...);
int setfl(int fd, int flag) {
  int flags = fcntl(fd, F_GETFL);
  flags |= flag;
  return fcntl(fd, F_SETFL, flags);
}


x86 assembly (clang, -O0):
<setfl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
mov    -0xc(%rbp),%edx
mov    $0x0,%al
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setfl>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    0x2eba(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
call   1030 <fcntl@plt>
or     %eax,%ebx
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
mov    %ebx,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
define i32 @setfl(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* @F_GETFL
%8 = call i32 (i32, i32, ...) @fcntl(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = or i32 %10, %9
store i32 %11, i32* %5
%12 = load i32, i32* %3
%13 = load i32, i32* @F_SETFL
%14 = load i32, i32* %5
%15 = call i32 (i32, i32, ...) @fcntl(i32 %12, i32 %13, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
define i32 @setfl(i32 %0, i32 %1) {
%3 = load i32, i32* @F_GETFL
%4 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %3)
%5 = or i32 %4, %1
%6 = load i32, i32* @F_SETFL
%7 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %6, i32 %5)
ret i32 %7
}
/* Variables and functions */
scalar_t__ log(int);
double logFactorial(int n) {
  double logF = 0;
  for (int i = 2; i <= n; i++) {
    logF += log(i);
  }
  return logF;
}


x86 assembly (clang, -O0):
<logFactorial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     115b <logFactorial+0x4b>
mov    -0x14(%rbp),%edi
call   1030 <log@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112a <logFactorial+0x1a>
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logFactorial>:
push   %r14
push   %rbx
push   %rax
xorps  %xmm0,%xmm0
cmp    $0x2,%edi
jl     116a <logFactorial+0x5a>
mov    %edi,%r14d
neg    %r14d
xorps  %xmm0,%xmm0
mov    $0x2,%ebx
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,(%rsp)
mov    %ebx,%edi
call   1030 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  (%rsp),%xmm0
lea    (%r14,%rbx,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1130 <logFactorial+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define double @logFactorial(i32 %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca i32
store i32 %0, i32* %2
store double 0.000000e+00, double* %3
store i32 2, i32* %4
br label %5
5: ; preds = %15, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %2
%8 = icmp sle i32 %6, %7
br i1 %8, label %9, label %18
9: ; preds = %5
%10 = load i32, i32* %4
%11 = call i64 @log(i32 %10)
%12 = sitofp i64 %11 to double
%13 = load double, double* %3
%14 = fadd double %13, %12
store double %14, double* %3
br label %15
15: ; preds = %9
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
br label %5
18: ; preds = %5
%19 = load double, double* %3
ret double %19
}

LLVM IR (-O2):
define double @logFactorial(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %3, label %5
3: ; preds = %5, %1
%4 = phi double [ 0.000000e+00, %1 ], [ %10, %5 ]
ret double %4
5: ; preds = %1, %5
%6 = phi i32 [ %11, %5 ], [ 2, %1 ]
%7 = phi double [ %10, %5 ], [ 0.000000e+00, %1 ]
%8 = tail call i64 @log(i32 %6)
%9 = sitofp i64 %8 to double
%10 = fadd double %7, %9
%11 = add nuw i32 %6, 1
%12 = icmp eq i32 %6, %0
br i1 %12, label %3, label %5
}
void INT_Excep_MTU11_TGIW11(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU11_TGIW11() {
ret void
}
void w_quick_sort_string_save(void *data, int i, void *key) {
  char **k = (char **)key;
  char **str = (char **)data;
  *k = str[i];
}


x86 assembly (clang, -O0):
<w_quick_sort_string_save>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<w_quick_sort_string_save>:
movslq %esi,%rax
mov    (%rdi,%rax,8),%rax
mov    %rax,(%rdx)
ret

LLVM IR (-O0):
define void @w_quick_sort_string_save(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8**
%8 = alloca i8**
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%9 = load i8*, i8** %6
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %7
%11 = load i8*, i8** %4
%12 = bitcast i8* %11 to i8**
store i8** %12, i8*** %8
%13 = load i8**, i8*** %8
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = load i8**, i8*** %7
store i8* %17, i8** %18
ret void
}

LLVM IR (-O2):
define void @w_quick_sort_string_save(i8* nocapture %0, i32 %1, i8* nocapture writeonly %2) {
%4 = bitcast i8* %2 to i8**
%5 = bitcast i8* %0 to i8**
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i8*, i8** %5, i64 %6
%8 = load i8*, i8** %7
store i8* %8, i8** %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MemoryCopy(void *, void *, int /*<<< orphan*/);
int /*<<< orphan*/ StringLength(char const *);
void StringWrite(char *Destination, const char *Source) {
  MemoryCopy((void *)Destination, (void *)Source, StringLength(Source));
}


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

x86 assembly (clang, -O2):
<StringWrite>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <StringLength@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <MemoryCopy@plt>

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

LLVM IR (-O2):
define void @StringWrite(i8* %0, i8* %1) {
%3 = tail call i32 @StringLength(i8* %1)
%4 = tail call i32 @MemoryCopy(i8* %0, i8* %1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int luaopen_hexdump() { abort(); }


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

x86 assembly (clang, -O2):
<luaopen_hexdump>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @luaopen_hexdump() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @luaopen_hexdump() {
%1 = tail call i32 (...) @abort()
unreachable
}
void fatal_error(msg) char *msg;
{
  printf("Fatal Error -- %s\n", msg);
  exit(-1);
}


x86 assembly (clang, -O0):
<fatal_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal_error>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Fatal Error -- %s\0A\00"
define void @fatal_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %3)
unreachable
}

LLVM IR (-O2):
@.str = [19 x i8] c"Fatal Error -- %s\0A\00"
define void @fatal_error(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
tail call void @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Report(char *);
int astG3DMark(int n, float *x, float *y, float *z, int type, float norm[3]) {
  Report("astG3DMark");
  return 0;
}


x86 assembly (clang, -O0):
<astG3DMark>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <Report@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"astG3DMark\00"
define i32 @astG3DMark(i32 %0, float* %1, float* %2, float* %3, i32 %4, float* %5) {
%7 = alloca i32
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
%11 = alloca i32
%12 = alloca float*
store i32 %0, i32* %7
store float* %1, float** %8
store float* %2, float** %9
store float* %3, float** %10
store i32 %4, i32* %11
store float* %5, float** %12
%13 = call i32 @Report(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"astG3DMark\00"
define i32 @astG3DMark(i32 %0, float* nocapture readnone %1, float* nocapture readnone %2, float* nocapture readnone %3, i32 %4, float* nocapture readnone %5) {
%7 = tail call i32 @Report(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int put_in_grid(int **grid, int x, int y, char input) {
  if (input == '.') {
    grid[x][y] = 0;
    return (1);
  }
  grid[x][y] = (input) - '0';
  return (1);
}


x86 assembly (clang, -O0):
<put_in_grid>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x2e,%eax
jne    1143 <put_in_grid+0x43>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
movl   $0x1,-0x4(%rbp)
jmp    1164 <put_in_grid+0x64>
movsbl -0x19(%rbp),%edx
sub    $0x30,%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_in_grid>:
mov    %ecx,%eax
add    $0xffffffd0,%eax
xor    %r8d,%r8d
cmp    $0x2e,%cl
cmovne %eax,%r8d
movslq %esi,%rax
mov    (%rdi,%rax,8),%rax
movslq %edx,%rcx
mov    %r8d,(%rax,%rcx,4)
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @put_in_grid(i32** nocapture %0, i32 %1, i32 %2, i8 signext %3) {
%5 = icmp eq i8 %3, 46
%6 = sext i8 %3 to i32
%7 = add nsw i32 %6, -48
%8 = select i1 %5, i32 0, i32 %7
%9 = sext i32 %1 to i64
%10 = getelementptr inbounds i32*, i32** %0, i64 %9
%11 = load i32*, i32** %10
%12 = sext i32 %2 to i64
%13 = getelementptr inbounds i32, i32* %11, i64 %12
store i32 %8, i32* %13
ret i32 1
}
/* Variables and functions */
int fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int c_up() { return fputs("[A", stdout); }


x86 assembly (clang, -O0):
<c_up>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_up>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[A\00"
@stdout = global i32 0
define i32 @c_up() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[A\00"
@stdout = global i32 0
define i32 @c_up() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
void av_log_set_callback() {}


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

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

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

LLVM IR (-O2):
define void @av_log_set_callback() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(unsigned char, unsigned int);
void t1outp(unsigned int base, unsigned short offset, unsigned char value) {
  outb(value, base + offset);
}


x86 assembly (clang, -O0):
<t1outp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %si,%cx
mov    %edi,-0x4(%rbp)
mov    %cx,-0x6(%rbp)
mov    %al,-0x7(%rbp)
mov    -0x7(%rbp),%al
mov    -0x4(%rbp),%esi
movzwl -0x6(%rbp),%ecx
add    %ecx,%esi
movzbl %al,%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1outp>:
add    %edi,%esi
mov    %edx,%edi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @t1outp(i32 %0, i16 zeroext %1, i8 zeroext %2) {
%4 = alloca i32
%5 = alloca i16
%6 = alloca i8
store i32 %0, i32* %4
store i16 %1, i16* %5
store i8 %2, i8* %6
%7 = load i8, i8* %6
%8 = load i32, i32* %4
%9 = load i16, i16* %5
%10 = zext i16 %9 to i32
%11 = add i32 %8, %10
%12 = call i32 @outb(i8 zeroext %7, i32 %11)
ret void
}

LLVM IR (-O2):
define void @t1outp(i32 %0, i16 zeroext %1, i8 zeroext %2) {
%4 = zext i16 %1 to i32
%5 = add i32 %4, %0
%6 = tail call i32 @outb(i8 zeroext %2, i32 %5)
ret void
}
void fd103(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  a : {
    typedef int(*c)[n];
  P012A:
    goto P012A;
    0;
  }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  p014A:
    goto p014A;
    goto a;
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd103>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd103+0x7>

x86 assembly (clang, -O2):
<fd103>:
jmp    1100 <fd103>

LLVM IR (-O0):
define void @fd103(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %4
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
br label %10
10: ; preds = %10, %7
br label %10
11: ; preds = %11
br label %11
12: ; No predecessors!
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
br label %15
15: ; preds = %15, %12
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
br label %20
20: ; preds = %20, %17
br label %20
21: ; preds = %21
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd103(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ wiznetRegWriteByte(int /*<<< orphan*/, int,
                                      int /*<<< orphan*/);
void wiznetSetSocketMaximumSegmentSize(uint8_t socket, uint8_t mssr) {
  wiznetRegWriteByte(socket, (0x0000 + 0x0012), mssr);
}


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

x86 assembly (clang, -O2):
<wiznetSetSocketMaximumSegmentSize>:
mov    %esi,%edx
mov    $0x12,%esi
jmp    1030 <wiznetRegWriteByte@plt>

LLVM IR (-O0):
define void @wiznetSetSocketMaximumSegmentSize(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @wiznetRegWriteByte(i32 %5, i32 18, i32 %6)
ret void
}

LLVM IR (-O2):
define void @wiznetSetSocketMaximumSegmentSize(i32 %0, i32 %1) {
%3 = tail call i32 @wiznetRegWriteByte(i32 %0, i32 18, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wdctl_command(int);
void wdctl_del_trusted_local_maclist(void) { wdctl_command(33); }


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

x86 assembly (clang, -O2):
<wdctl_del_trusted_local_maclist>:
mov    $0x21,%edi
jmp    1030 <wdctl_command@plt>

LLVM IR (-O0):
define void @wdctl_del_trusted_local_maclist() {
%1 = call i32 @wdctl_command(i32 33)
ret void
}

LLVM IR (-O2):
define void @wdctl_del_trusted_local_maclist() {
%1 = tail call i32 @wdctl_command(i32 33)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ foo(int);
main() {
  foo(64);
  _exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x40,%edi
call   1040 <foo@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x40,%edi
call   1040 <foo@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 64)
%3 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 64)
%2 = tail call i32 @_exit(i32 0)
unreachable
}
/* Variables and functions */
size_t strlen(char const *);
size_t module_libc_strlen(const char *src) { return strlen(src); }


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

x86 assembly (clang, -O2):
<module_libc_strlen>:
jmp    1030 <strlen@plt>

LLVM IR (-O0):
define i64 @module_libc_strlen(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @module_libc_strlen(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
ret i64 %2
}
/* Type definitions */
struct vec3 {
  int dummy;
};

/* Variables and functions */
float vec3_dot(float *, float *);
__attribute__((always_)) float psvec3_dot(struct vec3 *a, struct vec3 *b) {
  return vec3_dot((float *)a, (float *)b);
}


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

x86 assembly (clang, -O2):
<psvec3_dot>:
jmp    1030 <vec3_dot@plt>

LLVM IR (-O0):
%struct.vec3 = type { i32 }
define float @psvec3_dot(%struct.vec3* %0, %struct.vec3* %1) {
%3 = alloca %struct.vec3*
%4 = alloca %struct.vec3*
store %struct.vec3* %0, %struct.vec3** %3
store %struct.vec3* %1, %struct.vec3** %4
%5 = load %struct.vec3*, %struct.vec3** %3
%6 = bitcast %struct.vec3* %5 to float*
%7 = load %struct.vec3*, %struct.vec3** %4
%8 = bitcast %struct.vec3* %7 to float*
%9 = call float @vec3_dot(float* %6, float* %8)
ret float %9
}

LLVM IR (-O2):
%struct.vec3 = type { i32 }
define float @psvec3_dot(%struct.vec3* %0, %struct.vec3* %1) {
%3 = bitcast %struct.vec3* %0 to float*
%4 = bitcast %struct.vec3* %1 to float*
%5 = tail call float @vec3_dot(float* %3, float* %4)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ enter_standout_mode;
int /*<<< orphan*/ tty_putp(int /*<<< orphan*/);
void tty_enter_standout_mode() { tty_putp(enter_standout_mode); }


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

x86 assembly (clang, -O2):
<tty_enter_standout_mode>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <tty_putp@plt>

LLVM IR (-O0):
@enter_standout_mode = global i32 0
define void @tty_enter_standout_mode() {
%1 = load i32, i32* @enter_standout_mode
%2 = call i32 @tty_putp(i32 %1)
ret void
}

LLVM IR (-O2):
@enter_standout_mode = global i32 0
define void @tty_enter_standout_mode() {
%1 = load i32, i32* @enter_standout_mode
%2 = tail call i32 @tty_putp(i32 %1)
ret void
}
void ls_costN_nm5_incref(void) {}


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

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

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

LLVM IR (-O2):
define void @ls_costN_nm5_incref() {
ret void
}
/* Variables and functions */
bool is_c_whitespace(unsigned int ch) {
  return (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r' || ch == '\v' ||
          ch == '\f');
}


x86 assembly (clang, -O0):
<is_c_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <is_c_whitespace+0x5c>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <is_c_whitespace+0x5c>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <is_c_whitespace+0x5c>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <is_c_whitespace+0x5c>
mov    $0x1,%al
cmpl   $0xb,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <is_c_whitespace+0x5c>
cmpl   $0xc,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_c_whitespace>:
cmp    $0x20,%edi
ja     111d <is_c_whitespace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100002e00,%rdx
bt     %rcx,%rdx
jae    111d <is_c_whitespace+0x1d>
ret
xor    %eax,%eax
cmp    $0xc,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_c_whitespace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 13, label %5
i32 11, label %5
i32 10, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 12
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
int ckmetinp_undef(int spec) {
  int ckmetinp_undef = 0;
  if (spec < 0 || spec > 20)
    ckmetinp_undef |= 64;
  switch (spec) {
  case 0:
  case 1:
  case 2:
  case 5:
  case 9:
  case 10:
  case 11:
  case 14:
  case 18:
    break;
  default:
    ckmetinp_undef |= 1024;
  }
  return ckmetinp_undef;
}


x86 assembly (clang, -O0):
<ckmetinp_undef>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1122 <ckmetinp_undef+0x22>
cmpl   $0x14,-0x4(%rbp)
jle    112b <ckmetinp_undef+0x2b>
mov    -0x8(%rbp),%eax
or     $0x40,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x3,%eax
jb     1186 <ckmetinp_undef+0x86>
jmp    113f <ckmetinp_undef+0x3f>
mov    -0xc(%rbp),%eax
sub    $0x5,%eax
je     1186 <ckmetinp_undef+0x86>
jmp    1150 <ckmetinp_undef+0x50>
mov    -0xc(%rbp),%eax
add    $0xfffffff7,%eax
sub    $0x3,%eax
jb     1186 <ckmetinp_undef+0x86>
jmp    1164 <ckmetinp_undef+0x64>
mov    -0xc(%rbp),%eax
sub    $0xe,%eax
je     1186 <ckmetinp_undef+0x86>
jmp    1175 <ckmetinp_undef+0x75>
mov    -0xc(%rbp),%eax
sub    $0x12,%eax
jne    118b <ckmetinp_undef+0x8b>
jmp    1186 <ckmetinp_undef+0x86>
jmp    1196 <ckmetinp_undef+0x96>
mov    -0x8(%rbp),%eax
or     $0x400,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ckmetinp_undef>:
xor    %eax,%eax
cmp    $0x15,%edi
setae  %al
shl    $0x6,%eax
cmp    $0x12,%edi
ja     111b <ckmetinp_undef+0x1b>
mov    $0x44e27,%ecx
bt     %edi,%ecx
jae    111b <ckmetinp_undef+0x1b>
ret
or     $0x400,%eax
ret

LLVM IR (-O0):
define i32 @ckmetinp_undef(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 20
br i1 %8, label %9, label %12
9: ; preds = %6, %1
%10 = load i32, i32* %3
%11 = or i32 %10, 64
store i32 %11, i32* %3
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
switch i32 %13, label %15 [
i32 0, label %14
i32 1, label %14
i32 2, label %14
i32 5, label %14
i32 9, label %14
i32 10, label %14
i32 11, label %14
i32 14, label %14
i32 18, label %14
]
14: ; preds = %12, %12, %12, %12, %12, %12, %12, %12, %12
br label %18
15: ; preds = %12
%16 = load i32, i32* %3
%17 = or i32 %16, 1024
store i32 %17, i32* %3
br label %18
18: ; preds = %15, %14
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @ckmetinp_undef(i32 %0) {
%2 = icmp ugt i32 %0, 20
%3 = select i1 %2, i32 64, i32 0
switch i32 %0, label %4 [
i32 0, label %6
i32 1, label %6
i32 2, label %6
i32 5, label %6
i32 9, label %6
i32 10, label %6
i32 11, label %6
i32 14, label %6
i32 18, label %6
]
4: ; preds = %1
%5 = or i32 %3, 1024
br label %6
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %4
%7 = phi i32 [ %5, %4 ], [ %3, %1 ], [ %3, %1 ], [ %3, %1 ], [ %3, %1 ], [ %3, %1 ], [ %3, %1 ], [ %3, %1 ], [ %3, %1 ], [ %3, %1 ]
ret i32 %7
}
float FtoC(float f) {
  float c;
  c = (5.0 / 9.0) * (f - 32.0);
  return c;
}


x86 assembly (clang, -O0):
<FtoC>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeee(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xeda(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<FtoC>:
cvtss2sd %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @FtoC(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fsub double %5, 3.200000e+01
%7 = fmul double 0x3FE1C71C71C71C72, %6
%8 = fptrunc double %7 to float
store float %8, float* %3
%9 = load float, float* %3
ret float %9
}

LLVM IR (-O2):
define float @FtoC(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, -3.200000e+01
%4 = fmul double %3, 0x3FE1C71C71C71C72
%5 = fptrunc double %4 to float
ret float %5
}
int obterValor(const char *str) {
  int valor = 0;
  if (str[0] == '*') {
    valor += 4;
  }
  if (str[1] == '*') {
    valor += 2;
  }
  if (str[2] == '*') {
    valor += 1;
  }
  return valor;
}


x86 assembly (clang, -O0):
<obterValor>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2a,%eax
jne    1128 <obterValor+0x28>
mov    -0xc(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2a,%eax
jne    1142 <obterValor+0x42>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x2a,%eax
jne    115c <obterValor+0x5c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<obterValor>:
xor    %eax,%eax
cmpb   $0x2a,(%rdi)
sete   %al
lea    0x0(,%rax,4),%ecx
cmpb   $0x2a,0x1(%rdi)
lea    0x2(,%rax,4),%edx
cmovne %ecx,%edx
xor    %eax,%eax
cmpb   $0x2a,0x2(%rdi)
sete   %al
or     %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @obterValor(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 42
%4 = select i1 %3, i32 4, i32 0
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 42
%8 = or i32 %4, 2
%9 = select i1 %7, i32 %8, i32 %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 42
%13 = zext i1 %12 to i32
%14 = or i32 %9, %13
ret i32 %14
}
__attribute((always_)) ge(float a, float b) { return a >= b; }


x86 assembly (clang, -O0):
<ge>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ge>:
xor    %eax,%eax
ucomiss %xmm1,%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @ge(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp oge float %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ge(float %0, float %1) {
%3 = fcmp oge float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int f1(int *p, int *q, short *s) { return *p + *q + *s; }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
add    (%rcx),%eax
mov    -0x18(%rbp),%rcx
movswl (%rcx),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
mov    (%rsi),%ecx
add    (%rdi),%ecx
movswl (%rdx),%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @f1(i32* %0, i32* %1, i16* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i16*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i16* %2, i16** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = add nsw i32 %8, %10
%12 = load i16*, i16** %6
%13 = load i16, i16* %12
%14 = sext i16 %13 to i32
%15 = add nsw i32 %11, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @f1(i32* nocapture %0, i32* nocapture %1, i16* nocapture %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = add nsw i32 %5, %4
%7 = load i16, i16* %2
%8 = sext i16 %7 to i32
%9 = add nsw i32 %6, %8
ret i32 %9
}
int socket_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @socket_init() {
ret i32 0
}
/* Variables and functions */
int S_IFIFO;
int /*<<< orphan*/ exit(int);
int mknod(char const *, int, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void crearFifo(const char *nombre) {
  if (mknod(nombre, S_IFIFO | 0666, 0) == -1) {
    perror("Error al crear fifo");
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<crearFifo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
or     $0x1b6,%esi
xor    %edx,%edx
call   1030 <mknod@plt>
cmp    $0xffffffff,%eax
jne    1175 <crearFifo+0x45>
lea    0xe9a(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crearFifo>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    $0x1b6,%esi
or     (%rax),%esi
xor    %edx,%edx
call   1030 <mknod@plt>
cmp    $0xffffffff,%eax
je     114d <crearFifo+0x1d>
pop    %rax
ret
lea    0xeac(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@S_IFIFO = global i32 0
@.str = [20 x i8] c"Error al crear fifo\00"
define void @crearFifo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @S_IFIFO
%5 = or i32 %4, 438
%6 = call i32 @mknod(i8* %3, i32 %5, i32 0)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 -1)
unreachable
11: ; preds = %1
ret void
}

LLVM IR (-O2):
@S_IFIFO = global i32 0
@.str = [20 x i8] c"Error al crear fifo\00"
define void @crearFifo(i8* %0) {
%2 = load i32, i32* @S_IFIFO
%3 = or i32 %2, 438
%4 = tail call i32 @mknod(i8* %0, i32 %3, i32 0)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = tail call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 -1)
unreachable
9: ; preds = %1
ret void
}
/* Variables and functions */
int fahrenheit_to_celsius(int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int fahr = 72;
  int celsius = fahrenheit_to_celsius(fahr);
  printf("Fahr\tCelsius\n");
  printf("%d\t%d\n", fahr, celsius);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x48,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fahrenheit_to_celsius@plt>
mov    %eax,-0xc(%rbp)
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x48,%edi
call   1050 <fahrenheit_to_celsius@plt>
mov    %eax,%ebx
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb0(%rip),%rdi
mov    $0x48,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Fahr\09Celsius\0A\00"
@.str.1 = [7 x i8] c"%d\09%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 72, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @fahrenheit_to_celsius(i32 %4)
store i32 %5, i32* %3
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"%d\09%d\0A\00"
@str = [13 x i8] c"Fahr\09Celsius\00"
define i32 @main() {
%1 = tail call i32 @fahrenheit_to_celsius(i32 72)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 72, i32 %1)
ret i32 0
}
double SFMMetersToFeet(double m) { return (m * 3.280833); }


x86 assembly (clang, -O0):
<SFMMetersToFeet>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @SFMMetersToFeet(double %0) {
%2 = fmul double %0, 0x400A3F255F3519BD
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x1f() {
  Assert_real((isascii(31)),
              "/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_isascii.c",
              160, ("isascii should be 1 for 0x1f"));
}


x86 assembly (clang, -O0):
<t_isascii_0x1f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1f,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xa0,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x1f>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0xa0,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x1f\00"
define void @t_isascii_0x1f() {
%1 = call i32 @isascii(i32 31)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 160, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x1f\00"
define void @t_isascii_0x1f() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 160, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char lowerCaseFromNumber(int n) { return (char)(n + 'a'); }


x86 assembly (clang, -O0):
<lowerCaseFromNumber>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x61,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lowerCaseFromNumber>:
lea    0x61(%rdi),%eax
ret

LLVM IR (-O0):
define signext i8 @lowerCaseFromNumber(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 97
%5 = trunc i32 %4 to i8
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @lowerCaseFromNumber(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = add i8 %2, 97
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ miuiInstall_set_text(char *);
void ui_set_text(char *str) { miuiInstall_set_text(str); }


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

x86 assembly (clang, -O2):
<ui_set_text>:
jmp    1030 <miuiInstall_set_text@plt>

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

LLVM IR (-O2):
define void @ui_set_text(i8* %0) {
%2 = tail call i32 @miuiInstall_set_text(i8* %0)
ret void
}