xunge/DecIR huggingface dataset:
/* Type definitions */
struct l_class_OC_DummyStream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _ZSt8_DestroyIPPiEvT_S2_(unsigned int **, unsigned int **);
void _ZSt8_DestroyIPPiS0_EvT_S2_RSaIT0_E(
    unsigned int **llvm_cbe___first, unsigned int **llvm_cbe___last,
    struct l_class_OC_DummyStream *llvm_cbe_tmp__33) {
  unsigned int **llvm_cbe___first_2e_addr;
  unsigned int **llvm_cbe___last_2e_addr;
  struct l_class_OC_DummyStream *llvm_cbe__2e_addr;
  unsigned int **llvm_cbe_tmp;
  unsigned int **llvm_cbe_tmp1;
  *(&llvm_cbe___first_2e_addr) = llvm_cbe___first;
  *(&llvm_cbe___last_2e_addr) = llvm_cbe___last;
  *(&llvm_cbe__2e_addr) = llvm_cbe_tmp__33;
  llvm_cbe_tmp = *(&llvm_cbe___first_2e_addr);
  llvm_cbe_tmp1 = *(&llvm_cbe___last_2e_addr);
  _ZSt8_DestroyIPPiEvT_S2_(llvm_cbe_tmp, llvm_cbe_tmp1);
  return;
}


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

x86 assembly (clang, -O2):
<_ZSt8_DestroyIPPiS0_EvT_S2_RSaIT0_E>:
jmp    1030 <_ZSt8_DestroyIPPiEvT_S2_@plt>

LLVM IR (-O0):
%struct.l_class_OC_DummyStream = type { i32 }
define void @_ZSt8_DestroyIPPiS0_EvT_S2_RSaIT0_E(i32** %0, i32** %1, %struct.l_class_OC_DummyStream* %2) {
%4 = alloca i32**
%5 = alloca i32**
%6 = alloca %struct.l_class_OC_DummyStream*
%7 = alloca i32**
%8 = alloca i32**
%9 = alloca %struct.l_class_OC_DummyStream*
%10 = alloca i32**
%11 = alloca i32**
store i32** %0, i32*** %4
store i32** %1, i32*** %5
store %struct.l_class_OC_DummyStream* %2, %struct.l_class_OC_DummyStream** %6
%12 = load i32**, i32*** %4
store i32** %12, i32*** %7
%13 = load i32**, i32*** %5
store i32** %13, i32*** %8
%14 = load %struct.l_class_OC_DummyStream*, %struct.l_class_OC_DummyStream** %6
store %struct.l_class_OC_DummyStream* %14, %struct.l_class_OC_DummyStream** %9
%15 = load i32**, i32*** %7
store i32** %15, i32*** %10
%16 = load i32**, i32*** %8
store i32** %16, i32*** %11
%17 = load i32**, i32*** %10
%18 = load i32**, i32*** %11
%19 = call i32 @_ZSt8_DestroyIPPiEvT_S2_(i32** %17, i32** %18)
ret void
}

