xunge/DecIR huggingface dataset:
extern int foo(int a) {
  if (a < 0)
    return a * 2;
  if (a == 0)
    return 1;
  return a + 10;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111f <foo+0x1f>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113e <foo+0x3e>
cmpl   $0x0,-0x8(%rbp)
jne    1135 <foo+0x35>
movl   $0x1,-0x4(%rbp)
jmp    113e <foo+0x3e>
mov    -0x8(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    (%rdi,%rdi,1),%ecx
lea    0xa(%rdi),%edx
test   %edi,%edi
mov    $0x1,%eax
cmovne %edx,%eax
cmovs  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = shl nsw i32 %0, 1
%4 = icmp eq i32 %0, 0
%5 = add nsw i32 %0, 10
%6 = select i1 %4, i32 1, i32 %5
%7 = select i1 %2, i32 %3, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, float const *, int);
void glmCopyMatrix5f(const float source[25], float target[25]) {
  memcpy(target, source, 25 * sizeof(float));
}


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

x86 assembly (clang, -O2):
<glmCopyMatrix5f>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0x64,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @glmCopyMatrix5f(float* %0, float* %1) {
%3 = tail call i32 @memcpy(float* %1, float* %0, i32 100)
ret void
}
void glDrawRangeElements(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glDrawRangeElements() {
ret void
}
void gpio_cmsdk_init(struct gpio_cmsdk_dev_t *dev) {}


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

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

LLVM IR (-O0):
%struct.gpio_cmsdk_dev_t = type opaque
define void @gpio_cmsdk_init(%struct.gpio_cmsdk_dev_t* %0) {
%2 = alloca %struct.gpio_cmsdk_dev_t*
store %struct.gpio_cmsdk_dev_t* %0, %struct.gpio_cmsdk_dev_t** %2
ret void
}

LLVM IR (-O2):
%struct.gpio_cmsdk_dev_t = type opaque
define void @gpio_cmsdk_init(%struct.gpio_cmsdk_dev_t* nocapture %0) {
ret void
}
unsigned gf32_matrix_times(unsigned *matrix, unsigned vector) {
  unsigned sum = 0;
  while (vector) {
    if (vector & 1) {
      sum ^= *matrix;
    }
    vector >>= 1;
    matrix++;
  }
  return sum;
}


x86 assembly (clang, -O0):
<gf32_matrix_times>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1151 <gf32_matrix_times+0x51>
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1137 <gf32_matrix_times+0x37>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
jmp    1112 <gf32_matrix_times+0x12>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gf32_matrix_times>:
xor    %eax,%eax
test   %esi,%esi
jne    111f <gf32_matrix_times+0x1f>
ret
nopw   0x0(%rax,%rax,1)
mov    %esi,%ecx
shr    %ecx
add    $0x4,%rdi
cmp    $0x1,%esi
mov    %ecx,%esi
jbe    1106 <gf32_matrix_times+0x6>
test   $0x1,%sil
je     1110 <gf32_matrix_times+0x10>
xor    (%rdi),%eax
jmp    1110 <gf32_matrix_times+0x10>

LLVM IR (-O0):
define i32 @gf32_matrix_times(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
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %23
9: ; preds = %6
%10 = load i32, i32* %4
%11 = and i32 %10, 1
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = load i32*, i32** %3
%15 = load i32, i32* %14
%16 = load i32, i32* %5
%17 = xor i32 %16, %15
store i32 %17, i32* %5
br label %18
18: ; preds = %13, %9
%19 = load i32, i32* %4
%20 = lshr i32 %19, 1
store i32 %20, i32* %4
%21 = load i32*, i32** %3
%22 = getelementptr inbounds i32, i32* %21, i32 1
store i32* %22, i32** %3
br label %6
23: ; preds = %6
%24 = load i32, i32* %5
ret i32 %24
}

LLVM IR (-O2):
define i32 @gf32_matrix_times(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %18, label %4
4: ; preds = %2, %13
%5 = phi i32 [ %14, %13 ], [ 0, %2 ]
%6 = phi i32 [ %15, %13 ], [ %1, %2 ]
%7 = phi i32* [ %16, %13 ], [ %0, %2 ]
%8 = and i32 %6, 1
%9 = icmp eq i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %4
%11 = load i32, i32* %7
%12 = xor i32 %11, %5
br label %13
13: ; preds = %10, %4
%14 = phi i32 [ %12, %10 ], [ %5, %4 ]
%15 = lshr i32 %6, 1
%16 = getelementptr inbounds i32, i32* %7, i64 1
%17 = icmp ult i32 %6, 2
br i1 %17, label %18, label %4
18: ; preds = %13, %2
%19 = phi i32 [ 0, %2 ], [ %14, %13 ]
ret i32 %19
}
/* Variables and functions */
unsigned char msg_send(int, unsigned char *, int);
unsigned char ANT_CloseChannel(unsigned char chan) {
  return msg_send(0x4c, &chan, 1);
}


x86 assembly (clang, -O0):
<ANT_CloseChannel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x4c,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <msg_send@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANT_CloseChannel>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x4c,%edi
mov    $0x1,%edx
call   1030 <msg_send@plt>
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @ANT_CloseChannel(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call zeroext i8 @msg_send(i32 76, i8* %2, i32 1)
ret i8 %3
}

LLVM IR (-O2):
define zeroext i8 @ANT_CloseChannel(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call zeroext i8 @msg_send(i32 76, i8* %2, i32 1)
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int fchdirat(int /*<<< orphan*/, char const *);
int chdir(const char *path) { return fchdirat(AT_FDCWD, path); }


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

x86 assembly (clang, -O2):
<chdir>:
mov    %rdi,%rsi
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fchdirat@plt>

LLVM IR (-O0):
@AT_FDCWD = global i32 0
define i32 @chdir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @AT_FDCWD
%4 = load i8*, i8** %2
%5 = call i32 @fchdirat(i32 %3, i8* %4)
ret i32 %5
}

LLVM IR (-O2):
@AT_FDCWD = global i32 0
define i32 @chdir(i8* %0) {
%2 = load i32, i32* @AT_FDCWD
%3 = tail call i32 @fchdirat(i32 %2, i8* %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a = 5;
  int b = 10;
  printf("a = %d\nb = %d\n", a, b);
  a = a + b;
  b = a - b;
  a = a - b;
  printf("a = %d\nb = %d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"a = %d\0Ab = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 10, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = sub nsw i32 %10, %11
store i32 %12, i32* %3
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = sub nsw i32 %13, %14
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %16, i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"a = %d\0Ab = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 5, i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 10, i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, unsigned char);
void ansi_format(unsigned char format) { printf("%s%dm", "\033[", format); }


x86 assembly (clang, -O0):
<ansi_format>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
lea    0xeda(%rip),%rsi
movzbl -0x1(%rbp),%edx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%s%dm\00"
@.str.1 = [3 x i8] c"\1B[\00"
define void @ansi_format(i8 zeroext %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nom_server_test(int);
int main(int argc, char *argv[]) {
  nom_server_test(1);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <nom_server_test@plt>
xor    %eax,%eax
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 i32 @nom_server_test(i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @nom_server_test(i32 1)
ret i32 0
}
int negate(int x) { return ~x + 1; }


x86 assembly (clang, -O0):
<negate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<negate>:
mov    %edi,%eax
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @negate(i32 %0) {
%2 = sub i32 0, %0
ret i32 %2
}
__typeof__(fprintf(1, 1, "")) test_fprintf_245(void) {
  return fprintf(1, 1, "");
}


x86 assembly (clang, -O0):
<test_fprintf_245>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%esi
lea    0xee0(%rip),%rdx
mov    %esi,%edi
mov    $0x0,%al
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fprintf_245>:
lea    0xee9(%rip),%rdx
mov    $0x1,%edi
mov    $0x1,%esi
xor    %eax,%eax
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @test_fprintf_245() {
%1 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @fprintf to i32 (i32, i32, i8*, ...)*)(i32 1, i32 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @test_fprintf_245() {
%1 = tail call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @fprintf to i32 (i32, i32, i8*, ...)*)(i32 1, i32 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ audio_process(unsigned char *);
void update_audio(void) {
  unsigned char scratch[4096];
  audio_process(scratch);
}


x86 assembly (clang, -O0):
<update_audio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1000,%rsp
lea    -0x1000(%rbp),%rdi
call   1030 <audio_process@plt>
add    $0x1000,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_audio>:
sub    $0x1008,%rsp
mov    %rsp,%rdi
call   1030 <audio_process@plt>
add    $0x1008,%rsp
ret

LLVM IR (-O0):
define void @update_audio() {
%1 = alloca [4096 x i8]
%2 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 0
%3 = call i32 @audio_process(i8* %2)
ret void
}

LLVM IR (-O2):
define void @update_audio() {
%1 = alloca [4096 x i8]
%2 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 0
%3 = call i32 @audio_process(i8* %2)
ret void
}
int withinSameBlock(int *ptr1, int *ptr2) {
  int mask = 1 << 31 >> 25;
  int a = ptr1;
  int b = ptr2;
  return (a & mask) == (b & mask);
}


x86 assembly (clang, -O0):
<withinSameBlock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffc0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
and    -0x14(%rbp),%eax
mov    -0x1c(%rbp),%ecx
and    -0x14(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<withinSameBlock>:
xor    %edi,%esi
xor    %eax,%eax
test   $0xffffffc0,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @withinSameBlock(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 -64, i32* %5
%8 = load i32*, i32** %3
%9 = ptrtoint i32* %8 to i32
store i32 %9, i32* %6
%10 = load i32*, i32** %4
%11 = ptrtoint i32* %10 to i32
store i32 %11, i32* %7
%12 = load i32, i32* %6
%13 = load i32, i32* %5
%14 = and i32 %12, %13
%15 = load i32, i32* %7
%16 = load i32, i32* %5
%17 = and i32 %15, %16
%18 = icmp eq i32 %14, %17
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @withinSameBlock(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = xor i64 %4, %3
%6 = and i64 %5, 4294967232
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ hal_early_print_puts(char *);
void do_print(char *p) {
  hal_early_print_puts(p);
  return;
}


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

x86 assembly (clang, -O2):
<do_print>:
jmp    1030 <hal_early_print_puts@plt>

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

LLVM IR (-O2):
define void @do_print(i8* %0) {
%2 = tail call i32 @hal_early_print_puts(i8* %0)
ret void
}
/* Variables and functions */
void ft_striteri_the_ultimate(char *, int /*<<< orphan*/,
                              void (*)(unsigned int, char *));
void ft_striteri(char *s, void (*f)(unsigned int, char *)) {
  if (!s || !f)
    return;
  return (ft_striteri_the_ultimate(s, 0, f));
}


x86 assembly (clang, -O0):
<ft_striteri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1136 <ft_striteri+0x26>
cmpq   $0x0,-0x10(%rbp)
jne    113b <ft_striteri+0x2b>
jmp    114a <ft_striteri+0x3a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <ft_striteri_the_ultimate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striteri>:
test   %rdi,%rdi
je     1124 <ft_striteri+0x14>
mov    %rsi,%rdx
test   %rsi,%rsi
je     1124 <ft_striteri+0x14>
xor    %esi,%esi
jmp    1030 <ft_striteri_the_ultimate@plt>
ret

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

LLVM IR (-O2):
define void @ft_striteri(i8* %0, void (i32, i8*)* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne void (i32, i8*)* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %7
6: ; preds = %2
tail call void @ft_striteri_the_ultimate(i8* %0, i32 0, void (i32, i8*)* %1)
br label %7
7: ; preds = %2, %6
ret void
}
void ____build_time_check_for_reserved_bits(void) {
  (void)(sizeof(
      int[(((((1ULL << 0) | (1ULL << 1) | (1ULL << 2) | (1ULL << 3) |
              (1ULL << 4) | (1ULL << 5) | (1ULL << 6) | (1ULL << 7) |
              (1ULL << 8) | (1ULL << 9) | (1ULL << 10) | (1ULL << 11) |
              (1ULL << 12) | (1ULL << 13) | (1ULL << 14) | (1ULL << 16) |
              (1ULL << 15) | (1ULL << 17) | (1ULL << 18) | (1ULL << 19) |
              (1ULL << 20) | (1ULL << 21) | (1ULL << 22) | (1ULL << 23) |
              (1ULL << 24) | (1ULL << 25) | (1ULL << 26) | (1ULL << 27) |
              (1ULL << 28) | (1ULL << 29) | (1ULL << 30) | (1ULL << 31) |
              (1ULL << 32) | (1ULL << 33) | (1ULL << 34) | (1ULL << 35) |
              (1ULL << 36) | (1ULL << 37) | (1ULL << 38) | (1ULL << 39) |
              (1ULL << 40) | (1ULL << 41) | (1ULL << 41) | (1ULL << 42) |
              (1ULL << 43) | (1ULL << 44) | (1ULL << 45) | (1ULL << 46) |
              (1ULL << 46) | (1ULL << 46) | (1ULL << 46) | (1ULL << 47) |
              (1ULL << 48) | (1ULL << 49) | 0ULL) &
             ((1ULL << 62) | (1ULL << 61) | (1ULL << 63))) == 0) == 0)
              ? -1
              : 0]));
}


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

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

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

LLVM IR (-O2):
define void @____build_time_check_for_reserved_bits() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sort_double(int, double *);
void shell_sort(int n, double *arr) { sort_double(n, arr); }


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

x86 assembly (clang, -O2):
<shell_sort>:
jmp    1030 <sort_double@plt>

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

LLVM IR (-O2):
define void @shell_sort(i32 %0, double* %1) {
%3 = tail call i32 @sort_double(i32 %0, double* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outw(unsigned short, unsigned short *);
void lcd_hpi_write_mailbox(unsigned short value) {
  outw(value, (unsigned short *)((0x0001 << 1) + 0xfff24000));
}


x86 assembly (clang, -O0):
<lcd_hpi_write_mailbox>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0xfff24002,%esi
movzwl -0x2(%rbp),%edi
call   1030 <outw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_hpi_write_mailbox>:
mov    $0xfff24002,%esi
jmp    1030 <outw@plt>

LLVM IR (-O0):
define void @lcd_hpi_write_mailbox(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call i32 @outw(i16 zeroext %3, i16* inttoptr (i64 4294066178 to i16*))
ret void
}

LLVM IR (-O2):
define void @lcd_hpi_write_mailbox(i16 zeroext %0) {
%2 = tail call i32 @outw(i16 zeroext %0, i16* inttoptr (i64 4294066178 to i16*))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ putchar(char);
void Mostra(int n[], int num) {
  int i;
  for (i = 0; i < num; i++) {
    printf("%d ", n[i]);
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<Mostra>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1167 <Mostra+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <Mostra+0x16>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define void @Mostra(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
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 @printf(i8* getelementptr inbounds ([4 x i8], [4 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 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @Mostra(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 @printf(i8* getelementptr inbounds ([4 x i8], [4 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(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_error_msg(char *);
void print_func_def() {
  print_error_msg("function definition allowed only at global scope!");
}


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

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

LLVM IR (-O0):
@.str = [50 x i8] c"function definition allowed only at global scope!\00"
define void @print_func_def() {
%1 = call i32 @print_error_msg(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"function definition allowed only at global scope!\00"
define void @print_func_def() {
%1 = tail call i32 @print_error_msg(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
void getNorthbridge(int i, char *buf) {
  int nb0 = 0x18;
  sprintf(buf, "/proc/bus/pci/00/%x.5", nb0 + i);
}


x86 assembly (clang, -O0):
<getNorthbridge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x18,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
add    -0x4(%rbp),%edx
lea    0xec9(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNorthbridge>:
mov    %rsi,%rax
lea    0x18(%rdi),%edx
lea    0xee3(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"/proc/bus/pci/00/%x.5\00"
define void @getNorthbridge(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 24, i32* %5
%6 = load i8*, i8** %4
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
%10 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"/proc/bus/pci/00/%x.5\00"
define void @getNorthbridge(i32 %0, i8* nocapture writeonly %1) {
%3 = add nsw i32 %0, 24
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void version(void) { printf("Version: brpn-0.0\n"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"Version: brpn-0.0\0A\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"Version: brpn-0.0\00"
define void @version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ strcmpic(char *, char *);
char *postmaster(char *user) {
  static char *pm = "postmaster";
  if (strcmpic(user, pm) == 0) {
    return (pm);
  } else {
    return (user);
  }
}


x86 assembly (clang, -O0):
<postmaster>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2f01(%rip),%rsi
call   1030 <strcmpic@plt>
cmp    $0x0,%rax
jne    1146 <postmaster+0x36>
mov    0x2eeb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    114e <postmaster+0x3e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<postmaster>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee2(%rip),%r14
mov    %r14,%rsi
call   1030 <strcmpic@plt>
test   %rax,%rax
cmove  %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@postmaster.pm = internal global i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0)
@.str = [11 x i8] c"postmaster\00"
define i8* @postmaster(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8*, i8** @postmaster.pm
%6 = call i64 @strcmpic(i8* %4, i8* %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** @postmaster.pm
store i8* %9, i8** %2
br label %12
10: ; preds = %1
%11 = load i8*, i8** %3
store i8* %11, i8** %2
br label %12
12: ; preds = %10, %8
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
@.str = [11 x i8] c"postmaster\00"
define i8* @postmaster(i8* %0) {
%2 = tail call i64 @strcmpic(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xd2() {
  Assert_real((islower(210) == 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_islower.c",
              1055, ("islower should be 0 for 0xd2"));
}


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

x86 assembly (clang, -O2):
<t_islower_0xd2>:
push   %rax
mov    $0xd2,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x41f,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xd2\00"
define void @t_islower_0xd2() {
%1 = call i64 @islower(i32 210)
%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 1055, i8* getelementptr inbounds ([29 x i8], [29 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xd2\00"
define void @t_islower_0xd2() {
%1 = tail call i64 @islower(i32 210)
%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 1055, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ logIT(int /*<<< orphan*/, char *);
void sigPipeHandler(int signo) { logIT(LOG_ERR, "SIGPIPE empfangen"); }


x86 assembly (clang, -O0):
<sigPipeHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xed5(%rip),%rsi
call   1030 <logIT@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigPipeHandler>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <logIT@plt>

LLVM IR (-O0):
@LOG_ERR = global i32 0
@.str = [18 x i8] c"SIGPIPE empfangen\00"
define void @sigPipeHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @LOG_ERR
%4 = call i32 @logIT(i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@.str = [18 x i8] c"SIGPIPE empfangen\00"
define void @sigPipeHandler(i32 %0) {
%2 = load i32, i32* @LOG_ERR
%3 = tail call i32 @logIT(i32 %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct in_addr {
  int dummy;
};

/* Variables and functions */
int mjt_pton4(char const *, struct in_addr *);
int udns_aton(const char *src, struct in_addr *addr) {
  return mjt_pton4(src, addr);
}


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

x86 assembly (clang, -O2):
<udns_aton>:
jmp    1030 <mjt_pton4@plt>

LLVM IR (-O0):
%struct.in_addr = type { i32 }
define i32 @udns_aton(i8* %0, %struct.in_addr* %1) {
%3 = alloca i8*
%4 = alloca %struct.in_addr*
store i8* %0, i8** %3
store %struct.in_addr* %1, %struct.in_addr** %4
%5 = load i8*, i8** %3
%6 = load %struct.in_addr*, %struct.in_addr** %4
%7 = call i32 @mjt_pton4(i8* %5, %struct.in_addr* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
define i32 @udns_aton(i8* %0, %struct.in_addr* %1) {
%3 = tail call i32 @mjt_pton4(i8* %0, %struct.in_addr* %1)
ret i32 %3
}
void XtVaGetSubresources() {}


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

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

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

LLVM IR (-O2):
define void @XtVaGetSubresources() {
ret void
}
void MSP430TimerM$CompareA2$fired(void) {
  MSP430TimerM$CompareA2$default$fired();
}


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

x86 assembly (clang, -O2):
<MSP430TimerM$CompareA2$fired>:
xor    %eax,%eax
jmp    1030 <MSP430TimerM$CompareA2$default$fired@plt>

LLVM IR (-O0):
define void @"MSP430TimerM$CompareA2$fired"() {
%1 = call i32 (...) @"MSP430TimerM$CompareA2$default$fired"()
ret void
}

LLVM IR (-O2):
define void @"MSP430TimerM$CompareA2$fired"() {
%1 = tail call i32 (...) @"MSP430TimerM$CompareA2$default$fired"()
ret void
}
void gtk_window_group_remove_window() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_group_remove_window() {
ret void
}
/* Variables and functions */
scalar_t__ strncasecmp(char const *, char const *, size_t);
long fortran_strncasecmp(const char *s1, const char *s2, long *len) {
  return (long)strncasecmp(s1, s2, (size_t)*len);
}


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

x86 assembly (clang, -O2):
<fortran_strncasecmp>:
mov    (%rdx),%rdx
jmp    1030 <strncasecmp@plt>

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

LLVM IR (-O2):
define i64 @fortran_strncasecmp(i8* nocapture %0, i8* nocapture %1, i64* nocapture %2) {
%4 = load i64, i64* %2
%5 = tail call i64 @strncasecmp(i8* %0, i8* %1, i64 %4)
ret i64 %5
}
void setSampleRate(int s) {}


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

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

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

LLVM IR (-O2):
define void @setSampleRate(i32 %0) {
ret void
}
int ioShutdownPrintJob(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @ioShutdownPrintJob() {
ret i32 1
}
int func_dep_two() { return 42; }


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

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

LLVM IR (-O0):
define i32 @func_dep_two() {
ret i32 42
}

LLVM IR (-O2):
define i32 @func_dep_two() {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ perror(int /*<<< orphan*/ *);
char *strdup(char const *);
char *duplicate(const char *str) {
  char *result = NULL;
  if (str != NULL) {
    result = strdup(str);
    if (result == NULL)
      perror(NULL);
  }
  return result;
}


x86 assembly (clang, -O0):
<duplicate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1165 <duplicate+0x45>
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1160 <duplicate+0x40>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <perror@plt>
jmp    1165 <duplicate+0x45>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<duplicate>:
push   %rbx
test   %rdi,%rdi
je     113e <duplicate+0x1e>
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1140 <duplicate+0x20>
xor    %ebx,%ebx
xor    %edi,%edi
call   1030 <perror@plt>
jmp    1140 <duplicate+0x20>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @duplicate(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i8* @strdup(i8* %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %6
%12 = call i32 @perror(i32* null)
br label %13
13: ; preds = %11, %6
br label %14
14: ; preds = %13, %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define noalias i8* @duplicate(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @strdup(i8* %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @perror(i32* null)
br label %8
8: ; preds = %3, %6, %1
%9 = phi i8* [ null, %6 ], [ %4, %3 ], [ null, %1 ]
ret i8* %9
}
/* Variables and functions */
void *V3DMPListGetPtr(void **list, int total, int i) {
  if ((list == NULL) || (i < 0) || (i >= total))
    return (NULL);
  else
    return (list[i]);
}


x86 assembly (clang, -O0):
<V3DMPListGetPtr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     112f <V3DMPListGetPtr+0x2f>
cmpl   $0x0,-0x18(%rbp)
jl     112f <V3DMPListGetPtr+0x2f>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jl     113c <V3DMPListGetPtr+0x3c>
movq   $0x0,-0x8(%rbp)
jmp    114c <V3DMPListGetPtr+0x4c>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<V3DMPListGetPtr>:
xor    %eax,%eax
cmp    %esi,%edx
jge    1115 <V3DMPListGetPtr+0x15>
test   %rdi,%rdi
je     1115 <V3DMPListGetPtr+0x15>
test   %edx,%edx
js     1115 <V3DMPListGetPtr+0x15>
mov    %edx,%eax
mov    (%rdi,%rax,8),%rax
ret

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

LLVM IR (-O2):
define i8* @V3DMPListGetPtr(i8** %0, i32 %1, i32 %2) {
%4 = icmp ne i8** %0, null
%5 = icmp sgt i32 %2, -1
%6 = and i1 %4, %5
%7 = icmp slt i32 %2, %1
%8 = and i1 %7, %6
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = zext i32 %2 to i64
%11 = getelementptr inbounds i8*, i8** %0, i64 %10
%12 = load i8*, i8** %11
br label %13
13: ; preds = %3, %9
%14 = phi i8* [ %12, %9 ], [ null, %3 ]
ret i8* %14
}
float aveall(float *p) {
  int i;
  float sum;
  for (i = 0; i < 4; i++) {
  }
  return sum / 4;
}


x86 assembly (clang, -O0):
<aveall>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    112c <aveall+0x2c>
jmp    111e <aveall+0x1e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <aveall+0xf>
movss  -0x10(%rbp),%xmm0
movss  0xec7(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<aveall>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @aveall(float* %0) {
%2 = alloca float*
%3 = alloca i32
%4 = alloca float
store float* %0, float** %2
store i32 0, i32* %3
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 4
br i1 %7, label %8, label %12
8: ; preds = %5
br label %9
9: ; preds = %8
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %5
12: ; preds = %5
%13 = load float, float* %4
%14 = fdiv float %13, 4.000000e+00
ret float %14
}

LLVM IR (-O2):
define float @aveall(float* nocapture readnone %0) {
ret float 0x7FF8000000000000
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};
struct slInt {
  int dummy;
};

/* Variables and functions */
struct slInt *matchingExtId(struct sqlConnection *, char *, char *);
struct slInt *visiGeneSelectGenbank(struct sqlConnection *conn, char *acc) {
  return matchingExtId(conn, acc, "genbank");
}


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

x86 assembly (clang, -O2):
<visiGeneSelectGenbank>:
lea    0xee9(%rip),%rdx
jmp    1030 <matchingExtId@plt>

LLVM IR (-O0):
%struct.slInt = type { i32 }
%struct.sqlConnection = type { i32 }
@.str = [8 x i8] c"genbank\00"
define %struct.slInt* @visiGeneSelectGenbank(%struct.sqlConnection* %0, i8* %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i8*
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i8* %1, i8** %4
%5 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%6 = load i8*, i8** %4
%7 = call %struct.slInt* @matchingExtId(%struct.sqlConnection* %5, i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret %struct.slInt* %7
}

LLVM IR (-O2):
%struct.slInt = type { i32 }
%struct.sqlConnection = type { i32 }
@.str = [8 x i8] c"genbank\00"
define %struct.slInt* @visiGeneSelectGenbank(%struct.sqlConnection* %0, i8* %1) {
%3 = tail call %struct.slInt* @matchingExtId(%struct.sqlConnection* %0, i8* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret %struct.slInt* %3
}
int f(int a[3]) { return a[0] + a[1] + a[2]; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
add    0x4(%rcx),%eax
mov    -0x8(%rbp),%rcx
add    0x8(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    0x4(%rdi),%eax
add    (%rdi),%eax
add    0x8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @f(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 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = add nsw i32 %5, %8
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 2
%12 = load i32, i32* %11
%13 = add nsw i32 %9, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @f(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = add nsw i32 %4, %2
%6 = getelementptr inbounds i32, i32* %0, i64 2
%7 = load i32, i32* %6
%8 = add nsw i32 %5, %7
ret i32 %8
}
/* Type definitions */
struct demod_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ selcall_init(struct demod_state *);
void pzvei_init(struct demod_state *s) { selcall_init(s); }


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

x86 assembly (clang, -O2):
<pzvei_init>:
jmp    1030 <selcall_init@plt>

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

LLVM IR (-O2):
%struct.demod_state = type { i32 }
define void @pzvei_init(%struct.demod_state* %0) {
%2 = tail call i32 @selcall_init(%struct.demod_state* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strncasecmp(char *, char *, int);
void strncasecmp_diff_length_1() {
  char *x = "abc";
  char *y = "aBdef";
  clang_analyzer_eval(strncasecmp(x, y, 5) < 0);
}


x86 assembly (clang, -O0):
<strncasecmp_diff_length_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x5,%edx
call   1030 <strncasecmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncasecmp_diff_length_1>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncasecmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"abc\00"
@.str.1 = [6 x i8] c"aBdef\00"
define void @strncasecmp_diff_length_1() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strncasecmp(i8* %3, i8* %4, i32 5)
%6 = icmp slt i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
@.str.1 = [6 x i8] c"aBdef\00"
define void @strncasecmp_diff_length_1() {
%1 = tail call i64 @strncasecmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%2 = lshr i64 %1, 63
%3 = trunc i64 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}