#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ stress_mount_add(char **, int const, int *, char *);
int stress_mount_get(char *mnts[], const int max) {
  int n = 0;
  stress_mount_add(mnts, max, &n, "/");
  stress_mount_add(mnts, max, &n, "/dev");
  stress_mount_add(mnts, max, &n, "/tmp");
  return n;
}


x86 assembly (clang, -O0):
<stress_mount_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x10(%rbp),%rdx
lea    0xec8(%rip),%rcx
call   1030 <stress_mount_add@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x10(%rbp),%rdx
lea    0xeb3(%rip),%rcx
call   1030 <stress_mount_add@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x10(%rbp),%rdx
lea    0xea1(%rip),%rcx
call   1030 <stress_mount_add@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_mount_get>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
movl   $0x0,0xc(%rsp)
lea    0xed4(%rip),%rcx
lea    0xc(%rsp),%r14
mov    %r14,%rdx
call   1030 <stress_mount_add@plt>
lea    0xec2(%rip),%rcx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
call   1030 <stress_mount_add@plt>
lea    0xeb3(%rip),%rcx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
call   1030 <stress_mount_add@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
@.str.1 = [5 x i8] c"/dev\00"
@.str.2 = [5 x i8] c"/tmp\00"
define i32 @stress_mount_get(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = load i8**, i8*** %3
%7 = load i32, i32* %4
%8 = call i32 @stress_mount_add(i8** %6, i32 %7, i32* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = load i8**, i8*** %3
%10 = load i32, i32* %4
%11 = call i32 @stress_mount_add(i8** %9, i32 %10, i32* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%12 = load i8**, i8*** %3
%13 = load i32, i32* %4
%14 = call i32 @stress_mount_add(i8** %12, i32 %13, i32* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
@.str.1 = [5 x i8] c"/dev\00"
@.str.2 = [5 x i8] c"/tmp\00"
define i32 @stress_mount_get(i8** %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = call i32 @stress_mount_add(i8** %0, i32 %1, i32* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @stress_mount_add(i8** %0, i32 %1, i32* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @stress_mount_add(i8** %0, i32 %1, i32* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%8 = load i32, i32* %3
ret i32 %8
}