xunge/DecIR huggingface dataset:
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, unsigned short);
void RNDResponseSink_RenderingControl_GetVolume(struct UPnPService *Service,
                                                int ErrorCode, void *User,
                                                unsigned short CurrentVolume) {
  printf(
      "RND Invoke Response: RenderingControl/GetVolume[ErrorCode:%d](%u)\r\n",
      ErrorCode, CurrentVolume);
}


x86 assembly (clang, -O0):
<RNDResponseSink_RenderingControl_GetVolume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cx,%ax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ax,-0x1a(%rbp)
mov    -0xc(%rbp),%esi
lea    0xecc(%rip),%rdi
movzwl -0x1a(%rbp),%edx
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNDResponseSink_RenderingControl_GetVolume>:
lea    0xee9(%rip),%rdi
mov    %ecx,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [68 x i8] c"RND Invoke Response: RenderingControl/GetVolume[ErrorCode:%d](%u)\0D\0A\00"
define void @RNDResponseSink_RenderingControl_GetVolume(%struct.UPnPService* %0, i32 %1, i8* %2, i16 zeroext %3) {
%5 = alloca %struct.UPnPService*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i16
store %struct.UPnPService* %0, %struct.UPnPService** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i16 %3, i16* %8
%9 = load i32, i32* %6
%10 = load i16, i16* %8
%11 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i32 %9, i16 zeroext %10)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [68 x i8] c"RND Invoke Response: RenderingControl/GetVolume[ErrorCode:%d](%u)\0D\0A\00"
define void @RNDResponseSink_RenderingControl_GetVolume(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i16 zeroext %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i32 %1, i16 zeroext %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ match(char);
void types() { match('t'); }


x86 assembly (clang, -O0):
<types>:
push   %rbp
mov    %rsp,%rbp
mov    $0x74,%edi
call   1030 <match@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<types>:
mov    $0x74,%edi
jmp    1030 <match@plt>

LLVM IR (-O0):
define void @types() {
%1 = call i32 @match(i8 signext 116)
ret void
}

LLVM IR (-O2):
define void @types() {
%1 = tail call i32 @match(i8 signext 116)
ret void
}
/* Variables and functions */
scalar_t__ scalbn(float, int);
float scalbnf(float x, int y) { return (float)scalbn(x, y); }


x86 assembly (clang, -O0):
<scalbnf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x8(%rbp),%edi
call   1030 <scalbn@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalbnf>:
push   %rax
call   1030 <scalbn@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @scalbnf(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
store float %0, float* %3
store i32 %1, i32* %4
%5 = load float, float* %3
%6 = load i32, i32* %4
%7 = call i64 @scalbn(float %5, i32 %6)
%8 = sitofp i64 %7 to float
ret float %8
}

LLVM IR (-O2):
define float @scalbnf(float %0, i32 %1) {
%3 = tail call i64 @scalbn(float %0, i32 %1)
%4 = sitofp i64 %3 to float
ret float %4
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
scalar_t__ ___sl_get_nondet_int();
int /*<<< orphan*/ l1_insert(struct list_head *);
void create_all_levels(struct list_head *list) {
  l1_insert(list);
  do
    l1_insert(list);
  while (___sl_get_nondet_int());
}


x86 assembly (clang, -O0):
<create_all_levels>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <l1_insert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <l1_insert@plt>
mov    $0x0,%al
call   1040 <___sl_get_nondet_int@plt>
cmp    $0x0,%rax
jne    1135 <create_all_levels+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_all_levels>:
push   %rbx
mov    %rdi,%rbx
call   1030 <l1_insert@plt>
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <l1_insert@plt>
xor    %eax,%eax
call   1040 <___sl_get_nondet_int@plt>
test   %rax,%rax
jne    1130 <create_all_levels+0x10>
pop    %rbx
ret

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @create_all_levels(%struct.list_head* %0) {
%2 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %2
%3 = load %struct.list_head*, %struct.list_head** %2
%4 = call i32 @l1_insert(%struct.list_head* %3)
br label %5
5: ; preds = %8, %1
%6 = load %struct.list_head*, %struct.list_head** %2
%7 = call i32 @l1_insert(%struct.list_head* %6)
br label %8
8: ; preds = %5
%9 = call i64 (...) @___sl_get_nondet_int()
%10 = icmp ne i64 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %8
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @create_all_levels(%struct.list_head* %0) {
%2 = tail call i32 @l1_insert(%struct.list_head* %0)
br label %3
3: ; preds = %3, %1
%4 = tail call i32 @l1_insert(%struct.list_head* %0)
%5 = tail call i64 (...) @___sl_get_nondet_int()
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpord_pd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d test_mm_cmpord_pd(__m128d __a, __m128d __b) {
  return _mm_cmpord_pd(__a, __b);
}


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

x86 assembly (clang, -O2):
<test_mm_cmpord_pd>:
jmp    1030 <_mm_cmpord_pd@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cmpord_pd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpord_pd(i32 %0, i32 %1)
ret i32 %3
}
int is1xx(int status) { return ((status >= 100) && (status < 200)); }


x86 assembly (clang, -O0):
<is1xx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x64,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1123 <is1xx+0x23>
cmpl   $0xc8,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is1xx>:
add    $0xffffff9c,%edi
xor    %eax,%eax
cmp    $0x64,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @is1xx(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 100
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 200
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is1xx(i32 %0) {
%2 = add i32 %0, -100
%3 = icmp ult i32 %2, 100
%4 = zext i1 %3 to i32
ret i32 %4
}
void __DELETE_java_util_ArrayList(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_util_ArrayList(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cvar_Set(char *, char *);
void Sys_Init(void) {
  Cvar_Set("arch", "linux"
                   " "
                   "x86_64");
}


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

x86 assembly (clang, -O2):
<Sys_Init>:
lea    0xee9(%rip),%rdi
lea    0xee7(%rip),%rsi
jmp    1030 <Cvar_Set@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"arch\00"
@.str.1 = [13 x i8] c"linux x86_64\00"
define void @Sys_Init() {
%1 = call i32 @Cvar_Set(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"arch\00"
@.str.1 = [13 x i8] c"linux x86_64\00"
define void @Sys_Init() {
%1 = tail call i32 @Cvar_Set(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char *langRomTypeScc() { return "SCC"; }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"SCC\00"
define i8* @langRomTypeScc() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ core9_print(char *, char const *);
void U_EMRARC_print(const char *contents) { core9_print("U_EMRARC", contents); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"U_EMRARC\00"
define void @U_EMRARC_print(i8* %0) {
%2 = tail call i32 @core9_print(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int test_imm_6Aint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x6A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_6Aint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0x6a,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_6Aint64_midword_mem>:
testb  $0x6a,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_6Aint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 106
%7 = icmp ne i64 %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_6Aint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 6946816
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_entity(int /*<<< orphan*/, char *,
                                             char *);
void test_shell_comment_entities() {
  test_parser_verify_entity(test_parser_sourcefile("shell", " #comment"),
                            "comment", "#comment");
}


x86 assembly (clang, -O0):
<test_shell_comment_entities>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec8(%rip),%rsi
lea    0xec0(%rip),%rdx
call   1040 <test_parser_verify_entity@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_shell_comment_entities>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
lea    0xecd(%rip),%rsi
lea    0xec5(%rip),%rdx
mov    %eax,%edi
pop    %rax
jmp    1040 <test_parser_verify_entity@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"shell\00"
@.str.1 = [10 x i8] c" #comment\00"
@.str.2 = [8 x i8] c"comment\00"
@.str.3 = [9 x i8] c"#comment\00"
define void @test_shell_comment_entities() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_entity(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"shell\00"
@.str.1 = [10 x i8] c" #comment\00"
@.str.2 = [8 x i8] c"comment\00"
@.str.3 = [9 x i8] c"#comment\00"
define void @test_shell_comment_entities() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_entity(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret void
}
float __cimagf(float _Complex z) { return __imag__ z; }


x86 assembly (clang, -O0):
<__cimagf>:
push   %rbp
mov    %rsp,%rbp
movlpd %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__cimagf>:
shufps $0x55,%xmm0,%xmm0
ret

LLVM IR (-O0):
define float @__cimagf(<2 x float> %0) {
%2 = alloca { float, float }
%3 = bitcast { float, float }* %2 to <2 x float>*
store <2 x float> %0, <2 x float>* %3
%4 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
%5 = load float, float* %4
ret float %5
}

LLVM IR (-O2):
define float @__cimagf(<2 x float> %0) {
%2 = extractelement <2 x float> %0, i64 1
ret float %2
}
int ft_is_op(char c) {
  if (c == '*')
    return (1);
  if (c == '/')
    return (2);
  if (c == '%')
    return (3);
  if (c == '+')
    return (4);
  if (c == '-')
    return (5);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_is_op>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2a,%eax
jne    1123 <ft_is_op+0x23>
movl   $0x1,-0x4(%rbp)
jmp    118e <ft_is_op+0x8e>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
jne    113c <ft_is_op+0x3c>
movl   $0x2,-0x4(%rbp)
jmp    118e <ft_is_op+0x8e>
movsbl -0x5(%rbp),%eax
cmp    $0x25,%eax
jne    1155 <ft_is_op+0x55>
movl   $0x3,-0x4(%rbp)
jmp    118e <ft_is_op+0x8e>
movsbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
jne    116e <ft_is_op+0x6e>
movl   $0x4,-0x4(%rbp)
jmp    118e <ft_is_op+0x8e>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
jne    1187 <ft_is_op+0x87>
movl   $0x5,-0x4(%rbp)
jmp    118e <ft_is_op+0x8e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_is_op>:
add    $0xdb,%dil
xor    %eax,%eax
cmp    $0xa,%dil
ja     111a <ft_is_op+0x1a>
movsbq %dil,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @ft_is_op(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 42
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %29
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 47
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 2, i32* %2
br label %29
13: ; preds = %8
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 37
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 3, i32* %2
br label %29
18: ; preds = %13
%19 = load i8, i8* %3
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 43
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 4, i32* %2
br label %29
23: ; preds = %18
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 45
br i1 %26, label %27, label %28
27: ; preds = %23
store i32 5, i32* %2
br label %29
28: ; preds = %23
store i32 0, i32* %2
br label %29
29: ; preds = %28, %27, %22, %17, %12, %7
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
@switch.table.ft_is_op = [11 x i32] [i32 3, i32 0, i32 0, i32 0, i32 0, i32 1, i32 4, i32 0, i32 5, i32 0, i32 2]
define i32 @ft_is_op(i8 signext %0) {
%2 = add i8 %0, -37
%3 = icmp ult i8 %2, 11
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.ft_is_op, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void erreur_nbSim(int nbSim) {
  printf("nbSim (=%d) ne valide pas nbSim > 0 !\n", nbSim);
}


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

x86 assembly (clang, -O2):
<erreur_nbSim>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"nbSim (=%d) ne valide pas nbSim > 0 !\0A\00"
define void @erreur_nbSim(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"nbSim (=%d) ne valide pas nbSim > 0 !\0A\00"
define void @erreur_nbSim(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void gtk_tree_view_column_add_attribute() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_add_attribute() {
ret void
}
void *ft_memset(void *s, int c, unsigned long size) {
  char *x;
  unsigned long pos;
  if (!s)
    return 0;
  pos = size;
  while (pos) {
    x = s;
    x[pos] = c;
    pos--;
  }
  return s;
}


x86 assembly (clang, -O0):
<ft_memset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1127 <ft_memset+0x27>
movq   $0x0,-0x8(%rbp)
jmp    116b <ft_memset+0x6b>
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1163 <ft_memset+0x63>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,%dl
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x30(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x30(%rbp)
jmp    112f <ft_memset+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memset>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
je     1127 <ft_memset+0x17>
test   %rdx,%rdx
je     1127 <ft_memset+0x17>
lea    0x1(%rbx),%rdi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ft_memset(i8* writeonly %0, i32 %1, i64 %2) {
%4 = icmp eq i8* %0, null
%5 = icmp eq i64 %2, 0
%6 = or i1 %4, %5
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = trunc i32 %1 to i8
%9 = getelementptr i8, i8* %0, i64 1
br label %10
10: ; preds = %7, %3
ret i8* %0
}
/* Variables and functions */
void Reserved_Handler14(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @Reserved_Handler14() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ isal_deflate_hash_base(int /*<<< orphan*/ *,
                                          int /*<<< orphan*/,
                                          int /*<<< orphan*/,
                                          int /*<<< orphan*/ *,
                                          int /*<<< orphan*/);
void isal_deflate_hash_lvl0(uint16_t *hash_table, uint32_t hash_mask,
                            uint32_t current_index, uint8_t *dict,
                            uint32_t dict_len) {
  isal_deflate_hash_base(hash_table, hash_mask, current_index, dict, dict_len);
}


x86 assembly (clang, -O0):
<isal_deflate_hash_lvl0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
call   1030 <isal_deflate_hash_base@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isal_deflate_hash_lvl0>:
jmp    1030 <isal_deflate_hash_base@plt>

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

LLVM IR (-O2):
define void @isal_deflate_hash_lvl0(i32* %0, i32 %1, i32 %2, i32* %3, i32 %4) {
%6 = tail call i32 @isal_deflate_hash_base(i32* %0, i32 %1, i32 %2, i32* %3, i32 %4)
ret void
}
void f(void) {
  int a[100][100];
#pragma hlt block factors(10, 20)
  for (int i = 0; i < 100; i++) {
    for (int j = 0; j < 100; j++) {
      a[i][j] = i * j;
    }
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9bd0,%rsp
movl   $0x0,-0x9c44(%rbp)
cmpl   $0x64,-0x9c44(%rbp)
jge    1195 <f+0x95>
movl   $0x0,-0x9c48(%rbp)
cmpl   $0x64,-0x9c48(%rbp)
jge    117c <f+0x7c>
mov    -0x9c44(%rbp),%edx
imul   -0x9c48(%rbp),%edx
movslq -0x9c44(%rbp),%rcx
lea    -0x9c40(%rbp),%rax
imul   $0x190,%rcx,%rcx
add    %rcx,%rax
movslq -0x9c48(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x9c48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c48(%rbp)
jmp    112c <f+0x2c>
jmp    1181 <f+0x81>
mov    -0x9c44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c44(%rbp)
jmp    1115 <f+0x15>
add    $0x9bd0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f() {
%1 = alloca [100 x [100 x i32]]
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %2
br label %4
4: ; preds = %25, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %28
7: ; preds = %4
store i32 0, i32* %3
br label %8
8: ; preds = %21, %7
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 100
br i1 %10, label %11, label %24
11: ; preds = %8
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = mul nsw i32 %12, %13
%15 = load i32, i32* %2
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %1, i64 0, i64 %16
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [100 x i32], [100 x i32]* %17, i64 0, i64 %19
store i32 %14, i32* %20
br label %21
21: ; preds = %11
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
br label %8
24: ; preds = %8
br label %25
25: ; preds = %24
%26 = load i32, i32* %2
%27 = add nsw i32 %26, 1
store i32 %27, i32* %2
br label %4
28: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
void serial_set_mode(int sbm) {}


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

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

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

LLVM IR (-O2):
define void @serial_set_mode(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EOR_();
int /*<<< orphan*/ c64_memZero();
void EOR_zp(void) {
  c64_memZero();
  EOR_();
}


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

x86 assembly (clang, -O2):
<EOR_zp>:
push   %rax
xor    %eax,%eax
call   1030 <c64_memZero@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <EOR_@plt>

LLVM IR (-O0):
define void @EOR_zp() {
%1 = call i32 (...) @c64_memZero()
%2 = call i32 (...) @EOR_()
ret void
}

LLVM IR (-O2):
define void @EOR_zp() {
%1 = tail call i32 (...) @c64_memZero()
%2 = tail call i32 (...) @EOR_()
ret void
}
/* Type definitions */
struct dirent {
  int dummy;
};

/* Variables and functions */
int scandir_main(char const *, struct dirent ***, int (*)(void const *),
                 int (*)(struct dirent const **, struct dirent const **),
                 int /*<<< orphan*/);
int scandir2(const char *path, struct dirent ***e,
             int (*filter)(const struct dirent *),
             int (*compare)(const struct dirent **, const struct dirent **)) {
  return scandir_main(path, e, (int (*)(const void *))filter, compare, 0);
}


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

x86 assembly (clang, -O2):
<scandir2>:
xor    %r8d,%r8d
jmp    1030 <scandir_main@plt>

LLVM IR (-O0):
%struct.dirent = type { i32 }
define i32 @scandir2(i8* %0, %struct.dirent*** %1, i32 (%struct.dirent*)* %2, i32 (%struct.dirent**, %struct.dirent**)* %3) {
%5 = alloca i8*
%6 = alloca %struct.dirent***
%7 = alloca i32 (%struct.dirent*)*
%8 = alloca i32 (%struct.dirent**, %struct.dirent**)*
store i8* %0, i8** %5
store %struct.dirent*** %1, %struct.dirent**** %6
store i32 (%struct.dirent*)* %2, i32 (%struct.dirent*)** %7
store i32 (%struct.dirent**, %struct.dirent**)* %3, i32 (%struct.dirent**, %struct.dirent**)** %8
%9 = load i8*, i8** %5
%10 = load %struct.dirent***, %struct.dirent**** %6
%11 = load i32 (%struct.dirent*)*, i32 (%struct.dirent*)** %7
%12 = bitcast i32 (%struct.dirent*)* %11 to i32 (i8*)*
%13 = load i32 (%struct.dirent**, %struct.dirent**)*, i32 (%struct.dirent**, %struct.dirent**)** %8
%14 = call i32 @scandir_main(i8* %9, %struct.dirent*** %10, i32 (i8*)* %12, i32 (%struct.dirent**, %struct.dirent**)* %13, i32 0)
ret i32 %14
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
define i32 @scandir2(i8* %0, %struct.dirent*** %1, i32 (%struct.dirent*)* %2, i32 (%struct.dirent**, %struct.dirent**)* %3) {
%5 = bitcast i32 (%struct.dirent*)* %2 to i32 (i8*)*
%6 = tail call i32 @scandir_main(i8* %0, %struct.dirent*** %1, i32 (i8*)* %5, i32 (%struct.dirent**, %struct.dirent**)* %3, i32 0)
ret i32 %6
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int a, b, olda;
  a = __VERIFIER_nondet_int();
  b = __VERIFIER_nondet_int();
  while (a >= 7) {
    olda = a;
    a = b;
    b = olda + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x7,-0x8(%rbp)
jl     1157 <main+0x47>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
size_t hex_encode(int /*<<< orphan*/, void const *, size_t, char *, size_t);
__attribute__((always_)) size_t base16_encode(const void *raw, size_t raw_len,
                                              char *data, size_t len) {
  return hex_encode(0, raw, raw_len, data, len);
}


x86 assembly (clang, -O0):
<base16_encode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
xor    %edi,%edi
call   1030 <hex_encode@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<base16_encode>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <hex_encode@plt>

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

LLVM IR (-O2):
define i64 @base16_encode(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = tail call i64 @hex_encode(i32 0, i8* %0, i64 %1, i8* %2, i64 %3)
ret i64 %5
}
void prepare_cleanup_device_(long *Mesh_pointer, int *ACOUSTIC_SIMULATION,
                             int *ELASTIC_SIMULATION, int *ABSORBING_CONDITIONS,
                             int *ANISOTROPY, int *APPROXIMATE_HESS_KL) {}


x86 assembly (clang, -O0):
<prepare_cleanup_device_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @prepare_cleanup_device_(i64* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i64*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
store i64* %0, i64** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
ret void
}

LLVM IR (-O2):
define void @prepare_cleanup_device_(i64* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3, i32* nocapture %4, i32* nocapture %5) {
ret void
}
int main(void) {
  int a;
  ++a;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void ScaleRowDown2_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown2_AVX2() {
ret void
}
void foo_2_1_2_1_2_2_2_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_2_1_2_2_2_2_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MAP_PRIVATE;
int /*<<< orphan*/ PROT_NONE;
int /*<<< orphan*/ access(char *, int);
int /*<<< orphan*/ getuid();
int /*<<< orphan*/ mmap(void *, int, int /*<<< orphan*/, int /*<<< orphan*/,
                        int, int /*<<< orphan*/);
int /*<<< orphan*/ setuid(int);
void ignoredReturnValue(void *addr, int fd) {
  mmap(addr, 255, PROT_NONE, MAP_PRIVATE, fd, 0);
  getuid();
  access("filename", 1);
  setuid(42);
}


x86 assembly (clang, -O0):
<ignoredReturnValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e96(%rip),%rax
mov    (%rax),%edx
mov    0x2e75(%rip),%rax
mov    (%rax),%ecx
mov    -0xc(%rbp),%r8d
mov    $0xff,%esi
xor    %r9d,%r9d
call   1040 <mmap@plt>
mov    $0x0,%al
call   1030 <getuid@plt>
lea    0xe7c(%rip),%rdi
mov    $0x1,%esi
call   1050 <access@plt>
mov    $0x2a,%edi
call   1060 <setuid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ignoredReturnValue>:
push   %rax
mov    %esi,%r8d
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
mov    0x2e84(%rip),%rax
mov    (%rax),%ecx
mov    $0xff,%esi
xor    %r9d,%r9d
call   1040 <mmap@plt>
xor    %eax,%eax
call   1030 <getuid@plt>
lea    0xe8f(%rip),%rdi
mov    $0x1,%esi
call   1050 <access@plt>
mov    $0x2a,%edi
pop    %rax
jmp    1060 <setuid@plt>

LLVM IR (-O0):
@PROT_NONE = global i32 0
@MAP_PRIVATE = global i32 0
@.str = [9 x i8] c"filename\00"
define void @ignoredReturnValue(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* @PROT_NONE
%7 = load i32, i32* @MAP_PRIVATE
%8 = load i32, i32* %4
%9 = call i32 @mmap(i8* %5, i32 255, i32 %6, i32 %7, i32 %8, i32 0)
%10 = call i32 (...) @getuid()
%11 = call i32 @access(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1)
%12 = call i32 @setuid(i32 42)
ret void
}

LLVM IR (-O2):
@PROT_NONE = global i32 0
@MAP_PRIVATE = global i32 0
@.str = [9 x i8] c"filename\00"
define void @ignoredReturnValue(i8* %0, i32 %1) {
%3 = load i32, i32* @PROT_NONE
%4 = load i32, i32* @MAP_PRIVATE
%5 = tail call i32 @mmap(i8* %0, i32 255, i32 %3, i32 %4, i32 %1, i32 0)
%6 = tail call i32 (...) @getuid()
%7 = tail call i32 @access(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1)
%8 = tail call i32 @setuid(i32 42)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t bufToUInt16(uint8_t *buf) { return (buf[0] << 8) | (buf[1] << 0); }


x86 assembly (clang, -O0):
<bufToUInt16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x0,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bufToUInt16>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @bufToUInt16(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = shl i32 %9, 0
%11 = or i32 %6, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @bufToUInt16(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = or i32 %3, %5
ret i32 %6
}
char key_4() { return (((*(volatile unsigned long *)0x7F008834) & (1 << 3))); }


x86 assembly (clang, -O0):
<key_4>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f008834,%eax
mov    (%rax),%rax
and    $0x8,%rax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<key_4>:
mov    0x7f008834,%rax
7f
and    $0x8,%al
ret

LLVM IR (-O0):
define signext i8 @key_4() {
%1 = load volatile i64, i64* inttoptr (i64 2130741300 to i64*)
%2 = and i64 %1, 8
%3 = trunc i64 %2 to i8
ret i8 %3
}

LLVM IR (-O2):
define signext i8 @key_4() {
%1 = load volatile i64, i64* inttoptr (i64 2130741300 to i64*)
%2 = trunc i64 %1 to i8
%3 = and i8 %2, 8
ret i8 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void now_r(char *str) {
  time_t epochsec = time(NULL);
  struct tm *proute;
  proute = localtime(&epochsec);
  strftime(str, 64, "%Y-%m-%d %H:%M:%S", proute);
}


x86 assembly (clang, -O0):
<now_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x40,%esi
lea    0xe97(%rip),%rdx
call   1050 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<now_r>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xeac(%rip),%rdx
mov    %rbx,%rdi
mov    $0x40,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define void @now_r(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.tm*
store i8* %0, i8** %2
%5 = call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call %struct.tm* @localtime(i32* %3)
store %struct.tm* %6, %struct.tm** %4
%7 = load i8*, i8** %2
%8 = load %struct.tm*, %struct.tm** %4
%9 = call i32 @strftime(i8* %7, i32 64, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %8)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define void @now_r(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @time(i32* null)
store i32 %4, i32* %2
%5 = call %struct.tm* @localtime(i32* %2)
%6 = call i32 @strftime(i8* %0, i32 64, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  int x = 9;
  int y = 12;
  if (x < 10) {
    if (y > 10) {
      puts("*****");
    } else {
      puts("#####");
    }
    puts("$$$$$");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x9,-0x8(%rbp)
movl   $0xc,-0xc(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    116a <main+0x5a>
cmpl   $0xa,-0xc(%rbp)
jle    1152 <main+0x42>
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
jmp    115e <main+0x4e>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
lea    0xea7(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"*****\00"
@.str.2 = [6 x i8] c"$$$$$\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glLoadIdentity();
void qglLoadIdentity(void) { glLoadIdentity(); }


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

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

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

LLVM IR (-O2):
define void @qglLoadIdentity() {
%1 = tail call i32 (...) @glLoadIdentity()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void timer_handler(int signal) { printf("alarm\n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"alarm\00"
define void @timer_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int isatty(int);
int octave_isatty_wrapper(int fd) { return isatty(fd); }


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

x86 assembly (clang, -O2):
<octave_isatty_wrapper>:
jmp    1030 <isatty@plt>

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

LLVM IR (-O2):
define i32 @octave_isatty_wrapper(i32 %0) {
%2 = tail call i32 @isatty(i32 %0)
ret i32 %2
}
/* Variables and functions */
unsigned int bswap_32(unsigned int);
unsigned int dt_swap_int(unsigned int data) { return bswap_32(data); }


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

x86 assembly (clang, -O2):
<dt_swap_int>:
jmp    1030 <bswap_32@plt>

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

LLVM IR (-O2):
define i32 @dt_swap_int(i32 %0) {
%2 = tail call i32 @bswap_32(i32 %0)
ret i32 %2
}
unsigned int HashString(const char *s) {
  unsigned int ret = 0;
  while (*s != '\0') {
    ret += ((ret << 3) + (unsigned int)*s++);
  }
  return ret;
}


x86 assembly (clang, -O0):
<HashString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1144 <HashString+0x44>
mov    -0xc(%rbp),%eax
shl    $0x3,%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <HashString+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HashString>:
mov    (%rdi),%cl
test   %cl,%cl
je     1124 <HashString+0x24>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
lea    (%rax,%rax,8),%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <HashString+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @HashString(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %9, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %4
%10 = load i32, i32* %3
%11 = shl i32 %10, 3
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
%14 = load i8, i8* %12
%15 = sext i8 %14 to i32
%16 = add i32 %11, %15
%17 = load i32, i32* %3
%18 = add i32 %17, %16
store i32 %18, i32* %3
br label %4
19: ; preds = %4
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @HashString(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = mul i32 %6, 9
%11 = add i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Type definitions */
struct wireless_dev {
  int dummy;
};
struct brcmf_cfg80211_priv {
  int dummy;
};

/* Variables and functions */
scalar_t__ wdev_priv(struct wireless_dev *);
struct brcmf_cfg80211_priv *wdev_to_cfg(struct wireless_dev *wd) {
  return (struct brcmf_cfg80211_priv *)(wdev_priv(wd));
}


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

x86 assembly (clang, -O2):
<wdev_to_cfg>:
jmp    1030 <wdev_priv@plt>

LLVM IR (-O0):
%struct.brcmf_cfg80211_priv = type { i32 }
%struct.wireless_dev = type { i32 }
define %struct.brcmf_cfg80211_priv* @wdev_to_cfg(%struct.wireless_dev* %0) {
%2 = alloca %struct.wireless_dev*
store %struct.wireless_dev* %0, %struct.wireless_dev** %2
%3 = load %struct.wireless_dev*, %struct.wireless_dev** %2
%4 = call i64 @wdev_priv(%struct.wireless_dev* %3)
%5 = inttoptr i64 %4 to %struct.brcmf_cfg80211_priv*
ret %struct.brcmf_cfg80211_priv* %5
}

LLVM IR (-O2):
%struct.brcmf_cfg80211_priv = type { i32 }
%struct.wireless_dev = type { i32 }
define %struct.brcmf_cfg80211_priv* @wdev_to_cfg(%struct.wireless_dev* %0) {
%2 = tail call i64 @wdev_priv(%struct.wireless_dev* %0)
%3 = inttoptr i64 %2 to %struct.brcmf_cfg80211_priv*
ret %struct.brcmf_cfg80211_priv* %3
}