xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x47() {
  Assert_real((isspace(71) == 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_isspace.c",
              360, ("isspace should be 0 for G"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x47>:
push   %rax
mov    $0x47,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x168,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for G\00"
define void @t_isspace_0x47() {
%1 = call i64 @isspace(i32 71)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 360, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for G\00"
define void @t_isspace_0x47() {
%1 = tail call i64 @isspace(i32 71)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 360, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  short angle1;
};
typedef TYPE_1__ XArc;

/* Variables and functions */
void set_XArc_angle1(void *_p, short _v) { ((XArc *)_p)->angle1 = (short)_v; }


x86 assembly (clang, -O0):
<set_XArc_angle1>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XArc_angle1>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i16 }
define void @set_XArc_angle1(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i16 %5, i16* %8
ret void
}

LLVM IR (-O2):
define void @set_XArc_angle1(i8* nocapture writeonly %0, i16 signext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
int test_imm_F2int64_lowword_reg(long long val) {
  return ((val) & (0xF2 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_F2int64_lowword_reg>:
test   $0xf2,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_F2int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 242
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ w5100_writeSn_byte(unsigned int, int, unsigned int);
void w5100_writeSnTX_RD(unsigned sock, unsigned data) {
  w5100_writeSn_byte(sock, 0x0022, data >> 8);
  w5100_writeSn_byte(sock, 0x0022 + 1, data & 0xFF);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
shr    $0x8,%edx
mov    $0x22,%esi
call   1030 <w5100_writeSn_byte@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
and    $0xff,%edx
mov    $0x23,%esi
call   1030 <w5100_writeSn_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edx
shr    $0x8,%edx
mov    $0x22,%esi
call   1030 <w5100_writeSn_byte@plt>
movzbl %bl,%edx
mov    %ebp,%edi
mov    $0x23,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <w5100_writeSn_byte@plt>

LLVM IR (-O0):
define void @w5100_writeSnTX_RD(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 = lshr i32 %6, 8
%8 = call i32 @w5100_writeSn_byte(i32 %5, i32 34, i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = and i32 %10, 255
%12 = call i32 @w5100_writeSn_byte(i32 %9, i32 35, i32 %11)
ret void
}

LLVM IR (-O2):
define void @w5100_writeSnTX_RD(i32 %0, i32 %1) {
%3 = lshr i32 %1, 8
%4 = tail call i32 @w5100_writeSn_byte(i32 %0, i32 34, i32 %3)
%5 = and i32 %1, 255
%6 = tail call i32 @w5100_writeSn_byte(i32 %0, i32 35, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x63() {
  Assert_real((ispunct(99) == 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_ispunct.c",
              500, ("ispunct should be 0 for c"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x63>:
push   %rax
mov    $0x63,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1f4,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for c\00"
define void @t_ispunct_0x63() {
%1 = call i64 @ispunct(i32 99)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 500, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for c\00"
define void @t_ispunct_0x63() {
%1 = tail call i64 @ispunct(i32 99)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 500, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *name) {
  fprintf(stderr, "usage: %s [-a | -c] <ppsdev>\n", name);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"usage: %s [-a | -c] <ppsdev>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"usage: %s [-a | -c] <ppsdev>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct matrix {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ matrix_append_value(struct matrix *, float);
struct matrix *matrix_new();
struct matrix *matrix_new_with_value(float value) {
  struct matrix *matrix = matrix_new();
  matrix_append_value(matrix, value);
  return matrix;
}


x86 assembly (clang, -O0):
<matrix_new_with_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <matrix_new@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movss  -0x4(%rbp),%xmm0
call   1030 <matrix_append_value@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrix_new_with_value>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
xor    %eax,%eax
call   1040 <matrix_new@plt>
mov    %rax,%rbx
mov    %rax,%rdi
movss  0xc(%rsp),%xmm0
call   1030 <matrix_append_value@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.matrix = type { i32 }
define %struct.matrix* @matrix_new_with_value(float %0) {
%2 = alloca float
%3 = alloca %struct.matrix*
store float %0, float* %2
%4 = call %struct.matrix* (...) @matrix_new()
store %struct.matrix* %4, %struct.matrix** %3
%5 = load %struct.matrix*, %struct.matrix** %3
%6 = load float, float* %2
%7 = call i32 @matrix_append_value(%struct.matrix* %5, float %6)
%8 = load %struct.matrix*, %struct.matrix** %3
ret %struct.matrix* %8
}

LLVM IR (-O2):
%struct.matrix = type { i32 }
define %struct.matrix* @matrix_new_with_value(float %0) {
%2 = tail call %struct.matrix* (...) @matrix_new()
%3 = tail call i32 @matrix_append_value(%struct.matrix* %2, float %0)
ret %struct.matrix* %2
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_trip_save(int /*<<< orphan*/ *);
void roadmap_start_save_trip_as(void) { roadmap_trip_save(NULL); }


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

x86 assembly (clang, -O2):
<roadmap_start_save_trip_as>:
xor    %edi,%edi
jmp    1030 <roadmap_trip_save@plt>

LLVM IR (-O0):
define void @roadmap_start_save_trip_as() {
%1 = call i32 @roadmap_trip_save(i32* null)
ret void
}

LLVM IR (-O2):
define void @roadmap_start_save_trip_as() {
%1 = tail call i32 @roadmap_trip_save(i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_msg(int val) { printf("value is %d\n", val); }


x86 assembly (clang, -O0):
<print_msg>:
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):
<print_msg>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"value is %d\0A\00"
define void @print_msg(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ erff(float);
int /*<<< orphan*/ link_failure_erff();
void test_erff(float f) {
  if (erff(f) != erff(f))
    link_failure_erff();
}


x86 assembly (clang, -O0):
<test_erff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <erff@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <erff@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_erff+0x3c>
mov    $0x0,%al
call   1040 <link_failure_erff@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_erff>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1030 <erff@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1030 <erff@plt>
cmp    %rax,%rbx
jne    1149 <test_erff+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <link_failure_erff@plt>

LLVM IR (-O0):
define void @test_erff(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @erff(float %3)
%5 = load float, float* %2
%6 = call i64 @erff(float %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_erff()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_erff(float %0) {
%2 = tail call i64 @erff(float %0)
%3 = tail call i64 @erff(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_erff()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
unsigned short strcspn(const char *first, const char *second) { return 0; }


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

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

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

LLVM IR (-O2):
define zeroext i16 @strcspn(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i16 0
}
/* Variables and functions */
bool is_vowel(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u')
    return true;
  return false;
}


x86 assembly (clang, -O0):
<is_vowel>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
je     114b <is_vowel+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x65,%eax
je     114b <is_vowel+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x69,%eax
je     114b <is_vowel+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x6f,%eax
je     114b <is_vowel+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x75,%eax
jne    1157 <is_vowel+0x57>
movl   $0x1,-0x4(%rbp)
jmp    115e <is_vowel+0x5e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_vowel>:
add    $0x9f,%dil
ror    %dil
xor    %eax,%eax
cmp    $0xa,%dil
ja     111d <is_vowel+0x1d>
movsbq %dil,%rax
lea    0xee6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @is_vowel(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, 97
br i1 %6, label %23, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 101
br i1 %10, label %23, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 105
br i1 %14, label %23, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 111
br i1 %18, label %23, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 117
br i1 %22, label %23, label %24
23: ; preds = %19, %15, %11, %7, %1
store i32 1, i32* %2
br label %25
24: ; preds = %19
store i32 0, i32* %2
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
@switch.table.is_vowel = [11 x i32] [i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1]
define i32 @is_vowel(i8 signext %0) {
%2 = add i8 %0, -97
%3 = tail call i8 @llvm.fshl.i8(i8 %2, i8 %2, i8 7)
%4 = icmp ult i8 %3, 11
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i8 %3 to i64
%7 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.is_vowel, i64 0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %1, %5
%10 = phi i32 [ %8, %5 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ pushviewport();
pushvi_() { pushviewport(); }


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

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

LLVM IR (-O0):
define i32 @pushvi_() {
%1 = alloca i32
%2 = call i32 (...) @pushviewport()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @pushvi_() {
%1 = tail call i32 (...) @pushviewport()
ret i32 undef
}
const char *Doc_Definition(void) {
  return "struct Example {\n"
         "  const char* name;\n"
         "  const char* body;\n"
         "};\n"
         "\n"
         "struct Method {\n"
         "  const char* name;\n"
         "  const char* definition;\n"
         "  const char* description;\n"
         "};\n"
         "\n"
         "struct Doc {\n"
         "  const char* (*name)(void);\n"
         "  const char* (*brief)(void);\n"
         "  const char* (*description)(void);\n"
         "  const char* (*definition)(void);\n"
         "  struct Example* (*examples)(void);\n"
         "  struct Method* (*methods)(void);\n"
         "};\n";
}


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

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

LLVM IR (-O0):
@.str = [373 x i8] c"struct Example {\0A const char* name;\0A const char* body;\0A};\0A\0Astruct Method {\0A const char* name;\0A const char* definition;\0A const char* description;\0A};\0A\0Astruct Doc {\0A const char* (*name)(void);\0A const char* (*brief)(void);\0A const char* (*description)(void);\0A const char* (*definition)(void);\0A struct Example* (*examples)(void);\0A struct Method* (*methods)(void);\0A};\0A\00"
define i8* @Doc_Definition() {
ret i8* getelementptr inbounds ([373 x i8], [373 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [373 x i8] c"struct Example {\0A const char* name;\0A const char* body;\0A};\0A\0Astruct Method {\0A const char* name;\0A const char* definition;\0A const char* description;\0A};\0A\0Astruct Doc {\0A const char* (*name)(void);\0A const char* (*brief)(void);\0A const char* (*description)(void);\0A const char* (*definition)(void);\0A struct Example* (*examples)(void);\0A struct Method* (*methods)(void);\0A};\0A\00"
define i8* @Doc_Definition() {
ret i8* getelementptr inbounds ([373 x i8], [373 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
unsigned long ReadGx(int);
int PLAL_IsTVOn(void) {
  unsigned long reg;
  reg = ReadGx(0x10024);
  return (reg & 0x0400) ? 1 : 0;
}


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

x86 assembly (clang, -O2):
<PLAL_IsTVOn>:
push   %rax
mov    $0x10024,%edi
call   1030 <ReadGx@plt>
shr    $0xa,%eax
and    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @PLAL_IsTVOn() {
%1 = tail call i64 @ReadGx(i32 65572)
%2 = trunc i64 %1 to i32
%3 = lshr i32 %2, 10
%4 = and i32 %3, 1
ret i32 %4
}
int isleftbarce(char c) { return '[' == c ? 1 : 0; }


x86 assembly (clang, -O0):
<isleftbarce>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%esi
mov    $0x5b,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isleftbarce>:
xor    %eax,%eax
cmp    $0x5b,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @isleftbarce(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 91, %4
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 1, i32 0
ret i32 %7
}

LLVM IR (-O2):
define i32 @isleftbarce(i8 signext %0) {
%2 = icmp eq i8 %0, 91
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int type;
};
typedef TYPE_1__ XReparentEvent;

/* Variables and functions */
void set_XReparentEvent_type(void *_p, int _v) {
  ((XReparentEvent *)_p)->type = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XReparentEvent_type>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XReparentEvent_type(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XReparentEvent_type(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
long file_write_time(char *);
long int fileutils___file_write_time(char *filename) {
  return (file_write_time(filename));
}


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

x86 assembly (clang, -O2):
<fileutils___file_write_time>:
jmp    1030 <file_write_time@plt>

LLVM IR (-O0):
define i64 @fileutils___file_write_time(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @file_write_time(i8* %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @fileutils___file_write_time(i8* %0) {
%2 = tail call i64 @file_write_time(i8* %0)
ret i64 %2
}
int top(int *stack, int n) {
  int row;
  for (row = n - 1; row >= 0; row--) {
    if (stack[row] != -1) {
      return row;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<top>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     114e <top+0x4e>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0xffffffff,(%rax,%rcx,4)
je     113b <top+0x3b>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1155 <top+0x55>
jmp    1140 <top+0x40>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    1114 <top+0x14>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<top>:
mov    %esi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %eax,%eax
jle    1121 <top+0x21>
add    $0xffffffffffffffff,%rax
mov    %eax,%ecx
cmpl   $0xffffffff,(%rdi,%rcx,4)
je     1110 <top+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @top(i32* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
br label %4
4: ; preds = %9, %2
%5 = phi i64 [ %6, %9 ], [ %3, %2 ]
%6 = add nsw i64 %5, -1
%7 = trunc i64 %5 to i32
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %4
%10 = and i64 %6, 4294967295
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, -1
br i1 %13, label %4, label %14
14: ; preds = %9
%15 = trunc i64 %6 to i32
br label %16
16: ; preds = %4, %14
%17 = phi i32 [ %15, %14 ], [ 0, %4 ]
ret i32 %17
}
int security_task_kill(struct task_struct *p, struct siginfo *info, int sig) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.task_struct = type opaque
%struct.siginfo = type opaque
define i32 @security_task_kill(%struct.task_struct* %0, %struct.siginfo* %1, i32 %2) {
%4 = alloca %struct.task_struct*
%5 = alloca %struct.siginfo*
%6 = alloca i32
store %struct.task_struct* %0, %struct.task_struct** %4
store %struct.siginfo* %1, %struct.siginfo** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.task_struct = type opaque
%struct.siginfo = type opaque
define i32 @security_task_kill(%struct.task_struct* nocapture readnone %0, %struct.siginfo* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
double fabs(scalar_t__);
scalar_t__ log10(double);
int main(int argc, char const *argv[]) {
  if (fabs(log10(10.0) - 1.0) < 0.000001) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xed2(%rip),%xmm0
call   1040 <log10@plt>
cvtsi2sd %rax,%xmm0
movsd  0xeb8(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <fabs@plt>
movaps %xmm0,%xmm1
movsd  0xe97(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    117f <main+0x5f>
movl   $0x0,-0x4(%rbp)
jmp    1186 <main+0x66>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1040 <log10@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xeca(%rip),%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <fabs@plt>
movsd  0xec0(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setbe  %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i64 @log10(double 1.000000e+01)
%7 = sitofp i64 %6 to double
%8 = fsub double %7, 1.000000e+00
%9 = fptosi double %8 to i64
%10 = call double @fabs(i64 %9)
%11 = fcmp olt double %10, 0x3EB0C6F7A0B5ED8D
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 0, i32* %3
br label %14
13: ; preds = %2
store i32 1, i32* %3
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @log10(double 1.000000e+01)
%4 = sitofp i64 %3 to double
%5 = fadd double %4, -1.000000e+00
%6 = fptosi double %5 to i64
%7 = tail call double @fabs(i64 %6)
%8 = fcmp uge double %7, 0x3EB0C6F7A0B5ED8D
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Type definitions */
struct RNAplot_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ RNAplot_cmdline_parser_release(struct RNAplot_args_info *);
void RNAplot_cmdline_parser_free(struct RNAplot_args_info *args_info) {
  RNAplot_cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<RNAplot_cmdline_parser_free>:
jmp    1030 <RNAplot_cmdline_parser_release@plt>

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

LLVM IR (-O2):
%struct.RNAplot_args_info = type { i32 }
define void @RNAplot_cmdline_parser_free(%struct.RNAplot_args_info* %0) {
%2 = tail call i32 @RNAplot_cmdline_parser_release(%struct.RNAplot_args_info* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char);
char *skip_nonwhitespace(char *s) {
  while (*s && !(isspace(*s))) {
    s++;
  }
  return s;
}


x86 assembly (clang, -O0):
<skip_nonwhitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1148 <skip_nonwhitespace+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1158 <skip_nonwhitespace+0x48>
jmp    1169 <skip_nonwhitespace+0x59>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_nonwhitespace+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_nonwhitespace>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1138 <skip_nonwhitespace+0x28>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
jne    1138 <skip_nonwhitespace+0x28>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <skip_nonwhitespace+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_nonwhitespace(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i32 @isspace(i8 signext %5)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}
int rijndaelStartOfCode() { return 1; }


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

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

LLVM IR (-O0):
define i32 @rijndaelStartOfCode() {
ret i32 1
}

LLVM IR (-O2):
define i32 @rijndaelStartOfCode() {
ret i32 1
}
int zwSearch(int beta, int depth) { return 0; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @imx51_pm_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int count_secrets(char *);
char *test_without_bzero();
void do_test_without_bzero(int signo) {
  char *buf = test_without_bzero();
  assert((count_secrets(buf)) >= (1));
}


x86 assembly (clang, -O0):
<do_test_without_bzero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_without_bzero@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <count_secrets@plt>
cmp    $0x1,%eax
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_test_without_bzero>:
push   %rax
xor    %eax,%eax
call   1030 <test_without_bzero@plt>
mov    %rax,%rdi
call   1040 <count_secrets@plt>
xor    %edi,%edi
test   %eax,%eax
setg   %dil
pop    %rax
jmp    1050 <assert@plt>

LLVM IR (-O0):
define void @do_test_without_bzero(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i8* (...) @test_without_bzero()
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @count_secrets(i8* %5)
%7 = icmp sge i32 %6, 1
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret void
}

LLVM IR (-O2):
define void @do_test_without_bzero(i32 %0) {
%2 = tail call i8* (...) @test_without_bzero()
%3 = tail call i32 @count_secrets(i8* %2)
%4 = icmp sgt i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret void
}
void longa() {
  int i, j;
  for (i = 0; i < 10000000; i++)
    j = i;
}


x86 assembly (clang, -O0):
<longa>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x989680,-0x4(%rbp)
jge    112c <longa+0x2c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <longa+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @longa() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 10000000
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = load i32, i32* %1
store i32 %7, i32* %2
br label %8
8: ; preds = %6
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %3
11: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @longa() {
ret void
}
int min_int(int a, int b) { return (a < b) ? a : b; }


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

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

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

LLVM IR (-O2):
define i32 @min_int(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fwrite(const void *ptr __attribute__((unused)), size_t size,
              size_t nmemb, FILE *stream __attribute__((unused))) {
  return size * nmemb;
}


x86 assembly (clang, -O0):
<fwrite>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
imul   -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fwrite>:
mov    %rsi,%rax
imul   %rdx,%rax
ret

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

LLVM IR (-O2):
define i64 @fwrite(i8* nocapture readnone %0, i64 %1, i64 %2, i32* nocapture readnone %3) {
%5 = mul i64 %2, %1
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void bug(int signum) {
  printf("\nHelp    >print 'exit' to exit!\nMy shell> ");
  fflush(stdout);
  return;
}


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

x86 assembly (clang, -O2):
<bug>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"\0AHelp >print 'exit' to exit!\0AMy shell> \00"
@stdout = global i32 0
define void @bug(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fflush(i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"\0AHelp >print 'exit' to exit!\0AMy shell> \00"
@stdout = global i32 0
define void @bug(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void output(int *a, int number) {
  int i = 0;
  for (i = 0; i < number; i++) {
    printf("%-4d", a[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1160 <output+0x50>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <output+0x1d>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <output+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <output+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%-4d\00"
define void @output(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
int is_dhard(unsigned a[2]) {
  if ((a[0] & 0x7FF00000) == 0x7FF00000)
    return 1;
  if ((a[0] & 0x7FF00000) == 0 && ((a[0] & 0x7FFFFFFF) | a[1]) != 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_dhard>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0x7ff00000,%eax
cmp    $0x7ff00000,%eax
jne    112a <is_dhard+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    116c <is_dhard+0x6c>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0x7ff00000,%eax
cmp    $0x0,%eax
jne    1165 <is_dhard+0x65>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0x7fffffff,%eax
mov    -0x10(%rbp),%rcx
or     0x4(%rcx),%eax
cmp    $0x0,%eax
je     1165 <is_dhard+0x65>
movl   $0x1,-0x4(%rbp)
jmp    116c <is_dhard+0x6c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_dhard>:
mov    (%rdi),%ecx
mov    %ecx,%edx
and    $0x7ff00000,%edx
mov    $0x1,%eax
cmp    $0x7ff00000,%edx
je     1126 <is_dhard+0x26>
test   %edx,%edx
jne    1127 <is_dhard+0x27>
and    $0x7fffffff,%ecx
or     0x4(%rdi),%ecx
je     1127 <is_dhard+0x27>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_dhard(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 2146435072
switch i32 %3, label %10 [
i32 2146435072, label %11
i32 0, label %4
]
4: ; preds = %1
%5 = and i32 %2, 2147483647
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = or i32 %7, %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1, %4
br label %11
11: ; preds = %4, %1, %10
%12 = phi i32 [ 0, %10 ], [ 1, %1 ], [ 1, %4 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_VERIFY_PARAM;

/* Variables and functions */
int X509_VERIFY_PARAM_set1_ip(int /*<<< orphan*/ *, unsigned char *, size_t);
scalar_t__ a2i_ipadd(unsigned char *, char const *);
int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param, const char *ipasc) {
  unsigned char ipout[16];
  size_t iplen;
  iplen = (size_t)a2i_ipadd(ipout, ipasc);
  if (iplen == 0)
    return 0;
  return X509_VERIFY_PARAM_set1_ip(param, ipout, iplen);
}


x86 assembly (clang, -O0):
<X509_VERIFY_PARAM_set1_ip_asc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <a2i_ipadd@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1158 <X509_VERIFY_PARAM_set1_ip_asc+0x38>
movl   $0x0,-0x4(%rbp)
jmp    116c <X509_VERIFY_PARAM_set1_ip_asc+0x4c>
mov    -0x10(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdx
call   1030 <X509_VERIFY_PARAM_set1_ip@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<X509_VERIFY_PARAM_set1_ip_asc>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %rsp,%rdi
call   1040 <a2i_ipadd@plt>
test   %rax,%rax
je     1145 <X509_VERIFY_PARAM_set1_ip_asc+0x25>
mov    %rsp,%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
call   1030 <X509_VERIFY_PARAM_set1_ip@plt>
jmp    1147 <X509_VERIFY_PARAM_set1_ip_asc+0x27>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @X509_VERIFY_PARAM_set1_ip_asc(i32* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca [16 x i8]
%7 = alloca i64
store i32* %0, i32** %4
store i8* %1, i8** %5
%8 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%9 = load i8*, i8** %5
%10 = call i64 @a2i_ipadd(i8* %8, i8* %9)
store i64 %10, i64* %7
%11 = load i64, i64* %7
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 0, i32* %3
br label %19
14: ; preds = %2
%15 = load i32*, i32** %4
%16 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%17 = load i64, i64* %7
%18 = call i32 @X509_VERIFY_PARAM_set1_ip(i32* %15, i8* %16, i64 %17)
store i32 %18, i32* %3
br label %19
19: ; preds = %14, %13
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @X509_VERIFY_PARAM_set1_ip_asc(i32* %0, i8* %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = call i64 @a2i_ipadd(i8* %4, i8* %1)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = call i32 @X509_VERIFY_PARAM_set1_ip(i32* %0, i8* %4, i64 %5)
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ %8, %7 ], [ 0, %2 ]
ret i32 %10
}
void put_request_item(void) {}


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

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

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

LLVM IR (-O2):
define void @put_request_item() {
ret void
}
void read_fan(struct stats_pwr_fan *st_pwr_fan, int nbr) {}


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

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

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

LLVM IR (-O2):
%struct.stats_pwr_fan = type opaque
define void @read_fan(%struct.stats_pwr_fan* nocapture %0, i32 %1) {
ret void
}
int init_counter() { return 0; }


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

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

LLVM IR (-O0):
define i32 @init_counter() {
ret i32 0
}

LLVM IR (-O2):
define i32 @init_counter() {
ret i32 0
}