xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  if (n % 5 == 0 && n % 7 == 0) {
    printf("True.\n");
  } else {
    printf("False.\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1178 <main+0x58>
mov    -0x8(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1178 <main+0x58>
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
jmp    1184 <main+0x64>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    %ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
imul   $0xffffffff92492493,%rax,%rdx
shr    $0x20,%rdx
add    %eax,%edx
mov    %edx,%esi
shr    $0x1f,%esi
sar    $0x2,%edx
add    %esi,%edx
lea    0x0(,%rdx,8),%esi
sub    %esi,%edx
add    %eax,%edx
sub    %ecx,%eax
or     %eax,%edx
lea    0xe8d(%rip),%rax
lea    0xe7f(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"True.\0A\00"
@.str.2 = [8 x i8] c"False.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = srem i32 %4, 5
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %0
%8 = load i32, i32* %2
%9 = srem i32 %8, 7
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %15
13: ; preds = %7, %0
%14 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %13, %11
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [7 x i8] c"False.\00"
@str.3 = [6 x i8] c"True.\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = srem i32 %4, 5
%6 = srem i32 %4, 7
%7 = or i32 %5, %6
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0)
%10 = call i32 @puts(i8* dereferenceable(1) %9)
ret i32 0
}
/* Variables and functions */
int bar(int, int);
int main(int argc, char **argv) { return bar(argc + 1, argc - 1); }


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

x86 assembly (clang, -O2):
<main>:
lea    0x1(%rdi),%eax
lea    -0x1(%rdi),%esi
mov    %eax,%edi
jmp    1030 <bar@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = add nsw i32 %0, 1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @bar(i32 %3, i32 %4)
ret i32 %5
}
void replacerandomnumber_fn(char *p) {
  for (; *p; ++p) {
    if (*p > 47 && *p < 58)
      *p = 48;
  }
}


x86 assembly (clang, -O0):
<replacerandomnumber_fn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1152 <replacerandomnumber_fn+0x52>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jle    113c <replacerandomnumber_fn+0x3c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jge    113c <replacerandomnumber_fn+0x3c>
mov    -0x8(%rbp),%rax
movb   $0x30,(%rax)
jmp    1141 <replacerandomnumber_fn+0x41>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <replacerandomnumber_fn+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<replacerandomnumber_fn>:
mov    (%rdi),%al
test   %al,%al
je     1127 <replacerandomnumber_fn+0x27>
add    $0x1,%rdi
jmp    111b <replacerandomnumber_fn+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     1127 <replacerandomnumber_fn+0x27>
add    $0xd0,%al
cmp    $0x9,%al
ja     1110 <replacerandomnumber_fn+0x10>
movb   $0x30,-0x1(%rdi)
jmp    1110 <replacerandomnumber_fn+0x10>
ret

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

LLVM IR (-O2):
define void @replacerandomnumber_fn(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %10
%5 = phi i8 [ %12, %10 ], [ %2, %1 ]
%6 = phi i8* [ %11, %10 ], [ %0, %1 ]
%7 = add i8 %5, -48
%8 = icmp ult i8 %7, 10
br i1 %8, label %9, label %10
9: ; preds = %4
store i8 48, i8* %6
br label %10
10: ; preds = %4, %9
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %10, %1
ret void
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __list_del_entry(struct list_head *);
int /*<<< orphan*/ list_add_tail(struct list_head *, struct list_head *);
void list_move(struct list_head *list, struct list_head *head) {
  __list_del_entry(list);
  list_add_tail(list, head);
}


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

x86 assembly (clang, -O2):
<list_move>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <__list_del_entry@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <list_add_tail@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_move(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = call i32 @__list_del_entry(%struct.list_head* %5)
%7 = load %struct.list_head*, %struct.list_head** %3
%8 = load %struct.list_head*, %struct.list_head** %4
%9 = call i32 @list_add_tail(%struct.list_head* %7, %struct.list_head* %8)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_move(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @__list_del_entry(%struct.list_head* %0)
%4 = tail call i32 @list_add_tail(%struct.list_head* %0, %struct.list_head* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void decode_char(void *udata, int codepoint) {
  printf("codepoint: %d\n", codepoint);
}


x86 assembly (clang, -O0):
<decode_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"codepoint: %d\0A\00"
define void @decode_char(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Type definitions */
typedef int int16_t;

/* Variables and functions */
int16_t bigEndian16(unsigned char b0, unsigned char b1) {
  return ((int16_t)b0 << 8) | (int16_t)b1;
}


x86 assembly (clang, -O0):
<bigEndian16>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bigEndian16>:
shl    $0x8,%edi
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @bigEndian16(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
%10 = or i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @bigEndian16(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = zext i8 %1 to i32
%6 = or i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ runTestBitwise();
int /*<<< orphan*/ runTestShiftArithmetic();
int /*<<< orphan*/ runTestShiftLogical();
int main(int argc, const char *argv[]) {
  printf("Bitwise Operations\n");
  runTestBitwise();
  printf("Logical Shift Operations\n");
  runTestShiftLogical();
  printf("Arithmetic Shift Operations\n");
  runTestShiftArithmetic();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <runTestBitwise@plt>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <runTestShiftLogical@plt>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <runTestShiftArithmetic@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <runTestBitwise@plt>
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <runTestShiftLogical@plt>
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <runTestShiftArithmetic@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Bitwise Operations\0A\00"
@.str.1 = [26 x i8] c"Logical Shift Operations\0A\00"
@.str.2 = [29 x i8] c"Arithmetic Shift Operations\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @runTestBitwise()
%8 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (...) @runTestShiftLogical()
%10 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (...) @runTestShiftArithmetic()
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"Bitwise Operations\00"
@str.3 = [25 x i8] c"Logical Shift Operations\00"
@str.4 = [28 x i8] c"Arithmetic Shift Operations\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @runTestBitwise()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.3, i64 0, i64 0))
%6 = tail call i32 (...) @runTestShiftLogical()
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.4, i64 0, i64 0))
%8 = tail call i32 (...) @runTestShiftArithmetic()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SYS_statx;
int syscall(int /*<<< orphan*/, int, char const *, int, unsigned int, void *);
int sys_statx(int dirfd, const char *pathname, int flags, unsigned int mask,
              void *stx) {
  return syscall(SYS_statx, dirfd, pathname, flags, mask, stx);
}


x86 assembly (clang, -O0):
<sys_statx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x20(%rbp),%r9
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_statx>:
mov    %r8,%r9
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@SYS_statx = global i32 0
define i32 @sys_statx(i32 %0, i8* %1, i32 %2, i32 %3, i8* %4) {
%6 = load i32, i32* @SYS_statx
%7 = tail call i32 @syscall(i32 %6, i32 %0, i8* %1, i32 %2, i32 %3, i8* %4)
ret i32 %7
}
/* Variables and functions */
int fype_run(int, char **);
int main(int i_argc, char **pc_argv) { return (fype_run(i_argc, pc_argv)); }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @fype_run(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x94() {
  Assert_real((ispunct(148) == 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_ispunct.c",
              745, ("ispunct should be 0 for 0x94"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x94>:
push   %rax
mov    $0x94,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2e9,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x94\00"
define void @t_ispunct_0x94() {
%1 = call i64 @ispunct(i32 148)
%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 745, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x94\00"
define void @t_ispunct_0x94() {
%1 = tail call i64 @ispunct(i32 148)
%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 745, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct cxl_ioctl_start_work {
  int /*<<< orphan*/ work_element_descriptor;
};
typedef int /*<<< orphan*/ __u64;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int cxl_work_set_wed(struct cxl_ioctl_start_work *work, __u64 wed) {
  if (work == NULL) {
    errno = EINVAL;
    return -1;
  }
  work->work_element_descriptor = wed;
  return 0;
}


x86 assembly (clang, -O0):
<cxl_work_set_wed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <cxl_work_set_wed+0x34>
mov    0x2ebb(%rip),%rax
mov    (%rax),%ecx
mov    0x2eba(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    1144 <cxl_work_set_wed+0x44>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cxl_work_set_wed>:
test   %rdi,%rdi
je     110a <cxl_work_set_wed+0xa>
mov    %esi,(%rdi)
xor    %eax,%eax
ret
mov    0x2ec7(%rip),%rax
mov    (%rax),%eax
mov    0x2ec6(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
%struct.cxl_ioctl_start_work = type { i32 }
@EINVAL = global i32 0
@errno = global i32 0
define i32 @cxl_work_set_wed(%struct.cxl_ioctl_start_work* writeonly %0, i32 %1) {
%3 = icmp eq %struct.cxl_ioctl_start_work* %0, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = load i32, i32* @EINVAL
store i32 %5, i32* @errno
br label %8
6: ; preds = %2
%7 = getelementptr inbounds %struct.cxl_ioctl_start_work, %struct.cxl_ioctl_start_work* %0, i64 0, i32 0
store i32 %1, i32* %7
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ -1, %4 ], [ 0, %6 ]
ret i32 %9
}
extern int sum(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<sum>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @sum(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @sum(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
void gtk_text_iter_get_tags() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_get_tags() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_int(char);
int /*<<< orphan*/ print_string(char *);
void main(void) {
  char x, y, z;
  x = 'A';
  y = 'B';
  z = 'C';
  print_int(x);
  print_string("\n");
  print_int(y);
  print_string("\n");
  print_int(z);
  print_string("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x41,-0x1(%rbp)
movb   $0x42,-0x2(%rbp)
movb   $0x43,-0x3(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <print_int@plt>
lea    0xebc(%rip),%rdi
call   1030 <print_string@plt>
movsbl -0x2(%rbp),%edi
call   1040 <print_int@plt>
lea    0xea7(%rip),%rdi
call   1030 <print_string@plt>
movsbl -0x3(%rbp),%edi
call   1040 <print_int@plt>
lea    0xe92(%rip),%rdi
call   1030 <print_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x41,%edi
call   1040 <print_int@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
call   1030 <print_string@plt>
mov    $0x42,%edi
call   1040 <print_int@plt>
mov    %rbx,%rdi
call   1030 <print_string@plt>
mov    $0x43,%edi
call   1040 <print_int@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <print_string@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
store i8 65, i8* %1
store i8 66, i8* %2
store i8 67, i8* %3
%4 = load i8, i8* %1
%5 = call i32 @print_int(i8 signext %4)
%6 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = load i8, i8* %2
%8 = call i32 @print_int(i8 signext %7)
%9 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = load i8, i8* %3
%11 = call i32 @print_int(i8 signext %10)
%12 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @main() {
%1 = tail call i32 @print_int(i8 signext 65)
%2 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @print_int(i8 signext 66)
%4 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @print_int(i8 signext 67)
%6 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_51(uint64_t x) {
  __asm__("rolq $51, %0" : "=r"(x) : "0"(x));
  return x;
}


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

x86 assembly (clang, -O2):
<ROL64_51>:
mov    %rdi,%rax
rol    $0x33,%rax
ret

LLVM IR (-O0):
define i8* @ROL64_51(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$51, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_51(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$51, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Variables and functions */
size_t strlen(char *);
size_t my_strlen(char *str) {
  if (str == NULL) {
    return 0;
  }
  return strlen(str);
}


x86 assembly (clang, -O0):
<my_strlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <my_strlen+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1141 <my_strlen+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @my_strlen(i8* %0) {
%2 = alloca i64
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 0, i64* %2
br label %10
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i64 @strlen(i8* %8)
store i64 %9, i64* %2
br label %10
10: ; preds = %7, %6
%11 = load i64, i64* %2
ret i64 %11
}

LLVM IR (-O2):
define i64 @my_strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i64 [ %4, %3 ], [ 0, %1 ]
ret i64 %6
}
/* Variables and functions */
unsigned int getParameter(unsigned int, int /*<<< orphan*/);
unsigned int sleepCurrentProc(unsigned int, unsigned int, unsigned int,
                              unsigned int);
unsigned int wrapper_sleepCurrentProc(unsigned int pc, unsigned int sp,
                                      unsigned int spsr) {
  unsigned int tics = getParameter(sp, 0);
  return sleepCurrentProc(pc, sp, spsr, tics);
}


x86 assembly (clang, -O0):
<wrapper_sleepCurrentProc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1040 <getParameter@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <sleepCurrentProc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrapper_sleepCurrentProc>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    %esi,%edi
xor    %esi,%esi
call   1040 <getParameter@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <sleepCurrentProc@plt>

LLVM IR (-O0):
define i32 @wrapper_sleepCurrentProc(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = call i32 @getParameter(i32 %8, i32 0)
store i32 %9, i32* %7
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = call i32 @sleepCurrentProc(i32 %10, i32 %11, i32 %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @wrapper_sleepCurrentProc(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @getParameter(i32 %1, i32 0)
%5 = tail call i32 @sleepCurrentProc(i32 %0, i32 %1, i32 %2, i32 %4)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ p;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(void **, int, int, int /*<<< orphan*/ *);
int defaultDeserializer(FILE *f, void **payload) {
  void *p;
  fread(&p, sizeof(p), 1, f);
  *payload = p;
  return 0;
}


x86 assembly (clang, -O0):
<defaultDeserializer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0x18(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<defaultDeserializer>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,%rcx
lea    0x8(%rsp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    0x8(%rsp),%rax
mov    %rax,(%rbx)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @defaultDeserializer(i32* nocapture %0, i8** nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i32 @fread(i8** %3, i32 8, i32 1, i32* %0)
%6 = load i8*, i8** %3
store i8* %6, i8** %1
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int8_t stdlib_ndarray_set_ptr_float64(uint8_t *idx, const double v) {
  *(double *)idx = v;
  return 0;
}


x86 assembly (clang, -O0):
<stdlib_ndarray_set_ptr_float64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_ndarray_set_ptr_float64>:
movsd  %xmm0,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @stdlib_ndarray_set_ptr_float64(i32* nocapture writeonly %0, double %1) {
%3 = bitcast i32* %0 to double*
store double %1, double* %3
ret i32 0
}
/* Variables and functions */
int main() { return 0; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-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 0, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void ipv6_netfilter_fini(void) { return; }


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

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

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

LLVM IR (-O2):
define void @ipv6_netfilter_fini() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BUFSIZ;
int /*<<< orphan*/ _IONBF;
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/, int /*<<< orphan*/ *,
                           int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int __gdb_set_unbuffered_output(void) {
  setvbuf(stdout, NULL, _IONBF, BUFSIZ);
  setvbuf(stderr, NULL, _IONBF, BUFSIZ);
}


x86 assembly (clang, -O0):
<__gdb_set_unbuffered_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%edx
mov    0x2e9f(%rip),%rax
mov    (%rax),%ecx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setvbuf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%edx
mov    0x2e7b(%rip),%rax
mov    (%rax),%ecx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setvbuf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__gdb_set_unbuffered_output>:
push   %r14
push   %rbx
push   %rax
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    0x2ec4(%rip),%r14
mov    (%r14),%edx
mov    0x2ea2(%rip),%rbx
mov    (%rbx),%ecx
xor    %esi,%esi
call   1030 <setvbuf@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
mov    (%r14),%edx
mov    (%rbx),%ecx
xor    %esi,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <setvbuf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@_IONBF = global i32 0
@BUFSIZ = global i32 0
@stderr = global i32 0
define i32 @__gdb_set_unbuffered_output() {
%1 = alloca i32
%2 = load i32, i32* @stdout
%3 = load i32, i32* @_IONBF
%4 = load i32, i32* @BUFSIZ
%5 = call i32 @setvbuf(i32 %2, i32* null, i32 %3, i32 %4)
%6 = load i32, i32* @stderr
%7 = load i32, i32* @_IONBF
%8 = load i32, i32* @BUFSIZ
%9 = call i32 @setvbuf(i32 %6, i32* null, i32 %7, i32 %8)
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@stdout = global i32 0
@_IONBF = global i32 0
@BUFSIZ = global i32 0
@stderr = global i32 0
define i32 @__gdb_set_unbuffered_output() {
%1 = load i32, i32* @stdout
%2 = load i32, i32* @_IONBF
%3 = load i32, i32* @BUFSIZ
%4 = tail call i32 @setvbuf(i32 %1, i32* null, i32 %2, i32 %3)
%5 = load i32, i32* @stderr
%6 = load i32, i32* @_IONBF
%7 = load i32, i32* @BUFSIZ
%8 = tail call i32 @setvbuf(i32 %5, i32* null, i32 %6, i32 %7)
ret i32 undef
}
extern double subtract(double a, double b) { return a - b; }


x86 assembly (clang, -O0):
<subtract>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<subtract>:
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @subtract(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @subtract(double %0, double %1) {
%3 = fsub double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
extern void my_func(int my_param) { printf("%d\n", my_param); }


x86 assembly (clang, -O0):
<my_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @my_func(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execerror(char *, char *);
fpecatch() { execerror("floating point exception", (char *)0); }


x86 assembly (clang, -O0):
<fpecatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <execerror@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fpecatch>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
jmp    1030 <execerror@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"floating point exception\00"
define i32 @fpecatch() {
%1 = alloca i32
%2 = call i32 @execerror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* null)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [25 x i8] c"floating point exception\00"
define i32 @fpecatch() {
%1 = tail call i32 @execerror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* null)
ret i32 undef
}
char *strcat(char *dst, const char *src) {
  while (*dst)
    dst++;
  while (*src) {
    *dst++ = *src++;
  }
  *dst = 0;
  return 0;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     112a <strcat+0x2a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <strcat+0xc>
jmp    112f <strcat+0x2f>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1163 <strcat+0x63>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    112f <strcat+0x2f>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rcx
add    $0x1,%rdi
cmpb   $0x0,(%rcx)
jne    1100 <strcat>
mov    (%rsi),%al
test   %al,%al
je     1136 <strcat+0x36>
mov    $0xffffffffffffffff,%rcx
nopl   0x0(%rax)
mov    %al,(%rdi,%rcx,1)
movzbl 0x2(%rsi,%rcx,1),%eax
add    $0x1,%rcx
test   %al,%al
jne    1120 <strcat+0x20>
add    %rcx,%rdi
mov    %rdi,%rcx
movb   $0x0,(%rcx)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define noalias i8* @strcat(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = load i8, i8* %1
%10 = icmp eq i8 %9, 0
br i1 %10, label %19, label %11
11: ; preds = %8, %11
%12 = phi i8 [ %17, %11 ], [ %9, %8 ]
%13 = phi i8* [ %15, %11 ], [ %1, %8 ]
%14 = phi i8* [ %16, %11 ], [ %4, %8 ]
%15 = getelementptr inbounds i8, i8* %13, i64 1
%16 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %12, i8* %14
%17 = load i8, i8* %15
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %11
19: ; preds = %11, %8
%20 = phi i8* [ %4, %8 ], [ %16, %11 ]
store i8 0, i8* %20
ret i8* null
}
int second(char *x) {
  asm("second_label: .globl second_label");
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @second(i8* nocapture readnone %0) {
tail call void asm sideeffect "second_label: .globl second_label", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}
int days(const long long s[], int n) {
  long long k = 1;
  int d = 0;
  for (d = 0; k < n; ++d)
    k += s[k];
  return d;
}


x86 assembly (clang, -O0):
<days>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x1,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmp    %rcx,%rax
jge    1154 <days+0x54>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1121 <days+0x21>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<days>:
xor    %eax,%eax
cmp    $0x2,%esi
jl     112c <days+0x2c>
movslq %esi,%rcx
mov    $0x1,%edx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    (%rdi,%rdx,8),%rdx
add    $0x1,%eax
cmp    %rcx,%rdx
jl     1120 <days+0x20>
ret

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

LLVM IR (-O2):
define i32 @days(i64* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = icmp sgt i32 %1, 1
br i1 %4, label %5, label %13
5: ; preds = %2, %5
%6 = phi i32 [ %11, %5 ], [ 0, %2 ]
%7 = phi i64 [ %10, %5 ], [ 1, %2 ]
%8 = getelementptr inbounds i64, i64* %0, i64 %7
%9 = load i64, i64* %8
%10 = add nsw i64 %9, %7
%11 = add nuw nsw i32 %6, 1
%12 = icmp slt i64 %10, %3
br i1 %12, label %5, label %13
13: ; preds = %5, %2
%14 = phi i32 [ 0, %2 ], [ %11, %5 ]
ret i32 %14
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ exit(int);
scalar_t__ mkdir(char const *, int);
int /*<<< orphan*/ printf(char *, char const *, char *);
char *strerror(int);
void mkdir_or_die(const char *path) {
  if (mkdir(path, 0777) < 0) {
    int err = errno;
    printf("mkdir(%s) failed: %s\n", path, strerror(err));
    exit(1);
  }
}


x86 assembly (clang, -O0):
<mkdir_or_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
cmp    $0x0,%rax
jge    119d <mkdir_or_die+0x5d>
mov    0x2e75(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1060 <strerror@plt>
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
lea    0xe72(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkdir_or_die>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
test   %rax,%rax
js     1155 <mkdir_or_die+0x15>
pop    %rbx
ret
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
lea    0xe96(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@errno = global i32 0
@.str = [22 x i8] c"mkdir(%s) failed: %s\0A\00"
define void @mkdir_or_die(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @mkdir(i8* %4, i32 511)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %1
%8 = load i32, i32* @errno
store i32 %8, i32* %3
%9 = load i8*, i8** %2
%10 = load i32, i32* %3
%11 = call i8* @strerror(i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %11)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %1
ret void
}

LLVM IR (-O2):
@errno = global i32 0
@.str = [22 x i8] c"mkdir(%s) failed: %s\0A\00"
define void @mkdir_or_die(i8* %0) {
%2 = tail call i64 @mkdir(i8* %0, i32 511)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @errno
%6 = tail call i8* @strerror(i32 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %6)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int pthread_mutex_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
void lock(pthread_mutex_t *lock) {
  int err;
  if (0 != (err = pthread_mutex_lock(lock))) {
    fprintf(stderr, "Got error %d from pthread_mutex_lock.\n", err);
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <pthread_mutex_lock@plt>
mov    %eax,%ecx
mov    %ecx,-0xc(%rbp)
xor    %eax,%eax
cmp    %ecx,%eax
je     1176 <lock+0x46>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
lea    0xe99(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lock>:
push   %rax
call   1050 <pthread_mutex_lock@plt>
test   %eax,%eax
jne    113c <lock+0xc>
pop    %rax
ret
mov    0x2e9d(%rip),%rcx
mov    (%rcx),%edi
lea    0xeb4(%rip),%rsi
mov    %eax,%edx
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"Got error %d from pthread_mutex_lock.\0A\00"
define void @lock(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @pthread_mutex_lock(i32* %4)
store i32 %5, i32* %3
%6 = icmp ne i32 0, %5
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = load i32, i32* %3
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = call i32 @exit(i32 -1)
unreachable
12: ; preds = %1
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"Got error %d from pthread_mutex_lock.\0A\00"
define void @lock(i32* %0) {
%2 = tail call i32 @pthread_mutex_lock(i32* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %2)
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %1
ret void
}
__attribute__((no, noclone)) unsigned __int128 t101_1add(unsigned char x,
                                                         unsigned char y) {
  unsigned __int128 r;
  if (__builtin_add_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t101_1add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x11(%rbp)
mov    %al,-0x12(%rbp)
movzbl -0x11(%rbp),%eax
mov    %eax,%ecx
movzbl -0x12(%rbp),%eax
add    %rax,%rcx
xor    %eax,%eax
mov    %rcx,-0x30(%rbp)
movq   $0x0,-0x28(%rbp)
test   $0x1,%al
jne    114c <t101_1add+0x3c>
jmp    1153 <t101_1add+0x43>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t101_1add>:
mov    %edi,%ecx
mov    %esi,%eax
add    %rcx,%rax
xor    %edx,%edx
ret

LLVM IR (-O0):
define { i64, i64 } @t101_1add(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i128
%4 = alloca i8
%5 = alloca i8
%6 = alloca i128
store i8 %0, i8* %4
store i8 %1, i8* %5
%7 = load i8, i8* %4
%8 = load i8, i8* %5
%9 = zext i8 %7 to i128
%10 = zext i8 %8 to i128
%11 = call { i128, i1 } @llvm.uadd.with.overflow.i128(i128 %9, i128 %10)
%12 = extractvalue { i128, i1 } %11, 1
%13 = extractvalue { i128, i1 } %11, 0
store i128 %13, i128* %6
br i1 %12, label %14, label %16
14: ; preds = %2
%15 = call i32 (...) @bar()
br label %16
16: ; preds = %14, %2
%17 = load i128, i128* %6
store i128 %17, i128* %3
%18 = bitcast i128* %3 to { i64, i64 }*
%19 = load { i64, i64 }, { i64, i64 }* %18
ret { i64, i64 } %19
}

LLVM IR (-O2):
define { i64, i64 } @t101_1add(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i64
%4 = zext i8 %1 to i64
%5 = add nuw nsw i64 %4, %3
%6 = insertvalue { i64, i64 } poison, i64 %5, 0
%7 = insertvalue { i64, i64 } %6, i64 0, 1
ret { i64, i64 } %7
}