xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ hello_message(char *);
scalar_t__ init_library();
int /*<<< orphan*/ printf(char *);
int main() {
  if (init_library()) {
    hello_message("Yuriy");
  } else {
    printf("Library not found\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <init_library@plt>
cmp    $0x0,%rax
je     1161 <main+0x31>
lea    0xea9(%rip),%rdi
call   1040 <hello_message@plt>
jmp    116d <main+0x3d>
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <init_library@plt>
test   %rax,%rax
je     114b <main+0x1b>
lea    0xebc(%rip),%rdi
call   1040 <hello_message@plt>
jmp    1157 <main+0x27>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Yuriy\00"
@.str.1 = [19 x i8] c"Library not found\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @init_library()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @hello_message(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"Yuriy\00"
@str = [18 x i8] c"Library not found\00"
define i32 @main() {
%1 = tail call i64 (...) @init_library()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @hello_message(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret i32 0
}
/* Variables and functions */
int LOG_CONS;
int /*<<< orphan*/ LOG_LOCAL0;
int LOG_PID;
int /*<<< orphan*/ LOG_WARNING;
int /*<<< orphan*/ openlog(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, char *);
void initLogger() {
  openlog("BlinkenServer", LOG_CONS | LOG_PID, LOG_LOCAL0);
  syslog(LOG_WARNING, "%s", "BlinkenServer started");
}


x86 assembly (clang, -O0):
<initLogger>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
mov    0x2e9c(%rip),%rax
or     (%rax),%esi
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
lea    0xeba(%rip),%rdi
call   1040 <openlog@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
lea    0xeaf(%rip),%rdx
call   1030 <syslog@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initLogger>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    0x2ea1(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2eae(%rip),%rax
mov    (%rax),%edx
lea    0xebd(%rip),%rdi
call   1040 <openlog@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
lea    0xeb6(%rip),%rsi
lea    0xeb2(%rip),%rdx
pop    %rax
jmp    1030 <syslog@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"BlinkenServer\00"
@LOG_CONS = global i32 0
@LOG_PID = global i32 0
@LOG_LOCAL0 = global i32 0
@LOG_WARNING = global i32 0
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [22 x i8] c"BlinkenServer started\00"
define void @initLogger() {
%1 = load i32, i32* @LOG_CONS
%2 = load i32, i32* @LOG_PID
%3 = or i32 %1, %2
%4 = load i32, i32* @LOG_LOCAL0
%5 = call i32 @openlog(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = load i32, i32* @LOG_WARNING
%7 = call i32 @syslog(i32 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"BlinkenServer\00"
@LOG_CONS = global i32 0
@LOG_PID = global i32 0
@LOG_LOCAL0 = global i32 0
@LOG_WARNING = global i32 0
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [22 x i8] c"BlinkenServer started\00"
define void @initLogger() {
%1 = load i32, i32* @LOG_CONS
%2 = load i32, i32* @LOG_PID
%3 = or i32 %2, %1
%4 = load i32, i32* @LOG_LOCAL0
%5 = tail call i32 @openlog(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = load i32, i32* @LOG_WARNING
%7 = tail call i32 @syslog(i32 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned int fputc(unsigned int, int /*<<< orphan*/ *);
unsigned int fput1(unsigned int value, FILE *stream) {
  return fputc(value & 0xff, stream);
}


x86 assembly (clang, -O0):
<fput1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
and    $0xff,%edi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fput1>:
movzbl %dil,%edi
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define i32 @fput1(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 = and i32 %5, 255
%7 = load i32*, i32** %4
%8 = call i32 @fputc(i32 %6, i32* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @fput1(i32 %0, i32* nocapture %1) {
%3 = and i32 %0, 255
%4 = tail call i32 @fputc(i32 %3, i32* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ callee4();
void callee3(char *strarg) { callee4(); }


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

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

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

LLVM IR (-O2):
define void @callee3(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @callee4()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glutStrokeString(void *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, double);
void glutStrokeDouble(void *fontface, double i) {
  char buf[64];
  snprintf(buf, 64, "%.2g", i);
  glutStrokeString(fontface, buf);
}


x86 assembly (clang, -O0):
<glutStrokeDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
mov    $0x40,%esi
lea    0xeba(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1040 <glutStrokeString@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glutStrokeDouble>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rdi,%rbx
lea    0xecf(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x40,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <glutStrokeString@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%.2g\00"
define void @glutStrokeDouble(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
%5 = alloca [64 x i8]
store i8* %0, i8** %3
store double %1, double* %4
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%7 = load double, double* %4
%8 = call i32 @snprintf(i8* %6, i32 64, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %7)
%9 = load i8*, i8** %3
%10 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%11 = call i32 @glutStrokeString(i8* %9, i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.2g\00"
define void @glutStrokeDouble(i8* %0, double %1) {
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 64, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %1)
%6 = call i32 @glutStrokeString(i8* %0, i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pause();
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_self();
void *fun(void *arg) {
  printf("            Thread %ld starting\n", pthread_self());
  pause();
  printf("            Thread %ld exiting\n", pthread_self());
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <pthread_self@plt>
mov    %eax,%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <pause@plt>
mov    $0x0,%al
call   1060 <pthread_self@plt>
mov    %eax,%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
push   %rax
xor    %eax,%eax
call   1060 <pthread_self@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <pause@plt>
xor    %eax,%eax
call   1060 <pthread_self@plt>
lea    0xeb6(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %edi,%edi
pop    %rax
jmp    1050 <pthread_exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c" Thread %ld starting\0A\00"
@.str.1 = [32 x i8] c" Thread %ld exiting\0A\00"
define i8* @fun(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 (...) @pthread_self()
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 (...) @pause()
%7 = call i32 (...) @pthread_self()
%8 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i32 @pthread_exit(i32* null)
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [33 x i8] c" Thread %ld starting\0A\00"
@.str.1 = [32 x i8] c" Thread %ld exiting\0A\00"
define noalias i8* @fun(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 (...) @pause()
%5 = tail call i32 (...) @pthread_self()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = tail call i32 @pthread_exit(i32* null)
ret i8* undef
}
void main() {
  char *a;
  char b;
  a = 4;
  b = *a;
  b += (&a);
  print("b .");
  printid(b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
movslq %eax,%rcx
lea    -0x8(%rbp),%rax
shl    $0x3,%rcx
add    %rcx,%rax
mov    %al,-0x9(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <print@plt>
movsbl -0x9(%rbp),%edi
mov    $0x0,%al
call   1040 <printid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movq   $0x4,0x8(%rsp)
mov    0x4,%eax
lea    0x8(%rsp),%rcx
lea    (%rcx,%rax,8),%ebx
lea    0xebc(%rip),%rdi
xor    %eax,%eax
call   1030 <print@plt>
movsbl %bl,%edi
xor    %eax,%eax
call   1040 <printid@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"b .\00"
define void @main() {
%1 = alloca i8*
%2 = alloca i8
store i8* inttoptr (i64 4 to i8*), i8** %1
%3 = load i8*, i8** %1
%4 = load i8, i8* %3
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = ptrtoint i8** %8 to i8
store i8 %9, i8* %2
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = call i32 (i32, ...) bitcast (i32 (...)* @printid to i32 (i32, ...)*)(i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"b .\00"
define void @main() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
store i8* inttoptr (i64 4 to i8*), i8** %1
%3 = load i8, i8* inttoptr (i64 4 to i8*)
%4 = sext i8 %3 to i64
%5 = getelementptr inbounds i8*, i8** %1, i64 %4
%6 = ptrtoint i8** %5 to i64
%7 = trunc i64 %6 to i32
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%9 = shl i32 %7, 24
%10 = ashr exact i32 %9, 24
%11 = call i32 (i32, ...) bitcast (i32 (...)* @printid to i32 (i32, ...)*)(i32 %10)
ret void
}
void ScaleRowDown2Box_16_C() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown2Box_16_C() {
ret void
}
int Bematech_FI_MinutosLigada(Var, Retorno) {
  return Formata("\x1b|35|18|\x1b", Var, Retorno);
}


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

x86 assembly (clang, -O2):
<Bematech_FI_MinutosLigada>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
jmp    1030 <Formata@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\1B|35|18|\1B\00"
define i32 @Bematech_FI_MinutosLigada(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 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"\1B|35|18|\1B\00"
define i32 @Bematech_FI_MinutosLigada(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ pthread_exit(char *);
int /*<<< orphan*/ sleep(int);
void *thread_function(void *args) {
  printf("\nIn thread with args = %s", (char *)args);
  sleep(1);
  printf("\nThanks for the CPU time");
  pthread_exit("Bye");
}


x86 assembly (clang, -O0):
<thread_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
call   1040 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_function>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
lea    0xec7(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
pop    %rax
jmp    1040 <pthread_exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"\0AIn thread with args = %s\00"
@.str.1 = [25 x i8] c"\0AThanks for the CPU time\00"
@.str.2 = [4 x i8] c"Bye\00"
define i8* @thread_function(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @sleep(i32 1)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @pthread_exit(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [26 x i8] c"\0AIn thread with args = %s\00"
@.str.1 = [25 x i8] c"\0AThanks for the CPU time\00"
@.str.2 = [4 x i8] c"Bye\00"
define noalias i8* @thread_function(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @sleep(i32 1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @pthread_exit(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret i8* undef
}
/* Variables and functions */
int getch();
unsigned KeyPress(void) {
  char ch;
  return ((ch = getch()) != '\0') ? ch : 0x8000 | getch();
}


x86 assembly (clang, -O0):
<KeyPress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getch@plt>
mov    %al,-0x1(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     113a <KeyPress+0x2a>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1149 <KeyPress+0x39>
mov    $0x0,%al
call   1030 <getch@plt>
or     $0x8000,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KeyPress>:
push   %rax
xor    %eax,%eax
call   1030 <getch@plt>
shl    $0x18,%eax
je     1122 <KeyPress+0x12>
sar    $0x18,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <getch@plt>
or     $0x8000,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @KeyPress() {
%1 = alloca i8
%2 = call i32 (...) @getch()
%3 = trunc i32 %2 to i8
store i8 %3, i8* %1
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i8, i8* %1
%8 = sext i8 %7 to i32
br label %12
9: ; preds = %0
%10 = call i32 (...) @getch()
%11 = or i32 32768, %10
br label %12
12: ; preds = %9, %6
%13 = phi i32 [ %8, %6 ], [ %11, %9 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @KeyPress() {
%1 = tail call i32 (...) @getch()
%2 = shl i32 %1, 24
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = ashr exact i32 %2, 24
br label %9
6: ; preds = %0
%7 = tail call i32 (...) @getch()
%8 = or i32 %7, 32768
br label %9
9: ; preds = %6, %4
%10 = phi i32 [ %5, %4 ], [ %8, %6 ]
ret i32 %10
}
int test_imm_23uint16_reg(unsigned short val) {
  return ((val) & (-0x23 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_23uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffffdd,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_23uint16_reg>:
test   $0xffdd,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_23uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -35
%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_23uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -35
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ MagStateHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void MagStateLogging() { UAVObjLogging(MagStateHandle()); }


x86 assembly (clang, -O0):
<MagStateLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <MagStateHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MagStateLogging>:
push   %rax
xor    %eax,%eax
call   1040 <MagStateHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @MagStateLogging() {
%1 = call i32 (...) @MagStateHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @MagStateLogging() {
%1 = tail call i32 (...) @MagStateHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t detexPack32A8(int a) {
  return (uint32_t)a << 24;
}


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

x86 assembly (clang, -O2):
<detexPack32A8>:
mov    %edi,%eax
shl    $0x18,%eax
ret

LLVM IR (-O0):
define i32 @detexPack32A8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
ret i32 %4
}

LLVM IR (-O2):
define i32 @detexPack32A8(i32 %0) {
%2 = shl i32 %0, 24
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x14() {
  Assert_real((islower(20) == 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_islower.c",
              105, ("islower should be 0 for 0x14"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x14>:
push   %rax
mov    $0x14,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x69,%edx
pop    %rax
jmp    1040 <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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x14\00"
define void @t_islower_0x14() {
%1 = call i64 @islower(i32 20)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 105, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x14\00"
define void @t_islower_0x14() {
%1 = tail call i64 @islower(i32 20)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 105, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct tst_expr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct tst_expr *);
void tst_bool_expr_free(struct tst_expr *expr) { free(expr); }


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

x86 assembly (clang, -O2):
<tst_bool_expr_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.tst_expr = type { i32 }
define void @tst_bool_expr_free(%struct.tst_expr* %0) {
%2 = alloca %struct.tst_expr*
store %struct.tst_expr* %0, %struct.tst_expr** %2
%3 = load %struct.tst_expr*, %struct.tst_expr** %2
%4 = call i32 @free(%struct.tst_expr* %3)
ret void
}

LLVM IR (-O2):
%struct.tst_expr = type { i32 }
define void @tst_bool_expr_free(%struct.tst_expr* nocapture %0) {
%2 = tail call i32 @free(%struct.tst_expr* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g();
void f(void) { g(); }


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

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

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

LLVM IR (-O2):
define void @f() {
%1 = tail call i32 (...) @g()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int64_t;

/* Variables and functions */
double getpksec(int /*<<< orphan*/, int);
double getreftime(u_int64_t speed_bps, int mtu) {
  return (double)100 / getpksec(speed_bps, mtu);
}


x86 assembly (clang, -O0):
<getreftime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <getpksec@plt>
movaps %xmm0,%xmm1
movsd  0xecc(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getreftime>:
push   %rax
call   1030 <getpksec@plt>
movsd  0xee2(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @getreftime(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 double @getpksec(i32 %5, i32 %6)
%8 = fdiv double 1.000000e+02, %7
ret double %8
}

LLVM IR (-O2):
define double @getreftime(i32 %0, i32 %1) {
%3 = tail call double @getpksec(i32 %0, i32 %1)
%4 = fdiv double 1.000000e+02, %3
ret double %4
}
void acpi_sleep_proc_init(void) {}


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

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

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

LLVM IR (-O2):
define void @acpi_sleep_proc_init() {
ret void
}
int do_133() { return 133; }


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

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

LLVM IR (-O0):
define i32 @do_133() {
ret i32 133
}

LLVM IR (-O2):
define i32 @do_133() {
ret i32 133
}
void ff_hevc_put_hevc_epel_v64_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_v64_10_sse4() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *open_skunk_file_desc(int /*<<< orphan*/);
FILE *skunk_stdin() { return open_skunk_file_desc(0); }


x86 assembly (clang, -O0):
<skunk_stdin>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <open_skunk_file_desc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<skunk_stdin>:
xor    %edi,%edi
jmp    1030 <open_skunk_file_desc@plt>

LLVM IR (-O0):
define i32* @skunk_stdin() {
%1 = call i32* @open_skunk_file_desc(i32 0)
ret i32* %1
}

LLVM IR (-O2):
define i32* @skunk_stdin() {
%1 = tail call i32* @open_skunk_file_desc(i32 0)
ret i32* %1
}
void transmit_usart(unsigned char data) {
  while (!(*((volatile unsigned char *)(0xC0)) & (1 << 5)))
    ;
  *((volatile unsigned char *)(0xC6)) = data;
}


x86 assembly (clang, -O0):
<transmit_usart>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0xc0,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0x20,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    112c <transmit_usart+0x2c>
jmp    1131 <transmit_usart+0x31>
jmp    110a <transmit_usart+0xa>
mov    -0x1(%rbp),%cl
mov    $0xc6,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<transmit_usart>:
testb  $0x20,0xc0
20
je     1100 <transmit_usart>
mov    %dil,0xc6
ret

LLVM IR (-O0):
define void @transmit_usart(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %9, %1
%4 = load volatile i8, i8* inttoptr (i64 192 to i8*)
%5 = zext i8 %4 to i32
%6 = and i32 %5, 32
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
br i1 %8, label %9, label %10
9: ; preds = %3
br label %3
10: ; preds = %3
%11 = load i8, i8* %2
store volatile i8 %11, i8* inttoptr (i64 198 to i8*)
ret void
}

LLVM IR (-O2):
define void @transmit_usart(i8 zeroext %0) {
br label %2
2: ; preds = %2, %1
%3 = load volatile i8, i8* inttoptr (i64 192 to i8*)
%4 = and i8 %3, 32
%5 = icmp eq i8 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
store volatile i8 %0, i8* inttoptr (i64 198 to i8*)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *, int);
void stretch_help(FILE *file, char *basename, char *cmd) {
  fprintf(
      file,
      "Usage: %s %s [options] [file...]\n\n"
      "Options:\n"
      "    -o <output>         Output JPEG file\n"
      "    -q <quality>        Output JPEG quality from 0 to 100 (default: "
      "%d)\n"
      "    -c <black>[:white]  Stretch contrast; black and white points could "
      "be pixel value or percentage calculated from first frame.\n"
      "    -t <begin>:<end>    Treat file name as template, e.g. '%%08d.JPG'.\n"
      "\n",
      basename, cmd, 98);
}


x86 assembly (clang, -O0):
<stretch_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xec9(%rip),%rsi
mov    $0x62,%r8d
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stretch_help>:
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xee3(%rip),%rsi
mov    $0x62,%r8d
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [358 x i8] c"Usage: %s %s [options] [file...]\0A\0AOptions:\0A -o <output> Output JPEG file\0A -q <quality> Output JPEG quality from 0 to 100 (default: %d)\0A -c <black>[:white] Stretch contrast; black and white points could be pixel value or percentage calculated from first frame.\0A -t <begin>:<end> Treat file name as template, e.g. '%%08d.JPG'.\0A\0A\00"
define void @stretch_help(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([358 x i8], [358 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i32 98)
ret void
}

LLVM IR (-O2):
@.str = [358 x i8] c"Usage: %s %s [options] [file...]\0A\0AOptions:\0A -o <output> Output JPEG file\0A -q <quality> Output JPEG quality from 0 to 100 (default: %d)\0A -c <black>[:white] Stretch contrast; black and white points could be pixel value or percentage calculated from first frame.\0A -t <begin>:<end> Treat file name as template, e.g. '%%08d.JPG'.\0A\0A\00"
define void @stretch_help(i32* nocapture %0, i8* %1, i8* %2) {
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([358 x i8], [358 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i32 98)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
void get_input(char *file_dest) {
  printf("Please input the directory of the target file:\n");
  scanf("%s", file_dest);
}


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

x86 assembly (clang, -O2):
<get_input>:
push   %rbx
mov    %rdi,%rbx
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <scanf@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"Please input the directory of the target file:\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define void @get_input(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@str = [47 x i8] c"Please input the directory of the target file:\00"
define void @get_input(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
int id(int value) { return value; }


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

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

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

LLVM IR (-O2):
define i32 @id(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ samba_get_version(char *, int);
int cmd_version(int argc, char *argv[]) {
  char buff[256];
  if (samba_get_version(buff, 256) < 0) {
    return -3;
  }
  printf("%s\n", buff);
  return 0;
}


x86 assembly (clang, -O0):
<cmd_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
mov    $0x100,%esi
call   1040 <samba_get_version@plt>
cmp    $0x0,%rax
jge    1159 <cmd_version+0x39>
movl   $0xfffffffd,-0x4(%rbp)
jmp    1173 <cmd_version+0x53>
lea    -0x110(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_version>:
sub    $0x108,%rsp
mov    %rsp,%rdi
mov    $0x100,%esi
call   1040 <samba_get_version@plt>
test   %rax,%rax
js     1152 <cmd_version+0x32>
lea    0xec0(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x108,%rsp
ret
mov    $0xfffffffd,%eax
add    $0x108,%rsp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @cmd_version(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i64 @samba_get_version(i8* %4, i32 256)
%6 = icmp slt i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ 0, %7 ], [ -3, %2 ]
ret i32 %10
}
double y1(double x) { return 0.0; }


x86 assembly (clang, -O0):
<y1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<y1>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @y1(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @y1(double %0) {
ret double 0.000000e+00
}
int name_is_nis(const char *n) { return (n[0] == '+' || n[0] == '-'); }


x86 assembly (clang, -O0):
<name_is_nis>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x2b,%ecx
mov    %al,-0x9(%rbp)
je     112d <name_is_nis+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<name_is_nis>:
mov    (%rdi),%cl
add    $0xd5,%cl
xor    %eax,%eax
test   $0xfd,%cl
sete   %al
ret

LLVM IR (-O0):
define i32 @name_is_nis(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 43
br i1 %7, label %14, label %8
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 45
br label %14
14: ; preds = %8, %1
%15 = phi i1 [ true, %1 ], [ %13, %8 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @name_is_nis(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 43
%4 = icmp eq i8 %2, 45
%5 = or i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_apple() { printf("Hi, I am a apple!\n"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"Hi, I am a apple!\0A\00"
define void @print_apple() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"Hi, I am a apple!\00"
define void @print_apple() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
const void omp_set_num_threads(int i) {}


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

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

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

LLVM IR (-O2):
define void @omp_set_num_threads(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fileno(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ setupterm(int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/ *);
int /*<<< orphan*/ stdout;
int main(void) {
  setupterm(NULL, fileno(stdout), NULL);
  printf("Done\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
call   1050 <fileno@plt>
mov    %eax,%esi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rdi
call   1030 <setupterm@plt>
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1050 <fileno@plt>
xor    %edi,%edi
mov    %eax,%esi
xor    %edx,%edx
call   1030 <setupterm@plt>
lea    0xeaf(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@stdout = global i32 0
@str = [5 x i8] c"Done\00"
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fileno(i32 %1)
%3 = tail call i32 @setupterm(i32* null, i32 %2, i32* null)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int test_imm_FDuint8_reg(unsigned char val) {
  return ((val) & (0xFD << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_FDuint8_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, 253
%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_FDuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -3
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
float dfunction_binary(float fx) { return fx * (1 - fx); }


x86 assembly (clang, -O0):
<dfunction_binary>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
subss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dfunction_binary>:
movss  0xef8(%rip),%xmm1
subss  %xmm0,%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @dfunction_binary(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fsub float 1.000000e+00, %4
%6 = fmul float %3, %5
ret float %6
}

LLVM IR (-O2):
define float @dfunction_binary(float %0) {
%2 = fsub float 1.000000e+00, %0
%3 = fmul float %2, %0
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ vfree(void *);
void ckfree(void *ptr) { vfree(ptr); }


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

x86 assembly (clang, -O2):
<ckfree>:
jmp    1030 <vfree@plt>

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

LLVM IR (-O2):
define void @ckfree(i8* %0) {
%2 = tail call i32 @vfree(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ unlink(char *);
void fun(int sig) {
  unlink("a.txt");
  exit(0);
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <unlink@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fun>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <unlink@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"a.txt\00"
define void @fun(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @unlink(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [6 x i8] c"a.txt\00"
define void @fun(i32 %0) {
%2 = tail call i32 @unlink(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct _stringpool {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _pbcS_delete(struct _stringpool *);
void free_stringpool(void *p) { _pbcS_delete((struct _stringpool *)p); }


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

x86 assembly (clang, -O2):
<free_stringpool>:
jmp    1030 <_pbcS_delete@plt>

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

LLVM IR (-O2):
%struct._stringpool = type { i32 }
define void @free_stringpool(i8* %0) {
%2 = bitcast i8* %0 to %struct._stringpool*
%3 = tail call i32 @_pbcS_delete(%struct._stringpool* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_it;
PKCS7 *d2i_PKCS7(PKCS7 **a, const unsigned char **in, long len) {
  return (PKCS7 *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &PKCS7_it);
}


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

x86 assembly (clang, -O2):
<d2i_PKCS7>:
mov    0x2ec9(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@PKCS7_it = global i32 0
define i32* @d2i_PKCS7(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @PKCS7_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@PKCS7_it = global i32 0
define i32* @d2i_PKCS7(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @PKCS7_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
/* Type definitions */
struct inode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __mark_inode_dirty(struct inode *, int);
void mark_inode_dirty(struct inode *inode) {
  __mark_inode_dirty(inode, (1 | 2 | 4));
}


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

x86 assembly (clang, -O2):
<mark_inode_dirty>:
mov    $0x7,%esi
jmp    1030 <__mark_inode_dirty@plt>

LLVM IR (-O0):
%struct.inode = type { i32 }
define void @mark_inode_dirty(%struct.inode* %0) {
%2 = alloca %struct.inode*
store %struct.inode* %0, %struct.inode** %2
%3 = load %struct.inode*, %struct.inode** %2
%4 = call i32 @__mark_inode_dirty(%struct.inode* %3, i32 7)
ret void
}

LLVM IR (-O2):
%struct.inode = type { i32 }
define void @mark_inode_dirty(%struct.inode* %0) {
%2 = tail call i32 @__mark_inode_dirty(%struct.inode* %0, i32 7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void use(int argc) {
  if (argc <= 1) {
    printf("Modo de uso:\n");
    printf("$ ./main <nome_do_arquivo> \n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<use>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jg     1157 <use+0x37>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<use>:
cmp    $0x1,%edi
jle    1126 <use+0x6>
ret
push   %rax
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Modo de uso:\0A\00"
@.str.1 = [29 x i8] c"$ ./main <nome_do_arquivo> \0A\00"
define void @use(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 1
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"Modo de uso:\00"
@str.2 = [28 x i8] c"$ ./main <nome_do_arquivo> \00"
define void @use(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.2, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret void
}