LLVM IR (-O2):
%struct.l_class_OC_DummyStream = type { i32 }
define void @_ZSt8_DestroyIPPiS0_EvT_S2_RSaIT0_E(i32** %0, i32** %1, %struct.l_class_OC_DummyStream* nocapture readnone %2) {
%4 = tail call i32 @_ZSt8_DestroyIPPiEvT_S2_(i32** %0, i32** %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arm_int(int, int);
void arm_und() { arm_int(0x04, 0b11011); }


x86 assembly (clang, -O0):
<arm_und>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
mov    $0x1b,%esi
call   1030 <arm_int@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<arm_und>:
mov    $0x4,%edi
mov    $0x1b,%esi
jmp    1030 <arm_int@plt>

LLVM IR (-O0):
define void @arm_und() {
%1 = call i32 @arm_int(i32 4, i32 27)
ret void
}

LLVM IR (-O2):
define void @arm_und() {
%1 = tail call i32 @arm_int(i32 4, i32 27)
ret void
}
int main() {
  int data1 = 10;
  int data2 = 20;
  asm("imull %1, %0" : "=r"(data2) : "r"(data1), "0"(data2));
  printf("The result is %d\n", data2);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%eax
mov    $0x14,%esi
imul   %eax,%esi
lea    0xedb(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"The result is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 20, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 asm "imull $1, $0", "=r,r,0,~{dirflag},~{fpsr},~{flags}"(i32 %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"The result is %d\0A\00"
define i32 @main() {
%1 = tail call i32 asm "imull $1, $0", "=r,r,0,~{dirflag},~{fpsr},~{flags}"(i32 10, i32 20)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ smm_errno_update(int);
FILE *smm_fopen(char *path, char *mode) {
  FILE *fp;
  if ((fp = fopen(path, mode)) == NULL) {
    smm_errno_update((0xC0000000 | (13)));
  } else {
    smm_errno_update(0);
  }
  return fp;
}


x86 assembly (clang, -O0):
<smm_fopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    115a <smm_fopen+0x3a>
mov    $0xc000000d,%edi
call   1030 <smm_errno_update@plt>
jmp    1161 <smm_fopen+0x41>
xor    %edi,%edi
call   1030 <smm_errno_update@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smm_fopen>:
push   %rbx
call   1040 <fopen@plt>
mov    %rax,%rbx
xor    %eax,%eax
test   %rbx,%rbx
mov    $0xc000000d,%edi
cmovne %eax,%edi
call   1030 <smm_errno_update@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i32* @smm_fopen(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
%5 = select i1 %4, i32 -1073741811, i32 0
%6 = tail call i32 @smm_errno_update(i32 %5)
ret i32* %3
}
/* Variables and functions */
int EINVAL;
int check_result() { return EINVAL; }


x86 assembly (clang, -O0):
<check_result>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_result>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @check_result() {
%1 = load i32, i32* @EINVAL
ret i32 %1
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @check_result() {
%1 = load i32, i32* @EINVAL
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, int, char *);
int main(int argc, char *argv[]) {
  char tmp[128];
  char buf[32] = "Hello";
  sprintf(tmp, "%d %s", 4, buf);
  printf("%s\n", tmp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    0xeb4(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xeae(%rip),%rax
mov    %rax,-0x98(%rbp)
lea    -0x90(%rbp),%rdi
lea    -0xb0(%rbp),%rcx
lea    0xe9a(%rip),%rsi
mov    $0x4,%edx
call   1040 <sprintf@plt>
lea    -0x90(%rbp),%rsi
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xa0,%rsp
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeda(%rip),%rsi
lea    0x20(%rsp),%rbx
mov    %rsp,%rcx
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <sprintf@plt>
lea    0xec4(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.buf = [32 x i8] c"Hello\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [6 x i8] c"%d %s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [128 x i8]
%7 = alloca [32 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [32 x i8]* %7 to i8*
%9 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%10 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%11 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 4, i8* %10)
%12 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %12)
ret i32 0
}

LLVM IR (-O2):
@__const.main.buf = [32 x i8] c"Hello\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [6 x i8] c"%d %s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [128 x i8]
%4 = alloca [32 x i8]
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%7 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 4, i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret i32 0
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char small_letter, capital_letter;
  printf("Please enter a small letter: ");
  small_letter = getchar();
  capital_letter = small_letter - 32;
  printf("The capital letter is: %c\n", capital_letter);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
sub    $0x20,%eax
mov    %al,-0x6(%rbp)
movsbl -0x6(%rbp),%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0xe0,%al
movsbl %al,%esi
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Please enter a small letter: \00"
@.str.1 = [27 x i8] c"The capital letter is: %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = call signext i8 (...) @getchar()
store i8 %5, i8* %2
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = sub nsw i32 %7, 32
%9 = trunc i32 %8 to i8
store i8 %9, i8* %3
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Please enter a small letter: \00"
@.str.1 = [27 x i8] c"The capital letter is: %c\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = tail call signext i8 (...) @getchar()
%3 = add i8 %2, -32
%4 = sext i8 %3 to i32
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int send(int, char *, scalar_t__, int /*<<< orphan*/);
scalar_t__ strlen(char *);
int client_request(int sockfd, char *message) {
  int rc;
  int temp_f;
  float temp_c;
  rc = send(sockfd, message, strlen(message) + 1, 0);
  if (rc < 0) {
    perror("ERROR on send");
    exit(-1);
  }
  return rc;
}


x86 assembly (clang, -O0):
<client_request>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x2c(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
xor    %ecx,%ecx
call   1040 <send@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    119e <client_request+0x5e>
lea    0xe71(%rip),%rdi
call   1050 <perror@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<client_request>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %ecx,%ecx
call   1040 <send@plt>
test   %eax,%eax
js     116b <client_request+0x2b>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe8e(%rip),%rdi
call   1050 <perror@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"ERROR on send\00"
define i32 @client_request(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
store i32 %0, i32* %3
store i8* %1, i8** %4
%8 = load i32, i32* %3
%9 = load i8*, i8** %4
%10 = load i8*, i8** %4
%11 = call i64 @strlen(i8* %10)
%12 = add nsw i64 %11, 1
%13 = call i32 @send(i32 %8, i8* %9, i64 %12, i32 0)
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %2
%17 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @exit(i32 -1)
unreachable
19: ; preds = %2
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
@.str = [14 x i8] c"ERROR on send\00"
define i32 @client_request(i32 %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, 1
%5 = tail call i32 @send(i32 %0, i8* %1, i64 %4, i32 0)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 -1)
unreachable
10: ; preds = %2
ret i32 %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t EEPROMSizeGet(void) {
  return ((((((*((volatile uint32_t *)(0x400AF000)))) & 0x0000FFFF) >> 0) * 4));
}


x86 assembly (clang, -O0):
<EEPROMSizeGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400af000,%eax
mov    (%rax),%eax
and    $0xffff,%eax
sar    $0x0,%eax
shl    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EEPROMSizeGet>:
mov    0x400af000,%eax
movzwl %ax,%eax
shl    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @EEPROMSizeGet() {
%1 = load volatile i32, i32* inttoptr (i64 1074458624 to i32*)
%2 = and i32 %1, 65535
%3 = ashr i32 %2, 0
%4 = mul nsw i32 %3, 4
ret i32 %4
}

LLVM IR (-O2):
define i32 @EEPROMSizeGet() {
%1 = load volatile i32, i32* inttoptr (i64 1074458624 to i32*)
%2 = shl i32 %1, 2
%3 = and i32 %2, 262140
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x56() {
  Assert_real((iscntrl(86) == 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",
              435, ("iscntrl should be 0 for V"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x56>:
push   %rax
mov    $0x56,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1b3,%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 = [26 x i8] c"iscntrl should be 0 for V\00"
define void @t_iscntrl_0x56() {
%1 = call i64 @iscntrl(i32 86)
%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 435, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for V\00"
define void @t_iscntrl_0x56() {
%1 = tail call i64 @iscntrl(i32 86)
%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 435, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
float ANTweenTimingFunctionQuadIn(float, int /*<<< orphan*/, int, float);
float ANTweenProgressTimingFunctionQuadIn(float time, float duration) {
  return ANTweenTimingFunctionQuadIn(time, 0, 1, duration);
}


x86 assembly (clang, -O0):
<ANTweenProgressTimingFunctionQuadIn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <ANTweenTimingFunctionQuadIn@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define float @ANTweenProgressTimingFunctionQuadIn(float %0, float %1) {
%3 = tail call float @ANTweenTimingFunctionQuadIn(float %0, i32 0, i32 1, float %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ arm_memio_imm_op();
int /*<<< orphan*/ arm_memio_str(int /*<<< orphan*/);
void arm_str_imm() { arm_memio_str(arm_memio_imm_op()); }


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

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

LLVM IR (-O0):
define void @arm_str_imm() {
%1 = call i32 (...) @arm_memio_imm_op()
%2 = call i32 @arm_memio_str(i32 %1)
ret void
}

LLVM IR (-O2):
define void @arm_str_imm() {
%1 = tail call i32 (...) @arm_memio_imm_op()
%2 = tail call i32 @arm_memio_str(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ quickSort(int *, int /*<<< orphan*/, int);
void quickSortWrapper(int *arrptr, int arrlength) {
  quickSort(arrptr, 0, arrlength - 1);
}


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

x86 assembly (clang, -O2):
<quickSortWrapper>:
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <quickSort@plt>

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

LLVM IR (-O2):
define void @quickSortWrapper(i32* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @quickSort(i32* %0, i32 0, i32 %3)
ret void
}
int foo(int a) {
  int x = 0 % a++;
  return a;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() {
  printf("hello_world bla ddshvsh");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"hello_world bla ddshvsh\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"hello_world bla ddshvsh\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ rn_newString(char *);
int start_tag_open(int, int /*<<< orphan*/, int /*<<< orphan*/, int);
int drv_start_tag_open_recover(int p, char *suri, char *sname) {
  return start_tag_open(p, rn_newString(suri), rn_newString(sname), 1);
}


x86 assembly (clang, -O0):
<drv_start_tag_open_recover>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <rn_newString@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <rn_newString@plt>
mov    -0x20(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
mov    $0x1,%ecx
call   1030 <start_tag_open@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drv_start_tag_open_recover>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %edi,%r14d
mov    %rsi,%rdi
call   1040 <rn_newString@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <rn_newString@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %eax,%edx
mov    $0x1,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <start_tag_open@plt>

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

LLVM IR (-O2):
define i32 @drv_start_tag_open_recover(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @rn_newString(i8* %1)
%5 = tail call i32 @rn_newString(i8* %2)
%6 = tail call i32 @start_tag_open(i32 %0, i32 %4, i32 %5, i32 1)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void p_json_after() { printf("\n]\n"); }


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

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

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

LLVM IR (-O2):
@str = [3 x i8] c"\0A]\00"
define void @p_json_after() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timespec {
  unsigned int tv_sec;
  int /*<<< orphan*/ tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
scalar_t__ clock_nanosleep(int /*<<< orphan*/, int /*<<< orphan*/,
                           struct timespec *, int /*<<< orphan*/ *);
unsigned int sleep(unsigned int seconds) {
  struct timespec ts = {.tv_sec = seconds, .tv_nsec = 0};
  if (clock_nanosleep(CLOCK_REALTIME, 0, &ts, NULL) != 0)
    return seconds;
  return 0;
}


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
lea    -0x10(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <clock_nanosleep@plt>
cmp    $0x0,%rax
je     1155 <sleep+0x45>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115c <sleep+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %edi,(%rsp)
movl   $0x0,0x4(%rsp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
xor    %r14d,%r14d
mov    %rsp,%rdx
xor    %esi,%esi
xor    %ecx,%ecx
call   1030 <clock_nanosleep@plt>
test   %rax,%rax
cmove  %r14d,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
@CLOCK_REALTIME = global i32 0
define i32 @sleep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.timespec
store i32 %0, i32* %3
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
%6 = load i32, i32* %3
store i32 %6, i32* %5
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
store i32 0, i32* %7
%8 = load i32, i32* @CLOCK_REALTIME
%9 = call i64 @clock_nanosleep(i32 %8, i32 0, %struct.timespec* %4, i32* null)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = load i32, i32* %3
store i32 %12, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %11
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
@CLOCK_REALTIME = global i32 0
define i32 @sleep(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %0, i32* %4
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i32 0, i32* %5
%6 = load i32, i32* @CLOCK_REALTIME
%7 = call i64 @clock_nanosleep(i32 %6, i32 0, %struct.timespec* %2, i32* null)
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i32 0, i32 %0
ret i32 %9
}
/* Type definitions */
struct aiocb {
  int dummy;
};
typedef int /*<<< orphan*/ aio;

/* Variables and functions */
int aio_write(struct aiocb *);
int /*<<< orphan*/ memset(struct aiocb *, int /*<<< orphan*/, int);
int main(void) {
  struct aiocb aio;
  (void)memset(&aio, 0, sizeof(aio));
  return aio_write(&aio);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
lea    -0x8(%rbp),%rdi
call   1030 <aio_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    %rbx,%rdi
call   1030 <aio_write@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.aiocb = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.aiocb
store i32 0, i32* %1
%3 = call i32 @memset(%struct.aiocb* %2, i32 0, i32 4)
%4 = call i32 @aio_write(%struct.aiocb* %2)
ret i32 %4
}

LLVM IR (-O2):
%struct.aiocb = type { i32 }
define i32 @main() {
%1 = alloca %struct.aiocb
%2 = bitcast %struct.aiocb* %1 to i8*
%3 = call i32 @memset(%struct.aiocb* %1, i32 0, i32 4)
%4 = call i32 @aio_write(%struct.aiocb* %1)
ret i32 %4
}
/* Variables and functions */
int *g(int *);
int *f3(int *x) {
  switch (*x) {
  case 1:
    return g(x);
  }
  return g(x);
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
jne    1142 <f3+0x32>
jmp    1130 <f3+0x20>
mov    -0x10(%rbp),%rdi
call   1030 <g@plt>
mov    %rax,-0x8(%rbp)
jmp    114f <f3+0x3f>
mov    -0x10(%rbp),%rdi
call   1030 <g@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
jmp    1030 <g@plt>

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

LLVM IR (-O2):
define i32* @f3(i32* %0) {
%2 = tail call i32* @g(i32* %0)
ret i32* %2
}
/* Variables and functions */
int fib();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int n = 0, s = 0;
  while ((n = fib()) < 4000000)
    if (!(n & 1))
      s += n;
  printf("%d\n", s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <fib@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x3d0900,%eax
jge    116f <main+0x4f>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    116a <main+0x4a>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    113d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <fib@plt>
cmp    $0x3d08ff,%eax
jg     1155 <main+0x35>
xor    %ebp,%ebp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
test   $0x1,%al
cmovne %ebp,%eax
add    %eax,%ebx
xor    %eax,%eax
call   1040 <fib@plt>
cmp    $0x3d0900,%eax
jl     1140 <main+0x20>
lea    0xea4(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @fib()
%2 = icmp slt i32 %1, 4000000
br i1 %2, label %3, label %12
3: ; preds = %0, %3
%4 = phi i32 [ %10, %3 ], [ %1, %0 ]
%5 = phi i32 [ %9, %3 ], [ 0, %0 ]
%6 = and i32 %4, 1
%7 = icmp eq i32 %6, 0
%8 = select i1 %7, i32 %4, i32 0
%9 = add nsw i32 %8, %5
%10 = tail call i32 (...) @fib()
%11 = icmp slt i32 %10, 4000000
br i1 %11, label %3, label %12
12: ; preds = %3, %0
%13 = phi i32 [ 0, %0 ], [ %9, %3 ]
%14 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ emit_and(int, int, int);
void do_rhash(int rs, int rh) { emit_and(rs, rh, rh); }


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

x86 assembly (clang, -O2):
<do_rhash>:
mov    %esi,%edx
jmp    1030 <emit_and@plt>

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

LLVM IR (-O2):
define void @do_rhash(i32 %0, i32 %1) {
%3 = tail call i32 @emit_and(i32 %0, i32 %1, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usageServer() {
  printf("Usage Server :\n./print_demon -t tubeServer -c "
         "fichierConfiguration\n(L'ordre des options n'est pas important)\n");
}


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

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

LLVM IR (-O0):
@.str = [110 x i8] c"Usage Server :\0A./print_demon -t tubeServer -c fichierConfiguration\0A(L'ordre des options n'est pas important)\0A\00"
define void @usageServer() {
%1 = call i32 @printf(i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [109 x i8] c"Usage Server :\0A./print_demon -t tubeServer -c fichierConfiguration\0A(L'ordre des options n'est pas important)\00"
define void @usageServer() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([109 x i8], [109 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int rotr(int, int);
uint32_t gamma0(uint32_t x) { return rotr(x, 7) ^ rotr(x, 18) ^ (x >> 3); }


x86 assembly (clang, -O0):
<gamma0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x7,%esi
call   1030 <rotr@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x12,%esi
call   1030 <rotr@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x3,%ecx
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gamma0>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x7,%esi
call   1030 <rotr@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0x12,%esi
call   1030 <rotr@plt>
sar    $0x3,%ebx
xor    %ebp,%ebx
xor    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @gamma0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @rotr(i32 %3, i32 7)
%5 = load i32, i32* %2
%6 = call i32 @rotr(i32 %5, i32 18)
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = ashr i32 %8, 3
%10 = xor i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @gamma0(i32 %0) {
%2 = tail call i32 @rotr(i32 %0, i32 7)
%3 = tail call i32 @rotr(i32 %0, i32 18)
%4 = ashr i32 %0, 3
%5 = xor i32 %2, %4
%6 = xor i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int Factorial(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int num;
  num = Factorial(10);
  printf("%d\n", num);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1040 <Factorial@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @Factorial(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
scalar_t__ nrfx_usbd_errata_type_52840_eng_a();
bool nrfx_usbd_errata_154(void) {
  return (1 && nrfx_usbd_errata_type_52840_eng_a());
}


x86 assembly (clang, -O0):
<nrfx_usbd_errata_154>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <nrfx_usbd_errata_type_52840_eng_a@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrfx_usbd_errata_154>:
push   %rax
xor    %eax,%eax
call   1030 <nrfx_usbd_errata_type_52840_eng_a@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @nrfx_usbd_errata_154() {
%1 = call i64 (...) @nrfx_usbd_errata_type_52840_eng_a()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @nrfx_usbd_errata_154() {
%1 = tail call i64 (...) @nrfx_usbd_errata_type_52840_eng_a()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int findfib(int);
int /*<<< orphan*/ printf(char *, int);
int main() { printf("%d\n", findfib(10)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1040 <findfib@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1040 <findfib@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = call i32 @findfib(i32 10)
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @findfib(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
char *strcasestr(char const *, char *);
int main(void) {
  const char *big = "BigString";
  char *cp = strcasestr(big, "Gst");
  return cp != big + 2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcasestr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
add    $0x2,%rcx
cmp    %rcx,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xeeb(%rip),%rsi
call   1030 <strcasestr@plt>
lea    0xed7(%rip),%rdx
xor    %ecx,%ecx
cmp    %rdx,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"BigString\00"
@.str.1 = [4 x i8] c"Gst\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strcasestr(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 2
%9 = icmp ne i8* %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
@.str = [10 x i8] c"BigString\00"
@.str.1 = [4 x i8] c"Gst\00"
define i32 @main() {
%1 = tail call i8* @strcasestr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp ne i8* %1, getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 2)
%3 = zext i1 %2 to i32
ret i32 %3
}
void XtIsObject() {}


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

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

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

LLVM IR (-O2):
define void @XtIsObject() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ UnZipVersionLocal;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
char *GetUnZipLocalVersion(void) {
  static char UnZipVersionLocal[50];
  memset(UnZipVersionLocal, 0, sizeof(UnZipVersionLocal));
  sprintf(UnZipVersionLocal, "[%s %s]", "Mar 18 2022", "10:34:08");
  return UnZipVersionLocal;
}


x86 assembly (clang, -O0):
<GetUnZipLocalVersion>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f15(%rip),%rdi
xor    %esi,%esi
mov    $0x32,%edx
call   1030 <memset@plt>
lea    0x2f02(%rip),%rdi
lea    0xebb(%rip),%rsi
lea    0xebc(%rip),%rdx
lea    0xec1(%rip),%rcx
call   1040 <sprintf@plt>
lea    0x2ee1(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetUnZipLocalVersion>:
push   %rbx
lea    0x2f18(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x32,%edx
call   1030 <memset@plt>
lea    0xec2(%rip),%rsi
lea    0xec3(%rip),%rdx
lea    0xec8(%rip),%rcx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@GetUnZipLocalVersion.UnZipVersionLocal = internal global [50 x i8] zeroinitializer
@.str = [8 x i8] c"[%s %s]\00"
@.str.1 = [12 x i8] c"Mar 18 2022\00"
@.str.2 = [9 x i8] c"10:34:08\00"
define i8* @GetUnZipLocalVersion() {
%1 = call i32 @memset(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @GetUnZipLocalVersion.UnZipVersionLocal, i64 0, i64 0), i32 0, i32 50)
%2 = call i32 @sprintf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @GetUnZipLocalVersion.UnZipVersionLocal, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret i8* getelementptr inbounds ([50 x i8], [50 x i8]* @GetUnZipLocalVersion.UnZipVersionLocal, i64 0, i64 0)
}

LLVM IR (-O2):
@GetUnZipLocalVersion.UnZipVersionLocal = internal global [50 x i8] zeroinitializer
@.str = [8 x i8] c"[%s %s]\00"
@.str.1 = [12 x i8] c"Mar 18 2022\00"
@.str.2 = [9 x i8] c"10:34:08\00"
define i8* @GetUnZipLocalVersion() {
%1 = tail call i32 @memset(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @GetUnZipLocalVersion.UnZipVersionLocal, i64 0, i64 0), i32 0, i32 50)
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @GetUnZipLocalVersion.UnZipVersionLocal, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret i8* getelementptr inbounds ([50 x i8], [50 x i8]* @GetUnZipLocalVersion.UnZipVersionLocal, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ intervalTimer_stop(int /*<<< orphan*/);
void TimerHardware_StopTimer() { intervalTimer_stop(0); }


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

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

LLVM IR (-O0):
define void @TimerHardware_StopTimer() {
%1 = call i32 @intervalTimer_stop(i32 0)
ret void
}

LLVM IR (-O2):
define void @TimerHardware_StopTimer() {
%1 = tail call i32 @intervalTimer_stop(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("\n\n\n\n\n\n\n\n\nOlá Mundo, C!"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\0AOl\C3\A1 Mundo, C!\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\0AOl\C3\A1 Mundo, C!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int v2(int n) { return n * (n + 1) / 2; }


x86 assembly (clang, -O0):
<v2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<v2>:
lea    0x1(%rdi),%ecx
imul   %edi,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @v2(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = mul nsw i32 %2, %0
%4 = sdiv i32 %3, 2
ret i32 %4
}