xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __console_tx_char(unsigned char);
void print_crit_char(unsigned char byte) { __console_tx_char(byte); }


x86 assembly (clang, -O0):
<print_crit_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <__console_tx_char@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_crit_char>:
jmp    1030 <__console_tx_char@plt>

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

LLVM IR (-O2):
define void @print_crit_char(i8 zeroext %0) {
%2 = tail call i32 @__console_tx_char(i8 zeroext %0)
ret void
}
int test7(int x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @test7(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ cleanup();
int /*<<< orphan*/ raise(int);
int /*<<< orphan*/ signal(int, int /*<<< orphan*/);
void handleInterrupt(int sig) {
  signal(sig, SIG_DFL);
  cleanup();
  raise(sig);
}


x86 assembly (clang, -O0):
<handleInterrupt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    $0x0,%al
call   1050 <cleanup@plt>
mov    -0x4(%rbp),%edi
call   1030 <raise@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handleInterrupt>:
push   %rbx
mov    %edi,%ebx
mov    0x2ea6(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
xor    %eax,%eax
call   1050 <cleanup@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <raise@plt>

LLVM IR (-O0):
@SIG_DFL = global i32 0
define void @handleInterrupt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIG_DFL
%5 = call i32 @signal(i32 %3, i32 %4)
%6 = call i32 (...) @cleanup()
%7 = load i32, i32* %2
%8 = call i32 @raise(i32 %7)
ret void
}

LLVM IR (-O2):
@SIG_DFL = global i32 0
define void @handleInterrupt(i32 %0) {
%2 = load i32, i32* @SIG_DFL
%3 = tail call i32 @signal(i32 %0, i32 %2)
%4 = tail call i32 (...) @cleanup()
%5 = tail call i32 @raise(i32 %0)
ret void
}
/* Type definitions */
struct pci_dev {
  int dummy;
};

/* Variables and functions */
scalar_t__ enable_flash_nvidia_common(struct pci_dev *, char const *);
int /*<<< orphan*/ rpci_write_byte(struct pci_dev *, int, int /*<<< orphan*/);
int enable_flash_nvidia_nforce2(struct pci_dev *dev, const char *name) {
  rpci_write_byte(dev, 0x92, 0);
  if (enable_flash_nvidia_common(dev, name))
    return 0x100;
  else
    return 0;
}


x86 assembly (clang, -O0):
<enable_flash_nvidia_nforce2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x92,%esi
xor    %edx,%edx
call   1040 <rpci_write_byte@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <enable_flash_nvidia_common@plt>
cmp    $0x0,%rax
je     1163 <enable_flash_nvidia_nforce2+0x43>
movl   $0x100,-0x4(%rbp)
jmp    116a <enable_flash_nvidia_nforce2+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enable_flash_nvidia_nforce2>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x92,%esi
xor    %edx,%edx
call   1040 <rpci_write_byte@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <enable_flash_nvidia_common@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
shl    $0x8,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.pci_dev = type { i32 }
define i32 @enable_flash_nvidia_nforce2(%struct.pci_dev* %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.pci_dev*
%5 = alloca i8*
store %struct.pci_dev* %0, %struct.pci_dev** %4
store i8* %1, i8** %5
%6 = load %struct.pci_dev*, %struct.pci_dev** %4
%7 = call i32 @rpci_write_byte(%struct.pci_dev* %6, i32 146, i32 0)
%8 = load %struct.pci_dev*, %struct.pci_dev** %4
%9 = load i8*, i8** %5
%10 = call i64 @enable_flash_nvidia_common(%struct.pci_dev* %8, i8* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 256, i32* %3
br label %14
13: ; preds = %2
store i32 0, i32* %3
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
%struct.pci_dev = type { i32 }
define i32 @enable_flash_nvidia_nforce2(%struct.pci_dev* %0, i8* %1) {
%3 = tail call i32 @rpci_write_byte(%struct.pci_dev* %0, i32 146, i32 0)
%4 = tail call i64 @enable_flash_nvidia_common(%struct.pci_dev* %0, i8* %1)
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i32 0, i32 256
ret i32 %6
}
int compute_mod(int a, int b) {
  a = a % b;
  if (a >= 0)
    return a;
  else
    return a + b;
}


x86 assembly (clang, -O0):
<compute_mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1129 <compute_mod+0x29>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1132 <compute_mod+0x32>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_mod>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
sar    $0x1f,%eax
and    %esi,%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @compute_mod(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = icmp slt i32 %3, 0
%5 = select i1 %4, i32 %1, i32 0
%6 = add nsw i32 %5, %3
ret i32 %6
}
void gtk_progress_bar_set_pulse_step() {}


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

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

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

LLVM IR (-O2):
define void @gtk_progress_bar_set_pulse_step() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
print(int c, int arr[][c]) { printf("hello"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
define i32 @print(i32 %0, i32* nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ SIGBUS;
int /*<<< orphan*/ derror(int);
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
void bus_intr(int sig_num) {
  signal(SIGBUS, bus_intr);
  derror(11);
}


x86 assembly (clang, -O0):
<bus_intr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    0x2e9d(%rip),%rsi
call   1040 <signal@plt>
mov    $0xb,%edi
call   1030 <derror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bus_intr>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
mov    0x2ea7(%rip),%rsi
call   1040 <signal@plt>
mov    $0xb,%edi
pop    %rax
jmp    1030 <derror@plt>

LLVM IR (-O0):
@SIGBUS = global i32 0
define void @bus_intr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SIGBUS
%4 = call i32 @signal(i32 %3, void (i32)* @bus_intr)
%5 = call i32 @derror(i32 11)
ret void
}

LLVM IR (-O2):
@SIGBUS = global i32 0
define void @bus_intr(i32 %0) {
%2 = load i32, i32* @SIGBUS
%3 = tail call i32 @signal(i32 %2, void (i32)* @bus_intr)
%4 = tail call i32 @derror(i32 11)
ret void
}
/* Type definitions */
struct servent {
  char *s_name;
};

/* Variables and functions */
struct servent *getservbyport(int /*<<< orphan*/, char *);
int /*<<< orphan*/ htons(int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  struct servent *srv_ent = NULL;
  srv_ent = getservbyport(htons(21), "tcp");
  if (srv_ent)
    printf("name = %s\n", srv_ent->s_name);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x15,%edi
call   1030 <htons@plt>
mov    %eax,%edi
lea    0xea6(%rip),%rsi
call   1050 <getservbyport@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1181 <main+0x51>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe88(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x15,%edi
call   1030 <htons@plt>
lea    0xebe(%rip),%rsi
mov    %eax,%edi
call   1050 <getservbyport@plt>
test   %rax,%rax
je     115d <main+0x2d>
mov    (%rax),%rsi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.servent = type { i8* }
@.str = [4 x i8] c"tcp\00"
@.str.1 = [11 x i8] c"name = %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.servent*
store i32 0, i32* %1
store %struct.servent* null, %struct.servent** %2
%3 = call i32 @htons(i32 21)
%4 = call %struct.servent* @getservbyport(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store %struct.servent* %4, %struct.servent** %2
%5 = load %struct.servent*, %struct.servent** %2
%6 = icmp ne %struct.servent* %5, null
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load %struct.servent*, %struct.servent** %2
%9 = getelementptr inbounds %struct.servent, %struct.servent* %8, i32 0, i32 0
%10 = load i8*, i8** %9
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %7, %0
ret i32 0
}

LLVM IR (-O2):
%struct.servent = type { i8* }
@.str = [4 x i8] c"tcp\00"
@.str.1 = [11 x i8] c"name = %s\0A\00"
define i32 @main() {
%1 = tail call i32 @htons(i32 21)
%2 = tail call %struct.servent* @getservbyport(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq %struct.servent* %2, null
br i1 %3, label %8, label %4
4: ; preds = %0
%5 = getelementptr inbounds %struct.servent, %struct.servent* %2, i64 0, i32 0
%6 = load i8*, i8** %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %4, %0
ret i32 0
}
double CtoK(double C) {
  double k = C + 273.15;
  return k;
}


x86 assembly (clang, -O0):
<CtoK>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<CtoK>:
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @CtoK(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fadd double %4, 2.731500e+02
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @CtoK(double %0) {
%2 = fadd double %0, 2.731500e+02
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ useSockets();
void test2(void) { useSockets(); }


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

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

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

LLVM IR (-O2):
define void @test2() {
%1 = tail call i32 (...) @useSockets()
ret void
}
void pass(char *pstr, char ch) {
  (__extension__(__builtin_constant_p(ch++) && !__builtin_constant_p(pstr) &&
                         (ch++) == '\0'
                     ? (char *)__rawmemchr(pstr, ch++)
                     : __builtin_strchr(pstr, ch++)));
}


x86 assembly (clang, -O0):
<pass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%al
mov    %al,%cl
add    $0x1,%cl
mov    %cl,-0x9(%rbp)
movsbl %al,%esi
call   1030 <strchr@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @pass(i8* %0, i8 signext %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 = add i8 %6, 1
store i8 %7, i8* %4
%8 = sext i8 %6 to i32
%9 = call i8* @strchr(i8* %5, i32 %8)
ret void
}

LLVM IR (-O2):
define void @pass(i8* nocapture %0, i8 signext %1) {
ret void
}
int is_id_start_char(char c) {
  return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_';
}


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

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

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

LLVM IR (-O2):
define i32 @is_id_start_char(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = icmp eq i8 %0, 95
%6 = or i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ hrt(double, double, char *);
int /*<<< orphan*/ printf(char *, double, double);
void print_four(double x, double y) {
  printf("        <rect x=\"%.2fin\" y=\"%.2fin\" width=\"5.75in\" "
         "height=\"1.00in\" fill=\"#ef0000\" />\n",
         x, y);
  hrt(x, y, "4");
}


x86 assembly (clang, -O0):
<print_four>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xefd(%rip),%rdi
call   1030 <hrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_four>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
lea    0xf13(%rip),%rdi
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
add    $0x18,%rsp
jmp    1030 <hrt@plt>

LLVM IR (-O0):
@.str = [86 x i8] c" <rect x=\22%.2fin\22 y=\22%.2fin\22 width=\225.75in\22 height=\221.00in\22 fill=\22#ef0000\22 />\0A\00"
@.str.1 = [2 x i8] c"4\00"
define void @print_four(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 = call i32 @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0), double %5, double %6)
%8 = load double, double* %3
%9 = load double, double* %4
%10 = call i32 @hrt(double %8, double %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [86 x i8] c" <rect x=\22%.2fin\22 y=\22%.2fin\22 width=\225.75in\22 height=\221.00in\22 fill=\22#ef0000\22 />\0A\00"
@.str.1 = [2 x i8] c"4\00"
define void @print_four(double %0, double %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0), double %0, double %1)
%4 = tail call i32 @hrt(double %0, double %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cwrapper_q_sortrev_double_with_double(double *, double *,
                                                         int /*<<< orphan*/,
                                                         int);
void quicksortrev_double_with_double_(double numbers[], double indices[],
                                      int *array_size) {
  cwrapper_q_sortrev_double_with_double(numbers, indices, 0, (*array_size) - 1);
}


x86 assembly (clang, -O0):
<quicksortrev_double_with_double_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
sub    $0x1,%ecx
xor    %edx,%edx
call   1030 <cwrapper_q_sortrev_double_with_double@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksortrev_double_with_double_>:
mov    (%rdx),%ecx
add    $0xffffffff,%ecx
xor    %edx,%edx
jmp    1030 <cwrapper_q_sortrev_double_with_double@plt>

LLVM IR (-O0):
define void @quicksortrev_double_with_double_(double* %0, double* %1, i32* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32*
store double* %0, double** %4
store double* %1, double** %5
store i32* %2, i32** %6
%7 = load double*, double** %4
%8 = load double*, double** %5
%9 = load i32*, i32** %6
%10 = load i32, i32* %9
%11 = sub nsw i32 %10, 1
%12 = call i32 @cwrapper_q_sortrev_double_with_double(double* %7, double* %8, i32 0, i32 %11)
ret void
}

LLVM IR (-O2):
define void @quicksortrev_double_with_double_(double* %0, double* %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
%6 = tail call i32 @cwrapper_q_sortrev_double_with_double(double* %0, double* %1, i32 0, i32 %5)
ret void
}
/* Variables and functions */
void ThreadUnlock(void) {}


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

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

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

LLVM IR (-O2):
define void @ThreadUnlock() {
ret void
}
int test_imm_44int16_mem(short *val) {
  return ((*val) & (0x44 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_44int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0x44,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_44int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 68
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void glPointParameterx(void) { return; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @willus_mem_close() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOENT;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *);
int link(const char *path1 __attribute__((unused)),
         const char *path2 __attribute__((unused))) {
  printf("link\n");
  errno = ENOENT;
  return -1;
}


x86 assembly (clang, -O0):
<link>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea4(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<link>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%eax
mov    0x2eb3(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@ENOENT = global i32 0
@errno = global i32 0
@str = [5 x i8] c"link\00"
define i32 @link(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @ENOENT
store i32 %4, i32* @errno
ret i32 -1
}
int level2shift(int level) { return (12 + 9 * (3 - level)); }


x86 assembly (clang, -O0):
<level2shift>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x3,%eax
sub    -0x4(%rbp),%eax
imul   $0x9,%eax,%eax
add    $0xc,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<level2shift>:
mov    $0x3,%eax
sub    %edi,%eax
lea    (%rax,%rax,8),%eax
add    $0xc,%eax
ret

LLVM IR (-O0):
define i32 @level2shift(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 3, %3
%5 = mul nsw i32 9, %4
%6 = add nsw i32 12, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @level2shift(i32 %0) {
%2 = sub nsw i32 3, %0
%3 = mul nsw i32 %2, 9
%4 = add nsw i32 %3, 12
ret i32 %4
}
int test_imm_5Dint16_mem(short *val) {
  return ((*val) & (-0x5D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Dint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffffa3,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Dint16_mem>:
movzwl (%rdi),%eax
test   $0xffa3,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_5Dint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -93
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ maccess(void *);
size_t rdtscp_noaux();
size_t onlyreload(void *addr) {
  uint32_t aux;
  size_t time = rdtscp_noaux();
  maccess(addr);
  size_t delta = rdtscp_noaux() - time;
  return delta;
}


x86 assembly (clang, -O0):
<onlyreload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <rdtscp_noaux@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <maccess@plt>
mov    $0x0,%al
call   1040 <rdtscp_noaux@plt>
sub    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<onlyreload>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <rdtscp_noaux@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <maccess@plt>
xor    %eax,%eax
call   1040 <rdtscp_noaux@plt>
sub    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @onlyreload(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %2
%6 = call i64 (...) @rdtscp_noaux()
store i64 %6, i64* %4
%7 = load i8*, i8** %2
%8 = call i32 @maccess(i8* %7)
%9 = call i64 (...) @rdtscp_noaux()
%10 = load i64, i64* %4
%11 = sub i64 %9, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
ret i64 %12
}

LLVM IR (-O2):
define i64 @onlyreload(i8* %0) {
%2 = tail call i64 (...) @rdtscp_noaux()
%3 = tail call i32 @maccess(i8* %0)
%4 = tail call i64 (...) @rdtscp_noaux()
%5 = sub i64 %4, %2
ret i64 %5
}
void foo(int *x, int *y) {
  *x = 0;
  if (x != y)
    foo(y, y);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1145 <foo+0x35>
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <foo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movl   $0x0,(%rdi)
cmp    %rsi,%rdi
je     1111 <foo+0x11>
movl   $0x0,(%rsi)
ret

LLVM IR (-O0):
define void @foo(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
store i32 0, i32* %5
%6 = load i32*, i32** %3
%7 = load i32*, i32** %4
%8 = icmp ne i32* %6, %7
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32*, i32** %4
%11 = load i32*, i32** %4
br label %12
12: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
define void @foo(i32* writeonly %0, i32* writeonly %1) {
store i32 0, i32* %0
%3 = icmp eq i32* %0, %1
br i1 %3, label %5, label %4
4: ; preds = %2
store i32 0, i32* %1
br label %5
5: ; preds = %4, %2
ret void
}
/* Variables and functions */
int barriereNatif32(int);
scalar_t__ systemeBigEndian();
int big32VersNatif(int big) {
  if (systemeBigEndian()) {
    return big;
  } else {
    return barriereNatif32(big);
  }
}


x86 assembly (clang, -O0):
<big32VersNatif>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <systemeBigEndian@plt>
cmp    $0x0,%rax
je     1147 <big32VersNatif+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <big32VersNatif+0x32>
mov    -0x8(%rbp),%edi
call   1040 <barriereNatif32@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<big32VersNatif>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <systemeBigEndian@plt>
test   %rax,%rax
je     1133 <big32VersNatif+0x13>
mov    %ebx,%eax
pop    %rbx
ret
mov    %ebx,%edi
pop    %rbx
jmp    1040 <barriereNatif32@plt>

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

LLVM IR (-O2):
define i32 @big32VersNatif(i32 %0) {
%2 = tail call i64 (...) @systemeBigEndian()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @barriereNatif32(i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ %0, %1 ]
ret i32 %7
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t be32dec(const void *buf) {
  const uint8_t *b = (const uint8_t *)buf;
  return ((uint32_t)(b[0]) << 24) + ((uint32_t)(b[1]) << 16) +
         ((uint32_t)(b[2]) << 8) + (uint32_t)(b[3]);
}


x86 assembly (clang, -O0):
<be32dec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
shl    $0x18,%eax
mov    -0x10(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x18(%rcx),%rcx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<be32dec>:
mov    (%rdi),%eax
mov    0x8(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
add    %eax,%ecx
mov    0x10(%rdi),%eax
shl    $0x8,%eax
add    %ecx,%eax
add    0x18(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @be32dec(i8* %0) {
%2 = alloca i8*
%3 = alloca i64*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i64*
store i64* %5, i64** %3
%6 = load i64*, i64** %3
%7 = getelementptr inbounds i64, i64* %6, i64 0
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = shl i32 %9, 24
%11 = load i64*, i64** %3
%12 = getelementptr inbounds i64, i64* %11, i64 1
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
%15 = shl i32 %14, 16
%16 = add nsw i32 %10, %15
%17 = load i64*, i64** %3
%18 = getelementptr inbounds i64, i64* %17, i64 2
%19 = load i64, i64* %18
%20 = trunc i64 %19 to i32
%21 = shl i32 %20, 8
%22 = add nsw i32 %16, %21
%23 = load i64*, i64** %3
%24 = getelementptr inbounds i64, i64* %23, i64 3
%25 = load i64, i64* %24
%26 = trunc i64 %25 to i32
%27 = add nsw i32 %22, %26
ret i32 %27
}

LLVM IR (-O2):
define i32 @be32dec(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = shl i32 %4, 24
%6 = getelementptr inbounds i8, i8* %0, i64 8
%7 = bitcast i8* %6 to i64*
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = shl i32 %9, 16
%11 = add nsw i32 %10, %5
%12 = getelementptr inbounds i8, i8* %0, i64 16
%13 = bitcast i8* %12 to i64*
%14 = load i64, i64* %13
%15 = trunc i64 %14 to i32
%16 = shl i32 %15, 8
%17 = add nsw i32 %11, %16
%18 = getelementptr inbounds i8, i8* %0, i64 24
%19 = bitcast i8* %18 to i64*
%20 = load i64, i64* %19
%21 = trunc i64 %20 to i32
%22 = add nsw i32 %17, %21
ret i32 %22
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
int romanToInt(char *);
int main(int argc, char **argv) {
  printf("input%s output:%d \n", "MCMXCVI", romanToInt("MCMXCVI"));
  ;
  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    0xed7(%rip),%rdi
call   1040 <romanToInt@plt>
mov    %eax,%edx
lea    0xeb5(%rip),%rdi
lea    0xec2(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeec(%rip),%rbx
mov    %rbx,%rdi
call   1040 <romanToInt@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"input%s output:%d \0A\00"
@.str.1 = [8 x i8] c"MCMXCVI\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 @romanToInt(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"input%s output:%d \0A\00"
@.str.1 = [8 x i8] c"MCMXCVI\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @romanToInt(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
void free_node(struct queue *q) {}


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

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

LLVM IR (-O0):
%struct.queue = type opaque
define void @free_node(%struct.queue* %0) {
%2 = alloca %struct.queue*
store %struct.queue* %0, %struct.queue** %2
ret void
}

LLVM IR (-O2):
%struct.queue = type opaque
define void @free_node(%struct.queue* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
char *getprogname();
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "Usage: %s [-clp] utility [argument ...]\n",
                getprogname());
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rdx
lea    0xea8(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1030 <getprogname@plt>
lea    0xeb8(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1040 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"Usage: %s [-clp] utility [argument ...]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i8* (...) @getprogname()
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i32, i32* @EXIT_FAILURE
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"Usage: %s [-clp] utility [argument ...]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i8* (...) @getprogname()
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void wpas_dbus_unregister_p2p_group(struct wpa_supplicant *wpa_s,
                                    const struct wpa_ssid *ssid) {}


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

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

LLVM IR (-O0):
%struct.wpa_supplicant = type opaque
%struct.wpa_ssid = type opaque
define void @wpas_dbus_unregister_p2p_group(%struct.wpa_supplicant* %0, %struct.wpa_ssid* %1) {
%3 = alloca %struct.wpa_supplicant*
%4 = alloca %struct.wpa_ssid*
store %struct.wpa_supplicant* %0, %struct.wpa_supplicant** %3
store %struct.wpa_ssid* %1, %struct.wpa_ssid** %4
ret void
}

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
%struct.wpa_ssid = type opaque
define void @wpas_dbus_unregister_p2p_group(%struct.wpa_supplicant* nocapture %0, %struct.wpa_ssid* nocapture %1) {
ret void
}
/* Variables and functions */
int parse_ff(char **, int /*<<< orphan*/);
int /*<<< orphan*/ strspn(char *, char *);
int parse_ff_past_consec(char **buf, char *accept) {
  return parse_ff(buf, strspn(*buf, accept));
}


x86 assembly (clang, -O0):
<parse_ff_past_consec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strspn@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1030 <parse_ff@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_ff_past_consec>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1040 <strspn@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <parse_ff@plt>

LLVM IR (-O0):
define i32 @parse_ff_past_consec(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*** %3
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = call i32 @strspn(i8* %7, i8* %8)
%10 = call i32 @parse_ff(i8** %5, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @parse_ff_past_consec(i8** %0, i8* nocapture %1) {
%3 = load i8*, i8** %0
%4 = tail call i32 @strspn(i8* %3, i8* %1)
%5 = tail call i32 @parse_ff(i8** %0, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ _Error(long, char *);
void Error_ConstantArrayKeyIsNotStringLiteral(long p_position) {
  _Error(p_position, "Array keys must be strings");
}


x86 assembly (clang, -O0):
<Error_ConstantArrayKeyIsNotStringLiteral>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <_Error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Error_ConstantArrayKeyIsNotStringLiteral>:
lea    0xee9(%rip),%rsi
jmp    1030 <_Error@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Array keys must be strings\00"
define void @Error_ConstantArrayKeyIsNotStringLiteral(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_Error(i64 %3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Array keys must be strings\00"
define void @Error_ConstantArrayKeyIsNotStringLiteral(i64 %0) {
%2 = tail call i32 @_Error(i64 %0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}
void InsertBlanks(Howmany) int Howmany;
{
  char Str[10];
  if (Howmany == 0)
    return;
  sprintf(Str, "\033[%d@", Howmany);
  WRITETEST(Str);
}


x86 assembly (clang, -O0):
<InsertBlanks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    113a <InsertBlanks+0x1a>
jmp    115a <InsertBlanks+0x3a>
lea    -0xe(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeb8(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0xe(%rbp),%rdi
mov    $0x0,%al
call   1030 <WRITETEST@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InsertBlanks>:
test   %edi,%edi
je     1150 <InsertBlanks+0x30>
push   %rbx
sub    $0x10,%rsp
mov    %edi,%edx
lea    0xece(%rip),%rsi
lea    0x6(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <WRITETEST@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[%d@\00"
define void @InsertBlanks(i32 %0) {
%2 = alloca i32
%3 = alloca [10 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %13
7: ; preds = %1
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%9 = load i32, i32* %2
%10 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @WRITETEST to i32 (i8*, ...)*)(i8* %11)
br label %13
13: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[%d@\00"
define void @InsertBlanks(i32 %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = icmp eq i32 %0, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = call i32 (i8*, i8*, ...) @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @WRITETEST to i32 (i8*, ...)*)(i8* %3)
br label %8
8: ; preds = %1, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x57() {
  Assert_real((isgraph(87)),
              "/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_isgraph.c",
              440, ("isgraph should be 1 for W"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x57>:
push   %rbp
mov    %rsp,%rbp
mov    $0x57,%edi
call   1040 <isgraph@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1b8,%edx
lea    0xf65(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x57>:
push   %rax
mov    $0x57,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1b8,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for W\00"
define void @t_isgraph_0x57() {
%1 = call i32 @isgraph(i32 87)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 440, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for W\00"
define void @t_isgraph_0x57() {
%1 = tail call i32 @isgraph(i32 87)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 440, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
main() {
  enum _tag { left = 10, right, front = 100, back };
  printf("left is %d, right is %d, front is %d, back is %d", left, right, front,
         back);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0xa,%esi
mov    $0xb,%edx
mov    $0x64,%ecx
mov    $0x65,%r8d
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xa,%esi
mov    $0xb,%edx
mov    $0x64,%ecx
mov    $0x65,%r8d
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"left is %d, right is %d, front is %d, back is %d\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 10, i32 11, i32 100, i32 101)
ret i32 0
}

LLVM IR (-O2):
@.str = [49 x i8] c"left is %d, right is %d, front is %d, back is %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 10, i32 11, i32 100, i32 101)
ret i32 0
}
/* Variables and functions */
char *strdup(char const *);
int /*<<< orphan*/ toupper(char);
char *upcaseName(const char *name) {
  char *ret = strdup(name);
  char *c = ret;
  while (*c)
    *c++ = toupper(*c);
  return ret;
}


x86 assembly (clang, -O0):
<upcaseName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1172 <upcaseName+0x52>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1141 <upcaseName+0x21>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<upcaseName>:
push   %r14
push   %rbx
push   %rax
call   1040 <strdup@plt>
mov    %rax,%r14
mov    (%rax),%al
test   %al,%al
je     1156 <upcaseName+0x36>
mov    %r14,%rbx
add    $0x1,%rbx
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1140 <upcaseName+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @upcaseName(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @strdup(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
store i8* %7, i8** %4
br label %8
8: ; preds = %12, %1
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = call i32 @toupper(i8 signext %14)
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %4
store i8 %16, i8* %17
br label %8
19: ; preds = %8
%20 = load i8*, i8** %3
ret i8* %20
}

LLVM IR (-O2):
define noalias i8* @upcaseName(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %1, %5
%6 = phi i8 [ %11, %5 ], [ %3, %1 ]
%7 = phi i8* [ %10, %5 ], [ %2, %1 ]
%8 = tail call i32 @toupper(i8 signext %6)
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %9, i8* %7
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %1
ret i8* %2
}