xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ DestroyDisplayedBrowse();
int /*<<< orphan*/ GetTopImpNode(int);
int /*<<< orphan*/ Popup_Info(char *);
int /*<<< orphan*/ card_gset1(int *);
int /*<<< orphan*/ inc_htx_curr_obj();
int /*<<< orphan*/ load_gset1_top_imp_nodes();
void htx_design_but_CB() {
  int nn;
  load_gset1_top_imp_nodes();
  card_gset1(&nn);
  if (!nn) {
    Popup_Info("No design to display   ");
  } else {
    DestroyDisplayedBrowse();
    inc_htx_curr_obj();
    GetTopImpNode(nn);
  }
}


x86 assembly (clang, -O0):
<htx_design_but_CB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <load_gset1_top_imp_nodes@plt>
lea    -0x4(%rbp),%rdi
call   1070 <card_gset1@plt>
cmpl   $0x0,-0x4(%rbp)
jne    1193 <htx_design_but_CB+0x33>
lea    0xe77(%rip),%rdi
call   1050 <Popup_Info@plt>
jmp    11a9 <htx_design_but_CB+0x49>
mov    $0x0,%al
call   1080 <DestroyDisplayedBrowse@plt>
mov    $0x0,%al
call   1040 <inc_htx_curr_obj@plt>
mov    -0x4(%rbp),%edi
call   1030 <GetTopImpNode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<htx_design_but_CB>:
push   %rax
xor    %eax,%eax
call   1060 <load_gset1_top_imp_nodes@plt>
lea    0x4(%rsp),%rdi
call   1070 <card_gset1@plt>
cmpl   $0x0,0x4(%rsp)
je     1192 <htx_design_but_CB+0x32>
xor    %eax,%eax
call   1080 <DestroyDisplayedBrowse@plt>
xor    %eax,%eax
call   1040 <inc_htx_curr_obj@plt>
mov    0x4(%rsp),%edi
call   1030 <GetTopImpNode@plt>
pop    %rax
ret
lea    0xe67(%rip),%rdi
call   1050 <Popup_Info@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [24 x i8] c"No design to display \00"
define void @htx_design_but_CB() {
%1 = alloca i32
%2 = call i32 (...) @load_gset1_top_imp_nodes()
%3 = call i32 @card_gset1(i32* %1)
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 @Popup_Info(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %13
8: ; preds = %0
%9 = call i32 (...) @DestroyDisplayedBrowse()
%10 = call i32 (...) @inc_htx_curr_obj()
%11 = load i32, i32* %1
%12 = call i32 @GetTopImpNode(i32 %11)
br label %13
13: ; preds = %8, %6
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"No design to display \00"
define void @htx_design_but_CB() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (...) @load_gset1_top_imp_nodes()
%4 = call i32 @card_gset1(i32* %1)
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @Popup_Info(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %14
9: ; preds = %0
%10 = call i32 (...) @DestroyDisplayedBrowse()
%11 = call i32 (...) @inc_htx_curr_obj()
%12 = load i32, i32* %1
%13 = call i32 @GetTopImpNode(i32 %12)
br label %14
14: ; preds = %9, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int algorithm_func(void) {
  printf("Hello world\n");
  return (0);
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello world\00"
define i32 @algorithm_func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_get_protocol_version() {
  printf("NOT IMPLEMENTED:"
         "pa_context_get_protocol_version"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [49 x i8] c"NOT IMPLEMENTED:pa_context_get_protocol_version\0A\00"
define i32 @pa_context_get_protocol_version() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [48 x i8] c"NOT IMPLEMENTED:pa_context_get_protocol_version\00"
define i32 @pa_context_get_protocol_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
scalar_t__ CC3RandomUInt();
double CC3RandomDouble() {
  return (double)CC3RandomUInt() / (double)0x100000000LL;
}


x86 assembly (clang, -O0):
<CC3RandomDouble>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <CC3RandomUInt@plt>
cvtsi2sd %rax,%xmm0
movsd  0xed8(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<CC3RandomDouble>:
push   %rax
xor    %eax,%eax
call   1030 <CC3RandomUInt@plt>
cvtsi2sd %rax,%xmm0
mulsd  0xedb(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @CC3RandomDouble() {
%1 = call i64 (...) @CC3RandomUInt()
%2 = sitofp i64 %1 to double
%3 = fdiv double %2, 0x41F0000000000000
ret double %3
}

LLVM IR (-O2):
define double @CC3RandomDouble() {
%1 = tail call i64 (...) @CC3RandomUInt()
%2 = sitofp i64 %1 to double
%3 = fmul double %2, 0x3DF0000000000000
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ printf(char *, int);
scalar_t__ read(int /*<<< orphan*/, char *, int);
int tolower(char);
int main(int argc, const char *argv[]) {
  char ch;
  while (read(STDIN_FILENO, &ch, 1) > 0) {
    printf("%c", tolower(ch));
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    -0x11(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
cmp    $0x0,%rax
jle    1183 <main+0x53>
movsbl -0x11(%rbp),%edi
call   1050 <tolower@plt>
mov    %eax,%esi
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
jmp    1146 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    0x2ea0(%rip),%r15
mov    (%r15),%edi
lea    0xf(%rsp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
test   %rax,%rax
jle    1199 <main+0x69>
lea    0xea2(%rip),%r14
lea    0xf(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl 0xf(%rsp),%edi
call   1050 <tolower@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    (%r15),%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1040 <read@plt>
test   %rax,%rax
jg     1170 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
@.str = [3 x i8] c"%c\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8
%4 = load i32, i32* @STDIN_FILENO
%5 = call i64 @read(i32 %4, i8* %3, i32 1)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %2, %7
%8 = load i8, i8* %3
%9 = tail call i32 @tolower(i8 signext %8)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @STDIN_FILENO
%12 = call i64 @read(i32 %11, i8* %3, i32 1)
%13 = icmp sgt i64 %12, 0
br i1 %13, label %7, label %14
14: ; preds = %7, %2
ret i32 0
}
/* Variables and functions */
scalar_t__ wad_segment_find(void *);
int wad_segment_valid(void *vaddr) { return wad_segment_find(vaddr) ? 1 : 0; }


x86 assembly (clang, -O0):
<wad_segment_valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <wad_segment_find@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wad_segment_valid>:
push   %rax
call   1030 <wad_segment_find@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @wad_segment_valid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @wad_segment_find(i8* %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 1, i32 0
ret i32 %7
}

LLVM IR (-O2):
define i32 @wad_segment_valid(i8* %0) {
%2 = tail call i64 @wad_segment_find(i8* %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned int uint_min(unsigned int x, unsigned int y) { return x < y ? x : y; }


x86 assembly (clang, -O0):
<uint_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1121 <uint_min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <uint_min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint_min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @uint_min(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 = icmp ult i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @uint_min(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int _execve_r(struct _reent *r, char *name, char **argv, char **env) {
  return -1;
}


x86 assembly (clang, -O0):
<_execve_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._reent = type opaque
define i32 @_execve_r(%struct._reent* %0, i8* %1, i8** %2, i8** %3) {
%5 = alloca %struct._reent*
%6 = alloca i8*
%7 = alloca i8**
%8 = alloca i8**
store %struct._reent* %0, %struct._reent** %5
store i8* %1, i8** %6
store i8** %2, i8*** %7
store i8** %3, i8*** %8
ret i32 -1
}

LLVM IR (-O2):
%struct._reent = type opaque
define i32 @_execve_r(%struct._reent* nocapture readnone %0, i8* nocapture readnone %1, i8** nocapture readnone %2, i8** nocapture readnone %3) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int yyparse();
int main(void) {
  printf("> ");
  return yyparse();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <yyparse@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <yyparse@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"> \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @yyparse()
ret i32 %2
}
/* Type definitions */
struct rlimit {
  int dummy;
};
typedef enum __rlimit_resource {
  ____Placeholder___rlimit_resource
} __rlimit_resource;
typedef int /*<<< orphan*/ __pid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int INLINE_SYSCALL_ERROR_RETURN_VALUE(int /*<<< orphan*/);
int prlimit(__pid_t pid, enum __rlimit_resource resource,
            const struct rlimit *new_rlimit, struct rlimit *old_rlimit) {
  return INLINE_SYSCALL_ERROR_RETURN_VALUE(ENOSYS);
}


x86 assembly (clang, -O0):
<prlimit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
call   1030 <INLINE_SYSCALL_ERROR_RETURN_VALUE@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.rlimit = type { i32 }
@ENOSYS = global i32 0
define i32 @prlimit(i32 %0, i32 %1, %struct.rlimit* %2, %struct.rlimit* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.rlimit*
%8 = alloca %struct.rlimit*
store i32 %0, i32* %5
store i32 %1, i32* %6
store %struct.rlimit* %2, %struct.rlimit** %7
store %struct.rlimit* %3, %struct.rlimit** %8
%9 = load i32, i32* @ENOSYS
%10 = call i32 @INLINE_SYSCALL_ERROR_RETURN_VALUE(i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.rlimit = type { i32 }
@ENOSYS = global i32 0
define i32 @prlimit(i32 %0, i32 %1, %struct.rlimit* nocapture readnone %2, %struct.rlimit* nocapture readnone %3) {
%5 = load i32, i32* @ENOSYS
%6 = tail call i32 @INLINE_SYSCALL_ERROR_RETURN_VALUE(i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void print_usage(const char *prog) {
  fprintf(stderr, "Usage:\n\t%s cmd args...\n", prog);
  fprintf(stderr, "\t%s -c 'shell cmd string'\n", prog);
}


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

x86 assembly (clang, -O2):
<print_usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%edi
lea    0xed8(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xede(%rip),%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Usage:\0A\09%s cmd args...\0A\00"
@.str.1 = [27 x i8] c"\09%s -c 'shell cmd string'\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Usage:\0A\09%s cmd args...\0A\00"
@.str.1 = [27 x i8] c"\09%s -c 'shell cmd string'\0A\00"
define void @print_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
int fun673() { return 673; }


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

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

LLVM IR (-O0):
define i32 @fun673() {
ret i32 673
}

LLVM IR (-O2):
define i32 @fun673() {
ret i32 673
}
unsigned char answer_9(int arg0) { return 0; }


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

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

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

LLVM IR (-O2):
define zeroext i8 @answer_9(i32 %0) {
ret i8 0
}
/* Variables and functions */
int /*<<< orphan*/ setArgumentSeparator(int);
int /*<<< orphan*/ setArgumentUnsignedHex2(int, char *);
int /*<<< orphan*/ setFunction(char *, int, int /*<<< orphan*/);
void serialDebugCharFunctionArgument(char *functionName) {
  setFunction(functionName, 3, 0);
  setArgumentUnsignedHex2(0, "serialPort");
  setArgumentSeparator(1);
  setArgumentUnsignedHex2(2, "char");
}


x86 assembly (clang, -O0):
<serialDebugCharFunctionArgument>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
xor    %edx,%edx
call   1050 <setFunction@plt>
xor    %edi,%edi
lea    0xeab(%rip),%rsi
call   1040 <setArgumentUnsignedHex2@plt>
mov    $0x1,%edi
call   1030 <setArgumentSeparator@plt>
mov    $0x2,%edi
lea    0xe9b(%rip),%rsi
call   1040 <setArgumentUnsignedHex2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialDebugCharFunctionArgument>:
push   %rax
mov    $0x3,%esi
xor    %edx,%edx
call   1050 <setFunction@plt>
lea    0xebc(%rip),%rsi
xor    %edi,%edi
call   1040 <setArgumentUnsignedHex2@plt>
mov    $0x1,%edi
call   1030 <setArgumentSeparator@plt>
lea    0xeaf(%rip),%rsi
mov    $0x2,%edi
pop    %rax
jmp    1040 <setArgumentUnsignedHex2@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"serialPort\00"
@.str.1 = [5 x i8] c"char\00"
define void @serialDebugCharFunctionArgument(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @setFunction(i8* %3, i32 3, i32 0)
%5 = call i32 @setArgumentUnsignedHex2(i32 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @setArgumentSeparator(i32 1)
%7 = call i32 @setArgumentUnsignedHex2(i32 2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"serialPort\00"
@.str.1 = [5 x i8] c"char\00"
define void @serialDebugCharFunctionArgument(i8* %0) {
%2 = tail call i32 @setFunction(i8* %0, i32 3, i32 0)
%3 = tail call i32 @setArgumentUnsignedHex2(i32 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @setArgumentSeparator(i32 1)
%5 = tail call i32 @setArgumentUnsignedHex2(i32 2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int f_round(int /*<<< orphan*/);
int /*<<< orphan*/ floorf(float);
int f_trunc(float f) { return f_round(floorf(f)); }


x86 assembly (clang, -O0):
<f_trunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <floorf@plt>
mov    %eax,%edi
call   1030 <f_round@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f_trunc(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @floorf(float %3)
%5 = call i32 @f_round(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @f_trunc(float %0) {
%2 = tail call i32 @floorf(float %0)
%3 = tail call i32 @f_round(i32 %2)
ret i32 %3
}
/* Variables and functions */
int ualarm(int, int /*<<< orphan*/);
int Ualarm(int usecs) { return ualarm(usecs, 0); }


x86 assembly (clang, -O0):
<Ualarm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <ualarm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ualarm>:
xor    %esi,%esi
jmp    1030 <ualarm@plt>

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

LLVM IR (-O2):
define i32 @Ualarm(i32 %0) {
%2 = tail call i32 @ualarm(i32 %0, i32 0)
ret i32 %2
}
short int byteToIntShort(unsigned char *bytefield) {
  return (((unsigned int)(bytefield[1]) * 256) + (unsigned int)(bytefield[0]));
}


x86 assembly (clang, -O0):
<byteToIntShort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
add    %ecx,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<byteToIntShort>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define signext i16 @byteToIntShort(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = mul i32 %6, 256
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = add i32 %7, %11
%13 = trunc i32 %12 to i16
ret i16 %13
}

LLVM IR (-O2):
define signext i16 @byteToIntShort(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = zext i8 %3 to i16
%5 = shl nuw i16 %4, 8
%6 = load i8, i8* %0
%7 = zext i8 %6 to i16
%8 = or i16 %5, %7
ret i16 %8
}
void prcmu_debug_dump_regs(void) {}


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

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

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

LLVM IR (-O2):
define void @prcmu_debug_dump_regs() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ malloc(unsigned long);
int /*<<< orphan*/ memset(unsigned long *, int, unsigned long);
unsigned long *pmalloc(unsigned long size) {
  unsigned long *rc;
  if (!(rc = (unsigned long *)malloc(size))) {
    exit(0x1);
  }
  memset(rc, 0x0, size);
  return rc;
}


x86 assembly (clang, -O0):
<pmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    115d <pmalloc+0x2d>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
test   %rax,%rax
je     115c <pmalloc+0x2c>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
define i64* @pmalloc(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = inttoptr i64 %2 to i64*
%4 = icmp eq i64 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
%8 = tail call i32 @memset(i64* %3, i32 0, i64 %0)
ret i64* %3
}
void BrzConstant_ackup(struct comp *comp, int port) {}


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

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

LLVM IR (-O0):
%struct.comp = type opaque
define void @BrzConstant_ackup(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.comp = type opaque
define void @BrzConstant_ackup(%struct.comp* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
void *tdefl_write_image_to_png_file_in_memory_ex(void const *, int, int, int,
                                                 size_t *, int,
                                                 int /*<<< orphan*/);
void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h,
                                              int num_chans, size_t *pLen_out) {
  return tdefl_write_image_to_png_file_in_memory_ex(pImage, w, h, num_chans,
                                                    pLen_out, 6, (0));
}


x86 assembly (clang, -O0):
<tdefl_write_image_to_png_file_in_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    $0x6,%r9d
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1030 <tdefl_write_image_to_png_file_in_memory_ex@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tdefl_write_image_to_png_file_in_memory>:
push   %rax
movl   $0x0,(%rsp)
mov    $0x6,%r9d
call   1030 <tdefl_write_image_to_png_file_in_memory_ex@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i8* @tdefl_write_image_to_png_file_in_memory(i8* %0, i32 %1, i32 %2, i32 %3, i64* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i64* %4, i64** %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i64*, i64** %10
%16 = call i8* @tdefl_write_image_to_png_file_in_memory_ex(i8* %11, i32 %12, i32 %13, i32 %14, i64* %15, i32 6, i32 0)
ret i8* %16
}

LLVM IR (-O2):
define i8* @tdefl_write_image_to_png_file_in_memory(i8* %0, i32 %1, i32 %2, i32 %3, i64* %4) {
%6 = tail call i8* @tdefl_write_image_to_png_file_in_memory_ex(i8* %0, i32 %1, i32 %2, i32 %3, i64* %4, i32 6, i32 0)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ sha256_process_bytes(unsigned char const *, unsigned int,
                                        void *);
void sha256_update(void *context, unsigned char const *buf, unsigned int len) {
  sha256_process_bytes(buf, len, context);
}


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

x86 assembly (clang, -O2):
<sha256_update>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <sha256_process_bytes@plt>

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

LLVM IR (-O2):
define void @sha256_update(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @sha256_process_bytes(i8* %1, i32 %2, i8* %0)
ret void
}
/* Type definitions */
struct vink_message {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vink_message_free(struct vink_message *);
void email_message(struct vink_message *message) { vink_message_free(message); }


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

x86 assembly (clang, -O2):
<email_message>:
jmp    1030 <vink_message_free@plt>

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

LLVM IR (-O2):
%struct.vink_message = type { i32 }
define void @email_message(%struct.vink_message* %0) {
%2 = tail call i32 @vink_message_free(%struct.vink_message* %0)
ret void
}
/* Variables and functions */
int __syscall3(int, unsigned long, unsigned long, unsigned long);
int _syscall3(int nr, unsigned long a, unsigned long b, unsigned long c) {
  return __syscall3(nr, a, b, c);
}


x86 assembly (clang, -O0):
<_syscall3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <__syscall3@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall3>:
jmp    1030 <__syscall3@plt>

LLVM IR (-O0):
define i32 @_syscall3(i32 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i32
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32 %0, i32* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i32, i32* %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i64, i64* %8
%13 = call i32 @__syscall3(i32 %9, i64 %10, i64 %11, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @_syscall3(i32 %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i32 @__syscall3(i32 %0, i64 %1, i64 %2, i64 %3)
ret i32 %5
}
/* Type definitions */
struct tcb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CDE_end_readlink_internal(struct tcb *, int, int);
void CDE_end_readlinkat(struct tcb *tcp) {
  CDE_end_readlink_internal(tcp, 1, 2);
}


x86 assembly (clang, -O0):
<CDE_end_readlinkat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <CDE_end_readlink_internal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CDE_end_readlinkat>:
mov    $0x1,%esi
mov    $0x2,%edx
jmp    1030 <CDE_end_readlink_internal@plt>

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

LLVM IR (-O2):
%struct.tcb = type { i32 }
define void @CDE_end_readlinkat(%struct.tcb* %0) {
%2 = tail call i32 @CDE_end_readlink_internal(%struct.tcb* %0, i32 1, i32 2)
ret void
}
void rop3_19_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D & T;
  stk1 = S | stk2;
  stk1 = ~stk1;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_19_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_19_0_1>:
not    %sil
not    %dl
or     (%rdi),%dl
and    %sil,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_19_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = and i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %5
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = and i32 %27, %29
%31 = load i8, i8* %7
%32 = zext i8 %31 to i32
%33 = load i8, i8* %6
%34 = zext i8 %33 to i32
%35 = xor i32 %34, -1
%36 = and i32 %32, %35
%37 = or i32 %30, %36
%38 = load i8, i8* %6
%39 = zext i8 %38 to i32
%40 = load i8, i8* %5
%41 = zext i8 %40 to i32
%42 = xor i32 %41, -1
%43 = and i32 %39, %42
%44 = load i8*, i8** %4
%45 = load i8, i8* %44
%46 = zext i8 %45 to i32
%47 = and i32 %43, %46
%48 = or i32 %37, %47
%49 = trunc i32 %48 to i8
%50 = load i8*, i8** %4
store i8 %49, i8* %50
ret void
}

LLVM IR (-O2):
define void @rop3_19_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %1, -1
%6 = xor i8 %2, -1
%7 = or i8 %4, %6
%8 = and i8 %7, %5
store i8 %8, i8* %0
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int read_dobldobl_target_Laurent_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(765, a, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<read_dobldobl_target_Laurent_system>:
mov    $0x2fd,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @read_dobldobl_target_Laurent_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 765, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
struct stream {
  int dummy;
};

/* Variables and functions */
int decode_cancel(unsigned char const *, struct stream *);
int decode_cancel_format_1(const unsigned char *pkt, struct stream *stream) {
  return decode_cancel(pkt, stream);
}


x86 assembly (clang, -O0):
<decode_cancel_format_1>:
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 <decode_cancel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_cancel_format_1>:
jmp    1030 <decode_cancel@plt>

LLVM IR (-O0):
%struct.stream = type { i32 }
define i32 @decode_cancel_format_1(i8* %0, %struct.stream* %1) {
%3 = alloca i8*
%4 = alloca %struct.stream*
store i8* %0, i8** %3
store %struct.stream* %1, %struct.stream** %4
%5 = load i8*, i8** %3
%6 = load %struct.stream*, %struct.stream** %4
%7 = call i32 @decode_cancel(i8* %5, %struct.stream* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stream = type { i32 }
define i32 @decode_cancel_format_1(i8* %0, %struct.stream* %1) {
%3 = tail call i32 @decode_cancel(i8* %0, %struct.stream* %1)
ret i32 %3
}
/* Variables and functions */
int next_utf8(char const *, int *);
int fn_ch_64(const char *text) {
  int pos = 0;
  if (next_utf8(text, &pos) == 64)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_ch_64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <next_utf8@plt>
cmp    $0x40,%eax
jne    1144 <fn_ch_64+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_ch_64+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_ch_64>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <next_utf8@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x40,%ecx
jne    1133 <fn_ch_64+0x23>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fn_ch_64(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @next_utf8(i8* %5, i32* %4)
%7 = icmp eq i32 %6, 64
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32, i32* %4
store i32 %9, i32* %2
br label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %11
11: ; preds = %10, %8
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @fn_ch_64(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @next_utf8(i8* %0, i32* %2)
%5 = icmp eq i32 %4, 64
%6 = load i32, i32* %2
%7 = select i1 %5, i32 %6, i32 -1
ret i32 %7
}
/* Type definitions */
struct ringbuf_t {
  int dummy;
};

/* Variables and functions */
scalar_t__ ringbuf_bytes_free(struct ringbuf_t const *);
int ringbuf_is_full(const struct ringbuf_t *rb) {
  return ringbuf_bytes_free(rb) == 0;
}


x86 assembly (clang, -O0):
<ringbuf_is_full>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ringbuf_bytes_free@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ringbuf_t = type { i32 }
define i32 @ringbuf_is_full(%struct.ringbuf_t* %0) {
%2 = alloca %struct.ringbuf_t*
store %struct.ringbuf_t* %0, %struct.ringbuf_t** %2
%3 = load %struct.ringbuf_t*, %struct.ringbuf_t** %2
%4 = call i64 @ringbuf_bytes_free(%struct.ringbuf_t* %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
%struct.ringbuf_t = type { i32 }
define i32 @ringbuf_is_full(%struct.ringbuf_t* %0) {
%2 = tail call i64 @ringbuf_bytes_free(%struct.ringbuf_t* %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ move(int, int, int, int);
int main() {
  move(3, 1, 3, 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edx
mov    $0x1,%esi
mov    $0x2,%ecx
mov    %edx,%edi
call   1030 <move@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x1,%esi
mov    $0x3,%edx
mov    $0x2,%ecx
call   1030 <move@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @move(i32 3, i32 1, i32 3, i32 2)
ret i32 0
}
/* Variables and functions */
double generalized_dimension(double const *const *, int, int, double, int,
                             int *);
double information_dimension(const double *const *data, int t, int n,
                             double epsilon, int *box_num) {
  return generalized_dimension(data, t, n, epsilon, 1, box_num);
}


x86 assembly (clang, -O0):
<information_dimension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
movsd  -0x18(%rbp),%xmm0
mov    -0x20(%rbp),%r8
mov    $0x1,%ecx
call   1030 <generalized_dimension@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<information_dimension>:
mov    %rcx,%r8
mov    $0x1,%ecx
jmp    1030 <generalized_dimension@plt>

LLVM IR (-O0):
define double @information_dimension(double** %0, i32 %1, i32 %2, double %3, i32* %4) {
%6 = alloca double**
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
%10 = alloca i32*
store double** %0, double*** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store double %3, double* %9
store i32* %4, i32** %10
%11 = load double**, double*** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load double, double* %9
%15 = load i32*, i32** %10
%16 = call double @generalized_dimension(double** %11, i32 %12, i32 %13, double %14, i32 1, i32* %15)
ret double %16
}

LLVM IR (-O2):
define double @information_dimension(double** %0, i32 %1, i32 %2, double %3, i32* %4) {
%6 = tail call double @generalized_dimension(double** %0, i32 %1, i32 %2, double %3, i32 1, i32* %4)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void __svgalib_memcpy32shift8(void *dest, void *src, int n) {
  printf("libgl: __svgalib_memcpy32shift8 not done yet\n");
}


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"libgl: __svgalib_memcpy32shift8 not done yet\0A\00"
define void @__svgalib_memcpy32shift8(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [45 x i8] c"libgl: __svgalib_memcpy32shift8 not done yet\00"
define void @__svgalib_memcpy32shift8(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
ret void
}
void avformat_match_stream_specifier() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int file_exists(const char *filename) {
  FILE *fp = fopen(filename, "r");
  if (fp) {
    fclose(fp);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1160 <file_exists+0x40>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    1167 <file_exists+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <file_exists+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @file_exists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int _mm_extract_ps(int /*<<< orphan*/, int);
int test_mm_extract_ps(__m128 x) { return _mm_extract_ps(x, 1); }


x86 assembly (clang, -O0):
<test_mm_extract_ps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <_mm_extract_ps@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_extract_ps>:
mov    $0x1,%esi
jmp    1030 <_mm_extract_ps@plt>

LLVM IR (-O0):
define i32 @test_mm_extract_ps(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_mm_extract_ps(i32 %3, i32 1)
ret i32 %4
}

LLVM IR (-O2):
define i32 @test_mm_extract_ps(i32 %0) {
%2 = tail call i32 @_mm_extract_ps(i32 %0, i32 1)
ret i32 %2
}
/* Variables and functions */
unsigned int bar();
void foo0x7f(void) {
  unsigned int a = bar();
  if (a <= 0x7f)
    bar();
}


x86 assembly (clang, -O0):
<foo0x7f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <bar@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x7f,-0x4(%rbp)
ja     1133 <foo0x7f+0x23>
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo0x7f>:
push   %rax
xor    %eax,%eax
call   1030 <bar@plt>
cmp    $0x7f,%eax
ja     1125 <foo0x7f+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <bar@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @foo0x7f() {
%1 = alloca i32
%2 = call i32 (...) @bar()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ule i32 %3, 127
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @bar()
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
define void @foo0x7f() {
%1 = tail call i32 (...) @bar()
%2 = icmp ult i32 %1, 128
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @bar()
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int rand();
int randInt(int limit) { return rand() % limit + 1; }


x86 assembly (clang, -O0):
<randInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randInt>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
lea    0x1(%rdx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @randInt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
%6 = add nsw i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @randInt(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
%4 = add nsw i32 %3, 1
ret i32 %4
}
int *unset_bit(int *bitset, char n) {
  register int mask = 1;
  (*bitset) &= ~(mask << n);
  return (bitset);
}


x86 assembly (clang, -O0):
<unset_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
movsbl -0x9(%rbp),%ecx
shl    %cl,%eax
mov    %eax,%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unset_bit>:
mov    %esi,%ecx
mov    $0xfffffffe,%edx
rol    %cl,%edx
mov    %rdi,%rax
and    %edx,(%rdi)
ret

LLVM IR (-O0):
define i32* @unset_bit(i32* %0, i8 signext %1) {
%3 = alloca i32*
%4 = alloca i8
%5 = alloca i32
store i32* %0, i32** %3
store i8 %1, i8* %4
store i32 1, i32* %5
%6 = load i32, i32* %5
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = shl i32 %6, %8
%10 = xor i32 %9, -1
%11 = load i32*, i32** %3
%12 = load i32, i32* %11
%13 = and i32 %12, %10
store i32 %13, i32* %11
%14 = load i32*, i32** %3
ret i32* %14
}

LLVM IR (-O2):
define i32* @unset_bit(i32* returned %0, i8 signext %1) {
%3 = zext i8 %1 to i32
%4 = shl nuw i32 1, %3
%5 = xor i32 %4, -1
%6 = load i32, i32* %0
%7 = and i32 %6, %5
store i32 %7, i32* %0
ret i32* %0
}