xunge/DecIR huggingface dataset:
/* Variables and functions */
char *strchr(char *, char);
int /*<<< orphan*/ strscpy(char *, char const *, int const);
int find_domain(const char url[], char domain[], const int domainsize) {
  char *cpnt;
  strscpy(domain, url + 7, domainsize);
  if ((cpnt = strchr(domain, '/')) == NULL) {
    return 0;
  } else {
    domain[cpnt - domain] = '\0';
    return 1;
  }
}


x86 assembly (clang, -O0):
<find_domain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x7,%rsi
mov    -0x1c(%rbp),%edx
call   1040 <strscpy@plt>
mov    -0x18(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strchr@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    116f <find_domain+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    1189 <find_domain+0x69>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    -0x18(%rbp),%rdx
sub    %rdx,%rcx
movb   $0x0,(%rax,%rcx,1)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_domain>:
push   %rbx
mov    %rsi,%rbx
lea    0x7(%rdi),%rsi
mov    %rbx,%rdi
call   1040 <strscpy@plt>
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     114c <find_domain+0x2c>
movb   $0x0,(%rax)
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @find_domain(i8* %0, i8* %1, i32 %2) {
%4 = getelementptr inbounds i8, i8* %0, i64 7
%5 = tail call i32 @strscpy(i8* %1, i8* %4, i32 %2)
%6 = tail call i8* @strchr(i8* dereferenceable(1) %1, i8 signext 47)
%7 = icmp eq i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = ptrtoint i8* %6 to i64
%10 = ptrtoint i8* %1 to i64
%11 = sub i64 %9, %10
%12 = getelementptr inbounds i8, i8* %1, i64 %11
store i8 0, i8* %12
br label %13
13: ; preds = %3, %8
%14 = phi i32 [ 1, %8 ], [ 0, %3 ]
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int endian_little_read_8(int /*<<< orphan*/ *);
int endian_little_read_16(FILE *fp) {
  int a, b, z;
  a = endian_little_read_8(fp) & 0x00ff;
  b = endian_little_read_8(fp) & 0x00ff;
  z = (a << 8) + (b);
  return (z);
}


x86 assembly (clang, -O0):
<endian_little_read_16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <endian_little_read_8@plt>
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <endian_little_read_8@plt>
and    $0xff,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<endian_little_read_16>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <endian_little_read_8@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <endian_little_read_8@plt>
movzbl %al,%ecx
shl    $0x8,%ebp
movzwl %bp,%eax
or     %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @endian_little_read_16(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = call i32 @endian_little_read_8(i32* %6)
%8 = and i32 %7, 255
store i32 %8, i32* %3
%9 = load i32*, i32** %2
%10 = call i32 @endian_little_read_8(i32* %9)
%11 = and i32 %10, 255
store i32 %11, i32* %4
%12 = load i32, i32* %3
%13 = shl i32 %12, 8
%14 = load i32, i32* %4
%15 = add nsw i32 %13, %14
store i32 %15, i32* %5
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
define i32 @endian_little_read_16(i32* %0) {
%2 = tail call i32 @endian_little_read_8(i32* %0)
%3 = tail call i32 @endian_little_read_8(i32* %0)
%4 = and i32 %3, 255
%5 = shl i32 %2, 8
%6 = and i32 %5, 65280
%7 = or i32 %6, %4
ret i32 %7
}
/* Variables and functions */
int change_bit(int, int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int n, v, p;
  scanf("%d%d%d", &n, &v, &p);
  printf("%d", change_bit(n, v, p));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <change_bit@plt>
mov    %eax,%esi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
call   1040 <change_bit@plt>
lea    0xe9d(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d%d%d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @change_bit(i32 %6, i32 %7, i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d%d%d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @change_bit(i32 %8, i32 %9, i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}
/* Type definitions */
struct ether_header {
  int /*<<< orphan*/ ether_type;
};

/* Variables and functions */
int htons(int /*<<< orphan*/);
int inet_is_ipv4(void *data) {
  struct ether_header *hd;
  hd = data;
  if (htons(hd->ether_type) == 0x800)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<inet_is_ipv4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
call   1030 <htons@plt>
cmp    $0x800,%eax
jne    1146 <inet_is_ipv4+0x36>
movl   $0x1,-0x4(%rbp)
jmp    114d <inet_is_ipv4+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inet_is_ipv4>:
push   %rax
mov    (%rdi),%edi
call   1030 <htons@plt>
xor    %ecx,%ecx
cmp    $0x800,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.ether_header = type { i32 }
define i32 @inet_is_ipv4(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.ether_header*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to %struct.ether_header*
store %struct.ether_header* %6, %struct.ether_header** %4
%7 = load %struct.ether_header*, %struct.ether_header** %4
%8 = getelementptr inbounds %struct.ether_header, %struct.ether_header* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i32 @htons(i32 %9)
%11 = icmp eq i32 %10, 2048
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 1, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @inet_is_ipv4(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @htons(i32 %3)
%5 = icmp eq i32 %4, 2048
%6 = zext i1 %5 to i32
ret i32 %6
}
int npCParseIsLetter(char c) {
  return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_';
}


x86 assembly (clang, -O0):
<npCParseIsLetter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1129 <npCParseIsLetter+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jle    1155 <npCParseIsLetter+0x55>
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1148 <npCParseIsLetter+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    1155 <npCParseIsLetter+0x55>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<npCParseIsLetter>:
mov    %edi,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
setb   %al
cmp    $0x5f,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @npCParseIsLetter(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %22, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 90
br i1 %17, label %22, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 95
br label %22
22: ; preds = %18, %14, %6
%23 = phi i1 [ true, %14 ], [ true, %6 ], [ %21, %18 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @npCParseIsLetter(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = icmp eq i8 %0, 95
%6 = or i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ cpuid(int, int *, int *, int *, int *);
int /*<<< orphan*/ support_avx();
int support_avx2() {
  int eax, ebx, ecx = 0, edx;
  int ret = 0;
  if (!support_avx())
    return 0;
  cpuid(7, &eax, &ebx, &ecx, &edx);
  if ((ebx & (1 << 5)) != 0)
    ret = 1;
  return ret;
}


x86 assembly (clang, -O0):
<support_avx2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <support_avx@plt>
cmp    $0x0,%eax
jne    1152 <support_avx2+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1188 <support_avx2+0x68>
mov    $0x7,%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1040 <cpuid@plt>
mov    -0xc(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     1182 <support_avx2+0x62>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<support_avx2>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,(%rsp)
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <support_avx@plt>
test   %eax,%eax
je     115f <support_avx2+0x3f>
lea    0xc(%rsp),%rsi
lea    0x4(%rsp),%rdx
mov    %rsp,%rcx
lea    0x8(%rsp),%r8
mov    $0x7,%edi
call   1040 <cpuid@plt>
mov    0x4(%rsp),%ebx
shr    $0x5,%ebx
and    $0x1,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @support_avx2() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %4
store i32 0, i32* %6
%7 = call i32 (...) @support_avx()
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %0
store i32 0, i32* %1
br label %18
10: ; preds = %0
%11 = call i32 @cpuid(i32 7, i32* %2, i32* %3, i32* %4, i32* %5)
%12 = load i32, i32* %3
%13 = and i32 %12, 32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 1, i32* %6
br label %16
16: ; preds = %15, %10
%17 = load i32, i32* %6
store i32 %17, i32* %1
br label %18
18: ; preds = %16, %9
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
define i32 @support_avx2() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%8 = bitcast i32* %4 to i8*
%9 = tail call i32 (...) @support_avx()
%10 = icmp eq i32 %9, 0
br i1 %10, label %16, label %11
11: ; preds = %0
%12 = call i32 @cpuid(i32 7, i32* %1, i32* %2, i32* %3, i32* %4)
%13 = load i32, i32* %2
%14 = lshr i32 %13, 5
%15 = and i32 %14, 1
br label %16
16: ; preds = %0, %11
%17 = phi i32 [ %15, %11 ], [ 0, %0 ]
ret i32 %17
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int xquit(Display *d) {
  (void)d;
  exit(EXIT_SUCCESS);
  return 0;
}


x86 assembly (clang, -O0):
<xquit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<xquit>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @xquit(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @EXIT_SUCCESS
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @xquit(i32* nocapture readnone %0) {
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
unsigned int GET32(int);
int /*<<< orphan*/ PUT32(int, unsigned int);
void led_init(void) {
  unsigned int ra;
  ra = GET32(0x20200004);
  ra &= ~(7 << 18);
  ra |= 1 << 18;
  PUT32(0x20200004, ra);
}


x86 assembly (clang, -O0):
<led_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x20200004,%edi
call   1040 <GET32@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffe3ffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x40000,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x20200004,%edi
call   1030 <PUT32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_init>:
push   %rax
mov    $0x20200004,%edi
call   1040 <GET32@plt>
and    $0xffe3ffff,%eax
lea    0x40000(%rax),%esi
mov    $0x20200004,%edi
pop    %rax
jmp    1030 <PUT32@plt>

LLVM IR (-O0):
define void @led_init() {
%1 = alloca i32
%2 = call i32 @GET32(i32 538968068)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = and i32 %3, -1835009
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = or i32 %5, 262144
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = call i32 @PUT32(i32 538968068, i32 %7)
ret void
}

LLVM IR (-O2):
define void @led_init() {
%1 = tail call i32 @GET32(i32 538968068)
%2 = and i32 %1, -1835009
%3 = or i32 %2, 262144
%4 = tail call i32 @PUT32(i32 538968068, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x55() {
  Assert_real((isxdigit(85) == 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_isxdigit.c",
              430, ("isxdigit should be 0 for U"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x55>:
push   %rax
mov    $0x55,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x1ae,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for U\00"
define void @t_isxdigit_0x55() {
%1 = call i64 @isxdigit(i32 85)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 430, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for U\00"
define void @t_isxdigit_0x55() {
%1 = tail call i64 @isxdigit(i32 85)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 430, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int times(struct tm *buf) { return -1; }


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

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

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

LLVM IR (-O2):
%struct.tm = type opaque
define i32 @times(%struct.tm* nocapture readnone %0) {
ret i32 -1
}
int setMotorLeftVal(int dataProcessed, int joyValue) {
  int motorValue = dataProcessed - joyValue;
  return motorValue;
}


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

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

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

LLVM IR (-O2):
define i32 @setMotorLeftVal(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
void double_to_sc(double x, signed char *p) { p[3] = x; }


x86 assembly (clang, -O0):
<double_to_sc>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_to_sc>:
cvttsd2si %xmm0,%eax
mov    %al,0x3(%rdi)
ret

LLVM IR (-O0):
define void @double_to_sc(double %0, i8* %1) {
%3 = alloca double
%4 = alloca i8*
store double %0, double* %3
store i8* %1, i8** %4
%5 = load double, double* %3
%6 = fptosi double %5 to i8
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i64 3
store i8 %6, i8* %8
ret void
}

LLVM IR (-O2):
define void @double_to_sc(double %0, i8* nocapture writeonly %1) {
%3 = fptosi double %0 to i8
%4 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %3, i8* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_vinfo_endvinfo();
void fgmvwrite_vinfo_endvinfo_() { gmvwrite_vinfo_endvinfo(); }


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

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

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

LLVM IR (-O2):
define void @fgmvwrite_vinfo_endvinfo_() {
%1 = tail call i32 (...) @gmvwrite_vinfo_endvinfo()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int pthread_attr_getinheritsched(const pthread_attr_t *a, int *b) { assert(0); }


x86 assembly (clang, -O0):
<pthread_attr_getinheritsched>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @pthread_attr_getinheritsched(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = tail call i32 @assert(i32 0)
ret i32 undef
}
int remove_item(int *shared_buffer) {
  static int index = 0;
  int item = shared_buffer[index];
  shared_buffer[index] = 0;
  index = (index + 1) % 10;
  return item;
}


x86 assembly (clang, -O0):
<remove_item>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movslq 0x2f11(%rip),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq 0x2f00(%rip),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2ef3(%rip),%eax
add    $0x1,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,0x2ee2(%rip)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_item>:
mov    0x2f1e(%rip),%ecx
mov    (%rdi,%rcx,4),%eax
movl   $0x0,(%rdi,%rcx,4)
add    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x22,%rdx
add    %esi,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%ecx
mov    %ecx,0x2eed(%rip)
ret

LLVM IR (-O0):
@remove_item.index = internal global i32 0
define i32 @remove_item(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* @remove_item.index
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %4, i64 %6
%8 = load i32, i32* %7
store i32 %8, i32* %3
%9 = load i32*, i32** %2
%10 = load i32, i32* @remove_item.index
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
store i32 0, i32* %12
%13 = load i32, i32* @remove_item.index
%14 = add nsw i32 %13, 1
%15 = srem i32 %14, 10
store i32 %15, i32* @remove_item.index
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@remove_item.index = internal unnamed_addr global i32 0
define i32 @remove_item(i32* nocapture %0) {
%2 = load i32, i32* @remove_item.index
%3 = zext i32 %2 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
store i32 0, i32* %4
%6 = add nsw i32 %2, 1
%7 = srem i32 %6, 10
store i32 %7, i32* @remove_item.index
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ ast_unregister_file_version(char *);
void __attribute__((destructor)) __unregister_file_version(void) {
  ast_unregister_file_version(
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/tpenguin/solarisvoip-asterisk/refs/heads/"
      "master/ulaw.c");
}


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

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

LLVM IR (-O0):
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tpenguin/solarisvoip-asterisk/refs/heads/master/ulaw.c\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__unregister_file_version, i8* null }]
define void @__unregister_file_version() {
%1 = call i32 @ast_unregister_file_version(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tpenguin/solarisvoip-asterisk/refs/heads/master/ulaw.c\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__unregister_file_version, i8* null }]
define void @__unregister_file_version() {
%1 = tail call i32 @ast_unregister_file_version(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ httplex__is_key_char(int /*<<< orphan*/);
size_t httplex__key_length(const char *str) {
  size_t len = 0;
  while (httplex__is_key_char(*str++))
    ++len;
  return len;
}


x86 assembly (clang, -O0):
<httplex__key_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <httplex__is_key_char@plt>
cmp    $0x0,%rax
je     1156 <httplex__key_length+0x46>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <httplex__key_length+0x14>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<httplex__key_length>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
movsbl (%rdi),%edi
call   1030 <httplex__is_key_char@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     1144 <httplex__key_length+0x34>
cs nopw 0x0(%rax,%rax,1)
movsbl 0x1(%r14,%rbx,1),%edi
add    $0x1,%rbx
call   1030 <httplex__is_key_char@plt>
test   %rax,%rax
jne    1130 <httplex__key_length+0x20>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @httplex__key_length(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = tail call i64 @httplex__is_key_char(i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %1, %6
%7 = phi i64 [ %10, %6 ], [ 0, %1 ]
%8 = phi i8* [ %9, %6 ], [ %0, %1 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = add i64 %7, 1
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
%13 = tail call i64 @httplex__is_key_char(i32 %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %6
15: ; preds = %6, %1
%16 = phi i64 [ 0, %1 ], [ %10, %6 ]
ret i64 %16
}
void INT_Excep_MTU5_TGIV5(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU5_TGIV5() {
ret void
}
/* Variables and functions */
void *malloc(int);
void requestMemoryBlock(int blocksize_bytes, void **memory_pointer) {
  *memory_pointer = malloc(blocksize_bytes);
  return;
}


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

x86 assembly (clang, -O2):
<requestMemoryBlock>:
push   %rbx
mov    %rsi,%rbx
call   1030 <malloc@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @requestMemoryBlock(i32 %0, i8** nocapture writeonly %1) {
%3 = tail call i8* @malloc(i32 %0)
store i8* %3, i8** %1
ret void
}
void gtk_action_group_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_action_group_get_type() {
ret void
}
/* Variables and functions */
int _plibc_syscall(int, int);
int close(int fd) { return _plibc_syscall(3, fd); }


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

x86 assembly (clang, -O2):
<close>:
mov    %edi,%esi
mov    $0x3,%edi
jmp    1030 <_plibc_syscall@plt>

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

LLVM IR (-O2):
define i32 @close(i32 %0) {
%2 = tail call i32 @_plibc_syscall(i32 3, i32 %0)
ret i32 %2
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int, int);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
void printutime() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  fprintf(stderr, "%i:%02i.%06i\n", tv.tv_sec / 60, tv.tv_sec % 60, tv.tv_usec);
}


x86 assembly (clang, -O0):
<printutime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    -0xc(%rbp),%edx
mov    -0x4(%rbp),%r8d
lea    0xe99(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printutime>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
movslq (%rsp),%rcx
imul   $0xffffffff88888889,%rcx,%rdx
shr    $0x20,%rdx
add    %ecx,%edx
mov    %edx,%eax
shr    $0x1f,%eax
sar    $0x5,%edx
add    %eax,%edx
imul   $0x3c,%edx,%eax
sub    %eax,%ecx
mov    0x4(%rsp),%r8d
lea    0xea0(%rip),%rsi
pop    %rax
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
@stderr = global i32 0
@.str = [14 x i8] c"%i:%02i.%06i\0A\00"
define void @printutime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = load i32, i32* @stderr
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = sdiv i32 %5, 60
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i32, i32* %7
%9 = srem i32 %8, 60
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%11 = load i32, i32* %10
%12 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %9, i32 %11)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
@stderr = global i32 0
@.str = [14 x i8] c"%i:%02i.%06i\0A\00"
define void @printutime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = load i32, i32* @stderr
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = sdiv i32 %6, 60
%8 = srem i32 %6, 60
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%10 = load i32, i32* %9
%11 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %10)
ret void
}
int main(void) {
  int a = 5;
  *(&a - (-1));
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
unsigned char *hmac_haval192(unsigned char *, unsigned char const *, size_t,
                             unsigned char const *, size_t);
unsigned char *mac_hmac_haval192(unsigned char *out, const unsigned char *key,
                                 size_t key_len, const unsigned char *msg,
                                 size_t msg_len) {
  return hmac_haval192(out, key, key_len, msg, msg_len);
}


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

x86 assembly (clang, -O2):
<mac_hmac_haval192>:
jmp    1030 <hmac_haval192@plt>

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

LLVM IR (-O2):
define i8* @mac_hmac_haval192(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = tail call i8* @hmac_haval192(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4)
ret i8* %6
}
/* Type definitions */
struct symbol_table_s {
  int dummy;
};
struct identifier_s {
  int dummy;
};

/* Variables and functions */
struct identifier_s *symbol_lookup_local(struct symbol_table_s *, char const *);
struct identifier_s *identifier_local_lookup(struct symbol_table_s *table,
                                             const char *name) {
  return symbol_lookup_local(table, name);
}


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

x86 assembly (clang, -O2):
<identifier_local_lookup>:
jmp    1030 <symbol_lookup_local@plt>

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

LLVM IR (-O2):
%struct.identifier_s = type { i32 }
%struct.symbol_table_s = type { i32 }
define %struct.identifier_s* @identifier_local_lookup(%struct.symbol_table_s* %0, i8* %1) {
%3 = tail call %struct.identifier_s* @symbol_lookup_local(%struct.symbol_table_s* %0, i8* %1)
ret %struct.identifier_s* %3
}
/* Variables and functions */
void pgtrace_clear_probe(void) {}


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

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

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

LLVM IR (-O2):
define void @pgtrace_clear_probe() {
ret void
}
/* Variables and functions */
int dep1();
int main(void) { return dep1() != 42; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <dep1@plt>
cmp    $0x2a,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <dep1@plt>
xor    %ecx,%ecx
cmp    $0x2a,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @dep1()
%3 = icmp ne i32 %2, 42
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @dep1()
%2 = icmp ne i32 %1, 42
%3 = zext i1 %2 to i32
ret i32 %3
}
void initialize_module() { return; }


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

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

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

LLVM IR (-O2):
define void @initialize_module() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncmp(char *, char *, int);
int req_logout(char *data) { return !strncmp(data, "commit=Logout", 32); }


x86 assembly (clang, -O0):
<req_logout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x20,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<req_logout>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x20,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"commit=Logout\00"
define i32 @req_logout(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strncmp(i8* %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 32)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@.str = [14 x i8] c"commit=Logout\00"
define i32 @req_logout(i8* %0) {
%2 = tail call i32 @strncmp(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 32)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int get_num_chapters(char ****book) {
  int i;
  for (i = 0; *(book + i) != '\0'; i++) {
  }
  return i;
}


x86 assembly (clang, -O0):
<get_num_chapters>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1135 <get_num_chapters+0x35>
jmp    1127 <get_num_chapters+0x27>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <get_num_chapters+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_num_chapters>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpq   $0x0,(%rdi)
lea    0x8(%rdi),%rdi
jne    1110 <get_num_chapters+0x10>
ret

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

LLVM IR (-O2):
define i32 @get_num_chapters(i8**** nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8***, i8**** %0, i64 %3
%5 = load i8***, i8**** %4
%6 = icmp eq i8*** %5, null
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ info(char *);
int /*<<< orphan*/ menu();
void dummy3(void) {
  info("Appel de la fonction 3\n");
  menu();
}


x86 assembly (clang, -O0):
<dummy3>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <info@plt>
mov    $0x0,%al
call   1030 <menu@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dummy3>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <info@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <menu@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Appel de la fonction 3\0A\00"
define void @dummy3() {
%1 = call i32 @info(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @menu()
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Appel de la fonction 3\0A\00"
define void @dummy3() {
%1 = tail call i32 @info(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @menu()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
size_t strlen(char const *);
char *iks_strcat(char *dest, const char *src) {
  size_t len;
  if (!src)
    return dest;
  len = strlen(src);
  memcpy(dest, src, len);
  dest[len] = '\0';
  return dest + len;
}


x86 assembly (clang, -O0):
<iks_strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1148 <iks_strcat+0x28>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    117e <iks_strcat+0x5e>
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iks_strcat>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
test   %rsi,%rsi
je     1151 <iks_strcat+0x31>
mov    %rsi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1040 <memcpy@plt>
movb   $0x0,(%rbx,%r15,1)
add    %r15,%rbx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @iks_strcat(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i64 @strlen(i8* %1)
%6 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %5)
%7 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 0, i8* %7
br label %8
8: ; preds = %2, %4
%9 = phi i8* [ %7, %4 ], [ %0, %2 ]
ret i8* %9
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
ssize_t write(int fd, const void *buf, size_t count) { return 0; }


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @write(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @write(i32 %0, i8* nocapture readnone %1, i64 %2) {
ret i32 0
}
/* Variables and functions */
int config_set_user_mbox_lock(char const *, int /*<<< orphan*/);
int config_unlock_mbox(const char *name) {
  return config_set_user_mbox_lock(name, 0);
}


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

x86 assembly (clang, -O2):
<config_unlock_mbox>:
xor    %esi,%esi
jmp    1030 <config_set_user_mbox_lock@plt>

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

LLVM IR (-O2):
define i32 @config_unlock_mbox(i8* %0) {
%2 = tail call i32 @config_set_user_mbox_lock(i8* %0, i32 0)
ret i32 %2
}
int demoA() {
  int i = 8;
  printf("%d\n", i);
  printf("%d\n", &i);
}


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

x86 assembly (clang, -O2):
<demoA>:
push   %rbx
sub    $0x10,%rsp
movl   $0x8,0xc(%rsp)
lea    0xedc(%rip),%rbx
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @demoA() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 8, i32* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
ret i32 undef
}
void enable_linux_fragmentation(int fd) {}


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

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

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

LLVM IR (-O2):
define void @enable_linux_fragmentation(i32 %0) {
ret void
}
void INT_Excep_SCI12_RXI12(void) {}


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

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

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

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