xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isupper(int);
int tolower(int c) {
  if (isupper(c))
    c += 32;
  return c;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     1136 <tolower+0x26>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isupper(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 32
store i32 %8, i32* %2
br label %9
9: ; preds = %6, %1
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
int findLeftmostOnePos(int *el, int len) {
  int i;
  for (i = len - 1; i >= 0; i--) {
    if (el[i] != 1)
      return i + 1;
  }
  return -1;
}


x86 assembly (clang, -O0):
<findLeftmostOnePos>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     1151 <findLeftmostOnePos+0x51>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
je     113e <findLeftmostOnePos+0x3e>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <findLeftmostOnePos+0x58>
jmp    1143 <findLeftmostOnePos+0x43>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    1114 <findLeftmostOnePos+0x14>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<findLeftmostOnePos>:
mov    %esi,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %ecx,%ecx
jle    1126 <findLeftmostOnePos+0x26>
lea    -0x1(%rcx),%rax
cmpl   $0x1,-0x4(%rdi,%rcx,4)
mov    %rax,%rcx
je     1110 <findLeftmostOnePos+0x10>
add    $0x1,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @findLeftmostOnePos(i32* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
br label %4
4: ; preds = %9, %2
%5 = phi i64 [ %6, %9 ], [ %3, %2 ]
%6 = add nsw i64 %5, -1
%7 = trunc i64 %5 to i32
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %4
%10 = getelementptr inbounds i32, i32* %0, i64 %6
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, 1
br i1 %12, label %4, label %13
13: ; preds = %9
%14 = trunc i64 %5 to i32
br label %15
15: ; preds = %4, %13
%16 = phi i32 [ %14, %13 ], [ -1, %4 ]
ret i32 %16
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7_RECIP_INFO;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_RECIP_INFO_it;
PKCS7_RECIP_INFO *PKCS7_RECIP_INFO_new(void) {
  return (PKCS7_RECIP_INFO *)ASN1_item_new(&PKCS7_RECIP_INFO_it);
}


x86 assembly (clang, -O0):
<PKCS7_RECIP_INFO_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PKCS7_RECIP_INFO_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@PKCS7_RECIP_INFO_it = global i32 0
define i32* @PKCS7_RECIP_INFO_new() {
%1 = call i64 @ASN1_item_new(i32* @PKCS7_RECIP_INFO_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@PKCS7_RECIP_INFO_it = global i32 0
define i32* @PKCS7_RECIP_INFO_new() {
%1 = tail call i64 @ASN1_item_new(i32* @PKCS7_RECIP_INFO_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
int _is_bracket(char c) { return ('(' == c) || (')' == c); }


x86 assembly (clang, -O0):
<_is_bracket>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0x28,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     1131 <_is_bracket+0x31>
movsbl -0x1(%rbp),%ecx
mov    $0x29,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_bracket>:
and    $0xfe,%dil
xor    %eax,%eax
cmp    $0x28,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @_is_bracket(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 40, %4
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 41, %8
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @_is_bracket(i8 signext %0) {
%2 = and i8 %0, -2
%3 = icmp eq i8 %2, 40
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct Asteroid {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ destroy(struct Asteroid *);
void asteroid_destroy(struct Asteroid *ast) {
  if (ast) {
    destroy(ast);
  }
}


x86 assembly (clang, -O0):
<asteroid_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <asteroid_destroy+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <destroy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asteroid_destroy>:
test   %rdi,%rdi
je     111a <asteroid_destroy+0xa>
jmp    1030 <destroy@plt>
ret

LLVM IR (-O0):
%struct.Asteroid = type { i32 }
define void @asteroid_destroy(%struct.Asteroid* %0) {
%2 = alloca %struct.Asteroid*
store %struct.Asteroid* %0, %struct.Asteroid** %2
%3 = load %struct.Asteroid*, %struct.Asteroid** %2
%4 = icmp ne %struct.Asteroid* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.Asteroid*, %struct.Asteroid** %2
%7 = call i32 @destroy(%struct.Asteroid* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.Asteroid = type { i32 }
define void @asteroid_destroy(%struct.Asteroid* %0) {
%2 = icmp eq %struct.Asteroid* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @destroy(%struct.Asteroid* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int epoll_addfd(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void xepoll_addfd(int epfd, int fd, uint32_t events) {
  int x;
  x = epoll_addfd(epfd, fd, events);
  if (x != 0) {
    perror("epoll_addfd: epoll_ctl");
    exit(EXIT_FAILURE);
  } else {
    return;
  }
}


x86 assembly (clang, -O0):
<xepoll_addfd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <epoll_addfd@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1176 <xepoll_addfd+0x46>
lea    0xe9d(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xepoll_addfd>:
push   %rax
call   1030 <epoll_addfd@plt>
test   %eax,%eax
jne    113c <xepoll_addfd+0xc>
pop    %rax
ret
lea    0xebd(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"epoll_addfd: epoll_ctl\00"
@EXIT_FAILURE = global i32 0
define void @xepoll_addfd(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @epoll_addfd(i32 %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %3
%15 = call i32 @perror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* @EXIT_FAILURE
%17 = call i32 @exit(i32 %16)
unreachable
18: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"epoll_addfd: epoll_ctl\00"
@EXIT_FAILURE = global i32 0
define void @xepoll_addfd(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @epoll_addfd(i32 %0, i32 %1, i32 %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ InitKernel(void *, int);
void InitDynace(void *s) {
  int nClasses = 80;
  InitKernel(s, nClasses * 2);
}


x86 assembly (clang, -O0):
<InitDynace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x50,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x1,%esi
call   1030 <InitKernel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitDynace>:
mov    $0xa0,%esi
jmp    1030 <InitKernel@plt>

LLVM IR (-O0):
define void @InitDynace(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 80, i32* %3
%4 = load i8*, i8** %2
%5 = load i32, i32* %3
%6 = mul nsw i32 %5, 2
%7 = call i32 @InitKernel(i8* %4, i32 %6)
ret void
}

LLVM IR (-O2):
define void @InitDynace(i8* %0) {
%2 = tail call i32 @InitKernel(i8* %0, i32 160)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void fn_test4(void) {
  static int ia = 30, ib = 40;
  ia++;
  ib++;
  printf("fn_test4: %d, %d\n", ia, ib);
}


x86 assembly (clang, -O0):
<fn_test4>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f0e(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f05(%rip)
mov    0x2f03(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2efa(%rip)
mov    0x2ef0(%rip),%esi
mov    0x2eee(%rip),%edx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_test4>:
mov    0x2f12(%rip),%esi
add    $0x1,%esi
mov    %esi,0x2f09(%rip)
mov    0x2f07(%rip),%edx
add    $0x1,%edx
mov    %edx,0x2efe(%rip)
lea    0xecb(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@fn_test4.ia = internal global i32 30
@fn_test4.ib = internal global i32 40
@.str = [18 x i8] c"fn_test4: %d, %d\0A\00"
define void @fn_test4() {
%1 = load i32, i32* @fn_test4.ia
%2 = add nsw i32 %1, 1
store i32 %2, i32* @fn_test4.ia
%3 = load i32, i32* @fn_test4.ib
%4 = add nsw i32 %3, 1
store i32 %4, i32* @fn_test4.ib
%5 = load i32, i32* @fn_test4.ia
%6 = load i32, i32* @fn_test4.ib
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@fn_test4.ia = internal unnamed_addr global i32 30
@fn_test4.ib = internal unnamed_addr global i32 40
@.str = [18 x i8] c"fn_test4: %d, %d\0A\00"
define void @fn_test4() {
%1 = load i32, i32* @fn_test4.ia
%2 = add nsw i32 %1, 1
store i32 %2, i32* @fn_test4.ia
%3 = load i32, i32* @fn_test4.ib
%4 = add nsw i32 %3, 1
store i32 %4, i32* @fn_test4.ib
%5 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4)
ret void
}
void border_se_ext_diagonal_special_sand_short_vert(unsigned char *pic,
                                                    unsigned char *mirr) {
  *pic = 0x2C;
  ;
}


x86 assembly (clang, -O0):
<border_se_ext_diagonal_special_sand_short_vert>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x2c,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<border_se_ext_diagonal_special_sand_short_vert>:
movb   $0x2c,(%rdi)
ret

LLVM IR (-O0):
define void @border_se_ext_diagonal_special_sand_short_vert(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
store i8 44, i8* %5
ret void
}

LLVM IR (-O2):
define void @border_se_ext_diagonal_special_sand_short_vert(i8* nocapture writeonly %0, i8* nocapture readnone %1) {
store i8 44, i8* %0
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int is_broadcast_ether_addr(const void *addr) {
  const uint8_t *addr_bytes = addr;
  return ((addr_bytes[0] & addr_bytes[1] & addr_bytes[2] & addr_bytes[3] &
           addr_bytes[4] & addr_bytes[5]) == 0xff);
}


x86 assembly (clang, -O0):
<is_broadcast_ether_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
and    0x4(%rcx),%eax
mov    -0x10(%rbp),%rcx
and    0x8(%rcx),%eax
mov    -0x10(%rbp),%rcx
and    0xc(%rcx),%eax
mov    -0x10(%rbp),%rcx
and    0x10(%rcx),%eax
mov    -0x10(%rbp),%rcx
and    0x14(%rcx),%eax
cmp    $0xff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_broadcast_ether_addr>:
movdqu (%rdi),%xmm0
pshufd $0xee,%xmm0,%xmm1
pand   %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
pand   %xmm1,%xmm0
movd   %xmm0,%ecx
and    0x10(%rdi),%ecx
and    0x14(%rdi),%ecx
xor    %eax,%eax
cmp    $0xff,%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @is_broadcast_ether_addr(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = load i32, i32* %10
%12 = and i32 %8, %11
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 2
%15 = load i32, i32* %14
%16 = and i32 %12, %15
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i64 3
%19 = load i32, i32* %18
%20 = and i32 %16, %19
%21 = load i32*, i32** %3
%22 = getelementptr inbounds i32, i32* %21, i64 4
%23 = load i32, i32* %22
%24 = and i32 %20, %23
%25 = load i32*, i32** %3
%26 = getelementptr inbounds i32, i32* %25, i64 5
%27 = load i32, i32* %26
%28 = and i32 %24, %27
%29 = icmp eq i32 %28, 255
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @is_broadcast_ether_addr(i8* nocapture %0) {
%2 = bitcast i8* %0 to <4 x i32>*
%3 = load <4 x i32>, <4 x i32>* %2
%4 = getelementptr inbounds i8, i8* %0, i64 16
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
%7 = getelementptr inbounds i8, i8* %0, i64 20
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
%10 = call i32 @llvm.vector.reduce.and.v4i32(<4 x i32> %3)
%11 = and i32 %10, %6
%12 = and i32 %11, %9
%13 = icmp eq i32 %12, 255
%14 = zext i1 %13 to i32
ret i32 %14
}
int test_imm_2Bint32_reg(int val) { return ((val) & (0x2B << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_2Bint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x2b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_2Bint32_reg(i32 %0) {
%2 = and i32 %0, 43
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void convertNativeToAdjusted(float *x, float *y, float *w, float *h) { ; }


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

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

LLVM IR (-O0):
define void @convertNativeToAdjusted(float* %0, float* %1, float* %2, float* %3) {
%5 = alloca float*
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
store float* %0, float** %5
store float* %1, float** %6
store float* %2, float** %7
store float* %3, float** %8
ret void
}

LLVM IR (-O2):
define void @convertNativeToAdjusted(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* nocapture %3) {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ serial;
};
struct TYPE_4__ {
  TYPE_1__ xcreatewindow;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xcreatewindow_serial(void *_p) {
  return (unsigned long)((XEvent *)_p)->xcreatewindow.serial;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xcreatewindow_serial>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xcreatewindow_serial(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xcreatewindow_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
scalar_t__ vmhalt(int);
void power_halt() {
  int id;
  scanf("%d", &id);
  if (vmhalt(id)) {
    printf("ok\n");
  } else {
    printf("error\n");
  }
}


x86 assembly (clang, -O0):
<power_halt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1050 <vmhalt@plt>
cmp    $0x0,%rax
je     116b <power_halt+0x3b>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
jmp    1177 <power_halt+0x47>
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<power_halt>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1050 <vmhalt@plt>
test   %rax,%rax
lea    0xeae(%rip),%rax
lea    0xead(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"ok\0A\00"
@.str.2 = [7 x i8] c"error\0A\00"
define void @power_halt() {
%1 = alloca i32
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%3 = load i32, i32* %1
%4 = call i64 @vmhalt(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [6 x i8] c"error\00"
@str.3 = [3 x i8] c"ok\00"
define void @power_halt() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i64 @vmhalt(i32 %4)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.3, i64 0, i64 0)
%8 = call i32 @puts(i8* dereferenceable(1) %7)
ret void
}
/* Variables and functions */
int xbee_setuplogAPI(char *, int, int /*<<< orphan*/, int /*<<< orphan*/,
                     int /*<<< orphan*/);
int xbee_setup(char *path, int baudrate) {
  return xbee_setuplogAPI(path, baudrate, 0, 0, 0);
}


x86 assembly (clang, -O0):
<xbee_setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1030 <xbee_setuplogAPI@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xbee_setup>:
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <xbee_setuplogAPI@plt>

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

LLVM IR (-O2):
define i32 @xbee_setup(i8* %0, i32 %1) {
%3 = tail call i32 @xbee_setuplogAPI(i8* %0, i32 %1, i32 0, i32 0, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ lr_output_message(char *, char const *, int, char const *);
void OnCloseCB0(const char *connectionID, int isClosedByClient, int code,
                const char *reason, int length) {
  lr_output_message(">> WebSocket ID=%s closed. CloseCode= %d, CloseReason=%s  "
                    "[at OnCloseCB0]",
                    connectionID, code, reason);
}


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

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

LLVM IR (-O0):
@.str = [74 x i8] c">> WebSocket ID=%s closed. CloseCode= %d, CloseReason=%s [at OnCloseCB0]\00"
define void @OnCloseCB0(i8* %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %8
%13 = load i8*, i8** %9
%14 = call i32 @lr_output_message(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i8* %11, i32 %12, i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [74 x i8] c">> WebSocket ID=%s closed. CloseCode= %d, CloseReason=%s [at OnCloseCB0]\00"
define void @OnCloseCB0(i8* %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @lr_output_message(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %2, i8* %3)
ret void
}
/* Variables and functions */
int main_transpose(int, char **);
int main(int argc, char **argv) {
  int istat = main_transpose(argc, argv);
  return istat;
}


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <main_transpose@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @main_transpose(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xc9() {
  Assert_real((iscntrl(201) == 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_iscntrl.c",
              1010, ("iscntrl should be 0 for 0xc9"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xc9>:
push   %rax
mov    $0xc9,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3f2,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xc9\00"
define void @t_iscntrl_0xc9() {
%1 = call i64 @iscntrl(i32 201)
%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 1010, 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xc9\00"
define void @t_iscntrl_0xc9() {
%1 = tail call i64 @iscntrl(i32 201)
%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 1010, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void reset_coeff(double coeff[14]) {
  int i;
  for (i = 0; i < 14; i++) {
    coeff[i] = 0.0;
  }
}


x86 assembly (clang, -O0):
<reset_coeff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xe,-0xc(%rbp)
jge    1137 <reset_coeff+0x37>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <reset_coeff+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_coeff>:
xorps  %xmm0,%xmm0
movups %xmm0,0x60(%rdi)
movups %xmm0,0x50(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @reset_coeff(double* %0) {
%2 = alloca double*
%3 = alloca i32
store double* %0, double** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 14
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load double*, double** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds double, double* %8, i64 %10
store double 0.000000e+00, double* %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @reset_coeff(double* nocapture writeonly %0) {
%2 = bitcast double* %0 to i8*
ret void
}
void foo_1_2_2_1_1_1_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_1_1_1_2_2_2() {
ret void
}
int syscall_enter(struct tcb *tcp) { return 1; }


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

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

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

LLVM IR (-O2):
%struct.tcb = type opaque
define i32 @syscall_enter(%struct.tcb* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int /*<<< orphan*/ IntEnable(int);
int /*<<< orphan*/ IntRegister(int, void (*)());
void DESIntRegister(uint32_t ui32Base, void (*pfnHandler)(void)) {
  ASSERT(ui32Base == 0x44038000);
  IntRegister(112, pfnHandler);
  IntEnable(112);
}


x86 assembly (clang, -O0):
<DESIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x44038000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <ASSERT@plt>
mov    -0x10(%rbp),%rsi
mov    $0x70,%edi
call   1040 <IntRegister@plt>
mov    $0x70,%edi
call   1030 <IntEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DESIntRegister>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
cmp    $0x44038000,%edi
sete   %al
mov    %eax,%edi
call   1050 <ASSERT@plt>
mov    $0x70,%edi
mov    %rbx,%rsi
call   1040 <IntRegister@plt>
mov    $0x70,%edi
pop    %rbx
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @DESIntRegister(i32 %0, void ()* %1) {
%3 = alloca i32
%4 = alloca void ()*
store i32 %0, i32* %3
store void ()* %1, void ()** %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1141080064
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load void ()*, void ()** %4
%10 = bitcast void ()* %9 to void (...)*
%11 = call i32 @IntRegister(i32 112, void (...)* %10)
%12 = call i32 @IntEnable(i32 112)
ret void
}

LLVM IR (-O2):
define void @DESIntRegister(i32 %0, void ()* %1) {
%3 = icmp eq i32 %0, 1141080064
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = bitcast void ()* %1 to void (...)*
%7 = tail call i32 @IntRegister(i32 112, void (...)* %6)
%8 = tail call i32 @IntEnable(i32 112)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_entity(int /*<<< orphan*/, char *,
                                             char *);
void test_emacs_lisp_comment_entities() {
  test_parser_verify_entity(test_parser_sourcefile("emacslisp", " ;comment"),
                            "comment", ";comment");
}


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"emacslisp\00"
@.str.1 = [10 x i8] c" ;comment\00"
@.str.2 = [8 x i8] c"comment\00"
@.str.3 = [9 x i8] c";comment\00"
define void @test_emacs_lisp_comment_entities() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_entity(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret void
}
void delay(void) {
  static char i = 0;
  for (i = 0; i < 10; i++)
    ;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
movb   $0x0,0x2f16(%rip)
movsbl 0x2f0f(%rip),%eax
cmp    $0xa,%eax
jge    1133 <delay+0x33>
jmp    1120 <delay+0x20>
mov    0x2efb(%rip),%al
add    $0x1,%al
mov    %al,0x2ef3(%rip)
jmp    110b <delay+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
@delay.i = internal global i8 0
define void @delay() {
store i8 0, i8* @delay.i
br label %1
1: ; preds = %6, %0
%2 = load i8, i8* @delay.i
%3 = sext i8 %2 to i32
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %9
5: ; preds = %1
br label %6
6: ; preds = %5
%7 = load i8, i8* @delay.i
%8 = add i8 %7, 1
store i8 %8, i8* @delay.i
br label %1
9: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @delay() {
ret void
}
int test_imm_ABuint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xAB << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_ABuint64_highword_mem>:
testb  $0xab,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_ABuint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 734439407616
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ cglit(int);
int /*<<< orphan*/ cgstorlw(int);
void cginitlw(int v, int a) {
  cglit(v);
  cgstorlw(a);
}


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

x86 assembly (clang, -O2):
<cginitlw>:
push   %rbx
mov    %esi,%ebx
call   1030 <cglit@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <cgstorlw@plt>

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

LLVM IR (-O2):
define void @cginitlw(i32 %0, i32 %1) {
%3 = tail call i32 @cglit(i32 %0)
%4 = tail call i32 @cgstorlw(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ print_debug(char const *);
void main(void) {
  static const int value[] = {1, 0};
  const char *str;
  if (value[1]) {
    print_debug("A\r\n");
    str = "Unbuffered\r\n";
  } else {
    print_debug("B\r\n");
    str = "Registered\r\n";
  }
  print_debug(str);
  _exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,0xed5(%rip)
je     1151 <main+0x31>
lea    0xecc(%rip),%rdi
call   1040 <print_debug@plt>
lea    0xec4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1168 <main+0x48>
lea    0xec1(%rip),%rdi
call   1040 <print_debug@plt>
lea    0xeb9(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <print_debug@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <print_debug@plt>
lea    0xed0(%rip),%rdi
call   1040 <print_debug@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@main.value = internal constant [2 x i32] [i32 1, i32 0]
@.str = [4 x i8] c"A\0D\0A\00"
@.str.1 = [13 x i8] c"Unbuffered\0D\0A\00"
@.str.2 = [4 x i8] c"B\0D\0A\00"
@.str.3 = [13 x i8] c"Registered\0D\0A\00"
define void @main() {
%1 = alloca i8*
%2 = load i32, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @main.value, i64 0, i64 1)
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @print_debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %8
6: ; preds = %0
%7 = call i32 @print_debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8** %1
br label %8
8: ; preds = %6, %4
%9 = load i8*, i8** %1
%10 = call i32 @print_debug(i8* %9)
%11 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.2 = [4 x i8] c"B\0D\0A\00"
@.str.3 = [13 x i8] c"Registered\0D\0A\00"
define void @main() {
%1 = tail call i32 @print_debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @print_debug(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @_exit(i32 0)
unreachable
}
/* Type definitions */
struct move {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ backone(struct move *, int);
void movback(struct move *mm, int i) {
  int j;
  for (j = i - 1; j >= 0; j--)
    backone(mm, j);
}


x86 assembly (clang, -O0):
<movback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     114c <movback+0x3c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <backone@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1128 <movback+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<movback>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1133 <movback+0x23>
mov    %esi,%ebx
mov    %rdi,%r14
add    $0x1,%ebx
lea    -0x2(%rbx),%esi
mov    %r14,%rdi
call   1030 <backone@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1120 <movback+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.move = type { i32 }
define void @movback(%struct.move* %0, i32 %1) {
%3 = alloca %struct.move*
%4 = alloca i32
%5 = alloca i32
store %struct.move* %0, %struct.move** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 1
store i32 %7, i32* %5
br label %8
8: ; preds = %15, %2
%9 = load i32, i32* %5
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = load %struct.move*, %struct.move** %3
%13 = load i32, i32* %5
%14 = call i32 @backone(%struct.move* %12, i32 %13)
br label %15
15: ; preds = %11
%16 = load i32, i32* %5
%17 = add nsw i32 %16, -1
store i32 %17, i32* %5
br label %8
18: ; preds = %8
ret void
}

LLVM IR (-O2):
%struct.move = type { i32 }
define void @movback(%struct.move* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = add nsw i32 %5, -1
%7 = tail call i32 @backone(%struct.move* %0, i32 %6)
%8 = icmp ugt i32 %5, 1
br i1 %8, label %4, label %9
9: ; preds = %4, %2
ret void
}
unsigned char fun_zi8(unsigned char a, unsigned char b) { return a; }


x86 assembly (clang, -O0):
<fun_zi8>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i8 @fun_zi8(i8 returned zeroext %0, i8 zeroext %1) {
ret i8 %0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t fdGetVersion(void *VoidMe) { return 0x00000000; }


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

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

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

LLVM IR (-O2):
define i32 @fdGetVersion(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int virtual_machine_resource_pool_plain_free(void *pool_ptr, void *ptr) {
  (void)pool_ptr;
  free(ptr);
  return 0;
}


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

x86 assembly (clang, -O2):
<virtual_machine_resource_pool_plain_free>:
push   %rax
mov    %rsi,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @virtual_machine_resource_pool_plain_free(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 = load i8*, i8** %4
%7 = call i32 @free(i8* %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @virtual_machine_resource_pool_plain_free(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @free(i8* %1)
ret i32 0
}
void codegen_timing_winchip_block_end() {}


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

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

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

LLVM IR (-O2):
define void @codegen_timing_winchip_block_end() {
ret void
}
void fa88(int n) {
  {
    int b[n];
    {
      int c[n];
      0;
    }
  a : {
    int d[n];
    0;
  }
    goto a;
    ;
    int e[n];
    0;
  };
  {
    int f[n];
    {
      int g[n];
      0;
    };
    {
      int h[n];
      0;
    };
    ;
    int i[n];
    0;
  };
  ;
  int j[n];
  0;
}


x86 assembly (clang, -O0):
<fa88>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
jmp    1131 <fa88+0x31>

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

LLVM IR (-O0):
define void @fa88(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i64
%17 = alloca i8*
%18 = alloca i64
store i32 %0, i32* %2
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = call i8* @llvm.stacksave()
store i8* %21, i8** %3
%22 = alloca i32, i64 %20
store i64 %20, i64* %4
%23 = load i32, i32* %2
%24 = zext i32 %23 to i64
%25 = call i8* @llvm.stacksave()
store i8* %25, i8** %5
%26 = alloca i32, i64 %24
store i64 %24, i64* %6
%27 = load i8*, i8** %5
br label %28
28: ; preds = %28, %1
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
%31 = call i8* @llvm.stacksave()
store i8* %31, i8** %7
%32 = alloca i32, i64 %30
store i64 %30, i64* %8
%33 = load i8*, i8** %7
br label %28
34: ; No predecessors!
%35 = load i32, i32* %2
%36 = zext i32 %35 to i64
%37 = alloca i32, i64 %36
store i64 %36, i64* %9
%38 = load i8*, i8** %3
%39 = load i32, i32* %2
%40 = zext i32 %39 to i64
%41 = call i8* @llvm.stacksave()
store i8* %41, i8** %10
%42 = alloca i32, i64 %40
store i64 %40, i64* %11
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
%45 = call i8* @llvm.stacksave()
store i8* %45, i8** %12
%46 = alloca i32, i64 %44
store i64 %44, i64* %13
%47 = load i8*, i8** %12
%48 = load i32, i32* %2
%49 = zext i32 %48 to i64
%50 = call i8* @llvm.stacksave()
store i8* %50, i8** %14
%51 = alloca i32, i64 %49
store i64 %49, i64* %15
%52 = load i8*, i8** %14
%53 = load i32, i32* %2
%54 = zext i32 %53 to i64
%55 = alloca i32, i64 %54
store i64 %54, i64* %16
%56 = load i8*, i8** %10
%57 = load i32, i32* %2
%58 = zext i32 %57 to i64
%59 = call i8* @llvm.stacksave()
store i8* %59, i8** %17
%60 = alloca i32, i64 %58
store i64 %58, i64* %18
%61 = load i8*, i8** %17
ret void
}

LLVM IR (-O2):
define void @fa88(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int strcmp(char const *, char const *);
int strCompare(const void *s1, const void *s2) {
  return strcmp((const char *)s1, (const char *)s2);
}


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

x86 assembly (clang, -O2):
<strCompare>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @strCompare(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 = load i8*, i8** %4
%7 = call i32 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @strCompare(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int syscall(int);
int uv__inotify_init(void) { return syscall(253); }


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

x86 assembly (clang, -O2):
<uv__inotify_init>:
mov    $0xfd,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @uv__inotify_init() {
%1 = call i32 @syscall(i32 253)
ret i32 %1
}

LLVM IR (-O2):
define i32 @uv__inotify_init() {
%1 = tail call i32 @syscall(i32 253)
ret i32 %1
}
void CreateI2(unsigned char *buf, int nValue) {
  buf[0] = (nValue >> 8) & 0xff;
  buf[1] = (nValue)&0xff;
}


x86 assembly (clang, -O0):
<CreateI2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<CreateI2>:
rol    $0x8,%si
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @CreateI2(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 8
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i32, i32* %4
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
ret void
}

LLVM IR (-O2):
define void @CreateI2(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 8
%4 = trunc i32 %3 to i8
store i8 %4, i8* %0
%5 = trunc i32 %1 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
void ingresarRegistro() {}


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

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

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

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