xunge/DecIR huggingface dataset:
void f(char *out) {
  asm(""
      : "=@ccb"(out[0]), "=@ccl"(out[1]), "=@ccz"(out[2]), "=@ccbe"(out[4]),
        "=@ccge"(out[5]), "=@ccle"(out[6]));
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
mov    %rdi,-0x20(%rbp)
mov    -0x20(%rbp),%r14
mov    -0x20(%rbp),%r11
mov    -0x20(%rbp),%r9
mov    -0x20(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x20(%rbp),%rax
setb   %r15b
setl   %bl
sete   %r10b
setbe  %r8b
setge  %sil
setle  %cl
mov    %r15b,(%r14)
mov    %bl,0x1(%r11)
mov    %r10b,0x2(%r9)
mov    %r8b,0x4(%rdi)
mov    %sil,0x5(%rdx)
mov    %cl,0x6(%rax)
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
setb   (%rdi)
setl   %al
setbe  %cl
sete   %dl
setge  %sil
setle  %r8b
mov    %al,0x1(%rdi)
mov    %dl,0x2(%rdi)
mov    %cl,0x4(%rdi)
mov    %sil,0x5(%rdi)
mov    %r8b,0x6(%rdi)
ret

LLVM IR (-O0):
define void @f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 2
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 4
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i64 5
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 6
%15 = call { i8, i8, i8, i8, i8, i8 } asm "", "={@ccb},={@ccl},={@ccz},={@ccbe},={@ccge},={@ccle},~{dirflag},~{fpsr},~{flags}"()
%16 = extractvalue { i8, i8, i8, i8, i8, i8 } %15, 0
%17 = extractvalue { i8, i8, i8, i8, i8, i8 } %15, 1
%18 = extractvalue { i8, i8, i8, i8, i8, i8 } %15, 2
%19 = extractvalue { i8, i8, i8, i8, i8, i8 } %15, 3
%20 = extractvalue { i8, i8, i8, i8, i8, i8 } %15, 4
%21 = extractvalue { i8, i8, i8, i8, i8, i8 } %15, 5
store i8 %16, i8* %4
store i8 %17, i8* %6
store i8 %18, i8* %8
store i8 %19, i8* %10
store i8 %20, i8* %12
store i8 %21, i8* %14
ret void
}

LLVM IR (-O2):
define void @f(i8* nocapture writeonly %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = getelementptr inbounds i8, i8* %0, i64 2
%4 = getelementptr inbounds i8, i8* %0, i64 4
%5 = getelementptr inbounds i8, i8* %0, i64 5
%6 = getelementptr inbounds i8, i8* %0, i64 6
%7 = tail call { i8, i8, i8, i8, i8, i8 } asm "", "={@ccb},={@ccl},={@ccz},={@ccbe},={@ccge},={@ccle},~{dirflag},~{fpsr},~{flags}"()
%8 = extractvalue { i8, i8, i8, i8, i8, i8 } %7, 0
%9 = extractvalue { i8, i8, i8, i8, i8, i8 } %7, 1
%10 = extractvalue { i8, i8, i8, i8, i8, i8 } %7, 2
%11 = extractvalue { i8, i8, i8, i8, i8, i8 } %7, 3
%12 = extractvalue { i8, i8, i8, i8, i8, i8 } %7, 4
%13 = extractvalue { i8, i8, i8, i8, i8, i8 } %7, 5
store i8 %8, i8* %0
store i8 %9, i8* %2
store i8 %10, i8* %3
store i8 %11, i8* %4
store i8 %12, i8* %5
store i8 %13, i8* %6
ret void
}
double signf(double num) { return (0 < num) - (num < 0); }


x86 assembly (clang, -O0):
<signf>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<signf>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ret

LLVM IR (-O0):
define double @signf(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double 0.000000e+00, %3
%5 = zext i1 %4 to i32
%6 = load double, double* %2
%7 = fcmp olt double %6, 0.000000e+00
%8 = zext i1 %7 to i32
%9 = sub nsw i32 %5, %8
%10 = sitofp i32 %9 to double
ret double %10
}

LLVM IR (-O2):
define double @signf(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = zext i1 %2 to i32
%4 = fcmp olt double %0, 0.000000e+00
%5 = sext i1 %4 to i32
%6 = add nsw i32 %5, %3
%7 = sitofp i32 %6 to double
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_help(void) {
  printf(
      "Usage: bookkeeper [OPTION]\n\n"
      "Options:\n"
      "  -h  --help                          Prints this help\n"
      "  -s  --sys-uid-threshold   INTEGER   This UID and the ones below it "
      "will never be considered for\n"
      "                                      port reservation\n"
      "  -p  --port-offset         INTEGER   Adds this number to the users UID "
      "as the relevent port offset\n"
      "                                      default: 10000\n"
      "  -u  --user                STRING    User and group to transiton to\n"
      "  -f  --sockpath            STRING    Path of the socket file to create "
      "for client communication.\n"
      "                                      default: %s"
      "\n\n",
      "/var/run/bookkeeper/bookkeeper.sock");
}


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

x86 assembly (clang, -O2):
<print_help>:
lea    0xee9(%rip),%rdi
lea    0x114b(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [617 x i8] c"Usage: bookkeeper [OPTION]\0A\0AOptions:\0A -h --help Prints this help\0A -s --sys-uid-threshold INTEGER This UID and the ones below it will never be considered for\0A port reservation\0A -p --port-offset INTEGER Adds this number to the users UID as the relevent port offset\0A default: 10000\0A -u --user STRING User and group to transiton to\0A -f --sockpath STRING Path of the socket file to create for client communication.\0A default: %s\0A\0A\00"
@.str.1 = [36 x i8] c"/var/run/bookkeeper/bookkeeper.sock\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([617 x i8], [617 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [617 x i8] c"Usage: bookkeeper [OPTION]\0A\0AOptions:\0A -h --help Prints this help\0A -s --sys-uid-threshold INTEGER This UID and the ones below it will never be considered for\0A port reservation\0A -p --port-offset INTEGER Adds this number to the users UID as the relevent port offset\0A default: 10000\0A -u --user STRING User and group to transiton to\0A -f --sockpath STRING Path of the socket file to create for client communication.\0A default: %s\0A\0A\00"
@.str.1 = [36 x i8] c"/var/run/bookkeeper/bookkeeper.sock\00"
define void @print_help() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([617 x i8], [617 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x6d() {
  Assert_real((isbdigit(109) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              550, ("isbdigit should be 0 for m"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x6d>:
push   %rax
mov    $0x6d,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x226,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for m\00"
define void @t_isbdigit_0x6d() {
%1 = call i64 @isbdigit(i32 109)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 550, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for m\00"
define void @t_isbdigit_0x6d() {
%1 = tail call i64 @isbdigit(i32 109)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 550, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void lf_printstring(const char *str) { printf("%s", str); }


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

x86 assembly (clang, -O2):
<lf_printstring>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @lf_printstring(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
_Complex float test_catanf(_Complex float x) { return __builtin_catanf(x); }


x86 assembly (clang, -O0):
<test_catanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movlpd %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movss  %xmm1,-0x18(%rbp)
movss  %xmm0,-0x14(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <catanf@plt>
movlpd %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0x4(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_catanf>:
jmp    1030 <catanf@plt>

LLVM IR (-O0):
define <2 x float> @test_catanf(<2 x float> %0) {
%2 = alloca { float, float }
%3 = alloca { float, float }
%4 = alloca { float, float }
%5 = alloca { float, float }
%6 = bitcast { float, float }* %3 to <2 x float>*
store <2 x float> %0, <2 x float>* %6
%7 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%8 = load float, float* %7
%9 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
%10 = load float, float* %9
%11 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%12 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
store float %8, float* %11
store float %10, float* %12
%13 = bitcast { float, float }* %4 to <2 x float>*
%14 = load <2 x float>, <2 x float>* %13
%15 = call <2 x float> @catanf(<2 x float> %14)
%16 = bitcast { float, float }* %5 to <2 x float>*
store <2 x float> %15, <2 x float>* %16
%17 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 0
%18 = load float, float* %17
%19 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 1
%20 = load float, float* %19
%21 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%22 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
store float %18, float* %21
store float %20, float* %22
%23 = bitcast { float, float }* %2 to <2 x float>*
%24 = load <2 x float>, <2 x float>* %23
ret <2 x float> %24
}

LLVM IR (-O2):
define <2 x float> @test_catanf(<2 x float> %0) {
%2 = tail call <2 x float> @catanf(<2 x float> %0)
ret <2 x float> %2
}
/* Variables and functions */
int /*<<< orphan*/ twlist_test_list_add();
int /*<<< orphan*/ twlist_test_list_add_tail();
int /*<<< orphan*/ twlist_test_list_del();
int /*<<< orphan*/ twlist_test_list_del_init();
int /*<<< orphan*/ twlist_test_list_head_init();
void twlist_test(void) {
  twlist_test_list_head_init();
  twlist_test_list_add();
  twlist_test_list_add_tail();
  twlist_test_list_del();
  twlist_test_list_del_init();
}


x86 assembly (clang, -O0):
<twlist_test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <twlist_test_list_head_init@plt>
mov    $0x0,%al
call   1050 <twlist_test_list_add@plt>
mov    $0x0,%al
call   1060 <twlist_test_list_add_tail@plt>
mov    $0x0,%al
call   1040 <twlist_test_list_del@plt>
mov    $0x0,%al
call   1030 <twlist_test_list_del_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<twlist_test>:
push   %rax
xor    %eax,%eax
call   1070 <twlist_test_list_head_init@plt>
xor    %eax,%eax
call   1050 <twlist_test_list_add@plt>
xor    %eax,%eax
call   1060 <twlist_test_list_add_tail@plt>
xor    %eax,%eax
call   1040 <twlist_test_list_del@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <twlist_test_list_del_init@plt>

LLVM IR (-O0):
define void @twlist_test() {
%1 = call i32 (...) @twlist_test_list_head_init()
%2 = call i32 (...) @twlist_test_list_add()
%3 = call i32 (...) @twlist_test_list_add_tail()
%4 = call i32 (...) @twlist_test_list_del()
%5 = call i32 (...) @twlist_test_list_del_init()
ret void
}

LLVM IR (-O2):
define void @twlist_test() {
%1 = tail call i32 (...) @twlist_test_list_head_init()
%2 = tail call i32 (...) @twlist_test_list_add()
%3 = tail call i32 (...) @twlist_test_list_add_tail()
%4 = tail call i32 (...) @twlist_test_list_del()
%5 = tail call i32 (...) @twlist_test_list_del_init()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ htobe32(int /*<<< orphan*/);
uint32_t jet_htobe32(uint32_t host_endian_32bits) {
  return htobe32(host_endian_32bits);
}


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

x86 assembly (clang, -O2):
<jet_htobe32>:
jmp    1030 <htobe32@plt>

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

LLVM IR (-O2):
define i32 @jet_htobe32(i32 %0) {
%2 = tail call i32 @htobe32(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ ofl_buffer_print(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ *open_memstream(char **, size_t *);
char *ofl_buffer_to_string(uint32_t buffer) {
  char *str;
  size_t str_size;
  FILE *stream = open_memstream(&str, &str_size);
  ofl_buffer_print(stream, buffer);
  fclose(stream);
  return str;
}


x86 assembly (clang, -O0):
<ofl_buffer_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <open_memstream@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1050 <ofl_buffer_print@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ofl_buffer_to_string>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebp
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <open_memstream@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
call   1050 <ofl_buffer_print@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    0x8(%rsp),%rax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @ofl_buffer_to_string(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32*
store i32 %0, i32* %2
%6 = call i32* @open_memstream(i8** %3, i64* %4)
store i32* %6, i32** %5
%7 = load i32*, i32** %5
%8 = load i32, i32* %2
%9 = call i32 @ofl_buffer_print(i32* %7, i32 %8)
%10 = load i32*, i32** %5
%11 = call i32 @fclose(i32* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @ofl_buffer_to_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = bitcast i8** %2 to i8*
%5 = bitcast i64* %3 to i8*
%6 = call i32* @open_memstream(i8** %2, i64* %3)
%7 = call i32 @ofl_buffer_print(i32* %6, i32 %0)
%8 = call i32 @fclose(i32* %6)
%9 = load i8*, i8** %2
ret i8* %9
}
/* Type definitions */
typedef int /*<<< orphan*/ SSL;

/* Variables and functions */
unsigned int BIO_dgram_get_mtu_overhead(int /*<<< orphan*/);
int /*<<< orphan*/ SSL_get_wbio(int /*<<< orphan*/ *);
unsigned int dtls1_link_min_mtu();
unsigned int dtls1_min_mtu(SSL *s) {
  return dtls1_link_min_mtu() - BIO_dgram_get_mtu_overhead(SSL_get_wbio(s));
}


x86 assembly (clang, -O0):
<dtls1_min_mtu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <dtls1_link_min_mtu@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <SSL_get_wbio@plt>
mov    %eax,%edi
call   1050 <BIO_dgram_get_mtu_overhead@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtls1_min_mtu>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <dtls1_link_min_mtu@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <SSL_get_wbio@plt>
mov    %eax,%edi
call   1050 <BIO_dgram_get_mtu_overhead@plt>
sub    %eax,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @dtls1_min_mtu(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 (...) @dtls1_link_min_mtu()
%4 = load i32*, i32** %2
%5 = call i32 @SSL_get_wbio(i32* %4)
%6 = call i32 @BIO_dgram_get_mtu_overhead(i32 %5)
%7 = sub i32 %3, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @dtls1_min_mtu(i32* %0) {
%2 = tail call i32 (...) @dtls1_link_min_mtu()
%3 = tail call i32 @SSL_get_wbio(i32* %0)
%4 = tail call i32 @BIO_dgram_get_mtu_overhead(i32 %3)
%5 = sub i32 %2, %4
ret i32 %5
}
/* Variables and functions */
void *malloc(size_t);
void *memcpy(void *, void *, size_t);
void *memdup(void *src, size_t len) {
  void *dst = malloc(len);
  return memcpy(dst, src, len);
}


x86 assembly (clang, -O0):
<memdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memdup>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <malloc@plt>
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define i8* @memdup(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = call i8* @memcpy(i8* %8, i8* %9, i64 %10)
ret i8* %11
}

LLVM IR (-O2):
define noalias i8* @memdup(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %3, i8* align 1 %0, i64 %1, i1 false)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main() {
  int a = 320;
  char *ptr;
  ptr = (char *)&a;
  printf("\n%d\n", *ptr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x140,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
lea    0xec7(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"\0A%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), i8 signext 64)
ret i32 0
}
void UsageFaultISR(void) {
  while (1) {
  }
}


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

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

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

LLVM IR (-O2):
define void @UsageFaultISR() {
br label %1
1: ; preds = %0, %1
br label %1
}
int convertCharToWchar(char c) { return c & 0XFF; }


x86 assembly (clang, -O0):
<convertCharToWchar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertCharToWchar>:
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @convertCharToWchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 255
ret i32 %5
}

LLVM IR (-O2):
define i32 @convertCharToWchar(i8 signext %0) {
%2 = zext i8 %0 to i32
ret i32 %2
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int inter_unit_ck_int_eq(int first_test_number, int second_test_number) {
  int truth = EXIT_FAILURE;
  if (first_test_number == second_test_number) {
    truth = EXIT_SUCCESS;
  }
  return truth;
}


x86 assembly (clang, -O0):
<inter_unit_ck_int_eq>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ecf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    112e <inter_unit_ck_int_eq+0x2e>
mov    0x2eaf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inter_unit_ck_int_eq>:
cmp    %esi,%edi
jne    110e <inter_unit_ck_int_eq+0xe>
mov    0x2ecd(%rip),%rax
mov    (%rax),%eax
ret
mov    0x2ecb(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @inter_unit_ck_int_eq(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* @EXIT_FAILURE
store i32 %6, i32* %5
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32, i32* @EXIT_SUCCESS
store i32 %11, i32* %5
br label %12
12: ; preds = %10, %2
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @inter_unit_ck_int_eq(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = load i32, i32* @EXIT_SUCCESS
%5 = load i32, i32* @EXIT_FAILURE
%6 = select i1 %3, i32 %4, i32 %5
ret i32 %6
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
bool SHAREMIND_SET_KEY_LESS_THAN_uint16_t(uint16_t const k1,
                                          uint16_t const k2) {
  return k1 < k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_SET_KEY_LESS_THAN_uint16_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_LESS_THAN_uint16_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_uint16_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_uint16_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *basename(char *);
char *strrchr(char *, char);
char *basefile(char *s) {
  char *lastslash;
  lastslash = strrchr(s, '\\');
  if (!lastslash)
    return basename(s);
  lastslash++;
  return basename(lastslash);
}


x86 assembly (clang, -O0):
<basefile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x5c,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115b <basefile+0x3b>
mov    -0x10(%rbp),%rdi
call   1040 <basename@plt>
mov    %rax,-0x8(%rbp)
jmp    1174 <basefile+0x54>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <basename@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basefile>:
push   %rbx
mov    %rdi,%rbx
mov    $0x5c,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     1140 <basefile+0x20>
add    $0x1,%rax
mov    %rax,%rdi
pop    %rbx
jmp    1040 <basename@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <basename@plt>

LLVM IR (-O0):
define i8* @basefile(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strrchr(i8* %5, i8 signext 92)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %12, label %9
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i8* @basename(i8* %10)
store i8* %11, i8** %2
br label %17
12: ; preds = %1
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %4
%15 = load i8*, i8** %4
%16 = call i8* @basename(i8* %15)
store i8* %16, i8** %2
br label %17
17: ; preds = %12, %9
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
define i8* @basefile(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 92)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @basename(i8* %0)
br label %9
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %2, i64 1
%8 = tail call i8* @basename(i8* %7)
br label %9
9: ; preds = %6, %4
%10 = phi i8* [ %8, %6 ], [ %5, %4 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char c, s;
  scanf("%c", &c);
  s = 'z' - (c - 'a');
  printf("\n%c", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecb(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%ecx
sub    $0x61,%ecx
mov    $0x7a,%eax
sub    %ecx,%eax
mov    %al,-0x6(%rbp)
lea    0xea9(%rip),%rdi
movsbl -0x6(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed9(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
mov    $0xdb,%al
sub    0x7(%rsp),%al
movsbl %al,%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"\0A%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %6, 97
%8 = sub nsw i32 122, %7
%9 = trunc i32 %8 to i8
store i8 %9, i8* %3
%10 = load i8, i8* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"\0A%c\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sub i8 -37, %3
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mprintf(char *, char, char, char);
void recputinit(char *init) { mprintf("*%c%c%c\n", init[0], init[1], init[2]); }


x86 assembly (clang, -O0):
<recputinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%dl
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
lea    0xecc(%rip),%rdi
movsbl %dl,%esi
movsbl %cl,%edx
movsbl 0x2(%rax),%ecx
call   1030 <mprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recputinit>:
movsbl (%rdi),%esi
movsbl 0x1(%rdi),%edx
movsbl 0x2(%rdi),%ecx
lea    0xede(%rip),%rdi
jmp    1030 <mprintf@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"*%c%c%c\0A\00"
define void @recputinit(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = tail call i32 @mprintf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %2, i8 signext %4, i8 signext %6)
ret void
}
void Init_visitors() {}


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

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

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

LLVM IR (-O2):
define void @Init_visitors() {
ret void
}
int main(int argc, char **argv) {
  int x;
  double r = argc;
  if (!(0 >= r)) {
    x = 7;
  } else {
    x = 42;
  }
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jae    1136 <main+0x36>
movl   $0x7,-0x14(%rbp)
jmp    113d <main+0x3d>
movl   $0x2a,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
test   %edi,%edi
mov    $0x2a,%ecx
mov    $0x7,%eax
cmovle %ecx,%eax
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to double
store double %9, double* %7
%10 = load double, double* %7
%11 = fcmp oge double 0.000000e+00, %10
br i1 %11, label %13, label %12
12: ; preds = %2
store i32 7, i32* %6
br label %14
13: ; preds = %2
store i32 42, i32* %6
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %6
ret i32 %15
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp slt i32 %0, 1
%4 = select i1 %3, i32 42, i32 7
ret i32 %4
}
void ConsoleInit(int iDivider) {
  *(volatile unsigned int *)0xE002C000 =
      (*(volatile unsigned int *)0xE002C000 & ~0x0000000F) | 0x00000005;
  *(volatile unsigned int *)0xE000C00C = 0x83;
  *(volatile unsigned int *)0xE000C000 = iDivider & 0xFF;
  *(volatile unsigned int *)0xE000C004 = iDivider >> 8;
  *(volatile unsigned int *)0xE000C00C = 0x03;
  *(volatile unsigned int *)0xE000C008 = 1;
}


x86 assembly (clang, -O0):
<ConsoleInit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0xe002c000,%eax
mov    (%rax),%ecx
and    $0xfffffff0,%ecx
or     $0x5,%ecx
mov    $0xe002c000,%eax
mov    %ecx,(%rax)
mov    $0xe000c00c,%eax
movl   $0x83,(%rax)
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
mov    $0xe000c000,%eax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
mov    $0xe000c004,%eax
mov    %ecx,(%rax)
mov    $0xe000c00c,%eax
movl   $0x3,(%rax)
mov    $0xe000c008,%eax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConsoleInit>:
mov    $0xe000c00c,%eax
mov    0x1fff4(%rax),%ecx
and    $0xfffffff0,%ecx
or     $0x5,%ecx
mov    %ecx,0x1fff4(%rax)
movl   $0x83,(%rax)
movzbl %dil,%ecx
mov    %ecx,-0xc(%rax)
sar    $0x8,%edi
mov    %edi,-0x8(%rax)
movl   $0x3,(%rax)
movl   $0x1,-0x4(%rax)
ret

LLVM IR (-O0):
define void @ConsoleInit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load volatile i32, i32* inttoptr (i64 3758276608 to i32*)
%4 = and i32 %3, -16
%5 = or i32 %4, 5
store volatile i32 %5, i32* inttoptr (i64 3758276608 to i32*)
store volatile i32 131, i32* inttoptr (i64 3758145548 to i32*)
%6 = load i32, i32* %2
%7 = and i32 %6, 255
store volatile i32 %7, i32* inttoptr (i64 3758145536 to i32*)
%8 = load i32, i32* %2
%9 = ashr i32 %8, 8
store volatile i32 %9, i32* inttoptr (i64 3758145540 to i32*)
store volatile i32 3, i32* inttoptr (i64 3758145548 to i32*)
store volatile i32 1, i32* inttoptr (i64 3758145544 to i32*)
ret void
}

LLVM IR (-O2):
define void @ConsoleInit(i32 %0) {
%2 = load volatile i32, i32* inttoptr (i64 3758276608 to i32*)
%3 = and i32 %2, -16
%4 = or i32 %3, 5
store volatile i32 %4, i32* inttoptr (i64 3758276608 to i32*)
store volatile i32 131, i32* inttoptr (i64 3758145548 to i32*)
%5 = and i32 %0, 255
store volatile i32 %5, i32* inttoptr (i64 3758145536 to i32*)
%6 = ashr i32 %0, 8
store volatile i32 %6, i32* inttoptr (i64 3758145540 to i32*)
store volatile i32 3, i32* inttoptr (i64 3758145548 to i32*)
store volatile i32 1, i32* inttoptr (i64 3758145544 to i32*)
ret void
}
void getsmbpasswd_dummy(void) { ; }


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

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

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

LLVM IR (-O2):
define void @getsmbpasswd_dummy() {
ret void
}
void XLookupColor() {}


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

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

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

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

/* Variables and functions */
void UARTSmartCardDisable(uint32_t ui32Base) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000030))) &= ~0x00000008;
}


x86 assembly (clang, -O0):
<UARTSmartCardDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%eax
cltq
mov    (%rax),%ecx
and    $0xfffffff7,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTSmartCardDisable>:
movslq %edi,%rax
andl   $0xfffffff7,0x30(%rax)
ret

LLVM IR (-O0):
define void @UARTSmartCardDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 48
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, -9
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @UARTSmartCardDisable(i32 %0) {
%2 = add nsw i32 %0, 48
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, -9
store volatile i32 %6, i32* %4
ret void
}
void U010ToAR30() {}


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

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

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

LLVM IR (-O2):
define void @U010ToAR30() {
ret void
}
int test_imm_EEint16_mem(short *val) {
  return ((*val) & (-0xEE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_EEint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffff12,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_EEint16_mem>:
movzwl (%rdi),%eax
test   $0xff12,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_EEint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -238
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void putbstr(width, str) unsigned width;
char *str;
{
  unsigned length;
  for (length = strlen(str); length < width; ++length)
    putbyte(' ');
  putstr(str);
}


x86 assembly (clang, -O0):
<putbstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1171 <putbstr+0x41>
mov    $0x20,%edi
mov    $0x0,%al
call   1050 <putbyte@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114b <putbstr+0x1b>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <putstr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putbstr>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
cmp    %ebp,%eax
jae    1161 <putbstr+0x31>
sub    %eax,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    $0x20,%edi
xor    %eax,%eax
call   1050 <putbyte@plt>
add    $0xffffffff,%ebp
jne    1150 <putbstr+0x20>
mov    %rbx,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <putstr@plt>

LLVM IR (-O0):
define void @putbstr(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i64 @strlen(i8* %6)
%8 = trunc i64 %7 to i32
store i32 %8, i32* %5
br label %9
9: ; preds = %15, %2
%10 = load i32, i32* %5
%11 = load i32, i32* %3
%12 = icmp ult i32 %10, %11
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = call i32 (i32, ...) bitcast (i32 (...)* @putbyte to i32 (i32, ...)*)(i32 32)
br label %15
15: ; preds = %13
%16 = load i32, i32* %5
%17 = add i32 %16, 1
store i32 %17, i32* %5
br label %9
18: ; preds = %9
%19 = load i8*, i8** %4
%20 = call i32 (i8*, ...) bitcast (i32 (...)* @putstr to i32 (i8*, ...)*)(i8* %19)
ret void
}

LLVM IR (-O2):
define void @putbstr(i32 %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = trunc i64 %3 to i32
%5 = icmp ult i32 %4, %0
br i1 %5, label %6, label %11
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ %4, %2 ]
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @putbyte to i32 (i32, ...)*)(i32 32)
%9 = add i32 %7, 1
%10 = icmp eq i32 %9, %0
br i1 %10, label %11, label %6
11: ; preds = %6, %2
%12 = tail call i32 (i8*, ...) bitcast (i32 (...)* @putstr to i32 (i8*, ...)*)(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isPrime(int);
int calculateNextPrime(int currentPrime) {
  currentPrime = currentPrime + 2;
  while (!isPrime(currentPrime))
    currentPrime = currentPrime + 2;
  return currentPrime;
}


x86 assembly (clang, -O0):
<calculateNextPrime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isPrime@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1141 <calculateNextPrime+0x31>
jmp    114f <calculateNextPrime+0x3f>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <calculateNextPrime+0x14>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateNextPrime>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x2,%ebx
mov    %ebx,%edi
call   1030 <isPrime@plt>
test   %eax,%eax
je     1120 <calculateNextPrime+0x10>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @calculateNextPrime(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %4, %2 ]
%4 = add nsw i32 %3, 2
%5 = tail call i32 @isPrime(i32 %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %2, label %7
7: ; preds = %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Sync();
void MRestore(int version) { Sync(); }


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

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

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

LLVM IR (-O2):
define void @MRestore(i32 %0) {
%2 = tail call i32 (...) @Sync()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_set_pd1(double);
__m128d test_mm_set_pd1(double A) { return _mm_set_pd1(A); }


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

x86 assembly (clang, -O2):
<test_mm_set_pd1>:
jmp    1030 <_mm_set_pd1@plt>

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

LLVM IR (-O2):
define i32 @test_mm_set_pd1(double %0) {
%2 = tail call i32 @_mm_set_pd1(double %0)
ret i32 %2
}
void _Unwind_DeleteException() {}


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

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

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

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

/* Variables and functions */
int accept(int, struct sockaddr *, int /*<<< orphan*/);
int streamaccept(int lsock) {
  int sock;
  sock = accept(lsock, (struct sockaddr *)NULL, 0);
  if (sock < 0) {
    return -1;
  }
  return sock;
}


x86 assembly (clang, -O0):
<streamaccept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <accept@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1142 <streamaccept+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    1148 <streamaccept+0x38>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streamaccept>:
push   %rax
xor    %esi,%esi
xor    %edx,%edx
call   1030 <accept@plt>
test   %eax,%eax
mov    $0xffffffff,%ecx
cmovs  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @streamaccept(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @accept(i32 %5, %struct.sockaddr* null, i32 0)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %12
10: ; preds = %1
%11 = load i32, i32* %4
store i32 %11, i32* %2
br label %12
12: ; preds = %10, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @streamaccept(i32 %0) {
%2 = tail call i32 @accept(i32 %0, %struct.sockaddr* null, i32 0)
%3 = icmp sgt i32 %2, -1
%4 = select i1 %3, i32 %2, i32 -1
ret i32 %4
}
void f1(int i, int j, int k) {}


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

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

LLVM IR (-O0):
define void @f1(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @f1(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
void function_with_leak4(int y) {
  char *x = (char *)malloc(12);
  if (y)
    y++;
  else
    y--;
}


x86 assembly (clang, -O0):
<function_with_leak4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xc,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1141 <function_with_leak4+0x31>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    114a <function_with_leak4+0x3a>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_with_leak4>:
mov    $0xc,%edi
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define void @function_with_leak4(i32 %0) {
%2 = tail call i64 @malloc(i32 12)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ strcmp(char const *const, char const *const);
int32_t stringp_comparator(const void *pl, const void *pr) {
  return strcmp(*(const char *const *)pl, *(const char *const *)pr);
}


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

x86 assembly (clang, -O2):
<stringp_comparator>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @stringp_comparator(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @stringp_comparator(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
void audio_set_sound_on_off(int on) {}


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

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

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

LLVM IR (-O2):
define void @audio_set_sound_on_off(i32 %0) {
ret void
}
void safe_setuid_grab(void) {}


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

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

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

LLVM IR (-O2):
define void @safe_setuid_grab() {
ret void
}
void writeBlock(unsigned int block, unsigned char *data, int sync) {}


x86 assembly (clang, -O0):
<writeBlock>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @writeBlock(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
ret void
}

LLVM IR (-O2):
define void @writeBlock(i32 %0, i8* nocapture %1, i32 %2) {
ret void
}