xunge/DecIR huggingface dataset:
__attribute__((always_)) int pci_domain_nr(struct pci_bus *bus) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.pci_bus = type opaque
define i32 @pci_domain_nr(%struct.pci_bus* nocapture readnone %0) {
ret i32 0
}
void _tzset() {}


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

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

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

LLVM IR (-O2):
define void @_tzset() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ adafinal();
int /*<<< orphan*/ adainit();
int /*<<< orphan*/ compute_mixed_volume();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ read_and_retrieve();
int main(void) {
  printf("\nComputing the powers of t in a polyhedral homotopy...\n");
  adainit();
  compute_mixed_volume();
  read_and_retrieve();
  adafinal();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1070 <adainit@plt>
mov    $0x0,%al
call   1060 <compute_mixed_volume@plt>
mov    $0x0,%al
call   1040 <read_and_retrieve@plt>
mov    $0x0,%al
call   1050 <adafinal@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xea8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1070 <adainit@plt>
xor    %eax,%eax
call   1060 <compute_mixed_volume@plt>
xor    %eax,%eax
call   1040 <read_and_retrieve@plt>
xor    %eax,%eax
call   1050 <adafinal@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [56 x i8] c"\0AComputing the powers of t in a polyhedral homotopy...\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @adainit()
%4 = call i32 (...) @compute_mixed_volume()
%5 = call i32 (...) @read_and_retrieve()
%6 = call i32 (...) @adafinal()
ret i32 0
}

LLVM IR (-O2):
@str = [55 x i8] c"\0AComputing the powers of t in a polyhedral homotopy...\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @adainit()
%3 = tail call i32 (...) @compute_mixed_volume()
%4 = tail call i32 (...) @read_and_retrieve()
%5 = tail call i32 (...) @adafinal()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void Error(char *str) {
  puts(str);
  return;
}


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

