xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void mu_run_suite_impl(const char *name, void (*suite)()) {
  printf("\e[1m"
         "%s"
         "\e[0m"
         "\n",
         name);
  suite();
}


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

x86 assembly (clang, -O2):
<mu_run_suite_impl>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
mov    %rbx,%rcx
pop    %rbx
jmp    *%rcx

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

LLVM IR (-O2):
@.str = [12 x i8] c"\1B[1m%s\1B[0m\0A\00"
define void @mu_run_suite_impl(i8* %0, void (...)* nocapture %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
tail call void (...) %1()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ puts(char *);
int main() {
  char str[30];
  gets(str);
  puts(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
call   1040 <gets@plt>
lea    -0x30(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [30 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%4 = call i32 @gets(i8* %3)
%5 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%6 = call i32 @puts(i8* %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
%4 = call i32 @puts(i8* %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int safe_atoi(char const *, int *);
int safe_atoi32(const char *s, int32_t *ret_i) {
  do {
    switch (0) {
    case 0:
    case !!(sizeof(int32_t) == sizeof(int)):;
    }
  } while (false);
  return safe_atoi(s, (int *)ret_i);
}


x86 assembly (clang, -O0):
<safe_atoi32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
jmp    1125 <safe_atoi32+0x15>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <safe_atoi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_atoi32>:
jmp    1030 <safe_atoi@plt>

LLVM IR (-O0):
define i32 @safe_atoi32(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
br label %5
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i8*, i8** %3
%8 = load i32*, i32** %4
%9 = call i32 @safe_atoi(i8* %7, i32* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @safe_atoi32(i8* %0, i32* %1) {
%3 = tail call i32 @safe_atoi(i8* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void NW_DeviceRelease(int *fd) { close(*fd); }


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

x86 assembly (clang, -O2):
<NW_DeviceRelease>:
mov    (%rdi),%edi
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @NW_DeviceRelease(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @close(i32 %2)
ret void
}
/* Variables and functions */
char *getString(char **);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char inMain[255];
  char *string;
  string = getString(&inMain);
  printf("%s\n", string);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
lea    -0x100(%rbp),%rdi
call   1030 <getString@plt>
mov    %rax,-0x108(%rbp)
mov    -0x108(%rbp),%rsi
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x108,%rsp
mov    %rsp,%rdi
call   1030 <getString@plt>
lea    0xeca(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x108,%rsp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [255 x i8]
%2 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%3 = bitcast [255 x i8]* %1 to i8**
%4 = call i8* @getString(i8** %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Goticker();
int /*<<< orphan*/ usleep(int);
void cticker() {
  long i;
  for (i = 0; i++;) {
    usleep(1000);
    Goticker();
  }
}


x86 assembly (clang, -O0):
<cticker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmp    $0x0,%rax
je     115f <cticker+0x3f>
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    $0x0,%al
call   1030 <Goticker@plt>
jmp    1130 <cticker+0x10>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @cticker() {
%1 = alloca i64
store i64 0, i64* %1
br label %2
2: ; preds = %6, %0
%3 = load i64, i64* %1
%4 = add nsw i64 %3, 1
store i64 %4, i64* %1
%5 = icmp ne i64 %3, 0
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = call i32 @usleep(i32 1000)
%8 = call i32 (...) @Goticker()
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @cticker() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Sleep(unsigned int);
unsigned sleep(unsigned seconds) {
  Sleep(seconds * 1000);
  return 0;
}


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0x3e8,-0x4(%rbp),%edi
call   1030 <Sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
push   %rax
imul   $0x3e8,%edi,%edi
call   1030 <Sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 1000
%5 = call i32 @Sleep(i32 %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @sleep(i32 %0) {
%2 = mul i32 %0, 1000
%3 = tail call i32 @Sleep(i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void initialize_generator() { srand(time(NULL)); }


x86 assembly (clang, -O0):
<initialize_generator>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @initialize_generator() {
%1 = call i32 @time(i32* null)
%2 = call i32 @srand(i32 %1)
ret void
}

LLVM IR (-O2):
define void @initialize_generator() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_proplist_setp() {
  printf("NOT IMPLEMENTED:"
         "pa_proplist_setp"
         "\n");
}


x86 assembly (clang, -O0):
<pa_proplist_setp>:
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_proplist_setp>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_proplist_setp\00"
define i32 @pa_proplist_setp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void __isr_fault() {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<__isr_fault>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <__isr_fault+0x9>
jmp    1109 <__isr_fault+0x9>

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

LLVM IR (-O0):
define void @__isr_fault() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @__isr_fault() {
br label %1
1: ; preds = %0, %1
br label %1
}
int adv_eos(char *buffer, int *pos) {
  bwx_DEBUG(__FUNCTION__);
  while (buffer[*pos] != '\0')
    (*pos)++;
  return 0;
}


x86 assembly (clang, -O0):
<adv_eos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <bwx_DEBUG@plt>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1156 <adv_eos+0x46>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    112e <adv_eos+0x1e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adv_eos>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xedf(%rip),%rdi
xor    %eax,%eax
call   1030 <bwx_DEBUG@plt>
movslq (%rbx),%rcx
cmpb   $0x0,(%r14,%rcx,1)
je     114e <adv_eos+0x3e>
lea    (%rcx,%r14,1),%rax
add    $0x1,%rax
add    $0x1,%ecx
nopl   (%rax)
mov    %ecx,(%rbx)
add    $0x1,%ecx
cmpb   $0x0,(%rax)
lea    0x1(%rax),%rax
jne    1140 <adv_eos+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@__FUNCTION__.adv_eos = [8 x i8] c"adv_eos\00"
define i32 @adv_eos(i8* nocapture %0, i32* nocapture %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__FUNCTION__.adv_eos, i64 0, i64 0))
%4 = load i32, i32* %1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %2, %9
%10 = phi i64 [ %11, %9 ], [ %5, %2 ]
%11 = add i64 %10, 1
%12 = trunc i64 %11 to i32
store i32 %12, i32* %1
%13 = getelementptr inbounds i8, i8* %0, i64 %11
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %9
16: ; preds = %9, %2
ret i32 0
}
/* Variables and functions */
char *get_sata_log(int, int);
char *get_sata_statlog(int fd) { return (get_sata_log(fd, 0x01)); }


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

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

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

LLVM IR (-O2):
define i8* @get_sata_statlog(i32 %0) {
%2 = tail call i8* @get_sata_log(i32 %0, i32 1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void progress(float complete, void *data) {
  fprintf(stderr, "\rxyz2kdt: %3.0f%% complete    ",
          (complete > 1. ? 1. : complete) * 100.);
}


x86 assembly (clang, -O0):
<progress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec2(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    115a <progress+0x4a>
movsd  0xeb0(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1168 <progress+0x58>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x14(%rbp),%edi
movsd  -0x20(%rbp),%xmm0
movsd  0xe90(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edx
lea    0xe89(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<progress>:
mov    0x2ec9(%rip),%rax
cvtss2sd %xmm0,%xmm0
movsd  0xedd(%rip),%xmm1
minsd  %xmm0,%xmm1
mulsd  0xed9(%rip),%xmm1
mov    (%rax),%edi
cvttsd2si %xmm1,%edx
lea    0xed4(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"\0Dxyz2kdt: %3.0f%% complete \00"
define void @progress(float %0, i8* %1) {
%3 = alloca float
%4 = alloca i8*
store float %0, float* %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load float, float* %3
%7 = fpext float %6 to double
%8 = fcmp ogt double %7, 1.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %2
br label %13
10: ; preds = %2
%11 = load float, float* %3
%12 = fpext float %11 to double
br label %13
13: ; preds = %10, %9
%14 = phi double [ 1.000000e+00, %9 ], [ %12, %10 ]
%15 = fmul double %14, 1.000000e+02
%16 = fptosi double %15 to i32
%17 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %16)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"\0Dxyz2kdt: %3.0f%% complete \00"
define void @progress(float %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = fpext float %0 to double
%5 = fcmp ogt double %4, 1.000000e+00
%6 = select i1 %5, double 1.000000e+00, double %4
%7 = fmul double %6, 1.000000e+02
%8 = fptosi double %7 to i32
%9 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %8)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_stmt;
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int SQLITE_OK;
int sqlite3_finalize(int /*<<< orphan*/ *);
int /*<<< orphan*/ sqlite_error(int, int /*<<< orphan*/ *, char *);
void finalizeStatement(sqlite3 *db, sqlite3_stmt *statement) {
  int res;
  res = sqlite3_finalize(statement);
  if (res != SQLITE_OK)
    sqlite_error(res, db, "statement finalize failed");
}


x86 assembly (clang, -O0):
<finalizeStatement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <sqlite3_finalize@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2ea2(%rip),%rcx
cmp    (%rcx),%eax
je     1161 <finalizeStatement+0x41>
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%rsi
lea    0xea4(%rip),%rdx
call   1030 <sqlite_error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<finalizeStatement>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <sqlite3_finalize@plt>
mov    0x2eb5(%rip),%rcx
cmp    (%rcx),%eax
jne    1139 <finalizeStatement+0x19>
pop    %rbx
ret
lea    0xec0(%rip),%rdx
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <sqlite_error@plt>

LLVM IR (-O0):
@SQLITE_OK = global i32 0
@.str = [26 x i8] c"statement finalize failed\00"
define void @finalizeStatement(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = call i32 @sqlite3_finalize(i32* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* @SQLITE_OK
%10 = icmp ne i32 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* %5
%13 = load i32*, i32** %3
%14 = call i32 @sqlite_error(i32 %12, i32* %13, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
@SQLITE_OK = global i32 0
@.str = [26 x i8] c"statement finalize failed\00"
define void @finalizeStatement(i32* %0, i32* %1) {
%3 = tail call i32 @sqlite3_finalize(i32* %1)
%4 = load i32, i32* @SQLITE_OK
%5 = icmp eq i32 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @sqlite_error(i32 %3, i32* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
char *get_platform_name(void) { return ("linux" == NULL) ? "" : "linux"; }


x86 assembly (clang, -O0):
<get_platform_name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_platform_name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"linux\00"
define i8* @get_platform_name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"linux\00"
define i8* @get_platform_name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ NOTCOMPILED();
void NOTCOMPILED2() { NOTCOMPILED(); }


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

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

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

LLVM IR (-O2):
define void @NOTCOMPILED2() {
%1 = tail call i32 (...) @NOTCOMPILED()
ret void
}
void account_user_time(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<account_user_time>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<account_user_time>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.account_user_time = [18 x i8] c"account_user_time\00"
define void @account_user_time() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.account_user_time, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.account_user_time = [18 x i8] c"account_user_time\00"
define void @account_user_time() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.account_user_time, i64 0, i64 0))
ret void
}
int max3(int a, int b, int c) {
  int t1;
  t1 = a > b ? a : b;
  return t1 > c ? t1 : c;
}


x86 assembly (clang, -O0):
<max3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1124 <max3+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    112a <max3+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1147 <max3+0x47>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    114d <max3+0x4d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max3>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
cmp    %edx,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @max3(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %1
%5 = select i1 %4, i32 %0, i32 %1
%6 = icmp sgt i32 %5, %2
%7 = select i1 %6, i32 %5, i32 %2
ret i32 %7
}
int ft_max(int a, int b) {
  if (a > b)
    return (a);
  return (b);
}


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

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

LLVM IR (-O0):
define i32 @ft_max(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %5
store i32 %12, i32* %3
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @ft_max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void displayDescription() {
  printf("This program will demonstrate the use of\n");
  printf("the strlen - String length function within\n");
  printf("the string header file.\n");
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"This program will demonstrate the use of\0A\00"
@.str.1 = [44 x i8] c"the strlen - String length function within\0A\00"
@.str.2 = [25 x i8] c"the string header file.\0A\00"
define void @displayDescription() {
%1 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [41 x i8] c"This program will demonstrate the use of\00"
@str.3 = [43 x i8] c"the strlen - String length function within\00"
@str.4 = [24 x i8] c"the string header file.\00"
define void @displayDescription() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t P(size_t i) { return (i - 1) / 2; }


x86 assembly (clang, -O0):
<P>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
shr    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<P>:
lea    -0x1(%rdi),%rax
shr    %rax
ret

LLVM IR (-O0):
define i64 @P(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub i64 %3, 1
%5 = udiv i64 %4, 2
ret i64 %5
}

LLVM IR (-O2):
define i64 @P(i64 %0) {
%2 = add i64 %0, -1
%3 = lshr i64 %2, 1
ret i64 %3
}
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ d_name;
};

/* Variables and functions */
int atoi(int /*<<< orphan*/);
int filter(const struct dirent *de) { return atoi(de->d_name); }


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

x86 assembly (clang, -O2):
<filter>:
mov    (%rdi),%edi
jmp    1030 <atoi@plt>

LLVM IR (-O0):
%struct.dirent = type { i32 }
define i32 @filter(%struct.dirent* %0) {
%2 = alloca %struct.dirent*
store %struct.dirent* %0, %struct.dirent** %2
%3 = load %struct.dirent*, %struct.dirent** %2
%4 = getelementptr inbounds %struct.dirent, %struct.dirent* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @atoi(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
define i32 @filter(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @atoi(i32 %3)
ret i32 %4
}
/* Type definitions */
struct cmd_arg {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ showDnsSetting();
void cmdShowDnsServer(int cmdType, struct cmd_arg *pCmdArg) {
  showDnsSetting();
}


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

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

LLVM IR (-O0):
%struct.cmd_arg = type { i32 }
define void @cmdShowDnsServer(i32 %0, %struct.cmd_arg* %1) {
%3 = alloca i32
%4 = alloca %struct.cmd_arg*
store i32 %0, i32* %3
store %struct.cmd_arg* %1, %struct.cmd_arg** %4
%5 = call i32 (...) @showDnsSetting()
ret void
}

LLVM IR (-O2):
%struct.cmd_arg = type { i32 }
define void @cmdShowDnsServer(i32 %0, %struct.cmd_arg* nocapture readnone %1) {
%3 = tail call i32 (...) @showDnsSetting()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
scalar_t__ semctl(int, int /*<<< orphan*/, int /*<<< orphan*/,
                  int /*<<< orphan*/);
bool qsem_free(int semid) {
  if (semid < 0)
    return false;
  if (semctl(semid, 0, IPC_RMID, 0) != 0)
    return false;
  return true;
}


x86 assembly (clang, -O0):
<qsem_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1131 <qsem_free+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1163 <qsem_free+0x53>
mov    -0x8(%rbp),%edi
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
xor    %ecx,%ecx
mov    %ecx,%esi
call   1030 <semctl@plt>
cmp    $0x0,%rax
je     115c <qsem_free+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1163 <qsem_free+0x53>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsem_free>:
test   %edi,%edi
js     1137 <qsem_free+0x27>
push   %rax
mov    0x2ec4(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
xor    %ecx,%ecx
call   1030 <semctl@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
@IPC_RMID = global i32 0
define i32 @qsem_free(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load i32, i32* @IPC_RMID
%5 = tail call i64 @semctl(i32 %0, i32 0, i32 %4, i32 0)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %3, %1
%9 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void postamble(FILE *ofp) {
  fprintf(ofp, "\nextern struct help_texts h_texts[];\n\n\n");
  fprintf(ofp, "#endif /* PITH_HELPTEXT_INCLUDED */\n");
}


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

x86 assembly (clang, -O2):
<postamble>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xef4(%rip),%rdi
mov    $0x24,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"\0Aextern struct help_texts h_texts[];\0A\0A\0A\00"
@.str.1 = [37 x i8] c"#endif /* PITH_HELPTEXT_INCLUDED */\0A\00"
define void @postamble(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"\0Aextern struct help_texts h_texts[];\0A\0A\0A\00"
@.str.1 = [37 x i8] c"#endif /* PITH_HELPTEXT_INCLUDED */\0A\00"
define void @postamble(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i64 39, i64 1, i32* %0)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i64 36, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ platform_puts(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void puts(const char *s) { (void)platform_puts(s, strlen(s)); }


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

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <platform_puts@plt>

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

LLVM IR (-O2):
define void @puts(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @platform_puts(i8* %0, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
char *normalize(char *);
int /*<<< orphan*/ sflap_send(char *, int, int);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
void serv_add_permit(char *name) {
  char buf[1024];
  snprintf(buf, sizeof(buf), "toc_add_permit %s", normalize(name));
  sflap_send(buf, -1, 2);
}


x86 assembly (clang, -O0):
<serv_add_permit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rax
mov    %rax,-0x418(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <normalize@plt>
mov    -0x418(%rbp),%rdi
mov    %rax,%rcx
mov    $0x400,%esi
lea    0xe94(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x410(%rbp),%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
call   1050 <sflap_send@plt>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serv_add_permit>:
push   %rbx
sub    $0x400,%rsp
call   1040 <normalize@plt>
lea    0xebc(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
mov    %rax,%rcx
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
call   1050 <sflap_send@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"toc_add_permit %s\00"
define void @serv_add_permit(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i8* @normalize(i8* %5)
%7 = call i32 @snprintf(i8* %4, i32 1024, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%9 = call i32 @sflap_send(i8* %8, i32 -1, i32 2)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"toc_add_permit %s\00"
define void @serv_add_permit(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = tail call i8* @normalize(i8* %0)
%5 = call i32 @snprintf(i8* %3, i32 1024, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @sflap_send(i8* %3, i32 -1, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  puts("hallo world!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"hallo world!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"hallo world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ _vdo(int /*<<< orphan*/, int, char const *,
                        int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
void verr(int eval, const char *fmt, va_list args) {
  _vdo(errno, 1, fmt, args);
  exit(eval);
}


x86 assembly (clang, -O0):
<verr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x1,%esi
call   1030 <_vdo@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<verr>:
push   %rbx
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%ebx
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1030 <_vdo@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@errno = global i32 0
define void @verr(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @errno
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @_vdo(i32 %7, i32 1, i8* %8, i32 %9)
%11 = load i32, i32* %4
%12 = call i32 @exit(i32 %11)
unreachable
}

LLVM IR (-O2):
@errno = global i32 0
define void @verr(i32 %0, i8* %1, i32 %2) {
%4 = load i32, i32* @errno
%5 = tail call i32 @_vdo(i32 %4, i32 1, i8* %1, i32 %2)
%6 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void ud2() {
  db(0x0F);
  db(0x0B);
}


x86 assembly (clang, -O0):
<ud2>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf,%edi
call   1030 <db@plt>
mov    $0xb,%edi
call   1030 <db@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ud2>:
push   %rax
mov    $0xf,%edi
call   1030 <db@plt>
mov    $0xb,%edi
pop    %rax
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @ud2() {
%1 = call i32 @db(i32 15)
%2 = call i32 @db(i32 11)
ret void
}

LLVM IR (-O2):
define void @ud2() {
%1 = tail call i32 @db(i32 15)
%2 = tail call i32 @db(i32 11)
ret void
}
int f1(int a, int b) {
  return ((((a) > (b) ? (a) : (b))) < (b) ? (((a) > (b) ? (a) : (b))) : (b));
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <f1+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <f1+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115b <f1+0x5b>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    114a <f1+0x4a>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1150 <f1+0x50>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1161 <f1+0x61>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @f1(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 sgt 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 ]
%14 = load i32, i32* %4
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %26
16: ; preds = %12
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = icmp sgt i32 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = load i32, i32* %3
br label %24
22: ; preds = %16
%23 = load i32, i32* %4
br label %24
24: ; preds = %22, %20
%25 = phi i32 [ %21, %20 ], [ %23, %22 ]
br label %28
26: ; preds = %12
%27 = load i32, i32* %4
br label %28
28: ; preds = %26, %24
%29 = phi i32 [ %25, %24 ], [ %27, %26 ]
ret i32 %29
}

LLVM IR (-O2):
define i32 @f1(i32 %0, i32 returned %1) {
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void closecurses(void) { endwin(); }


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

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

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

LLVM IR (-O2):
define void @closecurses() {
%1 = tail call i32 (...) @endwin()
ret void
}
int fred() {}


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

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

LLVM IR (-O0):
define i32 @fred() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @fred() {
ret i32 undef
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void uart_rx_int(uint32_t *uart) {
  uart[0x038 / 4] |= 0x10;
  uart[0x034 / 4] &= 0x0E;
}


x86 assembly (clang, -O0):
<uart_rx_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%ecx
or     $0x10,%ecx
mov    %ecx,0x38(%rax)
mov    -0x8(%rbp),%rax
mov    0x34(%rax),%ecx
and    $0xe,%ecx
mov    %ecx,0x34(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_rx_int>:
orb    $0x10,0x38(%rdi)
andl   $0xe,0x34(%rdi)
ret

LLVM IR (-O0):
define void @uart_rx_int(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 14
%5 = load i32, i32* %4
%6 = or i32 %5, 16
store i32 %6, i32* %4
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 13
%9 = load i32, i32* %8
%10 = and i32 %9, 14
store i32 %10, i32* %8
ret void
}

LLVM IR (-O2):
define void @uart_rx_int(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 14
%3 = load i32, i32* %2
%4 = or i32 %3, 16
store i32 %4, i32* %2
%5 = getelementptr inbounds i32, i32* %0, i64 13
%6 = load i32, i32* %5
%7 = and i32 %6, 14
store i32 %7, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *, int, double);
int main() {
  print("df", 1, 10.1);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
mov    $0x1,%esi
movsd  0xecd(%rip),%xmm0
call   1030 <print@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
mov    $0x1,%esi
call   1030 <print@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"df\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1, double 1.010000e+01)
ret i32 1
}

LLVM IR (-O2):
@.str = [3 x i8] c"df\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1, double 1.010000e+01)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ RLIMIT_AS;
int /*<<< orphan*/ RLIMIT_CORE;
int /*<<< orphan*/ RLIMIT_CPU;
int /*<<< orphan*/ pr_limits(char *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  pr_limits("RLIMIT_AS", RLIMIT_AS);
  ;
  pr_limits("RLIMIT_CORE", RLIMIT_CORE);
  ;
  pr_limits("RLIMIT_CPU", RLIMIT_CPU);
  ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
lea    0xeca(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%esi
lea    0xebf(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%esi
lea    0xeb6(%rip),%rdi
call   1030 <pr_limits@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
lea    0xed4(%rip),%rdi
call   1030 <pr_limits@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
lea    0xecb(%rip),%rdi
call   1030 <pr_limits@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"RLIMIT_AS\00"
@RLIMIT_AS = global i32 0
@.str.1 = [12 x i8] c"RLIMIT_CORE\00"
@RLIMIT_CORE = global i32 0
@.str.2 = [11 x i8] c"RLIMIT_CPU\00"
@RLIMIT_CPU = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @RLIMIT_AS
%7 = call i32 @pr_limits(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @RLIMIT_CORE
%9 = call i32 @pr_limits(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @RLIMIT_CPU
%11 = call i32 @pr_limits(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"RLIMIT_AS\00"
@RLIMIT_AS = global i32 0
@.str.1 = [12 x i8] c"RLIMIT_CORE\00"
@RLIMIT_CORE = global i32 0
@.str.2 = [11 x i8] c"RLIMIT_CPU\00"
@RLIMIT_CPU = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @RLIMIT_AS
%4 = tail call i32 @pr_limits(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @RLIMIT_CORE
%6 = tail call i32 @pr_limits(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @RLIMIT_CPU
%8 = tail call i32 @pr_limits(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}
void gtk_table_get_default_row_spacing() {}


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

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

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

LLVM IR (-O2):
define void @gtk_table_get_default_row_spacing() {
ret void
}
void call_recover_upcall(int dest_spd, int id) {}


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

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

LLVM IR (-O0):
define void @call_recover_upcall(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @call_recover_upcall(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
int /*<<< orphan*/ stderr;
void zmalloc_oom(size_t size) {
  fprintf(stderr, "zmalloc: Out of memory trying to allocate %zu bytes\n",
          size);
  fflush(stderr);
  abort();
}


x86 assembly (clang, -O0):
<zmalloc_oom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xeb0(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<zmalloc_oom>:
push   %rbx
mov    %rdi,%rdx
mov    0x2ea5(%rip),%rbx
mov    (%rbx),%edi
lea    0xebc(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [53 x i8] c"zmalloc: Out of memory trying to allocate %zu bytes\0A\00"
define void @zmalloc_oom(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i32, i32* @stderr
%4 = load i64, i64* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i64 %4)
%6 = load i32, i32* @stderr
%7 = call i32 @fflush(i32 %6)
%8 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [53 x i8] c"zmalloc: Out of memory trying to allocate %zu bytes\0A\00"
define void @zmalloc_oom(i64 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i64 %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fflush(i32 %4)
%6 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t boot_nv_security_counter_update(uint32_t image_id,
                                        uint32_t img_security_cnt) {
  (void)image_id;
  (void)img_security_cnt;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @boot_nv_security_counter_update(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
ret i32 0
}

LLVM IR (-O2):
define i32 @boot_nv_security_counter_update(i32 %0, i32 %1) {
ret i32 0
}