xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ unload_device_tree(char *);
void uart_cleanup(void) {
  unload_device_tree("ADAFRUIT-UART1");
  unload_device_tree("ADAFRUIT-UART2");
  unload_device_tree("ADAFRUIT-UART3");
  unload_device_tree("ADAFRUIT-UART4");
  unload_device_tree("ADAFRUIT-UART5");
}


x86 assembly (clang, -O0):
<uart_cleanup>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <unload_device_tree@plt>
lea    0xee8(%rip),%rdi
call   1030 <unload_device_tree@plt>
lea    0xeeb(%rip),%rdi
call   1030 <unload_device_tree@plt>
lea    0xeee(%rip),%rdi
call   1030 <unload_device_tree@plt>
lea    0xef1(%rip),%rdi
call   1030 <unload_device_tree@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_cleanup>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <unload_device_tree@plt>
lea    0xeeb(%rip),%rdi
call   1030 <unload_device_tree@plt>
lea    0xeee(%rip),%rdi
call   1030 <unload_device_tree@plt>
lea    0xef1(%rip),%rdi
call   1030 <unload_device_tree@plt>
lea    0xef4(%rip),%rdi
pop    %rax
jmp    1030 <unload_device_tree@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"ADAFRUIT-UART1\00"
@.str.1 = [15 x i8] c"ADAFRUIT-UART2\00"
@.str.2 = [15 x i8] c"ADAFRUIT-UART3\00"
@.str.3 = [15 x i8] c"ADAFRUIT-UART4\00"
@.str.4 = [15 x i8] c"ADAFRUIT-UART5\00"
define void @uart_cleanup() {
%1 = call i32 @unload_device_tree(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @unload_device_tree(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @unload_device_tree(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @unload_device_tree(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @unload_device_tree(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"ADAFRUIT-UART1\00"
@.str.1 = [15 x i8] c"ADAFRUIT-UART2\00"
@.str.2 = [15 x i8] c"ADAFRUIT-UART3\00"
@.str.3 = [15 x i8] c"ADAFRUIT-UART4\00"
@.str.4 = [15 x i8] c"ADAFRUIT-UART5\00"
define void @uart_cleanup() {
%1 = tail call i32 @unload_device_tree(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @unload_device_tree(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @unload_device_tree(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @unload_device_tree(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @unload_device_tree(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Do not have a file layout like this in your own projects.\n");
  printf("This is only to test that this works.\n");
  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>
lea    0xf09(%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 <puts@plt>
lea    0xf16(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [59 x i8] c"Do not have a file layout like this in your own projects.\0A\00"
@.str.1 = [39 x i8] c"This is only to test that this works.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [58 x i8] c"Do not have a file layout like this in your own projects.\00"
@str.2 = [38 x i8] c"This is only to test that this works.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_read_quaddobl_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(380, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_read_quaddobl_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x17c,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_read_quaddobl_system>:
mov    $0x17c,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @syscon_read_quaddobl_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 380, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @syscon_read_quaddobl_system() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 380, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
void gtk_text_iter_is_start() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_is_start() {
ret void
}
/* Variables and functions */
int port_inb(int);
int /*<<< orphan*/ port_outb(int, int);
void rled_on(void) { port_outb((2), port_inb((2)) | (1 << 0)); }


x86 assembly (clang, -O0):
<rled_on>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <port_inb@plt>
mov    %eax,%esi
or     $0x1,%esi
mov    $0x2,%edi
call   1040 <port_outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rled_on>:
push   %rax
mov    $0x2,%edi
call   1030 <port_inb@plt>
or     $0x1,%eax
mov    $0x2,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <port_outb@plt>

LLVM IR (-O0):
define void @rled_on() {
%1 = call i32 @port_inb(i32 2)
%2 = or i32 %1, 1
%3 = call i32 @port_outb(i32 2, i32 %2)
ret void
}

LLVM IR (-O2):
define void @rled_on() {
%1 = tail call i32 @port_inb(i32 2)
%2 = or i32 %1, 1
%3 = tail call i32 @port_outb(i32 2, i32 %2)
ret void
}
int is_whitespace(char c) { return ((c) == ' ') || ((c) == '\t'); }


x86 assembly (clang, -O0):
<is_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     1129 <is_whitespace+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_whitespace>:
cmp    $0x20,%dil
sete   %al
cmp    $0x9,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @is_whitespace(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = icmp eq i8 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct gengetopt_args_info {
  int dummy;
};

/* Variables and functions */
int imagetag_cmdline2(int, char **, struct gengetopt_args_info *,
                      int /*<<< orphan*/, int, int);
int imagetag_cmdline(int argc, char **argv,
                     struct gengetopt_args_info *args_info) {
  return imagetag_cmdline2(argc, argv, args_info, 0, 1, 1);
}


x86 assembly (clang, -O0):
<imagetag_cmdline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1030 <imagetag_cmdline2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imagetag_cmdline>:
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
jmp    1030 <imagetag_cmdline2@plt>

LLVM IR (-O0):
%struct.gengetopt_args_info = type { i32 }
define i32 @imagetag_cmdline(i32 %0, i8** %1, %struct.gengetopt_args_info* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.gengetopt_args_info*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store %struct.gengetopt_args_info* %2, %struct.gengetopt_args_info** %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load %struct.gengetopt_args_info*, %struct.gengetopt_args_info** %6
%10 = call i32 @imagetag_cmdline2(i32 %7, i8** %8, %struct.gengetopt_args_info* %9, i32 0, i32 1, i32 1)
ret i32 %10
}

LLVM IR (-O2):
%struct.gengetopt_args_info = type { i32 }
define i32 @imagetag_cmdline(i32 %0, i8** %1, %struct.gengetopt_args_info* %2) {
%4 = tail call i32 @imagetag_cmdline2(i32 %0, i8** %1, %struct.gengetopt_args_info* %2, i32 0, i32 1, i32 1)
ret i32 %4
}
int ft_is_digit(int c) {
  if (c >= '0' && c <= '9')
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_is_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1127 <ft_is_digit+0x27>
cmpl   $0x39,-0x8(%rbp)
jg     1127 <ft_is_digit+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <ft_is_digit+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_is_digit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_is_digit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 57
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %11
10: ; preds = %6, %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @ft_is_digit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void Usage(char *prog_name) {
  fprintf(stderr, "usage: %s <thread_count>\n", prog_name);
  fprintf(stderr, "   thread_count should be positive\n");
  exit(0);
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Usage>:
push   %rbx
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rbx
mov    (%rbx),%edi
lea    0xecc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed6(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"usage: %s <thread_count>\0A\00"
@.str.1 = [36 x i8] c" thread_count should be positive\0A\00"
define void @Usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"usage: %s <thread_count>\0A\00"
@.str.1 = [36 x i8] c" thread_count should be positive\0A\00"
define void @Usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int Section2First(int);
int Section2Fourth(int);
int Section2Second(int);
int Section2Third(int);
int /*<<< orphan*/ printf(char *, int, int, int, int);
int Section2(int number) {
  printf("\n2.- | %d | %d | %d | %d |", Section2First(number),
         Section2Second(number), Section2Third(number), Section2Fourth(number));
  return 0;
}


x86 assembly (clang, -O0):
<Section2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <Section2First@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <Section2Second@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1070 <Section2Third@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <Section2Fourth@plt>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    %eax,%r8d
lea    0xe69(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Section2>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
call   1060 <Section2First@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1050 <Section2Second@plt>
mov    %eax,%r15d
mov    %ebx,%edi
call   1070 <Section2Third@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <Section2Fourth@plt>
lea    0xe7e(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
mov    %eax,%r8d
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"\0A2.- | %d | %d | %d | %d |\00"
define i32 @Section2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @Section2First(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @Section2Second(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @Section2Third(i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @Section2Fourth(i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %6, i32 %8, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"\0A2.- | %d | %d | %d | %d |\00"
define i32 @Section2(i32 %0) {
%2 = tail call i32 @Section2First(i32 %0)
%3 = tail call i32 @Section2Second(i32 %0)
%4 = tail call i32 @Section2Third(i32 %0)
%5 = tail call i32 @Section2Fourth(i32 %0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3, i32 %4, i32 %5)
ret i32 0
}
void kvm_vfio_ops_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @kvm_vfio_ops_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ external();
int /*<<< orphan*/ internal();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello Split Module Table world (6)\n");
  internal();
  external();
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <internal@plt>
xor    %eax,%eax
call   1050 <external@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Hello Split Module Table world (6)\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @internal()
%4 = call i32 (...) @external()
ret i32 0
}

LLVM IR (-O2):
@str = [35 x i8] c"Hello Split Module Table world (6)\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @internal()
%3 = tail call i32 (...) @external()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printw(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void m_error(char *msg) {
  printw("### Client Error: %s: %s.\n", msg, strerror(errno));
  refresh();
  getch();
  endwin();
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<m_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
call   1080 <strerror@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
lea    0xe71(%rip),%rdi
call   1030 <printw@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
mov    $0x0,%al
call   1050 <getch@plt>
mov    $0x0,%al
call   1060 <endwin@plt>
mov    0x2e28(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<m_error>:
push   %rbx
mov    %rdi,%rbx
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
call   1080 <strerror@plt>
lea    0xe87(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <printw@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
xor    %eax,%eax
call   1050 <getch@plt>
xor    %eax,%eax
call   1060 <endwin@plt>
mov    0x2e39(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"### Client Error: %s: %s.\0A\00"
@errno = global i32 0
@EXIT_FAILURE = global i32 0
define void @m_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @errno
%5 = call i32 @strerror(i32 %4)
%6 = call i32 @printw(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %5)
%7 = call i32 (...) @refresh()
%8 = call i32 (...) @getch()
%9 = call i32 (...) @endwin()
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"### Client Error: %s: %s.\0A\00"
@errno = global i32 0
@EXIT_FAILURE = global i32 0
define void @m_error(i8* %0) {
%2 = load i32, i32* @errno
%3 = tail call i32 @strerror(i32 %2)
%4 = tail call i32 @printw(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
%5 = tail call i32 (...) @refresh()
%6 = tail call i32 (...) @getch()
%7 = tail call i32 (...) @endwin()
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ posix_error(int, char *);
int pthread_detach(int /*<<< orphan*/);
void Pthread_detach(pthread_t tid) {
  int rc;
  if ((rc = pthread_detach(tid)) != 0)
    posix_error(rc, "Pthread_detach error");
}


x86 assembly (clang, -O0):
<Pthread_detach>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <pthread_detach@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     114e <Pthread_detach+0x2e>
mov    -0x8(%rbp),%edi
lea    0xeb7(%rip),%rsi
call   1030 <posix_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Pthread_detach>:
push   %rax
call   1040 <pthread_detach@plt>
test   %eax,%eax
je     1139 <Pthread_detach+0x19>
lea    0xecf(%rip),%rsi
mov    %eax,%edi
pop    %rax
jmp    1030 <posix_error@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [21 x i8] c"Pthread_detach error\00"
define void @Pthread_detach(i32 %0) {
%2 = tail call i32 @pthread_detach(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @posix_error(i32 %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Type definitions */
struct genhash {
  int dummy;
};
struct entry_hash {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genhash_destroy(struct genhash *);
void entry_hash_destroy(struct entry_hash *tthis) {
  genhash_destroy((struct genhash *)tthis);
}


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

x86 assembly (clang, -O2):
<entry_hash_destroy>:
jmp    1030 <genhash_destroy@plt>

LLVM IR (-O0):
%struct.entry_hash = type { i32 }
%struct.genhash = type { i32 }
define void @entry_hash_destroy(%struct.entry_hash* %0) {
%2 = alloca %struct.entry_hash*
store %struct.entry_hash* %0, %struct.entry_hash** %2
%3 = load %struct.entry_hash*, %struct.entry_hash** %2
%4 = bitcast %struct.entry_hash* %3 to %struct.genhash*
%5 = call i32 @genhash_destroy(%struct.genhash* %4)
ret void
}

LLVM IR (-O2):
%struct.entry_hash = type { i32 }
%struct.genhash = type { i32 }
define void @entry_hash_destroy(%struct.entry_hash* %0) {
%2 = bitcast %struct.entry_hash* %0 to %struct.genhash*
%3 = tail call i32 @genhash_destroy(%struct.genhash* %2)
ret void
}
const char *ccnxPortalClientAbout_Name(void) { return "CCNx Portal Client"; }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"CCNx Portal Client\00"
define i8* @ccnxPortalClientAbout_Name() {
ret i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [19 x i8] c"CCNx Portal Client\00"
define i8* @ccnxPortalClientAbout_Name() {
ret i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ rp_DpinSetDirection(int, int);
void init_gpio(int pin, int value) { rp_DpinSetDirection(pin, value); }


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

x86 assembly (clang, -O2):
<init_gpio>:
jmp    1030 <rp_DpinSetDirection@plt>

LLVM IR (-O0):
define void @init_gpio(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 = call i32 @rp_DpinSetDirection(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @init_gpio(i32 %0, i32 %1) {
%3 = tail call i32 @rp_DpinSetDirection(i32 %0, i32 %1)
ret void
}
int _WLocale_is_stateless(struct _Locale_codecvt *lcodecvt
                          __attribute__((__unused__))) {
  return 1;
}


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

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

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

LLVM IR (-O2):
%struct._Locale_codecvt = type opaque
define i32 @_WLocale_is_stateless(%struct._Locale_codecvt* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int);
void logMsgRecv(int t, int srcAddr, int destAddr, int msgLen, int msgId) {
  printf("%3d: node %d completes recv msg %d from %d, %d packets\n", t,
         destAddr, msgId, srcAddr, msgLen);
}


x86 assembly (clang, -O0):
<logMsgRecv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0x10(%rbp),%r9d
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logMsgRecv>:
mov    %ecx,%r9d
mov    %esi,%eax
mov    %edi,%esi
lea    0xee2(%rip),%rdi
mov    %r8d,%ecx
mov    %eax,%r8d
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"%3d: node %d completes recv msg %d from %d, %d packets\0A\00"
define void @logMsgRecv(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %8
%13 = load i32, i32* %10
%14 = load i32, i32* %7
%15 = load i32, i32* %9
%16 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12, i32 %13, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"%3d: node %d completes recv msg %d from %d, %d packets\0A\00"
define void @logMsgRecv(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %2, i32 %4, i32 %1, i32 %3)
ret void
}
unsigned char encode64Char3(char ci2, char ci3) {
  unsigned char c3 = ci2 & 15;
  c3 = c3 << 2;
  unsigned char tmp3 = ci3 >> 6;
  tmp3 = tmp3 & 3;
  c3 = c3 | tmp3;
  c3 = c3 & 63;
  return c3;
}


x86 assembly (clang, -O0):
<encode64Char3>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
and    $0xf,%eax
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
shl    $0x2,%eax
mov    %al,-0x3(%rbp)
movsbl -0x2(%rbp),%eax
sar    $0x6,%eax
mov    %al,-0x4(%rbp)
movzbl -0x4(%rbp),%eax
and    $0x3,%eax
mov    %al,-0x4(%rbp)
movzbl -0x3(%rbp),%eax
movzbl -0x4(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
and    $0x3f,%eax
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode64Char3>:
shr    $0x6,%sil
lea    0x0(,%rdi,4),%eax
or     %sil,%al
and    $0x3f,%al
ret

LLVM IR (-O0):
define zeroext i8 @encode64Char3(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = and i32 %8, 15
%10 = trunc i32 %9 to i8
store i8 %10, i8* %5
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 2
%14 = trunc i32 %13 to i8
store i8 %14, i8* %5
%15 = load i8, i8* %4
%16 = sext i8 %15 to i32
%17 = ashr i32 %16, 6
%18 = trunc i32 %17 to i8
store i8 %18, i8* %6
%19 = load i8, i8* %6
%20 = zext i8 %19 to i32
%21 = and i32 %20, 3
%22 = trunc i32 %21 to i8
store i8 %22, i8* %6
%23 = load i8, i8* %5
%24 = zext i8 %23 to i32
%25 = load i8, i8* %6
%26 = zext i8 %25 to i32
%27 = or i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %5
%29 = load i8, i8* %5
%30 = zext i8 %29 to i32
%31 = and i32 %30, 63
%32 = trunc i32 %31 to i8
store i8 %32, i8* %5
%33 = load i8, i8* %5
ret i8 %33
}

LLVM IR (-O2):
define zeroext i8 @encode64Char3(i8 signext %0, i8 signext %1) {
%3 = tail call i8 @llvm.fshl.i8(i8 %0, i8 %1, i8 2)
%4 = and i8 %3, 63
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void print_bar(int size) {
  int i;
  for (i = 0; i < size; i++) {
    putchar('#');
  }
}


x86 assembly (clang, -O0):
<print_bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1146 <print_bar+0x36>
mov    $0x23,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <print_bar+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_bar>:
push   %rbx
test   %edi,%edi
jle    112f <print_bar+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x23,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <print_bar+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @print_bar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i32 @putchar(i8 signext 35)
br label %10
10: ; preds = %8
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @print_bar(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @putchar(i8 signext 35)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
int oct(int x, int y) {
  int s;
  if (x <= y)
    s = 1;
  else
    s = 0;
  return s;
}


x86 assembly (clang, -O0):
<oct>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1122 <oct+0x22>
movl   $0x1,-0xc(%rbp)
jmp    1129 <oct+0x29>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<oct>:
xor    %eax,%eax
cmp    %esi,%edi
setle  %al
ret

LLVM IR (-O0):
define i32 @oct(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = icmp sle i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %5
br label %11
10: ; preds = %2
store i32 0, i32* %5
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @oct(i32 %0, i32 %1) {
%3 = icmp sle i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void *test_InterlockedExchangePointer(void *volatile *Target, void *Value) {
  return _InterlockedExchangePointer(Target, Value);
}


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

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

LLVM IR (-O0):
define i8* @test_InterlockedExchangePointer(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %4
%7 = call i32 (i8**, i8*, ...) bitcast (i32 (...)* @_InterlockedExchangePointer to i32 (i8**, i8*, ...)*)(i8** %5, i8* %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
define i8* @test_InterlockedExchangePointer(i8** %0, i8* %1) {
%3 = tail call i32 (i8**, i8*, ...) bitcast (i32 (...)* @_InterlockedExchangePointer to i32 (i8**, i8*, ...)*)(i8** %0, i8* %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_RenderingControl_SetRedVideoBlackLevel(void *);
int /*<<< orphan*/ printf(char *, unsigned int, unsigned short);
void UPnPRenderingControl_SetRedVideoBlackLevel(
    void *upnptoken, unsigned int InstanceID,
    unsigned short DesiredRedVideoBlackLevel) {
  printf("Invoke: UPnPRenderingControl_SetRedVideoBlackLevel(%u,%u);\r\n",
         InstanceID, DesiredRedVideoBlackLevel);
  UPnPResponse_RenderingControl_SetRedVideoBlackLevel(upnptoken);
}


x86 assembly (clang, -O0):
<UPnPRenderingControl_SetRedVideoBlackLevel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %ax,-0xe(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec0(%rip),%rdi
movzwl -0xe(%rbp),%edx
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <UPnPResponse_RenderingControl_SetRedVideoBlackLevel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UPnPRenderingControl_SetRedVideoBlackLevel>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <UPnPResponse_RenderingControl_SetRedVideoBlackLevel@plt>

LLVM IR (-O0):
@.str = [61 x i8] c"Invoke: UPnPRenderingControl_SetRedVideoBlackLevel(%u,%u);\0D\0A\00"
define void @UPnPRenderingControl_SetRedVideoBlackLevel(i8* %0, i32 %1, i16 zeroext %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i16
store i8* %0, i8** %4
store i32 %1, i32* %5
store i16 %2, i16* %6
%7 = load i32, i32* %5
%8 = load i16, i16* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i32 %7, i16 zeroext %8)
%10 = load i8*, i8** %4
%11 = call i32 @UPnPResponse_RenderingControl_SetRedVideoBlackLevel(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [61 x i8] c"Invoke: UPnPRenderingControl_SetRedVideoBlackLevel(%u,%u);\0D\0A\00"
define void @UPnPRenderingControl_SetRedVideoBlackLevel(i8* %0, i32 %1, i16 zeroext %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i32 %1, i16 zeroext %2)
%5 = tail call i32 @UPnPResponse_RenderingControl_SetRedVideoBlackLevel(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ NOROM_DDI16BitfieldWrite(int, int, int, int,
                                            int /*<<< orphan*/);
void OSCClockLossEventDisable(void) {
  NOROM_DDI16BitfieldWrite(0x400CA000, 0x00000000, 0x00000200, 9, 0);
}


x86 assembly (clang, -O0):
<OSCClockLossEventDisable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400ca000,%edi
xor    %r8d,%r8d
mov    $0x200,%edx
mov    $0x9,%ecx
mov    %r8d,%esi
call   1030 <NOROM_DDI16BitfieldWrite@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSCClockLossEventDisable>:
mov    $0x400ca000,%edi
xor    %esi,%esi
mov    $0x200,%edx
mov    $0x9,%ecx
xor    %r8d,%r8d
jmp    1030 <NOROM_DDI16BitfieldWrite@plt>

LLVM IR (-O0):
define void @OSCClockLossEventDisable() {
%1 = call i32 @NOROM_DDI16BitfieldWrite(i32 1074569216, i32 0, i32 512, i32 9, i32 0)
ret void
}

LLVM IR (-O2):
define void @OSCClockLossEventDisable() {
%1 = tail call i32 @NOROM_DDI16BitfieldWrite(i32 1074569216, i32 0, i32 512, i32 9, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ maininit();
int mainprog();
int /*<<< orphan*/ parsecmd(int, char **);
int main(int argc, char *argv[]) {
  maininit();
  parsecmd(argc, argv);
  return mainprog();
}


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    $0x0,%al
call   1050 <maininit@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <parsecmd@plt>
mov    $0x0,%al
call   1030 <mainprog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1050 <maininit@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <parsecmd@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <mainprog@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 = call i32 (...) @maininit()
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @parsecmd(i32 %7, i8** %8)
%10 = call i32 (...) @mainprog()
ret i32 %10
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @maininit()
%4 = tail call i32 @parsecmd(i32 %0, i8** %1)
%5 = tail call i32 (...) @mainprog()
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
int main(int argc, char **argv) {
  char buffer[4096];
  memset(buffer, 0, sizeof(buffer));
  read(0, buffer, sizeof(buffer));
  write(1, buffer, strlen(buffer));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1020,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1010(%rbp),%rdi
xor    %esi,%esi
mov    $0x1000,%edx
call   1050 <memset@plt>
lea    -0x1010(%rbp),%rsi
xor    %edi,%edi
mov    $0x1000,%edx
call   1060 <read@plt>
lea    -0x1010(%rbp),%rax
mov    %rax,-0x1018(%rbp)
lea    -0x1010(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1018(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1030 <write@plt>
xor    %eax,%eax
add    $0x1020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x1000,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1000,%edx
call   1050 <memset@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x1000,%edx
call   1060 <read@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x1000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4096 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%8 = call i32 @memset(i8* %7, i32 0, i32 4096)
%9 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%10 = call i32 @read(i32 0, i8* %9, i32 4096)
%11 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%12 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%13 = call i32 @strlen(i8* %12)
%14 = call i32 @write(i32 1, i8* %11, i32 %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4096 x i8]
%4 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%5 = call i32 @memset(i8* %4, i32 0, i32 4096)
%6 = call i32 @read(i32 0, i8* %4, i32 4096)
%7 = call i32 @strlen(i8* %4)
%8 = call i32 @write(i32 1, i8* %4, i32 %7)
ret i32 0
}
unsigned gcd(unsigned x, unsigned y) {
  while (y > 0) {
    unsigned tmp = y;
    y = x % y;
    x = tmp;
  }
  return x;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jbe    1130 <gcd+0x30>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    110a <gcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111e <gcd+0x1e>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
xor    %edx,%edx
div    %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @gcd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %6
6: ; preds = %9, %2
%7 = load i32, i32* %4
%8 = icmp ugt i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load i32, i32* %4
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = urem i32 %11, %12
store i32 %13, i32* %4
%14 = load i32, i32* %5
store i32 %14, i32* %3
br label %6
15: ; preds = %6
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = urem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %6, %4 ]
ret i32 %10
}
int imx7d_enable_rcosc(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @imx7d_enable_rcosc() {
ret i32 0
}

LLVM IR (-O2):
define i32 @imx7d_enable_rcosc() {
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ _SC_ARG_MAX;
int /*<<< orphan*/ printf(char *, int);
int sysconf(int /*<<< orphan*/);
int main(void) {
  printf("_SC_ARG_MAX (MiB) = %ld\n", sysconf(_SC_ARG_MAX) / (1 << 20));
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    $0x100000,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xfffff(%rax),%esi
test   %eax,%eax
cmovns %eax,%esi
sar    $0x14,%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"_SC_ARG_MAX (MiB) = %ld\0A\00"
@_SC_ARG_MAX = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @_SC_ARG_MAX
%3 = call i32 @sysconf(i32 %2)
%4 = sdiv i32 %3, 1048576
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}

LLVM IR (-O2):
@.str = [25 x i8] c"_SC_ARG_MAX (MiB) = %ld\0A\00"
@_SC_ARG_MAX = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = load i32, i32* @_SC_ARG_MAX
%2 = tail call i32 @sysconf(i32 %1)
%3 = sdiv i32 %2, 1048576
%4 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ set_rounding();
float sqrtf(float const);
void sqrt_s(const float *source, float *target) {
  set_rounding();
  *target = sqrtf(*source);
}


x86 assembly (clang, -O0):
<sqrt_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <set_rounding@plt>
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <sqrtf@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrt_s>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <set_rounding@plt>
movss  (%rbx),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1143 <sqrt_s+0x23>
sqrtss %xmm0,%xmm0
jmp    1148 <sqrt_s+0x28>
call   1030 <sqrtf@plt>
movss  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @sqrt_s(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = call i32 (...) @set_rounding()
%6 = load float*, float** %3
%7 = load float, float* %6
%8 = call float @sqrtf(float %7)
%9 = load float*, float** %4
store float %8, float* %9
ret void
}

LLVM IR (-O2):
define void @sqrt_s(float* nocapture %0, float* nocapture writeonly %1) {
%3 = tail call i32 (...) @set_rounding()
%4 = load float, float* %0
%5 = tail call float @sqrtf(float %4)
store float %5, float* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x81() {
  Assert_real((islower(129) == 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_islower.c",
              650, ("islower should be 0 for 0x81"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x81>:
push   %rax
mov    $0x81,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x28a,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x81\00"
define void @t_islower_0x81() {
%1 = call i64 @islower(i32 129)
%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 650, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x81\00"
define void @t_islower_0x81() {
%1 = tail call i64 @islower(i32 129)
%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 650, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ meUtilityDcacheWritebackInvalidateAll();
scalar_t__ meUtilityIsME();
int /*<<< orphan*/ sceKernelSleepThread();
void YabThreadSleep(void) {
  if (meUtilityIsME()) {
    meUtilityDcacheWritebackInvalidateAll();
  } else {
    sceKernelSleepThread();
  }
}


x86 assembly (clang, -O0):
<YabThreadSleep>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <meUtilityIsME@plt>
cmp    $0x0,%rax
je     1151 <YabThreadSleep+0x21>
mov    $0x0,%al
call   1030 <meUtilityDcacheWritebackInvalidateAll@plt>
jmp    1158 <YabThreadSleep+0x28>
mov    $0x0,%al
call   1050 <sceKernelSleepThread@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<YabThreadSleep>:
push   %rax
xor    %eax,%eax
call   1040 <meUtilityIsME@plt>
test   %rax,%rax
je     1145 <YabThreadSleep+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <meUtilityDcacheWritebackInvalidateAll@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <sceKernelSleepThread@plt>

LLVM IR (-O0):
define void @YabThreadSleep() {
%1 = call i64 (...) @meUtilityIsME()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @meUtilityDcacheWritebackInvalidateAll()
br label %7
5: ; preds = %0
%6 = call i32 (...) @sceKernelSleepThread()
br label %7
7: ; preds = %5, %3
ret void
}

LLVM IR (-O2):
define void @YabThreadSleep() {
%1 = tail call i64 (...) @meUtilityIsME()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @meUtilityDcacheWritebackInvalidateAll()
br label %7
5: ; preds = %0
%6 = tail call i32 (...) @sceKernelSleepThread()
br label %7
7: ; preds = %5, %3
ret void
}