x86 assembly (clang, -O2):
<Error>:
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
define void @Error(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ i;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test_integer() {
  long i = -1;
  if (i > sizeof(i)) {
    printf("OK\n");
  } else {
    printf("error\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<test_integer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
cmpq   $0x8,-0x8(%rbp)
jbe    113c <test_integer+0x2c>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
jmp    1148 <test_integer+0x38>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"OK\0A\00"
@.str.1 = [7 x i8] c"error\0A\00"
define i32 @test_integer() {
%1 = alloca i64
store i64 -1, i64* %1
%2 = load i64, i64* %1
%3 = icmp ugt i64 %2, 8
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret i32 0
}

LLVM IR (-O2):
@str = [3 x i8] c"OK\00"
define i32 @test_integer() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          unsigned int);
void yvu9toyv12_C(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc,
                  uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
                  unsigned int width, unsigned int height, int lumStride,
                  int chromStride) {
  memcpy(ydst, ysrc, width * height);
}


x86 assembly (clang, -O0):
<yvu9toyv12_C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    0x10(%rbp),%edx
imul   0x18(%rbp),%edx
call   1030 <memcpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yvu9toyv12_C>:
mov    %rdi,%rsi
mov    0x10(%rsp),%edx
imul   0x8(%rsp),%edx
mov    %rcx,%rdi
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @yvu9toyv12_C(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i32* %0, i32** %11
store i32* %1, i32** %12
store i32* %2, i32** %13
store i32* %3, i32** %14
store i32* %4, i32** %15
store i32* %5, i32** %16
store i32 %6, i32* %17
store i32 %7, i32* %18
store i32 %8, i32* %19
store i32 %9, i32* %20
%21 = load i32*, i32** %14
%22 = load i32*, i32** %11
%23 = load i32, i32* %17
%24 = load i32, i32* %18
%25 = mul i32 %23, %24
%26 = call i32 @memcpy(i32* %21, i32* %22, i32 %25)
ret void
}

LLVM IR (-O2):
define void @yvu9toyv12_C(i32* %0, i32* nocapture readnone %1, i32* nocapture readnone %2, i32* %3, i32* nocapture readnone %4, i32* nocapture readnone %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = mul i32 %7, %6
%12 = tail call i32 @memcpy(i32* %3, i32* %0, i32 %11)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
uint32_t chitcp_htonl(uint32_t hostlong) { return htonl(hostlong); }


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

x86 assembly (clang, -O2):
<chitcp_htonl>:
jmp    1030 <htonl@plt>

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

LLVM IR (-O2):
define i32 @chitcp_htonl(i32 %0) {
%2 = tail call i32 @htonl(i32 %0)
ret i32 %2
}
void freeBarrier() {}


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

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

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

LLVM IR (-O2):
define void @freeBarrier() {
ret void
}
extern float shmem_float_g(float *addr, int pe) { return *addr; }


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

x86 assembly (clang, -O2):
<shmem_float_g>:
movss  (%rdi),%xmm0
ret

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

LLVM IR (-O2):
define float @shmem_float_g(float* nocapture %0, i32 %1) {
%3 = load float, float* %0
ret float %3
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint8_t tlm_encode_wspr_alt(uint16_t alt) {
  if (alt > 13999) {
    alt = 13999;
  }
  return alt / 100;
}


x86 assembly (clang, -O0):
<tlm_encode_wspr_alt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x36af,-0x4(%rbp)
jle    111b <tlm_encode_wspr_alt+0x1b>
movl   $0x36af,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<tlm_encode_wspr_alt>:
cmp    $0x36af,%edi
mov    $0x36af,%eax
cmovl  %edi,%eax
cltq
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @tlm_encode_wspr_alt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 13999
br i1 %4, label %5, label %6
5: ; preds = %1
store i32 13999, i32* %2
br label %6
6: ; preds = %5, %1
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 100
ret i32 %8
}

LLVM IR (-O2):
define i32 @tlm_encode_wspr_alt(i32 %0) {
%2 = icmp slt i32 %0, 13999
%3 = select i1 %2, i32 %0, i32 13999
%4 = sdiv i32 %3, 100
ret i32 %4
}
void free_parameters(int num_parameters, char ***parameters) {
  int i = 0;
  for (i = 0; i < num_parameters; i++)
    free((*parameters)[i]);
  free((*parameters));
}


x86 assembly (clang, -O0):
<free_parameters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115b <free_parameters+0x4b>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <free_parameters+0x1d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_parameters>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
test   %edi,%edi
jle    1145 <free_parameters+0x35>
mov    %edi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14),%rax
mov    (%rax,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_parameters+0x20>
mov    (%r14),%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_parameters(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 0, i32* %5
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i8***, i8**** %4
%12 = load i8**, i8*** %11
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %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 = load i8***, i8**** %4
%22 = load i8**, i8*** %21
%23 = bitcast i8** %22 to i8*
ret void
}

LLVM IR (-O2):
define void @free_parameters(i32 %0, i8*** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = load i8**, i8*** %1
%9 = getelementptr inbounds i8*, i8** %8, i64 %7
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%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 = bitcast i8*** %1 to i8**
%15 = load i8*, i8** %14
tail call void @free(i8* %15)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t z80_cb_e8_set_5(uint8_t value) { return value | 0x20; }


x86 assembly (clang, -O0):
<z80_cb_e8_set_5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x20,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<z80_cb_e8_set_5>:
mov    %edi,%eax
or     $0x20,%eax
ret

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

LLVM IR (-O2):
define i32 @z80_cb_e8_set_5(i32 %0) {
%2 = or i32 %0, 32
ret i32 %2
}
/* Type definitions */
struct pixl {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gradient_color(struct pixl *, struct pixl *);
int /*<<< orphan*/ hsl_color(struct pixl *, struct pixl *);
int /*<<< orphan*/ rgb_color(struct pixl *, struct pixl *);
void color(struct pixl *dest, struct pixl *src) {
  switch (3) {
  case 1:
    rgb_color(dest, src);
    break;
  case 2:
    hsl_color(dest, src);
    break;
  case 3:
    gradient_color(dest, src);
    break;
  }
}


x86 assembly (clang, -O0):
<color>:
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 <gradient_color@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<color>:
jmp    1030 <gradient_color@plt>

LLVM IR (-O0):
%struct.pixl = type { i32 }
define void @color(%struct.pixl* %0, %struct.pixl* %1) {
%3 = alloca %struct.pixl*
%4 = alloca %struct.pixl*
store %struct.pixl* %0, %struct.pixl** %3
store %struct.pixl* %1, %struct.pixl** %4
%5 = load %struct.pixl*, %struct.pixl** %3
%6 = load %struct.pixl*, %struct.pixl** %4
%7 = call i32 @gradient_color(%struct.pixl* %5, %struct.pixl* %6)
ret void
}

LLVM IR (-O2):
%struct.pixl = type { i32 }
define void @color(%struct.pixl* %0, %struct.pixl* %1) {
%3 = tail call i32 @gradient_color(%struct.pixl* %0, %struct.pixl* %1)
ret void
}
void glink_unregister_link_state_cb(void *notif_handle) {}


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

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

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

LLVM IR (-O2):
define void @glink_unregister_link_state_cb(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ callee2(int, char *);
callee1(int intarg, char *strarg, double fltarg) { callee2(intarg, strarg); }


x86 assembly (clang, -O0):
<callee1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <callee2@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callee1>:
jmp    1030 <callee2@plt>

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

LLVM IR (-O2):
define i32 @callee1(i32 %0, i8* %1, double %2) {
%4 = tail call i32 @callee2(i32 %0, i8* %1)
ret i32 undef
}
/* Type definitions */
struct vec2i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec2i_tangent(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
__attribute__((always_)) struct vec2i *psvec2i_tangent(struct vec2i *result,
                                                       struct vec2i *a) {
  vec2i_tangent((int32_t *)result, (int32_t *)a);
  return result;
}


x86 assembly (clang, -O0):
<psvec2i_tangent>:
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 <vec2i_tangent@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec2i_tangent>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec2i_tangent@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec2i = type { i32 }
define %struct.vec2i* @psvec2i_tangent(%struct.vec2i* %0, %struct.vec2i* %1) {
%3 = alloca %struct.vec2i*
%4 = alloca %struct.vec2i*
store %struct.vec2i* %0, %struct.vec2i** %3
store %struct.vec2i* %1, %struct.vec2i** %4
%5 = load %struct.vec2i*, %struct.vec2i** %3
%6 = bitcast %struct.vec2i* %5 to i32*
%7 = load %struct.vec2i*, %struct.vec2i** %4
%8 = bitcast %struct.vec2i* %7 to i32*
%9 = call i32 @vec2i_tangent(i32* %6, i32* %8)
%10 = load %struct.vec2i*, %struct.vec2i** %3
ret %struct.vec2i* %10
}

LLVM IR (-O2):
%struct.vec2i = type { i32 }
define %struct.vec2i* @psvec2i_tangent(%struct.vec2i* returned %0, %struct.vec2i* %1) {
%3 = getelementptr %struct.vec2i, %struct.vec2i* %0, i64 0, i32 0
%4 = getelementptr %struct.vec2i, %struct.vec2i* %1, i64 0, i32 0
%5 = tail call i32 @vec2i_tangent(i32* %3, i32* %4)
ret %struct.vec2i* %0
}
double grib_op_eq_d(double a, double b) { return a == b; }


x86 assembly (clang, -O0):
<grib_op_eq_d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<grib_op_eq_d>:
cmpeqsd %xmm1,%xmm0
movsd  0xef3(%rip),%xmm1
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @grib_op_eq_d(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp oeq double %5, %6
%8 = zext i1 %7 to i32
%9 = sitofp i32 %8 to double
ret double %9
}

LLVM IR (-O2):
define double @grib_op_eq_d(double %0, double %1) {
%3 = fcmp oeq double %0, %1
%4 = uitofp i1 %3 to double
ret double %4
}
int Compare(const void *numberA, const void *numberB) {
  return (*(int *)numberA) - (*(int *)numberB);
}


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

x86 assembly (clang, -O2):
<Compare>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

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

LLVM IR (-O2):
define i32 @Compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xe9() {
  Assert_real((isgraph(233) == 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_isgraph.c",
              1170, ("isgraph should be 0 for 0xe9"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xe9>:
push   %rax
mov    $0xe9,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x492,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xe9\00"
define void @t_isgraph_0xe9() {
%1 = call i64 @isgraph(i32 233)
%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 1170, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xe9\00"
define void @t_isgraph_0xe9() {
%1 = tail call i64 @isgraph(i32 233)
%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 1170, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
const char *pkgArchivePath() {
  return "%R"
         "var/cache/mingw-get/packages"
         "%/M/%F";
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"%Rvar/cache/mingw-get/packages%/M/%F\00"
define i8* @pkgArchivePath() {
ret i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [37 x i8] c"%Rvar/cache/mingw-get/packages%/M/%F\00"
define i8* @pkgArchivePath() {
ret i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void usage(void) {
  extern char *__progname;
  printf("usage: %s [-d] input_file [output_file]\n"
         "If output_file given -- write a binary file with frequencies and "
         "periods (both get written as integers)\n"
         "\t-d\t-- output debug info\n",
         __progname);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%rsi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%rsi
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [170 x i8] c"usage: %s [-d] input_file [output_file]\0AIf output_file given -- write a binary file with frequencies and periods (both get written as integers)\0A\09-d\09-- output debug info\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i8*, i8** @__progname
%2 = call i32 @printf(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [170 x i8] c"usage: %s [-d] input_file [output_file]\0AIf output_file given -- write a binary file with frequencies and periods (both get written as integers)\0A\09-d\09-- output debug info\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i8*, i8** @__progname
%2 = tail call i32 @printf(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = tail call i32 @exit(i32 0)
unreachable
}
void voutpu_(path, len, len0) char *path;
int *len;
int len0;
{ voutput_(path, len, len0); }


x86 assembly (clang, -O0):
<voutpu_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x0,%al
call   1030 <voutput_@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @voutpu_(i8* %0, i32* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32*, i32** %5
%9 = load i32, i32* %6
%10 = call i32 (i8*, i32*, i32, ...) bitcast (i32 (...)* @voutput_ to i32 (i8*, i32*, i32, ...)*)(i8* %7, i32* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @voutpu_(i8* %0, i32* %1, i32 %2) {
%4 = tail call i32 (i8*, i32*, i32, ...) bitcast (i32 (...)* @voutput_ to i32 (i8*, i32*, i32, ...)*)(i8* %0, i32* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test(void) {
  printf("JIT called me!\n");
  return -20;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"JIT called me!\0A\00"
define i32 @test() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 -20
}

LLVM IR (-O2):
@str = [15 x i8] c"JIT called me!\00"
define i32 @test() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 -20
}
int cdr(int *twoInts) { return twoInts[1]; }


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

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

LLVM IR (-O0):
define i32 @cdr(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @cdr(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
ret i32 %3
}
IR0RX1(r0, r1, x0, x1, p0, p1) signed char r0, r1;
signed char *p0, *p1;
{
  if ((*p0) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<IR0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
mov    -0x20(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jg     1145 <IR0RX1+0x45>
movl   $0x1,-0x4(%rbp)
jmp    114c <IR0RX1+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IR0RX1>:
mov    (%r8),%dl
movslq %ecx,%rcx
xor    %eax,%eax
cmp    (%r9,%rcx,1),%dl
setle  %al
ret

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

LLVM IR (-O2):
define i32 @IR0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture %4, i8* nocapture %5) {
%7 = load i8, i8* %4
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = load i8, i8* %9
%11 = icmp sle i8 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int main(void) {
  while (1) {
    printf("wait for talk\n");
    sleep(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
@.str = [15 x i8] c"wait for talk\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @sleep(i32 1)
br label %2
}

LLVM IR (-O2):
@str = [14 x i8] c"wait for talk\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @sleep(i32 1)
br label %1
}
void gtk_tree_row_reference_copy() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_row_reference_copy() {
ret void
}
/* Type definitions */
struct dirent {
  int dummy;
};
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
struct dirent *fake_readdir(int /*<<< orphan*/ *);
struct dirent *readdir64(DIR *dirp) {
  return fake_readdir(dirp);
}


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

x86 assembly (clang, -O2):
<readdir64>:
jmp    1030 <fake_readdir@plt>

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

LLVM IR (-O2):
%struct.dirent = type { i32 }
define %struct.dirent* @readdir64(i32* %0) {
%2 = tail call %struct.dirent* @fake_readdir(i32* %0)
ret %struct.dirent* %2
}
/* Variables and functions */
int /*<<< orphan*/ print_ledger_default(int);
void print_ledger(int x) { print_ledger_default(x); }


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

x86 assembly (clang, -O2):
<print_ledger>:
jmp    1030 <print_ledger_default@plt>

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

LLVM IR (-O2):
define void @print_ledger(i32 %0) {
%2 = tail call i32 @print_ledger_default(i32 %0)
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ ChildProcess();
int /*<<< orphan*/ ParentProcess();
scalar_t__ fork();
void main(void) {
  pid_t pid;
  pid = fork();
  if (pid == 0)
    ChildProcess();
  else
    ParentProcess();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <fork@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115a <main+0x2a>
mov    $0x0,%al
call   1040 <ChildProcess@plt>
jmp    1161 <main+0x31>
mov    $0x0,%al
call   1030 <ParentProcess@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <fork@plt>
test   %rax,%rax
je     1145 <main+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ParentProcess@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ChildProcess@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i64
%2 = call i64 (...) @fork()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @ChildProcess()
br label %9
7: ; preds = %0
%8 = call i32 (...) @ParentProcess()
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @ChildProcess()
br label %7
5: ; preds = %0
%6 = tail call i32 (...) @ParentProcess()
br label %7
7: ; preds = %5, %3
ret void
}
void EUSCIA3_IRQHandler(void) {
  while (1) {
  }
}


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

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

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

LLVM IR (-O2):
define void @EUSCIA3_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void mixedSignedness10(unsigned a) {
  int min = 0;
  clang_analyzer_eval(a <= min);
  clang_analyzer_eval((a + 2) <= min);
  clang_analyzer_eval((a + 2U) <= min);
}


x86 assembly (clang, -O0):
<mixedSignedness10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixedSignedness10>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %edi,%edi
test   %ebx,%ebx
sete   %dil
call   1030 <clang_analyzer_eval@plt>
xor    %ebp,%ebp
cmp    $0xfffffffe,%ebx
sete   %bpl
mov    %ebp,%edi
call   1030 <clang_analyzer_eval@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @mixedSignedness10(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp ule i32 %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
%9 = load i32, i32* %2
%10 = add i32 %9, 2
%11 = load i32, i32* %3
%12 = icmp ule i32 %10, %11
%13 = zext i1 %12 to i32
%14 = call i32 @clang_analyzer_eval(i32 %13)
%15 = load i32, i32* %2
%16 = add i32 %15, 2
%17 = load i32, i32* %3
%18 = icmp ule i32 %16, %17
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
ret void
}

LLVM IR (-O2):
define void @mixedSignedness10(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
%5 = icmp eq i32 %0, -2
%6 = zext i1 %5 to i32
%7 = tail call i32 @clang_analyzer_eval(i32 %6)
%8 = tail call i32 @clang_analyzer_eval(i32 %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_rwlock_t;

/* Variables and functions */
int pthread_rwlock_unlock(pthread_rwlock_t *rwlock) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pthread_rwlock_unlock(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_2_callee(void *, void *);
void test_2(void *p, void *q) {
  if (p != 0 && q != 0)
    test_2_callee(p, q);
}


x86 assembly (clang, -O0):
<test_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1143 <test_2+0x33>
cmpq   $0x0,-0x10(%rbp)
je     1143 <test_2+0x33>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <test_2_callee@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_2>:
test   %rdi,%rdi
je     111f <test_2+0xf>
test   %rsi,%rsi
je     111f <test_2+0xf>
jmp    1030 <test_2_callee@plt>
ret

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

LLVM IR (-O2):
define void @test_2(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @test_2_callee(i8* %0, i8* %1)
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int yas_kxtf9_read_reg_byte(int);
int /*<<< orphan*/ yas_kxtf9_write_reg_byte(int, int);
int yas_kxtf9_power_up(void) {
  yas_kxtf9_write_reg_byte(
      0x1b, ((yas_kxtf9_read_reg_byte(0x1b) & ~0x80) | ((1) << 7)));
  return (0);
}


x86 assembly (clang, -O0):
<yas_kxtf9_power_up>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1b,%edi
call   1040 <yas_kxtf9_read_reg_byte@plt>
mov    %eax,%esi
and    $0xffffff7f,%esi
or     $0x80,%esi
mov    $0x1b,%edi
call   1030 <yas_kxtf9_write_reg_byte@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<yas_kxtf9_power_up>:
push   %rax
mov    $0x1b,%edi
call   1040 <yas_kxtf9_read_reg_byte@plt>
or     $0x80,%eax
mov    $0x1b,%edi
mov    %eax,%esi
call   1030 <yas_kxtf9_write_reg_byte@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @yas_kxtf9_power_up() {
%1 = call i32 @yas_kxtf9_read_reg_byte(i32 27)
%2 = and i32 %1, -129
%3 = or i32 %2, 128
%4 = call i32 @yas_kxtf9_write_reg_byte(i32 27, i32 %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @yas_kxtf9_power_up() {
%1 = tail call i32 @yas_kxtf9_read_reg_byte(i32 27)
%2 = or i32 %1, 128
%3 = tail call i32 @yas_kxtf9_write_reg_byte(i32 27, i32 %2)
ret i32 0
}
int ram_to_flash_end() {}


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

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

LLVM IR (-O0):
define i32 @ram_to_flash_end() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @ram_to_flash_end() {
ret i32 undef
}
void ipipe_root_only(void) {}


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

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

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

LLVM IR (-O2):
define void @ipipe_root_only() {
ret void
}
void set_bit(unsigned long nr, volatile void *addr) {
  volatile unsigned long *a = addr;
  unsigned long mask;
  a += nr >> 5;
  mask = 1UL << (nr & 31);
  *a |= mask;
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x5,%rax
shl    $0x3,%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
and    $0x1f,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
or     %rdx,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
mov    %rdi,%rcx
mov    %rdi,%rax
and    $0x1f,%cl
mov    $0x1,%edx
shl    %cl,%rdx
shr    $0x5,%rax
or     %rdx,(%rsi,%rax,8)
ret

LLVM IR (-O0):
define void @set_bit(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i64
store i64 %0, i64* %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to i64*
store i64* %8, i64** %5
%9 = load i64, i64* %3
%10 = lshr i64 %9, 5
%11 = load i64*, i64** %5
%12 = getelementptr inbounds i64, i64* %11, i64 %10
store i64* %12, i64** %5
%13 = load i64, i64* %3
%14 = and i64 %13, 31
%15 = shl i64 1, %14
store i64 %15, i64* %6
%16 = load i64, i64* %6
%17 = load i64*, i64** %5
%18 = load volatile i64, i64* %17
%19 = or i64 %18, %16
store volatile i64 %19, i64* %17
ret void
}

LLVM IR (-O2):
define void @set_bit(i64 %0, i8* %1) {
%3 = bitcast i8* %1 to i64*
%4 = lshr i64 %0, 5
%5 = getelementptr inbounds i64, i64* %3, i64 %4
%6 = and i64 %0, 31
%7 = shl nuw nsw i64 1, %6
%8 = load volatile i64, i64* %5
%9 = or i64 %8, %7
store volatile i64 %9, i64* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_msort(int, char **);
int main(int argc, char *argv[]) { test_msort(argc, argv); }


x86 assembly (clang, -O0):
<main>:
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 <test_msort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @test_msort(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int _cli_conn(char *);
int cli_conn(void) { return _cli_conn("/tmp/.hmsg_path"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"/tmp/.hmsg_path\00"
define i32 @cli_conn() {
%1 = call i32 @_cli_conn(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [16 x i8] c"/tmp/.hmsg_path\00"
define i32 @cli_conn() {
%1 = tail call i32 @_cli_conn(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
unsigned char eeread(int);
int findoccupied(int addr) {
  while (addr < 2047) {
    if (eeread(addr) != ((unsigned char)255))
      return addr;
    addr++;
  }
  return ((int)-1);
}


x86 assembly (clang, -O0):
<findoccupied>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x7ff,-0x8(%rbp)
jge    1157 <findoccupied+0x47>
mov    -0x8(%rbp),%edi
call   1030 <eeread@plt>
movzbl %al,%eax
cmp    $0xff,%eax
je     1149 <findoccupied+0x39>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115e <findoccupied+0x4e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111b <findoccupied+0xb>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findoccupied>:
push   %rbp
push   %rbx
push   %rax
mov    $0xffffffff,%ebx
cmp    $0x7fe,%edi
jg     114a <findoccupied+0x3a>
mov    %edi,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebp,%edi
call   1030 <eeread@plt>
cmp    $0xff,%al
jne    1148 <findoccupied+0x38>
add    $0x1,%ebp
cmp    $0x7ff,%ebp
jne    1130 <findoccupied+0x20>
jmp    114a <findoccupied+0x3a>
mov    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @findoccupied(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 2047
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32, i32* %3
%9 = call zeroext i8 @eeread(i32 %8)
%10 = zext i8 %9 to i32
%11 = icmp ne i32 %10, 255
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %18
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
store i32 -1, i32* %2
br label %18
18: ; preds = %17, %12
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @findoccupied(i32 %0) {
%2 = icmp slt i32 %0, 2047
br i1 %2, label %3, label %10
3: ; preds = %1, %7
%4 = phi i32 [ %8, %7 ], [ %0, %1 ]
%5 = tail call zeroext i8 @eeread(i32 %4)
%6 = icmp eq i8 %5, -1
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = add i32 %4, 1
%9 = icmp eq i32 %8, 2047
br i1 %9, label %10, label %3
10: ; preds = %3, %7, %1
%11 = phi i32 [ -1, %1 ], [ -1, %7 ], [ %4, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ return_struct_vd43();
int /*<<< orphan*/ take_struct_vd43(int /*<<< orphan*/);
void test_struct_vd43() { take_struct_vd43(return_struct_vd43()); }


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

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

LLVM IR (-O0):
define void @test_struct_vd43() {
%1 = call i32 (...) @return_struct_vd43()
%2 = call i32 @take_struct_vd43(i32 %1)
ret void
}

LLVM IR (-O2):
define void @test_struct_vd43() {
%1 = tail call i32 (...) @return_struct_vd43()
%2 = tail call i32 @take_struct_vd43(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
scalar_t__ pthread_self();
void task1() { printf("Thread #%u working on task1\n", (int)pthread_self()); }


x86 assembly (clang, -O0):
<task1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<task1>:
push   %rax
xor    %eax,%eax
call   1040 <pthread_self@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"Thread #%u working on task1\0A\00"
define void @task1() {
%1 = call i64 (...) @pthread_self()
%2 = trunc i64 %1 to i32
%3 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"Thread #%u working on task1\0A\00"
define void @task1() {
%1 = tail call i64 (...) @pthread_self()
%2 = trunc i64 %1 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_char(int, unsigned char);
void print_alert_char(unsigned char byte) { __console_tx_char(1, byte); }


x86 assembly (clang, -O0):
<print_alert_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%edi
movzbl -0x1(%rbp),%esi
call   1030 <__console_tx_char@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_alert_char>:
mov    %edi,%esi
mov    $0x1,%edi
jmp    1030 <__console_tx_char@plt>

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

LLVM IR (-O2):
define void @print_alert_char(i8 zeroext %0) {
%2 = tail call i32 @__console_tx_char(i32 1, i8 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *);
int main() {
  int local;
  printf("local at %p\n", &local);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"local at %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32* %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"local at %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32* %1)
ret i32 0
}