xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, int /*<<< orphan*/ *);
void function_empty_est_time() { write("csv-task.csv", "\n", NULL); }


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

x86 assembly (clang, -O2):
<function_empty_est_time>:
lea    0xee9(%rip),%rdi
lea    0xeef(%rip),%rsi
xor    %edx,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @function_empty_est_time() {
%1 = call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @function_empty_est_time() {
%1 = tail call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char const *, char const *);
void ifcfg_del(char cmd[], const char *Vip, const char *Netmask) {
  sprintf(cmd,
          "/sbin/ifcfg eth0"
          " del %s/%s",
          Vip, Netmask);
}


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

x86 assembly (clang, -O2):
<ifcfg_del>:
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xee3(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"/sbin/ifcfg eth0 del %s/%s\00"
define void @ifcfg_del(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"/sbin/ifcfg eth0 del %s/%s\00"
define void @ifcfg_del(i8* nocapture writeonly %0, i8* %1, i8* %2) {
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/
UpnpResponse_MediaRenderer_ConnectionManager_GetCurrentConnectionIDs(void *,
                                                                     char *);
int /*<<< orphan*/ printf(char *);
void UpnpMediaRenderer_ConnectionManager_GetCurrentConnectionIDs(
    void *upnptoken) {
  printf("Invoke: "
         "UpnpMediaRenderer_ConnectionManager_GetCurrentConnectionIDs();\r\n");
  UpnpResponse_MediaRenderer_ConnectionManager_GetCurrentConnectionIDs(
      upnptoken, "Sample String");
}


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

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

LLVM IR (-O0):
@.str = [73 x i8] c"Invoke: UpnpMediaRenderer_ConnectionManager_GetCurrentConnectionIDs();\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UpnpMediaRenderer_ConnectionManager_GetCurrentConnectionIDs(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @UpnpResponse_MediaRenderer_ConnectionManager_GetCurrentConnectionIDs(i8* %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"Sample String\00"
@str = [72 x i8] c"Invoke: UpnpMediaRenderer_ConnectionManager_GetCurrentConnectionIDs();\0D\00"
define void @UpnpMediaRenderer_ConnectionManager_GetCurrentConnectionIDs(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @UpnpResponse_MediaRenderer_ConnectionManager_GetCurrentConnectionIDs(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}
__attribute__((no_icf)) _Bool f4() {
  char *foo_f4(void);
  char *t1 = foo_f4();
  char *t2 = __builtin_strstr(t1, "hello");
  _Bool t3 = t2 == t1;
  return t3;
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
call   1030 <foo_f4@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec4(%rip),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
sete   %al
and    $0x1,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
push   %rax
call   1040 <foo_f4@plt>
lea    0xed3(%rip),%rsi
mov    $0x5,%edx
mov    %rax,%rdi
call   1030 <strncmp@plt>
test   %eax,%eax
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define zeroext i1 @f4() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8
%4 = call i8* @foo_f4()
store i8* %4, i8** %1
%5 = load i8*, i8** %1
%6 = call i8* @strstr(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = load i8*, i8** %1
%9 = icmp eq i8* %7, %8
%10 = zext i1 %9 to i8
store i8 %10, i8* %3
%11 = load i8, i8* %3
%12 = trunc i8 %11 to i1
ret i1 %12
}

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
define zeroext i1 @f4() {
%1 = tail call i8* @foo_f4()
%2 = tail call i32 @strncmp(i8* dereferenceable(1) %1, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 5)
%3 = icmp eq i32 %2, 0
ret i1 %3
}
/* Variables and functions */
int /*<<< orphan*/ return_union_het_fpv_partial();
int /*<<< orphan*/ take_union_het_fpv_partial(int /*<<< orphan*/);
void test_union_het_fpv_partial() {
  take_union_het_fpv_partial(return_union_het_fpv_partial());
}


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

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

LLVM IR (-O0):
define void @test_union_het_fpv_partial() {
%1 = call i32 (...) @return_union_het_fpv_partial()
%2 = call i32 @take_union_het_fpv_partial(i32 %1)
ret void
}

LLVM IR (-O2):
define void @test_union_het_fpv_partial() {
%1 = tail call i32 (...) @return_union_het_fpv_partial()
%2 = tail call i32 @take_union_het_fpv_partial(i32 %1)
ret void
}
void test_cimag(_Complex double d) {
  if (cimag(d) != cimag(d))
    link_failure_cimag();
}


x86 assembly (clang, -O0):
<test_cimag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x8(%rbp),%xmm0
jne    113d <test_cimag+0x2d>
jp     113d <test_cimag+0x2d>
jmp    1144 <test_cimag+0x34>
mov    $0x0,%al
call   1030 <link_failure_cimag@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cimag>:
ucomisd %xmm1,%xmm1
jp     1117 <test_cimag+0x7>
ret
xor    %eax,%eax
jmp    1030 <link_failure_cimag@plt>

LLVM IR (-O0):
define void @test_cimag(double %0, double %1) {
%3 = alloca { double, double }
%4 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
store double %0, double* %4
%5 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %1, double* %5
%6 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%7 = load double, double* %6
%8 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
%9 = load double, double* %8
%10 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%11 = load double, double* %10
%12 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
%13 = load double, double* %12
%14 = fcmp une double %9, %13
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @link_failure_cimag()
br label %17
17: ; preds = %15, %2
ret void
}

LLVM IR (-O2):
define void @test_cimag(double %0, double %1) {
%3 = fcmp uno double %1, 0.000000e+00
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @link_failure_cimag()
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DCP_VMI_DriverIRQHandler();
__attribute__((weak)) void DCP_VMI_IRQHandler(void) {
  DCP_VMI_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @DCP_VMI_IRQHandler() {
%1 = call i32 (...) @DCP_VMI_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @DCP_VMI_IRQHandler() {
%1 = tail call i32 (...) @DCP_VMI_DriverIRQHandler()
ret void
}
void g(void) { __builtin_strndup("abc", 3); }


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x3,%esi
call   1030 <strndup@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"abc\00"
define void @g() {
%1 = call i8* @strndup(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 3)
ret void
}

LLVM IR (-O2):
define void @g() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ schaltjahr();
int main() {
  schaltjahr();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <schaltjahr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <schaltjahr@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @schaltjahr()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_error_exit() {
  fprintf(stderr,
          "Usage: client_server MODE [IP] [PORT]\nMODE: \"client\" or "
          "\"server\"\nIP: only used and required for client mode (could "
          "be IP or hostname)\nPORT: to select a specific port, else "
          "default port is 10000\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<print_error_exit>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_error_exit>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [195 x i8] c"Usage: client_server MODE [IP] [PORT]\0AMODE: \22client\22 or \22server\22\0AIP: only used and required for client mode (could be IP or hostname)\0APORT: to select a specific port, else default port is 10000\0A\00"
@EXIT_FAILURE = global i32 0
define void @print_error_exit() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([195 x i8], [195 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [195 x i8] c"Usage: client_server MODE [IP] [PORT]\0AMODE: \22client\22 or \22server\22\0AIP: only used and required for client mode (could be IP or hostname)\0APORT: to select a specific port, else default port is 10000\0A\00"
@EXIT_FAILURE = global i32 0
define void @print_error_exit() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([195 x i8], [195 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand();
int main() {
  printf("%d \n", 200000);
  for (long int i = 0; i < 200000; i++) {
    printf("%d \n", rand() % 200000);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x30d40,%esi
call   1030 <printf@plt>
movq   $0x0,-0x10(%rbp)
cmpq   $0x30d40,-0x10(%rbp)
jge    1184 <main+0x64>
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x30d40,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1148 <main+0x28>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%r14
mov    %r14,%rdi
mov    $0x30d40,%esi
call   1030 <printf@plt>
mov    $0x30d40,%ebx
nopl   (%rax)
xor    %eax,%eax
call   1040 <rand@plt>
movslq %eax,%rsi
imul   $0x14f8b589,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x2e,%rax
add    %ecx,%eax
imul   $0x30d40,%eax,%eax
sub    %eax,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffffffffffff,%rbx
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 200000)
br label %3
2: ; preds = %3
ret i32 0
3: ; preds = %0, %3
%4 = phi i64 [ 0, %0 ], [ %8, %3 ]
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 200000
%7 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = add nuw nsw i64 %4, 1
%9 = icmp eq i64 %8, 200000
br i1 %9, label %2, label %3
}
/* Variables and functions */
int /*<<< orphan*/ generateSeed();
int /*<<< orphan*/ setCurrentStateTo(int);
void _bootHandler() {
  generateSeed();
  setCurrentStateTo(1);
}


x86 assembly (clang, -O0):
<_bootHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <generateSeed@plt>
mov    $0x1,%edi
call   1030 <setCurrentStateTo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_bootHandler>:
push   %rax
xor    %eax,%eax
call   1040 <generateSeed@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <setCurrentStateTo@plt>

LLVM IR (-O0):
define void @_bootHandler() {
%1 = call i32 (...) @generateSeed()
%2 = call i32 @setCurrentStateTo(i32 1)
ret void
}

LLVM IR (-O2):
define void @_bootHandler() {
%1 = tail call i32 (...) @generateSeed()
%2 = tail call i32 @setCurrentStateTo(i32 1)
ret void
}
void gtk_text_buffer_paste_clipboard() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_paste_clipboard() {
ret void
}
/* Type definitions */
struct t_map {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ surround_iter(struct t_map *, int, int, int *);
int surround_with_walls(struct t_map *map, int x, int y) {
  int done_array[20 * 80];
  memset(done_array, 0, sizeof(int) * 20 * 80);
  surround_iter(map, x, y, done_array);
  return 0;
}


x86 assembly (clang, -O0):
<surround_with_walls>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1910,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    -0x1910(%rbp),%rdi
xor    %esi,%esi
mov    $0x1900,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    -0x1910(%rbp),%rcx
call   1030 <surround_iter@plt>
xor    %eax,%eax
add    $0x1910,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<surround_with_walls>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x1908,%rsp
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %rsp,%r15
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x1900,%edx
call   1040 <memset@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
mov    %r15,%rcx
call   1030 <surround_iter@plt>
xor    %eax,%eax
add    $0x1908,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.t_map = type { i32 }
define i32 @surround_with_walls(%struct.t_map* %0, i32 %1, i32 %2) {
%4 = alloca %struct.t_map*
%5 = alloca i32
%6 = alloca i32
%7 = alloca [1600 x i32]
store %struct.t_map* %0, %struct.t_map** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [1600 x i32], [1600 x i32]* %7, i64 0, i64 0
%9 = call i32 @memset(i32* %8, i32 0, i32 6400)
%10 = load %struct.t_map*, %struct.t_map** %4
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = getelementptr inbounds [1600 x i32], [1600 x i32]* %7, i64 0, i64 0
%14 = call i32 @surround_iter(%struct.t_map* %10, i32 %11, i32 %12, i32* %13)
ret i32 0
}

LLVM IR (-O2):
%struct.t_map = type { i32 }
define i32 @surround_with_walls(%struct.t_map* %0, i32 %1, i32 %2) {
%4 = alloca [1600 x i32]
%5 = bitcast [1600 x i32]* %4 to i8*
%6 = getelementptr inbounds [1600 x i32], [1600 x i32]* %4, i64 0, i64 0
%7 = call i32 @memset(i32* %6, i32 0, i32 6400)
%8 = call i32 @surround_iter(%struct.t_map* %0, i32 %1, i32 %2, i32* %6)
ret i32 0
}
/* Type definitions */
struct drm_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ udelay(int);
void intel_wait_for_vblank(struct drm_device *dev) { udelay(20000); }


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

x86 assembly (clang, -O2):
<intel_wait_for_vblank>:
mov    $0x4e20,%edi
jmp    1030 <udelay@plt>

LLVM IR (-O0):
%struct.drm_device = type { i32 }
define void @intel_wait_for_vblank(%struct.drm_device* %0) {
%2 = alloca %struct.drm_device*
store %struct.drm_device* %0, %struct.drm_device** %2
%3 = call i32 @udelay(i32 20000)
ret void
}

LLVM IR (-O2):
%struct.drm_device = type { i32 }
define void @intel_wait_for_vblank(%struct.drm_device* nocapture readnone %0) {
%2 = tail call i32 @udelay(i32 20000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, char const *, char const *,
                           char const *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *name) {
  fprintf(stderr,
          "Usage:\n"
          "\t%s            Print time from RTC\n"
          "\t%s -w         Update RTC with current system time\n"
          "\t%s -s         Set system time from RTC\n"
          "\t%s -b x       Display byte <x> in RTC RAM\n"
          "\t%s -b x -w y  Set byte <x> to <y> in RTC RAM\n"
          "\t%s -c         ignored\n",
          name, name, name, name, name, name);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    -0x8(%rbp),%r9
mov    -0x8(%rbp),%r10
mov    -0x8(%rbp),%rax
lea    0xebc(%rip),%rsi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rcx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    %rcx,%rdx
mov    %rcx,%r8
mov    %rcx,%r9
push   %rcx
push   %rcx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [246 x i8] c"Usage:\0A\09%s Print time from RTC\0A\09%s -w Update RTC with current system time\0A\09%s -s Set system time from RTC\0A\09%s -b x Display byte <x> in RTC RAM\0A\09%s -b x -w y Set byte <x> to <y> in RTC RAM\0A\09%s -c ignored\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = load i8*, i8** %2
%9 = load i8*, i8** %2
%10 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([246 x i8], [246 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5, i8* %6, i8* %7, i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [246 x i8] c"Usage:\0A\09%s Print time from RTC\0A\09%s -w Update RTC with current system time\0A\09%s -s Set system time from RTC\0A\09%s -b x Display byte <x> in RTC RAM\0A\09%s -b x -w y Set byte <x> to <y> in RTC RAM\0A\09%s -c ignored\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([246 x i8], [246 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0, i8* %0, i8* %0, i8* %0, i8* %0)
ret void
}
/* Type definitions */
struct subText {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ doSub(char *, char *, struct subText *);
char *needMem(int);
int subTextSizeAfter(struct subText *, char *);
char *subTextString(struct subText *subList, char *in) {
  int size = subTextSizeAfter(subList, in);
  char *out = needMem(size + 1);
  doSub(in, out, subList);
  return out;
}


x86 assembly (clang, -O0):
<subTextString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <subTextSizeAfter@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
call   1040 <needMem@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1030 <doSub@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subTextString>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
call   1050 <subTextSizeAfter@plt>
lea    0x1(%rax),%edi
call   1040 <needMem@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %rax,%rsi
mov    %r14,%rdx
call   1030 <doSub@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.subText = type { i32 }
define i8* @subTextString(%struct.subText* %0, i8* %1) {
%3 = alloca %struct.subText*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store %struct.subText* %0, %struct.subText** %3
store i8* %1, i8** %4
%7 = load %struct.subText*, %struct.subText** %3
%8 = load i8*, i8** %4
%9 = call i32 @subTextSizeAfter(%struct.subText* %7, i8* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = add nsw i32 %10, 1
%12 = call i8* @needMem(i32 %11)
store i8* %12, i8** %6
%13 = load i8*, i8** %4
%14 = load i8*, i8** %6
%15 = load %struct.subText*, %struct.subText** %3
%16 = call i32 @doSub(i8* %13, i8* %14, %struct.subText* %15)
%17 = load i8*, i8** %6
ret i8* %17
}

LLVM IR (-O2):
%struct.subText = type { i32 }
define i8* @subTextString(%struct.subText* %0, i8* %1) {
%3 = tail call i32 @subTextSizeAfter(%struct.subText* %0, i8* %1)
%4 = add nsw i32 %3, 1
%5 = tail call i8* @needMem(i32 %4)
%6 = tail call i32 @doSub(i8* %1, i8* %5, %struct.subText* %0)
ret i8* %5
}
/* Variables and functions */
#define S_IFBLK 134
#define S_IFCHR 133
#define S_IFDIR 132
#define S_IFIFO 131
#define S_IFLNK 130
unsigned int S_IFMT;
#define S_IFREG 129
#define S_IFSOCK 128
char mode2kind(unsigned mode) {
  switch (mode & S_IFMT) {
  case S_IFSOCK:
    return 's';
  case S_IFLNK:
    return 'l';
  case S_IFREG:
    return '-';
  case S_IFDIR:
    return 'd';
  case S_IFBLK:
    return 'b';
  case S_IFCHR:
    return 'c';
  case S_IFIFO:
    return 'p';
  default:
    return '?';
  }
}


x86 assembly (clang, -O0):
<mode2kind>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2ecf(%rip),%rcx
mov    (%rcx),%ecx
and    %ecx,%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x6,%eax
ja     117a <mode2kind+0x7a>
mov    -0x10(%rbp),%rax
lea    0xece(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x73,-0x1(%rbp)
jmp    117e <mode2kind+0x7e>
movb   $0x6c,-0x1(%rbp)
jmp    117e <mode2kind+0x7e>
movb   $0x2d,-0x1(%rbp)
jmp    117e <mode2kind+0x7e>
movb   $0x64,-0x1(%rbp)
jmp    117e <mode2kind+0x7e>
movb   $0x62,-0x1(%rbp)
jmp    117e <mode2kind+0x7e>
movb   $0x63,-0x1(%rbp)
jmp    117e <mode2kind+0x7e>
movb   $0x70,-0x1(%rbp)
jmp    117e <mode2kind+0x7e>
movb   $0x3f,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mode2kind>:
mov    0x2ed9(%rip),%rax
and    (%rax),%edi
lea    -0x400(,%rdi,8),%ecx
mov    %edi,%eax
add    $0xffffff80,%eax
movabs $0x626364706c2d73,%rdx
shr    %cl,%rdx
cmp    $0x7,%eax
mov    $0x3f,%eax
cmovb  %edx,%eax
ret

LLVM IR (-O0):
@S_IFMT = global i32 0
define signext i8 @mode2kind(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* @S_IFMT
%6 = and i32 %4, %5
switch i32 %6, label %14 [
i32 128, label %7
i32 130, label %8
i32 129, label %9
i32 132, label %10
i32 134, label %11
i32 133, label %12
i32 131, label %13
]
7: ; preds = %1
store i8 115, i8* %2
br label %15
8: ; preds = %1
store i8 108, i8* %2
br label %15
9: ; preds = %1
store i8 45, i8* %2
br label %15
10: ; preds = %1
store i8 100, i8* %2
br label %15
11: ; preds = %1
store i8 98, i8* %2
br label %15
12: ; preds = %1
store i8 99, i8* %2
br label %15
13: ; preds = %1
store i8 112, i8* %2
br label %15
14: ; preds = %1
store i8 63, i8* %2
br label %15
15: ; preds = %14, %13, %12, %11, %10, %9, %8, %7
%16 = load i8, i8* %2
ret i8 %16
}

LLVM IR (-O2):
@S_IFMT = global i32 0
define signext i8 @mode2kind(i32 %0) {
%2 = load i32, i32* @S_IFMT
%3 = and i32 %2, %0
%4 = add i32 %3, -128
%5 = icmp ult i32 %4, 7
%6 = zext i32 %4 to i56
%7 = shl nuw nsw i56 %6, 3
%8 = lshr i56 27693830751661427, %7
%9 = trunc i56 %8 to i8
%10 = select i1 %5, i8 %9, i8 63
ret i8 %10
}
/* Type definitions */
typedef int uint8_t;
struct lldp_tlv {
  int dummy;
};

/* Variables and functions */
uint8_t lldp_cache_tlv(struct lldp_tlv *tlv) { return -1; }


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

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

LLVM IR (-O0):
%struct.lldp_tlv = type { i32 }
define i32 @lldp_cache_tlv(%struct.lldp_tlv* %0) {
%2 = alloca %struct.lldp_tlv*
store %struct.lldp_tlv* %0, %struct.lldp_tlv** %2
ret i32 -1
}

LLVM IR (-O2):
%struct.lldp_tlv = type { i32 }
define i32 @lldp_cache_tlv(%struct.lldp_tlv* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ fputs_unlocked(char *, int /*<<< orphan*/);
int /*<<< orphan*/ putchar_unlocked(char);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ transform_doc(int /*<<< orphan*/);
int /*<<< orphan*/ transform_string();
void transform_code_w_s(void) {
  fputs_unlocked("{\"__code\":", stdout);
  transform_string();
  fputs_unlocked(",\"__scope\":", stdout);
  transform_doc(0);
  putchar_unlocked('}');
}


x86 assembly (clang, -O0):
<transform_code_w_s>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
lea    0xeac(%rip),%rdi
call   1040 <fputs_unlocked@plt>
mov    $0x0,%al
call   1030 <transform_string@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%esi
lea    0xe9b(%rip),%rdi
call   1040 <fputs_unlocked@plt>
xor    %edi,%edi
call   1060 <transform_doc@plt>
mov    $0x7d,%edi
call   1050 <putchar_unlocked@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<transform_code_w_s>:
push   %rbx
mov    0x2e98(%rip),%rbx
mov    (%rbx),%esi
lea    0xeaf(%rip),%rdi
call   1040 <fputs_unlocked@plt>
xor    %eax,%eax
call   1030 <transform_string@plt>
mov    (%rbx),%esi
lea    0xea5(%rip),%rdi
call   1040 <fputs_unlocked@plt>
xor    %edi,%edi
call   1060 <transform_doc@plt>
mov    $0x7d,%edi
pop    %rbx
jmp    1050 <putchar_unlocked@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"{\22__code\22:\00"
@stdout = global i32 0
@.str.1 = [12 x i8] c",\22__scope\22:\00"
define void @transform_code_w_s() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs_unlocked(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @transform_string()
%4 = load i32, i32* @stdout
%5 = call i32 @fputs_unlocked(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 @transform_doc(i32 0)
%7 = call i32 @putchar_unlocked(i8 signext 125)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"{\22__code\22:\00"
@stdout = global i32 0
@.str.1 = [12 x i8] c",\22__scope\22:\00"
define void @transform_code_w_s() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs_unlocked(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @transform_string()
%4 = load i32, i32* @stdout
%5 = tail call i32 @fputs_unlocked(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = tail call i32 @transform_doc(i32 0)
%7 = tail call i32 @putchar_unlocked(i8 signext 125)
ret void
}
int print_char(int (*nputs)(void *, const char *, int), void *arg, int c,
               int flags) {
  int chars_printed;
  char ch;
  ch = (char)c;
  if (flags & (1 << 4)) {
    chars_printed = nputs(arg, &ch, 1);
  } else {
    chars_printed = nputs(arg, &ch, 1);
  }
  return chars_printed;
}


x86 assembly (clang, -O0):
<print_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,-0x1d(%rbp)
mov    -0x18(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1146 <print_char+0x46>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
lea    -0x1d(%rbp),%rsi
mov    $0x1,%edx
call   *%rax
mov    %eax,-0x1c(%rbp)
jmp    115c <print_char+0x5c>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
lea    -0x1d(%rbp),%rsi
mov    $0x1,%edx
call   *%rax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_char>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rax
mov    %dl,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    %rcx,%rdi
mov    $0x1,%edx
call   *%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @print_char(i32 (i8*, i8*, i32)* nocapture %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8
%6 = trunc i32 %2 to i8
store i8 %6, i8* %5
%7 = call i32 %0(i8* %1, i8* %5, i32 1)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int *ptr;
  int n;
  scanf("%d", &n);
  printf("sizeof(int) = %ld\n", sizeof(int));
  ptr = (int *)malloc(n * sizeof(int));
  printf("Success!\n");
  free(ptr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1060 <scanf@plt>
lea    0xe9d(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xea4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1070 <scanf@plt>
lea    0xe96(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%rsp),%edi
shl    $0x2,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
lea    0xe87(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [19 x i8] c"sizeof(int) = %ld\0A\00"
@.str.2 = [10 x i8] c"Success!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i64 4)
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 4
%9 = trunc i64 %8 to i32
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i32*
store i32* %11, i32** %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%13 = load i32*, i32** %2
%14 = call i32 @free(i32* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [19 x i8] c"sizeof(int) = %ld\0A\00"
@str = [9 x i8] c"Success!\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i64 4)
%5 = load i32, i32* %1
%6 = shl i32 %5, 2
%7 = call i64 @malloc(i32 %6)
%8 = inttoptr i64 %7 to i32*
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%10 = call i32 @free(i32* %8)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_PKEY_CTX;
typedef int /*<<< orphan*/ ENGINE;

/* Variables and functions */
int /*<<< orphan*/ *int_ctx_new(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                int);
EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e) {
  return int_ctx_new(NULL, e, id);
}


x86 assembly (clang, -O0):
<EVP_PKEY_CTX_new_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%edx
xor    %eax,%eax
mov    %eax,%edi
call   1030 <int_ctx_new@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EVP_PKEY_CTX_new_id>:
mov    %edi,%edx
xor    %edi,%edi
jmp    1030 <int_ctx_new@plt>

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

LLVM IR (-O2):
define i32* @EVP_PKEY_CTX_new_id(i32 %0, i32* %1) {
%3 = tail call i32* @int_ctx_new(i32* null, i32* %1, i32 %0)
ret i32* %3
}
/* Variables and functions */
scalar_t__ strlen(char *);
int fatfs_lfn_entries_required(char *filename) {
  int length = (int)strlen(filename);
  if (length)
    return (length + 13 - 1) / 13;
  else
    return 0;
}


x86 assembly (clang, -O0):
<fatfs_lfn_entries_required>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     114b <fatfs_lfn_entries_required+0x3b>
mov    -0x14(%rbp),%eax
add    $0xd,%eax
sub    $0x1,%eax
mov    $0xd,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1152 <fatfs_lfn_entries_required+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fatfs_lfn_entries_required>:
push   %rax
call   1030 <strlen@plt>
test   %eax,%eax
je     1135 <fatfs_lfn_entries_required+0x25>
add    $0xc,%eax
cltq
imul   $0x4ec4ec4f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fatfs_lfn_entries_required(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @strlen(i8* %5)
%7 = trunc i64 %6 to i32
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = load i32, i32* %4
%12 = add nsw i32 %11, 13
%13 = sub nsw i32 %12, 1
%14 = sdiv i32 %13, 13
store i32 %14, i32* %2
br label %16
15: ; preds = %1
store i32 0, i32* %2
br label %16
16: ; preds = %15, %10
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @fatfs_lfn_entries_required(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = add nsw i32 %3, 12
%7 = sdiv i32 %6, 13
br label %8
8: ; preds = %1, %5
%9 = phi i32 [ %7, %5 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ font_get_bitmap(char);
int /*<<< orphan*/ gfx_draw_bitmap_transparent(int /*<<< orphan*/, long, long,
                                               int, int, long);
void font_draw_char(char character, long x, long y, long color) {
  if (character == '\n') {
    return;
  }
  gfx_draw_bitmap_transparent(font_get_bitmap(character), x, y, 7, 14, color);
}


x86 assembly (clang, -O0):
<font_draw_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    114c <font_draw_char+0x2c>
jmp    1173 <font_draw_char+0x53>
movsbl -0x1(%rbp),%edi
call   1040 <font_get_bitmap@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%r9
mov    $0x7,%ecx
mov    $0xe,%r8d
call   1030 <gfx_draw_bitmap_transparent@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<font_draw_char>:
cmp    $0xa,%dil
jne    1127 <font_draw_char+0x7>
ret
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
movsbl %dil,%edi
call   1040 <font_get_bitmap@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    $0x7,%ecx
mov    $0xe,%r8d
mov    %r14,%r9
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <gfx_draw_bitmap_transparent@plt>

LLVM IR (-O0):
define void @font_draw_char(i8 signext %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i8
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i8 %0, i8* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i8, i8* %5
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 10
br i1 %11, label %12, label %13
12: ; preds = %4
br label %20
13: ; preds = %4
%14 = load i8, i8* %5
%15 = call i32 @font_get_bitmap(i8 signext %14)
%16 = load i64, i64* %6
%17 = load i64, i64* %7
%18 = load i64, i64* %8
%19 = call i32 @gfx_draw_bitmap_transparent(i32 %15, i64 %16, i64 %17, i32 7, i32 14, i64 %18)
br label %20
20: ; preds = %13, %12
ret void
}

LLVM IR (-O2):
define void @font_draw_char(i8 signext %0, i64 %1, i64 %2, i64 %3) {
%5 = icmp eq i8 %0, 10
br i1 %5, label %9, label %6
6: ; preds = %4
%7 = tail call i32 @font_get_bitmap(i8 signext %0)
%8 = tail call i32 @gfx_draw_bitmap_transparent(i32 %7, i64 %1, i64 %2, i32 7, i32 14, i64 %3)
br label %9
9: ; preds = %4, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(void) {
  fprintf(stderr, "CheCKpOInT\n");
#pragma acc kernels
  { abort(); }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"CheCKpOInT\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"CheCKpOInT\0A\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ vm_unregister_natives();
void test_teardown(void) { vm_unregister_natives(); }


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

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

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

LLVM IR (-O2):
define void @test_teardown() {
%1 = tail call i32 (...) @vm_unregister_natives()
ret void
}
const char *M_LetsSeeThatAgain_Key(int key) { return ((void *)0); }


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

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

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

LLVM IR (-O2):
define noalias i8* @M_LetsSeeThatAgain_Key(i32 %0) {
ret i8* null
}
void SPI_set_high_speed() {
  (*((volatile unsigned char *)0xE0068004)) = 0x01;
  (*((volatile unsigned char *)0xE0068010)) = 6;
  (*((volatile unsigned char *)0xE0068004)) = 0x02;
}


x86 assembly (clang, -O0):
<SPI_set_high_speed>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe0068004,%eax
movb   $0x1,(%rax)
mov    $0xe0068010,%eax
movb   $0x6,(%rax)
mov    $0xe0068004,%eax
movb   $0x2,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SPI_set_high_speed>:
mov    $0xe0068004,%eax
movb   $0x1,(%rax)
movb   $0x6,0xc(%rax)
movb   $0x2,(%rax)
ret

LLVM IR (-O0):
define void @SPI_set_high_speed() {
store volatile i8 1, i8* inttoptr (i64 3758522372 to i8*)
store volatile i8 6, i8* inttoptr (i64 3758522384 to i8*)
store volatile i8 2, i8* inttoptr (i64 3758522372 to i8*)
ret void
}

LLVM IR (-O2):
define void @SPI_set_high_speed() {
store volatile i8 1, i8* inttoptr (i64 3758522372 to i8*)
store volatile i8 6, i8* inttoptr (i64 3758522384 to i8*)
store volatile i8 2, i8* inttoptr (i64 3758522372 to i8*)
ret void
}
char *hash_plugin_summary(void) { return ("whirlpool \tWHIRLPOOL plugin"); }


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"whirlpool \09WHIRLPOOL plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [28 x i8] c"whirlpool \09WHIRLPOOL plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0)
}
void main(void) {
  int x;
  int y[10];
  x = y[2];
  return;
}


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

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 2
%4 = load i32, i32* %3
store i32 %4, i32* %1
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
int security_sb_kern_mount(struct super_block *sb, void *data) { return 0; }


x86 assembly (clang, -O0):
<security_sb_kern_mount>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.super_block = type opaque
define i32 @security_sb_kern_mount(%struct.super_block* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int pixel_sa8d_wxh(int /*<<< orphan*/ *, int, int /*<<< orphan*/ *, int, int,
                   int);
int pixel_sa8d_8x16(uint8_t *pix1, int i_stride_pix1, uint8_t *pix2,
                    int i_stride_pix2) {
  return (pixel_sa8d_wxh(pix1, i_stride_pix1, pix2, i_stride_pix2, 8, 16) +
          2) >>
         2;
}


x86 assembly (clang, -O0):
<pixel_sa8d_8x16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x8,%r8d
mov    $0x10,%r9d
call   1030 <pixel_sa8d_wxh@plt>
add    $0x2,%eax
sar    $0x2,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel_sa8d_8x16>:
push   %rax
mov    $0x8,%r8d
mov    $0x10,%r9d
call   1030 <pixel_sa8d_wxh@plt>
add    $0x2,%eax
sar    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @pixel_sa8d_8x16(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %6
%11 = load i32*, i32** %7
%12 = load i32, i32* %8
%13 = call i32 @pixel_sa8d_wxh(i32* %9, i32 %10, i32* %11, i32 %12, i32 8, i32 16)
%14 = add nsw i32 %13, 2
%15 = ashr i32 %14, 2
ret i32 %15
}

LLVM IR (-O2):
define i32 @pixel_sa8d_8x16(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i32 @pixel_sa8d_wxh(i32* %0, i32 %1, i32* %2, i32 %3, i32 8, i32 16)
%6 = add nsw i32 %5, 2
%7 = ashr i32 %6, 2
ret i32 %7
}